diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..72b1a4f87 --- /dev/null +++ b/.clang-format @@ -0,0 +1,54 @@ +--- +# Base style +BasedOnStyle: LLVM + +# Indentation settings +IndentWidth: 4 +UseTab: Never +TabWidth: 4 + +# Access modifier offset +AccessModifierOffset: -4 + +# Brace breaking style +BreakBeforeBraces: Allman + +# Pointer and reference alignment +PointerAlignment: Left +ReferenceAlignment: Left + +# Space settings +SpaceBeforeParens: ControlStatements +SpaceBeforeAssignmentOperators: true +SpaceBeforeRangeBasedForLoopColon: true +SpaceInEmptyParentheses: false +SpacesInAngles: false +SpacesInContainerLiterals: true +SpacesInParentheses: false +SpacesInSquareBrackets: false + +# Column limit +ColumnLimit: 256 + +# Namespace indentation +NamespaceIndentation: All + +# Keep short statements on single line +AllowShortBlocksOnASingleLine: Empty +AllowShortFunctionsOnASingleLine: Empty +AllowShortIfStatementsOnASingleLine: Never +AllowShortLoopsOnASingleLine: false + +# Constructor initializer list +ConstructorInitializerIndentWidth: 4 +BreakConstructorInitializers: BeforeColon + +# Binary operator line breaking +BreakBeforeBinaryOperators: None + +# Comment alignment +AlignTrailingComments: true + +# Consecutive assignment alignment +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false \ No newline at end of file diff --git a/.editorconfig b/.editorconfig index 63c57481f..8d0744627 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,6 +1,11 @@ # Visual Studio generated .editorconfig file with C++ settings. root = true +[*] +indent_style = space +indent_size = 4 +charset = utf-8 + [*.{c++,cc,cpp,cppm,cxx,h,h++,hh,hpp,hxx,inl,ipp,ixx,tlh,tli}] # Visual C++ Code Style settings @@ -12,7 +17,7 @@ cpp_generate_documentation_comments = xml cpp_indent_braces = false cpp_indent_multi_line_relative_to = innermost_parenthesis cpp_indent_within_parentheses = indent -cpp_indent_preserve_within_parentheses = true +cpp_indent_preserve_within_parentheses = false cpp_indent_case_contents = true cpp_indent_case_labels = false cpp_indent_case_contents_when_block = false @@ -60,7 +65,7 @@ cpp_space_remove_around_member_operators = true cpp_space_before_inheritance_colon = true cpp_space_before_constructor_colon = true cpp_space_remove_before_semicolon = true -cpp_space_after_semicolon = true +cpp_space_after_semicolon = false cpp_space_remove_around_unary_operator = true cpp_space_around_binary_operator = insert cpp_space_around_assignment_operator = insert @@ -167,8 +172,6 @@ csharp_style_unused_value_expression_statement_preference = discard_variable dotnet_diagnostic.IDE0058.severity = warning csharp_style_unused_value_assignment_preference = discard_variable dotnet_diagnostic.IDE0059.severity = warning - -indent_style = space csharp_indent_case_contents = true csharp_indent_switch_labels = true csharp_new_line_before_open_brace = types, object_collection, methods, control_blocks, lambdas diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8275161a2..ef811b369 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,7 +45,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.0.x' + dotnet-version: '10.0.x' - name: Build managed run: | cd managed @@ -231,14 +231,14 @@ jobs: run: | mkdir -p ./linux-runtimes cd ./linux-runtimes - wget https://builds.dotnet.microsoft.com/dotnet/Runtime/8.0.20/dotnet-runtime-8.0.20-linux-x64.tar.gz + wget https://builds.dotnet.microsoft.com/dotnet/Runtime/10.0.0/dotnet-runtime-10.0.0-linux-x64.tar.gz mkdir -p content - tar -xzf dotnet-runtime-8.0.20-linux-x64.tar.gz -C content + tar -xzf dotnet-runtime-10.0.0-linux-x64.tar.gz -C content cd .. mkdir -p ./windows-runtimes cd ./windows-runtimes - wget https://builds.dotnet.microsoft.com/dotnet/Runtime/8.0.20/dotnet-runtime-8.0.20-win-x64.zip - unzip dotnet-runtime-8.0.20-win-x64.zip -d content + wget https://builds.dotnet.microsoft.com/dotnet/Runtime/10.0.0/dotnet-runtime-10.0.0-win-x64.zip + unzip dotnet-runtime-10.0.0-win-x64.zip -d content cd .. - name: Create package @@ -262,8 +262,8 @@ jobs: cp -r linux-runtimes/content/ ${{ env.LINUX_FOLDER }}-with-runtimes/swiftlys2/bin/managed/dotnet cp -r windows-runtimes/content/ ${{ env.WINDOWS_FOLDER }}-with-runtimes/swiftlys2/bin/managed/dotnet - cp linux-runtimes/content/host/fxr/8.0.20/libhostfxr.so ${{ env.LINUX_FOLDER }}-with-runtimes/swiftlys2/bin/linuxsteamrt64/libhostfxr.so - cp windows-runtimes/content/host/fxr/8.0.20/hostfxr.dll ${{ env.WINDOWS_FOLDER }}-with-runtimes/swiftlys2/bin/win64/hostfxr.dll + cp linux-runtimes/content/host/fxr/10.0.0/libhostfxr.so ${{ env.LINUX_FOLDER }}-with-runtimes/swiftlys2/bin/linuxsteamrt64/libhostfxr.so + cp windows-runtimes/content/host/fxr/10.0.0/hostfxr.dll ${{ env.WINDOWS_FOLDER }}-with-runtimes/swiftlys2/bin/win64/hostfxr.dll mkdir -p ${{ env.LINUX_FOLDER }}/addons/ mkdir -p ${{ env.WINDOWS_FOLDER }}/addons/ @@ -334,6 +334,95 @@ jobs: tag_name: ${{ env.TAG_NAME }} name: Release v${{ needs.versioning.outputs.semVer }} body: ${{ needs.versioning.outputs.semVer }} + + - name: Get commit summary for beta + if: github.ref == 'refs/heads/beta' + id: beta_commits + run: | + # Get the previous tag + PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "") + + # Get commits since previous tag, or last 10 if no previous tag + if [ -n "$PREV_TAG" ]; then + COMMITS=$(git log ${PREV_TAG}..HEAD --pretty=format:"• %s (\`%h\`)" | head -c 900) + else + COMMITS=$(git log -10 --pretty=format:"• %s (\`%h\`)" | head -c 900) + fi + + # If commits are empty, set a default message + if [ -z "$COMMITS" ]; then + COMMITS="No commit information available" + fi + + echo "summary<> $GITHUB_OUTPUT + echo "$COMMITS" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + - name: Send Discord notification (Beta) + if: github.ref == 'refs/heads/beta' + uses: tsickert/discord-webhook@v6.0.0 + with: + webhook-url: ${{ secrets.DISCORD_WEBHOOK_BETA }} + embed-title: "🚀 New Beta Release" + embed-description: | + **SwiftlyS2** v${{ needs.versioning.outputs.semVer }} has been released! + + **📦 Version:** `${{ needs.versioning.outputs.semVer }}` + **🔖 Tag:** `${{ env.TAG_NAME }}` + + **📝 Recent Commits:** + ${{ steps.beta_commits.outputs.summary }} + + **📥 Download:** [View Release](https://github.com/${{ github.repository }}/releases/tag/${{ env.TAG_NAME }}) + embed-color: 65261 + embed-timestamp: ${{ github.event.head_commit.timestamp }} + embed-footer-text: "Beta Release • SwiftlyS2" + content: <@&1438068022706311279> + + - name: Get commit summary for master + if: github.ref == 'refs/heads/master' + id: master_commits + run: | + # Get the previous tag + PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "") + + # Get commits since previous tag, or last 15 if no previous tag + if [ -n "$PREV_TAG" ]; then + COMMITS=$(git log ${PREV_TAG}..HEAD --pretty=format:"• %s (\`%h\`)" | head -c 900) + else + COMMITS=$(git log -15 --pretty=format:"• %s (\`%h\`)" | head -c 900) + fi + + # If commits are empty, set a default message + if [ -z "$COMMITS" ]; then + COMMITS="No commit information available" + fi + + echo "summary<> $GITHUB_OUTPUT + echo "$COMMITS" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + - name: Send Discord notification (Master) + if: github.ref == 'refs/heads/master' + uses: tsickert/discord-webhook@v6.0.0 + with: + webhook-url: ${{ secrets.DISCORD_WEBHOOK_MASTER }} + embed-title: "✨ New Stable Release" + embed-description: | + **SwiftlyS2** v${{ needs.versioning.outputs.semVer }} is now available! + + **📦 Version:** `${{ needs.versioning.outputs.semVer }}` + **🔖 Tag:** `${{ env.TAG_NAME }}` + + **📝 Changelog Summary:** + ${{ steps.master_commits.outputs.summary }} + + **📥 Download:** [View Release](https://github.com/${{ github.repository }}/releases/tag/${{ env.TAG_NAME }}) + embed-color: 65261 + embed-timestamp: ${{ github.event.head_commit.timestamp }} + embed-footer-text: "Stable Release • SwiftlyS2" + content: <@&1438068068587933706> + nuget: if: ${{ github.event_name == 'push' && github.repository_owner == 'swiftly-solution' }} needs: [versioning, releasing] @@ -346,7 +435,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.0.x' + dotnet-version: '10.0.x' - name: Publish to nuget run: | cd managed diff --git a/README.md b/README.md index d2b67de4b..37b2cdd61 100644 --- a/README.md +++ b/README.md @@ -7,18 +7,29 @@ SwiftlyS2 is a powerful scripting framework for Source 2 games, built in C++ with C# plugin support. It provides developers with a comprehensive API to create plugins for Source 2-based games like Counter-Strike 2. -> [!warning] -> The framework is under a **BETA** release. - -## Features - -- **C# Plugin Development**: Write plugins in C# with full .NET support -- **Comprehensive API**: Access to game events, player management, and server control -- **High Performance**: Native C++ core with optimized plugin execution -- **Memory Safety**: Built-in memory management and thread-safe operations -- **Hot Reload**: Reload plugins without restarting the server -- **Cross-Platform**: Supports Windows and Linux -- **Source 2 Ready**: Designed specifically for Source 2 engine games +# Why should you choose SwifltyS2? + +SwifltyS2 is built with developers in mind, providing an extensive suite of scripting features that make plugin development faster and more efficient. + +We're preventing memory leaks when working with the game's SDK and functions, having active maintenance and faster execution speeds through natives which are calling directly Native (core) code. + +A list of features: +- **Commands**: Handles custom console commands or chat-based commands in the game. +- **Convars**: Manages console variables (cvars) to control game behavior and configuration. +- **Database**: Provides access to a centralized space to store your database credentials. +- **Entity System**: Handles creation, management, and interaction of game entities. +- **Events**: Manages event hooks, allowing scripts to react to in-game occurrences. +- **GameEvents**: Handles triggering and listening for in-game events. All fields are typed. +- **Memory**: Provides low-level memory manipulation tools for advanced scripting. +- **Menus**: Provides a easy Menu API with tons of customization, from colors to options and much more. +- **Hooks**: A hooking system to hook functions, net messages, entity outputs and more. +- **NetMessages**: Facilitates sending and receiving network messages via protobuf to clients. +- **Profiler**: Tools for performance analysis and debugging of scripts. +- **ProtobufDefinitions**: Types for NetMessages received or sent by the server. +- **Scheduler**: Provides timers and scheduling functionality for deferred or repeated tasks. +- **SchemaDefinitions**: Defines the SDK Schema classes and enums. +- **Schemas**: Schema class helpers for working with Game's SDK. +- **Sounds**: Provides tools for playing and managing audio within the game. ## Supported Games @@ -29,7 +40,7 @@ SwiftlyS2 is a powerful scripting framework for Source 2 games, built in C++ wit ### Prerequisites - **Windows**: Visual Studio 2022 with C++ and .NET workloads -- **Linux**: GCC 11+ and .NET 8.0 SDK +- **Linux**: GCC 11+ and .NET 10.0 SDK - **XMake** ### Building SwiftlyS2 diff --git a/devtools/cloc.exe b/devtools/cloc.exe new file mode 100644 index 000000000..385bbfd51 Binary files /dev/null and b/devtools/cloc.exe differ diff --git a/generator/native_generator/main.py b/generator/native_generator/main.py index ace46d3e9..a7bbf15c9 100644 --- a/generator/native_generator/main.py +++ b/generator/native_generator/main.py @@ -51,7 +51,7 @@ def __init__(self): def add_line(self, text: str = ""): if text.strip(): - self.lines.append(" " * self.indent_level + text) + self.lines.append(" " * self.indent_level + text) else: self.lines.append("") @@ -62,14 +62,15 @@ def dedent(self): self.indent_level = max(0, self.indent_level - 1) def add_block(self, header: str, content_func): - self.add_line(header + " {") + self.add_line(header) + self.add_line("{") self.indent() content_func() self.dedent() self.add_line("}") def get_code(self) -> str: - return "\n".join(self.lines) + return "\r\n".join(self.lines) def split_by_last_dot(value: str): @@ -94,7 +95,6 @@ def parse_native(lines: list[str]): writer.add_line("#pragma warning disable CS0649") writer.add_line("#pragma warning disable CS0169") writer.add_line() - writer.add_line("using System.Buffers;") writer.add_line("using System.Text;") writer.add_line("using System.Threading;") writer.add_line("using SwiftlyS2.Shared.Natives;") @@ -158,24 +158,68 @@ def write_method_content(): if is_marked_sync: writer.add_block("if (Thread.CurrentThread.ManagedThreadId != _MainThreadID)", lambda: writer.add_line('throw new InvalidOperationException("This method can only be called from the main thread.");')) - string_params = [] - bytes_params = [] - pool_declared = False - - for t, n in param_signatures: - if t == "string": - if not pool_declared: - writer.add_line("var pool = ArrayPool.Shared;") - pool_declared = True - writer.add_line(f"var {n}Length = Encoding.UTF8.GetByteCount({n});") - writer.add_line(f"var {n}Buffer = pool.Rent({n}Length + 1);") - writer.add_line(f"Encoding.UTF8.GetBytes({n}, {n}Buffer);") - writer.add_line(f"{n}Buffer[{n}Length] = 0;") - string_params.append(n) - elif t == "byte[]": - writer.add_line(f"var {n}Length = {n}.Length;") - bytes_params.append(n) + string_params = [n for t, n in param_signatures if t == "string"] + bytes_params = [n for t, n in param_signatures if t == "byte[]"] + + for param in bytes_params: + writer.add_line(f"var {param}Length = {param}.Length;") + + if not string_params: + fixed_blocks = [] + for param in bytes_params: + fixed_blocks.append(f"fixed (byte* {param}BufferPtr = {param})") + + def write_simple_call(): + call_args = [] + for t, n in param_signatures: + if t == "byte[]": + call_args.extend([f"{n}BufferPtr", f"{n}Length"]) + elif t == "bool": + call_args.append(f"{n} ? (byte)1 : (byte)0") + else: + call_args.append(n) + + if is_buffer_return(return_type): + first_call_args = ["null"] + call_args + writer.add_line(f"var ret = _{function_name}({', '.join(first_call_args)});") + if return_type == "string": + writer.add_line("var retBuffer = new byte[ret + 1];") + else: + writer.add_line("var retBuffer = new byte[ret];") + + def write_ret_fixed(): + second_call_args = ["retBufferPtr"] + call_args + writer.add_line(f"ret = _{function_name}({', '.join(second_call_args)});") + if return_type == "string": + writer.add_line("return Encoding.UTF8.GetString(retBufferPtr, ret);") + else: + writer.add_line("var retBytes = new byte[ret];") + writer.add_line("for (int i = 0; i < ret; i++) retBytes[i] = retBufferPtr[i];") + writer.add_line("return retBytes;") + + writer.add_block("fixed (byte* retBufferPtr = retBuffer)", write_ret_fixed) + else: + if return_type == "void": + writer.add_line(f"_{function_name}({', '.join(call_args)});") + else: + writer.add_line(f"var ret = _{function_name}({', '.join(call_args)});") + writer.add_line("return ret == 1;" if return_type == "bool" else "return ret;") + + def write_with_fixed_blocks(blocks, index=0): + if index < len(blocks): + writer.add_block(blocks[index], lambda: write_with_fixed_blocks(blocks, index + 1)) + else: + write_simple_call() + + if fixed_blocks: + write_with_fixed_blocks(fixed_blocks) + else: + write_simple_call() + return + for param in string_params: + writer.add_line(f"byte[] {param}Buffer = Encoding.UTF8.GetBytes({param} + \"\\0\");") + fixed_blocks = [] for param in string_params: fixed_blocks.append(f"fixed (byte* {param}BufferPtr = {param}Buffer)") @@ -184,77 +228,42 @@ def write_method_content(): def write_native_call(): call_args = [] + for t, n in param_signatures: + if t == "string": + call_args.append(f"{n}BufferPtr") + elif t == "byte[]": + call_args.extend([f"{n}BufferPtr", f"{n}Length"]) + elif t == "bool": + call_args.append(f"{n} ? (byte)1 : (byte)0") + else: + call_args.append(n) if is_buffer_return(return_type): - first_call_args = ["null"] - for t, n in param_signatures: - if t == "string": - first_call_args.append(f"{n}BufferPtr") - elif t == "byte[]": - first_call_args.extend([f"{n}BufferPtr", f"{n}Length"]) - elif t == "bool": - first_call_args.append(f"{n} ? (byte)1 : (byte)0") - else: - first_call_args.append(n) - + first_call_args = ["null"] + call_args writer.add_line(f"var ret = _{function_name}({', '.join(first_call_args)});") - - if not pool_declared: - writer.add_line("var pool = ArrayPool.Shared;") - writer.add_line("var retBuffer = pool.Rent(ret + 1);") + if return_type == "string": + writer.add_line("var retBuffer = new byte[ret + 1];") + else: + writer.add_line("var retBuffer = new byte[ret];") def write_ret_fixed(): - second_call_args = ["retBufferPtr"] - for t, n in param_signatures: - if t == "string": - second_call_args.append(f"{n}BufferPtr") - elif t == "byte[]": - second_call_args.extend([f"{n}BufferPtr", f"{n}Length"]) - elif t == "bool": - second_call_args.append(f"{n} ? (byte)1 : (byte)0") - else: - second_call_args.append(n) - + second_call_args = ["retBufferPtr"] + call_args writer.add_line(f"ret = _{function_name}({', '.join(second_call_args)});") - if return_type == "string": - writer.add_line("var retString = Encoding.UTF8.GetString(retBufferPtr, ret);") - writer.add_line("pool.Return(retBuffer);") - for param in string_params: - writer.add_line(f"pool.Return({param}Buffer);") - writer.add_line("return retString;") + writer.add_line("return Encoding.UTF8.GetString(retBufferPtr, ret);") else: writer.add_line("var retBytes = new byte[ret];") writer.add_line("for (int i = 0; i < ret; i++) retBytes[i] = retBufferPtr[i];") - writer.add_line("pool.Return(retBuffer);") - for param in string_params: - writer.add_line(f"pool.Return({param}Buffer);") writer.add_line("return retBytes;") writer.add_block("fixed (byte* retBufferPtr = retBuffer)", write_ret_fixed) - else: - for t, n in param_signatures: - if t == "string": - call_args.append(f"{n}BufferPtr") - elif t == "byte[]": - call_args.extend([f"{n}BufferPtr", f"{n}Length"]) - elif t == "bool": - call_args.append(f"{n} ? (byte)1 : (byte)0") - else: - call_args.append(n) - if return_type == "void": writer.add_line(f"_{function_name}({', '.join(call_args)});") else: writer.add_line(f"var ret = _{function_name}({', '.join(call_args)});") - - for param in string_params: - writer.add_line(f"pool.Return({param}Buffer);") - - if return_type != "void": - writer.add_line("return ret == 1;" if return_type == "bool" else f"return ret;") - + writer.add_line("return ret == 1;" if return_type == "bool" else "return ret;") + def write_with_fixed_blocks(blocks, index=0): if index < len(blocks): writer.add_block(blocks[index], lambda: write_with_fixed_blocks(blocks, index + 1)) @@ -267,7 +276,10 @@ def write_with_fixed_blocks(blocks, index=0): write_native_call() writer.add_block(f"public unsafe static {RETURN_TYPE_MAP[return_type]} {function_name}({method_signature})", write_method_content) - writer.add_block(f"internal static class Native{class_name}", write_class_content) + + # Benchmark class should be public for external access + access_modifier = "public" if class_name == "Benchmark" else "internal" + writer.add_block(f"{access_modifier} static class Native{class_name}", write_class_content) with open(out_path, "w", encoding="utf-8", newline="") as f: f.write(writer.get_code()) diff --git a/generator/schema_generator/sdk.json b/generator/schema_generator/sdk.json index ca1b69def..9b43a4ba6 100644 --- a/generator/schema_generator/sdk.json +++ b/generator/schema_generator/sdk.json @@ -53590,13 +53590,27 @@ "templated": "CAnimGraph2ParamOptionalRef< bool >", "type": "CAnimGraph2ParamOptionalRef" }, + { + "alignment": 8, + "kind": "atomic", + "name": "m_flWeaponActionSpeedScale", + "name_hash": 9607079049698995282, + "networked": false, + "offset": 184, + "size": 24, + "template": [ + "float32" + ], + "templated": "CAnimGraph2ParamOptionalRef< float32 >", + "type": "CAnimGraph2ParamOptionalRef" + }, { "alignment": 8, "kind": "atomic", "name": "m_weaponCategory", "name_hash": 9607079050173983069, "networked": false, - "offset": 184, + "offset": 208, "size": 32, "template": [ "CGlobalSymbol" @@ -53610,7 +53624,7 @@ "name": "m_weaponType", "name_hash": 9607079046572552969, "networked": false, - "offset": 216, + "offset": 240, "size": 32, "template": [ "CGlobalSymbol" @@ -53624,7 +53638,7 @@ "name": "m_weaponExtraInfo", "name_hash": 9607079050463956285, "networked": false, - "offset": 248, + "offset": 272, "size": 32, "template": [ "CGlobalSymbol" @@ -53638,7 +53652,7 @@ "name": "m_flWeaponAmmo", "name_hash": 9607079049887247477, "networked": false, - "offset": 280, + "offset": 304, "size": 24, "template": [ "float32" @@ -53652,7 +53666,7 @@ "name": "m_flWeaponAmmoMax", "name_hash": 9607079050368260457, "networked": false, - "offset": 304, + "offset": 328, "size": 24, "template": [ "float32" @@ -53666,7 +53680,7 @@ "name": "m_flWeaponAmmoReserve", "name_hash": 9607079046371002299, "networked": false, - "offset": 328, + "offset": 352, "size": 24, "template": [ "float32" @@ -53680,7 +53694,7 @@ "name": "m_bWeaponIsSilenced", "name_hash": 9607079049579865500, "networked": false, - "offset": 352, + "offset": 376, "size": 24, "template": [ "bool" @@ -53694,7 +53708,7 @@ "name": "m_flWeaponIronsightAmount", "name_hash": 9607079047481390838, "networked": false, - "offset": 376, + "offset": 400, "size": 24, "template": [ "float32" @@ -53708,7 +53722,7 @@ "name": "m_bIsUsingLegacyModel", "name_hash": 9607079049496514141, "networked": false, - "offset": 400, + "offset": 424, "size": 24, "template": [ "bool" @@ -53722,7 +53736,7 @@ "name": "m_idleVariation", "name_hash": 9607079049844158744, "networked": false, - "offset": 424, + "offset": 448, "size": 24, "template": [ "float32" @@ -53736,7 +53750,7 @@ "name": "m_deployVariation", "name_hash": 9607079048882514135, "networked": false, - "offset": 448, + "offset": 472, "size": 24, "template": [ "float32" @@ -53750,7 +53764,7 @@ "name": "m_attackType", "name_hash": 9607079046585232405, "networked": false, - "offset": 472, + "offset": 496, "size": 32, "template": [ "CGlobalSymbol" @@ -53764,7 +53778,7 @@ "name": "m_attackThrowStrength", "name_hash": 9607079049393893922, "networked": false, - "offset": 504, + "offset": 528, "size": 24, "template": [ "float32" @@ -53778,7 +53792,7 @@ "name": "m_flAttackVariation", "name_hash": 9607079048260235284, "networked": false, - "offset": 528, + "offset": 552, "size": 24, "template": [ "float32" @@ -53792,7 +53806,7 @@ "name": "m_inspectVariation", "name_hash": 9607079049557765284, "networked": false, - "offset": 552, + "offset": 576, "size": 24, "template": [ "float32" @@ -53806,7 +53820,7 @@ "name": "m_inspectExtraInfo", "name_hash": 9607079050481575999, "networked": false, - "offset": 576, + "offset": 600, "size": 32, "template": [ "CGlobalSymbol" @@ -53820,7 +53834,7 @@ "name": "m_reloadStage", "name_hash": 9607079048510310186, "networked": false, - "offset": 608, + "offset": 632, "size": 32, "template": [ "CGlobalSymbol" @@ -53829,13 +53843,13 @@ "type": "CAnimGraph2ParamOptionalRef" } ], - "fields_count": 19, + "fields_count": 20, "has_chainer": false, "is_struct": false, "name": "CCS2WeaponGraphController", "name_hash": 2236822398, "project": "server", - "size": 1512 + "size": 1536 }, { "alignment": 8, @@ -74609,13 +74623,23 @@ "size": 4, "type": "float32" }, + { + "alignment": 4, + "kind": "ref", + "name": "m_flAnimationStartTime", + "name_hash": 9856766037517183116, + "networked": false, + "offset": 92, + "size": 4, + "type": "float32" + }, { "alignment": 255, "kind": "ref", "name": "m_flPlaceTime", "name_hash": 9856766034105839223, "networked": false, - "offset": 92, + "offset": 96, "size": 4, "type": "GameTime_t" }, @@ -74625,7 +74649,7 @@ "name": "m_flFadeStartTime", "name_hash": 9856766036080233466, "networked": false, - "offset": 96, + "offset": 100, "size": 4, "type": "float32" }, @@ -74635,7 +74659,7 @@ "name": "m_flFadeDuration", "name_hash": 9856766037123849953, "networked": false, - "offset": 100, + "offset": 104, "size": 4, "type": "float32" }, @@ -74645,7 +74669,7 @@ "name": "m_flLightingOriginOffset", "name_hash": 9856766036966682422, "networked": false, - "offset": 104, + "offset": 108, "size": 4, "type": "float32" }, @@ -74700,7 +74724,7 @@ "type": "DecalMode_t" } ], - "fields_count": 24, + "fields_count": 25, "has_chainer": false, "is_struct": true, "name": "CDecalInstance", @@ -103347,7 +103371,7 @@ ], "base_classes_count": 1, "fields_count": 0, - "has_chainer": false, + "has_chainer": true, "is_struct": false, "name": "CCSPlayer_CameraServices", "name_hash": 508355005, @@ -106742,7 +106766,7 @@ } ], "fields_count": 189, - "has_chainer": false, + "has_chainer": true, "is_struct": false, "name": "CCSGameRules", "name_hash": 1653985125, @@ -107093,7 +107117,7 @@ ], "base_classes_count": 1, "fields_count": 0, - "has_chainer": false, + "has_chainer": true, "is_struct": false, "name": "CTeamplayRules", "name_hash": 4066609956, @@ -111058,7 +111082,7 @@ "name": "m_networkAnimTiming", "name_hash": 1370920241930942970, "networked": true, - "offset": 6336, + "offset": 6360, "size": 24, "template": [ "uint8" @@ -111072,18 +111096,18 @@ "name": "m_bBlockInspectUntilNextGraphUpdate", "name_hash": 1370920240570612520, "networked": true, - "offset": 6360, + "offset": 6384, "size": 1, "type": "bool" } ], "fields_count": 15, - "has_chainer": false, + "has_chainer": true, "is_struct": false, "name": "CCSPlayer_WeaponServices", "name_hash": 319192242, "project": "server", - "size": 6368 + "size": 6392 }, { "alignment": 8, @@ -114749,7 +114773,7 @@ ], "base_classes_count": 1, "fields_count": 0, - "has_chainer": false, + "has_chainer": true, "is_struct": false, "name": "CCSObserver_ObserverServices", "name_hash": 1607918969, @@ -120023,7 +120047,7 @@ } ], "fields_count": 7, - "has_chainer": false, + "has_chainer": true, "is_struct": false, "name": "CCSPlayerBase_CameraServices", "name_hash": 1529207042, @@ -123835,7 +123859,7 @@ } ], "fields_count": 13, - "has_chainer": false, + "has_chainer": true, "is_struct": false, "name": "CPlayer_MovementServices_Humanoid", "name_hash": 3059739257, @@ -127368,7 +127392,7 @@ } ], "fields_count": 6, - "has_chainer": false, + "has_chainer": true, "is_struct": false, "name": "CCSPlayer_WaterServices", "name_hash": 2179871265, @@ -133235,7 +133259,7 @@ } ], "fields_count": 42, - "has_chainer": false, + "has_chainer": true, "is_struct": false, "name": "CCSPlayer_MovementServices", "name_hash": 3524106755, @@ -134677,7 +134701,7 @@ ], "base_classes_count": 1, "fields_count": 0, - "has_chainer": false, + "has_chainer": true, "is_struct": false, "name": "CBodyComponentBaseModelEntity", "name_hash": 3763959386, @@ -134848,7 +134872,7 @@ ], "base_classes_count": 1, "fields_count": 0, - "has_chainer": false, + "has_chainer": true, "is_struct": false, "name": "CCSObserver_UseServices", "name_hash": 1078874378, @@ -142175,7 +142199,7 @@ } ], "fields_count": 3, - "has_chainer": false, + "has_chainer": true, "is_struct": false, "name": "CCSPlayer_UseServices", "name_hash": 3858176145, @@ -144535,7 +144559,7 @@ } ], "fields_count": 1, - "has_chainer": false, + "has_chainer": true, "is_struct": false, "name": "CBodyComponentBaseAnimGraph", "name_hash": 3489964879, @@ -150326,7 +150350,7 @@ } ], "fields_count": 2, - "has_chainer": false, + "has_chainer": true, "is_struct": false, "name": "CCSPlayer_ItemServices", "name_hash": 1807244973, @@ -158027,7 +158051,7 @@ ], "base_classes_count": 1, "fields_count": 0, - "has_chainer": false, + "has_chainer": true, "is_struct": false, "name": "CCSObserver_CameraServices", "name_hash": 3744546080, @@ -161991,7 +162015,7 @@ ], "base_classes_count": 1, "fields_count": 0, - "has_chainer": false, + "has_chainer": true, "is_struct": false, "name": "CCSObserver_MovementServices", "name_hash": 3766035082, @@ -167905,16 +167929,24 @@ "name": "WPN_ANIMSTATE_INSPECT_OUTRO", "value": 1001 }, + { + "name": "WPN_ANIMSTATE_INVENTORY_UI_TUMBLE", + "value": 1500 + }, + { + "name": "WPN_ANIMSTATE_INVENTORY_UI_KEYCHAIN_APPLY", + "value": 1501 + }, { "name": "WPN_ANIMSTATE_END_VALID", - "value": 1100 + "value": 2000 }, { "name": "WEAPON_LEGACY_STATE_CLEAR_FIRING", - "value": 1101 + "value": 2001 } ], - "fields_count": 28, + "fields_count": 30, "name": "WeaponGameplayAnimState", "project": "server", "size": 2 diff --git a/generator/schema_generator/templates/class_fixed_string_field_template.cs b/generator/schema_generator/templates/class_fixed_string_field_template.cs index 4c33ab2b4..b423197c3 100644 --- a/generator/schema_generator/templates/class_fixed_string_field_template.cs +++ b/generator/schema_generator/templates/class_fixed_string_field_template.cs @@ -1,7 +1,9 @@ + private static readonly Lazy _$NAME$Offset = new(() => Schema.GetOffset($HASH$), LazyThreadSafetyMode.None); + public string $NAME$ { get { - var ptr = _Handle + Schema.GetOffset($HASH$); + var ptr = _Handle + _$NAME$Offset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, $HASH$, value, $ELEMENT_COUNT$); + set => Schema.SetFixedString(_Handle, _$NAME$Offset.Value, value, $ELEMENT_COUNT$); } \ No newline at end of file diff --git a/generator/schema_generator/templates/class_ptr_field_template.cs b/generator/schema_generator/templates/class_ptr_field_template.cs index 1bd66d03f..4518de2ac 100644 --- a/generator/schema_generator/templates/class_ptr_field_template.cs +++ b/generator/schema_generator/templates/class_ptr_field_template.cs @@ -1,6 +1,8 @@ + private static readonly Lazy _$NAME$Offset = new(() => Schema.GetOffset($HASH$), LazyThreadSafetyMode.None); + public $INTERFACE_TYPE$? $NAME$ { get { - var ptr = _Handle.Read(Schema.GetOffset($HASH$)); + var ptr = _Handle.Read(_$NAME$Offset.Value); return ptr.IsValidPtr() ? new $IMPL_TYPE$(ptr) : null; } } \ No newline at end of file diff --git a/generator/schema_generator/templates/class_ref_field_template.cs b/generator/schema_generator/templates/class_ref_field_template.cs index 7dc0f9d7d..ca9d95d34 100644 --- a/generator/schema_generator/templates/class_ref_field_template.cs +++ b/generator/schema_generator/templates/class_ref_field_template.cs @@ -1,3 +1,5 @@ + private static readonly Lazy _$NAME$Offset = new(() => Schema.GetOffset($HASH$), LazyThreadSafetyMode.None); + public $INTERFACE_TYPE$ $NAME$ { - get => new $IMPL_TYPE$(_Handle + Schema.GetOffset($HASH$)); + get => new $IMPL_TYPE$(_Handle + _$NAME$Offset.Value); } \ No newline at end of file diff --git a/generator/schema_generator/templates/class_string_field_template.cs b/generator/schema_generator/templates/class_string_field_template.cs index ec53edd9a..9f1f11316 100644 --- a/generator/schema_generator/templates/class_string_field_template.cs +++ b/generator/schema_generator/templates/class_string_field_template.cs @@ -1,7 +1,9 @@ + private static readonly Lazy _$NAME$Offset = new(() => Schema.GetOffset($HASH$), LazyThreadSafetyMode.None); + public string $NAME$ { get { - var ptr = _Handle.Read(Schema.GetOffset($HASH$)); + var ptr = _Handle.Read(_$NAME$Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, $HASH$, value); + set => Schema.SetString(_Handle, _$NAME$Offset.Value, value); } \ No newline at end of file diff --git a/generator/schema_generator/templates/class_template.cs b/generator/schema_generator/templates/class_template.cs index 35c900a9f..86c8ee0af 100644 --- a/generator/schema_generator/templates/class_template.cs +++ b/generator/schema_generator/templates/class_template.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/generator/schema_generator/templates/class_value_field_template.cs b/generator/schema_generator/templates/class_value_field_template.cs index 9d33e61f8..911094819 100644 --- a/generator/schema_generator/templates/class_value_field_template.cs +++ b/generator/schema_generator/templates/class_value_field_template.cs @@ -1,3 +1,5 @@ + private static readonly Lazy _$NAME$Offset = new(() => Schema.GetOffset($HASH$), LazyThreadSafetyMode.None); + public ref $IMPL_TYPE$ $NAME$ { - get => ref _Handle.$REF_METHOD$<$IMPL_TYPE$>(Schema.GetOffset($HASH$)); + get => ref _Handle.$REF_METHOD$<$IMPL_TYPE$>(_$NAME$Offset.Value); } \ No newline at end of file diff --git a/managed/SwiftlyS2.Benchmarks/PerformanceBenchmarkPlugin.cs b/managed/SwiftlyS2.Benchmarks/PerformanceBenchmarkPlugin.cs new file mode 100644 index 000000000..86ee0f316 --- /dev/null +++ b/managed/SwiftlyS2.Benchmarks/PerformanceBenchmarkPlugin.cs @@ -0,0 +1,263 @@ +using System.Runtime.InteropServices; +using BenchmarkDotNet.Jobs; +using BenchmarkDotNet.Columns; +using BenchmarkDotNet.Running; +using BenchmarkDotNet.Configs; +using BenchmarkDotNet.Exporters; +using BenchmarkDotNet.Attributes; +using BenchmarkDotNet.Exporters.Xml; +using BenchmarkDotNet.Exporters.Csv; +using BenchmarkDotNet.Exporters.Json; +using BenchmarkDotNet.Toolchains.InProcess.Emit; +using SwiftlyS2.Shared; +using SwiftlyS2.Shared.Commands; +using SwiftlyS2.Shared.Plugins; +using SwiftlyS2.Shared.Natives; +using SwiftlyS2.Core.Natives; + +namespace SwiftlyS2.Benchmarks; + +[PluginMetadata(Id = "benchmark", Version = "1.0.0")] +public class PerformanceBenchmarkPlugin : BasePlugin +{ + public PerformanceBenchmarkPlugin( ISwiftlyCore core ) : base(core) + { + } + + public override void Load( bool hotReload ) + { + NativeInteropBenchmark.SetCore(Core); + Core.Registrator.Register(this); + } + + [Command("benchmark", true)] + public void RunBenchmark( ICommandContext context ) + { + Console.WriteLine("\n"); + Console.WriteLine("\n"); + + var job = Job.Default + .WithToolchain(InProcessEmitToolchain.Instance) + .WithWarmupCount(5) + .WithIterationCount(20) + .WithMinIterationCount(15) + .WithMaxIterationCount(30) + .WithGcServer(true) + .WithGcForce(false); + + var config = ManualConfig + .Create(DefaultConfig.Instance) + .AddJob(job) + .WithOptions(ConfigOptions.DisableOptimizationsValidator) + .AddColumn(StatisticColumn.P95) + .AddColumn(StatisticColumn.StdDev) + .AddColumn(StatisticColumn.Median) + .AddExporter(HtmlExporter.Default) + .AddExporter(MarkdownExporter.GitHub) + .AddExporter(CsvExporter.Default) + .AddExporter(JsonExporter.Full) + .KeepBenchmarkFiles(true); + + BenchmarkRunner.Run(config); + + Console.WriteLine("\n"); + Console.WriteLine("\n"); + } + + public override void Unload() + { + } +} + +/// +/// BenchmarkDotNet tests for measuring C# to C++ interop overhead by pattern +/// Tests different interop scenarios using safe benchmark-specific native functions +/// +[MemoryDiagnoser] +public class NativeInteropBenchmark +{ + [DllImport("swiftlys2", EntryPoint = "SwiftlyS2_Benchmark_PInvoke", CallingConvention = CallingConvention.Cdecl)] + private static extern int SwiftlyS2BenchmarkPInvoke(); + + [DllImport("kernel32.dll")] + private static extern int GetCurrentProcessId(); + + public static void SetCore( ISwiftlyCore sw2Core ) { } + + // [Benchmark(Baseline = true, Description = "Baseline: Pure C# method")] + // public int Baseline_ManagedCall() + // { + // return 1337; + // } + + // [Benchmark(Description = "Baseline: P/Invoke (usermode)")] + // public int Baseline_PInvoke_Usermode() + // { + // return SwiftlyS2BenchmarkPInvoke(); + // } + + // [Benchmark(Description = "Baseline: P/Invoke (kernel32)")] + // public int Baseline_PInvoke_Kernel() + // { + // return GetCurrentProcessId(); + // } + + // [Benchmark(Description = "Pattern 1: void -> void")] + // public void Pattern1_VoidToVoid() + // { + // NativeBenchmark.VoidToVoid(); + // } + + // [Benchmark(Description = "Pattern 2: void -> int32")] + // public int Pattern2_VoidToInt32() + // { + // return NativeBenchmark.GetInt32(); + // } + + // [Benchmark(Description = "Pattern 3: void -> ptr")] + // public IntPtr Pattern3_VoidToPtr() + // { + // return NativeBenchmark.GetPtr(); + // } + + // [Benchmark(Description = "Pattern 4: int32 -> int32")] + // public int Pattern4_Int32ToInt32() + // { + // return NativeBenchmark.Int32ToInt32(42); + // } + + // [Benchmark(Description = "Pattern 5: float -> float")] + // public float Pattern5_FloatToFloat() + // { + // return NativeBenchmark.FloatToFloat(3.14f); + // } + + // [Benchmark(Description = "Pattern 6: string -> string")] + // public string Pattern6_StringToString() + // { + // return NativeBenchmark.StringToString("test"); + // } + + [Benchmark(Description = "Pattern 7: string -> ptr")] + public IntPtr Pattern7_StringToPtr() + { + return NativeBenchmark.StringToPtr("test"); + } + + // [Benchmark(Description = "Pattern 8: 5 params")] + // public int Pattern8_MultiPrimitives() + // { + // return NativeBenchmark.MultiPrimitives(IntPtr.Zero, 100, 3.14f, true, 999UL); + // } + + [Benchmark(Description = "Pattern 9: 5 params + 1 string")] + public int Pattern9_MultiWithOneString() + { + return NativeBenchmark.MultiWithOneString(IntPtr.Zero, "test", IntPtr.Zero, 42, 1.5f); + } + + [Benchmark(Description = "Pattern 10: 5 params + 2 strings")] + public void Pattern10_MultiWithTwoStrings() + { + NativeBenchmark.MultiWithTwoStrings(IntPtr.Zero, "test1", IntPtr.Zero, "test2", 100); + } + + // [Benchmark(Description = "Pattern 11: void -> bool")] + // public bool Pattern11_VoidToBool() + // { + // return NativeBenchmark.GetBool(); + // } + + // [Benchmark(Description = "Pattern 12: void -> uint32")] + // public uint Pattern12_VoidToUInt32() + // { + // return NativeBenchmark.GetUInt32(); + // } + + // [Benchmark(Description = "Pattern 13: void -> int64")] + // public long Pattern13_VoidToInt64() + // { + // return NativeBenchmark.GetInt64(); + // } + + // [Benchmark(Description = "Pattern 14: void -> uint64")] + // public ulong Pattern14_VoidToUInt64() + // { + // return NativeBenchmark.GetUInt64(); + // } + + // [Benchmark(Description = "Pattern 15: void -> float")] + // public float Pattern15_VoidToFloat() + // { + // return NativeBenchmark.GetFloat(); + // } + + // [Benchmark(Description = "Pattern 16: void -> double")] + // public double Pattern16_VoidToDouble() + // { + // return NativeBenchmark.GetDouble(); + // } + + // [Benchmark(Description = "Pattern 17: bool -> bool")] + // public bool Pattern17_BoolToBool() + // { + // return NativeBenchmark.BoolToBool(true); + // } + + // [Benchmark(Description = "Pattern 18: uint32 -> uint32")] + // public uint Pattern18_UInt32ToUInt32() + // { + // return NativeBenchmark.UInt32ToUInt32(1337u); + // } + + // [Benchmark(Description = "Pattern 19: int64 -> int64")] + // public long Pattern19_Int64ToInt64() + // { + // return NativeBenchmark.Int64ToInt64(9999999L); + // } + + // [Benchmark(Description = "Pattern 20: uint64 -> uint64")] + // public ulong Pattern20_UInt64ToUInt64() + // { + // return NativeBenchmark.UInt64ToUInt64(9999999UL); + // } + + // [Benchmark(Description = "Pattern 21: double -> double")] + // public double Pattern21_DoubleToDouble() + // { + // return NativeBenchmark.DoubleToDouble(3.14159); + // } + + // [Benchmark(Description = "Pattern 22: ptr -> ptr")] + // public IntPtr Pattern22_PtrToPtr() + // { + // return NativeBenchmark.PtrToPtr(new IntPtr(0x1234)); + // } + + // [Benchmark(Description = "Pattern 23: Vector -> Vector")] + // public unsafe Vector Pattern23_VectorToVector() + // { + // Vector result; + // NativeBenchmark.VectorToVector((nint)(&result), new Vector(1.0f, 2.0f, 3.0f)); + // return result; + // } + + // [Benchmark(Description = "Pattern 24: QAngle -> QAngle")] + // public unsafe QAngle Pattern24_QAngleToQAngle() + // { + // QAngle result; + // NativeBenchmark.QAngleToQAngle((nint)(&result), new QAngle(45.0f, 90.0f, 0.0f)); + // return result; + // } + + [Benchmark(Description = "Pattern 25: Vector + QAngle + String)")] + public void Pattern26_ComplexWithString() + { + NativeBenchmark.ComplexWithString( + IntPtr.Zero, + new Vector(100.0f, 200.0f, 300.0f), + "test_entity", + new QAngle(0.0f, 180.0f, 0.0f) + ); + } +} \ No newline at end of file diff --git a/managed/SwiftlyS2.Benchmarks/SwiftlyS2.Benchmarks.csproj b/managed/SwiftlyS2.Benchmarks/SwiftlyS2.Benchmarks.csproj new file mode 100644 index 000000000..d47a9b802 --- /dev/null +++ b/managed/SwiftlyS2.Benchmarks/SwiftlyS2.Benchmarks.csproj @@ -0,0 +1,21 @@ + + + + Library + net10.0 + enable + enable + true + true + false + + + + + + + + + + + diff --git a/managed/SwiftlyS2.PluginTemplate/SwiftlyS2.CS2.PluginTemplate.csproj b/managed/SwiftlyS2.PluginTemplate/SwiftlyS2.CS2.PluginTemplate.csproj index 5824f11d7..231b23932 100644 --- a/managed/SwiftlyS2.PluginTemplate/SwiftlyS2.CS2.PluginTemplate.csproj +++ b/managed/SwiftlyS2.PluginTemplate/SwiftlyS2.CS2.PluginTemplate.csproj @@ -1,11 +1,11 @@ - net8.0 + net10.0 enable SwiftlyS2.CS2.PluginTemplate SwiftlyS2 Team - 0.0.14 + 1.0.0 This is a template for creating a SwiftlyS2 plugin. Template icon.png diff --git a/managed/SwiftlyS2.PluginTemplate/nupkgs/SwiftlyS2.CS2.PluginTemplate.0.0.15.nupkg b/managed/SwiftlyS2.PluginTemplate/nupkgs/SwiftlyS2.CS2.PluginTemplate.0.0.15.nupkg new file mode 100644 index 000000000..493e3fccd Binary files /dev/null and b/managed/SwiftlyS2.PluginTemplate/nupkgs/SwiftlyS2.CS2.PluginTemplate.0.0.15.nupkg differ diff --git a/managed/SwiftlyS2.PluginTemplate/nupkgs/SwiftlyS2.CS2.PluginTemplate.1.0.0.nupkg b/managed/SwiftlyS2.PluginTemplate/nupkgs/SwiftlyS2.CS2.PluginTemplate.1.0.0.nupkg new file mode 100644 index 000000000..7fef90340 Binary files /dev/null and b/managed/SwiftlyS2.PluginTemplate/nupkgs/SwiftlyS2.CS2.PluginTemplate.1.0.0.nupkg differ diff --git a/managed/SwiftlyS2.PluginTemplate/templates/PluginId.csproj b/managed/SwiftlyS2.PluginTemplate/templates/PluginId.csproj index 719fb94ad..7b5f9e899 100644 --- a/managed/SwiftlyS2.PluginTemplate/templates/PluginId.csproj +++ b/managed/SwiftlyS2.PluginTemplate/templates/PluginId.csproj @@ -13,12 +13,12 @@ - - - - - - + + + + + + diff --git a/managed/managed.csproj b/managed/managed.csproj index 0c3f76438..7b0728874 100644 --- a/managed/managed.csproj +++ b/managed/managed.csproj @@ -1,4 +1,4 @@ - + @@ -10,7 +10,7 @@ Library - net8.0 + net10.0 enable enable true @@ -41,14 +41,14 @@ - - - - - - - - + + + + + + + + @@ -61,6 +61,7 @@ + diff --git a/managed/managed.sln b/managed/managed.sln index 308e72222..82f5b8249 100644 --- a/managed/managed.sln +++ b/managed/managed.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.5.2.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "managed", "managed.csproj", "{65843BEF-2184-D355-9503-453D89B801AC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "managed", "managed.csproj", "{65843BEF-2184-D355-9503-453D89B801AC}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}" EndProject diff --git a/managed/src/Entrypoint.cs b/managed/src/Entrypoint.cs index 1ca9b8bd8..2ca75d6f4 100644 --- a/managed/src/Entrypoint.cs +++ b/managed/src/Entrypoint.cs @@ -17,6 +17,7 @@ public unsafe static void Start( IntPtr nativeTable, int nativeTableSize, IntPtr } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } diff --git a/managed/src/SwiftlyS2.Core/Extensions/PtrExtensions.cs b/managed/src/SwiftlyS2.Core/Extensions/PtrExtensions.cs index 4b049d275..56950223c 100644 --- a/managed/src/SwiftlyS2.Core/Extensions/PtrExtensions.cs +++ b/managed/src/SwiftlyS2.Core/Extensions/PtrExtensions.cs @@ -5,77 +5,115 @@ namespace SwiftlyS2.Core.Extensions; -internal static class PtrExtensions { +internal static class PtrExtensions +{ [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static T Read(this nint ptr) where T : unmanaged { + public static T Read( this nint ptr ) where T : unmanaged + { unsafe { return Unsafe.Read((void*)ptr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static T Read(this nint ptr, int offset) where T : unmanaged + public static T Read( this nint ptr, int offset ) where T : unmanaged + { + unsafe { return Unsafe.Read((void*)(ptr + offset)); } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T Read( this nint ptr, nint offset ) where T : unmanaged { unsafe { return Unsafe.Read((void*)(ptr + offset)); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ref T AsRef(this nint ptr) where T : unmanaged { + public static ref T AsRef( this nint ptr ) where T : unmanaged + { unsafe { return ref Unsafe.AsRef((void*)ptr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ref T AsRef(this nint ptr, int offset) where T : unmanaged { + public static ref T AsRef( this nint ptr, int offset ) where T : unmanaged + { unsafe { return ref Unsafe.AsRef((void*)(ptr + offset)); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ref T Deref(this nint ptr) where T : unmanaged { + public static ref T AsRef( this nint ptr, nint offset ) where T : unmanaged + { + unsafe { return ref Unsafe.AsRef((void*)(ptr + offset)); } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ref T Deref( this nint ptr ) where T : unmanaged + { return ref ptr.Read().AsRef(); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ref T Deref(this nint ptr, int offset) where T : unmanaged { + public static ref T Deref( this nint ptr, int offset ) where T : unmanaged + { + return ref ptr.Read(offset).AsRef(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ref T Deref( this nint ptr, nint offset ) where T : unmanaged + { return ref ptr.Read(offset).AsRef(); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void Write(this nint ptr, T value) where T : unmanaged { + public static void Write( this nint ptr, T value ) where T : unmanaged + { unsafe { Unsafe.Write((void*)ptr, value); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void Write(this nint ptr, int offset, T value) where T : unmanaged + public static void Write( this nint ptr, int offset, T value ) where T : unmanaged { unsafe { Unsafe.Write((void*)(ptr + offset), value); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void CopyFrom(this nint ptr, byte[] source) + public static void Write( this nint ptr, nint offset, T value ) where T : unmanaged { - unsafe { - fixed (byte* sourcePtr = source) { - Unsafe.CopyBlockUnaligned((void*)ptr, sourcePtr, (uint)source.Length); } + unsafe { Unsafe.Write((void*)(ptr + offset), value); } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void CopyFrom( this nint ptr, byte[] source ) + { + unsafe + { + fixed (byte* sourcePtr = source) + { + Unsafe.CopyBlockUnaligned((void*)ptr, sourcePtr, (uint)source.Length); + } } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void CopyFrom(this nint ptr, nint source, int size) { + public static void CopyFrom( this nint ptr, nint source, int size ) + { unsafe { Unsafe.CopyBlockUnaligned((void*)ptr, (void*)source, (uint)size); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void CopyFrom(this nint ptr, int offset, nint source, int size) { + public static void CopyFrom( this nint ptr, int offset, nint source, int size ) + { unsafe { Unsafe.CopyBlockUnaligned((void*)(ptr + offset), (void*)source, (uint)size); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool IsValidPtr(this nint ptr) { + public static bool IsValidPtr( this nint ptr ) + { return ptr != 0 && ptr != IntPtr.MaxValue; } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static T AsHandle(this nint ptr) where T : INativeHandle, ISchemaClass { + public static T AsHandle( this nint ptr ) where T : INativeHandle, ISchemaClass + { return T.From(ptr); } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Misc/FileLogger.cs b/managed/src/SwiftlyS2.Core/Misc/FileLogger.cs index 156d4dd2b..588299742 100644 --- a/managed/src/SwiftlyS2.Core/Misc/FileLogger.cs +++ b/managed/src/SwiftlyS2.Core/Misc/FileLogger.cs @@ -3,15 +3,18 @@ namespace SwiftlyS2.Core.Misc; -internal static class FileLogger { +internal static class FileLogger +{ private static StreamWriter? _fileStream; - private static object _lock = new(); + private static Lock _lock = new(); - public static void Initialize(string basePath) { + public static void Initialize( string basePath ) + { var directory = Path.Combine(basePath, "logs"); - if (!Directory.Exists(directory)) { + if (!Directory.Exists(directory)) + { Directory.CreateDirectory(directory); } @@ -19,16 +22,20 @@ public static void Initialize(string basePath) { var filePath = Path.Combine(directory, $"swiftlys2_managed_{time}.log"); - if (File.Exists(filePath)) { + if (File.Exists(filePath)) + { File.Delete(filePath); } _fileStream = new StreamWriter(filePath, true); } - public static void Log(string message) { - lock (_lock) { - if (_fileStream == null) { + public static void Log( string message ) + { + lock (_lock) + { + if (_fileStream == null) + { return; } @@ -37,9 +44,12 @@ public static void Log(string message) { } } - public static void LogException(Exception exception, string message) { - lock (_lock) { - if (_fileStream == null) { + public static void LogException( Exception exception, string message ) + { + lock (_lock) + { + if (_fileStream == null) + { return; } _fileStream.WriteLine(message); @@ -48,7 +58,8 @@ public static void LogException(Exception exception, string message) { _fileStream.Flush(); } } - public static void Dispose() { + public static void Dispose() + { _fileStream?.Dispose(); _fileStream = null; } diff --git a/managed/src/SwiftlyS2.Core/Misc/GlobalExceptionHandler.cs b/managed/src/SwiftlyS2.Core/Misc/GlobalExceptionHandler.cs new file mode 100644 index 000000000..96d0ba815 --- /dev/null +++ b/managed/src/SwiftlyS2.Core/Misc/GlobalExceptionHandler.cs @@ -0,0 +1,7 @@ +internal static class GlobalExceptionHandler +{ + public static bool Handle( Exception ex ) + { + return true; + } +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Commands/CommandCallback.cs b/managed/src/SwiftlyS2.Core/Modules/Commands/CommandCallback.cs index b4de05d26..c0680c35f 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Commands/CommandCallback.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Commands/CommandCallback.cs @@ -11,11 +11,11 @@ namespace SwiftlyS2.Core.Commands; -internal delegate void CommandCallbackDelegate(int playerId, nint args, nint commandName, nint prefix, byte slient); +internal delegate void CommandCallbackDelegate( int playerId, nint args, nint commandName, nint prefix, byte slient ); -internal delegate HookResult ClientCommandListenerCallbackDelegate(int playerId, nint commandLine); +internal delegate HookResult ClientCommandListenerCallbackDelegate( int playerId, nint commandLine ); -internal delegate HookResult ClientChatListenerCallbackDelegate(int playerId, nint text, byte teamonly); +internal delegate HookResult ClientChatListenerCallbackDelegate( int playerId, nint text, byte teamonly ); internal abstract class CommandCallbackBase : IDisposable { @@ -26,7 +26,7 @@ internal abstract class CommandCallbackBase : IDisposable public ILoggerFactory LoggerFactory { get; } - protected CommandCallbackBase(ILoggerFactory loggerFactory, IContextedProfilerService profiler) + protected CommandCallbackBase( ILoggerFactory loggerFactory, IContextedProfilerService profiler ) { LoggerFactory = loggerFactory; Profiler = profiler; @@ -52,7 +52,7 @@ internal class CommandCallback : CommandCallbackBase private readonly IPlayerManagerService _playerManagerService; private readonly IPermissionManager _permissionManager; - public CommandCallback(string commandName, bool registerRaw, ICommandService.CommandListener handler, string permission, IPlayerManagerService playerManagerService, IPermissionManager permissionManager, ILoggerFactory loggerFactory, IContextedProfilerService profiler) + public CommandCallback( string commandName, bool registerRaw, ICommandService.CommandListener handler, string permission, IPlayerManagerService playerManagerService, IPermissionManager permissionManager, ILoggerFactory loggerFactory, IContextedProfilerService profiler ) : base(loggerFactory, profiler) { _logger = LoggerFactory.CreateLogger(); @@ -64,7 +64,7 @@ public CommandCallback(string commandName, bool registerRaw, ICommandService.Com _permissions = permission; _handler = handler; - _unmanagedCallback = (playerId, argsPtr, commandNamePtr, prefixPtr, slient) => + _unmanagedCallback = ( playerId, argsPtr, commandNamePtr, prefixPtr, slient ) => { try { @@ -88,6 +88,7 @@ public CommandCallback(string commandName, bool registerRaw, ICommandService.Com } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; _logger.LogError(e, "Failed to handle command {0}.", commandName); } }; @@ -112,7 +113,7 @@ internal class ClientCommandListenerCallback : CommandCallbackBase private ulong _nativeListenerId; private ILogger _logger; - public ClientCommandListenerCallback(ICommandService.ClientCommandHandler handler, ILoggerFactory loggerFactory, IContextedProfilerService profiler) + public ClientCommandListenerCallback( ICommandService.ClientCommandHandler handler, ILoggerFactory loggerFactory, IContextedProfilerService profiler ) : base(loggerFactory, profiler) { _logger = LoggerFactory.CreateLogger(); @@ -120,7 +121,7 @@ public ClientCommandListenerCallback(ICommandService.ClientCommandHandler handle _handler = handler; - _unmanagedCallback = (playerId, commandLinePtr) => + _unmanagedCallback = ( playerId, commandLinePtr ) => { try { @@ -133,6 +134,7 @@ public ClientCommandListenerCallback(ICommandService.ClientCommandHandler handle } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return HookResult.Continue; _logger.LogError(e, "Failed to handle client command listener."); return HookResult.Continue; } @@ -159,7 +161,7 @@ internal class ClientChatListenerCallback : CommandCallbackBase private ulong _nativeListenerId; private ILogger _logger; - public ClientChatListenerCallback(ICommandService.ClientChatHandler handler, ILoggerFactory loggerFactory, IContextedProfilerService profiler) + public ClientChatListenerCallback( ICommandService.ClientChatHandler handler, ILoggerFactory loggerFactory, IContextedProfilerService profiler ) : base(loggerFactory, profiler) { _logger = LoggerFactory.CreateLogger(); @@ -167,7 +169,7 @@ public ClientChatListenerCallback(ICommandService.ClientChatHandler handler, ILo _handler = handler; - _unmanagedCallback = (playerId, textPtr, teamonly) => + _unmanagedCallback = ( playerId, textPtr, teamonly ) => { try { @@ -180,6 +182,7 @@ public ClientChatListenerCallback(ICommandService.ClientChatHandler handler, ILo } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return HookResult.Continue; _logger.LogError(e, "Failed to handle client chat listener."); return HookResult.Continue; } diff --git a/managed/src/SwiftlyS2.Core/Modules/Commands/CommandService.cs b/managed/src/SwiftlyS2.Core/Modules/Commands/CommandService.cs index c42cceecf..c5e5d6767 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Commands/CommandService.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Commands/CommandService.cs @@ -19,9 +19,10 @@ internal class CommandService : ICommandService, IDisposable private IPlayerManagerService _PlayerManagerService { get; init; } private IPermissionManager _PermissionManager { get; init; } - private object _lock = new(); + private Lock _lock = new(); - public CommandService(ILogger logger, ILoggerFactory loggerFactory, IContextedProfilerService profiler, IPlayerManagerService playerManagerService, IPermissionManager permissionManager) { + public CommandService( ILogger logger, ILoggerFactory loggerFactory, IContextedProfilerService profiler, IPlayerManagerService playerManagerService, IPermissionManager permissionManager ) + { _Logger = logger; _LoggerFactory = loggerFactory; _Profiler = profiler; @@ -29,21 +30,23 @@ public CommandService(ILogger logger, ILoggerFactory loggerFacto _PermissionManager = permissionManager; } - public Guid RegisterCommand(string commandName, ICommandService.CommandListener handler, bool registerRaw = false, string permission = "") { + public Guid RegisterCommand( string commandName, ICommandService.CommandListener handler, bool registerRaw = false, string permission = "" ) + { var callback = new CommandCallback(commandName, registerRaw, handler, permission, _PlayerManagerService, _PermissionManager, _LoggerFactory, _Profiler); - lock (_lock) { + lock (_lock) + { _callbacks.Add(callback); } return callback.Guid; } - public void RegisterCommandAlias(string commandName, string alias, bool registerRaw = false) + public void RegisterCommandAlias( string commandName, string alias, bool registerRaw = false ) { NativeCommands.RegisterAlias(alias, commandName, registerRaw); } - public void UnregisterCommand(Guid guid) + public void UnregisterCommand( Guid guid ) { lock (_lock) { @@ -59,7 +62,7 @@ public void UnregisterCommand(Guid guid) } } - public void UnregisterCommand(string commandName) + public void UnregisterCommand( string commandName ) { lock (_lock) { @@ -75,16 +78,17 @@ public void UnregisterCommand(string commandName) } } - public void HookClientCommand(ICommandService.ClientCommandHandler handler) + public Guid HookClientCommand( ICommandService.ClientCommandHandler handler ) { var callback = new ClientCommandListenerCallback(handler, _LoggerFactory, _Profiler); lock (_lock) { _callbacks.Add(callback); } + return callback.Guid; } - public void UnhookClientCommand(Guid guid) + public void UnhookClientCommand( Guid guid ) { lock (_lock) { @@ -100,7 +104,7 @@ public void UnhookClientCommand(Guid guid) } } - public Guid HookClientChat(ICommandService.ClientChatHandler handler) + public Guid HookClientChat( ICommandService.ClientChatHandler handler ) { var callback = new ClientChatListenerCallback(handler, _LoggerFactory, _Profiler); lock (_lock) @@ -110,7 +114,7 @@ public Guid HookClientChat(ICommandService.ClientChatHandler handler) return callback.Guid; } - public void UnhookClientChat(Guid guid) + public void UnhookClientChat( Guid guid ) { lock (_lock) { diff --git a/managed/src/SwiftlyS2.Core/Modules/Convars/ConVar.cs b/managed/src/SwiftlyS2.Core/Modules/Convars/ConVar.cs index c88a7c18d..25b4913d6 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Convars/ConVar.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Convars/ConVar.cs @@ -3,300 +3,162 @@ using SwiftlyS2.Shared.Natives; using SwiftlyS2.Core.Extensions; using System.Runtime.InteropServices; +using System.Runtime.CompilerServices; namespace SwiftlyS2.Core.Convars; -internal delegate void ConVarCallbackDelegate(int playerId, nint name, nint value); +internal delegate void ConVarCallbackDelegate( int playerId, nint name, nint value ); -internal class ConVar : IConVar{ +internal class ConVar : IConVar +{ private Dictionary _callbacks = new(); - private object _lock = new(); + private Lock _lock = new(); - public string Name { get; set; } + private nint _minValuePtrPtr => NativeConvars.GetMinValuePtrPtr(Name); + private nint _maxValuePtrPtr => NativeConvars.GetMaxValuePtrPtr(Name); - internal ConVar(string name) { - Name = name; - } + public EConVarType Type => (EConVarType)NativeConvars.GetConvarType(Name); - public void AddFlags(ConvarFlags flags) - { - NativeConvars.AddFlags(Name, (ulong)flags); - } + private bool IsValidType => Type > EConVarType.EConVarType_Invalid && Type < EConVarType.EConVarType_MAX; - public void RemoveFlags(ConvarFlags flags) - { - NativeConvars.RemoveFlags(Name, (ulong)flags); - } + // im not sure + private bool IsMinMaxType => IsValidType && Type != EConVarType.EConVarType_String && Type != EConVarType.EConVarType_Color; - public void ClearFlags() - { - NativeConvars.ClearFlags(Name); + public T MinValue { + get => GetMinValue(); + set => SetMinValue(value); } - - public ConvarFlags GetFlags() - { - return (ConvarFlags)NativeConvars.GetFlags(Name); + public T MaxValue { + get => GetMaxValue(); + set => SetMaxValue(value); } - public bool HasFlags(ConvarFlags flags) - { - return (GetFlags() & flags) == flags; + public T DefaultValue { + get => GetDefaultValue(); + set => SetDefaultValue(value); } - public T Value { - get { - if (typeof(T) == typeof(bool)) { - return (T)(object)NativeConvars.GetConvarValueBool(Name); - } - else if (typeof(T) == typeof(short)) { - return (T)(object)NativeConvars.GetConvarValueInt16(Name); - } - else if (typeof(T) == typeof(ushort)) { - return (T)(object)NativeConvars.GetConvarValueUInt16(Name); - } - else if (typeof(T) == typeof(int)) { - return (T)(object)NativeConvars.GetConvarValueInt32(Name); - } - else if (typeof(T) == typeof(uint)) { - return (T)(object)NativeConvars.GetConvarValueUInt32(Name); - } - else if (typeof(T) == typeof(float)) { - return (T)(object)NativeConvars.GetConvarValueFloat(Name); - } - else if (typeof(T) == typeof(long)) { - return (T)(object)NativeConvars.GetConvarValueInt64(Name); - } - else if (typeof(T) == typeof(ulong)) { - return (T)(object)NativeConvars.GetConvarValueUInt64(Name); - } - else if (typeof(T) == typeof(double)) { - return (T)(object)NativeConvars.GetConvarValueDouble(Name); - } - else if (typeof(T) == typeof(Color)) { - return (T)(object)NativeConvars.GetConvarValueColor(Name); - } - else if (typeof(T) == typeof(QAngle)) { - return (T)(object)NativeConvars.GetConvarValueQAngle(Name); - } - else if (typeof(T) == typeof(Vector)) { - return (T)(object)NativeConvars.GetConvarValueVector(Name); - } - else if (typeof(T) == typeof(Vector2D)) { - return (T)(object)NativeConvars.GetConvarValueVector2D(Name); - } - else if (typeof(T) == typeof(Vector4D)) { - return (T)(object)NativeConvars.GetConvarValueVector4D(Name); - } - else if (typeof(T) == typeof(string)) { - return (T)(object)NativeConvars.GetConvarValueString(Name); - } - throw new ArgumentException($"Invalid type {typeof(T).Name}"); - } - set { - if (value is bool boolValue) { - NativeConvars.SetConvarValueBool(Name, boolValue); - return; - } - else if (value is short shortValue) { - NativeConvars.SetConvarValueInt16(Name, shortValue); - return; - } - else if (value is ushort ushortValue) { - NativeConvars.SetConvarValueUInt16(Name, ushortValue); - return; - } - else if (value is int intValue) { - NativeConvars.SetConvarValueInt32(Name, intValue); - return; - } - else if (value is uint uintValue) { - NativeConvars.SetConvarValueUInt32(Name, uintValue); - return; - } - else if (value is float floatValue) { - NativeConvars.SetConvarValueFloat(Name, floatValue); - return; - } - else if (value is long longValue) { - NativeConvars.SetConvarValueInt64(Name, longValue); - return; - } - else if (value is ulong ulongValue) { - NativeConvars.SetConvarValueUInt64(Name, ulongValue); - return; - } - else if (value is double doubleValue) { - NativeConvars.SetConvarValueDouble(Name, doubleValue); - return; - } - else if (value is Color colorValue) { - NativeConvars.SetConvarValueColor(Name, colorValue); - return; - } - else if (value is QAngle qAngleValue) { - NativeConvars.SetConvarValueQAngle(Name, qAngleValue); - return; - } - else if (value is Vector vectorValue) { - NativeConvars.SetConvarValueVector(Name, vectorValue); - return; - } - else if (value is Vector2D vector2DValue) { - NativeConvars.SetConvarValueVector2D(Name, vector2DValue); - return; - } - else if (value is Vector4D vector4DValue) { - NativeConvars.SetConvarValueVector4D(Name, vector4DValue); - return; - } - else if (value is string stringValue) { - NativeConvars.SetConvarValueString(Name, stringValue); - return; - } - throw new ArgumentException($"Invalid type {typeof(T).Name}"); - } + public ConvarFlags Flags { + get => (ConvarFlags)NativeConvars.GetFlags(Name); + set => NativeConvars.SetFlags(Name, (ulong)value); } - public void SetInternal(T value) + public bool HasDefaultValue => NativeConvars.HasDefaultValue(Name); + + public bool HasMinValue => _minValuePtrPtr.Read() != 0; + public bool HasMaxValue => _maxValuePtrPtr.Read() != 0; + + public string Name { get; set; } + + internal ConVar( string name ) { - var addr = NativeConvars.GetConvarDataAddress(Name); + Name = name; - if (addr == nint.Zero) { - throw new Exception($"Convar {Name} not found."); - } + ValidateType(); + } - if (value is bool boolValue) { - addr.Write(boolValue); - return; - } - else if (value is short shortValue) { - addr.Write(shortValue); - return; - } - else if (value is ushort ushortValue) { - addr.Write(ushortValue); - return; - } - else if (value is int intValue) { - addr.Write(intValue); - return; - } - else if (value is float floatValue) { - addr.Write(floatValue); - return; - } - else if (value is long longValue) { - addr.Write(longValue); - return; - } - else if (value is ulong ulongValue) { - addr.Write(ulongValue); - return; - } - else if (value is double doubleValue) { - addr.Write(doubleValue); - return; - } - else if (value is Color colorValue) { - addr.Write(colorValue); - return; - } - else if (value is QAngle qAngleValue) { - addr.Write(qAngleValue); - return; - } - else if (value is Vector vectorValue) { - addr.Write(vectorValue); - return; - } - else if (value is Vector2D vector2DValue) { - addr.Write(vector2DValue); - return; - } - else if (value is Vector4D vector4DValue) { - addr.Write(vector4DValue); - return; - } - else if (value is string stringValue) + public void ValidateType() + { + if ( + (typeof(T) == typeof(bool) && Type != EConVarType.EConVarType_Bool) || + (typeof(T) == typeof(short) && Type != EConVarType.EConVarType_Int16) || + (typeof(T) == typeof(ushort) && Type != EConVarType.EConVarType_UInt16) || + (typeof(T) == typeof(int) && Type != EConVarType.EConVarType_Int32) || + (typeof(T) == typeof(uint) && Type != EConVarType.EConVarType_UInt32) || + (typeof(T) == typeof(float) && Type != EConVarType.EConVarType_Float32) || + (typeof(T) == typeof(long) && Type != EConVarType.EConVarType_Int64) || + (typeof(T) == typeof(ulong) && Type != EConVarType.EConVarType_UInt64) || + (typeof(T) == typeof(double) && Type != EConVarType.EConVarType_Float64) || + (typeof(T) == typeof(Color) && Type != EConVarType.EConVarType_Color) || + (typeof(T) == typeof(QAngle) && Type != EConVarType.EConVarType_Qangle) || + (typeof(T) == typeof(Vector) && Type != EConVarType.EConVarType_Vector3) || + (typeof(T) == typeof(Vector2D) && Type != EConVarType.EConVarType_Vector2) || + (typeof(T) == typeof(Vector4D) && Type != EConVarType.EConVarType_Vector4) || + (typeof(T) == typeof(string) && Type != EConVarType.EConVarType_String) + ) { - var ptr = StringPool.Allocate(stringValue); - addr.Write(ptr); - return; + throw new Exception($"Type mismatch for convar {Name}. The real type is {Type}."); } - throw new ArgumentException($"Invalid type {typeof(T).Name}"); } - public void ReplicateToClient(int clientId, T value) + public T Value { + get => GetValue(); + set => SetValue(value); + } + public void ReplicateToClient( int clientId, T value ) { - if (value is bool boolValue) { - NativeConvars.SetClientConvarValueBool(clientId, Name, boolValue); - return; + var val = ""; + if (value is bool boolValue) + { + val = boolValue ? "1" : "0"; } - else if (value is short shortValue) { - NativeConvars.SetClientConvarValueInt16(clientId, Name, shortValue); - return; + else if (value is short shortValue) + { + val = shortValue.ToString(); } - else if (value is ushort ushortValue) { - NativeConvars.SetClientConvarValueUInt16(clientId, Name, ushortValue); - return; + else if (value is ushort ushortValue) + { + val = ushortValue.ToString(); } - else if (value is int intValue) { - NativeConvars.SetClientConvarValueInt32(clientId, Name, intValue); - return; + else if (value is int intValue) + { + val = intValue.ToString(); } - else if (value is uint uintValue) { - NativeConvars.SetClientConvarValueUInt32(clientId, Name, uintValue); - return; + else if (value is uint uintValue) + { + val = uintValue.ToString(); } - else if (value is float floatValue) { - NativeConvars.SetClientConvarValueFloat(clientId, Name, floatValue); - return; + else if (value is float floatValue) + { + val = floatValue.ToString(); } - else if (value is long longValue) { - NativeConvars.SetClientConvarValueInt64(clientId, Name, longValue); - return; + else if (value is long longValue) + { + val = longValue.ToString(); } - else if (value is ulong ulongValue) { - NativeConvars.SetClientConvarValueUInt64(clientId, Name, ulongValue); - return; + else if (value is ulong ulongValue) + { + val = ulongValue.ToString(); } - else if (value is double doubleValue) { - NativeConvars.SetClientConvarValueDouble(clientId, Name, doubleValue); - return; + else if (value is double doubleValue) + { + val = doubleValue.ToString(); } - else if (value is Color colorValue) { - NativeConvars.SetClientConvarValueColor(clientId, Name, colorValue); - return; + else if (value is Color colorValue) + { + val = $"{colorValue.R},{colorValue.G},{colorValue.B}"; } - else if (value is QAngle qAngleValue) { - NativeConvars.SetClientConvarValueQAngle(clientId, Name, qAngleValue); - return; + else if (value is QAngle qAngleValue) + { + val = $"{qAngleValue.Pitch},{qAngleValue.Yaw},{qAngleValue.Roll}"; } - else if (value is Vector vectorValue) { - NativeConvars.SetClientConvarValueVector(clientId, Name, vectorValue); - return; + else if (value is Vector vectorValue) + { + val = $"{vectorValue.X},{vectorValue.Y},{vectorValue.Z}"; } - else if (value is Vector2D vector2DValue) { - NativeConvars.SetClientConvarValueVector2D(clientId, Name, vector2DValue); - return; + else if (value is Vector2D vector2DValue) + { + val = $"{vector2DValue.X},{vector2DValue.Y}"; } - else if (value is Vector4D vector4DValue) { - NativeConvars.SetClientConvarValueVector4D(clientId, Name, vector4DValue); - return; + else if (value is Vector4D vector4DValue) + { + val = $"{vector4DValue.X},{vector4DValue.Y},{vector4DValue.Z},{vector4DValue.W}"; } - else if (value is string stringValue) { - NativeConvars.SetClientConvarValueString(clientId, Name, stringValue); - return; + else if (value is string stringValue) + { + val = stringValue; } - throw new ArgumentException($"Invalid type {typeof(T).Name}"); + else throw new ArgumentException($"Invalid type {typeof(T).Name}"); + + NativeConvars.SetClientConvarValueString(clientId, Name, val); } - public void QueryClient(int clientId, Action callback) + public void QueryClient( int clientId, Action callback ) { Action? removeSelf = null; - ConVarCallbackDelegate nativeCallback = (playerId, namePtr, valuePtr) => + ConVarCallbackDelegate nativeCallback = ( playerId, namePtr, valuePtr ) => { if (clientId != playerId) return; var name = Marshal.PtrToStringAnsi(namePtr); @@ -305,7 +167,7 @@ public void QueryClient(int clientId, Action callback) // var convertedValue = (T)Convert.ChangeType(value, typeof(T))!; callback(value); - if(removeSelf != null) removeSelf(); + if (removeSelf != null) removeSelf(); }; @@ -317,14 +179,212 @@ public void QueryClient(int clientId, Action callback) _callbacks[listenerId] = nativeCallback; } - removeSelf = () => { - lock (_lock) { + removeSelf = () => + { + lock (_lock) + { _callbacks.Remove(listenerId); NativeConvars.RemoveQueryClientCvarCallback(listenerId); } }; - + NativeConvars.QueryClientConvar(clientId, Name); } + public T GetValue() + { + unsafe + { + if (Type != EConVarType.EConVarType_String) + { + return *(T*)NativeConvars.GetValuePtr(Name); + } + else + { + return (T)(object)(*(CUtlString*)NativeConvars.GetValuePtr(Name)).Value; + } + } + } + + public void SetValue( T value ) + { + unsafe + { + if (Type != EConVarType.EConVarType_String) + { + NativeConvars.SetValuePtr(Name, (nint)(&value)); + } + else + { + CUtlString str = new(); + str.Value = (string)(object)value; + NativeConvars.SetValuePtr(Name, (nint)(&str)); + } + } + } + + + public void SetInternal( T value ) + { + unsafe + { + if (Type != EConVarType.EConVarType_String) + { + NativeConvars.SetValueInternalPtr(Name, (nint)(&value)); + } + else + { + CUtlString str = new(); + str.Value = (string)(object)value; + NativeConvars.SetValueInternalPtr(Name, (nint)(&str)); + } + } + } + + + public T GetMinValue() + { + if (!IsMinMaxType) + { + throw new Exception($"Convar {Name} is not a min/max type."); + } + if (!HasMinValue) + { + throw new Exception($"Convar {Name} doesn't have a min value."); + } + unsafe + { + return **(T**)_minValuePtrPtr; + } + } + + public T GetMaxValue() + { + if (!IsMinMaxType) + { + throw new Exception($"Convar {Name} is not a min/max type."); + } + if (!HasMaxValue) + { + throw new Exception($"Convar {Name} doesn't have a max value."); + } + unsafe + { + return **(T**)_maxValuePtrPtr; + } + } + public void SetMinValue( T minValue ) + { + if (!IsMinMaxType) + { + throw new Exception($"Convar {Name} is not a min/max type."); + } + unsafe + { + if (_minValuePtrPtr.Read() == nint.Zero) + { + _minValuePtrPtr.Write(NativeAllocator.Alloc(16)); + } + **(T**)_minValuePtrPtr = minValue; + } + } + + public void SetMaxValue( T maxValue ) + { + if (!IsMinMaxType) + { + throw new Exception($"Convar {Name} is not a min/max type."); + } + unsafe + { + if (_maxValuePtrPtr.Read() == nint.Zero) + { + _maxValuePtrPtr.Write(NativeAllocator.Alloc(16)); + } + **(T**)_maxValuePtrPtr = maxValue; + } + } + + public T GetDefaultValue() + { + unsafe + { + var ptr = NativeConvars.GetDefaultValuePtr(Name); + if (ptr == nint.Zero) + { + throw new Exception($"Convar {Name} doesn't have a default value."); + } + if (Type != EConVarType.EConVarType_String) + { + return *(T*)ptr; + } + else + { + return (T)(object)(*(CUtlString*)ptr).Value; + } + } + } + + public void SetDefaultValue( T defaultValue ) + { + unsafe + { + var ptr = NativeConvars.GetDefaultValuePtr(Name); + if (ptr == nint.Zero) + { + throw new Exception($"Convar {Name} doesn't have a default value."); + } + if (Type != EConVarType.EConVarType_String) + { + *(T*)NativeConvars.GetDefaultValuePtr(Name) = defaultValue; + } + else + { + NativeConvars.GetDefaultValuePtr(Name).Write(StringPool.Allocate((string)(object)defaultValue)); + } + } + } + + public bool TryGetMinValue( out T minValue ) + { + if (!IsMinMaxType) + { + minValue = default; + return false; + } + if (!HasMinValue) + { + minValue = default; + return false; + } + minValue = GetMinValue(); + return true; + } + + public bool TryGetMaxValue( out T maxValue ) + { + if (!IsMinMaxType) + { + maxValue = default; + return false; + } + if (!HasMaxValue) + { + maxValue = default; + return false; + } + maxValue = GetMaxValue(); + return true; + } + + public bool TryGetDefaultValue( out T defaultValue ) + { + if (!HasDefaultValue) + { + defaultValue = default; + return false; + } + defaultValue = GetDefaultValue(); + return true; + } } diff --git a/managed/src/SwiftlyS2.Core/Modules/Convars/ConVarService.cs b/managed/src/SwiftlyS2.Core/Modules/Convars/ConVarService.cs index 1bc6a3cfc..e916a6318 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Convars/ConVarService.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Convars/ConVarService.cs @@ -25,11 +25,14 @@ internal enum EConVarType : int EConVarType_MAX }; -internal class ConVarService : IConVarService { +internal class ConVarService : IConVarService +{ - public IConVar? Find(string name) { + public IConVar? Find( string name ) + { - if (!NativeConvars.ExistsConvar(name)) { + if (!NativeConvars.ExistsConvar(name)) + { return null; } @@ -37,179 +40,235 @@ internal class ConVarService : IConVarService { } - public IConVar Create(string name, string helpMessage, T defaultValue, ConvarFlags flags = ConvarFlags.NONE) { - if (NativeConvars.ExistsConvar(name)) { + public IConVar Create( string name, string helpMessage, T defaultValue, ConvarFlags flags = ConvarFlags.NONE ) + { + if (NativeConvars.ExistsConvar(name)) + { throw new Exception($"Convar {name} already exists."); } - if (defaultValue is bool boolValue) { + if (defaultValue is bool boolValue) + { NativeConvars.CreateConvarBool(name, (int)EConVarType.EConVarType_Bool, (ulong)flags, helpMessage, boolValue, 0, 0); } - else if (defaultValue is short shortValue) { + else if (defaultValue is short shortValue) + { NativeConvars.CreateConvarInt16(name, (int)EConVarType.EConVarType_Int16, (ulong)flags, helpMessage, shortValue, 0, 0); } - else if (defaultValue is ushort ushortValue) { + else if (defaultValue is ushort ushortValue) + { NativeConvars.CreateConvarUInt16(name, (int)EConVarType.EConVarType_UInt16, (ulong)flags, helpMessage, ushortValue, 0, 0); } - else if (defaultValue is int intValue) { + else if (defaultValue is int intValue) + { NativeConvars.CreateConvarInt32(name, (int)EConVarType.EConVarType_Int32, (ulong)flags, helpMessage, intValue, 0, 0); } - else if (defaultValue is uint uintValue) { + else if (defaultValue is uint uintValue) + { NativeConvars.CreateConvarUInt32(name, (int)EConVarType.EConVarType_UInt32, (ulong)flags, helpMessage, uintValue, 0, 0); } - else if (defaultValue is long longValue) { + else if (defaultValue is long longValue) + { NativeConvars.CreateConvarInt64(name, (int)EConVarType.EConVarType_Int64, (ulong)flags, helpMessage, longValue, 0, 0); } - else if (defaultValue is ulong ulongValue) { + else if (defaultValue is ulong ulongValue) + { NativeConvars.CreateConvarUInt64(name, (int)EConVarType.EConVarType_UInt64, (ulong)flags, helpMessage, ulongValue, 0, 0); } - else if (defaultValue is float floatValue) { + else if (defaultValue is float floatValue) + { NativeConvars.CreateConvarFloat(name, (int)EConVarType.EConVarType_Float32, (ulong)flags, helpMessage, floatValue, 0, 0); } - else if (defaultValue is double doubleValue) { + else if (defaultValue is double doubleValue) + { NativeConvars.CreateConvarDouble(name, (int)EConVarType.EConVarType_Float64, (ulong)flags, helpMessage, doubleValue, 0, 0); } - else if (defaultValue is Vector2D vector2Value) { + else if (defaultValue is Vector2D vector2Value) + { NativeConvars.CreateConvarVector2D(name, (int)EConVarType.EConVarType_Vector2, (ulong)flags, helpMessage, vector2Value, 0, 0); } - else if (defaultValue is Vector vector3Value) { + else if (defaultValue is Vector vector3Value) + { NativeConvars.CreateConvarVector(name, (int)EConVarType.EConVarType_Vector3, (ulong)flags, helpMessage, vector3Value, 0, 0); } - else if (defaultValue is Vector4D vector4Value) { + else if (defaultValue is Vector4D vector4Value) + { NativeConvars.CreateConvarVector4D(name, (int)EConVarType.EConVarType_Vector4, (ulong)flags, helpMessage, vector4Value, 0, 0); } - else if (defaultValue is QAngle qAngleValue) { + else if (defaultValue is QAngle qAngleValue) + { NativeConvars.CreateConvarQAngle(name, (int)EConVarType.EConVarType_Qangle, (ulong)flags, helpMessage, qAngleValue, 0, 0); } - else if (defaultValue is Color colorValue) { + else if (defaultValue is Color colorValue) + { NativeConvars.CreateConvarColor(name, (int)EConVarType.EConVarType_Color, (ulong)flags, helpMessage, colorValue, 0, 0); } - else if (defaultValue is string stringValue) { + else if (defaultValue is string stringValue) + { NativeConvars.CreateConvarString(name, (int)EConVarType.EConVarType_String, (ulong)flags, helpMessage, stringValue, 0, 0); } - else { + else + { throw new Exception($"Unsupported type {typeof(T)}."); } return new ConVar(name); } - - public IConVar Create(string name, string helpMessage, T defaultValue, T? minValue = null, T? maxValue = null, ConvarFlags flags = ConvarFlags.NONE) where T : unmanaged { - if (NativeConvars.ExistsConvar(name)) { + public IConVar Create( string name, string helpMessage, T defaultValue, T? minValue, T? maxValue, ConvarFlags flags = ConvarFlags.NONE ) where T : unmanaged + { + + if (NativeConvars.ExistsConvar(name)) + { throw new Exception($"Convar {name} already exists."); } - unsafe { + unsafe + { - if (defaultValue is short shortValue) { + if (defaultValue is short shortValue) + { short* pMin = stackalloc short[1]; - if (minValue.HasValue) { + if (minValue.HasValue) + { pMin[0] = (short)(object)minValue.Value; } short* pMax = stackalloc short[1]; - if (maxValue.HasValue) { + if (maxValue.HasValue) + { pMax[0] = (short)(object)maxValue.Value; } NativeConvars.CreateConvarInt16(name, (int)EConVarType.EConVarType_Int16, (ulong)flags, helpMessage, shortValue, minValue.HasValue ? (nint)pMin : 0, maxValue.HasValue ? (nint)pMax : 0); } - else if (defaultValue is ushort ushortValue) { + else if (defaultValue is ushort ushortValue) + { ushort* pMin = stackalloc ushort[1]; - if (minValue.HasValue) { + if (minValue.HasValue) + { pMin[0] = (ushort)(object)minValue.Value; } ushort* pMax = stackalloc ushort[1]; - if (maxValue.HasValue) { + if (maxValue.HasValue) + { pMax[0] = (ushort)(object)maxValue.Value; } NativeConvars.CreateConvarUInt16(name, (int)EConVarType.EConVarType_UInt16, (ulong)flags, helpMessage, ushortValue, minValue.HasValue ? (nint)pMin : 0, maxValue.HasValue ? (nint)pMax : 0); } - else if (defaultValue is int intValue) { + else if (defaultValue is int intValue) + { int* pMin = stackalloc int[1]; - if (minValue.HasValue) { + if (minValue.HasValue) + { pMin[0] = (int)(object)minValue.Value; } int* pMax = stackalloc int[1]; - if (maxValue.HasValue) { + if (maxValue.HasValue) + { pMax[0] = (int)(object)maxValue.Value; } NativeConvars.CreateConvarInt32(name, (int)EConVarType.EConVarType_Int32, (ulong)flags, helpMessage, intValue, minValue.HasValue ? (nint)pMin : 0, maxValue.HasValue ? (nint)pMax : 0); } - else if (defaultValue is uint uintValue) { + else if (defaultValue is uint uintValue) + { uint* pMin = stackalloc uint[1]; - if (minValue.HasValue) { + if (minValue.HasValue) + { pMin[0] = (uint)(object)minValue.Value; } uint* pMax = stackalloc uint[1]; - if (maxValue.HasValue) { + if (maxValue.HasValue) + { pMax[0] = (uint)(object)maxValue.Value; } NativeConvars.CreateConvarUInt32(name, (int)EConVarType.EConVarType_UInt32, (ulong)flags, helpMessage, uintValue, minValue.HasValue ? (nint)pMin : 0, maxValue.HasValue ? (nint)pMax : 0); } - else if (defaultValue is long longValue) { + else if (defaultValue is long longValue) + { long* pMin = stackalloc long[1]; - if (minValue.HasValue) { + if (minValue.HasValue) + { pMin[0] = (long)(object)minValue.Value; } long* pMax = stackalloc long[1]; - if (maxValue.HasValue) { + if (maxValue.HasValue) + { pMax[0] = (long)(object)maxValue.Value; } NativeConvars.CreateConvarInt64(name, (int)EConVarType.EConVarType_Int64, (ulong)flags, helpMessage, longValue, minValue.HasValue ? (nint)pMin : 0, maxValue.HasValue ? (nint)pMax : 0); } - else if (defaultValue is ulong ulongValue) { + else if (defaultValue is ulong ulongValue) + { ulong* pMin = stackalloc ulong[1]; - if (minValue.HasValue) { + if (minValue.HasValue) + { pMin[0] = (ulong)(object)minValue.Value; } ulong* pMax = stackalloc ulong[1]; - if (maxValue.HasValue) { + if (maxValue.HasValue) + { pMax[0] = (ulong)(object)maxValue.Value; } NativeConvars.CreateConvarUInt64(name, (int)EConVarType.EConVarType_UInt64, (ulong)flags, helpMessage, ulongValue, minValue.HasValue ? (nint)pMin : 0, maxValue.HasValue ? (nint)pMax : 0); } - else if (defaultValue is float floatValue) { + else if (defaultValue is float floatValue) + { float* pMin = stackalloc float[1]; - if (minValue.HasValue) { + if (minValue.HasValue) + { pMin[0] = (float)(object)minValue.Value; } float* pMax = stackalloc float[1]; - if (maxValue.HasValue) { + if (maxValue.HasValue) + { pMax[0] = (float)(object)maxValue.Value; } NativeConvars.CreateConvarFloat(name, (int)EConVarType.EConVarType_Float32, (ulong)flags, helpMessage, floatValue, minValue.HasValue ? (nint)pMin : 0, maxValue.HasValue ? (nint)pMax : 0); } - else if (defaultValue is double doubleValue) { + else if (defaultValue is double doubleValue) + { double* pMin = stackalloc double[1]; - if (minValue.HasValue) { + if (minValue.HasValue) + { pMin[0] = (double)(object)minValue.Value; } double* pMax = stackalloc double[1]; - if (maxValue.HasValue) { + if (maxValue.HasValue) + { pMax[0] = (double)(object)maxValue.Value; } NativeConvars.CreateConvarDouble(name, (int)EConVarType.EConVarType_Float64, (ulong)flags, helpMessage, doubleValue, minValue.HasValue ? (nint)pMin : 0, maxValue.HasValue ? (nint)pMax : 0); } - else { + else + { throw new Exception($"You can't assign min and max values to {typeof(T)}."); } } return new ConVar(name); } + + public IConVar CreateOrFind( string name, string helpMessage, T defaultValue, ConvarFlags flags = ConvarFlags.NONE ) + { + return NativeConvars.ExistsConvar(name) ? new ConVar(name) : Create(name, helpMessage, defaultValue, flags); + } + + public IConVar CreateOrFind( string name, string helpMessage, T defaultValue, T? minValue, T? maxValue, ConvarFlags flags = ConvarFlags.NONE ) where T : unmanaged + { + return NativeConvars.ExistsConvar(name) ? new ConVar(name) : Create(name, helpMessage, defaultValue, minValue, maxValue, flags); + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Database/DatabaseService.cs b/managed/src/SwiftlyS2.Core/Modules/Database/DatabaseService.cs index fb5e9e462..1e030957b 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Database/DatabaseService.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Database/DatabaseService.cs @@ -19,13 +19,13 @@ internal class DatabaseService : IDatabaseService private ConcurrentDictionary> _connectionStrings = new ConcurrentDictionary>(); - public DatabaseService(ILogger logger, CoreContext context) + public DatabaseService( ILogger logger, CoreContext context ) { _Logger = logger; _Context = context; } - public string GetConnectionString(string connectionName) + public string GetConnectionString( string connectionName ) { if (NativeDatabase.ConnectionExists(connectionName)) { @@ -34,7 +34,7 @@ public string GetConnectionString(string connectionName) return NativeDatabase.GetDefaultConnectionCredentials(); } - private Func ResolveConnectionString(string connectionString) + private Func ResolveConnectionString( string connectionString ) { try { @@ -79,12 +79,13 @@ private Func ResolveConnectionString(string connectionString) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) throw; _Logger.LogError(e, "Failed to resolve database credentials for {connectionString}! Please check your connection string format.", connectionString); throw; } } - public IDbConnection GetConnection(string connectionName) + public IDbConnection GetConnection( string connectionName ) { var connectionString = GetConnectionString(connectionName); return ResolveConnectionString(connectionString)(); diff --git a/managed/src/SwiftlyS2.Core/Modules/Engine/CommandTrackerManager.cs b/managed/src/SwiftlyS2.Core/Modules/Engine/CommandTrackerManager.cs index b89a6c452..ec84af02b 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Engine/CommandTrackerManager.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Engine/CommandTrackerManager.cs @@ -8,12 +8,12 @@ namespace SwiftlyS2.Core.Services; internal sealed class CommandTrackerManager : IDisposable { - private sealed record CommandIdContainer(Guid Value) + private sealed record CommandIdContainer( Guid Value ) { public static readonly CommandIdContainer Empty = new(Guid.Empty); } - private readonly record struct ExecutingCommand(Action Callback) + private readonly record struct ExecutingCommand( Action Callback ) { public ConcurrentQueue Output { get; } = new(); public DateTime Created { get; } = DateTime.UtcNow; @@ -31,7 +31,7 @@ public CommandTrackerManager() StartCleanupTimer(); } - public void ProcessCommand(IOnCommandExecuteHookEvent @event) + public void ProcessCommand( IOnCommandExecuteHookEvent @event ) { if (@event.HookMode == HookMode.Pre) { @@ -47,7 +47,7 @@ public void ProcessCommand(IOnCommandExecuteHookEvent @event) } } - public void ProcessOutput(IOnConsoleOutputEvent @event) + public void ProcessOutput( IOnConsoleOutputEvent @event ) { if (disposed) return; @@ -60,7 +60,7 @@ public void ProcessOutput(IOnConsoleOutputEvent @event) } } - public void ProcessCommandStart(IOnCommandExecuteHookEvent @event) + public void ProcessCommandStart( IOnCommandExecuteHookEvent @event ) { if (pendingCallbacks.TryDequeue(out var callback)) { @@ -80,7 +80,7 @@ public void ProcessCommandStart(IOnCommandExecuteHookEvent @event) } } - public void ProcessCommandEnd(IOnCommandExecuteHookEvent _) + public void ProcessCommandEnd( IOnCommandExecuteHookEvent _ ) { var previousContainer = Interlocked.Exchange(ref currentCommandContainer, CommandIdContainer.Empty); var commandId = previousContainer?.Value ?? Guid.Empty; @@ -111,6 +111,7 @@ private void StartCleanupTimer() } catch (Exception ex) { + if (!GlobalExceptionHandler.Handle(ex)) return; AnsiConsole.WriteException(ex); } } @@ -128,7 +129,7 @@ private void CleanupExpiredCommands() } } - public void EnqueueCommand(Action callback) + public void EnqueueCommand( Action callback ) { if (disposed) return; diff --git a/managed/src/SwiftlyS2.Core/Modules/Engine/EngineService.cs b/managed/src/SwiftlyS2.Core/Modules/Engine/EngineService.cs index b2231695c..70a9b34b5 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Engine/EngineService.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Engine/EngineService.cs @@ -18,19 +18,7 @@ public EngineService( CommandTrackerManager commandTrackedManager ) this._commandTrackedManager = commandTrackedManager; } - public string? ServerIP { - get { - try - { - return SteamGameServer.GetPublicIP().ToString(); - } - catch (Exception e) - { - AnsiConsole.WriteException(e); - return null; - } - } - } + public string? ServerIP => NativeEngineHelpers.GetIP(); public ref CGlobalVars GlobalVars => ref NativeEngineHelpers.GetGlobalVars().AsRef(); diff --git a/managed/src/SwiftlyS2.Core/Modules/EntitySystem/EntityOutputHookCallback.cs b/managed/src/SwiftlyS2.Core/Modules/EntitySystem/EntityOutputHookCallback.cs index 0adcba757..4c421c4f3 100644 --- a/managed/src/SwiftlyS2.Core/Modules/EntitySystem/EntityOutputHookCallback.cs +++ b/managed/src/SwiftlyS2.Core/Modules/EntitySystem/EntityOutputHookCallback.cs @@ -8,9 +8,9 @@ namespace SwiftlyS2.Core.NetMessages; [UnmanagedFunctionPointer(CallingConvention.Cdecl)] -internal delegate int EntityOutputHookCallbackDelegate(nint entityio, nint outputName, nint activator, nint caller, float delay); +internal delegate int EntityOutputHookCallbackDelegate( nint entityio, nint outputName, nint activator, nint caller, float delay ); -internal class EntityOutputHookCallback: IDisposable +internal class EntityOutputHookCallback : IDisposable { public Guid Guid { get; init; } public IContextedProfilerService Profiler { get; } @@ -21,13 +21,13 @@ internal class EntityOutputHookCallback: IDisposable private nint _unmanagedCallbackPtr; private ulong _nativeHookId; - public EntityOutputHookCallback(string className, string outputName, IEntitySystemService.EntityOutputHandler callback, ILoggerFactory loggerFactory, IContextedProfilerService profiler) + public EntityOutputHookCallback( string className, string outputName, IEntitySystemService.EntityOutputHandler callback, ILoggerFactory loggerFactory, IContextedProfilerService profiler ) { Guid = Guid.NewGuid(); Profiler = profiler; _logger = loggerFactory.CreateLogger(); _callback = callback; - _unmanagedCallback = (entityio, outputName, activator, caller, delay) => + _unmanagedCallback = ( entityio, outputName, activator, caller, delay ) => { try { @@ -46,6 +46,7 @@ public EntityOutputHookCallback(string className, string outputName, IEntitySyst } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return 0; _logger.LogError(e, "Failed to execute entity output callback {0}.", Guid); } return 0; diff --git a/managed/src/SwiftlyS2.Core/Modules/EntitySystem/EntitySystem.cs b/managed/src/SwiftlyS2.Core/Modules/EntitySystem/EntitySystem.cs index 029e230d3..f7bb93404 100644 --- a/managed/src/SwiftlyS2.Core/Modules/EntitySystem/EntitySystem.cs +++ b/managed/src/SwiftlyS2.Core/Modules/EntitySystem/EntitySystem.cs @@ -12,77 +12,91 @@ namespace SwiftlyS2.Core.EntitySystem; -internal class EntitySystemService : IEntitySystemService, IDisposable { +internal class EntitySystemService : IEntitySystemService, IDisposable +{ private List _callbacks = new(); - private object _lock = new(); + private Lock _lock = new(); private ILoggerFactory _loggerFactory; private IContextedProfilerService _profiler; - public EntitySystemService(ILoggerFactory loggerFactory, IContextedProfilerService profiler) + public EntitySystemService( ILoggerFactory loggerFactory, IContextedProfilerService profiler ) { _loggerFactory = loggerFactory; _profiler = profiler; } - public T CreateEntity() where T : class, ISchemaClass { + public T CreateEntity() where T : class, ISchemaClass + { var designerName = GetEntityDesignerName(); - if (designerName == null) { + if (designerName == null) + { throw new ArgumentException($"Can't create entity with class {typeof(T).Name}, which doesn't have a designer name."); } return CreateEntityByDesignerName(designerName); } - public T CreateEntityByDesignerName(string designerName) where T : ISchemaClass { + public T CreateEntityByDesignerName( string designerName ) where T : ISchemaClass + { var handle = NativeEntitySystem.CreateEntityByName(designerName); - if (handle == nint.Zero) { + if (handle == nint.Zero) + { throw new ArgumentException($"Failed to create entity by designer name: {designerName}, probably invalid designer name."); } return T.From(handle); } - public CHandle GetRefEHandle(T entity) where T : class, ISchemaClass { + public CHandle GetRefEHandle( T entity ) where T : class, ISchemaClass + { var handle = NativeEntitySystem.GetEntityHandleFromEntity(entity.Address); return new CHandle { Raw = handle, }; } - public CCSGameRules? GetGameRules() { + public CCSGameRules? GetGameRules() + { var handle = NativeEntitySystem.GetGameRules(); return handle.IsValidPtr() ? new CCSGameRulesImpl(handle) : null; } - public IEnumerable GetAllEntities() { + public IEnumerable GetAllEntities() + { CEntityIdentity? pFirst = new CEntityIdentityImpl(NativeEntitySystem.GetFirstActiveEntity()); - for (; pFirst != null && pFirst.IsValid; pFirst = pFirst.Next) { + for (; pFirst != null && pFirst.IsValid; pFirst = pFirst.Next) + { yield return new CEntityInstanceImpl(pFirst.Address.Read()); } } - public IEnumerable GetAllEntitiesByClass() where T : class, ISchemaClass { + public IEnumerable GetAllEntitiesByClass() where T : class, ISchemaClass + { var designerName = GetEntityDesignerName(); - if (designerName == null) { + if (designerName == null) + { throw new ArgumentException($"Can't get entities with class {typeof(T).Name}, which doesn't have a designer name"); } - return GetAllEntities().Where((entity) => entity.Entity?.DesignerName == designerName).Select((entity) => T.From(entity.Address)); + return GetAllEntities().Where(( entity ) => entity.Entity?.DesignerName == designerName).Select(( entity ) => T.From(entity.Address)); } - public IEnumerable GetAllEntitiesByDesignerName(string designerName) where T : class, ISchemaClass { + public IEnumerable GetAllEntitiesByDesignerName( string designerName ) where T : class, ISchemaClass + { return GetAllEntities() .Where(entity => entity.Entity?.DesignerName == designerName) .Select(entity => T.From(entity.Address)); } - public T? GetEntityByIndex(uint index) where T : class, ISchemaClass { + public T? GetEntityByIndex( uint index ) where T : class, ISchemaClass + { var handle = NativeEntitySystem.GetEntityByIndex(index); - if (handle == nint.Zero) { + if (handle == nint.Zero) + { return null; } return T.From(handle); } - Guid IEntitySystemService.HookEntityOutput(string outputName, IEntitySystemService.EntityOutputHandler callback) + Guid IEntitySystemService.HookEntityOutput( string outputName, IEntitySystemService.EntityOutputHandler callback ) { var hook = new EntityOutputHookCallback(GetEntityDesignerName() ?? "", outputName, callback, _loggerFactory, _profiler); lock (_lock) @@ -92,11 +106,12 @@ Guid IEntitySystemService.HookEntityOutput(string outputName, IEntitySystemSe return hook.Guid; } - public void UnhookEntityOutput(Guid guid) + public void UnhookEntityOutput( Guid guid ) { - lock(_lock) + lock (_lock) { - _callbacks.RemoveAll(callback => { + _callbacks.RemoveAll(callback => + { if (callback.Guid == guid) { callback.Dispose(); @@ -554,7 +569,8 @@ public void UnhookEntityOutput(Guid guid) { typeof(CAI_ChangeHintGroup), "ai_changehintgroup" } }.ToFrozenDictionary(); - private string? GetEntityDesignerName() where T : class, ISchemaClass { + private string? GetEntityDesignerName() where T : class, ISchemaClass + { return TypeToDesignerName.TryGetValue(typeof(T), out var name) ? name : null; } diff --git a/managed/src/SwiftlyS2.Core/Modules/Events/EventPublisher.cs b/managed/src/SwiftlyS2.Core/Modules/Events/EventPublisher.cs index e1dfcec6e..264abe002 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Events/EventPublisher.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Events/EventPublisher.cs @@ -73,6 +73,7 @@ public static void OnConVarCreated( nint convarNamePtr ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -94,6 +95,7 @@ public static void OnConCommandCreated( nint commandNamePtr ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -120,6 +122,7 @@ public static void OnConVarValueChanged( nint convarNamePtr, int playerid, nint } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -136,6 +139,7 @@ public static void OnTick( byte simulating, byte first, byte last ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -168,6 +172,7 @@ public static byte OnClientConnected( int playerId ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return 1; AnsiConsole.WriteException(e); return 1; } @@ -191,6 +196,7 @@ public static void OnClientDisconnected( int playerId, int reason ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -213,6 +219,7 @@ public static void OnClientKeyStateChanged( int playerId, GameButtons key, byte } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -234,6 +241,7 @@ public static void OnClientPutInServer( int playerId, int clientKind ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -254,6 +262,7 @@ public static void OnClientSteamAuthorize( int playerId ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -274,6 +283,7 @@ public static void OnClientSteamAuthorizeFail( int playerId ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -295,6 +305,7 @@ public static void OnEntityCreated( nint entityPtr ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -316,6 +327,7 @@ public static void OnEntityDeleted( nint entityPtr ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -339,6 +351,7 @@ public static void OnEntityParentChanged( nint entityPtr, nint newParentPtr ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -360,6 +373,7 @@ public static void OnEntitySpawned( nint entityPtr ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -381,6 +395,7 @@ public static void OnMapLoad( nint mapNamePtr ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -402,6 +417,7 @@ public static void OnMapUnload( nint mapNamePtr ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -436,6 +452,7 @@ public static void OnClientProcessUsercmds( int playerId, nint usercmdsPtr, int } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -472,6 +489,7 @@ public static byte OnEntityTakeDamage( nint entityPtr, nint takeDamageInfoPtr ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return 1; AnsiConsole.WriteException(e); return 1; } @@ -493,6 +511,7 @@ public static void OnPrecacheResource( nint pResourceManifest ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -511,6 +530,7 @@ public static void InvokeOnEntityTouchHook( OnEntityTouchHookEvent @event ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); return; } @@ -529,6 +549,7 @@ public static void InvokeOnEntityStartTouch( OnEntityStartTouchEvent @event ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); return; } @@ -547,6 +568,7 @@ public static void InvokeOnEntityTouch( OnEntityTouchEvent @event ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); return; } @@ -565,6 +587,7 @@ public static void InvokeOnEntityEndTouch( OnEntityEndTouchEvent @event ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); return; } @@ -583,6 +606,7 @@ public static void InvokeOnSteamAPIActivatedHook() } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); return; } @@ -605,6 +629,7 @@ public static void InvokeOnCanAcquireHook( OnItemServicesCanAcquireHookEvent @ev } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); return; } @@ -622,6 +647,7 @@ public static void InvokeOnWeaponServicesCanUseHook( OnWeaponServicesCanUseHookE } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -642,6 +668,7 @@ public static void OnConsoleOutput( nint messagePtr ) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } @@ -658,6 +685,7 @@ public static void InvokeOnCommandExecuteHook( OnCommandExecuteHookEvent @event } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } diff --git a/managed/src/SwiftlyS2.Core/Modules/Events/EventSubscriber.cs b/managed/src/SwiftlyS2.Core/Modules/Events/EventSubscriber.cs index a4c2c19b7..95c71bc9e 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Events/EventSubscriber.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Events/EventSubscriber.cs @@ -70,7 +70,7 @@ public void InvokeOnTick() } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnTick."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnTick."); } finally { @@ -88,7 +88,7 @@ public void InvokeOnClientConnected( OnClientConnectedEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnClientConnected."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnClientConnected."); } finally { @@ -106,7 +106,7 @@ public void InvokeOnClientDisconnected( OnClientDisconnectedEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnClientDisconnected."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnClientDisconnected."); } finally { @@ -124,7 +124,7 @@ public void InvokeOnClientKeyStateChanged( OnClientKeyStateChangedEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnClientKeyStateChanged."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnClientKeyStateChanged."); } finally { @@ -142,7 +142,7 @@ public void InvokeOnClientPutInServer( OnClientPutInServerEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnClientPutInServer."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnClientPutInServer."); } finally { @@ -160,7 +160,7 @@ public void InvokeOnClientSteamAuthorize( OnClientSteamAuthorizeEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnClientSteamAuthorize."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnClientSteamAuthorize."); } finally { @@ -178,7 +178,7 @@ public void InvokeOnClientSteamAuthorizeFail( OnClientSteamAuthorizeFailEvent @e } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnClientSteamAuthorizeFail."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnClientSteamAuthorizeFail."); } finally { @@ -196,7 +196,7 @@ public void InvokeOnEntityCreated( OnEntityCreatedEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnEntityCreated."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnEntityCreated."); } finally { @@ -214,7 +214,7 @@ public void InvokeOnEntityDeleted( OnEntityDeletedEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnEntityDeleted."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnEntityDeleted."); } finally { @@ -232,7 +232,7 @@ public void InvokeOnEntityParentChanged( OnEntityParentChangedEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnEntityParentChanged."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnEntityParentChanged."); } finally { @@ -250,7 +250,7 @@ public void InvokeOnEntitySpawned( OnEntitySpawnedEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnEntitySpawned."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnEntitySpawned."); } finally { @@ -268,7 +268,7 @@ public void InvokeOnMapLoad( OnMapLoadEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnMapLoad."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnMapLoad."); } finally { @@ -286,7 +286,7 @@ public void InvokeOnMapUnload( OnMapUnloadEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnMapUnload."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnMapUnload."); } finally { @@ -304,7 +304,7 @@ public void InvokeOnClientProcessUsercmds( OnClientProcessUsercmdsEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnClientProcessUsercmds."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnClientProcessUsercmds."); } finally { @@ -322,7 +322,7 @@ public void InvokeOnEntityTakeDamage( OnEntityTakeDamageEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnEntityTakeDamage."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnEntityTakeDamage."); } finally { @@ -340,7 +340,7 @@ public void InvokeOnPrecacheResource( OnPrecacheResourceEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnPrecacheResource."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnPrecacheResource."); } finally { @@ -359,7 +359,7 @@ public void InvokeOnEntityTouchHook( OnEntityTouchHookEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnEntityTouchHook."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnEntityTouchHook."); } finally { @@ -377,7 +377,7 @@ public void InvokeOnEntityStartTouch( OnEntityStartTouchEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnEntityStartTouch."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnEntityStartTouch."); } finally { @@ -395,7 +395,7 @@ public void InvokeOnEntityTouch( OnEntityTouchEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnEntityTouch."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnEntityTouch."); } finally { @@ -413,7 +413,7 @@ public void InvokeOnEntityEndTouch( OnEntityEndTouchEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnEntityEndTouch."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnEntityEndTouch."); } finally { @@ -430,7 +430,7 @@ public void InvokeOnSteamAPIActivatedHook() } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnSteamAPIActivatedHook."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnSteamAPIActivatedHook."); } finally { @@ -448,7 +448,7 @@ public void InvokeOnItemServicesCanAcquireHook( OnItemServicesCanAcquireHookEven } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnItemServicesCanAcquireHook."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnItemServicesCanAcquireHook."); } finally { @@ -466,7 +466,7 @@ public void InvokeOnWeaponServicesCanUseHook( OnWeaponServicesCanUseHookEvent @e } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnWeaponServicesCanUseHook."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnWeaponServicesCanUseHook."); } finally { @@ -484,7 +484,7 @@ public void InvokeOnConsoleOutput( OnConsoleOutputEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnConsoleOutput."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnConsoleOutput."); } finally { @@ -502,7 +502,7 @@ public void InvokeOnConVarValueChanged( OnConVarValueChanged @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnConVarValueChanged."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnConVarValueChanged."); } finally { @@ -520,7 +520,7 @@ public void InvokeOnConCommandCreated( OnConCommandCreated @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnConCommandCreated."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnConCommandCreated."); } finally { @@ -538,7 +538,7 @@ public void InvokeOnConVarCreated( OnConVarCreated @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnConVarCreated."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnConVarCreated."); } finally { @@ -556,7 +556,7 @@ public void InvokeOnCommandExecuteHook( OnCommandExecuteHookEvent @event ) } catch (Exception e) { - _Logger.LogError(e, "Error invoking OnCommandExecuteHook."); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Error invoking OnCommandExecuteHook."); } finally { diff --git a/managed/src/SwiftlyS2.Core/Modules/FileSystem/GameFileSystem.cs b/managed/src/SwiftlyS2.Core/Modules/FileSystem/GameFileSystem.cs new file mode 100644 index 000000000..c6fb86425 --- /dev/null +++ b/managed/src/SwiftlyS2.Core/Modules/FileSystem/GameFileSystem.cs @@ -0,0 +1,67 @@ +using SwiftlyS2.Core.Natives; +using SwiftlyS2.Shared.FileSystem; + +namespace SwiftlyS2.Core.FileSystem; + +internal class GameFileSystem : IGameFileSystem +{ + public void AddSearchPath( string path, string pathId, SearchPathAdd_t addType, SearchPathPriority_t priority ) + { + NativeFileSystem.AddSearchPath(path, pathId, (int)addType, (int)priority); + } + + public bool FileExists( string filePath, string pathId ) + { + return NativeFileSystem.FileExists(filePath, pathId); + } + + public uint GetFileSize( string filePath, string pathId ) + { + return NativeFileSystem.GetFileSize(filePath, pathId); + } + + public string GetSearchPath( string pathId, GetSearchPathTypes_t searchPathType, int searchPathsToGet ) + { + return NativeFileSystem.GetSearchPath(pathId, (int)searchPathType, searchPathsToGet); + } + + public bool IsDirectory( string path, string pathId ) + { + return NativeFileSystem.IsDirectory(path, pathId); + } + + public bool IsFileWritable( string filePath, string pathId ) + { + return NativeFileSystem.IsFileWritable(filePath, pathId); + } + + public bool PrecacheFile( string filePath, string pathId ) + { + return NativeFileSystem.PrecacheFile(filePath, pathId); + } + + public void PrintSearchPaths() + { + NativeFileSystem.PrintSearchPaths(); + } + + public string ReadFile( string filePath, string pathId ) + { + return NativeFileSystem.ReadFile(filePath, pathId); + } + + public bool RemoveSearchPath( string path, string pathId ) + { + return NativeFileSystem.RemoveSearchPath(path, pathId); + } + + public bool SetFileWritable( string filePath, string pathId, bool writable ) + { + return NativeFileSystem.SetFileWritable(filePath, pathId, writable); + } + + public bool WriteFile( string filePath, string pathId, string content ) + { + return NativeFileSystem.WriteFile(filePath, pathId, content); + } +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/GameData/GameDataService.cs b/managed/src/SwiftlyS2.Core/Modules/GameData/GameDataService.cs index 8c783359b..e4ab86d8d 100644 --- a/managed/src/SwiftlyS2.Core/Modules/GameData/GameDataService.cs +++ b/managed/src/SwiftlyS2.Core/Modules/GameData/GameDataService.cs @@ -10,11 +10,12 @@ namespace SwiftlyS2.Core.Services; -internal record Offset(int windows, int linux); -internal record Signature(string lib, string windows, string linux); -internal record Patch(string signature, string windows, string linux); +internal record Offset( int windows, int linux ); +internal record Signature( string lib, string windows, string linux ); +internal record Patch( string signature, string windows, string linux ); -internal class GameDataService : IGameDataService { +internal class GameDataService : IGameDataService +{ private CoreContext _Context { get; init; } @@ -24,72 +25,96 @@ internal class GameDataService : IGameDataService { private static OSPlatform _Platform = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? OSPlatform.Windows : OSPlatform.Linux; - public GameDataService(CoreContext context, MemoryService memoryService, ILogger logger) { + public GameDataService( CoreContext context, MemoryService memoryService, ILogger logger ) + { _Context = context; var signaturePath = Path.Combine(_Context.BaseDirectory, "resources", "gamedata", "signatures.jsonc"); var offsetPath = Path.Combine(_Context.BaseDirectory, "resources", "gamedata", "offsets.jsonc"); var patchPath = Path.Combine(_Context.BaseDirectory, "resources", "gamedata", "patches.jsonc"); - try { - - if (File.Exists(signaturePath)) { - var signatures = JsonSerializer.Deserialize>(File.ReadAllText(signaturePath))!; - foreach (var signature in signatures) { - nint? value = null; - if (_Platform == OSPlatform.Windows) { - value = memoryService.GetAddressBySignature(signature.Value.lib, signature.Value.windows); - } else { - value = memoryService.GetAddressBySignature(signature.Value.lib, signature.Value.linux); - } - if (value is null) { - logger.LogError("Failed to load signature {Signature}!", signature.Key); - continue; + try + { + + if (File.Exists(signaturePath)) + { + var signatures = JsonSerializer.Deserialize>(File.ReadAllText(signaturePath))!; + foreach (var signature in signatures) + { + nint? value = null; + if (_Platform == OSPlatform.Windows) + { + value = memoryService.GetAddressBySignature(signature.Value.lib, signature.Value.windows); + } + else + { + value = memoryService.GetAddressBySignature(signature.Value.lib, signature.Value.linux); + } + if (value is null) + { + logger.LogError("Failed to load signature {Signature}!", signature.Key); + continue; + } + _Signatures.TryAdd(signature.Key, value.Value); } - _Signatures.TryAdd(signature.Key, value.Value); } - } - if (File.Exists(offsetPath)) { - var offsets = JsonSerializer.Deserialize>(File.ReadAllText(offsetPath))!; - foreach (var offset in offsets) { - if (_Platform == OSPlatform.Windows) { - _Offsets.TryAdd(offset.Key, offset.Value.windows); - } else { - _Offsets.TryAdd(offset.Key, offset.Value.linux); + if (File.Exists(offsetPath)) + { + var offsets = JsonSerializer.Deserialize>(File.ReadAllText(offsetPath))!; + foreach (var offset in offsets) + { + if (_Platform == OSPlatform.Windows) + { + _Offsets.TryAdd(offset.Key, offset.Value.windows); + } + else + { + _Offsets.TryAdd(offset.Key, offset.Value.linux); + } } } - } - if (File.Exists(patchPath)) { - var patches = JsonSerializer.Deserialize>(File.ReadAllText(patchPath))!; - foreach (var patch in patches) { - _Patches.TryAdd(patch.Key, patch.Value); + if (File.Exists(patchPath)) + { + var patches = JsonSerializer.Deserialize>(File.ReadAllText(patchPath))!; + foreach (var patch in patches) + { + _Patches.TryAdd(patch.Key, patch.Value); + } } + } - - } catch (Exception e) { + catch (Exception e) + { + if (!GlobalExceptionHandler.Handle(e)) return; logger.LogError(e, "Failed to load game data."); } } - public bool HasSignature(string signatureName) { - if (_Signatures.ContainsKey(signatureName)) { + public bool HasSignature( string signatureName ) + { + if (_Signatures.ContainsKey(signatureName)) + { return true; } return NativeSignatures.Exists(signatureName); } - public nint GetSignature(string signatureName) { - if (_Signatures.TryGetValue(signatureName, out var signature)) { + public nint GetSignature( string signatureName ) + { + if (_Signatures.TryGetValue(signatureName, out var signature)) + { return signature; } return NativeSignatures.Fetch(signatureName); } - public bool TryGetSignature(string signatureName, out nint signature) { - if (_Signatures.TryGetValue(signatureName, out var _signature)) { + public bool TryGetSignature( string signatureName, out nint signature ) + { + if (_Signatures.TryGetValue(signatureName, out var _signature)) + { signature = _signature; return true; } @@ -97,22 +122,28 @@ public bool TryGetSignature(string signatureName, out nint signature) { return signature != nint.Zero; } - public bool HasOffset(string offsetName) { - if (_Offsets.ContainsKey(offsetName)) { + public bool HasOffset( string offsetName ) + { + if (_Offsets.ContainsKey(offsetName)) + { return true; } return NativeOffsets.Exists(offsetName); } - public int GetOffset(string offsetName) { - if (_Offsets.TryGetValue(offsetName, out var offset)) { + public int GetOffset( string offsetName ) + { + if (_Offsets.TryGetValue(offsetName, out var offset)) + { return offset; } return NativeOffsets.Fetch(offsetName); } - public bool TryGetOffset(string offsetName, out nint offset) { - if (_Offsets.TryGetValue(offsetName, out var _offset)) { + public bool TryGetOffset( string offsetName, out nint offset ) + { + if (_Offsets.TryGetValue(offsetName, out var _offset)) + { offset = _offset; return true; } @@ -120,28 +151,36 @@ public bool TryGetOffset(string offsetName, out nint offset) { return offset != nint.Zero; } - public bool HasPatch(string patchName) { - if (_Patches.ContainsKey(patchName)) { + public bool HasPatch( string patchName ) + { + if (_Patches.ContainsKey(patchName)) + { return true; } return NativePatches.Exists(patchName); } - public void ApplyPatch(string patchName) { - if (_Patches.TryGetValue(patchName, out var patch)) { + public void ApplyPatch( string patchName ) + { + if (_Patches.TryGetValue(patchName, out var patch)) + { nint address = GetSignature(patch.signature); - if (address == nint.Zero) { + if (address == nint.Zero) + { throw new Exception($"Failed to apply patch {patchName}, cannot find signature {patch.signature}."); } byte[] bytes; - if (_Platform == OSPlatform.Windows) { + if (_Platform == OSPlatform.Windows) + { bytes = patch.windows .Split(' ', StringSplitOptions.RemoveEmptyEntries) .Select(x => byte.Parse(x, NumberStyles.HexNumber, CultureInfo.InvariantCulture)) .ToArray(); - } else { + } + else + { bytes = patch.linux .Split(' ', StringSplitOptions.RemoveEmptyEntries) .Select(x => byte.Parse(x, NumberStyles.HexNumber, CultureInfo.InvariantCulture)) @@ -152,6 +191,6 @@ public void ApplyPatch(string patchName) { return; } NativePatches.Apply(patchName); - } + } } diff --git a/managed/src/SwiftlyS2.Core/Modules/GameEvents/GameEventCallback.cs b/managed/src/SwiftlyS2.Core/Modules/GameEvents/GameEventCallback.cs index 14572a861..541977f66 100644 --- a/managed/src/SwiftlyS2.Core/Modules/GameEvents/GameEventCallback.cs +++ b/managed/src/SwiftlyS2.Core/Modules/GameEvents/GameEventCallback.cs @@ -10,9 +10,10 @@ namespace SwiftlyS2.Core.GameEvents; [UnmanagedFunctionPointer(CallingConvention.Cdecl)] -internal delegate HookResult UnmanagedEventCallback(uint hash, nint pEvent, nint pDontBroadcast); +internal delegate HookResult UnmanagedEventCallback( uint hash, nint pEvent, nint pDontBroadcast ); -internal abstract class GameEventCallback : IEquatable, IDisposable { +internal abstract class GameEventCallback : IEquatable, IDisposable +{ public Guid Guid { get; init; } @@ -32,33 +33,39 @@ internal abstract class GameEventCallback : IEquatable, IDisp public CoreContext Context { get; } - protected GameEventCallback(ILoggerFactory loggerFactory, IContextedProfilerService profiler, CoreContext context) + protected GameEventCallback( ILoggerFactory loggerFactory, IContextedProfilerService profiler, CoreContext context ) { LoggerFactory = loggerFactory; Profiler = profiler; Context = context; } - public void Dispose() { - if (IsPreHook) { + public void Dispose() + { + if (IsPreHook) + { NativeGameEvents.RemoveListenerPreCallback(ListenerId); - } else { + } + else + { NativeGameEvents.RemoveListenerPostCallback(ListenerId); } } - public bool Equals(GameEventCallback? other) { + public bool Equals( GameEventCallback? other ) + { if (other is null) return false; return Guid == other.Guid; } - public override bool Equals(object? obj) + public override bool Equals( object? obj ) { if (ReferenceEquals(this, obj)) return true; return obj is GameEventCallback other && Equals(other); } - public override int GetHashCode() { + public override int GetHashCode() + { return Guid.GetHashCode(); } } @@ -69,7 +76,8 @@ internal class GameEventCallback : GameEventCallback, IDisposable where T : I private ILogger> _Logger { get; init; } private UnmanagedEventCallback _unmanagedCallback; - public GameEventCallback(IGameEventService.GameEventHandler callback, bool pre, ILoggerFactory loggerFactory, IContextedProfilerService profiler, CoreContext context) : base(loggerFactory, profiler, context) { + public GameEventCallback( IGameEventService.GameEventHandler callback, bool pre, ILoggerFactory loggerFactory, IContextedProfilerService profiler, CoreContext context ) : base(loggerFactory, profiler, context) + { Guid = Guid.NewGuid(); EventType = typeof(T); IsPreHook = pre; @@ -77,8 +85,10 @@ public GameEventCallback(IGameEventService.GameEventHandler callback, bool pr _callback = callback; _Logger = LoggerFactory.CreateLogger>(); - _unmanagedCallback = (hash, pEvent, pDontBroadcast) => { - try { + _unmanagedCallback = ( hash, pEvent, pDontBroadcast ) => + { + try + { var category = "GameEventCallback::" + EventName; if (hash != T.GetHash()) return HookResult.Continue; Profiler.StartRecording(category); @@ -88,10 +98,13 @@ public GameEventCallback(IGameEventService.GameEventHandler callback, bool pr eventObj.Dispose(); Profiler.StopRecording(category); return result; - } catch (Exception e) { + } + catch (Exception e) + { + if (!GlobalExceptionHandler.Handle(e)) return HookResult.Continue; _Logger.LogError(e, "Error in event {EventName} callback from context {ContextName}", EventName, Context.Name); return HookResult.Continue; - } + } }; UnmanagedWrapperPtr = Marshal.GetFunctionPointerForDelegate(_unmanagedCallback); NativeGameEvents.RegisterListener(EventName); diff --git a/managed/src/SwiftlyS2.Core/Modules/GameEvents/GameEventService.cs b/managed/src/SwiftlyS2.Core/Modules/GameEvents/GameEventService.cs index 8410cef7f..f027f7c05 100644 --- a/managed/src/SwiftlyS2.Core/Modules/GameEvents/GameEventService.cs +++ b/managed/src/SwiftlyS2.Core/Modules/GameEvents/GameEventService.cs @@ -9,41 +9,51 @@ namespace SwiftlyS2.Core.GameEvents; -internal class GameEventService : IGameEventService, IDisposable { +internal class GameEventService : IGameEventService, IDisposable +{ private ILoggerFactory _LoggerFactory { get; init; } private CoreContext _Context { get; init; } private IContextedProfilerService _Profiler { get; init; } - public GameEventService(ILoggerFactory loggerFactory, CoreContext context, IContextedProfilerService profiler) { + public GameEventService( ILoggerFactory loggerFactory, CoreContext context, IContextedProfilerService profiler ) + { _LoggerFactory = loggerFactory; _Context = context; _Profiler = profiler; } private readonly List _callbacks = new(); - private object _lock = new(); + private Lock _lock = new(); - public Guid HookPre(IGameEventService.GameEventHandler callback) where T : IGameEvent { + public Guid HookPre( IGameEventService.GameEventHandler callback ) where T : IGameEvent + { GameEventCallback cb = new(callback, true, _LoggerFactory, _Profiler, _Context); - lock (_lock) { + lock (_lock) + { _callbacks.Add(cb); } return cb.Guid; } - public Guid HookPost(IGameEventService.GameEventHandler callback) where T : IGameEvent { + public Guid HookPost( IGameEventService.GameEventHandler callback ) where T : IGameEvent + { GameEventCallback cb = new(callback, false, _LoggerFactory, _Profiler, _Context); - lock (_lock) { + lock (_lock) + { _callbacks.Add(cb); } return cb.Guid; } - public void Unhook(Guid guid) { - lock (_lock) { - _callbacks.RemoveAll(callback => { - if (callback.Guid == guid) { + public void Unhook( Guid guid ) + { + lock (_lock) + { + _callbacks.RemoveAll(callback => + { + if (callback.Guid == guid) + { callback.Dispose(); return true; } @@ -53,10 +63,14 @@ public void Unhook(Guid guid) { } - public void UnhookPre() where T : IGameEvent { - lock (_lock) { - _callbacks.RemoveAll(callback => { - if (callback.IsPreHook && callback is GameEventCallback) { + public void UnhookPre() where T : IGameEvent + { + lock (_lock) + { + _callbacks.RemoveAll(callback => + { + if (callback.IsPreHook && callback is GameEventCallback) + { callback.Dispose(); return true; } @@ -65,10 +79,14 @@ public void UnhookPre() where T : IGameEvent { } } - public void UnhookPost() where T : IGameEvent { - lock (_lock) { - _callbacks.RemoveAll(callback => { - if (!callback.IsPreHook && callback is GameEventCallback) { + public void UnhookPost() where T : IGameEvent + { + lock (_lock) + { + _callbacks.RemoveAll(callback => + { + if (!callback.IsPreHook && callback is GameEventCallback) + { callback.Dispose(); return true; } @@ -80,7 +98,8 @@ public void UnhookPost() where T : IGameEvent { public void Fire() where T : IGameEvent { var handle = NativeGameEvents.CreateEvent(T.GetName()); - for (int i = 0; i < NativePlayerManager.GetPlayerCap(); i++) { + for (int i = 0; i < NativePlayerManager.GetPlayerCap(); i++) + { if (NativeGameEvents.IsPlayerListeningToEventName(i, T.GetName()) && NativePlayerManager.IsPlayerOnline(i)) { NativeGameEvents.FireEventToClient(handle, i); @@ -89,12 +108,14 @@ public void Fire() where T : IGameEvent NativeGameEvents.FreeEvent(handle); } - public void Fire(Action configureEvent) where T : IGameEvent { + public void Fire( Action configureEvent ) where T : IGameEvent + { var handle = NativeGameEvents.CreateEvent(T.GetName()); var eventObj = T.Create(handle); configureEvent(eventObj); eventObj.Dispose(); - for (int i = 0; i < NativePlayerManager.GetPlayerCap(); i++) { + for (int i = 0; i < NativePlayerManager.GetPlayerCap(); i++) + { if (NativeGameEvents.IsPlayerListeningToEventName(i, T.GetName()) && NativePlayerManager.IsPlayerOnline(i)) { NativeGameEvents.FireEventToClient(handle, i); @@ -103,13 +124,15 @@ public void Fire(Action configureEvent) where T : IGameEvent { NativeGameEvents.FreeEvent(handle); } - public void FireToPlayer(int slot) where T : IGameEvent { + public void FireToPlayer( int slot ) where T : IGameEvent + { var handle = NativeGameEvents.CreateEvent(T.GetName()); NativeGameEvents.FireEventToClient(handle, slot); NativeGameEvents.FreeEvent(handle); } - public void FireToPlayer(int slot, Action configureEvent) where T : IGameEvent { + public void FireToPlayer( int slot, Action configureEvent ) where T : IGameEvent + { var handle = NativeGameEvents.CreateEvent(T.GetName()); var eventObj = T.Create(handle); configureEvent(eventObj); @@ -118,12 +141,14 @@ public void FireToPlayer(int slot, Action configureEvent) where T : IGameE NativeGameEvents.FreeEvent(handle); } - public void FireToServer() where T : IGameEvent { + public void FireToServer() where T : IGameEvent + { var handle = NativeGameEvents.CreateEvent(T.GetName()); NativeGameEvents.FireEvent(handle, true); } - public void FireToServer(Action configureEvent) where T : IGameEvent { + public void FireToServer( Action configureEvent ) where T : IGameEvent + { var handle = NativeGameEvents.CreateEvent(T.GetName()); var eventObj = T.Create(handle); configureEvent(eventObj); @@ -131,8 +156,10 @@ public void FireToServer(Action configureEvent) where T : IGameEvent { NativeGameEvents.FireEvent(handle, true); } - public void Dispose() { - lock (_lock) { + public void Dispose() + { + lock (_lock) + { foreach (var callback in _callbacks) { callback.Dispose(); diff --git a/managed/src/SwiftlyS2.Core/Modules/Helpers/Helpers.cs b/managed/src/SwiftlyS2.Core/Modules/Helpers/Helpers.cs index 1174c86b0..445486b74 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Helpers/Helpers.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Helpers/Helpers.cs @@ -7,10 +7,94 @@ namespace SwiftlyS2.Core.Services; internal class HelpersService : IHelpers { + public static readonly Dictionary WeaponItemDefinitionIndices = new() + { + // Pistols + { "weapon_deagle", 1 }, + { "weapon_elite", 2 }, + { "weapon_fiveseven", 3 }, + { "weapon_glock", 4 }, + { "weapon_tec9", 30 }, + { "weapon_hkp2000", 32 }, + { "weapon_p250", 36 }, + { "weapon_usp_silencer", 61 }, + { "weapon_cz75a", 63 }, + { "weapon_revolver", 64 }, + + // Rifles + { "weapon_ak47", 7 }, + { "weapon_aug", 8 }, + { "weapon_awp", 9 }, + { "weapon_famas", 10 }, + { "weapon_g3sg1", 11 }, + { "weapon_galilar", 13 }, + { "weapon_m249", 14 }, + { "weapon_m4a1", 16 }, + { "weapon_mac10", 17 }, + { "weapon_p90", 19 }, + { "weapon_mp5sd", 23 }, + { "weapon_ump45", 24 }, + { "weapon_xm1014", 25 }, + { "weapon_bizon", 26 }, + { "weapon_mag7", 27 }, + { "weapon_negev", 28 }, + { "weapon_sawedoff", 29 }, + { "weapon_mp7", 33 }, + { "weapon_mp9", 34 }, + { "weapon_nova", 35 }, + { "weapon_scar20", 38 }, + { "weapon_sg556", 39 }, + { "weapon_ssg08", 40 }, + { "weapon_m4a1_silencer", 60 }, + + // Grenades + { "weapon_flashbang", 43 }, + { "weapon_hegrenade", 44 }, + { "weapon_smokegrenade", 45 }, + { "weapon_molotov", 46 }, + { "weapon_decoy", 47 }, + { "weapon_incgrenade", 48 }, + + // Knives and Equipment + { "weapon_taser", 31 }, + { "weapon_knifegg", 41 }, + { "weapon_knife", 42 }, + { "weapon_c4", 49 }, + { "weapon_knife_t", 59 }, + { "weapon_bayonet", 500 }, + { "weapon_knife_css", 503 }, + { "weapon_knife_flip", 505 }, + { "weapon_knife_gut", 506 }, + { "weapon_knife_karambit", 507 }, + { "weapon_knife_m9_bayonet", 508 }, + { "weapon_knife_tactical", 509 }, + { "weapon_knife_falchion", 512 }, + { "weapon_knife_survival_bowie", 514 }, + { "weapon_knife_butterfly", 515 }, + { "weapon_knife_push", 516 }, + { "weapon_knife_cord", 517 }, + { "weapon_knife_canis", 518 }, + { "weapon_knife_ursus", 519 }, + { "weapon_knife_gypsy_jackknife", 520 }, + { "weapon_knife_outdoor", 521 }, + { "weapon_knife_stiletto", 522 }, + { "weapon_knife_widowmaker", 523 }, + { "weapon_knife_skeleton", 525 }, + { "weapon_knife_kukri", 526 }, + + // Utility + { "item_kevlar", 50 }, + { "item_assaultsuit", 51 }, + { "item_heavyassaultsuit", 52 }, + { "item_defuser", 55 }, + { "ammo_50ae", 0 } + }; + public CCSWeaponBaseVData? GetWeaponCSDataFromKey(int unknown, string key) { nint weaponDataPtr = GameFunctions.GetWeaponCSDataFromKey(unknown, key); - if (weaponDataPtr == 0) { + if (weaponDataPtr == 0) + { return null; } return new CCSWeaponBaseVDataImpl(weaponDataPtr); @@ -21,4 +105,25 @@ internal class HelpersService : IHelpers return GetWeaponCSDataFromKey(-1, itemDefinitionIndex.ToString()); } -} \ No newline at end of file + public string? GetClassnameByDefinitionIndex(int itemDefinitionIndex) + { + foreach (var kvp in WeaponItemDefinitionIndices) + { + if (kvp.Value == itemDefinitionIndex) + { + return kvp.Key; + } + } + return null; + } + + public int? GetDefinitionIndexByClassname(string classname) + { + if (WeaponItemDefinitionIndices.TryGetValue(classname, out int index)) + { + return index; + } + return null; + } + +} diff --git a/managed/src/SwiftlyS2.Core/Modules/Hooks/HookManager.cs b/managed/src/SwiftlyS2.Core/Modules/Hooks/HookManager.cs index 6685a275c..6965070bd 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Hooks/HookManager.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Hooks/HookManager.cs @@ -43,11 +43,11 @@ private class MidHookChain public List Nodes { get; } = new(); } - private readonly object _sync = new(); + private readonly Lock _sync = new(); private readonly Dictionary _chains = new(); private readonly Dictionary _midChains = new(); - public bool IsMidHooked(nint address) + public bool IsMidHooked( nint address ) { lock (_sync) { @@ -55,7 +55,7 @@ public bool IsMidHooked(nint address) } } - public bool IsHooked(nint functionAddress) + public bool IsHooked( nint functionAddress ) { lock (_sync) { @@ -63,7 +63,7 @@ public bool IsHooked(nint functionAddress) } } - public nint GetOriginal(nint functionAddress) + public nint GetOriginal( nint functionAddress ) { lock (_sync) { @@ -83,11 +83,10 @@ public nint GetOriginal(nint functionAddress) } } - public Guid AddMidHook(nint address, MidHookDelegate callback) + public Guid AddMidHook( nint address, MidHookDelegate callback ) { MidHookChain chain; - MidHookNode node = new MidHookNode - { + MidHookNode node = new MidHookNode { Id = Guid.NewGuid(), BuiltDelegate = callback, }; @@ -98,7 +97,7 @@ public Guid AddMidHook(nint address, MidHookDelegate callback) { chain = new MidHookChain { Address = address }; chain.HookHandle = NativeHooks.AllocateMHook(); - MidHookDelegate _unmanagedCallback = (ref MidHookContext ctx) => + MidHookDelegate _unmanagedCallback = ( ref MidHookContext ctx ) => { try { @@ -109,6 +108,7 @@ public Guid AddMidHook(nint address, MidHookDelegate callback) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; } }; NativeHooks.SetMHook(chain.HookHandle, address, Marshal.GetFunctionPointerForDelegate(_unmanagedCallback)); @@ -122,11 +122,10 @@ public Guid AddMidHook(nint address, MidHookDelegate callback) return node.Id; } - public Guid AddHook(nint functionAddress, Func, Delegate> callbackBuilder) + public Guid AddHook( nint functionAddress, Func, Delegate> callbackBuilder ) { HookChain chain; - HookNode node = new HookNode - { + HookNode node = new HookNode { Id = Guid.NewGuid(), CallbackBuilder = callbackBuilder, }; @@ -145,7 +144,7 @@ public Guid AddHook(nint functionAddress, Func, Delegate> callbackBui return node.Id; } - public void RemoveMidHook(List nodeIds) + public void RemoveMidHook( List nodeIds ) { lock (_sync) { @@ -158,7 +157,7 @@ public void RemoveMidHook(List nodeIds) } } - public void Remove(List nodeIds) + public void Remove( List nodeIds ) { lock (_sync) { @@ -172,7 +171,7 @@ public void Remove(List nodeIds) } } - private void RebuildChain(HookChain chain) + private void RebuildChain( HookChain chain ) { try { @@ -222,6 +221,7 @@ private void RebuildChain(HookChain chain) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); } } diff --git a/managed/src/SwiftlyS2.Core/Modules/Memory/MemoryService.cs b/managed/src/SwiftlyS2.Core/Modules/Memory/MemoryService.cs index 0a339e3fa..2150e7f29 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Memory/MemoryService.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Memory/MemoryService.cs @@ -17,14 +17,14 @@ internal class MemoryService : IMemoryService, IDisposable private readonly Dictionary _UnmanagedFunctions = new(); private readonly Dictionary _UnmanagedMemories = new(); - public MemoryService(ILogger logger, HookManager hookManager, ILoggerFactory loggerFactory) + public MemoryService( ILogger logger, HookManager hookManager, ILoggerFactory loggerFactory ) { _Logger = logger; _HookManager = hookManager; _LoggerFactory = loggerFactory; } - public IUnmanagedFunction GetUnmanagedFunctionByAddress(nint address) where TDelegate : Delegate + public IUnmanagedFunction GetUnmanagedFunctionByAddress( nint address ) where TDelegate : Delegate { try { @@ -45,12 +45,12 @@ public IUnmanagedFunction GetUnmanagedFunctionByAddress(ni } catch (Exception e) { - _Logger.LogError(e, "Failed to get unmanaged function by address {0}.", address); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Failed to get unmanaged function by address {0}.", address); throw new Exception($"Failed to get unmanaged function by address {address}."); } } - public IUnmanagedFunction GetUnmanagedFunctionByVTable(nint pVTable, int index) where TDelegate : Delegate + public IUnmanagedFunction GetUnmanagedFunctionByVTable( nint pVTable, int index ) where TDelegate : Delegate { try { @@ -59,12 +59,12 @@ public IUnmanagedFunction GetUnmanagedFunctionByVTable(nin } catch (Exception e) { - _Logger.LogError(e, "Failed to get unmanaged function by vtable {0} and index {1}.", pVTable, index); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Failed to get unmanaged function by vtable {0} and index {1}.", pVTable, index); throw new Exception($"Failed to get unmanaged function by vtable {pVTable} and index {index}."); } } - public IUnmanagedMemory GetUnmanagedMemoryByAddress(nint address) + public IUnmanagedMemory GetUnmanagedMemoryByAddress( nint address ) { try { @@ -78,12 +78,12 @@ public IUnmanagedMemory GetUnmanagedMemoryByAddress(nint address) } catch (Exception e) { - _Logger.LogError(e, "Failed to get unmanaged memory by address {0}.", address); + if (GlobalExceptionHandler.Handle(e)) _Logger.LogError(e, "Failed to get unmanaged memory by address {0}.", address); throw new Exception($"Failed to get unmanaged memory by address {address}."); } } - public nint? GetInterfaceByName(string name) + public nint? GetInterfaceByName( string name ) { var ptr = NativeMemoryHelpers.FetchInterfaceByName(name); if (ptr == 0) @@ -93,7 +93,7 @@ public IUnmanagedMemory GetUnmanagedMemoryByAddress(nint address) return ptr; } - public nint? GetAddressBySignature(string library, string signature) + public nint? GetAddressBySignature( string library, string signature ) { var ptr = NativeMemoryHelpers.GetAddressBySignature(library, signature, 0, false); if (ptr == 0) @@ -103,7 +103,7 @@ public IUnmanagedMemory GetUnmanagedMemoryByAddress(nint address) return ptr; } - public nint? GetVTableAddress(string library, string vtableName) + public nint? GetVTableAddress( string library, string vtableName ) { var ptr = NativeMemoryHelpers.GetVirtualTableAddress(library, vtableName); if (ptr == 0) @@ -113,13 +113,29 @@ public IUnmanagedMemory GetUnmanagedMemoryByAddress(nint address) return ptr; } - public nint ResolveXrefAddress(nint xrefAddress) + public nint ResolveXrefAddress( nint xrefAddress ) { var offset = (xrefAddress + 3).Read(); return xrefAddress + 7 + (nint)offset; } - public T ToSchemaClass(nint address) where T : class, ISchemaClass + public string? GetObjectPtrVtableName( nint address ) + { + var result = NativeMemoryHelpers.GetObjectPtrVtableName(address); + return result == string.Empty ? null : result; + } + + public bool ObjectPtrHasVtable( nint address ) + { + return NativeMemoryHelpers.ObjectPtrHasVtable(address); + } + + public bool ObjectPtrHasBaseClass( nint address, string baseClassName ) + { + return NativeMemoryHelpers.ObjectPtrHasBaseClass(address, baseClassName); + } + + public T ToSchemaClass( nint address ) where T : class, ISchemaClass { return T.From(address); } diff --git a/managed/src/SwiftlyS2.Core/Modules/Memory/UnmanagedFunction.cs b/managed/src/SwiftlyS2.Core/Modules/Memory/UnmanagedFunction.cs index 19ecf799e..61b3ade63 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Memory/UnmanagedFunction.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Memory/UnmanagedFunction.cs @@ -6,9 +6,11 @@ namespace SwiftlyS2.Core.Memory; -internal abstract class UnmanagedFunction : NativeHandle, IDisposable { +internal abstract class UnmanagedFunction : NativeHandle, IDisposable +{ - public UnmanagedFunction(nint address) : base(address) { + public UnmanagedFunction( nint address ) : base(address) + { } public Type? DelegateType { get; init; } @@ -16,15 +18,18 @@ public UnmanagedFunction(nint address) : base(address) { public abstract void Dispose(); } -internal class UnmanagedFunction : UnmanagedFunction, IUnmanagedFunction, IDisposable where TDelegate : Delegate { +internal class UnmanagedFunction : UnmanagedFunction, IUnmanagedFunction, IDisposable where TDelegate : Delegate +{ public new nint Address { get; private set; } public TDelegate CallOriginal { get { - if (_HookManager.IsHooked(Address)) { + if (_HookManager.IsHooked(Address)) + { var original = _HookManager.GetOriginal(Address); - if (original != nint.Zero) { + if (original != nint.Zero) + { return Marshal.GetDelegateForFunctionPointer(original); } } @@ -35,12 +40,13 @@ public TDelegate CallOriginal { public TDelegate Call { get; private set; } public List Hooks { get; } = new(); - - private HookManager _HookManager { get; set; } + + private HookManager _HookManager { get; set; } private ILogger> _Logger { get; set; } - public UnmanagedFunction(nint address, HookManager hookManager, ILoggerFactory loggerFactory) : base(address) { + public UnmanagedFunction( nint address, HookManager hookManager, ILoggerFactory loggerFactory ) : base(address) + { _Logger = loggerFactory.CreateLogger>(); _HookManager = hookManager; DelegateType = typeof(TDelegate); @@ -50,28 +56,38 @@ public UnmanagedFunction(nint address, HookManager hookManager, ILoggerFactory l Call = Marshal.GetDelegateForFunctionPointer(address); } - public Guid AddHook(Func, TDelegate> callbackBuilder) { + public Guid AddHook( Func, TDelegate> callbackBuilder ) + { try { - var id = _HookManager.AddHook(Address, (builder) => callbackBuilder(() => Marshal.GetDelegateForFunctionPointer(builder()))); + var id = _HookManager.AddHook(Address, ( builder ) => callbackBuilder(() => Marshal.GetDelegateForFunctionPointer(builder()))); Hooks.Add(id); return id; - } catch (Exception e) { + } + catch (Exception e) + { + if (!GlobalExceptionHandler.Handle(e)) return Guid.Empty; _Logger.LogError(e, "Failed to add hook to function {0}.", Address); return Guid.Empty; } } - public void RemoveHook(Guid id) { - try { + public void RemoveHook( Guid id ) + { + try + { _HookManager.Remove(new List { id }); Hooks.Remove(id); - } catch (Exception e) { + } + catch (Exception e) + { + if (!GlobalExceptionHandler.Handle(e)) return; _Logger.LogError(e, "Failed to remove hook {0} from function {1}.", id, Address); } } - - public override void Dispose() { + + public override void Dispose() + { _HookManager.Remove(Hooks); Hooks.Clear(); } diff --git a/managed/src/SwiftlyS2.Core/Modules/Memory/UnmanagedMemory.cs b/managed/src/SwiftlyS2.Core/Modules/Memory/UnmanagedMemory.cs index 610985158..94b749e41 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Memory/UnmanagedMemory.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Memory/UnmanagedMemory.cs @@ -12,14 +12,14 @@ internal class UnmanagedMemory : NativeHandle, IUnmanagedMemory, IDisposable private ILogger _Logger { get; set; } public List Hooks { get; } = new(); - public UnmanagedMemory(nint address, HookManager hookManager, ILoggerFactory loggerFactory) : base(address) + public UnmanagedMemory( nint address, HookManager hookManager, ILoggerFactory loggerFactory ) : base(address) { Address = address; _HookManager = hookManager; _Logger = loggerFactory.CreateLogger(); } - public Guid AddHook(MidHookDelegate callback) + public Guid AddHook( MidHookDelegate callback ) { try { @@ -29,6 +29,7 @@ public Guid AddHook(MidHookDelegate callback) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return Guid.Empty; _Logger.LogError(e, "Failed to add midhook to function {0}.", Address); return Guid.Empty; } @@ -40,7 +41,7 @@ public void Dispose() Hooks.Clear(); } - public void RemoveHook(Guid id) + public void RemoveHook( Guid id ) { try { @@ -49,6 +50,7 @@ public void RemoveHook(Guid id) } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; _Logger.LogError(e, "Failed to remove midhook {0} from function {1}.", id, Address); } } diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/Menu.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/Menu.cs index b29a385e0..06db71cf7 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Menus/Menu.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/Menu.cs @@ -1,959 +1,960 @@ -using System.Collections.Concurrent; -using System.Text; -using System.Text.RegularExpressions; -using SwiftlyS2.Core.Menu.Options; -using SwiftlyS2.Core.Natives; -using SwiftlyS2.Shared; -using SwiftlyS2.Shared.Menus; -using SwiftlyS2.Shared.Natives; -using SwiftlyS2.Shared.Players; -using SwiftlyS2.Shared.SchemaDefinitions; - -namespace SwiftlyS2.Core.Menus; - -internal partial class Menu : IMenu -{ - public string Title { get; set; } = "Menu"; - - public List Options { get; set; } = new(); - - public IMenu? Parent { get; set; } - public ConcurrentDictionary AutoCloseCancelTokens { get; set; } = new(); - public IMenuButtonOverrides? ButtonOverrides { get; set; } = new MenuButtonOverrides(); - public int MaxVisibleOptions { get; set; } - public bool? ShouldFreeze { get; set; } = false; - public bool? CloseOnSelect { get; set; } = false; - public Color RenderColor { get; set; } = new(255, 255, 255, 255); - - public IMenuManager MenuManager { get; set; } - - public float AutoCloseAfter { get; set; } = 0.0f; - public IMenuBuilder Builder => new MenuBuilder().SetMenu(this); - - public event Action? OnOpen; - public event Action? OnClose; - public event Action? OnMove; - public event Action? OnItemSelected; - public event Action? OnItemHovered; - public event Action? BeforeRender; - public event Action? AfterRender; - - private ConcurrentDictionary RenderedText { get; set; } = new(); - private ConcurrentDictionary SelectedIndex { get; set; } = new(); - private List PlayersWithMenuOpen { get; set; } = new(); - private ConcurrentDictionary ScrollOffsets { get; set; } = new(); - private ConcurrentDictionary ScrollCallCounts { get; set; } = new(); - private ConcurrentDictionary ScrollPauseCounts { get; set; } = new(); - internal ISwiftlyCore _Core { get; set; } - public bool HasSound { get; set; } = true; - public bool RenderOntick { get; set; } = false; - private bool Initialized { get; set; } = false; - public MenuVerticalScrollStyle VerticalScrollStyle { get; set; } = MenuVerticalScrollStyle.CenterFixed; - public MenuHorizontalStyle? HorizontalStyle { get; set; } = null; - public bool RequiresTickRendering => RenderOntick || - HorizontalStyle?.OverflowStyle == MenuHorizontalOverflowStyle.ScrollLeftFade || - HorizontalStyle?.OverflowStyle == MenuHorizontalOverflowStyle.ScrollRightFade || - HorizontalStyle?.OverflowStyle == MenuHorizontalOverflowStyle.ScrollLeftLoop || - HorizontalStyle?.OverflowStyle == MenuHorizontalOverflowStyle.ScrollRightLoop || - Options.Any(opt => - opt.OverflowStyle?.OverflowStyle == MenuHorizontalOverflowStyle.ScrollLeftFade || - opt.OverflowStyle?.OverflowStyle == MenuHorizontalOverflowStyle.ScrollRightFade || - opt.OverflowStyle?.OverflowStyle == MenuHorizontalOverflowStyle.ScrollLeftLoop || - opt.OverflowStyle?.OverflowStyle == MenuHorizontalOverflowStyle.ScrollRightLoop); - - public void Close( IPlayer player ) - { - NativePlayer.ClearCenterMenuRender(player.PlayerID); - OnClose?.Invoke(player); - if (ShouldFreeze == true) SetFreezeState(player, false); - - PlayersWithMenuOpen.Remove(player); - - if (Initialized && PlayersWithMenuOpen.Count == 0 && RequiresTickRendering) - { - Initialized = false; - _Core.Event.OnTick -= OnTickRender; - } - - ScrollOffsets.Clear(); - ScrollCallCounts.Clear(); - ScrollPauseCounts.Clear(); - } - - public void MoveSelection( IPlayer player, int offset ) - { - if (!SelectedIndex.ContainsKey(player)) - { - SelectedIndex[player] = 0; - } - - SelectedIndex[player] += offset; - if (SelectedIndex[player] < 0) SelectedIndex[player] = -SelectedIndex[player] % Options.Count; - if (SelectedIndex[player] >= Options.Count) SelectedIndex[player] %= Options.Count; - - while (!Options[SelectedIndex[player]].CanInteract(player)) - { - SelectedIndex[player]++; - if (SelectedIndex[player] < 0) SelectedIndex[player] = -SelectedIndex[player] % Options.Count; - if (SelectedIndex[player] >= Options.Count) SelectedIndex[player] %= Options.Count; - } - - if (SelectedIndex[player] < 0) SelectedIndex[player] = -SelectedIndex[player] % Options.Count; - if (SelectedIndex[player] >= Options.Count) SelectedIndex[player] %= Options.Count; - - OnMove?.Invoke(player); - OnItemHovered?.Invoke(player, Options[SelectedIndex[player]]); - - Rerender(player, false); - } - - public void Rerender( IPlayer player, bool updateHorizontalStyle = false ) - { - BeforeRender?.Invoke(player); - - var visibleOptions = Options.Where(option => option.ShouldShow(player)).ToList(); - - var maxVisibleOptions = MaxVisibleOptions; - var totalOptions = visibleOptions.Count; - - if (SelectedIndex[player] < 0 && totalOptions > 0) - { - for (int i = 0; i < totalOptions; i++) - { - if (IsOptionSelectable(visibleOptions[i])) - { - SelectedIndex[player] = i; - break; - } - } - } - - var html = new StringBuilder(); - - html.Append($"{Title}"); - - if (totalOptions > maxVisibleOptions) - { - html.Append($" [{SelectedIndex[player] + 1}/{totalOptions}]"); - } - - html.Append("
"); - - if (totalOptions > 0) - { - if (totalOptions > maxVisibleOptions) - { - var selectedIdx = SelectedIndex[player]; - var halfVisible = maxVisibleOptions / 2; - - var (startIndex, arrowPosition) = VerticalScrollStyle switch { - MenuVerticalScrollStyle.WaitingCenter when selectedIdx < halfVisible - => (0, selectedIdx), // WaitingCenter: (Near top) start from 0, arrow at selected - MenuVerticalScrollStyle.WaitingCenter when selectedIdx >= totalOptions - halfVisible - => (totalOptions - maxVisibleOptions, maxVisibleOptions - (totalOptions - selectedIdx)), // WaitingCenter: (Near bottom) start from end-visible, arrow at bottom area - MenuVerticalScrollStyle.WaitingCenter - => (selectedIdx - halfVisible, halfVisible), // WaitingCenter: (Middle) start from selected-half, arrow at center - - MenuVerticalScrollStyle.LinearScroll when maxVisibleOptions == 1 - => (selectedIdx, 0), // LinearScroll: single visible, start from selected, arrow at top - - MenuVerticalScrollStyle.LinearScroll when selectedIdx < maxVisibleOptions - 1 - => (0, selectedIdx), // LinearScroll: (Near top) start from 0, arrow at selected - MenuVerticalScrollStyle.LinearScroll when selectedIdx >= totalOptions - (maxVisibleOptions - 1) - => (totalOptions - maxVisibleOptions, maxVisibleOptions - (totalOptions - selectedIdx)), // LinearScroll: (Near bottom) start from end-visible, arrow at bottom area - MenuVerticalScrollStyle.LinearScroll - => (selectedIdx - (maxVisibleOptions - 1), maxVisibleOptions - 1), // LinearScroll: (Middle) start from selected-visible+1, arrow at bottom - - _ - => (-1, halfVisible) // CenterFixed: no scroll, arrow at middle - }; - - for (int i = 0; i < maxVisibleOptions; i++) - { - var (actualIndex, isSelected) = VerticalScrollStyle == MenuVerticalScrollStyle.CenterFixed - ? ((selectedIdx + i - halfVisible + totalOptions) % totalOptions, i == halfVisible) // CenterFixed: circular wrap, arrow at center - : (startIndex + i, i == arrowPosition); // WaitingCenter / LinearScroll: linear offset, arrow at position - - var option = visibleOptions[actualIndex]; - var arrowSizeClass = MenuSizeHelper.GetSizeClass(option.GetTextSize()); - - if (isSelected) - { - html.Append($"{MenuManager.Settings.NavigationPrefix} "); - } - else - { - html.Append("\u00A0\u00A0\u00A0 "); - } - - html.Append(option.GetDisplayText(player, updateHorizontalStyle)); - - html.Append("
"); - } - } - else - { - for (int i = 0; i < totalOptions; i++) - { - var option = visibleOptions[i]; - var isSelected = i == SelectedIndex[player]; - var arrowSizeClass = MenuSizeHelper.GetSizeClass(option.GetTextSize()); - - if (isSelected) - { - html.Append($"{MenuManager.Settings.NavigationPrefix} "); - } - else - { - html.Append("\u00A0\u00A0\u00A0 "); - } - - html.Append(option.GetDisplayText(player, updateHorizontalStyle)); - - html.Append("
"); - } - } - } - - html.Append("
"); - - html.Append(BuildFooter()); - - html.Append("
"); - - RenderedText[player] = html.ToString(); - - NativePlayer.SetCenterMenuRender(player.PlayerID, RenderedText[player]); - - AfterRender?.Invoke(player); - } - - private string BuildFooter() - { - var isWasd = MenuManager.Settings.InputMode == "wasd"; - - var selectDisplay = isWasd ? "D" : (ButtonOverrides?.Select?.ToString() ?? MenuManager.Settings.ButtonsUse).ToUpper(); - var scrollDisplay = isWasd ? "W/S" : (ButtonOverrides?.Move, ButtonOverrides?.MoveBack) switch { - (not null, not null) => $"{ButtonOverrides.Move}/{ButtonOverrides.MoveBack}", - _ => MenuManager.Settings.ButtonsScroll.ToUpper() - }; - var exitDisplay = isWasd ? "A" : (ButtonOverrides?.Exit?.ToString() ?? MenuManager.Settings.ButtonsExit).ToUpper(); - - return new StringBuilder("") - .Append($"Move: {scrollDisplay}") - .Append($" | Use: {selectDisplay}") - .Append($" | Exit: {exitDisplay}") - .Append("
") - .ToString(); - } - - private void OnTickRender() - { - foreach (var player in PlayersWithMenuOpen) - { - Rerender(player, true); - } - } - - public void Show( IPlayer player ) - { - if (!SelectedIndex.TryAdd(player, 0)) - { - SelectedIndex[player] = 0; - } - - if (!PlayersWithMenuOpen.Contains(player)) - { - PlayersWithMenuOpen.Add(player); - } - - if (!Initialized && RequiresTickRendering) - { - Initialized = true; - _Core.Event.OnTick += OnTickRender; - } - - Rerender(player, true); - OnOpen?.Invoke(player); - if (ShouldFreeze == true) SetFreezeState(player, true); - - if (AutoCloseAfter != 0f) - { - AutoCloseCancelTokens[player] = _Core.Scheduler.DelayBySeconds(AutoCloseAfter, () => - { - Close(player); - }); - } - - ScrollOffsets.Clear(); - ScrollCallCounts.Clear(); - ScrollPauseCounts.Clear(); - } - - public void UseSelection( IPlayer player ) - { - var selectedOption = Options[SelectedIndex[player]]; - OnItemSelected?.Invoke(player, selectedOption); - - switch (selectedOption) - { - case ButtonMenuOption buttonOption: - { - if (buttonOption.ValidationCheck != null && !buttonOption.ValidationCheck(player)) - { - buttonOption.OnValidationFailed?.Invoke(player); - } - buttonOption.OnClick?.Invoke(player); - buttonOption.OnClickWithOption?.Invoke(player, buttonOption); - if (buttonOption.CloseOnSelect) - { - MenuManager.CloseMenuForPlayer(player); - } - break; - } - case AsyncButtonMenuOption asyncButton: - { - if (asyncButton.ValidationCheck != null && !asyncButton.ValidationCheck(player)) - { - asyncButton.OnValidationFailed?.Invoke(player); - } - asyncButton.IsLoading = true; - asyncButton.SetLoadingText("Processing..."); - Rerender(player, true); - var closeAfter = asyncButton.CloseOnSelect; - _ = Task.Run(async () => - { - try - { - await asyncButton.ExecuteAsync(player, "Processing..."); - } - finally - { - asyncButton.IsLoading = false; - Rerender(player, true); - - if (closeAfter && player.IsValid) - { - MenuManager.CloseMenuForPlayer(player); - } - } - }); - break; - } - case ToggleMenuOption toggle: - { - toggle.Toggle(player); - if (toggle.CloseOnSelect) - { - MenuManager.CloseMenuForPlayer(player); - } - else - { - Rerender(player, true); - } - break; - } - - case SubmenuMenuOption submenu: - _ = Task.Run(async () => - { - var subMenu = await submenu.GetSubmenuAsync(); - if (subMenu != null && player.IsValid && MenuManager.GetMenu(player) == this) - { - subMenu.Parent = this; - MenuManager.OpenMenu(player, subMenu); - } - }); - break; - default: - break; - } - } - - public void UseSlideOption( IPlayer player, bool isRight ) - { - var selectedOption = Options[SelectedIndex[player]]; - - switch (selectedOption) - { - case SliderMenuButton slider: - if (isRight) slider.Increase(player); - else slider.Decrease(player); - break; - - case ChoiceMenuOption choice: - if (isRight) choice.Next(player); - else choice.Previous(player); - break; - } - - Rerender(player, false); - } - - [Obsolete("Use GetCurrentOption instead")] - public bool IsOptionSlider( IPlayer player ) - { - return Options[SelectedIndex[player]] is SliderMenuButton || Options[SelectedIndex[player]] is ChoiceMenuOption; - } - - [Obsolete("Use GetCurrentOption instead")] - public bool IsCurrentOptionSelectable( IPlayer player ) - { - return IsOptionSelectable(Options[SelectedIndex[player]]); - } - - public IOption? GetCurrentOption( IPlayer player ) - { - return !SelectedIndex.TryGetValue(player, out var index) || index < 0 || index >= Options.Count ? null : Options[index]; - } - - public bool IsOptionSelectable( IOption option ) - { - return option is ButtonMenuOption || - option is ToggleMenuOption || - option is SliderMenuButton || - option is SubmenuMenuOption || - option is AsyncButtonMenuOption || - (option is DynamicMenuOption dynamic && dynamic.CanInteract(null!)); - } - - public void SetFreezeState( IPlayer player, bool freeze ) - { - if (!player.IsValid || player.IsFakeClient) return; - - var pawn = player.PlayerPawn; - if (pawn == null || !pawn.IsValid) return; - - var moveType = freeze ? MoveType_t.MOVETYPE_NONE : MoveType_t.MOVETYPE_WALK; - pawn.MoveType = moveType; - pawn.ActualMoveType = moveType; - pawn.MoveTypeUpdated(); - } - - internal string ApplyHorizontalStyle( string text, MenuHorizontalStyle? overflowStyle = null, bool updateHorizontalStyle = false ) - { - var activeStyle = overflowStyle ?? HorizontalStyle; - - if (activeStyle == null || string.IsNullOrEmpty(text)) - { - return text; - } - - var plainText = StripHtmlTags(text); - if (Helper.EstimateTextWidth(plainText) <= activeStyle.Value.MaxWidth) - { - return text; - } - - return activeStyle.Value.OverflowStyle switch { - MenuHorizontalOverflowStyle.TruncateEnd => TruncateTextEnd(text, activeStyle.Value.MaxWidth), - MenuHorizontalOverflowStyle.TruncateBothEnds => TruncateTextBothEnds(text, activeStyle.Value.MaxWidth), - MenuHorizontalOverflowStyle.ScrollLeftFade => ScrollTextWithFade(updateHorizontalStyle, text, activeStyle.Value.MaxWidth, true, activeStyle), - MenuHorizontalOverflowStyle.ScrollRightFade => ScrollTextWithFade(updateHorizontalStyle, text, activeStyle.Value.MaxWidth, false, activeStyle), - MenuHorizontalOverflowStyle.ScrollLeftLoop => ScrollTextWithLoop(updateHorizontalStyle, $"{text.TrimEnd()} ", activeStyle.Value.MaxWidth, true, activeStyle), - MenuHorizontalOverflowStyle.ScrollRightLoop => ScrollTextWithLoop(updateHorizontalStyle, $" {text.TrimStart()}", activeStyle.Value.MaxWidth, false, activeStyle), - _ => text - }; - } - - private string ScrollTextWithFade( bool updateHorizontalStyle, string text, float maxWidth, bool scrollLeft, MenuHorizontalStyle? style = null ) - { - // Prepare scroll data and validate - var (plainChars, segments, targetCharCount) = PrepareScrollData(text, maxWidth); - if (plainChars is null) - { - return text; - } - if (targetCharCount == 0) - { - return string.Empty; - } - - // Update scroll offset (allow scrolling beyond end for complete fade-out) - var offset = UpdateScrollOffset(updateHorizontalStyle, StripHtmlTags(text), scrollLeft, plainChars.Length + 1, style); - - // Calculate visible character range - var (skipStart, skipEnd) = scrollLeft - ? (offset, Math.Max(0, plainChars.Length - offset - targetCharCount)) - : (Math.Max(0, plainChars.Length - targetCharCount - offset), offset); - - // Build output with proper HTML tag tracking - StringBuilder result = new(); - List outputTags = [], activeTags = []; - var (charIdx, started) = (0, false); - - foreach (var (content, isTag) in segments) - { - if (isTag) - { - // Track active opening and closing tags - UpdateTagState(content, activeTags); - - // Output tags within visible window - if (started) - { - result.Append(content); - ProcessOpenTag(content, outputTags); - } - } - else - { - // Process characters within scroll window - foreach (var ch in content) - { - if (charIdx >= skipStart && charIdx < plainChars.Length - skipEnd) - { - // Apply active tags at start of output - if (!started) - { - started = true; - activeTags.ForEach(tag => { result.Append(tag); ProcessOpenTag(tag, outputTags); }); - } - result.Append(ch); - } - charIdx++; - } - } - } - - CloseOpenTags(result, outputTags); - return result.ToString(); - } - - private string ScrollTextWithLoop( bool updateHorizontalStyle, string text, float maxWidth, bool scrollLeft, MenuHorizontalStyle? style = null ) - { - // Prepare scroll data and validate - var (plainChars, segments, targetCharCount) = PrepareScrollData(text, maxWidth); - if (plainChars is null) - { - return text; - } - if (targetCharCount == 0) - { - return string.Empty; - } - - // Update scroll offset for circular wrapping - var offset = UpdateScrollOffset(updateHorizontalStyle, StripHtmlTags(text), scrollLeft, plainChars.Length, style); - - // Build character-to-tags mapping for circular access - Dictionary> charToActiveTags = []; - List currentActiveTags = []; - var currentCharIdx = 0; - - foreach (var (content, isTag) in segments) - { - if (isTag) - { - // Track active opening and closing tags - UpdateTagState(content, currentActiveTags); - } - else - { - // Map each character to its active tags - foreach (var ch in content) - { - charToActiveTags[currentCharIdx] = [.. currentActiveTags]; - currentCharIdx++; - } - } - } - - // Build output in circular order with dynamic tag management - StringBuilder result = new(); - List outputTags = []; - List? previousTags = null; - - for (int i = 0; i < targetCharCount; i++) - { - // Calculate circular character index - var charIndex = scrollLeft - ? (offset + i) % plainChars.Length - : (plainChars.Length - offset + i) % plainChars.Length; - var currentTags = charToActiveTags.GetValueOrDefault(charIndex, []); - - // Close tags that are no longer active - if (previousTags is not null) - { - for (int j = previousTags.Count - 1; j >= 0; j--) - { - if (!currentTags.Contains(previousTags[j])) - { - var prevTagName = previousTags[j][1..^1].Split(' ')[0]; - result.Append($""); - var idx = outputTags.FindLastIndex(t => t.Equals(prevTagName, StringComparison.OrdinalIgnoreCase)); - if (idx >= 0) - { - outputTags.RemoveAt(idx); - } - } - } - } - - // Open new tags that are now active - foreach (var tag in currentTags) - { - if (previousTags is null || !previousTags.Contains(tag)) - { - result.Append(tag); - var tagName = tag[1..^1].Split(' ')[0]; - outputTags.Add(tagName); - } - } - - result.Append(plainChars[charIndex]); - previousTags = currentTags; - } - - CloseOpenTags(result, outputTags); - return result.ToString(); - } - - private static string TruncateTextEnd( string text, float maxWidth, string suffix = "..." ) - { - // Reserve space for suffix - var targetWidth = maxWidth - Helper.EstimateTextWidth(suffix); - if (targetWidth <= 0) - { - return suffix; - } - - var segments = ParseHtmlSegments(text); - StringBuilder result = new(); - List openTags = []; - var (currentWidth, reachedLimit) = (0f, false); - - foreach (var (content, isTag) in segments) - { - switch (isTag, reachedLimit) - { - // Preserve HTML tags before reaching limit - case (true, false): - result.Append(content); - ProcessOpenTag(content, openTags); - break; - - // Process plain text characters until width limit - case (false, false): - foreach (var ch in content) - { - var charWidth = Helper.GetCharWidth(ch); - if (currentWidth + charWidth > targetWidth) - { - reachedLimit = true; - break; - } - result.Append(ch); - currentWidth += charWidth; - } - break; - } - } - - if (reachedLimit) - { - result.Append(suffix); - } - - CloseOpenTags(result, openTags); - return result.ToString(); - } - - private static string TruncateTextBothEnds( string text, float maxWidth ) - { - if (string.IsNullOrEmpty(text)) - { - return text; - } - - // Check if text fits without truncation - var plainText = StripHtmlTags(text); - if (Helper.EstimateTextWidth(plainText) <= maxWidth) - { - return text; - } - - // Extract all plain text characters from segments - var segments = ParseHtmlSegments(text); - var plainChars = segments - .Where(s => !s.IsTag) - .SelectMany(s => s.Content) - .ToArray(); - - if (plainChars.Length == 0) - { - return text; - } - - // Calculate how many characters can fit - var targetCharCount = CalculateTargetCharCount(plainChars, maxWidth); - if (targetCharCount == 0) - { - return string.Empty; - } - - // Calculate range to keep from middle - var skipFromStart = Math.Max(0, (plainChars.Length - targetCharCount) / 2); - var skipFromEnd = plainChars.Length - skipFromStart - targetCharCount; - - StringBuilder result = new(); - List outputOpenTags = []; - List pendingOpenTags = []; - var (plainCharIndex, hasStartedOutput) = (0, false); - - foreach (var (content, isTag) in segments) - { - switch (isTag, hasStartedOutput) - { - // Process tags after output has started - case (true, true): - result.Append(content); - ProcessOpenTag(content, outputOpenTags); - break; - - // Queue opening tags before output starts - case (true, false) when !content.StartsWith(""): - pendingOpenTags.Add(content); - break; - - // Process plain text, keeping only middle portion - case (false, _): - foreach (var ch in content) - { - if (plainCharIndex >= skipFromStart && plainCharIndex < plainChars.Length - skipFromEnd) - { - // Start output and apply pending tags - if (!hasStartedOutput) - { - hasStartedOutput = true; - pendingOpenTags.ForEach(tag => - { - result.Append(tag); - ProcessOpenTag(tag, outputOpenTags); - }); - } - result.Append(ch); - } - plainCharIndex++; - } - break; - } - } - - CloseOpenTags(result, outputOpenTags); - return result.ToString(); - } -} - -internal partial class Menu -{ - [GeneratedRegex("<.*?>")] - private static partial Regex HtmlTagRegex(); - - /// - /// Removes all HTML tags from the given text. - /// - /// The text containing HTML tags. - /// The text with all HTML tags removed. - private static string StripHtmlTags( string text ) - { - if (string.IsNullOrEmpty(text)) - { - return text; - } - - return HtmlTagRegex().Replace(text, string.Empty); - } - - /// - /// Parses text into segments, separating HTML tags from plain text content. - /// - /// The text to parse. - /// A list of segments where each segment is either a tag or plain text content. - private static List<(string Content, bool IsTag)> ParseHtmlSegments( string text ) - { - var tagMatches = HtmlTagRegex().Matches(text); - if (tagMatches.Count == 0) - { - return [(text, false)]; - } - - List<(string Content, bool IsTag)> segments = []; - var currentIndex = 0; - - foreach (Match match in tagMatches) - { - if (match.Index > currentIndex) - { - segments.Add((text[currentIndex..match.Index], false)); - } - segments.Add((match.Value, true)); - currentIndex = match.Index + match.Length; - } - - if (currentIndex < text.Length) - { - segments.Add((text[currentIndex..], false)); - } - - return segments; - } - - /// - /// Processes an HTML tag and updates the list of currently open tags. - /// Adds opening tags to the list and removes matching closing tags. - /// - /// The HTML tag to process. - /// The list of currently open tag names. - private static void ProcessOpenTag( string tag, List openTags ) - { - var tagName = tag switch { - ['<', '/', .. var rest] => new string(rest).TrimEnd('>').Split(' ', 2)[0], - ['<', '!', ..] => null, - [.. var chars] when chars[^1] == '/' && chars[^2] == '>' => null, - ['<', .. var rest] => new string(rest).TrimEnd('>').Split(' ', 2)[0], - _ => null - }; - - if (tagName is null) - { - return; - } - - if (tag.StartsWith(" t.Equals(tagName, StringComparison.OrdinalIgnoreCase)); - if (index >= 0) openTags.RemoveAt(index); - } - else - { - openTags.Add(tagName); - } - } - - /// - /// Appends closing tags for all currently open tags in reverse order. - /// - /// The StringBuilder to append closing tags to. - /// The list of currently open tag names. - private static void CloseOpenTags( StringBuilder result, List openTags ) - { - openTags.AsEnumerable().Reverse().ToList().ForEach(tag => result.Append($"")); - } - - /// - /// Calculates how many characters can fit within the specified width. - /// - /// The characters to measure. - /// The maximum width allowed. - /// The number of characters that fit within the width. - private static int CalculateTargetCharCount( ReadOnlySpan plainChars, float maxWidth ) - { - var currentWidth = 0f; - var count = 0; - - foreach (var ch in plainChars) - { - var charWidth = Helper.GetCharWidth(ch); - if (currentWidth + charWidth > maxWidth) break; - currentWidth += charWidth; - count++; - } - - return count; - } - - /// - /// Updates and returns the scroll offset for the given text. - /// The offset increments based on tick count and wraps around at the specified length. - /// - /// Whether to update the horizontal style. - /// The plain text being scrolled. - /// Whether scrolling left or right. - /// The length at which the offset wraps around. - /// Optional horizontal style settings. - /// The current scroll offset. - private int UpdateScrollOffset( bool updateHorizontalStyle, string plainText, bool scrollLeft, int wrapLength, MenuHorizontalStyle? style ) - { - var key = $"{plainText}_{scrollLeft}"; - ScrollOffsets.TryAdd(key, 0); - ScrollCallCounts.TryAdd(key, 0); - ScrollPauseCounts.TryAdd(key, 0); - - var ticksPerScroll = style?.TicksPerScroll ?? HorizontalStyle?.TicksPerScroll ?? 16; - var pauseTicks = style?.PauseTicks ?? HorizontalStyle?.PauseTicks ?? 0; - - // If currently pausing, decrement pause counter and maintain current offset - if (ScrollPauseCounts[key] > 0) - { - ScrollPauseCounts[key]--; - return ScrollOffsets[key]; - } - - // Increment call count and scroll when threshold is reached - if (updateHorizontalStyle && ++ScrollCallCounts[key] >= ticksPerScroll) - { - ScrollCallCounts[key] = 0; - var newOffset = (ScrollOffsets[key] + 1) % wrapLength; - - // When completing a full loop (offset returns to 0), start pause if configured - if (newOffset == 0 && pauseTicks > 0) - { - ScrollPauseCounts[key] = pauseTicks; - } - - ScrollOffsets[key] = newOffset; - } - - return ScrollOffsets[key]; - } - - /// - /// Updates the list of active tags based on the given HTML tag content. - /// Adds opening tags and removes matching closing tags. - /// - /// The HTML tag content to process. - /// The list of currently active tags. - private static void UpdateTagState( string content, List activeTags ) - { - if (!content.StartsWith("")) - { - activeTags.Add(content); - } - else if (content.StartsWith(" t[1..^1].Split(' ')[0].Equals(tagName, StringComparison.OrdinalIgnoreCase)); - if (index >= 0) - { - activeTags.RemoveAt(index); - } - } - } - - /// - /// Prepares data required for text scrolling by extracting plain characters and parsing segments. - /// - /// The text to prepare for scrolling. - /// The maximum width available for display. - /// A tuple containing plain characters array, HTML segments, and target character count. - private static (char[]? PlainChars, List<(string Content, bool IsTag)> Segments, int TargetCharCount) PrepareScrollData( string text, float maxWidth ) - { - var plainText = StripHtmlTags(text); - if (Helper.EstimateTextWidth(plainText) <= maxWidth) - { - return (null, [], 0); - } - - var segments = ParseHtmlSegments(text); - var plainChars = segments.Where(s => !s.IsTag).SelectMany(s => s.Content).ToArray(); - - if (plainChars.Length == 0) - { - return (null, segments, 0); - } - - var targetCharCount = CalculateTargetCharCount(plainChars, maxWidth); - return (plainChars, segments, targetCharCount); - } -} \ No newline at end of file +// using System.Collections.Concurrent; +// using System.Text; +// using System.Text.RegularExpressions; +// using SwiftlyS2.Core.Menu.Options; +// using SwiftlyS2.Core.Natives; +// using SwiftlyS2.Shared; +// using SwiftlyS2.Shared.Menus; +// using SwiftlyS2.Shared.Natives; +// using SwiftlyS2.Shared.Players; +// using SwiftlyS2.Shared.SchemaDefinitions; + +// namespace SwiftlyS2.Core.Menus; + +// [Obsolete("Menu will be deprecared at the release of SwiftlyS2. Please use MenuAPI instead")] +// internal partial class Menu : IMenu +// { +// public string Title { get; set; } = "Menu"; + +// public List Options { get; set; } = new(); + +// public IMenu? Parent { get; set; } +// public ConcurrentDictionary AutoCloseCancelTokens { get; set; } = new(); +// public IMenuButtonOverrides? ButtonOverrides { get; set; } = new MenuButtonOverrides(); +// public int MaxVisibleOptions { get; set; } +// public bool? ShouldFreeze { get; set; } = false; +// public bool? CloseOnSelect { get; set; } = false; +// public Color RenderColor { get; set; } = new(255, 255, 255, 255); + +// public IMenuManager MenuManager { get; set; } + +// public float AutoCloseAfter { get; set; } = 0.0f; +// public IMenuBuilder Builder => new MenuBuilder().SetMenu(this); + +// public event Action? OnOpen; +// public event Action? OnClose; +// public event Action? OnMove; +// public event Action? OnItemSelected; +// public event Action? OnItemHovered; +// public event Action? BeforeRender; +// public event Action? AfterRender; + +// private ConcurrentDictionary RenderedText { get; set; } = new(); +// private ConcurrentDictionary SelectedIndex { get; set; } = new(); +// private List PlayersWithMenuOpen { get; set; } = new(); +// private ConcurrentDictionary ScrollOffsets { get; set; } = new(); +// private ConcurrentDictionary ScrollCallCounts { get; set; } = new(); +// private ConcurrentDictionary ScrollPauseCounts { get; set; } = new(); +// internal ISwiftlyCore _Core { get; set; } +// public bool HasSound { get; set; } = true; +// public bool RenderOntick { get; set; } = false; +// private bool Initialized { get; set; } = false; +// public MenuVerticalScrollStyle VerticalScrollStyle { get; set; } = MenuVerticalScrollStyle.CenterFixed; +// public MenuHorizontalStyle? HorizontalStyle { get; set; } = null; +// public bool RequiresTickRendering => RenderOntick || +// HorizontalStyle?.OverflowStyle == MenuHorizontalOverflowStyle.ScrollLeftFade || +// HorizontalStyle?.OverflowStyle == MenuHorizontalOverflowStyle.ScrollRightFade || +// HorizontalStyle?.OverflowStyle == MenuHorizontalOverflowStyle.ScrollLeftLoop || +// HorizontalStyle?.OverflowStyle == MenuHorizontalOverflowStyle.ScrollRightLoop || +// Options.Any(opt => +// opt.OverflowStyle?.OverflowStyle == MenuHorizontalOverflowStyle.ScrollLeftFade || +// opt.OverflowStyle?.OverflowStyle == MenuHorizontalOverflowStyle.ScrollRightFade || +// opt.OverflowStyle?.OverflowStyle == MenuHorizontalOverflowStyle.ScrollLeftLoop || +// opt.OverflowStyle?.OverflowStyle == MenuHorizontalOverflowStyle.ScrollRightLoop); + +// public void Close( IPlayer player ) +// { +// NativePlayer.ClearCenterMenuRender(player.PlayerID); +// OnClose?.Invoke(player); +// if (ShouldFreeze == true) SetFreezeState(player, false); + +// PlayersWithMenuOpen.Remove(player); + +// if (Initialized && PlayersWithMenuOpen.Count == 0 && RequiresTickRendering) +// { +// Initialized = false; +// _Core.Event.OnTick -= OnTickRender; +// } + +// ScrollOffsets.Clear(); +// ScrollCallCounts.Clear(); +// ScrollPauseCounts.Clear(); +// } + +// public void MoveSelection( IPlayer player, int offset ) +// { +// if (!SelectedIndex.ContainsKey(player)) +// { +// SelectedIndex[player] = 0; +// } + +// SelectedIndex[player] += offset; +// if (SelectedIndex[player] < 0) SelectedIndex[player] = -SelectedIndex[player] % Options.Count; +// if (SelectedIndex[player] >= Options.Count) SelectedIndex[player] %= Options.Count; + +// while (!Options[SelectedIndex[player]].CanInteract(player)) +// { +// SelectedIndex[player]++; +// if (SelectedIndex[player] < 0) SelectedIndex[player] = -SelectedIndex[player] % Options.Count; +// if (SelectedIndex[player] >= Options.Count) SelectedIndex[player] %= Options.Count; +// } + +// if (SelectedIndex[player] < 0) SelectedIndex[player] = -SelectedIndex[player] % Options.Count; +// if (SelectedIndex[player] >= Options.Count) SelectedIndex[player] %= Options.Count; + +// OnMove?.Invoke(player); +// OnItemHovered?.Invoke(player, Options[SelectedIndex[player]]); + +// Rerender(player, false); +// } + +// public void Rerender( IPlayer player, bool updateHorizontalStyle = false ) +// { +// BeforeRender?.Invoke(player); + +// var visibleOptions = Options.Where(option => option.ShouldShow(player)).ToList(); + +// var maxVisibleOptions = MaxVisibleOptions; +// var totalOptions = visibleOptions.Count; + +// if (SelectedIndex[player] < 0 && totalOptions > 0) +// { +// for (int i = 0; i < totalOptions; i++) +// { +// if (IsOptionSelectable(visibleOptions[i])) +// { +// SelectedIndex[player] = i; +// break; +// } +// } +// } + +// var html = new StringBuilder(); + +// html.Append($"{Title}"); + +// if (totalOptions > maxVisibleOptions) +// { +// html.Append($" [{SelectedIndex[player] + 1}/{totalOptions}]"); +// } + +// html.Append("
"); + +// if (totalOptions > 0) +// { +// if (totalOptions > maxVisibleOptions) +// { +// var selectedIdx = SelectedIndex[player]; +// var halfVisible = maxVisibleOptions / 2; + +// var (startIndex, arrowPosition) = VerticalScrollStyle switch { +// MenuVerticalScrollStyle.WaitingCenter when selectedIdx < halfVisible +// => (0, selectedIdx), // WaitingCenter: (Near top) start from 0, arrow at selected +// MenuVerticalScrollStyle.WaitingCenter when selectedIdx >= totalOptions - halfVisible +// => (totalOptions - maxVisibleOptions, maxVisibleOptions - (totalOptions - selectedIdx)), // WaitingCenter: (Near bottom) start from end-visible, arrow at bottom area +// MenuVerticalScrollStyle.WaitingCenter +// => (selectedIdx - halfVisible, halfVisible), // WaitingCenter: (Middle) start from selected-half, arrow at center + +// MenuVerticalScrollStyle.LinearScroll when maxVisibleOptions == 1 +// => (selectedIdx, 0), // LinearScroll: single visible, start from selected, arrow at top + +// MenuVerticalScrollStyle.LinearScroll when selectedIdx < maxVisibleOptions - 1 +// => (0, selectedIdx), // LinearScroll: (Near top) start from 0, arrow at selected +// MenuVerticalScrollStyle.LinearScroll when selectedIdx >= totalOptions - (maxVisibleOptions - 1) +// => (totalOptions - maxVisibleOptions, maxVisibleOptions - (totalOptions - selectedIdx)), // LinearScroll: (Near bottom) start from end-visible, arrow at bottom area +// MenuVerticalScrollStyle.LinearScroll +// => (selectedIdx - (maxVisibleOptions - 1), maxVisibleOptions - 1), // LinearScroll: (Middle) start from selected-visible+1, arrow at bottom + +// _ +// => (-1, halfVisible) // CenterFixed: no scroll, arrow at middle +// }; + +// for (int i = 0; i < maxVisibleOptions; i++) +// { +// var (actualIndex, isSelected) = VerticalScrollStyle == MenuVerticalScrollStyle.CenterFixed +// ? ((selectedIdx + i - halfVisible + totalOptions) % totalOptions, i == halfVisible) // CenterFixed: circular wrap, arrow at center +// : (startIndex + i, i == arrowPosition); // WaitingCenter / LinearScroll: linear offset, arrow at position + +// var option = visibleOptions[actualIndex]; +// var arrowSizeClass = MenuSizeHelper.GetSizeClass(option.GetTextSize()); + +// if (isSelected) +// { +// html.Append($"{MenuManager.Settings.NavigationPrefix} "); +// } +// else +// { +// html.Append("\u00A0\u00A0\u00A0 "); +// } + +// html.Append(option.GetDisplayText(player, updateHorizontalStyle)); + +// html.Append("
"); +// } +// } +// else +// { +// for (int i = 0; i < totalOptions; i++) +// { +// var option = visibleOptions[i]; +// var isSelected = i == SelectedIndex[player]; +// var arrowSizeClass = MenuSizeHelper.GetSizeClass(option.GetTextSize()); + +// if (isSelected) +// { +// html.Append($"{MenuManager.Settings.NavigationPrefix} "); +// } +// else +// { +// html.Append("\u00A0\u00A0\u00A0 "); +// } + +// html.Append(option.GetDisplayText(player, updateHorizontalStyle)); + +// html.Append("
"); +// } +// } +// } + +// html.Append("
"); + +// html.Append(BuildFooter()); + +// html.Append("
"); + +// RenderedText[player] = html.ToString(); + +// NativePlayer.SetCenterMenuRender(player.PlayerID, RenderedText[player]); + +// AfterRender?.Invoke(player); +// } + +// private string BuildFooter() +// { +// var isWasd = MenuManager.Settings.InputMode == "wasd"; + +// var selectDisplay = isWasd ? "D" : (ButtonOverrides?.Select?.ToString() ?? MenuManager.Settings.ButtonsUse).ToUpper(); +// var scrollDisplay = isWasd ? "W/S" : (ButtonOverrides?.Move, ButtonOverrides?.MoveBack) switch { +// (not null, not null) => $"{ButtonOverrides.Move}/{ButtonOverrides.MoveBack}", +// _ => MenuManager.Settings.ButtonsScroll.ToUpper() +// }; +// var exitDisplay = isWasd ? "A" : (ButtonOverrides?.Exit?.ToString() ?? MenuManager.Settings.ButtonsExit).ToUpper(); + +// return new StringBuilder("") +// .Append($"Move: {scrollDisplay}") +// .Append($" | Use: {selectDisplay}") +// .Append($" | Exit: {exitDisplay}") +// .Append("
") +// .ToString(); +// } + +// private void OnTickRender() +// { +// foreach (var player in PlayersWithMenuOpen) +// { +// Rerender(player, true); +// } +// } + +// public void Show( IPlayer player ) +// { +// if (!SelectedIndex.TryAdd(player, 0)) +// { +// SelectedIndex[player] = 0; +// } + +// if (!PlayersWithMenuOpen.Contains(player)) +// { +// PlayersWithMenuOpen.Add(player); +// } + +// if (!Initialized && RequiresTickRendering) +// { +// Initialized = true; +// _Core.Event.OnTick += OnTickRender; +// } + +// Rerender(player, true); +// OnOpen?.Invoke(player); +// if (ShouldFreeze == true) SetFreezeState(player, true); + +// if (AutoCloseAfter != 0f) +// { +// AutoCloseCancelTokens[player] = _Core.Scheduler.DelayBySeconds(AutoCloseAfter, () => +// { +// Close(player); +// }); +// } + +// ScrollOffsets.Clear(); +// ScrollCallCounts.Clear(); +// ScrollPauseCounts.Clear(); +// } + +// public void UseSelection( IPlayer player ) +// { +// var selectedOption = Options[SelectedIndex[player]]; +// OnItemSelected?.Invoke(player, selectedOption); + +// switch (selectedOption) +// { +// case ButtonMenuOption buttonOption: +// { +// if (buttonOption.ValidationCheck != null && !buttonOption.ValidationCheck(player)) +// { +// buttonOption.OnValidationFailed?.Invoke(player); +// } +// buttonOption.OnClick?.Invoke(player); +// buttonOption.OnClickWithOption?.Invoke(player, buttonOption); +// if (buttonOption.CloseOnSelect) +// { +// MenuManager.CloseMenuForPlayer(player); +// } +// break; +// } +// case AsyncButtonMenuOption asyncButton: +// { +// if (asyncButton.ValidationCheck != null && !asyncButton.ValidationCheck(player)) +// { +// asyncButton.OnValidationFailed?.Invoke(player); +// } +// asyncButton.IsLoading = true; +// asyncButton.SetLoadingText("Processing..."); +// Rerender(player, true); +// var closeAfter = asyncButton.CloseOnSelect; +// _ = Task.Run(async () => +// { +// try +// { +// await asyncButton.ExecuteAsync(player, "Processing..."); +// } +// finally +// { +// asyncButton.IsLoading = false; +// Rerender(player, true); + +// if (closeAfter && player.IsValid) +// { +// MenuManager.CloseMenuForPlayer(player); +// } +// } +// }); +// break; +// } +// case ToggleMenuOption toggle: +// { +// toggle.Toggle(player); +// if (toggle.CloseOnSelect) +// { +// MenuManager.CloseMenuForPlayer(player); +// } +// else +// { +// Rerender(player, true); +// } +// break; +// } + +// case SubmenuMenuOption submenu: +// _ = Task.Run(async () => +// { +// var subMenu = await submenu.GetSubmenuAsync(); +// if (subMenu != null && player.IsValid && MenuManager.GetMenu(player) == this) +// { +// subMenu.Parent = this; +// MenuManager.OpenMenu(player, subMenu); +// } +// }); +// break; +// default: +// break; +// } +// } + +// public void UseSlideOption( IPlayer player, bool isRight ) +// { +// var selectedOption = Options[SelectedIndex[player]]; + +// switch (selectedOption) +// { +// case SliderMenuButton slider: +// if (isRight) slider.Increase(player); +// else slider.Decrease(player); +// break; + +// case ChoiceMenuOption choice: +// if (isRight) choice.Next(player); +// else choice.Previous(player); +// break; +// } + +// Rerender(player, false); +// } + +// [Obsolete("Use GetCurrentOption instead")] +// public bool IsOptionSlider( IPlayer player ) +// { +// return Options[SelectedIndex[player]] is SliderMenuButton || Options[SelectedIndex[player]] is ChoiceMenuOption; +// } + +// [Obsolete("Use GetCurrentOption instead")] +// public bool IsCurrentOptionSelectable( IPlayer player ) +// { +// return IsOptionSelectable(Options[SelectedIndex[player]]); +// } + +// public IOption? GetCurrentOption( IPlayer player ) +// { +// return !SelectedIndex.TryGetValue(player, out var index) || index < 0 || index >= Options.Count ? null : Options[index]; +// } + +// public bool IsOptionSelectable( IOption option ) +// { +// return option is ButtonMenuOption || +// option is ToggleMenuOption || +// option is SliderMenuButton || +// option is SubmenuMenuOption || +// option is AsyncButtonMenuOption || +// (option is DynamicMenuOption dynamic && dynamic.CanInteract(null!)); +// } + +// public void SetFreezeState( IPlayer player, bool freeze ) +// { +// if (!player.IsValid || player.IsFakeClient) return; + +// var pawn = player.PlayerPawn; +// if (pawn == null || !pawn.IsValid) return; + +// var moveType = freeze ? MoveType_t.MOVETYPE_NONE : MoveType_t.MOVETYPE_WALK; +// pawn.MoveType = moveType; +// pawn.ActualMoveType = moveType; +// pawn.MoveTypeUpdated(); +// } + +// internal string ApplyHorizontalStyle( string text, MenuHorizontalStyle? overflowStyle = null, bool updateHorizontalStyle = false ) +// { +// var activeStyle = overflowStyle ?? HorizontalStyle; + +// if (activeStyle == null || string.IsNullOrEmpty(text)) +// { +// return text; +// } + +// var plainText = StripHtmlTags(text); +// if (Helper.EstimateTextWidth(plainText) <= activeStyle.Value.MaxWidth) +// { +// return text; +// } + +// return activeStyle.Value.OverflowStyle switch { +// MenuHorizontalOverflowStyle.TruncateEnd => TruncateTextEnd(text, activeStyle.Value.MaxWidth), +// MenuHorizontalOverflowStyle.TruncateBothEnds => TruncateTextBothEnds(text, activeStyle.Value.MaxWidth), +// MenuHorizontalOverflowStyle.ScrollLeftFade => ScrollTextWithFade(updateHorizontalStyle, text, activeStyle.Value.MaxWidth, true, activeStyle), +// MenuHorizontalOverflowStyle.ScrollRightFade => ScrollTextWithFade(updateHorizontalStyle, text, activeStyle.Value.MaxWidth, false, activeStyle), +// MenuHorizontalOverflowStyle.ScrollLeftLoop => ScrollTextWithLoop(updateHorizontalStyle, $"{text.TrimEnd()} ", activeStyle.Value.MaxWidth, true, activeStyle), +// MenuHorizontalOverflowStyle.ScrollRightLoop => ScrollTextWithLoop(updateHorizontalStyle, $" {text.TrimStart()}", activeStyle.Value.MaxWidth, false, activeStyle), +// _ => text +// }; +// } + +// private string ScrollTextWithFade( bool updateHorizontalStyle, string text, float maxWidth, bool scrollLeft, MenuHorizontalStyle? style = null ) +// { +// // Prepare scroll data and validate +// var (plainChars, segments, targetCharCount) = PrepareScrollData(text, maxWidth); +// if (plainChars is null) +// { +// return text; +// } +// if (targetCharCount == 0) +// { +// return string.Empty; +// } + +// // Update scroll offset (allow scrolling beyond end for complete fade-out) +// var offset = UpdateScrollOffset(updateHorizontalStyle, StripHtmlTags(text), scrollLeft, plainChars.Length + 1, style); + +// // Calculate visible character range +// var (skipStart, skipEnd) = scrollLeft +// ? (offset, Math.Max(0, plainChars.Length - offset - targetCharCount)) +// : (Math.Max(0, plainChars.Length - targetCharCount - offset), offset); + +// // Build output with proper HTML tag tracking +// StringBuilder result = new(); +// List outputTags = [], activeTags = []; +// var (charIdx, started) = (0, false); + +// foreach (var (content, isTag) in segments) +// { +// if (isTag) +// { +// // Track active opening and closing tags +// UpdateTagState(content, activeTags); + +// // Output tags within visible window +// if (started) +// { +// result.Append(content); +// ProcessOpenTag(content, outputTags); +// } +// } +// else +// { +// // Process characters within scroll window +// foreach (var ch in content) +// { +// if (charIdx >= skipStart && charIdx < plainChars.Length - skipEnd) +// { +// // Apply active tags at start of output +// if (!started) +// { +// started = true; +// activeTags.ForEach(tag => { result.Append(tag); ProcessOpenTag(tag, outputTags); }); +// } +// result.Append(ch); +// } +// charIdx++; +// } +// } +// } + +// CloseOpenTags(result, outputTags); +// return result.ToString(); +// } + +// private string ScrollTextWithLoop( bool updateHorizontalStyle, string text, float maxWidth, bool scrollLeft, MenuHorizontalStyle? style = null ) +// { +// // Prepare scroll data and validate +// var (plainChars, segments, targetCharCount) = PrepareScrollData(text, maxWidth); +// if (plainChars is null) +// { +// return text; +// } +// if (targetCharCount == 0) +// { +// return string.Empty; +// } + +// // Update scroll offset for circular wrapping +// var offset = UpdateScrollOffset(updateHorizontalStyle, StripHtmlTags(text), scrollLeft, plainChars.Length, style); + +// // Build character-to-tags mapping for circular access +// Dictionary> charToActiveTags = []; +// List currentActiveTags = []; +// var currentCharIdx = 0; + +// foreach (var (content, isTag) in segments) +// { +// if (isTag) +// { +// // Track active opening and closing tags +// UpdateTagState(content, currentActiveTags); +// } +// else +// { +// // Map each character to its active tags +// foreach (var ch in content) +// { +// charToActiveTags[currentCharIdx] = [.. currentActiveTags]; +// currentCharIdx++; +// } +// } +// } + +// // Build output in circular order with dynamic tag management +// StringBuilder result = new(); +// List outputTags = []; +// List? previousTags = null; + +// for (int i = 0; i < targetCharCount; i++) +// { +// // Calculate circular character index +// var charIndex = scrollLeft +// ? (offset + i) % plainChars.Length +// : (plainChars.Length - offset + i) % plainChars.Length; +// var currentTags = charToActiveTags.GetValueOrDefault(charIndex, []); + +// // Close tags that are no longer active +// if (previousTags is not null) +// { +// for (int j = previousTags.Count - 1; j >= 0; j--) +// { +// if (!currentTags.Contains(previousTags[j])) +// { +// var prevTagName = previousTags[j][1..^1].Split(' ')[0]; +// result.Append($""); +// var idx = outputTags.FindLastIndex(t => t.Equals(prevTagName, StringComparison.OrdinalIgnoreCase)); +// if (idx >= 0) +// { +// outputTags.RemoveAt(idx); +// } +// } +// } +// } + +// // Open new tags that are now active +// foreach (var tag in currentTags) +// { +// if (previousTags is null || !previousTags.Contains(tag)) +// { +// result.Append(tag); +// var tagName = tag[1..^1].Split(' ')[0]; +// outputTags.Add(tagName); +// } +// } + +// result.Append(plainChars[charIndex]); +// previousTags = currentTags; +// } + +// CloseOpenTags(result, outputTags); +// return result.ToString(); +// } + +// private static string TruncateTextEnd( string text, float maxWidth, string suffix = "..." ) +// { +// // Reserve space for suffix +// var targetWidth = maxWidth - Helper.EstimateTextWidth(suffix); +// if (targetWidth <= 0) +// { +// return suffix; +// } + +// var segments = ParseHtmlSegments(text); +// StringBuilder result = new(); +// List openTags = []; +// var (currentWidth, reachedLimit) = (0f, false); + +// foreach (var (content, isTag) in segments) +// { +// switch (isTag, reachedLimit) +// { +// // Preserve HTML tags before reaching limit +// case (true, false): +// result.Append(content); +// ProcessOpenTag(content, openTags); +// break; + +// // Process plain text characters until width limit +// case (false, false): +// foreach (var ch in content) +// { +// var charWidth = Helper.GetCharWidth(ch); +// if (currentWidth + charWidth > targetWidth) +// { +// reachedLimit = true; +// break; +// } +// result.Append(ch); +// currentWidth += charWidth; +// } +// break; +// } +// } + +// if (reachedLimit) +// { +// result.Append(suffix); +// } + +// CloseOpenTags(result, openTags); +// return result.ToString(); +// } + +// private static string TruncateTextBothEnds( string text, float maxWidth ) +// { +// if (string.IsNullOrEmpty(text)) +// { +// return text; +// } + +// // Check if text fits without truncation +// var plainText = StripHtmlTags(text); +// if (Helper.EstimateTextWidth(plainText) <= maxWidth) +// { +// return text; +// } + +// // Extract all plain text characters from segments +// var segments = ParseHtmlSegments(text); +// var plainChars = segments +// .Where(s => !s.IsTag) +// .SelectMany(s => s.Content) +// .ToArray(); + +// if (plainChars.Length == 0) +// { +// return text; +// } + +// // Calculate how many characters can fit +// var targetCharCount = CalculateTargetCharCount(plainChars, maxWidth); +// if (targetCharCount == 0) +// { +// return string.Empty; +// } + +// // Calculate range to keep from middle +// var skipFromStart = Math.Max(0, (plainChars.Length - targetCharCount) / 2); +// var skipFromEnd = plainChars.Length - skipFromStart - targetCharCount; + +// StringBuilder result = new(); +// List outputOpenTags = []; +// List pendingOpenTags = []; +// var (plainCharIndex, hasStartedOutput) = (0, false); + +// foreach (var (content, isTag) in segments) +// { +// switch (isTag, hasStartedOutput) +// { +// // Process tags after output has started +// case (true, true): +// result.Append(content); +// ProcessOpenTag(content, outputOpenTags); +// break; + +// // Queue opening tags before output starts +// case (true, false) when !content.StartsWith(""): +// pendingOpenTags.Add(content); +// break; + +// // Process plain text, keeping only middle portion +// case (false, _): +// foreach (var ch in content) +// { +// if (plainCharIndex >= skipFromStart && plainCharIndex < plainChars.Length - skipFromEnd) +// { +// // Start output and apply pending tags +// if (!hasStartedOutput) +// { +// hasStartedOutput = true; +// pendingOpenTags.ForEach(tag => +// { +// result.Append(tag); +// ProcessOpenTag(tag, outputOpenTags); +// }); +// } +// result.Append(ch); +// } +// plainCharIndex++; +// } +// break; +// } +// } + +// CloseOpenTags(result, outputOpenTags); +// return result.ToString(); +// } +// } + +// internal partial class Menu +// { +// [GeneratedRegex("<.*?>")] +// private static partial Regex HtmlTagRegex(); + +// /// +// /// Removes all HTML tags from the given text. +// /// +// /// The text containing HTML tags. +// /// The text with all HTML tags removed. +// private static string StripHtmlTags( string text ) +// { +// if (string.IsNullOrEmpty(text)) +// { +// return text; +// } + +// return HtmlTagRegex().Replace(text, string.Empty); +// } + +// /// +// /// Parses text into segments, separating HTML tags from plain text content. +// /// +// /// The text to parse. +// /// A list of segments where each segment is either a tag or plain text content. +// private static List<(string Content, bool IsTag)> ParseHtmlSegments( string text ) +// { +// var tagMatches = HtmlTagRegex().Matches(text); +// if (tagMatches.Count == 0) +// { +// return [(text, false)]; +// } + +// List<(string Content, bool IsTag)> segments = []; +// var currentIndex = 0; + +// foreach (Match match in tagMatches) +// { +// if (match.Index > currentIndex) +// { +// segments.Add((text[currentIndex..match.Index], false)); +// } +// segments.Add((match.Value, true)); +// currentIndex = match.Index + match.Length; +// } + +// if (currentIndex < text.Length) +// { +// segments.Add((text[currentIndex..], false)); +// } + +// return segments; +// } + +// /// +// /// Processes an HTML tag and updates the list of currently open tags. +// /// Adds opening tags to the list and removes matching closing tags. +// /// +// /// The HTML tag to process. +// /// The list of currently open tag names. +// private static void ProcessOpenTag( string tag, List openTags ) +// { +// var tagName = tag switch { +// ['<', '/', .. var rest] => new string(rest).TrimEnd('>').Split(' ', 2)[0], +// ['<', '!', ..] => null, +// [.. var chars] when chars[^1] == '/' && chars[^2] == '>' => null, +// ['<', .. var rest] => new string(rest).TrimEnd('>').Split(' ', 2)[0], +// _ => null +// }; + +// if (tagName is null) +// { +// return; +// } + +// if (tag.StartsWith(" t.Equals(tagName, StringComparison.OrdinalIgnoreCase)); +// if (index >= 0) openTags.RemoveAt(index); +// } +// else +// { +// openTags.Add(tagName); +// } +// } + +// /// +// /// Appends closing tags for all currently open tags in reverse order. +// /// +// /// The StringBuilder to append closing tags to. +// /// The list of currently open tag names. +// private static void CloseOpenTags( StringBuilder result, List openTags ) +// { +// openTags.AsEnumerable().Reverse().ToList().ForEach(tag => result.Append($"")); +// } + +// /// +// /// Calculates how many characters can fit within the specified width. +// /// +// /// The characters to measure. +// /// The maximum width allowed. +// /// The number of characters that fit within the width. +// private static int CalculateTargetCharCount( ReadOnlySpan plainChars, float maxWidth ) +// { +// var currentWidth = 0f; +// var count = 0; + +// foreach (var ch in plainChars) +// { +// var charWidth = Helper.GetCharWidth(ch); +// if (currentWidth + charWidth > maxWidth) break; +// currentWidth += charWidth; +// count++; +// } + +// return count; +// } + +// /// +// /// Updates and returns the scroll offset for the given text. +// /// The offset increments based on tick count and wraps around at the specified length. +// /// +// /// Whether to update the horizontal style. +// /// The plain text being scrolled. +// /// Whether scrolling left or right. +// /// The length at which the offset wraps around. +// /// Optional horizontal style settings. +// /// The current scroll offset. +// private int UpdateScrollOffset( bool updateHorizontalStyle, string plainText, bool scrollLeft, int wrapLength, MenuHorizontalStyle? style ) +// { +// var key = $"{plainText}_{scrollLeft}"; +// ScrollOffsets.TryAdd(key, 0); +// ScrollCallCounts.TryAdd(key, 0); +// ScrollPauseCounts.TryAdd(key, 0); + +// var ticksPerScroll = style?.TicksPerScroll ?? HorizontalStyle?.TicksPerScroll ?? 16; +// var pauseTicks = style?.PauseTicks ?? HorizontalStyle?.PauseTicks ?? 0; + +// // If currently pausing, decrement pause counter and maintain current offset +// if (ScrollPauseCounts[key] > 0) +// { +// ScrollPauseCounts[key]--; +// return ScrollOffsets[key]; +// } + +// // Increment call count and scroll when threshold is reached +// if (updateHorizontalStyle && ++ScrollCallCounts[key] >= ticksPerScroll) +// { +// ScrollCallCounts[key] = 0; +// var newOffset = (ScrollOffsets[key] + 1) % wrapLength; + +// // When completing a full loop (offset returns to 0), start pause if configured +// if (newOffset == 0 && pauseTicks > 0) +// { +// ScrollPauseCounts[key] = pauseTicks; +// } + +// ScrollOffsets[key] = newOffset; +// } + +// return ScrollOffsets[key]; +// } + +// /// +// /// Updates the list of active tags based on the given HTML tag content. +// /// Adds opening tags and removes matching closing tags. +// /// +// /// The HTML tag content to process. +// /// The list of currently active tags. +// private static void UpdateTagState( string content, List activeTags ) +// { +// if (!content.StartsWith("")) +// { +// activeTags.Add(content); +// } +// else if (content.StartsWith(" t[1..^1].Split(' ')[0].Equals(tagName, StringComparison.OrdinalIgnoreCase)); +// if (index >= 0) +// { +// activeTags.RemoveAt(index); +// } +// } +// } + +// /// +// /// Prepares data required for text scrolling by extracting plain characters and parsing segments. +// /// +// /// The text to prepare for scrolling. +// /// The maximum width available for display. +// /// A tuple containing plain characters array, HTML segments, and target character count. +// private static (char[]? PlainChars, List<(string Content, bool IsTag)> Segments, int TargetCharCount) PrepareScrollData( string text, float maxWidth ) +// { +// var plainText = StripHtmlTags(text); +// if (Helper.EstimateTextWidth(plainText) <= maxWidth) +// { +// return (null, [], 0); +// } + +// var segments = ParseHtmlSegments(text); +// var plainChars = segments.Where(s => !s.IsTag).SelectMany(s => s.Content).ToArray(); + +// if (plainChars.Length == 0) +// { +// return (null, segments, 0); +// } + +// var targetCharCount = CalculateTargetCharCount(plainChars, maxWidth); +// return (plainChars, segments, targetCharCount); +// } +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/MenuAPI.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/MenuAPI.cs new file mode 100644 index 000000000..5a158bd77 --- /dev/null +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/MenuAPI.cs @@ -0,0 +1,596 @@ +using System.Collections.Concurrent; +using SwiftlyS2.Shared; +using SwiftlyS2.Shared.Menus; +using SwiftlyS2.Core.Natives; +using SwiftlyS2.Shared.Players; +using SwiftlyS2.Shared.SchemaDefinitions; + +namespace SwiftlyS2.Core.Menus; + +internal sealed class MenuAPI : IMenuAPI, IDisposable +{ + private (IMenuAPI? ParentMenu, IMenuOption? TriggerOption) parent; + + /// + /// The menu manager that this menu belongs to. + /// + public IMenuManagerAPI MenuManager { get; init; } + + /// + /// Configuration settings for this menu. + /// + public MenuConfiguration Configuration { get; init; } + + /// + /// Keybind overrides for this menu. + /// + public MenuKeybindOverrides KeybindOverrides { get; init; } + + /// + /// The scroll style for this menu options. + /// + public MenuOptionScrollStyle OptionScrollStyle { get; init; } + + // /// + // /// The text overflow style for menu options. + // /// + // public MenuOptionTextStyle OptionTextStyle { get; init; } + + /// + /// The builder used to construct and configure this menu. + /// + public IMenuBuilderAPI? Builder { get; init; } + + /// + /// Gets or sets an object that contains data about this menu. + /// + public object? Tag { get; set; } + + /// + /// The parent hierarchy information in a hierarchical menu structure. + /// + public (IMenuAPI? ParentMenu, IMenuOption? TriggerOption) Parent { + get => parent; + internal set { + if (parent == value) + { + return; + } + + if (value.ParentMenu == this) + { + Spectre.Console.AnsiConsole.WriteException(new ArgumentException($"Parent cannot be self.", nameof(value))); + } + else + { + parent = value; + } + } + } + + /// + /// Read-only collection of all options in this menu. + /// + public IReadOnlyList Options { + get { + lock (optionsLock) + { + return options.AsReadOnly(); + } + } + } + + // /// + // /// Fired before a player navigates to a different menu option. + // /// + // public event EventHandler? BeforeSelectionMove; + + // /// + // /// Fired after a player navigates to a different menu option. + // /// + // public event EventHandler? AfterSelectionMove; + + /// + /// Fired when the selection pointer is hovering over an option. + /// + public event EventHandler? OptionHovering; + + // /// + // /// Fired when an option is about to enter the visible viewport. + // /// + // public event EventHandler? OptionEntering; + + // /// + // /// Fired when an option is about to leave the visible viewport. + // /// + // public event EventHandler? OptionLeaving; + + private readonly ISwiftlyCore core; + private readonly List options = new(); + private readonly Lock optionsLock = new(); // Lock for synchronizing modifications to the `options` + private readonly ConcurrentDictionary selectedOptionIndex = new(); // Stores the currently selected option index for each player + // NOTE: Menu selection movement is entirely driven by changes to `desiredOptionIndex` (independent of any other variables) + private readonly ConcurrentDictionary desiredOptionIndex = new(); // Stores the desired option index for each player + private int maxOptions = 0; + // private readonly ConcurrentDictionary selectedDisplayLine = new(); // Stores the currently selected display line index for each player (some options may span multiple lines) + // private int maxDisplayLines = 0; + // private readonly ConcurrentDictionary> visibleOptionsCache = new(); + private readonly ConcurrentDictionary autoCloseCancelTokens = new(); + + private readonly ConcurrentDictionary renderCache = new(); + private readonly CancellationTokenSource renderLoopCancellationTokenSource = new(); + + private volatile bool disposed; + + // [SetsRequiredMembers] + public MenuAPI( ISwiftlyCore core, MenuConfiguration configuration, MenuKeybindOverrides keybindOverrides, IMenuBuilderAPI? builder = null/*, IMenuAPI? parent = null*/, MenuOptionScrollStyle optionScrollStyle = MenuOptionScrollStyle.CenterFixed/*, MenuOptionTextStyle optionTextStyle = MenuOptionTextStyle.TruncateEnd*/ ) + { + disposed = false; + + this.core = core; + + MenuManager = core.MenusAPI; + Configuration = configuration; + KeybindOverrides = keybindOverrides; + OptionScrollStyle = optionScrollStyle; + // OptionTextStyle = optionTextStyle; + Builder = builder; + // Parent = parent; + + options.Clear(); + selectedOptionIndex.Clear(); + desiredOptionIndex.Clear(); + // selectedDisplayLine.Clear(); + autoCloseCancelTokens.Clear(); + // visibleOptionsCache.Clear(); + renderCache.Clear(); + + maxOptions = 0; + // maxDisplayLines = 0; + + core.Event.OnTick += OnTick; + + _ = Task.Run(async () => + { + var token = renderLoopCancellationTokenSource.Token; + var delayMilliseconds = (int)(1000f / 64f / 2f); + while (!token.IsCancellationRequested || disposed) + { + try + { + OnRender(); + await Task.Delay(delayMilliseconds, token); + } + catch (OperationCanceledException) + { + break; + } + catch + { + } + } + }, renderLoopCancellationTokenSource.Token); + } + + ~MenuAPI() + { + Dispose(); + } + + public void Dispose() + { + if (disposed) + { + return; + } + + // Console.WriteLine($"{GetType().Name} has been disposed."); + core.PlayerManager + .GetAllPlayers() + .Where(player => player.IsValid && (selectedOptionIndex.TryGetValue(player, out var _) || desiredOptionIndex.TryGetValue(player, out var _))) + .ToList() + .ForEach(player => + { + NativePlayer.ClearCenterMenuRender(player.PlayerID); + SetFreezeState(player, false); + if (autoCloseCancelTokens.TryGetValue(player, out var token)) + { + token.Cancel(); + token.Dispose(); + } + }); + + // options.ForEach(option => option.Dispose()); + options.Clear(); + selectedOptionIndex.Clear(); + desiredOptionIndex.Clear(); + // selectedDisplayLine.Clear(); + autoCloseCancelTokens.Clear(); + // visibleOptionsCache.Clear(); + renderCache.Clear(); + + maxOptions = 0; + // maxDisplayLines = 0; + + core.Event.OnTick -= OnTick; + + renderLoopCancellationTokenSource?.Cancel(); + renderLoopCancellationTokenSource?.Dispose(); + + disposed = true; + GC.SuppressFinalize(this); + } + + private void OnTick() + { + if (maxOptions <= 0) + { + return; + } + + foreach (var kvp in renderCache) + { + var player = kvp.Key; + if (!player.IsValid || player.IsFakeClient) + { + continue; + } + + NativePlayer.SetCenterMenuRender(player.PlayerID, kvp.Value); + } + } + + private void OnRender() + { + if (maxOptions <= 0) + { + return; + } + + var playerStates = core.PlayerManager + .GetAllPlayers() + .Where(player => player.IsValid && !player.IsFakeClient) + .Select(player => ( + Player: player, + DesiredIndex: desiredOptionIndex.TryGetValue(player, out var desired) ? desired : -1, + SelectedIndex: selectedOptionIndex.TryGetValue(player, out var selected) ? selected : -1 + )) + .Where(state => state.DesiredIndex >= 0 && state.SelectedIndex >= 0) + .ToList(); + + var baseMaxVisibleItems = Configuration.MaxVisibleItems < 1 ? core.MenusAPI.Configuration.ItemsPerPage : Configuration.MaxVisibleItems; + var maxVisibleItems = Configuration.AutoIncreaseVisibleItems + ? Math.Clamp(baseMaxVisibleItems + (Configuration.HideTitle ? 1 : 0) + (Configuration.HideFooter ? 1 : 0), 1, 7) + : Math.Clamp(baseMaxVisibleItems, 1, 5); + var halfVisible = maxVisibleItems / 2; + + lock (optionsLock) + { + foreach (var (player, desiredIndex, selectedIndex) in playerStates) + { + ProcessPlayerMenu(player, desiredIndex, selectedIndex, maxOptions, maxVisibleItems, halfVisible); + } + } + } + + private void ProcessPlayerMenu( IPlayer player, int desiredIndex, int selectedIndex, int maxOptions, int maxVisibleItems, int halfVisible ) + { + var filteredOptions = options.Where(opt => opt.Visible && opt.GetVisible(player)).ToList(); + if (filteredOptions.Count == 0) + { + var emptyHtml = BuildMenuHtml(player, [], 0, 0, maxOptions, maxVisibleItems); + _ = renderCache.AddOrUpdate(player, emptyHtml, ( _, _ ) => emptyHtml); + return; + } + + var clampedDesiredIndex = Math.Clamp(desiredIndex, 0, maxOptions - 1); + var (visibleOptions, arrowPosition) = GetVisibleOptionsAndArrowPosition(filteredOptions, clampedDesiredIndex, maxVisibleItems, halfVisible); + var safeArrowPosition = Math.Clamp(arrowPosition, 0, visibleOptions.Count - 1); + + OptionHovering?.Invoke(this, new MenuEventArgs { + Player = player, + Options = new List { visibleOptions[safeArrowPosition] }.AsReadOnly() + }); + + var html = BuildMenuHtml(player, visibleOptions, safeArrowPosition, clampedDesiredIndex, maxOptions, maxVisibleItems); + _ = renderCache.AddOrUpdate(player, html, ( _, _ ) => html); + + var currentOption = visibleOptions[safeArrowPosition]; + var currentOriginalIndex = options.IndexOf(currentOption); + + if (currentOriginalIndex != selectedIndex) + { + var updateResult = selectedOptionIndex.TryUpdate(player, currentOriginalIndex, selectedIndex); + if (updateResult && currentOriginalIndex != desiredIndex) + { + _ = desiredOptionIndex.TryUpdate(player, currentOriginalIndex, desiredIndex); + } + } + } + + private (IReadOnlyList VisibleOptions, int ArrowPosition) GetVisibleOptionsAndArrowPosition( List filteredOptions, int clampedDesiredIndex, int maxVisibleItems, int halfVisible ) + { + var filteredMaxOptions = filteredOptions.Count; + var desiredOption = options[clampedDesiredIndex]; + var mappedDesiredIndex = filteredOptions.IndexOf(desiredOption); + + if (mappedDesiredIndex < 0) + { + mappedDesiredIndex = filteredOptions + .Select(( opt, idx ) => (Index: idx, Distance: Math.Abs(options.IndexOf(opt) - clampedDesiredIndex))) + .MinBy(x => x.Distance) + .Index; + } + + if (filteredMaxOptions <= maxVisibleItems) + { + return (filteredOptions.AsReadOnly(), mappedDesiredIndex); + } + + var (startIndex, arrowPosition) = CalculateScrollPosition(mappedDesiredIndex, filteredMaxOptions, maxVisibleItems, halfVisible); + + var visibleOptions = OptionScrollStyle == MenuOptionScrollStyle.CenterFixed + ? Enumerable.Range(0, maxVisibleItems) + .Select(i => filteredOptions[(mappedDesiredIndex + i - halfVisible + filteredMaxOptions) % filteredMaxOptions]) + .ToList() + .AsReadOnly() + : filteredOptions + .Skip(startIndex) + .Take(maxVisibleItems) + .ToList() + .AsReadOnly() + ; + + return (visibleOptions, arrowPosition); + } + + private (int StartIndex, int ArrowPosition) CalculateScrollPosition( int clampedDesiredIndex, int maxOptions, int maxVisibleItems, int halfVisible ) + { + return OptionScrollStyle switch { + MenuOptionScrollStyle.WaitingCenter when clampedDesiredIndex < halfVisible + => (0, clampedDesiredIndex), + MenuOptionScrollStyle.WaitingCenter when clampedDesiredIndex >= maxOptions - halfVisible + => (maxOptions - maxVisibleItems, maxVisibleItems - (maxOptions - clampedDesiredIndex)), + MenuOptionScrollStyle.WaitingCenter + => (clampedDesiredIndex - halfVisible, halfVisible), + + MenuOptionScrollStyle.LinearScroll when maxVisibleItems == 1 + => (clampedDesiredIndex, 0), + MenuOptionScrollStyle.LinearScroll when clampedDesiredIndex < maxVisibleItems - 1 + => (0, clampedDesiredIndex), + MenuOptionScrollStyle.LinearScroll when clampedDesiredIndex >= maxOptions - (maxVisibleItems - 1) + => (maxOptions - maxVisibleItems, maxVisibleItems - (maxOptions - clampedDesiredIndex)), + MenuOptionScrollStyle.LinearScroll + => (clampedDesiredIndex - (maxVisibleItems - 1), maxVisibleItems - 1), + + MenuOptionScrollStyle.CenterFixed + => (-1, halfVisible), + + _ => (0, 0) + }; + } + + private string BuildMenuHtml( IPlayer player, IReadOnlyList visibleOptions, int arrowPosition, int selectedIndex, int maxOptions, int maxVisibleItems ) + { + var guideLineColor = Configuration.VisualGuideLineColor ?? "#FFFFFF"; + var navigationColor = Configuration.NavigationMarkerColor ?? "#FFFFFF"; + var footerColor = Configuration.FooterColor ?? "#FF0000"; + var guideLine = $"──────────────────────────"; + + var titleSection = Configuration.HideTitle ? string.Empty : string.Concat( + $"{Configuration.Title}", + maxOptions > maxVisibleItems + ? string.Concat($" [{selectedIndex + 1}/{maxOptions}]
", guideLine, "
") + : string.Concat("
", guideLine, "
") + ); + + var menuItems = string.Join("
", visibleOptions.Select(( option, index ) => string.Concat( + index == arrowPosition + ? $"{core.MenusAPI.Configuration.NavigationPrefix} " + : "\u00A0\u00A0\u00A0 ", + option.GetDisplayText(player, 0) + ))); + + var footerSection = Configuration.HideFooter ? string.Empty : + core.MenusAPI.Configuration.InputMode switch { + "wasd" => string.Concat( + "
", guideLine, "
", + "", + $"Move: W/S | ", + $"Use: D | ", + $"Exit: A", + "" + ), + _ => string.Concat( + "
", guideLine, "
", + "", + $"Move: {KeybindOverrides.Move?.ToString() ?? core.MenusAPI.Configuration.ButtonsScroll.ToUpper()}/{KeybindOverrides.MoveBack?.ToString() ?? core.MenusAPI.Configuration.ButtonsScrollBack.ToUpper()} | ", + $"Use: {KeybindOverrides.Select?.ToString() ?? core.MenusAPI.Configuration.ButtonsUse.ToUpper()} | ", + $"Exit: {KeybindOverrides.Exit?.ToString() ?? core.MenusAPI.Configuration.ButtonsExit.ToUpper()}", + "" + ) + }; + + return string.Concat( + titleSection, + "", + menuItems, + "", + footerSection + ); + } + + public void ShowForPlayer( IPlayer player ) + { + _ = selectedOptionIndex.AddOrUpdate(player, 0, ( _, _ ) => 0); + _ = desiredOptionIndex.AddOrUpdate(player, 0, ( _, _ ) => 0); + // _ = selectedDisplayLine.AddOrUpdate(player, 0, ( _, _ ) => 0); + + if (!player.IsValid || player.IsFakeClient) + { + return; + } + + SetFreezeState(player, Configuration.FreezePlayer); + + if (Configuration.AutoCloseAfter > 0) + { + _ = autoCloseCancelTokens.AddOrUpdate( + player, + _ => core.Scheduler.DelayBySeconds(Configuration.AutoCloseAfter, () => core.MenusAPI.CloseMenuForPlayer(player, this)), + ( _, oldToken ) => + { + oldToken.Cancel(); + oldToken.Dispose(); + return core.Scheduler.DelayBySeconds(Configuration.AutoCloseAfter, () => core.MenusAPI.CloseMenuForPlayer(player, this)); + } + ); + } + } + + public void HideForPlayer( IPlayer player ) + { + var removedFromSelected = selectedOptionIndex.TryRemove(player, out _); + var removedFromDesired = desiredOptionIndex.TryRemove(player, out _); + // var removedFromDisplayLine = selectedDisplayLine.TryRemove(player, out _); + var keyExists = removedFromSelected || removedFromDesired/* || removedFromDisplayLine*/; + + if (!player.IsValid || player.IsFakeClient) + { + return; + } + + if (keyExists) + { + NativePlayer.ClearCenterMenuRender(player.PlayerID); + } + + SetFreezeState(player, false); + + _ = renderCache.TryRemove(player, out _); + + if (autoCloseCancelTokens.TryRemove(player, out var token)) + { + token.Cancel(); + token.Dispose(); + } + + // if (!selectedOptionIndex.Any(kvp => !kvp.Key.IsFakeClient) && !desiredOptionIndex.Any(kvp => !kvp.Key.IsFakeClient)) + // { + // Dispose(); + // } + } + + public void AddOption( IMenuOption option ) + { + lock (optionsLock) + { + // option.Click += OnOptionClick; + + // if (option is OptionsBase.SubmenuMenuOption submenuOption) + // { + // submenuOption.SubmenuRequested += OnSubmenuRequested; + // } + if (option is OptionsBase.MenuOptionBase baseOption) + { + baseOption.Menu = this; + } + options.Add(option); + maxOptions = options.Count; + // maxDisplayLines = options.Sum(option => option.LineCount); + } + } + + public bool RemoveOption( IMenuOption option ) + { + lock (optionsLock) + { + // option.Click -= OnOptionClick; + + // if (option is OptionsBase.SubmenuMenuOption submenuOption) + // { + // submenuOption.SubmenuRequested -= OnSubmenuRequested; + // } + + var result = options.Remove(option); + maxOptions = options.Count; + // maxDisplayLines = options.Sum(option => option.LineCount); + return result; + } + } + + public bool MoveToOption( IPlayer player, IMenuOption option ) + { + return MoveToOptionIndex(player, options.IndexOf(option)); + } + + public bool MoveToOptionIndex( IPlayer player, int index ) + { + lock (optionsLock) + { + if (maxOptions == 0 || !desiredOptionIndex.TryGetValue(player, out var oldIndex)) + { + return false; + } + + var targetIndex = ((index % maxOptions) + maxOptions) % maxOptions; + var direction = Math.Sign(targetIndex - oldIndex); + if (direction == 0) + { + return true; + } + + var visibleIndex = Enumerable.Range(0, maxOptions) + .Select(i => (((targetIndex + (i * direction)) % maxOptions) + maxOptions) % maxOptions) + .FirstOrDefault(idx => options[idx].Visible && options[idx].GetVisible(player), -1); + + return visibleIndex >= 0 && desiredOptionIndex.TryUpdate(player, visibleIndex, oldIndex); + } + } + + public IMenuOption? GetCurrentOption( IPlayer player ) + { + return selectedOptionIndex.TryGetValue(player, out var index) ? options[index] : null; + } + + public int GetCurrentOptionIndex( IPlayer player ) + { + return selectedOptionIndex.TryGetValue(player, out var index) ? index : -1; + } + + // public int GetCurrentOptionDisplayLine( IPlayer player ) + // { + // return selectedDisplayLine.TryGetValue(player, out var line) ? line : -1; + // } + + private static void SetFreezeState( IPlayer player, bool freeze ) + { + if (!player.IsValid || player.IsFakeClient || !(player.PlayerPawn?.IsValid ?? false)) + { + return; + } + + var moveType = freeze ? MoveType_t.MOVETYPE_NONE : MoveType_t.MOVETYPE_WALK; + player.PlayerPawn.MoveType = moveType; + player.PlayerPawn.ActualMoveType = moveType; + player.PlayerPawn.MoveTypeUpdated(); + } + + // private ValueTask OnOptionClick( object? sender, MenuOptionClickEventArgs args ) + // { + // if (args.CloseMenu) + // { + // CloseForPlayer(args.Player); + // } + + // return ValueTask.CompletedTask; + // } + + // private void OnSubmenuRequested( object? sender, MenuManagerEventArgs args ) + // { + // if (args.Player != null && args.Menu != null) + // { + // core.MenusAPI.OpenMenuForPlayer(args.Player, args.Menu); + // } + // } +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/MenuBuilder.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/MenuBuilder.cs index 529437c2f..7b9d469a6 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Menus/MenuBuilder.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/MenuBuilder.cs @@ -1,364 +1,365 @@ -using SwiftlyS2.Core.Menu.Options; -using SwiftlyS2.Shared.Menus; -using SwiftlyS2.Shared.Natives; -using SwiftlyS2.Shared.Players; - -namespace SwiftlyS2.Core.Menus; - -internal class MenuBuilder : IMenuBuilder -{ - private IMenu? _menu; - private IMenu? _parent; - private MenuDesign? _design; - - public IMenuDesign Design => _design ??= new MenuDesign(_menu!); - - public IMenuBuilder SetMenu( IMenu menu ) - { - _menu = menu; - return this; - } - - public IMenuBuilder AddButton( string text, Action? onClick = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - _menu!.Options.Add(new ButtonMenuOption(text, onClick, size, overflowStyle)); - _menu!.Options[^1].Menu = _menu; - return this; - } - - public IMenuBuilder AddButton( string text, Action? onClick, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - _menu!.Options.Add(new ButtonMenuOption(text, onClick, size, overflowStyle)); - _menu!.Options[^1].Menu = _menu; - return this; - } - - public IMenuBuilder AddButton( string text, Action? onClick, MenuHorizontalStyle? overflowStyle = null ) - { - return AddButton(text, onClick, IMenuTextSize.Medium, overflowStyle); - } - - public IMenuBuilder AddToggle( string text, bool defaultValue = false, Action? onToggle = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - _menu!.Options.Add(new ToggleMenuOption(text, defaultValue, onToggle, size, overflowStyle)); - _menu!.Options[^1].Menu = _menu; - return this; - } - - public IMenuBuilder AddToggle( string text, bool defaultValue, Action? onToggle, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - _menu!.Options.Add(new ToggleMenuOption(text, defaultValue, onToggle, size, overflowStyle)); - _menu!.Options[^1].Menu = _menu; - return this; - } - - public IMenuBuilder AddToggle( string text, bool defaultValue, Action? onToggle, MenuHorizontalStyle? overflowStyle = null ) - { - return AddToggle(text, defaultValue, onToggle, IMenuTextSize.Medium, overflowStyle); - } - - public IMenuBuilder AddSlider( string text, float min, float max, float defaultValue, float step = 1, Action? onChange = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - _menu!.Options.Add(new SliderMenuButton(text, min, max, defaultValue, step, onChange, size, overflowStyle)); - _menu!.Options[^1].Menu = _menu; - return this; - } - - public IMenuBuilder AddSlider( string text, float min, float max, float defaultValue, float step, Action? onChange, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - _menu!.Options.Add(new SliderMenuButton(text, min, max, defaultValue, step, onChange, size, overflowStyle)); - _menu!.Options[^1].Menu = _menu; - return this; - } - - public IMenuBuilder AddSlider( string text, float min, float max, float defaultValue, float step, Action? onChange, MenuHorizontalStyle? overflowStyle = null ) - { - return AddSlider(text, min, max, defaultValue, step, onChange, IMenuTextSize.Medium, overflowStyle); - } - - public IMenuBuilder AddAsyncButton( string text, Func onClickAsync, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - _menu!.Options.Add(new AsyncButtonMenuOption(text, onClickAsync, size, overflowStyle)); - _menu!.Options[^1].Menu = _menu; - return this; - } - - public IMenuBuilder AddAsyncButton( string text, Func onClickAsync, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - _menu!.Options.Add(new AsyncButtonMenuOption(text, onClickAsync, size, overflowStyle)); - _menu!.Options[^1].Menu = _menu; - return this; - } - - public IMenuBuilder AddAsyncButton( string text, Func onClickAsync, MenuHorizontalStyle? overflowStyle = null ) - { - return AddAsyncButton(text, onClickAsync, IMenuTextSize.Medium, overflowStyle); - } - - public IMenuBuilder AddText( string text, ITextAlign alignment = ITextAlign.Left, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - _menu!.Options.Add(new TextMenuOption(text, alignment, size, overflowStyle)); - _menu!.Options[^1].Menu = _menu; - return this; - } - - public IMenuBuilder AddDynamicText( Func textProvider, TimeSpan updateInterval, Action? onClick = null, IMenuTextSize size = IMenuTextSize.Medium ) - { - _menu!.Options.Add(new DynamicMenuOption(textProvider, updateInterval, onClick, size)); - _menu!.Options[^1].Menu = _menu; - return this; - } - public IMenuBuilder AddSubmenu( string text, IMenu submenu, IMenuTextSize size = IMenuTextSize.Medium ) - { - _menu!.Options.Add(new SubmenuMenuOption(text, submenu, size)); - _menu!.Options[^1].Menu = _menu; - return this; - } - - public IMenuBuilder AddSubmenu( string text, IMenu submenu ) - { - return AddSubmenu(text, submenu, IMenuTextSize.Medium); - } - - public IMenuBuilder AddSubmenu( string text, Func submenuBuilder, IMenuTextSize size = IMenuTextSize.Medium ) - { - _menu!.Options.Add(new SubmenuMenuOption(text, submenuBuilder, size)); - _menu!.Options[^1].Menu = _menu; - return this; - } - - public IMenuBuilder AddSubmenu( string text, Func submenuBuilder ) - { - return AddSubmenu(text, submenuBuilder, IMenuTextSize.Medium); - } - - public IMenuBuilder AddSubmenu( string text, Func> submenuBuilder, IMenuTextSize size = IMenuTextSize.Medium ) - { - _menu!.Options.Add(new SubmenuMenuOption(text, submenuBuilder, size)); - _menu!.Options[^1].Menu = _menu; - return this; - } - - public IMenuBuilder AddSubmenu( string text, Func> submenuBuilder ) - { - return AddSubmenu(text, submenuBuilder, IMenuTextSize.Medium); - } - - public IMenuBuilder AddChoice( string text, string[] choices, string? defaultChoice = null, Action? onChange = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - _menu!.Options.Add(new ChoiceMenuOption(text, choices, defaultChoice, onChange, size, overflowStyle)); - _menu!.Options[^1].Menu = _menu; - return this; - } - - public IMenuBuilder AddChoice( string text, string[] choices, string? defaultChoice, Action? onChange, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - _menu!.Options.Add(new ChoiceMenuOption(text, choices, defaultChoice, onChange, size, overflowStyle)); - _menu!.Options[^1].Menu = _menu; - return this; - } - - // [Obsolete("This overload causes ambiguity. Use AddChoice(text, choices, defaultChoice, onChange, IMenuTextSize.Medium, overflowStyle) instead.")] - // public IMenuBuilder AddChoice(string text, string[] choices, string? defaultChoice, Action? onChange, MenuHorizontalStyle? overflowStyle = null) - // { - // return AddChoice(text, choices, defaultChoice, onChange, IMenuTextSize.Medium, overflowStyle); - // } - - public IMenuBuilder AddSeparator() - { - _menu!.Options.Add(new SeparatorMenuOption()); - _menu!.Options[^1].Menu = _menu; - return this; - } - - public IMenuBuilder AddProgressBar( string text, Func progressProvider, int barWidth = 20, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - _menu!.Options.Add(new ProgressBarMenuOption(text, progressProvider, barWidth, size, overflowStyle)); - _menu!.Options[^1].Menu = _menu; - _menu!.RenderOntick = true; - return this; - } - - public IMenuBuilder AddProgressBar( string text, Func progressProvider, int barWidth, MenuHorizontalStyle? overflowStyle = null ) - { - return AddProgressBar(text, progressProvider, barWidth, IMenuTextSize.Medium, overflowStyle); - } - public IMenuBuilder WithParent( IMenu parent ) - { - _parent = parent; - _menu!.Parent = parent; - return this; - } - - public IMenuBuilder VisibleWhen( Func condition ) - { - if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ButtonMenuOption button) - { - button.VisibilityCheck = condition; - } - else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ToggleMenuOption toggle) - { - toggle.VisibilityCheck = condition; - } - else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is SliderMenuButton slider) - { - slider.VisibilityCheck = condition; - } - else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ChoiceMenuOption choice) - { - choice.VisibilityCheck = condition; - } - else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is SubmenuMenuOption submenu) - { - submenu.VisibilityCheck = condition; - } - else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is TextMenuOption textItem) - { - textItem.VisibilityCheck = condition; - } - return this; - } - - public IMenuBuilder EnabledWhen( Func condition ) - { - if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ButtonMenuOption button) - { - button.VisibilityCheck = condition; - } - else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ToggleMenuOption toggle) - { - toggle.VisibilityCheck = condition; - } - else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is SliderMenuButton slider) - { - slider.VisibilityCheck = condition; - } - else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ChoiceMenuOption choice) - { - choice.VisibilityCheck = condition; - } - else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is SubmenuMenuOption submenu) - { - submenu.VisibilityCheck = condition; - } - else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is TextMenuOption textItem) - { - textItem.VisibilityCheck = condition; - } - return this; - } - - public IMenuBuilder WithValidation( Func validation, Action? onFailed = null ) - { - if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ButtonMenuOption button) - { - button.ValidationCheck = validation; - button.OnValidationFailed = onFailed; - } - else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ToggleMenuOption toggle) - { - toggle.ValidationCheck = validation; - toggle.OnValidationFailed = onFailed; - } - else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is AsyncButtonMenuOption asyncButton) - { - asyncButton.ValidationCheck = validation; - asyncButton.OnValidationFailed = onFailed; - } - else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is DynamicMenuOption dynamic) - { - dynamic.WithValidation(validation, onFailed); - } - return this; - } - - public IMenuBuilder CloseOnSelect() - { - if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ButtonMenuOption button) - { - button.CloseOnSelect = true; - } - else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ToggleMenuOption toggle) - { - toggle.CloseOnSelect = true; - } - else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is AsyncButtonMenuOption asyncButton) - { - asyncButton.CloseOnSelect = true; - } - else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is DynamicMenuOption dynamic) - { - dynamic.WithCloseOnSelect(true); - } - return this; - } - - public IMenuBuilder AutoClose( float seconds ) - { - _menu!.AutoCloseAfter = seconds; - return this; - } - - public IMenuBuilder OverrideButtons( Action configureOverrides ) - { - configureOverrides(_menu!.ButtonOverrides!); - return this; - } - - [Obsolete("Use Design.OverrideSelectButton instead")] - public IMenuBuilder OverrideSelectButton( params string[] buttonNames ) - { - _menu!.ButtonOverrides!.Select = MenuButtonOverrides.ParseButtons(buttonNames); - return this; - } - - [Obsolete("Use Design.OverrideMoveButton instead")] - public IMenuBuilder OverrideMoveButton( params string[] buttonNames ) - { - _menu!.ButtonOverrides!.Move = MenuButtonOverrides.ParseButtons(buttonNames); - return this; - } - - [Obsolete("Use Design.OverrideExitButton instead")] - public IMenuBuilder OverrideExitButton( params string[] buttonNames ) - { - _menu!.ButtonOverrides!.Exit = MenuButtonOverrides.ParseButtons(buttonNames); - return this; - } - - [Obsolete("Use Design.MaxVisibleItems instead")] - public IMenuBuilder MaxVisibleItems( int count ) - { - if (count < 1 || count > 5) - { - Spectre.Console.AnsiConsole.WriteException(new ArgumentOutOfRangeException(nameof(count), $"MaxVisibleItems: value {count} is out of range [1, 5].")); - } - _menu!.MaxVisibleOptions = Math.Clamp(count, 1, 5); - return this; - } - - public IMenuBuilder NoFreeze() - { - _menu!.ShouldFreeze = false; - return this; - } - - public IMenuBuilder ForceFreeze() - { - _menu!.ShouldFreeze = true; - return this; - } - - public IMenuBuilder HasSound( bool hasSound ) - { - _menu!.HasSound = hasSound; - return this; - } - - [Obsolete("Use Design.SetColor instead")] - public IMenuBuilder SetColor( Color color ) - { - _menu!.RenderColor = color; - return this; - } -} \ No newline at end of file +// using SwiftlyS2.Core.Menu.Options; +// using SwiftlyS2.Shared.Menus; +// using SwiftlyS2.Shared.Natives; +// using SwiftlyS2.Shared.Players; + +// namespace SwiftlyS2.Core.Menus; + +// [Obsolete("MenuBuilder will be deprecared at the release of SwiftlyS2. Please use MenuBuilderAPI instead")] +// internal class MenuBuilder : IMenuBuilder +// { +// private IMenu? _menu; +// private IMenu? _parent; +// private MenuDesign? _design; + +// public IMenuDesign Design => _design ??= new MenuDesign(_menu!); + +// public IMenuBuilder SetMenu( IMenu menu ) +// { +// _menu = menu; +// return this; +// } + +// public IMenuBuilder AddButton( string text, Action? onClick = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// _menu!.Options.Add(new ButtonMenuOption(text, onClick, size, overflowStyle)); +// _menu!.Options[^1].Menu = _menu; +// return this; +// } + +// public IMenuBuilder AddButton( string text, Action? onClick, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// _menu!.Options.Add(new ButtonMenuOption(text, onClick, size, overflowStyle)); +// _menu!.Options[^1].Menu = _menu; +// return this; +// } + +// public IMenuBuilder AddButton( string text, Action? onClick, MenuHorizontalStyle? overflowStyle = null ) +// { +// return AddButton(text, onClick, IMenuTextSize.Medium, overflowStyle); +// } + +// public IMenuBuilder AddToggle( string text, bool defaultValue = false, Action? onToggle = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// _menu!.Options.Add(new ToggleMenuOption(text, defaultValue, onToggle, size, overflowStyle)); +// _menu!.Options[^1].Menu = _menu; +// return this; +// } + +// public IMenuBuilder AddToggle( string text, bool defaultValue, Action? onToggle, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// _menu!.Options.Add(new ToggleMenuOption(text, defaultValue, onToggle, size, overflowStyle)); +// _menu!.Options[^1].Menu = _menu; +// return this; +// } + +// public IMenuBuilder AddToggle( string text, bool defaultValue, Action? onToggle, MenuHorizontalStyle? overflowStyle = null ) +// { +// return AddToggle(text, defaultValue, onToggle, IMenuTextSize.Medium, overflowStyle); +// } + +// public IMenuBuilder AddSlider( string text, float min, float max, float defaultValue, float step = 1, Action? onChange = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// _menu!.Options.Add(new SliderMenuButton(text, min, max, defaultValue, step, onChange, size, overflowStyle)); +// _menu!.Options[^1].Menu = _menu; +// return this; +// } + +// public IMenuBuilder AddSlider( string text, float min, float max, float defaultValue, float step, Action? onChange, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// _menu!.Options.Add(new SliderMenuButton(text, min, max, defaultValue, step, onChange, size, overflowStyle)); +// _menu!.Options[^1].Menu = _menu; +// return this; +// } + +// public IMenuBuilder AddSlider( string text, float min, float max, float defaultValue, float step, Action? onChange, MenuHorizontalStyle? overflowStyle = null ) +// { +// return AddSlider(text, min, max, defaultValue, step, onChange, IMenuTextSize.Medium, overflowStyle); +// } + +// public IMenuBuilder AddAsyncButton( string text, Func onClickAsync, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// _menu!.Options.Add(new AsyncButtonMenuOption(text, onClickAsync, size, overflowStyle)); +// _menu!.Options[^1].Menu = _menu; +// return this; +// } + +// public IMenuBuilder AddAsyncButton( string text, Func onClickAsync, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// _menu!.Options.Add(new AsyncButtonMenuOption(text, onClickAsync, size, overflowStyle)); +// _menu!.Options[^1].Menu = _menu; +// return this; +// } + +// public IMenuBuilder AddAsyncButton( string text, Func onClickAsync, MenuHorizontalStyle? overflowStyle = null ) +// { +// return AddAsyncButton(text, onClickAsync, IMenuTextSize.Medium, overflowStyle); +// } + +// public IMenuBuilder AddText( string text, ITextAlign alignment = ITextAlign.Left, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// _menu!.Options.Add(new TextMenuOption(text, alignment, size, overflowStyle)); +// _menu!.Options[^1].Menu = _menu; +// return this; +// } + +// public IMenuBuilder AddDynamicText( Func textProvider, TimeSpan updateInterval, Action? onClick = null, IMenuTextSize size = IMenuTextSize.Medium ) +// { +// _menu!.Options.Add(new DynamicMenuOption(textProvider, updateInterval, onClick, size)); +// _menu!.Options[^1].Menu = _menu; +// return this; +// } +// public IMenuBuilder AddSubmenu( string text, IMenu submenu, IMenuTextSize size = IMenuTextSize.Medium ) +// { +// _menu!.Options.Add(new SubmenuMenuOption(text, submenu, size)); +// _menu!.Options[^1].Menu = _menu; +// return this; +// } + +// public IMenuBuilder AddSubmenu( string text, IMenu submenu ) +// { +// return AddSubmenu(text, submenu, IMenuTextSize.Medium); +// } + +// public IMenuBuilder AddSubmenu( string text, Func submenuBuilder, IMenuTextSize size = IMenuTextSize.Medium ) +// { +// _menu!.Options.Add(new SubmenuMenuOption(text, submenuBuilder, size)); +// _menu!.Options[^1].Menu = _menu; +// return this; +// } + +// public IMenuBuilder AddSubmenu( string text, Func submenuBuilder ) +// { +// return AddSubmenu(text, submenuBuilder, IMenuTextSize.Medium); +// } + +// public IMenuBuilder AddSubmenu( string text, Func> submenuBuilder, IMenuTextSize size = IMenuTextSize.Medium ) +// { +// _menu!.Options.Add(new SubmenuMenuOption(text, submenuBuilder, size)); +// _menu!.Options[^1].Menu = _menu; +// return this; +// } + +// public IMenuBuilder AddSubmenu( string text, Func> submenuBuilder ) +// { +// return AddSubmenu(text, submenuBuilder, IMenuTextSize.Medium); +// } + +// public IMenuBuilder AddChoice( string text, string[] choices, string? defaultChoice = null, Action? onChange = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// _menu!.Options.Add(new ChoiceMenuOption(text, choices, defaultChoice, onChange, size, overflowStyle)); +// _menu!.Options[^1].Menu = _menu; +// return this; +// } + +// public IMenuBuilder AddChoice( string text, string[] choices, string? defaultChoice, Action? onChange, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// _menu!.Options.Add(new ChoiceMenuOption(text, choices, defaultChoice, onChange, size, overflowStyle)); +// _menu!.Options[^1].Menu = _menu; +// return this; +// } + +// // [Obsolete("This overload causes ambiguity. Use AddChoice(text, choices, defaultChoice, onChange, IMenuTextSize.Medium, overflowStyle) instead.")] +// // public IMenuBuilder AddChoice(string text, string[] choices, string? defaultChoice, Action? onChange, MenuHorizontalStyle? overflowStyle = null) +// // { +// // return AddChoice(text, choices, defaultChoice, onChange, IMenuTextSize.Medium, overflowStyle); +// // } + +// public IMenuBuilder AddSeparator() +// { +// _menu!.Options.Add(new SeparatorMenuOption()); +// _menu!.Options[^1].Menu = _menu; +// return this; +// } + +// public IMenuBuilder AddProgressBar( string text, Func progressProvider, int barWidth = 20, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// _menu!.Options.Add(new ProgressBarMenuOption(text, progressProvider, barWidth, size, overflowStyle)); +// _menu!.Options[^1].Menu = _menu; +// _menu!.RenderOntick = true; +// return this; +// } + +// public IMenuBuilder AddProgressBar( string text, Func progressProvider, int barWidth, MenuHorizontalStyle? overflowStyle = null ) +// { +// return AddProgressBar(text, progressProvider, barWidth, IMenuTextSize.Medium, overflowStyle); +// } +// public IMenuBuilder WithParent( IMenu parent ) +// { +// _parent = parent; +// _menu!.Parent = parent; +// return this; +// } + +// public IMenuBuilder VisibleWhen( Func condition ) +// { +// if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ButtonMenuOption button) +// { +// button.VisibilityCheck = condition; +// } +// else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ToggleMenuOption toggle) +// { +// toggle.VisibilityCheck = condition; +// } +// else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is SliderMenuButton slider) +// { +// slider.VisibilityCheck = condition; +// } +// else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ChoiceMenuOption choice) +// { +// choice.VisibilityCheck = condition; +// } +// else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is SubmenuMenuOption submenu) +// { +// submenu.VisibilityCheck = condition; +// } +// else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is TextMenuOption textItem) +// { +// textItem.VisibilityCheck = condition; +// } +// return this; +// } + +// public IMenuBuilder EnabledWhen( Func condition ) +// { +// if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ButtonMenuOption button) +// { +// button.VisibilityCheck = condition; +// } +// else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ToggleMenuOption toggle) +// { +// toggle.VisibilityCheck = condition; +// } +// else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is SliderMenuButton slider) +// { +// slider.VisibilityCheck = condition; +// } +// else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ChoiceMenuOption choice) +// { +// choice.VisibilityCheck = condition; +// } +// else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is SubmenuMenuOption submenu) +// { +// submenu.VisibilityCheck = condition; +// } +// else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is TextMenuOption textItem) +// { +// textItem.VisibilityCheck = condition; +// } +// return this; +// } + +// public IMenuBuilder WithValidation( Func validation, Action? onFailed = null ) +// { +// if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ButtonMenuOption button) +// { +// button.ValidationCheck = validation; +// button.OnValidationFailed = onFailed; +// } +// else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ToggleMenuOption toggle) +// { +// toggle.ValidationCheck = validation; +// toggle.OnValidationFailed = onFailed; +// } +// else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is AsyncButtonMenuOption asyncButton) +// { +// asyncButton.ValidationCheck = validation; +// asyncButton.OnValidationFailed = onFailed; +// } +// else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is DynamicMenuOption dynamic) +// { +// dynamic.WithValidation(validation, onFailed); +// } +// return this; +// } + +// public IMenuBuilder CloseOnSelect() +// { +// if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ButtonMenuOption button) +// { +// button.CloseOnSelect = true; +// } +// else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is ToggleMenuOption toggle) +// { +// toggle.CloseOnSelect = true; +// } +// else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is AsyncButtonMenuOption asyncButton) +// { +// asyncButton.CloseOnSelect = true; +// } +// else if (_menu!.Options.Count > 0 && _menu!.Options[^1] is DynamicMenuOption dynamic) +// { +// dynamic.WithCloseOnSelect(true); +// } +// return this; +// } + +// public IMenuBuilder AutoClose( float seconds ) +// { +// _menu!.AutoCloseAfter = seconds; +// return this; +// } + +// public IMenuBuilder OverrideButtons( Action configureOverrides ) +// { +// configureOverrides(_menu!.ButtonOverrides!); +// return this; +// } + +// [Obsolete("Use Design.OverrideSelectButton instead")] +// public IMenuBuilder OverrideSelectButton( params string[] buttonNames ) +// { +// _menu!.ButtonOverrides!.Select = MenuButtonOverrides.ParseButtons(buttonNames); +// return this; +// } + +// [Obsolete("Use Design.OverrideMoveButton instead")] +// public IMenuBuilder OverrideMoveButton( params string[] buttonNames ) +// { +// _menu!.ButtonOverrides!.Move = MenuButtonOverrides.ParseButtons(buttonNames); +// return this; +// } + +// [Obsolete("Use Design.OverrideExitButton instead")] +// public IMenuBuilder OverrideExitButton( params string[] buttonNames ) +// { +// _menu!.ButtonOverrides!.Exit = MenuButtonOverrides.ParseButtons(buttonNames); +// return this; +// } + +// [Obsolete("Use Design.MaxVisibleItems instead")] +// public IMenuBuilder MaxVisibleItems( int count ) +// { +// if (count < 1 || count > 5) +// { +// Spectre.Console.AnsiConsole.WriteException(new ArgumentOutOfRangeException(nameof(count), $"MaxVisibleItems: value {count} is out of range [1, 5].")); +// } +// _menu!.MaxVisibleOptions = Math.Clamp(count, 1, 5); +// return this; +// } + +// public IMenuBuilder NoFreeze() +// { +// _menu!.ShouldFreeze = false; +// return this; +// } + +// public IMenuBuilder ForceFreeze() +// { +// _menu!.ShouldFreeze = true; +// return this; +// } + +// public IMenuBuilder HasSound( bool hasSound ) +// { +// _menu!.HasSound = hasSound; +// return this; +// } + +// [Obsolete("Use Design.SetColor instead")] +// public IMenuBuilder SetColor( Color color ) +// { +// _menu!.RenderColor = color; +// return this; +// } +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/MenuBuilderAPI.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/MenuBuilderAPI.cs new file mode 100644 index 000000000..855945237 --- /dev/null +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/MenuBuilderAPI.cs @@ -0,0 +1,94 @@ +using SwiftlyS2.Shared; +using SwiftlyS2.Shared.Menus; + +namespace SwiftlyS2.Core.Menus; + +internal sealed class MenuBuilderAPI : IMenuBuilderAPI +{ + /// + /// Gets the design interface for this menu. + /// + public IMenuDesignAPI Design { get => design ??= new MenuDesignAPI(configuration, this, style => optionScrollStyle = style/*, style => optionTextStyle = style*/); } + + private readonly ISwiftlyCore core; + private readonly MenuConfiguration configuration = new(); + private readonly List options = new(); + private MenuKeybindOverrides keybindOverrides = new(); + private MenuOptionScrollStyle optionScrollStyle = MenuOptionScrollStyle.CenterFixed; + // private MenuOptionTextStyle optionTextStyle = MenuOptionTextStyle.TruncateEnd; + private IMenuAPI? parent = null; + private IMenuDesignAPI? design = null; + + public MenuBuilderAPI( ISwiftlyCore core ) + { + this.core = core; + options.Clear(); + } + + public IMenuBuilderAPI BindToParent( IMenuAPI parent ) + { + this.parent = parent; + return this; + } + + public IMenuBuilderAPI AddOption( IMenuOption option ) + { + options.Add(option); + return this; + } + + public IMenuBuilderAPI EnableSound() + { + configuration.PlaySound = true; + return this; + } + + public IMenuBuilderAPI DisableSound() + { + configuration.PlaySound = false; + return this; + } + + public IMenuBuilderAPI SetPlayerFrozen( bool frozen = false ) + { + configuration.FreezePlayer = frozen; + return this; + } + + public IMenuBuilderAPI SetAutoCloseDelay( float seconds = 0f ) + { + configuration.AutoCloseAfter = seconds; + return this; + } + + public IMenuBuilderAPI SetSelectButton( KeyBind keyBind ) + { + keybindOverrides = keybindOverrides with { Select = keyBind }; + return this; + } + + public IMenuBuilderAPI SetMoveForwardButton( KeyBind keyBind ) + { + keybindOverrides = keybindOverrides with { Move = keyBind }; + return this; + } + + public IMenuBuilderAPI SetMoveBackwardButton( KeyBind keyBind ) + { + keybindOverrides = keybindOverrides with { MoveBack = keyBind }; + return this; + } + + public IMenuBuilderAPI SetExitButton( KeyBind keyBind ) + { + keybindOverrides = keybindOverrides with { Exit = keyBind }; + return this; + } + + public IMenuAPI Build() + { + var menu = new MenuAPI(core, configuration, keybindOverrides, this/*, parent*/, optionScrollStyle/*, optionTextStyle*/) { Parent = (parent, null) }; + options.ForEach(option => menu.AddOption(option)); + return menu; + } +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/MenuButtonOverrides.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/MenuButtonOverrides.cs index 483edb737..ffe6f1f8d 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Menus/MenuButtonOverrides.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/MenuButtonOverrides.cs @@ -1,39 +1,40 @@ -using SwiftlyS2.Shared.Events; -using SwiftlyS2.Shared.Menus; +// using SwiftlyS2.Shared.Events; +// using SwiftlyS2.Shared.Menus; -namespace SwiftlyS2.Core.Menus; +// namespace SwiftlyS2.Core.Menus; -internal class MenuButtonOverrides : IMenuButtonOverrides -{ - public KeyKind? Select { get; set; } - public KeyKind? Move { get; set; } - public KeyKind? MoveBack { get; set; } - public KeyKind? Exit { get; set; } +// [Obsolete("MenuButtonOverrides will be deprecared at the release of SwiftlyS2.")] +// internal class MenuButtonOverrides : IMenuButtonOverrides +// { +// public KeyKind? Select { get; set; } +// public KeyKind? Move { get; set; } +// public KeyKind? MoveBack { get; set; } +// public KeyKind? Exit { get; set; } - internal static KeyKind ParseButton(string buttonName) - { - if (Enum.TryParse(buttonName, true, out var button)) - { - return button; - } - return 0; - } +// internal static KeyKind ParseButton( string buttonName ) +// { +// if (Enum.TryParse(buttonName, true, out var button)) +// { +// return button; +// } +// return 0; +// } - internal static KeyKind ParseButtons(params string[] buttonNames) - { - KeyKind result = 0; - foreach (var buttonName in buttonNames) - { - if (IsWASDButton(buttonName)) continue; - result |= ParseButton(buttonName); - } - return result; - } +// internal static KeyKind ParseButtons( params string[] buttonNames ) +// { +// KeyKind result = 0; +// foreach (var buttonName in buttonNames) +// { +// if (IsWASDButton(buttonName)) continue; +// result |= ParseButton(buttonName); +// } +// return result; +// } - private static bool IsWASDButton(string buttonName) - { - var lower = buttonName.ToLowerInvariant(); - return lower == "forward" || lower == "back" || lower == "moveleft" || - lower == "moveright" || lower == "w" || lower == "a" || lower == "s" || lower == "d"; - } -} \ No newline at end of file +// private static bool IsWASDButton( string buttonName ) +// { +// var lower = buttonName.ToLowerInvariant(); +// return lower == "forward" || lower == "back" || lower == "moveleft" || +// lower == "moveright" || lower == "w" || lower == "a" || lower == "s" || lower == "d"; +// } +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/MenuDesign.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/MenuDesign.cs index 4c5aafc9e..61a7e31a7 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Menus/MenuDesign.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/MenuDesign.cs @@ -1,60 +1,61 @@ -using SwiftlyS2.Shared.Menus; -using SwiftlyS2.Shared.Natives; - -namespace SwiftlyS2.Core.Menus; - -internal sealed class MenuDesign : IMenuDesign -{ - private readonly IMenu _menu; - - public MenuDesign(IMenu menu) - { - _menu = menu; - } - - public IMenuDesign OverrideSelectButton(params string[] buttonNames) - { - _menu.ButtonOverrides!.Select = MenuButtonOverrides.ParseButtons(buttonNames); - return this; - } - - public IMenuDesign OverrideMoveButton(params string[] buttonNames) - { - _menu.ButtonOverrides!.Move = MenuButtonOverrides.ParseButtons(buttonNames); - return this; - } - - public IMenuDesign OverrideExitButton(params string[] buttonNames) - { - _menu.ButtonOverrides!.Exit = MenuButtonOverrides.ParseButtons(buttonNames); - return this; - } - - public IMenuDesign MaxVisibleItems(int count) - { - if (count < 1 || count > 5) - { - Spectre.Console.AnsiConsole.WriteException(new ArgumentOutOfRangeException(nameof(count), $"MaxVisibleItems: value {count} is out of range [1, 5].")); - } - _menu.MaxVisibleOptions = Math.Clamp(count, 1, 5); - return this; - } - - public IMenuDesign SetColor(Color color) - { - _menu.RenderColor = color; - return this; - } - - public IMenuDesign SetVerticalScrollStyle(MenuVerticalScrollStyle style) - { - _menu.VerticalScrollStyle = style; - return this; - } - - public IMenuDesign SetGlobalHorizontalStyle(MenuHorizontalStyle style) - { - _menu.HorizontalStyle = style; - return this; - } -} \ No newline at end of file +// using SwiftlyS2.Shared.Menus; +// using SwiftlyS2.Shared.Natives; + +// namespace SwiftlyS2.Core.Menus; + +// [Obsolete("MenuDesign will be deprecared at the release of SwiftlyS2. Please use MenuDesignAPI instead")] +// internal sealed class MenuDesign : IMenuDesign +// { +// private readonly IMenu _menu; + +// public MenuDesign( IMenu menu ) +// { +// _menu = menu; +// } + +// public IMenuDesign OverrideSelectButton( params string[] buttonNames ) +// { +// _menu.ButtonOverrides!.Select = MenuButtonOverrides.ParseButtons(buttonNames); +// return this; +// } + +// public IMenuDesign OverrideMoveButton( params string[] buttonNames ) +// { +// _menu.ButtonOverrides!.Move = MenuButtonOverrides.ParseButtons(buttonNames); +// return this; +// } + +// public IMenuDesign OverrideExitButton( params string[] buttonNames ) +// { +// _menu.ButtonOverrides!.Exit = MenuButtonOverrides.ParseButtons(buttonNames); +// return this; +// } + +// public IMenuDesign MaxVisibleItems( int count ) +// { +// if (count < 1 || count > 5) +// { +// Spectre.Console.AnsiConsole.WriteException(new ArgumentOutOfRangeException(nameof(count), $"MaxVisibleItems: value {count} is out of range [1, 5].")); +// } +// _menu.MaxVisibleOptions = Math.Clamp(count, 1, 5); +// return this; +// } + +// public IMenuDesign SetColor( Color color ) +// { +// _menu.RenderColor = color; +// return this; +// } + +// public IMenuDesign SetVerticalScrollStyle( MenuVerticalScrollStyle style ) +// { +// _menu.VerticalScrollStyle = style; +// return this; +// } + +// public IMenuDesign SetGlobalHorizontalStyle( MenuHorizontalStyle style ) +// { +// _menu.HorizontalStyle = style; +// return this; +// } +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/MenuDesignAPI.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/MenuDesignAPI.cs new file mode 100644 index 000000000..18a3af879 --- /dev/null +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/MenuDesignAPI.cs @@ -0,0 +1,139 @@ +using SwiftlyS2.Shared.Menus; + +namespace SwiftlyS2.Core.Menus; + +internal sealed class MenuDesignAPI : IMenuDesignAPI +{ + private readonly MenuConfiguration configuration; + private readonly IMenuBuilderAPI builder; + private readonly Action setScrollStyle; + // private readonly Action setTextStyle; + + public MenuDesignAPI( MenuConfiguration configuration, IMenuBuilderAPI builder, Action setScrollStyle/*, Action setTextStyle*/ ) + { + this.configuration = configuration; + this.builder = builder; + this.setScrollStyle = setScrollStyle; + // this.setTextStyle = setTextStyle; + } + + public IMenuBuilderAPI SetMenuTitle( string? title = null ) + { + configuration.Title = title ?? "Menu"; + return builder; + } + + public IMenuBuilderAPI SetMenuTitleVisible( bool visible = true ) + { + configuration.HideTitle = !visible; + return builder; + } + + public IMenuBuilderAPI SetMenuFooterVisible( bool visible = true ) + { + configuration.HideFooter = !visible; + return builder; + } + + public IMenuBuilderAPI SetMaxVisibleItems( int count = 5 ) + { + configuration.MaxVisibleItems = count; + return builder; + } + + public IMenuBuilderAPI EnableAutoAdjustVisibleItems() + { + configuration.AutoIncreaseVisibleItems = true; + return builder; + } + + public IMenuBuilderAPI DisableAutoAdjustVisibleItems() + { + configuration.AutoIncreaseVisibleItems = false; + return builder; + } + + public IMenuBuilderAPI SetGlobalScrollStyle( MenuOptionScrollStyle style ) + { + setScrollStyle(style); + return builder; + } + + public IMenuBuilderAPI SetNavigationMarkerColor( string? hexColor = null ) + { + configuration.NavigationMarkerColor = hexColor; + return builder; + } + + public IMenuBuilderAPI SetNavigationMarkerColor( Shared.Natives.Color color ) + { + configuration.NavigationMarkerColor = color.ToHex(); + return builder; + } + + public IMenuBuilderAPI SetNavigationMarkerColor( System.Drawing.Color color ) + { + configuration.NavigationMarkerColor = $"#{color.R:X2}{color.G:X2}{color.B:X2}"; + return builder; + } + + public IMenuBuilderAPI SetMenuFooterColor( string? hexColor = null ) + { + configuration.FooterColor = hexColor; + return builder; + } + + public IMenuBuilderAPI SetMenuFooterColor( Shared.Natives.Color color ) + { + configuration.FooterColor = color.ToHex(); + return builder; + } + + public IMenuBuilderAPI SetMenuFooterColor( System.Drawing.Color color ) + { + configuration.FooterColor = $"#{color.R:X2}{color.G:X2}{color.B:X2}"; + return builder; + } + + public IMenuBuilderAPI SetVisualGuideLineColor( string? hexColor = null ) + { + configuration.VisualGuideLineColor = hexColor; + return builder; + } + + public IMenuBuilderAPI SetVisualGuideLineColor( Shared.Natives.Color color ) + { + configuration.VisualGuideLineColor = color.ToHex(); + return builder; + } + + public IMenuBuilderAPI SetVisualGuideLineColor( System.Drawing.Color color ) + { + configuration.VisualGuideLineColor = $"#{color.R:X2}{color.G:X2}{color.B:X2}"; + return builder; + } + + public IMenuBuilderAPI SetDisabledColor( string? hexColor = null ) + { + configuration.DisabledColor = hexColor; + return builder; + } + + public IMenuBuilderAPI SetDisabledColor( Shared.Natives.Color color ) + { + configuration.DisabledColor = color.ToHex(); + return builder; + } + + public IMenuBuilderAPI SetDisabledColor( System.Drawing.Color color ) + { + configuration.DisabledColor = $"#{color.R:X2}{color.G:X2}{color.B:X2}"; + return builder; + } + + // public IMenuBuilderAPI SetGlobalOptionTextStyle( MenuOptionTextStyle style ) + // { + // setTextStyle(style); + // return builder; + // } +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/MenuManager.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/MenuManager.cs index 2832a4ebe..de6ef2b76 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Menus/MenuManager.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/MenuManager.cs @@ -1,338 +1,339 @@ -using System.Collections.Concurrent; -using System.Globalization; -using SwiftlyS2.Core.Menu.Options; -using SwiftlyS2.Core.Natives; -using SwiftlyS2.Shared; -using SwiftlyS2.Shared.Events; -using SwiftlyS2.Shared.Menus; -using SwiftlyS2.Shared.Players; -using SwiftlyS2.Shared.Sounds; - -namespace SwiftlyS2.Core.Menus; - -internal class MenuManager : IMenuManager -{ - public MenuSettings Settings { get; set; } = new MenuSettings(); - - public event Action? OnMenuClosed; - public event Action? OnMenuOpened; - public event Action? OnMenuRendered; - - private static readonly Dictionary StringToKeyKind = new() - { - { "mouse1", KeyKind.Mouse1 }, - { "mouse2", KeyKind.Mouse2 }, - { "space", KeyKind.Space }, - { "ctrl", KeyKind.Ctrl }, - { "w", KeyKind.W }, - { "a", KeyKind.A }, - { "s", KeyKind.S }, - { "d", KeyKind.D }, - { "e", KeyKind.E }, - { "esc", KeyKind.Esc }, - { "r", KeyKind.R }, - { "alt", KeyKind.Alt }, - { "shift", KeyKind.Shift }, - { "weapon1", KeyKind.Weapon1 }, - { "weapon2", KeyKind.Weapon2 }, - { "grenade1", KeyKind.Grenade1 }, - { "grenade2", KeyKind.Grenade2 }, - { "tab", KeyKind.Tab }, - { "f", KeyKind.F }, - }; - - private ConcurrentDictionary OpenMenus { get; set; } = new(); - private ISwiftlyCore _Core { get; set; } - - private SoundEvent _useSound = new(); - private SoundEvent _exitSound = new(); - private SoundEvent _scrollSound = new(); - - public MenuManager( ISwiftlyCore core ) - { - _Core = core; - var settings = NativeEngineHelpers.GetMenuSettings(); - var parts = settings.Split('\x01'); - Settings = new MenuSettings { - NavigationPrefix = parts[0], - InputMode = parts[1], - ButtonsUse = parts[2], - ButtonsScroll = parts[3], - ButtonsScrollBack = parts[4], - ButtonsExit = parts[5], - SoundUseName = parts[6], - SoundUseVolume = float.Parse(parts[7], CultureInfo.InvariantCulture), - SoundScrollName = parts[8], - SoundScrollVolume = float.Parse(parts[9], CultureInfo.InvariantCulture), - SoundExitName = parts[10], - SoundExitVolume = float.Parse(parts[11], CultureInfo.InvariantCulture), - ItemsPerPage = int.Parse(parts[12]), - }; - - _scrollSound.Name = Settings.SoundScrollName; - _scrollSound.Volume = Settings.SoundScrollVolume; - - _useSound.Name = Settings.SoundUseName; - _useSound.Volume = Settings.SoundUseVolume; - - _exitSound.Name = Settings.SoundExitName; - _exitSound.Volume = Settings.SoundExitVolume; - - _Core.Event.OnClientKeyStateChanged += KeyStateChange; - _Core.Event.OnClientDisconnected += OnClientDisconnected; - _Core.Event.OnMapUnload += OnMapUnload; - } - - ~MenuManager() - { - CloseAllMenus(); - - _Core.Event.OnClientKeyStateChanged -= KeyStateChange; - _Core.Event.OnClientDisconnected -= OnClientDisconnected; - _Core.Event.OnMapUnload -= OnMapUnload; - } - - void KeyStateChange( IOnClientKeyStateChangedEvent @event ) - { - var player = _Core.PlayerManager.GetPlayer(@event.PlayerId); - var menu = GetMenu(player); - if (menu == null) return; - if (!@event.Pressed) return; - - if (Settings.InputMode == "button") - { - var scrollKey = menu.ButtonOverrides?.Move ?? StringToKeyKind.GetValueOrDefault(Settings.ButtonsScroll); - var scrollBackKey = menu.ButtonOverrides?.MoveBack ?? StringToKeyKind.GetValueOrDefault(Settings.ButtonsScrollBack); - var exitKey = menu.ButtonOverrides?.Exit ?? StringToKeyKind.GetValueOrDefault(Settings.ButtonsExit); - var useKey = menu.ButtonOverrides?.Select ?? StringToKeyKind.GetValueOrDefault(Settings.ButtonsUse); - - new Dictionary { { "Scroll", scrollKey }, { "ScrollBack", scrollBackKey }, { "Exit", exitKey }, { "Use", useKey } } - .GroupBy(kvp => kvp.Value) - .Where(g => g.Count() > 1 && @event.Key.HasFlag(g.Key)) - .ToList() - .ForEach(group => - { - Spectre.Console.AnsiConsole.WriteException( - new InvalidOperationException($"Duplicate key binding detected in menu '{menu.Title}': Key '{group.Key}' is used by: {string.Join(", ", group.Select(kvp => kvp.Key))}") - ); - }); - - if (@event.Key == scrollKey) - { - menu.MoveSelection(player, 1); - - if (menu.HasSound) - { - _scrollSound.Recipients.AddRecipient(@event.PlayerId); - _scrollSound.Emit(); - _scrollSound.Recipients.RemoveRecipient(@event.PlayerId); - } - } - else if (@event.Key == scrollBackKey) - { - menu.MoveSelection(player, -1); - - if (menu.HasSound) - { - _scrollSound.Recipients.AddRecipient(@event.PlayerId); - _scrollSound.Emit(); - _scrollSound.Recipients.RemoveRecipient(@event.PlayerId); - } - } - else if (@event.Key == exitKey) - { - _Core.Menus.CloseMenuForPlayer(player); - - if (menu.HasSound) - { - _exitSound.Recipients.AddRecipient(@event.PlayerId); - _exitSound.Emit(); - _exitSound.Recipients.RemoveRecipient(@event.PlayerId); - } - } - else if (@event.Key == useKey) - { - var option = menu.GetCurrentOption(player); - if (option is SliderMenuButton || option is ChoiceMenuOption) - { - menu.UseSlideOption(player, true); - } - else - { - menu.UseSelection(player); - } - - if (menu.HasSound && (option?.HasSound() ?? false)) - { - _useSound.Recipients.AddRecipient(@event.PlayerId); - _useSound.Emit(); - _useSound.Recipients.RemoveRecipient(@event.PlayerId); - } - } - } - else if (Settings.InputMode == "wasd") - { - if (@event.Key == KeyKind.W) - { - menu.MoveSelection(player, -1); - - if (menu.HasSound) - { - _scrollSound.Recipients.AddRecipient(@event.PlayerId); - _scrollSound.Emit(); - _scrollSound.Recipients.RemoveRecipient(@event.PlayerId); - } - } - else if (@event.Key == KeyKind.S) - { - menu.MoveSelection(player, 1); - - if (menu.HasSound) - { - _scrollSound.Recipients.AddRecipient(@event.PlayerId); - _scrollSound.Emit(); - _scrollSound.Recipients.RemoveRecipient(@event.PlayerId); - } - } - else if (@event.Key == KeyKind.A) - { - CloseMenuForPlayer(player); - if (menu.HasSound) - { - _exitSound.Recipients.AddRecipient(@event.PlayerId); - _exitSound.Emit(); - _exitSound.Recipients.RemoveRecipient(@event.PlayerId); - } - } - else if (@event.Key == KeyKind.D) - { - var option = menu.GetCurrentOption(player); - if (option is SliderMenuButton || option is ChoiceMenuOption) - { - menu.UseSlideOption(player, true); - } - else - { - menu.UseSelection(player); - } - - if (menu.HasSound && (option?.HasSound() ?? false)) - { - _useSound.Recipients.AddRecipient(@event.PlayerId); - _useSound.Emit(); - _useSound.Recipients.RemoveRecipient(@event.PlayerId); - } - } - } - } - - public void OnClientDisconnected( IOnClientDisconnectedEvent @event ) - { - var player = _Core.PlayerManager.GetPlayer(@event.PlayerId); - if (player == null) - { - return; - } - - if (OpenMenus.TryRemove(player, out var menu)) - { - var currentMenu = menu; - while (currentMenu != null) - { - currentMenu.Close(player); - OnMenuClosed?.Invoke(player, currentMenu); - currentMenu = currentMenu.Parent; - } - } - } - - public void OnMapUnload( IOnMapUnloadEvent _ ) - { - CloseAllMenus(); - } - - public void CloseAllMenus() - { - foreach (var kvp in OpenMenus) - { - var player = kvp.Key; - var currentMenu = kvp.Value; - while (currentMenu != null) - { - currentMenu.Close(player); - OnMenuClosed?.Invoke(player, currentMenu); - currentMenu = currentMenu.Parent; - } - } - OpenMenus.Clear(); - } - - public void CloseMenu( IMenu menu ) - { - foreach (var kvp in OpenMenus) - { - var player = kvp.Key; - var openMenu = kvp.Value; - - if (openMenu == menu) - { - CloseMenuForPlayer(player); - } - } - } - - public void CloseMenuByTitle( string title, bool exact = false ) - { - foreach (var kvp in OpenMenus) - { - var player = kvp.Key; - var menu = kvp.Value; - - if ((exact && menu.Title == title) || (!exact && menu.Title.Contains(title))) - { - CloseMenuForPlayer(player); - } - } - } - - public void CloseMenuForPlayer( IPlayer player ) - { - if (OpenMenus.TryRemove(player, out var menu)) - { - menu.Close(player); - OnMenuClosed?.Invoke(player, menu); - if (menu.Parent != null) - { - OpenMenu(player, menu.Parent); - } - } - } - - public IMenu CreateMenu( string title ) - { - return new Menu { Title = title, MenuManager = this, MaxVisibleOptions = Settings.ItemsPerPage, _Core = _Core }; - } - - public IMenu? GetMenu( IPlayer player ) - { - return OpenMenus.TryGetValue(player, out var menu) ? menu : null; - } - - public void OpenMenu( IPlayer player, IMenu menu ) - { - if (OpenMenus.TryGetValue(player, out var currentMenu)) - { - currentMenu.Close(player); - OnMenuClosed?.Invoke(player, currentMenu); - } - - OpenMenus[player] = menu; - menu.Show(player); - OnMenuOpened?.Invoke(player, menu); - } - - public bool HasMenuOpen( IPlayer player ) - { - return NativePlayer.HasMenuShown(player.PlayerID); - } -} \ No newline at end of file +// using System.Collections.Concurrent; +// using System.Globalization; +// using SwiftlyS2.Core.Menu.Options; +// using SwiftlyS2.Core.Natives; +// using SwiftlyS2.Shared; +// using SwiftlyS2.Shared.Events; +// using SwiftlyS2.Shared.Menus; +// using SwiftlyS2.Shared.Players; +// using SwiftlyS2.Shared.Sounds; + +// namespace SwiftlyS2.Core.Menus; + +// [Obsolete("MenuManager will be deprecared at the release of SwiftlyS2. Please use MenuManagerAPI instead")] +// internal class MenuManager : IMenuManager +// { +// public MenuSettings Settings { get; set; } = new MenuSettings(); + +// public event Action? OnMenuClosed; +// public event Action? OnMenuOpened; +// public event Action? OnMenuRendered; + +// private static readonly Dictionary StringToKeyKind = new() +// { +// { "mouse1", KeyKind.Mouse1 }, +// { "mouse2", KeyKind.Mouse2 }, +// { "space", KeyKind.Space }, +// { "ctrl", KeyKind.Ctrl }, +// { "w", KeyKind.W }, +// { "a", KeyKind.A }, +// { "s", KeyKind.S }, +// { "d", KeyKind.D }, +// { "e", KeyKind.E }, +// { "esc", KeyKind.Esc }, +// { "r", KeyKind.R }, +// { "alt", KeyKind.Alt }, +// { "shift", KeyKind.Shift }, +// { "weapon1", KeyKind.Weapon1 }, +// { "weapon2", KeyKind.Weapon2 }, +// { "grenade1", KeyKind.Grenade1 }, +// { "grenade2", KeyKind.Grenade2 }, +// { "tab", KeyKind.Tab }, +// { "f", KeyKind.F }, +// }; + +// private ConcurrentDictionary OpenMenus { get; set; } = new(); +// private ISwiftlyCore _Core { get; set; } + +// private SoundEvent _useSound = new(); +// private SoundEvent _exitSound = new(); +// private SoundEvent _scrollSound = new(); + +// public MenuManager( ISwiftlyCore core ) +// { +// _Core = core; +// var settings = NativeEngineHelpers.GetMenuSettings(); +// var parts = settings.Split('\x01'); +// Settings = new MenuSettings { +// NavigationPrefix = parts[0], +// InputMode = parts[1], +// ButtonsUse = parts[2], +// ButtonsScroll = parts[3], +// ButtonsScrollBack = parts[4], +// ButtonsExit = parts[5], +// SoundUseName = parts[6], +// SoundUseVolume = float.Parse(parts[7], CultureInfo.InvariantCulture), +// SoundScrollName = parts[8], +// SoundScrollVolume = float.Parse(parts[9], CultureInfo.InvariantCulture), +// SoundExitName = parts[10], +// SoundExitVolume = float.Parse(parts[11], CultureInfo.InvariantCulture), +// ItemsPerPage = int.Parse(parts[12]), +// }; + +// _scrollSound.Name = Settings.SoundScrollName; +// _scrollSound.Volume = Settings.SoundScrollVolume; + +// _useSound.Name = Settings.SoundUseName; +// _useSound.Volume = Settings.SoundUseVolume; + +// _exitSound.Name = Settings.SoundExitName; +// _exitSound.Volume = Settings.SoundExitVolume; + +// _Core.Event.OnClientKeyStateChanged += KeyStateChange; +// _Core.Event.OnClientDisconnected += OnClientDisconnected; +// _Core.Event.OnMapUnload += OnMapUnload; +// } + +// ~MenuManager() +// { +// CloseAllMenus(); + +// _Core.Event.OnClientKeyStateChanged -= KeyStateChange; +// _Core.Event.OnClientDisconnected -= OnClientDisconnected; +// _Core.Event.OnMapUnload -= OnMapUnload; +// } + +// void KeyStateChange( IOnClientKeyStateChangedEvent @event ) +// { +// var player = _Core.PlayerManager.GetPlayer(@event.PlayerId); +// var menu = GetMenu(player); +// if (menu == null) return; +// if (!@event.Pressed) return; + +// if (Settings.InputMode == "button") +// { +// var scrollKey = menu.ButtonOverrides?.Move ?? StringToKeyKind.GetValueOrDefault(Settings.ButtonsScroll); +// var scrollBackKey = menu.ButtonOverrides?.MoveBack ?? StringToKeyKind.GetValueOrDefault(Settings.ButtonsScrollBack); +// var exitKey = menu.ButtonOverrides?.Exit ?? StringToKeyKind.GetValueOrDefault(Settings.ButtonsExit); +// var useKey = menu.ButtonOverrides?.Select ?? StringToKeyKind.GetValueOrDefault(Settings.ButtonsUse); + +// new Dictionary { { "Scroll", scrollKey }, { "ScrollBack", scrollBackKey }, { "Exit", exitKey }, { "Use", useKey } } +// .GroupBy(kvp => kvp.Value) +// .Where(g => g.Count() > 1 && @event.Key.HasFlag(g.Key)) +// .ToList() +// .ForEach(group => +// { +// Spectre.Console.AnsiConsole.WriteException( +// new InvalidOperationException($"Duplicate key binding detected in menu '{menu.Title}': Key '{group.Key}' is used by: {string.Join(", ", group.Select(kvp => kvp.Key))}") +// ); +// }); + +// if (@event.Key == scrollKey) +// { +// menu.MoveSelection(player, 1); + +// if (menu.HasSound) +// { +// _scrollSound.Recipients.AddRecipient(@event.PlayerId); +// _scrollSound.Emit(); +// _scrollSound.Recipients.RemoveRecipient(@event.PlayerId); +// } +// } +// else if (@event.Key == scrollBackKey) +// { +// menu.MoveSelection(player, -1); + +// if (menu.HasSound) +// { +// _scrollSound.Recipients.AddRecipient(@event.PlayerId); +// _scrollSound.Emit(); +// _scrollSound.Recipients.RemoveRecipient(@event.PlayerId); +// } +// } +// else if (@event.Key == exitKey) +// { +// _Core.Menus.CloseMenuForPlayer(player); + +// if (menu.HasSound) +// { +// _exitSound.Recipients.AddRecipient(@event.PlayerId); +// _exitSound.Emit(); +// _exitSound.Recipients.RemoveRecipient(@event.PlayerId); +// } +// } +// else if (@event.Key == useKey) +// { +// var option = menu.GetCurrentOption(player); +// if (option is SliderMenuButton || option is ChoiceMenuOption) +// { +// menu.UseSlideOption(player, true); +// } +// else +// { +// menu.UseSelection(player); +// } + +// if (menu.HasSound && (option?.HasSound() ?? false)) +// { +// _useSound.Recipients.AddRecipient(@event.PlayerId); +// _useSound.Emit(); +// _useSound.Recipients.RemoveRecipient(@event.PlayerId); +// } +// } +// } +// else if (Settings.InputMode == "wasd") +// { +// if (@event.Key == KeyKind.W) +// { +// menu.MoveSelection(player, -1); + +// if (menu.HasSound) +// { +// _scrollSound.Recipients.AddRecipient(@event.PlayerId); +// _scrollSound.Emit(); +// _scrollSound.Recipients.RemoveRecipient(@event.PlayerId); +// } +// } +// else if (@event.Key == KeyKind.S) +// { +// menu.MoveSelection(player, 1); + +// if (menu.HasSound) +// { +// _scrollSound.Recipients.AddRecipient(@event.PlayerId); +// _scrollSound.Emit(); +// _scrollSound.Recipients.RemoveRecipient(@event.PlayerId); +// } +// } +// else if (@event.Key == KeyKind.A) +// { +// CloseMenuForPlayer(player); +// if (menu.HasSound) +// { +// _exitSound.Recipients.AddRecipient(@event.PlayerId); +// _exitSound.Emit(); +// _exitSound.Recipients.RemoveRecipient(@event.PlayerId); +// } +// } +// else if (@event.Key == KeyKind.D) +// { +// var option = menu.GetCurrentOption(player); +// if (option is SliderMenuButton || option is ChoiceMenuOption) +// { +// menu.UseSlideOption(player, true); +// } +// else +// { +// menu.UseSelection(player); +// } + +// if (menu.HasSound && (option?.HasSound() ?? false)) +// { +// _useSound.Recipients.AddRecipient(@event.PlayerId); +// _useSound.Emit(); +// _useSound.Recipients.RemoveRecipient(@event.PlayerId); +// } +// } +// } +// } + +// public void OnClientDisconnected( IOnClientDisconnectedEvent @event ) +// { +// var player = _Core.PlayerManager.GetPlayer(@event.PlayerId); +// if (player == null) +// { +// return; +// } + +// if (OpenMenus.TryRemove(player, out var menu)) +// { +// var currentMenu = menu; +// while (currentMenu != null) +// { +// currentMenu.Close(player); +// OnMenuClosed?.Invoke(player, currentMenu); +// currentMenu = currentMenu.Parent; +// } +// } +// } + +// public void OnMapUnload( IOnMapUnloadEvent _ ) +// { +// CloseAllMenus(); +// } + +// public void CloseAllMenus() +// { +// foreach (var kvp in OpenMenus) +// { +// var player = kvp.Key; +// var currentMenu = kvp.Value; +// while (currentMenu != null) +// { +// currentMenu.Close(player); +// OnMenuClosed?.Invoke(player, currentMenu); +// currentMenu = currentMenu.Parent; +// } +// } +// OpenMenus.Clear(); +// } + +// public void CloseMenu( IMenu menu ) +// { +// foreach (var kvp in OpenMenus) +// { +// var player = kvp.Key; +// var openMenu = kvp.Value; + +// if (openMenu == menu) +// { +// CloseMenuForPlayer(player); +// } +// } +// } + +// public void CloseMenuByTitle( string title, bool exact = false ) +// { +// foreach (var kvp in OpenMenus) +// { +// var player = kvp.Key; +// var menu = kvp.Value; + +// if ((exact && menu.Title == title) || (!exact && menu.Title.Contains(title))) +// { +// CloseMenuForPlayer(player); +// } +// } +// } + +// public void CloseMenuForPlayer( IPlayer player ) +// { +// if (OpenMenus.TryRemove(player, out var menu)) +// { +// menu.Close(player); +// OnMenuClosed?.Invoke(player, menu); +// if (menu.Parent != null) +// { +// OpenMenu(player, menu.Parent); +// } +// } +// } + +// public IMenu CreateMenu( string title ) +// { +// return new Menu { Title = title, MenuManager = this, MaxVisibleOptions = Settings.ItemsPerPage, _Core = _Core }; +// } + +// public IMenu? GetMenu( IPlayer player ) +// { +// return OpenMenus.TryGetValue(player, out var menu) ? menu : null; +// } + +// public void OpenMenu( IPlayer player, IMenu menu ) +// { +// if (OpenMenus.TryGetValue(player, out var currentMenu)) +// { +// currentMenu.Close(player); +// OnMenuClosed?.Invoke(player, currentMenu); +// } + +// OpenMenus[player] = menu; +// menu.Show(player); +// OnMenuOpened?.Invoke(player, menu); +// } + +// public bool HasMenuOpen( IPlayer player ) +// { +// return NativePlayer.HasMenuShown(player.PlayerID); +// } +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/MenuManagerAPI.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/MenuManagerAPI.cs new file mode 100644 index 000000000..1e61e5006 --- /dev/null +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/MenuManagerAPI.cs @@ -0,0 +1,401 @@ +using System.Globalization; +using System.Collections.Concurrent; +using SwiftlyS2.Core.Natives; +using SwiftlyS2.Shared; +using SwiftlyS2.Shared.Menus; +using SwiftlyS2.Shared.Events; +using SwiftlyS2.Shared.Sounds; +using SwiftlyS2.Shared.Players; +using SwiftlyS2.Shared.SchemaDefinitions; + +namespace SwiftlyS2.Core.Menus; + +internal sealed class MenuManagerAPI : IMenuManagerAPI +{ + /// + /// The SwiftlyS2 core instance. + /// + public ISwiftlyCore Core { get; init; } + + /// + /// Global Configuration settings for all menus. + /// + public MenuManagerConfiguration Configuration { get; init; } + + /// + /// Fired when a menu is closed for a player. + /// + public event EventHandler? MenuClosed; + + /// + /// Fired when a menu is opened for a player. + /// + public event EventHandler? MenuOpened; + + private readonly ConcurrentDictionary openMenus = new(); + private readonly ConcurrentDictionary<(IPlayer, IMenuAPI), Action?> onClosedCallbacks = new(); + private readonly SoundEvent useSound = new(); + private readonly SoundEvent exitSound = new(); + private readonly SoundEvent scrollSound = new(); + private readonly KeyBind buttonsScroll; + private readonly KeyBind buttonsScrollBack; + private readonly KeyBind buttonsExit; + private readonly KeyBind buttonsUse; + + private static readonly Dictionary StringToKeyBind = new() { + ["mouse1"] = KeyBind.Mouse1, + ["mouse2"] = KeyBind.Mouse2, + ["space"] = KeyBind.Space, + ["ctrl"] = KeyBind.Ctrl, + ["w"] = KeyBind.W, + ["a"] = KeyBind.A, + ["s"] = KeyBind.S, + ["d"] = KeyBind.D, + ["e"] = KeyBind.E, + ["esc"] = KeyBind.Esc, + ["r"] = KeyBind.R, + ["alt"] = KeyBind.Alt, + ["shift"] = KeyBind.Shift, + ["weapon1"] = KeyBind.Weapon1, + ["weapon2"] = KeyBind.Weapon2, + ["grenade1"] = KeyBind.Grenade1, + ["grenade2"] = KeyBind.Grenade2, + ["tab"] = KeyBind.Tab, + ["f"] = KeyBind.F, + }; + + public MenuManagerAPI( ISwiftlyCore core ) + { + Core = core; + + var settings = NativeEngineHelpers.GetMenuSettings().Trim().Split('\x01'); + Configuration = new MenuManagerConfiguration { + NavigationPrefix = settings[0], + InputMode = settings[1], + ButtonsUse = settings[2], + ButtonsScroll = settings[3], + ButtonsScrollBack = settings[4], + ButtonsExit = settings[5], + SoundUseName = settings[6], + SoundUseVolume = float.Parse(settings[7], CultureInfo.InvariantCulture), + SoundScrollName = settings[8], + SoundScrollVolume = float.Parse(settings[9], CultureInfo.InvariantCulture), + SoundExitName = settings[10], + SoundExitVolume = float.Parse(settings[11], CultureInfo.InvariantCulture), + ItemsPerPage = int.Parse(settings[12]), + }; + + scrollSound.Name = Configuration.SoundScrollName; + scrollSound.Volume = Configuration.SoundScrollVolume; + useSound.Name = Configuration.SoundUseName; + useSound.Volume = Configuration.SoundUseVolume; + exitSound.Name = Configuration.SoundExitName; + exitSound.Volume = Configuration.SoundExitVolume; + buttonsScroll = StringToKeyBind.GetValueOrDefault(Configuration.ButtonsScroll.Trim().ToLower()); + buttonsScrollBack = StringToKeyBind.GetValueOrDefault(Configuration.ButtonsScrollBack.Trim().ToLower()); + buttonsExit = StringToKeyBind.GetValueOrDefault(Configuration.ButtonsExit.Trim().ToLower()); + buttonsUse = StringToKeyBind.GetValueOrDefault(Configuration.ButtonsUse.Trim().ToLower()); + + openMenus.Clear(); + onClosedCallbacks.Clear(); + + Core.Event.OnClientKeyStateChanged += KeyStateChange; + Core.Event.OnClientDisconnected += OnClientDisconnected; + Core.Event.OnMapUnload += OnMapUnload; + } + + ~MenuManagerAPI() + { + CloseAllMenus(); + + openMenus.Clear(); + onClosedCallbacks.Clear(); + + Core.Event.OnClientKeyStateChanged -= KeyStateChange; + Core.Event.OnClientDisconnected -= OnClientDisconnected; + Core.Event.OnMapUnload -= OnMapUnload; + } + + private void KeyStateChange( IOnClientKeyStateChangedEvent @event ) + { + if (openMenus.IsEmpty) + { + return; + } + + var player = Core.PlayerManager.GetPlayer(@event.PlayerId); + var menu = GetCurrentMenu(player); + + if (menu == null || !player.IsValid || player.IsFakeClient || !@event.Pressed) + { + return; + } + + if (Configuration.InputMode.Trim().Equals("button", StringComparison.CurrentCultureIgnoreCase)) + { + var scrollKey = menu.KeybindOverrides.Move ?? buttonsScroll; + var scrollBackKey = menu.KeybindOverrides.MoveBack ?? buttonsScrollBack; + var exitKey = menu.KeybindOverrides.Exit ?? buttonsExit; + var useKey = menu.KeybindOverrides.Select ?? buttonsUse; + + if (scrollKey.HasFlag(@event.Key.ToKeyBind())) + { + _ = menu.MoveToOptionIndex(player, menu.GetCurrentOptionIndex(player) + 1); + + if (menu.Configuration.PlaySound) + { + scrollSound.Recipients.AddRecipient(@event.PlayerId); + scrollSound.Emit(); + scrollSound.Recipients.RemoveRecipient(@event.PlayerId); + } + } + else if (scrollBackKey.HasFlag(@event.Key.ToKeyBind())) + { + _ = menu.MoveToOptionIndex(player, menu.GetCurrentOptionIndex(player) - 1); + + if (menu.Configuration.PlaySound) + { + scrollSound.Recipients.AddRecipient(@event.PlayerId); + scrollSound.Emit(); + scrollSound.Recipients.RemoveRecipient(@event.PlayerId); + } + } + else if (exitKey.HasFlag(@event.Key.ToKeyBind())) + { + CloseMenuForPlayer(player, menu); + + if (menu.Configuration.PlaySound) + { + exitSound.Recipients.AddRecipient(@event.PlayerId); + exitSound.Emit(); + exitSound.Recipients.RemoveRecipient(@event.PlayerId); + } + } + else if (useKey.HasFlag(@event.Key.ToKeyBind())) + { + var option = menu.GetCurrentOption(player); + if (option != null && option.Enabled && option.GetEnabled(player) && option.IsClickTaskCompleted(player)) + { + _ = Task.Run(async () => await option.OnClickAsync(player)); + + if (menu.Configuration.PlaySound && option.PlaySound) + { + useSound.Recipients.AddRecipient(@event.PlayerId); + useSound.Emit(); + useSound.Recipients.RemoveRecipient(@event.PlayerId); + } + } + } + } + else if (Configuration.InputMode.Trim().Equals("wasd", StringComparison.CurrentCultureIgnoreCase)) + { + if (KeyBind.W.HasFlag(@event.Key.ToKeyBind())) + { + _ = menu.MoveToOptionIndex(player, menu.GetCurrentOptionIndex(player) - 1); + + if (menu.Configuration.PlaySound) + { + scrollSound.Recipients.AddRecipient(@event.PlayerId); + scrollSound.Emit(); + scrollSound.Recipients.RemoveRecipient(@event.PlayerId); + } + } + else if (KeyBind.S.HasFlag(@event.Key.ToKeyBind())) + { + _ = menu.MoveToOptionIndex(player, menu.GetCurrentOptionIndex(player) + 1); + + if (menu.Configuration.PlaySound) + { + scrollSound.Recipients.AddRecipient(@event.PlayerId); + scrollSound.Emit(); + scrollSound.Recipients.RemoveRecipient(@event.PlayerId); + } + } + else if (KeyBind.A.HasFlag(@event.Key.ToKeyBind())) + { + CloseMenuForPlayer(player, menu); + if (menu.Configuration.PlaySound) + { + exitSound.Recipients.AddRecipient(@event.PlayerId); + exitSound.Emit(); + exitSound.Recipients.RemoveRecipient(@event.PlayerId); + } + } + else if (KeyBind.D.HasFlag(@event.Key.ToKeyBind())) + { + var option = menu.GetCurrentOption(player); + if (option != null && option.Enabled && option.GetEnabled(player) && option.IsClickTaskCompleted(player)) + { + _ = Task.Run(async () => await option.OnClickAsync(player)); + + if (menu.Configuration.PlaySound && option.PlaySound) + { + useSound.Recipients.AddRecipient(@event.PlayerId); + useSound.Emit(); + useSound.Recipients.RemoveRecipient(@event.PlayerId); + } + } + } + } + } + + private void OnClientDisconnected( IOnClientDisconnectedEvent @event ) + { + var player = Core.PlayerManager.GetPlayer(@event.PlayerId); + if (player != null) + { + openMenus + .Where(kvp => kvp.Key == player) + .ToList() + .ForEach(kvp => CloseMenuForPlayer(player, kvp.Value)); + } + } + + private void OnMapUnload( IOnMapUnloadEvent _ ) + { + CloseAllMenus(); + } + + public IMenuBuilderAPI CreateBuilder() + { + return new MenuBuilderAPI(Core); + } + + public IMenuAPI CreateMenu( MenuConfiguration configuration, MenuKeybindOverrides keybindOverrides, IMenuAPI? parent = null, MenuOptionScrollStyle optionScrollStyle = MenuOptionScrollStyle.CenterFixed, MenuOptionTextStyle optionTextStyle = MenuOptionTextStyle.TruncateEnd ) + { + var bindingList = new Dictionary { + ["Scroll"] = keybindOverrides.Move ?? buttonsScroll, + ["ScrollBack"] = keybindOverrides.MoveBack ?? buttonsScrollBack, + ["Exit"] = keybindOverrides.Exit ?? buttonsExit, + ["Use"] = keybindOverrides.Select ?? buttonsUse + }.ToList(); + + for (var i = 0; i < bindingList.Count; i++) + { + for (var j = i + 1; j < bindingList.Count; j++) + { + var binding1 = bindingList[i]; + var binding2 = bindingList[j]; + var overlap = binding1.Value & binding2.Value; + + if (overlap != 0) + { + Spectre.Console.AnsiConsole.WriteException( + new InvalidOperationException( + $"Key binding conflict detected in menu '{configuration.Title}': '{binding1.Key}' and '{binding2.Key}' share overlapping keys: {overlap}" + ) + ); + } + } + } + + return new MenuAPI(Core, configuration, keybindOverrides, null/*, parent*/, optionScrollStyle/*, optionTextStyle*/) { Parent = (parent, null) }; + } + + public IMenuAPI? GetCurrentMenu( IPlayer player ) + { + return openMenus.TryGetValue(player, out var menu) ? menu : null; + } + + public void OpenMenu( IMenuAPI menu ) + { + Core.PlayerManager + .GetAllPlayers() + .Where(player => player.IsValid && !player.IsFakeClient && (player.Controller?.IsValid ?? false)) + .ToList() + .ForEach(player => OpenMenuForPlayer(player, menu)); + } + + public void OpenMenu( IMenuAPI menu, Action onClosed ) + { + Core.PlayerManager + .GetAllPlayers() + .Where(player => player.IsValid && !player.IsFakeClient && (player.Controller?.IsValid ?? false)) + .ToList() + .ForEach(player => OpenMenuForPlayer(player, menu, onClosed)); + } + + public void OpenMenuForPlayer( IPlayer player, IMenuAPI menu ) + { + if (openMenus.TryGetValue(player, out var currentMenu) && currentMenu != null) + { + if (menu.Parent.ParentMenu == currentMenu) + { + // We are transitioning from the current menu to one of its submenus. + // To show the submenu, we first need to close the current (parent) menu, see CloseMenuForPlayer. + // The parent menu may have an onClosed callback registered in onClosedCallbacks. + // If we do not remove that callback temporarily, closing the parent menu here + // would incorrectly invoke the callback even though the user is only navigating + // deeper into the menu hierarchy (parent -> submenu), not actually finishing the overall menu flow. + // Therefore we: + // 1. Temporarily remove the callback associated with the current menu. + // 2. Close the current (parent) menu as part of the navigation process. + // 3. Re-register the callback so it will only be invoked later, when the + // logical end of the menu flow is reached and the menu is truly closed. + _ = onClosedCallbacks.TryRemove((player, currentMenu), out var callback); + CloseMenuForPlayer(player, currentMenu); + _ = onClosedCallbacks.AddOrUpdate((player, currentMenu), callback, ( _, _ ) => callback); + } + else + { + CloseMenuForPlayer(player, currentMenu); + } + } + + _ = openMenus.AddOrUpdate(player, menu, ( _, _ ) => menu); + menu.ShowForPlayer(player); + MenuOpened?.Invoke(this, new MenuManagerEventArgs { Player = player, Menu = menu }); + } + + public void OpenMenuForPlayer( IPlayer player, IMenuAPI menu, Action onClosed ) + { + OpenMenuForPlayer(player, menu); + _ = onClosedCallbacks.AddOrUpdate((player, menu), onClosed, ( _, _ ) => onClosed); + } + + public void CloseMenu( IMenuAPI menu ) + { + Core.PlayerManager + .GetAllPlayers() + .ToList() + .ForEach(player => CloseMenuForPlayer(player, menu)); + } + + public void CloseMenuForPlayer( IPlayer player, IMenuAPI menu ) + { + if (!openMenus.TryGetValue(player, out var currentMenu) || currentMenu != menu) + { + return; + } + if (onClosedCallbacks.TryRemove((player, menu), out var onClosed) && onClosed != null) + { + onClosed(player, menu); + } + + if (openMenus.TryRemove(player, out _)) + { + menu.HideForPlayer(player); + MenuClosed?.Invoke(this, new MenuManagerEventArgs { Player = player, Menu = menu }); + + if (menu.Parent.ParentMenu != null) + { + OpenMenuForPlayer(player, menu.Parent.ParentMenu); + } + } + } + + public void CloseAllMenus() + { + openMenus.ToList().ForEach(kvp => + { + var currentMenu = kvp.Value; + while (currentMenu != null) + { + currentMenu.HideForPlayer(kvp.Key); + MenuClosed?.Invoke(this, new MenuManagerEventArgs { Player = kvp.Key, Menu = currentMenu }); + currentMenu = currentMenu.Parent.ParentMenu; + } + _ = openMenus.TryRemove(kvp.Key, out _); + }); + } +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/MenuSizeHelper.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/MenuSizeHelper.cs index 7e0050b11..247e4e414 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Menus/MenuSizeHelper.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/MenuSizeHelper.cs @@ -1,21 +1,21 @@ -using SwiftlyS2.Shared.Menus; +// using SwiftlyS2.Shared.Menus; -namespace SwiftlyS2.Core.Menus; +// namespace SwiftlyS2.Core.Menus; -internal static class MenuSizeHelper -{ - public static string GetSizeClass(IMenuTextSize size) - { - return size switch - { - IMenuTextSize.ExtraSmall => "fontSize-xs", - IMenuTextSize.Small => "fontSize-s", - IMenuTextSize.SmallMedium => "fontSize-sm", - IMenuTextSize.Medium => "fontSize-m", - IMenuTextSize.MediumLarge => "fontSize-ml", - IMenuTextSize.Large => "fontSize-l", - IMenuTextSize.ExtraLarge => "fontSize-xl", - _ => "fontSize-m" - }; - } -} \ No newline at end of file +// [Obsolete("MenuSizeHelper will be deprecared at the release of SwiftlyS2.")] +// internal static class MenuSizeHelper +// { +// public static string GetSizeClass( IMenuTextSize size ) +// { +// return size switch { +// IMenuTextSize.ExtraSmall => "fontSize-xs", +// IMenuTextSize.Small => "fontSize-s", +// IMenuTextSize.SmallMedium => "fontSize-sm", +// IMenuTextSize.Medium => "fontSize-m", +// IMenuTextSize.MediumLarge => "fontSize-ml", +// IMenuTextSize.Large => "fontSize-l", +// IMenuTextSize.ExtraLarge => "fontSize-xl", +// _ => "fontSize-m" +// }; +// } +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/AsyncButtonMenuOption.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/AsyncButtonMenuOption.cs index 043350a6d..d182a8e07 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/AsyncButtonMenuOption.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/AsyncButtonMenuOption.cs @@ -1,95 +1,96 @@ -using SwiftlyS2.Core.Menus; -using SwiftlyS2.Shared.Menus; -using SwiftlyS2.Shared.Players; - -namespace SwiftlyS2.Core.Menu.Options; - -internal class AsyncButtonMenuOption : IOption -{ - public string Text { get; set; } - public Func? OnClickAsync { get; set; } - public Func? OnClickAsyncWithOption { get; set; } - public Func? VisibilityCheck { get; set; } - public Func? EnabledCheck { get; set; } - public Func? ValidationCheck { get; set; } - public Action? OnValidationFailed { get; set; } - public IMenuTextSize Size { get; set; } - public bool CloseOnSelect { get; set; } - public IMenu? Menu { get; set; } - public MenuHorizontalStyle? OverflowStyle { get; init; } - - public bool Visible => true; - public bool Enabled => true; - public bool IsLoading { get; set; } - - private string? _loadingText; - - public AsyncButtonMenuOption( string text, Func? onClickAsync = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - Text = text; - OnClickAsync = onClickAsync; - Size = size; - OverflowStyle = overflowStyle; - } - - public AsyncButtonMenuOption( string text, Func? onClickAsync, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - Text = text; - OnClickAsyncWithOption = onClickAsync; - Size = size; - OverflowStyle = overflowStyle; - } - - public bool ShouldShow( IPlayer player ) => VisibilityCheck?.Invoke(player) ?? true; - - public bool CanInteract( IPlayer player ) => !IsLoading && (EnabledCheck?.Invoke(player) ?? true); - - public bool HasSound() => true; - - public string GetDisplayText( IPlayer player, bool updateHorizontalStyle = false ) - { - var sizeClass = MenuSizeHelper.GetSizeClass(Size); - - if (IsLoading) - { - return $"{_loadingText ?? "Loading..."}"; - } - - var text = (Menu as Menus.Menu)?.ApplyHorizontalStyle(Text, OverflowStyle, updateHorizontalStyle) ?? Text; - if (!CanInteract(player)) - { - return $"{text}"; - } - - return $"{text}"; - } - - public IMenuTextSize GetTextSize() - { - return Size; - } - - public async Task ExecuteAsync( IPlayer player, string? loadingText = null ) - { - if (OnClickAsync == null && OnClickAsyncWithOption == null) return; - - _loadingText = loadingText; - - try - { - if (OnClickAsync != null) - await OnClickAsync.Invoke(player); - else if (OnClickAsyncWithOption != null) - await OnClickAsyncWithOption.Invoke(player, this); - } - finally - { - _loadingText = null; - } - } - - public void SetLoadingText( string? text ) - { - _loadingText = text; - } -} \ No newline at end of file +// using SwiftlyS2.Core.Menus; +// using SwiftlyS2.Shared.Menus; +// using SwiftlyS2.Shared.Players; + +// namespace SwiftlyS2.Core.Menu.Options; + +// [Obsolete("AsyncButtonMenuOption will be deprecared at the release of SwiftlyS2.")] +// internal class AsyncButtonMenuOption : IOption +// { +// public string Text { get; set; } +// public Func? OnClickAsync { get; set; } +// public Func? OnClickAsyncWithOption { get; set; } +// public Func? VisibilityCheck { get; set; } +// public Func? EnabledCheck { get; set; } +// public Func? ValidationCheck { get; set; } +// public Action? OnValidationFailed { get; set; } +// public IMenuTextSize Size { get; set; } +// public bool CloseOnSelect { get; set; } +// public IMenu? Menu { get; set; } +// public MenuHorizontalStyle? OverflowStyle { get; init; } + +// public bool Visible => true; +// public bool Enabled => true; +// public bool IsLoading { get; set; } + +// private string? _loadingText; + +// public AsyncButtonMenuOption( string text, Func? onClickAsync = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// Text = text; +// OnClickAsync = onClickAsync; +// Size = size; +// OverflowStyle = overflowStyle; +// } + +// public AsyncButtonMenuOption( string text, Func? onClickAsync, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// Text = text; +// OnClickAsyncWithOption = onClickAsync; +// Size = size; +// OverflowStyle = overflowStyle; +// } + +// public bool ShouldShow( IPlayer player ) => VisibilityCheck?.Invoke(player) ?? true; + +// public bool CanInteract( IPlayer player ) => !IsLoading && (EnabledCheck?.Invoke(player) ?? true); + +// public bool HasSound() => true; + +// public string GetDisplayText( IPlayer player, bool updateHorizontalStyle = false ) +// { +// var sizeClass = MenuSizeHelper.GetSizeClass(Size); + +// if (IsLoading) +// { +// return $"{_loadingText ?? "Loading..."}"; +// } + +// var text = (Menu as Menus.Menu)?.ApplyHorizontalStyle(Text, OverflowStyle, updateHorizontalStyle) ?? Text; +// if (!CanInteract(player)) +// { +// return $"{text}"; +// } + +// return $"{text}"; +// } + +// public IMenuTextSize GetTextSize() +// { +// return Size; +// } + +// public async Task ExecuteAsync( IPlayer player, string? loadingText = null ) +// { +// if (OnClickAsync == null && OnClickAsyncWithOption == null) return; + +// _loadingText = loadingText; + +// try +// { +// if (OnClickAsync != null) +// await OnClickAsync.Invoke(player); +// else if (OnClickAsyncWithOption != null) +// await OnClickAsyncWithOption.Invoke(player, this); +// } +// finally +// { +// _loadingText = null; +// } +// } + +// public void SetLoadingText( string? text ) +// { +// _loadingText = text; +// } +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/ButtonMenuOption.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/ButtonMenuOption.cs index 9d0e9d5f6..8db8f8ada 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/ButtonMenuOption.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/ButtonMenuOption.cs @@ -1,64 +1,65 @@ -using SwiftlyS2.Core.Menus; -using SwiftlyS2.Shared.Menus; -using SwiftlyS2.Shared.Players; +// using SwiftlyS2.Core.Menus; +// using SwiftlyS2.Shared.Menus; +// using SwiftlyS2.Shared.Players; -namespace SwiftlyS2.Core.Menu.Options; +// namespace SwiftlyS2.Core.Menu.Options; -internal class ButtonMenuOption : IOption -{ - public string Text { get; set; } - public Action? OnClick { get; set; } - public Action? OnClickWithOption { get; set; } - public Func? VisibilityCheck { get; set; } - public Func? EnabledCheck { get; set; } - public Func? ValidationCheck { get; set; } - public Action? OnValidationFailed { get; set; } - public IMenuTextSize Size { get; set; } - public bool CloseOnSelect { get; set; } - public IMenu? Menu { get; set; } - public MenuHorizontalStyle? OverflowStyle { get; init; } +// [Obsolete("ButtonMenuOption will be deprecared at the release of SwiftlyS2.")] +// internal class ButtonMenuOption : IOption +// { +// public string Text { get; set; } +// public Action? OnClick { get; set; } +// public Action? OnClickWithOption { get; set; } +// public Func? VisibilityCheck { get; set; } +// public Func? EnabledCheck { get; set; } +// public Func? ValidationCheck { get; set; } +// public Action? OnValidationFailed { get; set; } +// public IMenuTextSize Size { get; set; } +// public bool CloseOnSelect { get; set; } +// public IMenu? Menu { get; set; } +// public MenuHorizontalStyle? OverflowStyle { get; init; } - public bool Visible => true; - public bool Enabled => true; +// public bool Visible => true; +// public bool Enabled => true; - public ButtonMenuOption( string text, Action? onClick = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - Text = text; - OnClick = onClick; - Size = size; - OverflowStyle = overflowStyle; - } +// public ButtonMenuOption( string text, Action? onClick = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// Text = text; +// OnClick = onClick; +// Size = size; +// OverflowStyle = overflowStyle; +// } - public ButtonMenuOption( string text, Action? onClick, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - Text = text; - OnClickWithOption = onClick; - Size = size; - OverflowStyle = overflowStyle; - } +// public ButtonMenuOption( string text, Action? onClick, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// Text = text; +// OnClickWithOption = onClick; +// Size = size; +// OverflowStyle = overflowStyle; +// } - public bool ShouldShow( IPlayer player ) => VisibilityCheck?.Invoke(player) ?? true; +// public bool ShouldShow( IPlayer player ) => VisibilityCheck?.Invoke(player) ?? true; - public bool CanInteract( IPlayer player ) => EnabledCheck?.Invoke(player) ?? true; +// public bool CanInteract( IPlayer player ) => EnabledCheck?.Invoke(player) ?? true; - public bool HasSound() => true; +// public bool HasSound() => true; - public string GetDisplayText( IPlayer player, bool updateHorizontalStyle = false ) - { - var sizeClass = MenuSizeHelper.GetSizeClass(Size); +// public string GetDisplayText( IPlayer player, bool updateHorizontalStyle = false ) +// { +// var sizeClass = MenuSizeHelper.GetSizeClass(Size); - var text = (Menu as Menus.Menu)?.ApplyHorizontalStyle(Text, OverflowStyle, updateHorizontalStyle) ?? Text; - if (!CanInteract(player)) - { - return $"{text}"; - } +// var text = (Menu as Menus.Menu)?.ApplyHorizontalStyle(Text, OverflowStyle, updateHorizontalStyle) ?? Text; +// if (!CanInteract(player)) +// { +// return $"{text}"; +// } - return $"{text}"; - } +// return $"{text}"; +// } - public IMenuTextSize GetTextSize() - { - return Size; - } +// public IMenuTextSize GetTextSize() +// { +// return Size; +// } -} \ No newline at end of file +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/ChoiceMenuButton.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/ChoiceMenuButton.cs index 6b1c4f24a..26dd7fd65 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/ChoiceMenuButton.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/ChoiceMenuButton.cs @@ -1,105 +1,106 @@ -using SwiftlyS2.Core.Menus; -using SwiftlyS2.Shared.Menus; -using SwiftlyS2.Shared.Players; -using SwiftlyS2.Shared.SchemaDefinitions; - -namespace SwiftlyS2.Core.Menu.Options; - -internal class ChoiceMenuOption : IOption -{ - public string Text { get; set; } - public List Choices { get; set; } - public int SelectedIndex { get; set; } - public Action? OnChange { get; set; } - public Action? OnChangeWithOption { get; set; } - public Func? VisibilityCheck { get; set; } - public Func? EnabledCheck { get; set; } - public IMenuTextSize Size { get; set; } - public IMenu? Menu { get; set; } - public MenuHorizontalStyle? OverflowStyle { get; init; } - - public bool Visible => true; - public bool Enabled => true; - - public string SelectedChoice => Choices.Count > 0 ? Choices[SelectedIndex] : ""; - - public ChoiceMenuOption( string text, IEnumerable choices, string? defaultChoice = null, Action? onChange = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - Text = text; - Choices = [.. choices]; - SelectedIndex = 0; - Size = size; - - if (defaultChoice != null) - { - var index = Choices.IndexOf(defaultChoice); - if (index >= 0) SelectedIndex = index; - } - - OnChange = onChange; - OverflowStyle = overflowStyle; - } - - public ChoiceMenuOption( string text, IEnumerable choices, string? defaultChoice, Action? onChange, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - Text = text; - Choices = [.. choices]; - SelectedIndex = 0; - Size = size; - - if (defaultChoice != null) - { - var index = Choices.IndexOf(defaultChoice); - if (index >= 0) SelectedIndex = index; - } - - OnChangeWithOption = onChange; - OverflowStyle = overflowStyle; - } - - public bool ShouldShow( IPlayer player ) => VisibilityCheck?.Invoke(player) ?? true; - - public bool CanInteract( IPlayer player ) => EnabledCheck?.Invoke(player) ?? true; - - public bool HasSound() => true; - - public string GetDisplayText( IPlayer player, bool updateHorizontalStyle = false ) - { - var sizeClass = MenuSizeHelper.GetSizeClass(Size); - - var choice = $"[{SelectedChoice}]"; - - var text = (Menu as Menus.Menu)?.ApplyHorizontalStyle(Text, OverflowStyle, updateHorizontalStyle) ?? Text; - if (!CanInteract(player)) - { - return $"{text}: {choice}"; - } - return $"{text}: {choice}"; - } - - public IMenuTextSize GetTextSize() - { - return Size; - } - - public void Next( IPlayer player ) - { - if (!CanInteract(player) || Choices.Count == 0) - { - return; - } - SelectedIndex = (SelectedIndex + 1) % Choices.Count; - OnChange?.Invoke(player, SelectedChoice); - OnChangeWithOption?.Invoke(player, this, SelectedChoice); - } - public void Previous( IPlayer player ) - { - if (!CanInteract(player) || Choices.Count == 0) - { - return; - } - SelectedIndex = (SelectedIndex - 1 + Choices.Count) % Choices.Count; - OnChange?.Invoke(player, SelectedChoice); - OnChangeWithOption?.Invoke(player, this, SelectedChoice); - } -} \ No newline at end of file +// using SwiftlyS2.Core.Menus; +// using SwiftlyS2.Shared.Menus; +// using SwiftlyS2.Shared.Players; +// using SwiftlyS2.Shared.SchemaDefinitions; + +// namespace SwiftlyS2.Core.Menu.Options; + +// [Obsolete("ChoiceMenuOption will be deprecared at the release of SwiftlyS2.")] +// internal class ChoiceMenuOption : IOption +// { +// public string Text { get; set; } +// public List Choices { get; set; } +// public int SelectedIndex { get; set; } +// public Action? OnChange { get; set; } +// public Action? OnChangeWithOption { get; set; } +// public Func? VisibilityCheck { get; set; } +// public Func? EnabledCheck { get; set; } +// public IMenuTextSize Size { get; set; } +// public IMenu? Menu { get; set; } +// public MenuHorizontalStyle? OverflowStyle { get; init; } + +// public bool Visible => true; +// public bool Enabled => true; + +// public string SelectedChoice => Choices.Count > 0 ? Choices[SelectedIndex] : ""; + +// public ChoiceMenuOption( string text, IEnumerable choices, string? defaultChoice = null, Action? onChange = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// Text = text; +// Choices = [.. choices]; +// SelectedIndex = 0; +// Size = size; + +// if (defaultChoice != null) +// { +// var index = Choices.IndexOf(defaultChoice); +// if (index >= 0) SelectedIndex = index; +// } + +// OnChange = onChange; +// OverflowStyle = overflowStyle; +// } + +// public ChoiceMenuOption( string text, IEnumerable choices, string? defaultChoice, Action? onChange, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// Text = text; +// Choices = [.. choices]; +// SelectedIndex = 0; +// Size = size; + +// if (defaultChoice != null) +// { +// var index = Choices.IndexOf(defaultChoice); +// if (index >= 0) SelectedIndex = index; +// } + +// OnChangeWithOption = onChange; +// OverflowStyle = overflowStyle; +// } + +// public bool ShouldShow( IPlayer player ) => VisibilityCheck?.Invoke(player) ?? true; + +// public bool CanInteract( IPlayer player ) => EnabledCheck?.Invoke(player) ?? true; + +// public bool HasSound() => true; + +// public string GetDisplayText( IPlayer player, bool updateHorizontalStyle = false ) +// { +// var sizeClass = MenuSizeHelper.GetSizeClass(Size); + +// var choice = $"[{SelectedChoice}]"; + +// var text = (Menu as Menus.Menu)?.ApplyHorizontalStyle(Text, OverflowStyle, updateHorizontalStyle) ?? Text; +// if (!CanInteract(player)) +// { +// return $"{text}: {choice}"; +// } +// return $"{text}: {choice}"; +// } + +// public IMenuTextSize GetTextSize() +// { +// return Size; +// } + +// public void Next( IPlayer player ) +// { +// if (!CanInteract(player) || Choices.Count == 0) +// { +// return; +// } +// SelectedIndex = (SelectedIndex + 1) % Choices.Count; +// OnChange?.Invoke(player, SelectedChoice); +// OnChangeWithOption?.Invoke(player, this, SelectedChoice); +// } +// public void Previous( IPlayer player ) +// { +// if (!CanInteract(player) || Choices.Count == 0) +// { +// return; +// } +// SelectedIndex = (SelectedIndex - 1 + Choices.Count) % Choices.Count; +// OnChange?.Invoke(player, SelectedChoice); +// OnChangeWithOption?.Invoke(player, this, SelectedChoice); +// } +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/DynamicMenuOption.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/DynamicMenuOption.cs index 2a646e1c3..584d97e7a 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/DynamicMenuOption.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/DynamicMenuOption.cs @@ -1,123 +1,124 @@ -using SwiftlyS2.Core.Menus; -using SwiftlyS2.Shared.Menus; -using SwiftlyS2.Shared.Players; -using SwiftlyS2.Shared.SchemaDefinitions; - -namespace SwiftlyS2.Core.Menu.Options; - -internal class DynamicMenuOption : IOption -{ - private readonly Func _textProvider; - private readonly Action? _onClick; - private Func? _visibilityCheck; - private Func? _enabledCheck; - private Func? _validationCheck; - private Action? _onValidationFailed; - private readonly TimeSpan _updateInterval; - private DateTime _lastUpdate = DateTime.MinValue; - private string _cachedText = ""; - private IMenuTextSize _size; - private bool _closeOnSelect; - public IMenu? Menu { get; set; } - public MenuHorizontalStyle? OverflowStyle { get; init; } - - public string Text { - get => _cachedText; - set => _cachedText = value; - } - - public bool Visible => true; - public bool Enabled => true; - - public DynamicMenuOption( Func textProvider, TimeSpan updateInterval, Action? onClick = null, IMenuTextSize size = IMenuTextSize.Medium ) - { - _textProvider = textProvider; - _updateInterval = updateInterval; - _onClick = onClick; - _size = size; - } - - public DynamicMenuOption( Func textProvider, TimeSpan updateInterval, Action? onClick = null, IMenuTextSize size = IMenuTextSize.Medium ) - { - _textProvider = _ => textProvider(); - _updateInterval = updateInterval; - _onClick = onClick; - _size = size; - } - - public bool ShouldShow( IPlayer player ) => _visibilityCheck?.Invoke(player) ?? true; - - public bool CanInteract( IPlayer player ) => _onClick != null && (_enabledCheck?.Invoke(player) ?? true); - - public bool HasSound() => false; - - public string GetDisplayText( IPlayer player, bool updateHorizontalStyle = false ) - { - var sizeClass = MenuSizeHelper.GetSizeClass(_size); - - var needsUpdate = DateTime.Now - _lastUpdate > _updateInterval; - if (needsUpdate) - { - var oldText = _cachedText; - _cachedText = _textProvider(player); - _lastUpdate = DateTime.Now; - - if (oldText != _cachedText && Menu != null) - { - Menu.Rerender(player, false); - } - } - - if (!CanInteract(player) && _onClick != null) - { - return $"{_cachedText}"; - } - - return $"{_cachedText}"; - } - - public IMenuTextSize GetTextSize() - { - return _size; - } - - public void Click( IPlayer player ) - { - if (CanInteract(player)) - { - if (_validationCheck != null && !_validationCheck(player)) - { - _onValidationFailed?.Invoke(player); - return; - } - _onClick?.Invoke(player); - } - } - - public DynamicMenuOption WithVisibilityCheck( Func check ) - { - _visibilityCheck = check; - return this; - } - - public DynamicMenuOption WithEnabledCheck( Func check ) - { - _enabledCheck = check; - return this; - } - - public DynamicMenuOption WithValidation( Func check, Action? onFailed = null ) - { - _validationCheck = check; - _onValidationFailed = onFailed; - return this; - } - - public DynamicMenuOption WithCloseOnSelect( bool close = true ) - { - _closeOnSelect = close; - return this; - } - - public bool ShouldCloseOnSelect() => _closeOnSelect; -} \ No newline at end of file +// using SwiftlyS2.Core.Menus; +// using SwiftlyS2.Shared.Menus; +// using SwiftlyS2.Shared.Players; +// using SwiftlyS2.Shared.SchemaDefinitions; + +// namespace SwiftlyS2.Core.Menu.Options; + +// [Obsolete("DynamicMenuOption will be deprecared at the release of SwiftlyS2.")] +// internal class DynamicMenuOption : IOption +// { +// private readonly Func _textProvider; +// private readonly Action? _onClick; +// private Func? _visibilityCheck; +// private Func? _enabledCheck; +// private Func? _validationCheck; +// private Action? _onValidationFailed; +// private readonly TimeSpan _updateInterval; +// private DateTime _lastUpdate = DateTime.MinValue; +// private string _cachedText = ""; +// private IMenuTextSize _size; +// private bool _closeOnSelect; +// public IMenu? Menu { get; set; } +// public MenuHorizontalStyle? OverflowStyle { get; init; } + +// public string Text { +// get => _cachedText; +// set => _cachedText = value; +// } + +// public bool Visible => true; +// public bool Enabled => true; + +// public DynamicMenuOption( Func textProvider, TimeSpan updateInterval, Action? onClick = null, IMenuTextSize size = IMenuTextSize.Medium ) +// { +// _textProvider = textProvider; +// _updateInterval = updateInterval; +// _onClick = onClick; +// _size = size; +// } + +// public DynamicMenuOption( Func textProvider, TimeSpan updateInterval, Action? onClick = null, IMenuTextSize size = IMenuTextSize.Medium ) +// { +// _textProvider = _ => textProvider(); +// _updateInterval = updateInterval; +// _onClick = onClick; +// _size = size; +// } + +// public bool ShouldShow( IPlayer player ) => _visibilityCheck?.Invoke(player) ?? true; + +// public bool CanInteract( IPlayer player ) => _onClick != null && (_enabledCheck?.Invoke(player) ?? true); + +// public bool HasSound() => false; + +// public string GetDisplayText( IPlayer player, bool updateHorizontalStyle = false ) +// { +// var sizeClass = MenuSizeHelper.GetSizeClass(_size); + +// var needsUpdate = DateTime.Now - _lastUpdate > _updateInterval; +// if (needsUpdate) +// { +// var oldText = _cachedText; +// _cachedText = _textProvider(player); +// _lastUpdate = DateTime.Now; + +// if (oldText != _cachedText && Menu != null) +// { +// Menu.Rerender(player, false); +// } +// } + +// if (!CanInteract(player) && _onClick != null) +// { +// return $"{_cachedText}"; +// } + +// return $"{_cachedText}"; +// } + +// public IMenuTextSize GetTextSize() +// { +// return _size; +// } + +// public void Click( IPlayer player ) +// { +// if (CanInteract(player)) +// { +// if (_validationCheck != null && !_validationCheck(player)) +// { +// _onValidationFailed?.Invoke(player); +// return; +// } +// _onClick?.Invoke(player); +// } +// } + +// public DynamicMenuOption WithVisibilityCheck( Func check ) +// { +// _visibilityCheck = check; +// return this; +// } + +// public DynamicMenuOption WithEnabledCheck( Func check ) +// { +// _enabledCheck = check; +// return this; +// } + +// public DynamicMenuOption WithValidation( Func check, Action? onFailed = null ) +// { +// _validationCheck = check; +// _onValidationFailed = onFailed; +// return this; +// } + +// public DynamicMenuOption WithCloseOnSelect( bool close = true ) +// { +// _closeOnSelect = close; +// return this; +// } + +// public bool ShouldCloseOnSelect() => _closeOnSelect; +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/ProgressBarMenuButton.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/ProgressBarMenuButton.cs index 1c2de7984..2c66a96aa 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/ProgressBarMenuButton.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/ProgressBarMenuButton.cs @@ -1,48 +1,49 @@ -using SwiftlyS2.Shared.Players; -using SwiftlyS2.Shared.Menus; -using SwiftlyS2.Core.Menus; - -namespace SwiftlyS2.Core.Menu.Options; - -internal class ProgressBarMenuOption( string text, Func progressProvider, int barWidth = 20, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) : IOption -{ - public string Text { get; set; } = text; - public Func ProgressProvider { get; set; } = progressProvider; - public int BarWidth { get; set; } = barWidth; - public string FilledChar { get; set; } = "█"; - public string EmptyChar { get; set; } = "░"; - public bool ShowPercentage { get; set; } = true; - public IMenuTextSize Size { get; set; } = size; - public IMenu? Menu { get; set; } - public MenuHorizontalStyle? OverflowStyle { get; init; } = overflowStyle; - - public bool Visible => true; - public bool Enabled => false; - - public bool ShouldShow( IPlayer player ) => true; - public bool CanInteract( IPlayer player ) => false; - public bool HasSound() => false; - - public string GetDisplayText( IPlayer player, bool updateHorizontalStyle = false ) - { - var sizeClass = MenuSizeHelper.GetSizeClass(Size); - - var progress = Math.Clamp(ProgressProvider(), 0f, 1f); - var filledCount = (int)(progress * BarWidth); - var emptyCount = BarWidth - filledCount; - - var bar = ""; - for (int i = 0; i < filledCount; i++) - bar += $"{FilledChar}"; - for (int i = 0; i < emptyCount; i++) - bar += $"{EmptyChar}"; - - var percentage = ShowPercentage ? $" {(int)(progress * 100)}%" : ""; - return $"{((Menu as Menus.Menu)?.ApplyHorizontalStyle(Text, OverflowStyle, updateHorizontalStyle) ?? Text)}: {bar}{percentage}"; - } - - public IMenuTextSize GetTextSize() - { - return Size; - } -} \ No newline at end of file +// using SwiftlyS2.Shared.Players; +// using SwiftlyS2.Shared.Menus; +// using SwiftlyS2.Core.Menus; + +// namespace SwiftlyS2.Core.Menu.Options; + +// [Obsolete("ProgressBarMenuOption will be deprecared at the release of SwiftlyS2.")] +// internal class ProgressBarMenuOption( string text, Func progressProvider, int barWidth = 20, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) : IOption +// { +// public string Text { get; set; } = text; +// public Func ProgressProvider { get; set; } = progressProvider; +// public int BarWidth { get; set; } = barWidth; +// public string FilledChar { get; set; } = "█"; +// public string EmptyChar { get; set; } = "░"; +// public bool ShowPercentage { get; set; } = true; +// public IMenuTextSize Size { get; set; } = size; +// public IMenu? Menu { get; set; } +// public MenuHorizontalStyle? OverflowStyle { get; init; } = overflowStyle; + +// public bool Visible => true; +// public bool Enabled => false; + +// public bool ShouldShow( IPlayer player ) => true; +// public bool CanInteract( IPlayer player ) => false; +// public bool HasSound() => false; + +// public string GetDisplayText( IPlayer player, bool updateHorizontalStyle = false ) +// { +// var sizeClass = MenuSizeHelper.GetSizeClass(Size); + +// var progress = Math.Clamp(ProgressProvider(), 0f, 1f); +// var filledCount = (int)(progress * BarWidth); +// var emptyCount = BarWidth - filledCount; + +// var bar = ""; +// for (int i = 0; i < filledCount; i++) +// bar += $"{FilledChar}"; +// for (int i = 0; i < emptyCount; i++) +// bar += $"{EmptyChar}"; + +// var percentage = ShowPercentage ? $" {(int)(progress * 100)}%" : ""; +// return $"{((Menu as Menus.Menu)?.ApplyHorizontalStyle(Text, OverflowStyle, updateHorizontalStyle) ?? Text)}: {bar}{percentage}"; +// } + +// public IMenuTextSize GetTextSize() +// { +// return Size; +// } +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/SeparatorMenuButton.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/SeparatorMenuButton.cs index dc36e073c..2aa930b2f 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/SeparatorMenuButton.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/SeparatorMenuButton.cs @@ -1,33 +1,34 @@ -using SwiftlyS2.Shared.Players; -using SwiftlyS2.Shared.Menus; +// using SwiftlyS2.Shared.Players; +// using SwiftlyS2.Shared.Menus; -namespace SwiftlyS2.Core.Menu.Options; +// namespace SwiftlyS2.Core.Menu.Options; -internal class SeparatorMenuOption : IOption -{ - public string Text { get; set; } - public bool Visible => true; - public bool Enabled => false; +// [Obsolete("SeparatorMenuOption will be deprecared at the release of SwiftlyS2.")] +// internal class SeparatorMenuOption : IOption +// { +// public string Text { get; set; } +// public bool Visible => true; +// public bool Enabled => false; - public IMenu? Menu { get; set; } - public MenuHorizontalStyle? OverflowStyle { get; init; } +// public IMenu? Menu { get; set; } +// public MenuHorizontalStyle? OverflowStyle { get; init; } - public SeparatorMenuOption() - { - Text = "─────────────────────"; - } +// public SeparatorMenuOption() +// { +// Text = "─────────────────────"; +// } - public bool ShouldShow( IPlayer player ) => true; - public bool CanInteract( IPlayer player ) => false; - public bool HasSound() => false; +// public bool ShouldShow( IPlayer player ) => true; +// public bool CanInteract( IPlayer player ) => false; +// public bool HasSound() => false; - public string GetDisplayText( IPlayer player, bool updateHorizontalStyle = false ) - { - return $"{Text}"; - } +// public string GetDisplayText( IPlayer player, bool updateHorizontalStyle = false ) +// { +// return $"{Text}"; +// } - public IMenuTextSize GetTextSize() - { - return IMenuTextSize.Small; - } -} \ No newline at end of file +// public IMenuTextSize GetTextSize() +// { +// return IMenuTextSize.Small; +// } +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/SliderMenuButton.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/SliderMenuButton.cs index 03ed5f3de..b0a3c7e7d 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/SliderMenuButton.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/SliderMenuButton.cs @@ -1,126 +1,127 @@ -using SwiftlyS2.Core.Menus; -using SwiftlyS2.Shared.Menus; -using SwiftlyS2.Shared.Players; -using SwiftlyS2.Shared.SchemaDefinitions; - -namespace SwiftlyS2.Core.Menu.Options; - -internal class SliderMenuButton : IOption -{ - public string Text { get; set; } - public float Value { get; set; } - public float Min { get; set; } - public float Max { get; set; } - public float Step { get; set; } - public Action? OnChange { get; set; } - public Action? OnChangeWithOption { get; set; } - public Func? VisibilityCheck { get; set; } - public Func? EnabledCheck { get; set; } - public IMenuTextSize Size { get; set; } - public IMenu? Menu { get; set; } - public MenuHorizontalStyle? OverflowStyle { get; init; } - - public bool Visible => true; - public bool Enabled => true; - - public SliderMenuButton( string text, float min = 0, float max = 10, float defaultValue = 5, float step = 1, Action? onChange = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - Text = text; - Min = min; - Max = max; - Value = Math.Clamp(defaultValue, min, max); - Step = step; - OnChange = onChange; - Size = size; - OverflowStyle = overflowStyle; - } - - public SliderMenuButton( string text, float min, float max, float defaultValue, float step, Action? onChange, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - Text = text; - Min = min; - Max = max; - Value = Math.Clamp(defaultValue, min, max); - Step = step; - OnChangeWithOption = onChange; - Size = size; - OverflowStyle = overflowStyle; - } - - public bool ShouldShow( IPlayer player ) => VisibilityCheck?.Invoke(player) ?? true; - - public bool CanInteract( IPlayer player ) => EnabledCheck?.Invoke(player) ?? true; - - public bool HasSound() => true; - - public string GetDisplayText( IPlayer player, bool updateHorizontalStyle = false ) - { - var sizeClass = MenuSizeHelper.GetSizeClass(Size); - - int totalBars = 10; - float percentage = (Value - Min) / (Max - Min); - int filledBars = (int)(percentage * totalBars); - - string slider = $"("; - for (int i = 0; i < totalBars; i++) - { - if (i < filledBars) - slider += $""; - else - slider += ""; - } - slider += $") {Value:F1}"; - - var text = (Menu as Menus.Menu)?.ApplyHorizontalStyle(Text, OverflowStyle, updateHorizontalStyle) ?? Text; - if (!CanInteract(player)) - { - return $"{text}: {slider}"; - } - - return $"{text}: {slider}"; - } - - public IMenuTextSize GetTextSize() - { - return Size; - } - - private static float Wrap( float value, float min, float max ) - { - float range = max - min; - return ((value - min) % range + range) % range + min; - } - - public void Increase( IPlayer player ) - { - if (!CanInteract(player)) - { - return; - } - - var newValue = Wrap(Value + Step, Min, Max); - - if (newValue != Value) - { - Value = newValue; - OnChange?.Invoke(player, Value); - OnChangeWithOption?.Invoke(player, this, Value); - } - } - public void Decrease( IPlayer player ) - { - if (!CanInteract(player)) - { - return; - } - - var newValue = Wrap(Value - Step, Min, Max); - - if (newValue != Value) - { - Value = newValue; - OnChange?.Invoke(player, Value); - OnChangeWithOption?.Invoke(player, this, Value); - } - } -} \ No newline at end of file +// using SwiftlyS2.Core.Menus; +// using SwiftlyS2.Shared.Menus; +// using SwiftlyS2.Shared.Players; +// using SwiftlyS2.Shared.SchemaDefinitions; + +// namespace SwiftlyS2.Core.Menu.Options; + +// [Obsolete("SliderMenuButton will be deprecared at the release of SwiftlyS2.")] +// internal class SliderMenuButton : IOption +// { +// public string Text { get; set; } +// public float Value { get; set; } +// public float Min { get; set; } +// public float Max { get; set; } +// public float Step { get; set; } +// public Action? OnChange { get; set; } +// public Action? OnChangeWithOption { get; set; } +// public Func? VisibilityCheck { get; set; } +// public Func? EnabledCheck { get; set; } +// public IMenuTextSize Size { get; set; } +// public IMenu? Menu { get; set; } +// public MenuHorizontalStyle? OverflowStyle { get; init; } + +// public bool Visible => true; +// public bool Enabled => true; + +// public SliderMenuButton( string text, float min = 0, float max = 10, float defaultValue = 5, float step = 1, Action? onChange = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// Text = text; +// Min = min; +// Max = max; +// Value = Math.Clamp(defaultValue, min, max); +// Step = step; +// OnChange = onChange; +// Size = size; +// OverflowStyle = overflowStyle; +// } + +// public SliderMenuButton( string text, float min, float max, float defaultValue, float step, Action? onChange, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// Text = text; +// Min = min; +// Max = max; +// Value = Math.Clamp(defaultValue, min, max); +// Step = step; +// OnChangeWithOption = onChange; +// Size = size; +// OverflowStyle = overflowStyle; +// } + +// public bool ShouldShow( IPlayer player ) => VisibilityCheck?.Invoke(player) ?? true; + +// public bool CanInteract( IPlayer player ) => EnabledCheck?.Invoke(player) ?? true; + +// public bool HasSound() => true; + +// public string GetDisplayText( IPlayer player, bool updateHorizontalStyle = false ) +// { +// var sizeClass = MenuSizeHelper.GetSizeClass(Size); + +// int totalBars = 10; +// float percentage = (Value - Min) / (Max - Min); +// int filledBars = (int)(percentage * totalBars); + +// string slider = $"("; +// for (int i = 0; i < totalBars; i++) +// { +// if (i < filledBars) +// slider += $""; +// else +// slider += ""; +// } +// slider += $") {Value:F1}"; + +// var text = (Menu as Menus.Menu)?.ApplyHorizontalStyle(Text, OverflowStyle, updateHorizontalStyle) ?? Text; +// if (!CanInteract(player)) +// { +// return $"{text}: {slider}"; +// } + +// return $"{text}: {slider}"; +// } + +// public IMenuTextSize GetTextSize() +// { +// return Size; +// } + +// private static float Wrap( float value, float min, float max ) +// { +// float range = max - min; +// return ((value - min) % range + range) % range + min; +// } + +// public void Increase( IPlayer player ) +// { +// if (!CanInteract(player)) +// { +// return; +// } + +// var newValue = Wrap(Value + Step, Min, Max); + +// if (newValue != Value) +// { +// Value = newValue; +// OnChange?.Invoke(player, Value); +// OnChangeWithOption?.Invoke(player, this, Value); +// } +// } +// public void Decrease( IPlayer player ) +// { +// if (!CanInteract(player)) +// { +// return; +// } + +// var newValue = Wrap(Value - Step, Min, Max); + +// if (newValue != Value) +// { +// Value = newValue; +// OnChange?.Invoke(player, Value); +// OnChangeWithOption?.Invoke(player, this, Value); +// } +// } +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/SubmenuMenuOption.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/SubmenuMenuOption.cs index df39a78c1..6dfc46065 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/SubmenuMenuOption.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/SubmenuMenuOption.cs @@ -1,81 +1,82 @@ -using SwiftlyS2.Core.Menus; -using SwiftlyS2.Shared.Menus; -using SwiftlyS2.Shared.Players; - -namespace SwiftlyS2.Core.Menu.Options; - -internal class SubmenuMenuOption : IOption -{ - public string Text { get; set; } - public IMenu? Submenu { get; set; } - public Func>? SubmenuBuilderAsync { get; set; } - public Func? VisibilityCheck { get; set; } - public Func? EnabledCheck { get; set; } - public IMenuTextSize Size { get; set; } - public IMenu? Menu { get; set; } - public MenuHorizontalStyle? OverflowStyle { get; init; } - - public bool Visible => true; - public bool Enabled => true; - - public SubmenuMenuOption( string text, IMenu? submenu = null, IMenuTextSize size = IMenuTextSize.Medium ) - { - Text = text; - Submenu = submenu; - Size = size; - } - - public SubmenuMenuOption( string text, Func submenuBuilder, IMenuTextSize size = IMenuTextSize.Medium ) - { - Text = text; - SubmenuBuilderAsync = () => Task.FromResult(submenuBuilder()); - Size = size; - } - - public SubmenuMenuOption( string text, Func> asyncSubmenuBuilder, IMenuTextSize size = IMenuTextSize.Medium ) - { - Text = text; - SubmenuBuilderAsync = asyncSubmenuBuilder; - Size = size; - } - - public bool ShouldShow( IPlayer player ) => VisibilityCheck?.Invoke(player) ?? true; - - public bool CanInteract( IPlayer player ) => EnabledCheck?.Invoke(player) ?? true; - - public bool HasSound() => true; - - public string GetDisplayText( IPlayer player, bool updateHorizontalStyle = false ) - { - var sizeClass = MenuSizeHelper.GetSizeClass(Size); - - var arrow = $" {Menu!.MenuManager.Settings.NavigationPrefix}"; - - if (!CanInteract(player)) - { - return $"{Text}{arrow}"; - } - - return $"{Text}{arrow}"; - } - - public IMenuTextSize GetTextSize() - { - return Size; - } - - public async Task GetSubmenuAsync() - { - if (Submenu != null) - { - return Submenu; - } - - if (SubmenuBuilderAsync != null) - { - return await SubmenuBuilderAsync.Invoke(); - } - - return null; - } -} \ No newline at end of file +// using SwiftlyS2.Core.Menus; +// using SwiftlyS2.Shared.Menus; +// using SwiftlyS2.Shared.Players; + +// namespace SwiftlyS2.Core.Menu.Options; + +// [Obsolete("SubmenuMenuOption will be deprecared at the release of SwiftlyS2.")] +// internal class SubmenuMenuOption : IOption +// { +// public string Text { get; set; } +// public IMenu? Submenu { get; set; } +// public Func>? SubmenuBuilderAsync { get; set; } +// public Func? VisibilityCheck { get; set; } +// public Func? EnabledCheck { get; set; } +// public IMenuTextSize Size { get; set; } +// public IMenu? Menu { get; set; } +// public MenuHorizontalStyle? OverflowStyle { get; init; } + +// public bool Visible => true; +// public bool Enabled => true; + +// public SubmenuMenuOption( string text, IMenu? submenu = null, IMenuTextSize size = IMenuTextSize.Medium ) +// { +// Text = text; +// Submenu = submenu; +// Size = size; +// } + +// public SubmenuMenuOption( string text, Func submenuBuilder, IMenuTextSize size = IMenuTextSize.Medium ) +// { +// Text = text; +// SubmenuBuilderAsync = () => Task.FromResult(submenuBuilder()); +// Size = size; +// } + +// public SubmenuMenuOption( string text, Func> asyncSubmenuBuilder, IMenuTextSize size = IMenuTextSize.Medium ) +// { +// Text = text; +// SubmenuBuilderAsync = asyncSubmenuBuilder; +// Size = size; +// } + +// public bool ShouldShow( IPlayer player ) => VisibilityCheck?.Invoke(player) ?? true; + +// public bool CanInteract( IPlayer player ) => EnabledCheck?.Invoke(player) ?? true; + +// public bool HasSound() => true; + +// public string GetDisplayText( IPlayer player, bool updateHorizontalStyle = false ) +// { +// var sizeClass = MenuSizeHelper.GetSizeClass(Size); + +// var arrow = $" {Menu!.MenuManager.Settings.NavigationPrefix}"; + +// if (!CanInteract(player)) +// { +// return $"{Text}{arrow}"; +// } + +// return $"{Text}{arrow}"; +// } + +// public IMenuTextSize GetTextSize() +// { +// return Size; +// } + +// public async Task GetSubmenuAsync() +// { +// if (Submenu != null) +// { +// return Submenu; +// } + +// if (SubmenuBuilderAsync != null) +// { +// return await SubmenuBuilderAsync.Invoke(); +// } + +// return null; +// } +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/TextMenuOption.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/TextMenuOption.cs index 48bd19eb5..692b48417 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/TextMenuOption.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/TextMenuOption.cs @@ -1,72 +1,73 @@ -using SwiftlyS2.Core.Menus; -using SwiftlyS2.Shared.Menus; -using SwiftlyS2.Shared.Players; - -namespace SwiftlyS2.Core.Menu.Options; - -internal class TextMenuOption : IOption -{ - public string Text { get; set; } - public ITextAlign Alignment { get; set; } - public IMenuTextSize Size { get; set; } - public Func? VisibilityCheck { get; set; } - public Func? DynamicText { get; set; } - public IMenu? Menu { get; set; } - public MenuHorizontalStyle? OverflowStyle { get; init; } - - public bool Visible => true; - public bool Enabled => false; - - public TextMenuOption( string text, ITextAlign alignment = ITextAlign.Left, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - Text = text; - Alignment = alignment; - Size = size; - OverflowStyle = overflowStyle; - } - - public TextMenuOption( Func dynamicText, ITextAlign alignment = ITextAlign.Left, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - Text = string.Empty; - DynamicText = dynamicText; - Alignment = alignment; - Size = size; - OverflowStyle = overflowStyle; - } - - public bool ShouldShow( IPlayer player ) => VisibilityCheck?.Invoke(player) ?? true; - - public bool CanInteract( IPlayer player ) => true; - - public bool HasSound() => false; - - public string GetDisplayText( IPlayer player, bool updateHorizontalStyle ) - { - var text = DynamicText?.Invoke() ?? Text; - - - text = (Menu as Menus.Menu)?.ApplyHorizontalStyle(text, OverflowStyle, updateHorizontalStyle) ?? text; - - var sizeClass = MenuSizeHelper.GetSizeClass(Size); - - text = $"{text}"; - - return Alignment switch { - ITextAlign.Center => $"
{text}
", - ITextAlign.Right => $"
{text}
", - _ => text - }; - } - - public IMenuTextSize GetTextSize() - { - return Size; - } -} - -internal enum TextAlign -{ - Left, - Center, - Right -} \ No newline at end of file +// using SwiftlyS2.Core.Menus; +// using SwiftlyS2.Shared.Menus; +// using SwiftlyS2.Shared.Players; + +// namespace SwiftlyS2.Core.Menu.Options; + +// [Obsolete("TextMenuOption will be deprecared at the release of SwiftlyS2.")] +// internal class TextMenuOption : IOption +// { +// public string Text { get; set; } +// public ITextAlign Alignment { get; set; } +// public IMenuTextSize Size { get; set; } +// public Func? VisibilityCheck { get; set; } +// public Func? DynamicText { get; set; } +// public IMenu? Menu { get; set; } +// public MenuHorizontalStyle? OverflowStyle { get; init; } + +// public bool Visible => true; +// public bool Enabled => false; + +// public TextMenuOption( string text, ITextAlign alignment = ITextAlign.Left, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// Text = text; +// Alignment = alignment; +// Size = size; +// OverflowStyle = overflowStyle; +// } + +// public TextMenuOption( Func dynamicText, ITextAlign alignment = ITextAlign.Left, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// Text = string.Empty; +// DynamicText = dynamicText; +// Alignment = alignment; +// Size = size; +// OverflowStyle = overflowStyle; +// } + +// public bool ShouldShow( IPlayer player ) => VisibilityCheck?.Invoke(player) ?? true; + +// public bool CanInteract( IPlayer player ) => true; + +// public bool HasSound() => false; + +// public string GetDisplayText( IPlayer player, bool updateHorizontalStyle ) +// { +// var text = DynamicText?.Invoke() ?? Text; + + +// text = (Menu as Menus.Menu)?.ApplyHorizontalStyle(text, OverflowStyle, updateHorizontalStyle) ?? text; + +// var sizeClass = MenuSizeHelper.GetSizeClass(Size); + +// text = $"{text}"; + +// return Alignment switch { +// ITextAlign.Center => $"
{text}
", +// ITextAlign.Right => $"
{text}
", +// _ => text +// }; +// } + +// public IMenuTextSize GetTextSize() +// { +// return Size; +// } +// } + +// internal enum TextAlign +// { +// Left, +// Center, +// Right +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/ToggleMenuOption.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/ToggleMenuOption.cs index f70f642cb..43e320f51 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Menus/Options/ToggleMenuOption.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/Options/ToggleMenuOption.cs @@ -1,83 +1,84 @@ -using SwiftlyS2.Core.Menus; -using SwiftlyS2.Shared.Menus; -using SwiftlyS2.Shared.Players; - -namespace SwiftlyS2.Core.Menu.Options; - -internal class ToggleMenuOption : IOption -{ - public string Text { get; set; } - public bool Value { get; set; } - public Action? OnToggle { get; set; } - public Action? OnToggleWithOption { get; set; } - public Func? VisibilityCheck { get; set; } - public Func? EnabledCheck { get; set; } - public Func? ValidationCheck { get; set; } - public Action? OnValidationFailed { get; set; } - public IMenuTextSize Size { get; set; } - public bool CloseOnSelect { get; set; } - public IMenu? Menu { get; set; } - public MenuHorizontalStyle? OverflowStyle { get; init; } - - public bool Visible => true; - public bool Enabled => true; - - public ToggleMenuOption( string text, bool defaultValue = false, Action? onToggle = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - Text = text; - Value = defaultValue; - OnToggle = onToggle; - Size = size; - OverflowStyle = overflowStyle; - } - - public ToggleMenuOption( string text, bool defaultValue, Action? onToggle, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) - { - Text = text; - Value = defaultValue; - OnToggleWithOption = onToggle; - Size = size; - OverflowStyle = overflowStyle; - } - - public bool ShouldShow( IPlayer player ) => VisibilityCheck?.Invoke(player) ?? true; - - public bool CanInteract( IPlayer player ) => EnabledCheck?.Invoke(player) ?? true; - - public bool HasSound() => true; - - public string GetDisplayText( IPlayer player, bool updateHorizontalStyle = false ) - { - var sizeClass = MenuSizeHelper.GetSizeClass(Size); - - var status = Value ? "" : ""; - - var text = (Menu as Menus.Menu)?.ApplyHorizontalStyle(Text, OverflowStyle, updateHorizontalStyle) ?? Text; - if (!CanInteract(player)) - { - return $"{text}: {status}/"; - } - - return $"{text}: {status}"; - } - - public IMenuTextSize GetTextSize() - { - return Size; - } - - public void Toggle( IPlayer player ) - { - if (!CanInteract(player)) return; - - if (ValidationCheck != null && !ValidationCheck(player)) - { - OnValidationFailed?.Invoke(player); - return; - } - - Value = !Value; - OnToggle?.Invoke(player, Value); - OnToggleWithOption?.Invoke(player, this, Value); - } -} \ No newline at end of file +// using SwiftlyS2.Core.Menus; +// using SwiftlyS2.Shared.Menus; +// using SwiftlyS2.Shared.Players; + +// namespace SwiftlyS2.Core.Menu.Options; + +// [Obsolete("ToggleMenuOption will be deprecared at the release of SwiftlyS2.")] +// internal class ToggleMenuOption : IOption +// { +// public string Text { get; set; } +// public bool Value { get; set; } +// public Action? OnToggle { get; set; } +// public Action? OnToggleWithOption { get; set; } +// public Func? VisibilityCheck { get; set; } +// public Func? EnabledCheck { get; set; } +// public Func? ValidationCheck { get; set; } +// public Action? OnValidationFailed { get; set; } +// public IMenuTextSize Size { get; set; } +// public bool CloseOnSelect { get; set; } +// public IMenu? Menu { get; set; } +// public MenuHorizontalStyle? OverflowStyle { get; init; } + +// public bool Visible => true; +// public bool Enabled => true; + +// public ToggleMenuOption( string text, bool defaultValue = false, Action? onToggle = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// Text = text; +// Value = defaultValue; +// OnToggle = onToggle; +// Size = size; +// OverflowStyle = overflowStyle; +// } + +// public ToggleMenuOption( string text, bool defaultValue, Action? onToggle, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ) +// { +// Text = text; +// Value = defaultValue; +// OnToggleWithOption = onToggle; +// Size = size; +// OverflowStyle = overflowStyle; +// } + +// public bool ShouldShow( IPlayer player ) => VisibilityCheck?.Invoke(player) ?? true; + +// public bool CanInteract( IPlayer player ) => EnabledCheck?.Invoke(player) ?? true; + +// public bool HasSound() => true; + +// public string GetDisplayText( IPlayer player, bool updateHorizontalStyle = false ) +// { +// var sizeClass = MenuSizeHelper.GetSizeClass(Size); + +// var status = Value ? "" : ""; + +// var text = (Menu as Menus.Menu)?.ApplyHorizontalStyle(Text, OverflowStyle, updateHorizontalStyle) ?? Text; +// if (!CanInteract(player)) +// { +// return $"{text}: {status}/"; +// } + +// return $"{text}: {status}"; +// } + +// public IMenuTextSize GetTextSize() +// { +// return Size; +// } + +// public void Toggle( IPlayer player ) +// { +// if (!CanInteract(player)) return; + +// if (ValidationCheck != null && !ValidationCheck(player)) +// { +// OnValidationFailed?.Invoke(player); +// return; +// } + +// Value = !Value; +// OnToggle?.Invoke(player, Value); +// OnToggleWithOption?.Invoke(player, this, Value); +// } +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/ButtonMenuOption.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/ButtonMenuOption.cs new file mode 100644 index 000000000..a4b14d9f7 --- /dev/null +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/ButtonMenuOption.cs @@ -0,0 +1,36 @@ +namespace SwiftlyS2.Core.Menus.OptionsBase; + +/// +/// Represents a clickable button menu option. +/// +public sealed class ButtonMenuOption : MenuOptionBase +{ + /// + /// Creates an instance of with dynamic text updating capabilities. + /// + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + /// + /// When using this constructor, the property must be manually set to specify the initial text. + /// + public ButtonMenuOption( + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : base(updateIntervalMs, pauseIntervalMs) + { + PlaySound = true; + } + + /// + /// Creates an instance of with dynamic text updating capabilities. + /// + /// The text content to display. + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + public ButtonMenuOption( + string text, + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : this(updateIntervalMs, pauseIntervalMs) + { + Text = text; + } +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/ChoiceMenuOption.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/ChoiceMenuOption.cs new file mode 100644 index 000000000..6fc6190aa --- /dev/null +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/ChoiceMenuOption.cs @@ -0,0 +1,126 @@ +using System.Collections.Concurrent; +using SwiftlyS2.Shared.Menus; +using SwiftlyS2.Shared.Players; + +namespace SwiftlyS2.Core.Menus.OptionsBase; + +/// +/// Represents a menu option that cycles through a list of choices. +/// +public sealed class ChoiceMenuOption : MenuOptionBase +{ + private readonly ConcurrentDictionary selectedIndices = new(); + private readonly List choices; + private readonly int defaultIndex; + + /// + /// Gets the read-only list of available choices. + /// + public IReadOnlyList Choices => choices.AsReadOnly(); + + /// + /// Occurs when the selected choice changes for a player. + /// + public event EventHandler>? ValueChanged; + + /// + /// Creates an instance of with a list of choices. + /// + /// The list of available choices. + /// The default choice to select. If null or not found, defaults to first choice. + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + /// + /// When using this constructor, the property must be manually set to specify the initial text. + /// + public ChoiceMenuOption( + IEnumerable choices, + string? defaultChoice = null, + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : base(updateIntervalMs, pauseIntervalMs) + { + PlaySound = true; + this.choices = choices.ToList(); + + if (this.choices.Count == 0) + { + Spectre.Console.AnsiConsole.WriteException(new ArgumentException("Choices list cannot be empty. Adding a default choice.", nameof(choices))); + this.choices.Add("Default"); + } + + this.defaultIndex = defaultChoice != null && this.choices.Contains(defaultChoice) ? this.choices.IndexOf(defaultChoice) : 0; + + selectedIndices.Clear(); + Click += OnChoiceClick; + } + + /// + /// Creates an instance of with a list of choices. + /// + /// The text content to display. + /// The list of available choices. + /// The default choice to select. If null or not found, defaults to first choice. + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + public ChoiceMenuOption( + string text, + IEnumerable choices, + string? defaultChoice = null, + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : this(choices, defaultChoice, updateIntervalMs, pauseIntervalMs) + { + Text = text; + } + + public override string GetDisplayText( IPlayer player, int displayLine = 0 ) + { + var text = base.GetDisplayText(player, displayLine); + var index = selectedIndices.GetOrAdd(player, defaultIndex); + var choice = choices[Math.Clamp(index, 0, choices.Count - 1)]; + return $"{text}: [{choice}]"; + } + + /// + /// Gets the currently selected choice for the specified player. + /// + /// The player whose selected choice to retrieve. + /// The currently selected choice string. + public string GetSelectedChoice( IPlayer player ) + { + var index = selectedIndices.GetOrAdd(player, defaultIndex); + return choices[Math.Clamp(index, 0, choices.Count - 1)]; + } + + /// + /// Sets the selected choice for the specified player. + /// + /// The player whose choice to set. + /// The choice to select. Must exist in the list. + public void SetSelectedChoice( IPlayer player, string choice ) + { + var index = choices.IndexOf(choice); + if (index >= 0) + { + _ = selectedIndices.AddOrUpdate(player, index, ( _, _ ) => index); + } + } + + private ValueTask OnChoiceClick( object? sender, MenuOptionClickEventArgs args ) + { + var newIndex = selectedIndices.AddOrUpdate( + args.Player, + (defaultIndex + 1) % choices.Count, + ( _, current ) => (current + 1) % choices.Count + ); + + var selectedChoice = choices[newIndex]; + ValueChanged?.Invoke(this, new MenuOptionValueChangedEventArgs { + Player = args.Player, + Option = this, + OldValue = choices[(newIndex - 1 + choices.Count) % choices.Count], + NewValue = selectedChoice + }); + + return ValueTask.CompletedTask; + } +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/Helpers/DynamicTextUpdater.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/Helpers/DynamicTextUpdater.cs new file mode 100644 index 000000000..214439cd6 --- /dev/null +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/Helpers/DynamicTextUpdater.cs @@ -0,0 +1,86 @@ +using SwiftlyS2.Shared.Menus; + +namespace SwiftlyS2.Core.Menus.OptionsBase.Helpers; + +internal sealed class DynamicTextUpdater : IDisposable +{ + private readonly TextStyleProcessor processor; + private readonly Func getSourceText; + private readonly Func getTextStyle; + private readonly Func getMaxWidth; + private readonly Action setDynamicText; + private readonly CancellationTokenSource cancellationTokenSource; + + private volatile bool disposed; + + public DynamicTextUpdater( + Func getSourceText, + Func getTextStyle, + Func getMaxWidth, + Action setDynamicText, + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) + { + disposed = false; + + this.getSourceText = getSourceText; + this.getTextStyle = getTextStyle; + this.getMaxWidth = getMaxWidth; + this.setDynamicText = setDynamicText; + + processor = new(); + cancellationTokenSource = new(); + _ = Task.Run(() => UpdateLoopAsync(updateIntervalMs, pauseIntervalMs, cancellationTokenSource.Token), cancellationTokenSource.Token); + } + + ~DynamicTextUpdater() + { + Dispose(); + } + + public void Dispose() + { + if (disposed) + { + return; + } + + // Console.WriteLine($"{GetType().Name} has been disposed."); + cancellationTokenSource.Cancel(); + cancellationTokenSource.Dispose(); + + processor.Dispose(); + + disposed = true; + GC.SuppressFinalize(this); + } + + private async Task UpdateLoopAsync( int intervalMs, int pauseIntervalMs, CancellationToken token ) + { + while (!token.IsCancellationRequested && !disposed) + { + try + { + await Task.Delay(intervalMs, token); + var sourceText = getSourceText(); + var textStyle = getTextStyle(); + var maxWidth = getMaxWidth(); + var (styledText, offset) = processor.ApplyHorizontalStyle(sourceText, textStyle, maxWidth); + setDynamicText(styledText); + // Console.WriteLine($"sourceText: {sourceText}, textStyle: {textStyle}, maxWidth: {maxWidth}, styledText: {styledText}, offset: {offset}"); + + if (offset == 0) + { + await Task.Delay(pauseIntervalMs, token); + } + } + catch (OperationCanceledException) + { + break; + } + catch + { + } + } + } +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/Helpers/TextStyleProcessor.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/Helpers/TextStyleProcessor.cs new file mode 100644 index 000000000..ec3a53ff4 --- /dev/null +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/Helpers/TextStyleProcessor.cs @@ -0,0 +1,538 @@ +using System.Text; +using System.Collections.Concurrent; +using System.Text.RegularExpressions; +using SwiftlyS2.Shared; +using SwiftlyS2.Shared.Menus; + +namespace SwiftlyS2.Core.Menus.OptionsBase.Helpers; + +internal sealed partial class TextStyleProcessor : IDisposable +{ + private readonly ConcurrentDictionary scrollOffsets = new(); + + private volatile bool disposed; + + public TextStyleProcessor() + { + disposed = false; + scrollOffsets.Clear(); + } + + ~TextStyleProcessor() + { + Dispose(); + } + + public void Dispose() + { + if (disposed) + { + return; + } + + // Console.WriteLine($"{GetType().Name} has been disposed."); + scrollOffsets.Clear(); + + disposed = true; + GC.SuppressFinalize(this); + } + + [GeneratedRegex("<.*?>")] + private static partial Regex HtmlTagRegex(); + + public (string styledText, int scrollOffset) ApplyHorizontalStyle( string text, MenuOptionTextStyle textStyle, float maxWidth ) + { + return string.IsNullOrWhiteSpace(text) + ? (text, -1) + : Helper.EstimateTextWidth(StripHtmlTags(text)) <= maxWidth + ? (text, -1) + : textStyle switch { + MenuOptionTextStyle.TruncateEnd => TruncateTextEnd(text, maxWidth), + MenuOptionTextStyle.TruncateBothEnds => TruncateTextBothEnds(text, maxWidth), + MenuOptionTextStyle.ScrollLeftFade => ScrollTextWithFade(text, maxWidth, true), + MenuOptionTextStyle.ScrollRightFade => ScrollTextWithFade(text, maxWidth, false), + MenuOptionTextStyle.ScrollLeftLoop => ScrollTextWithLoop($"{text.TrimEnd()} ", maxWidth, true), + MenuOptionTextStyle.ScrollRightLoop => ScrollTextWithLoop($" {text.TrimStart()}", maxWidth, false), + _ => (text, -1) + }; + } + + private (string styledText, int scrollOffset) ScrollTextWithFade( string text, float maxWidth, bool scrollLeft ) + { + // Prepare scroll data and validate + var (plainChars, segments, targetCharCount) = PrepareScrollData(text, maxWidth); + if (plainChars == null) + { + return (text, -1); + } + if (targetCharCount == 0) + { + return (string.Empty, -1); + } + + // Update scroll offset (allow scrolling beyond end for complete fade-out) + var offset = UpdateScrollOffset(StripHtmlTags(text), scrollLeft, plainChars.Length + 1); + + // Calculate visible character range + var (skipStart, skipEnd) = scrollLeft + ? (offset, Math.Max(0, plainChars.Length - offset - targetCharCount)) + : (Math.Max(0, plainChars.Length - targetCharCount - offset), offset); + + // Build output with proper HTML tag tracking + StringBuilder result = new(); + List outputTags = [], activeTags = []; + var (charIdx, started) = (0, false); + + foreach (var (content, isTag) in segments) + { + if (isTag) + { + // Track active opening and closing tags + UpdateTagState(content, activeTags); + + // Output tags within visible window + if (started) + { + result = result.Append(content); + ProcessOpenTag(content, outputTags); + } + } + else + { + // Process characters within scroll window + foreach (var ch in content) + { + if (charIdx >= skipStart && charIdx < plainChars.Length - skipEnd) + { + // Apply active tags at start of output + if (!started) + { + started = true; + activeTags.ForEach(tag => { result = result.Append(tag); ProcessOpenTag(tag, outputTags); }); + } + result = result.Append(ch); + } + charIdx++; + } + } + } + + CloseOpenTags(result, outputTags); + // Console.WriteLine($"styledText: {result}, offset: {offset}"); + return (result.ToString(), offset); + } + + private (string styledText, int scrollOffset) ScrollTextWithLoop( string text, float maxWidth, bool scrollLeft ) + { + // Prepare scroll data and validate + var (plainChars, segments, targetCharCount) = PrepareScrollData(text, maxWidth); + if (plainChars == null) + { + return (text, -1); + } + if (targetCharCount == 0) + { + return (string.Empty, -1); + } + + // Update scroll offset for circular wrapping + var offset = UpdateScrollOffset(StripHtmlTags(text), scrollLeft, plainChars.Length); + + // Build character-to-tags mapping for circular access + Dictionary> charToActiveTags = []; + List currentActiveTags = []; + var currentCharIdx = 0; + + foreach (var (content, isTag) in segments) + { + if (isTag) + { + // Track active opening and closing tags + UpdateTagState(content, currentActiveTags); + } + else + { + // Map each character to its active tags + foreach (var ch in content) + { + charToActiveTags[currentCharIdx] = [.. currentActiveTags]; + currentCharIdx++; + } + } + } + + // Build output in circular order with dynamic tag management + StringBuilder result = new(); + List outputTags = []; + List? previousTags = null; + + for (var i = 0; i < targetCharCount; i++) + { + // Calculate circular character index + var charIndex = scrollLeft + ? (offset + i) % plainChars.Length + : (plainChars.Length - offset + i) % plainChars.Length; + var currentTags = charToActiveTags.GetValueOrDefault(charIndex, []); + + // Close tags that are no longer active + if (previousTags != null) + { + for (var j = previousTags.Count - 1; j >= 0; j--) + { + if (!currentTags.Contains(previousTags[j])) + { + var prevTagName = previousTags[j][1..^1].Split(' ')[0]; + result = result.Append($""); + var idx = outputTags.FindLastIndex(t => t.Equals(prevTagName, StringComparison.OrdinalIgnoreCase)); + if (idx >= 0) + { + outputTags.RemoveAt(idx); + } + } + } + } + + // Open new tags that are now active + foreach (var tag in currentTags) + { + if (previousTags == null || !previousTags.Contains(tag)) + { + result = result.Append(tag); + var tagName = tag[1..^1].Split(' ')[0]; + outputTags.Add(tagName); + } + } + + result = result.Append(plainChars[charIndex]); + previousTags = currentTags; + } + + CloseOpenTags(result, outputTags); + return (result.ToString(), offset); + } + + private static (string styledText, int scrollOffset) TruncateTextEnd( string text, float maxWidth, string suffix = "..." ) + { + // Reserve space for suffix + var targetWidth = maxWidth - Helper.EstimateTextWidth(suffix); + if (targetWidth <= 0) + { + return (suffix, -1); + } + + var segments = ParseHtmlSegments(text); + StringBuilder result = new(); + List openTags = []; + var (currentWidth, reachedLimit) = (0f, false); + + foreach (var (content, isTag) in segments) + { + switch (isTag, reachedLimit) + { + // Preserve HTML tags before reaching limit + case (true, false): + result = result.Append(content); + ProcessOpenTag(content, openTags); + break; + + // Process plain text characters until width limit + case (false, false): + foreach (var ch in content) + { + var charWidth = Helper.GetCharWidth(ch); + if (currentWidth + charWidth > targetWidth) + { + reachedLimit = true; + break; + } + result = result.Append(ch); + currentWidth += charWidth; + } + break; + default: + break; + } + } + + if (reachedLimit) + { + result = result.Append(suffix); + } + + CloseOpenTags(result, openTags); + return (result.ToString(), -1); + } + + private static (string styledText, int scrollOffset) TruncateTextBothEnds( string text, float maxWidth ) + { + if (string.IsNullOrEmpty(text)) + { + return (text, -1); + } + + // Check if text fits without truncation + var plainText = StripHtmlTags(text); + if (Helper.EstimateTextWidth(plainText) <= maxWidth) + { + return (text, -1); + } + + // Extract all plain text characters from segments + var segments = ParseHtmlSegments(text); + var plainChars = segments + .Where(s => !s.IsTag) + .SelectMany(s => s.Content) + .ToArray(); + + if (plainChars.Length == 0) + { + return (text, -1); + } + + // Calculate how many characters can fit + var targetCharCount = CalculateTargetCharCount(plainChars, maxWidth); + if (targetCharCount == 0) + { + return (string.Empty, -1); + } + + // Calculate range to keep from middle + var skipFromStart = Math.Max(0, (plainChars.Length - targetCharCount) / 2); + var skipFromEnd = plainChars.Length - skipFromStart - targetCharCount; + + StringBuilder result = new(); + List outputOpenTags = []; + List pendingOpenTags = []; + var (plainCharIndex, hasStartedOutput) = (0, false); + + foreach (var (content, isTag) in segments) + { + switch (isTag, hasStartedOutput) + { + // Process tags after output has started + case (true, true): + result = result.Append(content); + ProcessOpenTag(content, outputOpenTags); + break; + + // Queue opening tags before output starts + case (true, false) when !content.StartsWith(""): + pendingOpenTags.Add(content); + break; + + // Handle closing tags in skipped region, remove matching opening tag from pending + case (true, false) when content.StartsWith(" + t[1..^1].Split(' ')[0].Equals(closingTagName, StringComparison.OrdinalIgnoreCase)); + if (matchIndex >= 0) + { + pendingOpenTags.RemoveAt(matchIndex); + } + break; + + // Process plain text, keeping only middle portion + case (false, _): + foreach (var ch in content) + { + if (plainCharIndex >= skipFromStart && plainCharIndex < plainChars.Length - skipFromEnd) + { + // Start output and apply pending tags + if (!hasStartedOutput) + { + hasStartedOutput = true; + pendingOpenTags.ForEach(tag => + { + result = result.Append(tag); + ProcessOpenTag(tag, outputOpenTags); + }); + } + result = result.Append(ch); + } + plainCharIndex++; + } + break; + default: + break; + } + } + + CloseOpenTags(result, outputOpenTags); + return (result.ToString(), -1); + } + + /// + /// Removes all HTML tags from the given text. + /// + /// The text containing HTML tags. + /// The text with all HTML tags removed. + private static string StripHtmlTags( string text ) + { + return string.IsNullOrEmpty(text) ? text : HtmlTagRegex().Replace(text, string.Empty); + } + + /// + /// Parses text into segments, separating HTML tags from plain text content. + /// + /// The text to parse. + /// A list of segments where each segment is either a tag or plain text content. + private static List<(string Content, bool IsTag)> ParseHtmlSegments( string text ) + { + var tagMatches = HtmlTagRegex().Matches(text); + if (tagMatches.Count == 0) + { + return [(text, false)]; + } + + List<(string Content, bool IsTag)> segments = []; + var currentIndex = 0; + + foreach (Match match in tagMatches) + { + if (match.Index > currentIndex) + { + segments.Add((text[currentIndex..match.Index], false)); + } + segments.Add((match.Value, true)); + currentIndex = match.Index + match.Length; + } + + if (currentIndex < text.Length) + { + segments.Add((text[currentIndex..], false)); + } + + return segments; + } + + /// + /// Processes an HTML tag and updates the list of currently open tags. + /// Adds opening tags to the list and removes matching closing tags. + /// + /// The HTML tag to process. + /// The list of currently open tag names. + private static void ProcessOpenTag( string tag, List openTags ) + { + var tagName = tag switch { + ['<', '/', .. var rest] => new string(rest).TrimEnd('>').Split(' ', 2)[0], + ['<', '!', ..] => null, + [.. var chars] when chars[^1] == '/' && chars[^2] == '>' => null, + ['<', .. var rest] => new string(rest).TrimEnd('>').Split(' ', 2)[0], + _ => null + }; + + if (tagName == null) + { + return; + } + + if (tag.StartsWith(" t.Equals(tagName, StringComparison.OrdinalIgnoreCase)); + if (index >= 0) openTags.RemoveAt(index); + } + else + { + openTags.Add(tagName); + } + } + + /// + /// Appends closing tags for all currently open tags in reverse order. + /// + /// The StringBuilder to append closing tags to. + /// The list of currently open tag names. + private static void CloseOpenTags( StringBuilder result, List openTags ) + { + openTags.AsEnumerable().Reverse().ToList().ForEach(tag => result.Append($"")); + } + + /// + /// Calculates how many characters can fit within the specified width. + /// + /// The characters to measure. + /// The maximum width allowed. + /// The number of characters that fit within the width. + private static int CalculateTargetCharCount( ReadOnlySpan plainChars, float maxWidth ) + { + var currentWidth = 0f; + var count = 0; + + foreach (var ch in plainChars) + { + var charWidth = Helper.GetCharWidth(ch); + if (currentWidth + charWidth > maxWidth) break; + currentWidth += charWidth; + count++; + } + + return count; + } + + /// + /// Updates and returns the scroll offset for the given text. + /// The offset increments based on tick count and wraps around at the specified length. + /// + /// The plain text being scrolled. + /// Whether scrolling left or right. + /// The length at which the offset wraps around. + /// The current scroll offset, or -1 if the text is not being scrolled. + private int UpdateScrollOffset( string plainText, bool scrollLeft, int wrapLength ) + { + var key = $"{plainText}_{scrollLeft}"; + + var newOffset = scrollOffsets.TryGetValue(key, out var offset) ? (offset + 1) % wrapLength : 0; + + _ = scrollOffsets.AddOrUpdate(key, newOffset, ( _, _ ) => newOffset); + return newOffset; + } + + /// + /// Updates the list of active tags based on the given HTML tag content. + /// Adds opening tags and removes matching closing tags. + /// + /// The HTML tag content to process. + /// The list of currently active tags. + private static void UpdateTagState( string content, List activeTags ) + { + if (!content.StartsWith("")) + { + activeTags.Add(content); + } + else if (content.StartsWith(" t[1..^1].Split(' ')[0].Equals(tagName, StringComparison.OrdinalIgnoreCase)); + if (index >= 0) + { + activeTags.RemoveAt(index); + } + } + } + + /// + /// Prepares data required for text scrolling by extracting plain characters and parsing segments. + /// + /// The text to prepare for scrolling. + /// The maximum width available for display. + /// A tuple containing plain characters array, HTML segments, and target character count. + private static (char[]? PlainChars, List<(string Content, bool IsTag)> Segments, int TargetCharCount) PrepareScrollData( string text, float maxWidth ) + { + var plainText = StripHtmlTags(text); + if (Helper.EstimateTextWidth(plainText) <= maxWidth) + { + return (null, [], 0); + } + + var segments = ParseHtmlSegments(text); + var plainChars = segments.Where(s => !s.IsTag).SelectMany(s => s.Content).ToArray(); + + if (plainChars.Length == 0) + { + return (null, segments, 0); + } + + var targetCharCount = CalculateTargetCharCount(plainChars, maxWidth); + return (plainChars, segments, targetCharCount); + } +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/InputMenuOption.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/InputMenuOption.cs new file mode 100644 index 000000000..b5d51224f --- /dev/null +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/InputMenuOption.cs @@ -0,0 +1,231 @@ +using System.Collections.Concurrent; +using SwiftlyS2.Shared.Misc; +using SwiftlyS2.Shared.Menus; +using SwiftlyS2.Shared.Players; + +namespace SwiftlyS2.Core.Menus.OptionsBase; + +/// +/// Represents a menu option that allows text input from players. +/// +public sealed class InputMenuOption : MenuOptionBase +{ + private readonly ConcurrentDictionary values = new(); + private readonly ConcurrentDictionary waitingForInput = new(); + private readonly ConcurrentDictionary inputStates = new(); + private readonly ConcurrentDictionary statusClearTasks = new(); + private readonly string defaultValue; + private readonly string hintMessage; + private readonly Func? validator; + private readonly int maxLength; + private Guid chatHookGuid; + + /// + /// Occurs when a player submits a valid input value. + /// + public event EventHandler>? ValueChanged; + + /// + /// Creates an instance of . + /// + /// The default input value. Defaults to empty string. + /// Maximum input length. Defaults to 16. + /// Optional hint message to display when waiting for input. Defaults to English prompt. + /// Optional function to validate input. Returns true if valid. + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + /// + /// When using this constructor, the property must be manually set to specify the initial text. + /// + public InputMenuOption( + int maxLength = 16, + Func? validator = null, + string defaultValue = "", + string? hintMessage = null, + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : base(updateIntervalMs, pauseIntervalMs) + { + if (maxLength <= 0) + { + Spectre.Console.AnsiConsole.WriteException(new ArgumentOutOfRangeException(nameof(maxLength), $"Max length must be greater than 0. Value {maxLength} clamped to 16.")); + maxLength = 16; + } + + PlaySound = true; + this.maxLength = maxLength; + this.validator = validator; + this.defaultValue = defaultValue; + this.hintMessage = hintMessage ?? $"Please type your input (max {maxLength} characters)"; + + values.Clear(); + Click += OnInputClick; + } + + /// + /// Creates an instance of . + /// + /// The text content to display. + /// Maximum input length. Defaults to 16. + /// Optional function to validate input. Returns true if valid. + /// The default input value. Defaults to empty string. + /// Optional hint message to display when waiting for input. Defaults to English prompt. + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + public InputMenuOption( + string text, + int maxLength = 16, + Func? validator = null, + string defaultValue = "", + string? hintMessage = null, + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : this(maxLength, validator, defaultValue, hintMessage, updateIntervalMs, pauseIntervalMs) + { + Text = text; + } + + public override string GetDisplayText( IPlayer player, int displayLine = 0 ) + { + if (inputStates.TryGetValue(player, out var state)) + { + return state; + } + + var text = base.GetDisplayText(player, displayLine); + var value = values.GetOrAdd(player, defaultValue); + var displayValue = string.IsNullOrEmpty(value) ? $"(empty)" : $"{value}"; + return $"{text}: {displayValue}"; + } + + /// + /// Gets the current input value for the specified player. + /// + /// The player whose value to retrieve. + /// The current input value. + public string GetValue( IPlayer player ) + { + return values.GetOrAdd(player, defaultValue); + } + + /// + /// Sets the input value for the specified player and triggers validation. + /// + /// The player whose value to set. + /// The value to set. + /// True if the value is valid and was set, false otherwise. + public bool SetValue( IPlayer player, string value ) + { + if (value.Length > maxLength) + { + value = value[..maxLength]; + } + + if (validator != null && !validator(value)) + { + return false; + } + + var oldValue = values.GetOrAdd(player, defaultValue); + _ = values.AddOrUpdate(player, value, ( _, _ ) => value); + + ValueChanged?.Invoke(this, new MenuOptionValueChangedEventArgs { + Player = player, + Option = this, + OldValue = oldValue, + NewValue = value + }); + + return true; + } + + private ValueTask OnInputClick( object? sender, MenuOptionClickEventArgs args ) + { + if (Menu?.MenuManager.Core != null && chatHookGuid == Guid.Empty) + { + chatHookGuid = Menu.MenuManager.Core.Command.HookClientChat(OnChatInput); + } + + if (statusClearTasks.TryGetValue(args.Player, out var oldCts)) + { + oldCts.Cancel(); + oldCts.Dispose(); + _ = statusClearTasks.TryRemove(args.Player, out _); + } + + if (waitingForInput.ContainsKey(args.Player)) + { + _ = waitingForInput.TryRemove(args.Player, out _); + _ = inputStates.TryRemove(args.Player, out _); + return ValueTask.CompletedTask; + } + + _ = inputStates.AddOrUpdate(args.Player, $"Waiting (click again to cancel)", ( _, _ ) => $"Waiting (click again to cancel)"); + args.Player.SendMessage(MessageType.Chat, hintMessage); + + _ = waitingForInput.AddOrUpdate(args.Player, true, ( _, _ ) => true); + + return ValueTask.CompletedTask; + } + + private HookResult OnChatInput( int playerId, string text, bool teamonly ) + { + var player = Menu?.MenuManager.Core.PlayerManager.GetPlayer(playerId); + if (player == null || !waitingForInput.ContainsKey(player)) + { + return HookResult.Continue; + } + + var input = text.Trim(); + + _ = waitingForInput.TryRemove(player, out _); + + var statusMessage = string.IsNullOrWhiteSpace(input) || !SetValue(player, input) ? "Invalid input" : $"Accepted"; + + _ = inputStates.AddOrUpdate(player, statusMessage, ( _, _ ) => statusMessage); + + if (statusClearTasks.TryGetValue(player, out var oldCts)) + { + oldCts.Cancel(); + oldCts.Dispose(); + } + + var cts = new CancellationTokenSource(); + _ = statusClearTasks.AddOrUpdate(player, cts, ( _, _ ) => cts); + + _ = Task.Run(async () => + { + try + { + await Task.Delay(2000, cts.Token); + _ = inputStates.TryRemove(player, out _); + if (statusClearTasks.TryRemove(player, out var completedCts)) + { + completedCts.Dispose(); + } + } + catch (Exception e) + { + if (!GlobalExceptionHandler.Handle(e)) return; + } + }, cts.Token); + + return HookResult.Stop; + } + + public override void Dispose() + { + foreach (var kvp in statusClearTasks) + { + kvp.Value.Cancel(); + kvp.Value.Dispose(); + } + statusClearTasks.Clear(); + + if (Menu?.MenuManager.Core != null && chatHookGuid != Guid.Empty) + { + Menu.MenuManager.Core.Command.UnhookClientChat(chatHookGuid); + chatHookGuid = Guid.Empty; + } + + base.Dispose(); + } +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/MenuOptionBase.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/MenuOptionBase.cs new file mode 100644 index 000000000..901b7b1a2 --- /dev/null +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/MenuOptionBase.cs @@ -0,0 +1,519 @@ +using System.Collections.Concurrent; +using System.Text.RegularExpressions; +using SwiftlyS2.Shared.Menus; +using SwiftlyS2.Shared.Players; +using SwiftlyS2.Core.Menus.OptionsBase.Helpers; + +namespace SwiftlyS2.Core.Menus.OptionsBase; + +/// +/// Provides a base implementation for menu options with event-driven behavior. +/// +public abstract partial class MenuOptionBase : IMenuOption, IDisposable +{ + private string text = string.Empty; + private string? dynamicText = null; + private float maxWidth = 26f; + private MenuOptionTextStyle textStyle = MenuOptionTextStyle.TruncateEnd; + private bool visible = true; + private bool enabled = true; + private readonly DynamicTextUpdater? dynamicTextUpdater; + private readonly ConcurrentDictionary playerVisible = new(); + private readonly ConcurrentDictionary playerEnabled = new(); + private readonly ConcurrentDictionary playerClickTask = new(); + + private volatile bool disposed; + + /// + /// Creates an instance of . + /// + /// + /// Using the parameterless constructor will not enable dynamic text updating features. + /// Derived classes should override the method to implement custom text style changes. + /// + protected MenuOptionBase() + { + disposed = false; + } + + /// + /// Creates an instance of with dynamic text updating capabilities. + /// + /// The interval in milliseconds between text updates. + /// The pause duration in milliseconds before starting the next text update cycle. + /// + /// Values less than 1/64f*1000 milliseconds (approximately 15.6ms) are meaningless, + /// as the refresh rate would be higher than the game's frame interval. + /// Both parameters will be automatically clamped to this minimum value. + /// + protected MenuOptionBase( int updateIntervalMs, int pauseIntervalMs ) + { + disposed = false; + + if (updateIntervalMs < (int)(1 / 64f * 1000)) + { + Spectre.Console.AnsiConsole.WriteException(new ArgumentOutOfRangeException(nameof(updateIntervalMs), $"updateIntervalMs: value {updateIntervalMs} is out of range.")); + } + + if (pauseIntervalMs < (int)(1 / 64f * 1000)) + { + Spectre.Console.AnsiConsole.WriteException(new ArgumentOutOfRangeException(nameof(pauseIntervalMs), $"pauseIntervalMs: value {pauseIntervalMs} is out of range.")); + } + + dynamicTextUpdater = new DynamicTextUpdater( + () => text, + () => textStyle, + () => maxWidth, + value => dynamicText = value, + Math.Max((int)(1 / 64f * 1000), updateIntervalMs), + Math.Max((int)(1 / 64f * 1000), pauseIntervalMs) + ); + } + + ~MenuOptionBase() + { + Dispose(); + } + + public virtual void Dispose() + { + if (disposed) + { + return; + } + + // Console.WriteLine($"{GetType().Name} has been disposed."); + dynamicTextUpdater?.Dispose(); + + disposed = true; + GC.SuppressFinalize(this); + } + + /// + /// Gets or sets the menu that this option belongs to. + /// + /// + /// This property will be null until the option is added to a menu via . + /// When implementing custom menu options, avoid accessing this property in the constructor as it will not be set yet. + /// + public IMenuAPI? Menu { get; internal set; } + + /// + /// Gets the number of lines this option requests to occupy in the menu. + /// + public virtual int LineCount => 1; + + /// + /// Gets or sets the text content displayed for this menu option. + /// + /// + /// This is a global property. Changing it will affect what all players see. + /// + public string Text { + get => text; + set { + if (text == value) + { + return; + } + + text = value; + // dynamicText = null; + + TextChanged?.Invoke(this, new MenuOptionEventArgs { Player = null!, Option = this }); + } + } + + /// + /// The maximum display width for menu option text in relative units. + /// + public float MaxWidth { + get => maxWidth; + set { + if (maxWidth == value) + { + return; + } + + if (value < 1f) + { + Spectre.Console.AnsiConsole.WriteException(new ArgumentOutOfRangeException(nameof(MaxWidth), $"MaxWidth: value {value:F3} is out of range.")); + } + + maxWidth = Math.Max(value, 1f); + // dynamicText = null; + } + } + + /// + /// Gets or sets a value indicating whether this option is visible in the menu. + /// + /// + /// This is a global property. Changing it will affect what all players see. + /// + public bool Visible { + get => visible; + set { + if (visible == value) + { + return; + } + + visible = value; + VisibilityChanged?.Invoke(this, new MenuOptionEventArgs { Player = null!, Option = this }); + } + } + + /// + /// Gets or sets a value indicating whether this option can be interacted with. + /// + /// + /// This is a global property. Changing it will affect what all players see. + /// + public bool Enabled { + get => enabled; + set { + if (enabled == value) + { + return; + } + + enabled = value; + EnabledChanged?.Invoke(this, new MenuOptionEventArgs { Player = null!, Option = this }); + } + } + + /// + /// Gets or sets a value indicating whether the menu should be closed after handling the click. + /// + public bool CloseAfterClick { get; init; } = false; + + /// + /// Gets or sets an object that contains data about this option. + /// + public object? Tag { get; set; } + + /// + /// Gets or sets the text size for this option. + /// + public MenuOptionTextSize TextSize { get; set; } = MenuOptionTextSize.Medium; + + /// + /// Gets or sets the text overflow style for this option. + /// + public MenuOptionTextStyle TextStyle { + get => textStyle; + set { + if (textStyle == value) + { + return; + } + + textStyle = value; + // dynamicText = null; + } + } + + /// + /// Gets or sets a value indicating whether a sound should play when this option is selected. + /// + public bool PlaySound { get; set; } = true; + + /// + /// Occurs when the visibility of the option changes. + /// + public event EventHandler? VisibilityChanged; + + /// + /// Occurs when the enabled state of the option changes. + /// + public event EventHandler? EnabledChanged; + + /// + /// Occurs when the text of the option changes. + /// + public event EventHandler? TextChanged; + + /// + /// Occurs before a click is processed, allowing validation and cancellation. + /// + public event EventHandler? Validating; + + /// + /// Occurs when the option is clicked by a player. + /// + public event AsyncEventHandler? Click; + + // /// + // /// Occurs when a player's cursor enters this option. + // /// + // public event EventHandler? Hover; + + /// + /// Occurs before HTML markup is assembled, allowing customization of the text content. + /// + public event EventHandler? BeforeFormat; + + /// + /// Occurs after HTML markup is assembled, allowing customization of the final HTML output. + /// + public event EventHandler? AfterFormat; + + /// + /// Determines whether the click task for the specified player is completed. + /// + /// The player to check. + /// True if the click task is completed; otherwise, false. + public virtual bool IsClickTaskCompleted( IPlayer player ) => !playerClickTask.TryGetValue(player, out var value) || value.IsCompleted; + + /// + /// Determines whether this option is visible to the specified player. + /// + /// The player to check visibility for. + /// True if the option is visible to the player; otherwise, false. + public virtual bool GetVisible( IPlayer player ) => playerVisible.TryGetValue(player, out var value) ? value : Visible; + + /// + /// Sets the visibility of this option for a specific player. + /// + /// The player to set visibility for. + /// True to make the option visible to the player; false to hide it. + /// + /// The per-player visibility has lower priority than the global property. + /// + public virtual void SetVisible( IPlayer player, bool visible ) => playerVisible.AddOrUpdate(player, visible, ( key, value ) => visible); + + /// + /// Determines whether this option is enabled for the specified player. + /// + /// The player to check enabled state for. + /// True if the option is enabled for the player; otherwise, false. + public virtual bool GetEnabled( IPlayer player ) => playerEnabled.TryGetValue(player, out var value) ? value : Enabled; + + /// + /// Sets the enabled state of this option for a specific player. + /// + /// The player to set enabled state for. + /// True to enable the option for the player; false to disable it. + /// + /// The per-player enabled state has lower priority than the global property. + /// + public virtual void SetEnabled( IPlayer player, bool enabled ) => playerEnabled.AddOrUpdate(player, enabled, ( key, value ) => enabled); + + // /// + // /// Gets the text to display for this option for the specified player. + // /// + // /// The player requesting the text. + // /// The text to display. + // public virtual string GetText( IPlayer player ) => Text; + + // /// + // /// Gets the formatted HTML markup for this option. + // /// + // /// The player to format for. + // /// The formatted HTML string. + // public virtual string GetFormattedHtmlText( IPlayer player ) + // { + // var args = new MenuOptionFormattingEventArgs { + // Player = player, + // Option = this, + // CustomText = null + // }; + + // BeforeFormat?.Invoke(this, args); + + // var displayText = args.CustomText ?? GetText(player); + // var isEnabled = GetEnabled(player); + // var sizeClass = GetSizeClass(TextSize); + + // var colorStyle = isEnabled ? "" : " color='grey'"; + // var result = $"{displayText}"; + + // args.CustomText = result; + // AfterFormat?.Invoke(this, args); + + // return args.CustomText; + // } + + /// + /// Gets the display text for this option as it should appear to the specified player. + /// + /// The player requesting the display text. + /// The display line index of the option. + /// The formatted display text for the option. + /// + /// When a menu option occupies multiple lines, MenuAPI may only need to display a specific line of that option. + /// + /// When LineCount=1: The displayLine parameter is not needed; return the HTML-formatted string directly. + /// When LineCount>=2: Check the displayLine parameter: + /// + /// displayLine=0: Return all content + /// displayLine=1: Return only the first line content + /// displayLine=2: Return only the second line content + /// And so on... + /// + /// + /// + /// Note: MenuAPI ensures that the displayLine parameter will not exceed the option's LineCount. + /// + public virtual string GetDisplayText( IPlayer player, int displayLine = 0 ) + { + var args = new MenuOptionFormattingEventArgs { + Player = player, + Option = this, + CustomText = null + }; + + BeforeFormat?.Invoke(this, args); + + if (playerClickTask.TryGetValue(player, out var value) && !value.IsCompleted) + { + args.CustomText = "Waiting..."; + } + else + { + var displayText = args.CustomText ?? dynamicText ?? Text; + + if (displayLine > 0) + { + var lines = BrTagRegex().Split(displayText); + if (displayLine <= lines.Length) + { + displayText = lines[displayLine - 1]; + } + } + + var isEnabled = Enabled && GetEnabled(player); + var sizeClass = TextSize.ToCssClass(); + + if (!isEnabled) + { + displayText = ColorTagRegex().Replace(displayText, string.Empty); + } + + var colorStyle = isEnabled ? string.Empty : $" color='{Menu?.Configuration.DisabledColor ?? "#666666"}'"; + var result = $"{displayText}"; + // Console.WriteLine($"displayText: {displayText}"); + + args.CustomText = result; + } + AfterFormat?.Invoke(this, args); + + return args.CustomText; + } + + /// + /// Validates whether the specified player can interact with this option. + /// + /// The player to validate. + /// A task that represents the asynchronous operation. The task result is true if validation succeeds; otherwise, false. + public virtual ValueTask OnValidatingAsync( IPlayer player ) + { + if (Validating == null) + { + return ValueTask.FromResult(true); + } + + var args = new MenuOptionValidatingEventArgs { + Player = player, + Option = this, + Cancel = false + }; + + Validating?.Invoke(this, args); + return ValueTask.FromResult(!args.Cancel); + } + + // /// + // /// Handles the click action for this option. + // /// + // /// The player who clicked the option. + // /// Whether to close the menu after handling the click. + // /// A task that represents the asynchronous operation. + // public virtual async ValueTask OnClickAsync( IPlayer player, bool closeMenu = false ) + // { + // if (!await OnValidatingAsync(player)) + // { + // return; + // } + + // if (Click != null) + // { + // var args = new MenuOptionClickEventArgs { + // Player = player, + // Option = this, + // CloseMenu = closeMenu + // }; + + // await Click.Invoke(this, args); + + // // if (args.CloseMenu) + // // { + // // Menu?.CloseForPlayer(player); + // // } + // } + // } + + /// + /// Handles the click action for this option. + /// + /// The player who clicked the option. + /// A task that represents the asynchronous operation. + public virtual async ValueTask OnClickAsync( IPlayer player ) + { + if (!visible || !enabled || !GetVisible(player) || !GetEnabled(player)) + { + return; + } + + if (playerClickTask.TryGetValue(player, out var value) && !value.IsCompleted) + { + return; + } + + if (!await OnValidatingAsync(player)) + { + return; + } + + if (Click != null) + { + var args = new MenuOptionClickEventArgs { + Player = player, + // Option = this, + CloseMenu = CloseAfterClick + }; + + try + { + var clickTask = Click.Invoke(this, args).AsTask(); + _ = playerClickTask.AddOrUpdate(player, clickTask, ( _, _ ) => clickTask); + await clickTask; + } + finally + { + _ = playerClickTask.TryRemove(player, out _); + } + } + + if (CloseAfterClick) + { + Menu?.MenuManager.CloseMenuForPlayer(player, Menu!); + } + } + + // /// + // /// Raises the event. + // /// + // /// The player whose cursor entered the option. + // protected virtual void OnHover( IPlayer player ) + // { + // Hover?.Invoke(this, new MenuOptionEventArgs { Player = player, Option = this }); + // } + + [GeneratedRegex(@"<[/\\]*br[/\\]*>", RegexOptions.IgnoreCase)] + private static partial Regex BrTagRegex(); + + [GeneratedRegex(@"\scolor\s*=\s*['""]{1}#[0-9A-Fa-f]{6}['""]{1}", RegexOptions.IgnoreCase)] + private static partial Regex ColorTagRegex(); +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/ProgressBarMenuOption.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/ProgressBarMenuOption.cs new file mode 100644 index 000000000..37547bbb4 --- /dev/null +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/ProgressBarMenuOption.cs @@ -0,0 +1,129 @@ +using System.Collections.Concurrent; +using SwiftlyS2.Shared.Players; + +namespace SwiftlyS2.Core.Menus.OptionsBase; + +/// +/// Represents a progress bar menu option that displays progress visually. +/// +public sealed class ProgressBarMenuOption : MenuOptionBase +{ + private readonly ConcurrentDictionary> progressProviders = new(); + private readonly Func defaultProgressProvider; + private readonly bool multiLine; + private readonly string filledChar; + private readonly string emptyChar; + + /// + /// Gets the width of the progress bar in characters. + /// + public int BarWidth { get; private init; } + + /// + /// Gets whether to display the percentage value. + /// + public bool ShowPercentage { get; private init; } + + public override int LineCount => multiLine ? 2 : 1; + + /// + /// Creates an instance of . + /// + /// Function that returns progress value (0.0 to 1.0). + /// If true, uses 2 lines; if false, uses 1 line. Defaults to false. + /// Whether to show percentage text. Defaults to true. + /// Character for filled portion. Defaults to "█". + /// Character for empty portion. Defaults to "░". + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + /// + /// When using this constructor, the property must be manually set to specify the initial text. + /// + public ProgressBarMenuOption( + Func progressProvider, + bool multiLine = false, + bool showPercentage = true, + string filledChar = "█", + string emptyChar = "░", + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : base(updateIntervalMs, pauseIntervalMs) + { + PlaySound = false; + this.defaultProgressProvider = progressProvider; + this.multiLine = multiLine; + this.BarWidth = multiLine ? 20 : 10; + this.ShowPercentage = showPercentage; + this.filledChar = filledChar; + this.emptyChar = emptyChar; + + progressProviders.Clear(); + } + + /// + /// Creates an instance of . + /// + /// The text content to display. + /// Function that returns progress value (0.0 to 1.0). + /// If true, uses 2 lines; if false, uses 1 line. Defaults to false. + /// Whether to show percentage text. Defaults to true. + /// Character for filled portion. Defaults to "█". + /// Character for empty portion. Defaults to "░". + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + public ProgressBarMenuOption( + string text, + Func progressProvider, + bool multiLine = false, + bool showPercentage = true, + string filledChar = "█", + string emptyChar = "░", + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : this(progressProvider, multiLine, showPercentage, filledChar, emptyChar, updateIntervalMs, pauseIntervalMs) + { + Text = text; + } + + public override string GetDisplayText( IPlayer player, int displayLine = 0 ) + { + var provider = progressProviders.GetOrAdd(player, defaultProgressProvider); + var progress = Math.Clamp(provider(), 0f, 1f); + var filledCount = (int)(progress * BarWidth); + var emptyCount = BarWidth - filledCount; + + var bar = string.Concat( + Enumerable.Range(0, filledCount).Select(_ => $"{filledChar}") + .Concat(Enumerable.Range(0, emptyCount).Select(_ => $"{emptyChar}")) + ); + + var progressBar = $"({bar}){(ShowPercentage ? $" {(int)(progress * 100)}%" : string.Empty)}"; + + return multiLine + ? displayLine switch { + 1 => base.GetDisplayText(player, displayLine), + 2 => progressBar, + _ => $"{base.GetDisplayText(player, displayLine)}:
{progressBar}" + } + : $"{base.GetDisplayText(player, displayLine)}: {progressBar}"; + } + + /// + /// Sets or updates the progress provider function for a specific player. + /// + /// The player whose progress provider to set. + /// Function that returns progress value (0.0 to 1.0). + public void SetProgressProvider( IPlayer player, Func progressProvider ) + { + _ = progressProviders.AddOrUpdate(player, progressProvider, ( _, _ ) => progressProvider); + } + + /// + /// Gets the current progress value for the specified player. + /// + /// The player whose progress to retrieve. + /// The current progress value (0.0 to 1.0). + public float GetProgress( IPlayer player ) + { + var provider = progressProviders.GetOrAdd(player, defaultProgressProvider); + return Math.Clamp(provider(), 0f, 1f); + } +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/SliderMenuOption.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/SliderMenuOption.cs new file mode 100644 index 000000000..346e3e7e3 --- /dev/null +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/SliderMenuOption.cs @@ -0,0 +1,164 @@ +using System.Collections.Concurrent; +using SwiftlyS2.Shared.Menus; +using SwiftlyS2.Shared.Players; + +namespace SwiftlyS2.Core.Menus.OptionsBase; + +/// +/// Represents a slider menu option that allows selecting a numeric value within a range. +/// +public sealed class SliderMenuOption : MenuOptionBase +{ + private readonly ConcurrentDictionary values = new(); + private readonly float defaultValue; + private readonly int totalBars; + + /// + /// Gets the minimum value of the slider. + /// + public float Min { get; private init; } + + /// + /// Gets the maximum value of the slider. + /// + public float Max { get; private init; } + + /// + /// Gets the step increment/decrement value. + /// + public float Step { get; private init; } + + /// + /// Occurs when the slider value changes for a player. + /// + public event EventHandler>? ValueChanged; + + /// + /// Creates an instance of . + /// + /// The minimum value. Defaults to 0. + /// The maximum value. Defaults to 100. + /// The default starting value. Defaults to the minimum value. + /// The increment/decrement step. Defaults to 5. + /// The number of visual bars to display. Defaults to 10. + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + /// + /// When using this constructor, the property must be manually set to specify the initial text. + /// + public SliderMenuOption( + float min = 0f, + float max = 100f, + float? defaultValue = null, + float step = 5f, + int totalBars = 10, + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : base(updateIntervalMs, pauseIntervalMs) + { + if (min >= max) + { + Spectre.Console.AnsiConsole.WriteException(new ArgumentException($"Min ({min}) must be less than Max ({max}). Swapping values.", nameof(min))); + (min, max) = (max, min); + } + + if (step <= 0) + { + Spectre.Console.AnsiConsole.WriteException(new ArgumentOutOfRangeException(nameof(step), $"Step must be greater than 0. Value {step} clamped to 0.1.")); + step = 1f; + } + + if (totalBars <= 0) + { + Spectre.Console.AnsiConsole.WriteException(new ArgumentOutOfRangeException(nameof(totalBars), $"Total bars must be greater than 0. Value {totalBars} clamped to 10.")); + totalBars = 10; + } + + PlaySound = true; + this.Min = min; + this.Max = max; + this.Step = step; + this.defaultValue = Math.Clamp(defaultValue ?? min, min, max); + this.totalBars = totalBars; + + values.Clear(); + Click += OnSliderClick; + } + + /// + /// Creates an instance of . + /// + /// The text content to display. + /// The minimum value. Defaults to 0. + /// The maximum value. Defaults to 100. + /// The default starting value. Defaults to the minimum value. + /// The increment/decrement step. Defaults to 5. + /// The number of visual bars to display. Defaults to 10. + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + public SliderMenuOption( + string text, + float min = 0f, + float max = 100f, + float? defaultValue = null, + float step = 5f, + int totalBars = 10, + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : this(min, max, defaultValue, step, totalBars, updateIntervalMs, pauseIntervalMs) + { + Text = text; + } + + public override string GetDisplayText( IPlayer player, int displayLine = 0 ) + { + var text = base.GetDisplayText(player, displayLine); + var value = values.GetOrAdd(player, defaultValue); + var percentage = (value - Min) / (Max - Min); + var filledBars = (int)(percentage * totalBars); + + var bars = string.Concat( + Enumerable.Range(0, totalBars).Select(i => i < filledBars ? "" : $"") + ); + + var slider = $"({bars}) {value:F1}"; + + return $"{text}: {slider}"; + } + + /// + /// Gets the current slider value for the specified player. + /// + /// The player whose value to retrieve. + /// The current slider value. + public float GetValue( IPlayer player ) + { + return values.GetOrAdd(player, defaultValue); + } + + /// + /// Sets the slider value for the specified player. + /// + /// The player whose value to set. + /// The value to set. Will be clamped between Min and Max. + public void SetValue( IPlayer player, float value ) + { + var clampedValue = Math.Clamp(value, Min, Max); + _ = values.AddOrUpdate(player, clampedValue, ( _, _ ) => clampedValue); + } + + private ValueTask OnSliderClick( object? sender, MenuOptionClickEventArgs args ) + { + var oldValue = values.GetOrAdd(args.Player, defaultValue); + var newValue = Math.Clamp(oldValue + Step > Max ? Min : oldValue + Step, Min, Max); + + _ = values.AddOrUpdate(args.Player, newValue, ( _, _ ) => newValue); + + ValueChanged?.Invoke(this, new MenuOptionValueChangedEventArgs { + Player = args.Player, + Option = this, + OldValue = oldValue, + NewValue = newValue + }); + + return ValueTask.CompletedTask; + } +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/SubmenuMenuOption.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/SubmenuMenuOption.cs new file mode 100644 index 000000000..15c04e2f8 --- /dev/null +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/SubmenuMenuOption.cs @@ -0,0 +1,150 @@ +using System.Collections.Concurrent; +using SwiftlyS2.Shared.Menus; +using SwiftlyS2.Shared.Players; + +namespace SwiftlyS2.Core.Menus.OptionsBase; + +/// +/// Represents a menu option that opens a submenu when clicked. +/// +public sealed class SubmenuMenuOption : MenuOptionBase +{ + private readonly Func>? submenuBuilderAsync; + + // /// + // /// Occurs when the submenu is ready to be opened. + // /// + // public event EventHandler? SubmenuRequested; + + /// + /// Creates an instance of with a pre-built submenu. + /// + /// The submenu to open when this option is clicked. + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + /// + /// When using this constructor, the property must be manually set to specify the initial text. + /// + public SubmenuMenuOption( + IMenuAPI submenu, + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : base(updateIntervalMs, pauseIntervalMs) + { + PlaySound = true; + this.submenuBuilderAsync = () => Task.FromResult(submenu); + Click += OnSubmenuClick; + } + + /// + /// Creates an instance of with a pre-built submenu. + /// + /// The text content to display. + /// The submenu to open when this option is clicked. + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + public SubmenuMenuOption( + string text, + IMenuAPI submenu, + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : this(submenu, updateIntervalMs, pauseIntervalMs) + { + Text = text; + } + + /// + /// Creates an instance of with a synchronous builder. + /// + /// Function that builds and returns the submenu. + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + /// + /// When using this constructor, the property must be manually set to specify the initial text. + /// + public SubmenuMenuOption( + Func submenuBuilder, + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : base(updateIntervalMs, pauseIntervalMs) + { + PlaySound = true; + this.submenuBuilderAsync = () => Task.FromResult(submenuBuilder()); + Click += OnSubmenuClick; + } + + /// + /// Creates an instance of with a synchronous builder. + /// + /// The text content to display. + /// Function that builds and returns the submenu. + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + public SubmenuMenuOption( + string text, + Func submenuBuilder, + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : this(submenuBuilder, updateIntervalMs, pauseIntervalMs) + { + Text = text; + } + + /// + /// Creates an instance of with an asynchronous builder. + /// + /// Async function that builds and returns the submenu. + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + /// + /// When using this constructor, the property must be manually set to specify the initial text. + /// + public SubmenuMenuOption( + Func> submenuBuilderAsync, + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : base(updateIntervalMs, pauseIntervalMs) + { + PlaySound = true; + this.submenuBuilderAsync = submenuBuilderAsync; + Click += OnSubmenuClick; + } + + /// + /// Creates an instance of with an asynchronous builder. + /// + /// The text content to display. + /// Async function that builds and returns the submenu. + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + public SubmenuMenuOption( + string text, + Func> submenuBuilderAsync, + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : this(submenuBuilderAsync, updateIntervalMs, pauseIntervalMs) + { + Text = text; + } + + private async ValueTask OnSubmenuClick( object? sender, MenuOptionClickEventArgs args ) + { + if (submenuBuilderAsync == null || Menu == null) + { + return; + } + + var menu = await submenuBuilderAsync.Invoke(); + if (menu is not MenuAPI submenu) + { + return; + } + + var currentMenu = Menu.MenuManager.GetCurrentMenu(args.Player); + if (Menu != currentMenu || currentMenu == null) + { + return; + } + + // SubmenuRequested?.Invoke(this, new MenuManagerEventArgs { + // Player = args.Player, + // Menu = menu + // }); + submenu.Parent = (Menu, this); + Menu.MenuManager.OpenMenuForPlayer(args.Player, submenu); + } +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/TextMenuOption.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/TextMenuOption.cs new file mode 100644 index 000000000..4ad43a3fd --- /dev/null +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/TextMenuOption.cs @@ -0,0 +1,36 @@ +namespace SwiftlyS2.Core.Menus.OptionsBase; + +/// +/// Represents a simple text-only menu option without interactive behavior. +/// +public sealed class TextMenuOption : MenuOptionBase +{ + /// + /// Creates an instance of with dynamic text updating capabilities. + /// + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + /// + /// When using this constructor, the property must be manually set to specify the initial text. + /// + public TextMenuOption( + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : base(updateIntervalMs, pauseIntervalMs) + { + PlaySound = false; + } + + /// + /// Creates an instance of with dynamic text updating capabilities. + /// + /// The text content to display. + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + public TextMenuOption( + string text, + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : this(updateIntervalMs, pauseIntervalMs) + { + Text = text; + } +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/ToggleMenuOption.cs b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/ToggleMenuOption.cs new file mode 100644 index 000000000..773ebd651 --- /dev/null +++ b/managed/src/SwiftlyS2.Core/Modules/Menus/OptionsBase/ToggleMenuOption.cs @@ -0,0 +1,125 @@ +using System.Collections.Concurrent; +using SwiftlyS2.Shared.Menus; +using SwiftlyS2.Shared.Players; + +namespace SwiftlyS2.Core.Menus.OptionsBase; + +/// +/// Represents a toggleable menu option that displays an on/off state. +/// +public sealed class ToggleMenuOption : MenuOptionBase +{ + private readonly ConcurrentDictionary toggled = new(); + private readonly bool defaultToggleState; + private readonly string toggleOnSymbol; + private readonly string toggleOffSymbol; + + /// + /// Event triggered when the toggle value changes for a player. + /// + public event EventHandler>? ValueChanged; + + /// + /// Creates an instance of with dynamic text updating capabilities. + /// + /// The default toggle state for new players. Defaults to true. + /// The HTML symbol to display when toggle is on. Defaults to green checkmark. + /// The HTML symbol to display when toggle is off. Defaults to red X mark. + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + /// + /// When using this constructor, the property must be manually set to specify the initial text. + /// + public ToggleMenuOption( + bool defaultToggleState = true, + string? toggleOnSymbol = null, + string? toggleOffSymbol = null, + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : base(updateIntervalMs, pauseIntervalMs) + { + this.defaultToggleState = defaultToggleState; + this.toggleOnSymbol = toggleOnSymbol ?? "✔"; + this.toggleOffSymbol = toggleOffSymbol ?? "✘"; + PlaySound = true; + + toggled.Clear(); + + Click += OnToggleClick; + } + + /// + /// Creates an instance of with dynamic text updating capabilities. + /// + /// The text content to display. + /// The default toggle state for new players. Defaults to true. + /// The HTML symbol to display when toggle is on. Defaults to green checkmark. + /// The HTML symbol to display when toggle is off. Defaults to red X mark. + /// The interval in milliseconds between text updates. Defaults to 120ms. + /// The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms. + public ToggleMenuOption( + string text, + bool defaultToggleState = true, + string? toggleOnSymbol = null, + string? toggleOffSymbol = null, + int updateIntervalMs = 120, + int pauseIntervalMs = 1000 ) : this(defaultToggleState, toggleOnSymbol, toggleOffSymbol, updateIntervalMs, pauseIntervalMs) + { + Text = text; + } + + /// + /// Gets the display text for this option, including the toggle state indicator. + /// + /// The player viewing the option. + /// The display line number (not used in this implementation). + /// The formatted display text with toggle state indicator. + public override string GetDisplayText( IPlayer player, int displayLine = 0 ) + { + var text = base.GetDisplayText(player, displayLine); + var isToggled = toggled.GetOrAdd(player, defaultToggleState); + return $"{text} {(isToggled ? $"{toggleOnSymbol}" : $"{toggleOffSymbol}")}"; + } + + /// + /// Gets the toggle state for the specified player. + /// + /// The player whose toggle state to retrieve. + /// True if toggled on, false if toggled off. Uses the configured default value for new players. + public bool GetToggleState( IPlayer player ) + { + return toggled.GetOrAdd(player, defaultToggleState); + } + + /// + /// Sets the toggle state for the specified player and triggers the value changed event. + /// + /// The player whose toggle state to set. + /// The toggle state to set. + /// True if the value was changed, false if it was already the same value. + public bool SetToggleState( IPlayer player, bool value ) + { + var oldValue = toggled.GetOrAdd(player, defaultToggleState); + + if (oldValue == value) + { + return false; + } + + _ = toggled.AddOrUpdate(player, value, ( _, _ ) => value); + + ValueChanged?.Invoke(this, new MenuOptionValueChangedEventArgs { + Player = player, + Option = this, + OldValue = oldValue, + NewValue = value + }); + + return true; + } + + private ValueTask OnToggleClick( object? sender, MenuOptionClickEventArgs args ) + { + _ = SetToggleState(args.Player, !GetToggleState(args.Player)); + return ValueTask.CompletedTask; + } +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/NetMessages/NetMessageHookCallback.cs b/managed/src/SwiftlyS2.Core/Modules/NetMessages/NetMessageHookCallback.cs index 2e4ec2e43..a69bad96c 100644 --- a/managed/src/SwiftlyS2.Core/Modules/NetMessages/NetMessageHookCallback.cs +++ b/managed/src/SwiftlyS2.Core/Modules/NetMessages/NetMessageHookCallback.cs @@ -12,13 +12,14 @@ namespace SwiftlyS2.Core.NetMessages; [UnmanagedFunctionPointer(CallingConvention.Cdecl)] -internal delegate HookResult NetMessageClientHookCallbackDelegate(int playerId, int msgId, nint pMessage); +internal delegate HookResult NetMessageClientHookCallbackDelegate( int playerId, int msgId, nint pMessage ); [UnmanagedFunctionPointer(CallingConvention.Cdecl)] -internal delegate HookResult NetMessageServerHookCallbackDelegate(nint pPlayerMask, int msgId, nint pMessage); +internal delegate HookResult NetMessageServerHookCallbackDelegate( nint pPlayerMask, int msgId, nint pMessage ); -internal abstract class NetMessageHookCallback : IDisposable { +internal abstract class NetMessageHookCallback : IDisposable +{ public Guid Guid { get; init; } @@ -26,7 +27,7 @@ internal abstract class NetMessageHookCallback : IDisposable { public ILoggerFactory LoggerFactory { get; } - protected NetMessageHookCallback(ILoggerFactory loggerFactory, IContextedProfilerService profiler) + protected NetMessageHookCallback( ILoggerFactory loggerFactory, IContextedProfilerService profiler ) { LoggerFactory = loggerFactory; Profiler = profiler; @@ -36,7 +37,8 @@ protected NetMessageHookCallback(ILoggerFactory loggerFactory, IContextedProfile } -internal class NetMessageClientHookCallback : NetMessageHookCallback where T : ITypedProtobuf, INetMessage, IDisposable { +internal class NetMessageClientHookCallback : NetMessageHookCallback where T : ITypedProtobuf, INetMessage, IDisposable +{ private INetMessageService.ClientNetMessageHandler _callback; private NetMessageClientHookCallbackDelegate _unmanagedCallback; @@ -45,13 +47,15 @@ internal class NetMessageClientHookCallback : NetMessageHookCallback where T private ILogger> _logger; - public NetMessageClientHookCallback(INetMessageService.ClientNetMessageHandler callback, ILoggerFactory loggerFactory, IContextedProfilerService profiler) : base(loggerFactory, profiler) { + public NetMessageClientHookCallback( INetMessageService.ClientNetMessageHandler callback, ILoggerFactory loggerFactory, IContextedProfilerService profiler ) : base(loggerFactory, profiler) + { Guid = Guid.NewGuid(); _logger = LoggerFactory.CreateLogger>(); _callback = callback; - _unmanagedCallback = (playerId, msgId, pMessage) => { + _unmanagedCallback = ( playerId, msgId, pMessage ) => + { try { if (msgId != T.MessageId) return HookResult.Continue; @@ -61,7 +65,10 @@ public NetMessageClientHookCallback(INetMessageService.ClientNetMessageHandler : NetMessageHookCallback where T : ITypedProtobuf, INetMessage, IDisposable { +internal class NetMessageServerHookCallback : NetMessageHookCallback where T : ITypedProtobuf, INetMessage, IDisposable +{ private INetMessageService.ServerNetMessageHandler _callback; private NetMessageServerHookCallbackDelegate _unmanagedCallback; @@ -85,13 +94,15 @@ internal class NetMessageServerHookCallback : NetMessageHookCallback where T private ulong _nativeListenerId; private ILogger> _logger; - public NetMessageServerHookCallback(INetMessageService.ServerNetMessageHandler callback, ILoggerFactory loggerFactory, IContextedProfilerService profiler) : base(loggerFactory, profiler) { + public NetMessageServerHookCallback( INetMessageService.ServerNetMessageHandler callback, ILoggerFactory loggerFactory, IContextedProfilerService profiler ) : base(loggerFactory, profiler) + { Guid = Guid.NewGuid(); _logger = LoggerFactory.CreateLogger>(); _callback = callback; - _unmanagedCallback = (pPlayerMask, msgId, pMessage) => { + _unmanagedCallback = ( pPlayerMask, msgId, pMessage ) => + { try { if (msgId != T.MessageId) return HookResult.Continue; @@ -104,7 +115,10 @@ public NetMessageServerHookCallback(INetMessageService.ServerNetMessageHandler _callbacks = new(); private ILoggerFactory _loggerFactory; private IContextedProfilerService _profiler; - private object _lock = new(); + private Lock _lock = new(); - public NetMessageService(ILoggerFactory loggerFactory, IContextedProfilerService profiler) { + public NetMessageService( ILoggerFactory loggerFactory, IContextedProfilerService profiler ) + { _loggerFactory = loggerFactory; _profiler = profiler; } - public Guid HookClientMessage(INetMessageService.ClientNetMessageHandler callback) where T : ITypedProtobuf, INetMessage, IDisposable { + public Guid HookClientMessage( INetMessageService.ClientNetMessageHandler callback ) where T : ITypedProtobuf, INetMessage, IDisposable + { var hook = new NetMessageClientHookCallback(callback, _loggerFactory, _profiler); - lock (_lock) { + lock (_lock) + { _callbacks.Add(hook); } return hook.Guid; } - public Guid HookServerMessage(INetMessageService.ServerNetMessageHandler callback) where T : ITypedProtobuf, INetMessage, IDisposable { + public Guid HookServerMessage( INetMessageService.ServerNetMessageHandler callback ) where T : ITypedProtobuf, INetMessage, IDisposable + { var hook = new NetMessageServerHookCallback(callback, _loggerFactory, _profiler); - lock (_lock) { + lock (_lock) + { _callbacks.Add(hook); } return hook.Guid; } - public void Unhook(Guid guid) { - lock (_lock) { - _callbacks.RemoveAll(callback => { - if (callback.Guid == guid) { + public void Unhook( Guid guid ) + { + lock (_lock) + { + _callbacks.RemoveAll(callback => + { + if (callback.Guid == guid) + { callback.Dispose(); return true; } @@ -48,10 +58,14 @@ public void Unhook(Guid guid) { } } - public void UnhookClientMessage() where T : ITypedProtobuf, INetMessage, IDisposable { - lock (_lock) { - _callbacks.RemoveAll(callback => { - if (callback is NetMessageClientHookCallback clientHook) { + public void UnhookClientMessage() where T : ITypedProtobuf, INetMessage, IDisposable + { + lock (_lock) + { + _callbacks.RemoveAll(callback => + { + if (callback is NetMessageClientHookCallback clientHook) + { clientHook.Dispose(); return true; } @@ -59,11 +73,15 @@ public void UnhookClientMessage() where T : ITypedProtobuf, INetMessage }); } } - - public void UnhookServerMessage() where T : ITypedProtobuf, INetMessage, IDisposable { - lock (_lock) { - _callbacks.RemoveAll(callback => { - if (callback is NetMessageServerHookCallback serverHook) { + + public void UnhookServerMessage() where T : ITypedProtobuf, INetMessage, IDisposable + { + lock (_lock) + { + _callbacks.RemoveAll(callback => + { + if (callback is NetMessageServerHookCallback serverHook) + { serverHook.Dispose(); return true; } @@ -72,28 +90,34 @@ public void UnhookServerMessage() where T : ITypedProtobuf, INetMessage } } - private nint AllocateNetMessage(int msgId) { + private nint AllocateNetMessage( int msgId ) + { var handle = NativeNetMessages.AllocateNetMessageByID(msgId); if (handle == 0) throw new InvalidOperationException("Failed to allocate net message. This is possibly caused by the message ID is already deprecated not supported in game."); return handle; } - public T Create() where T : ITypedProtobuf, INetMessage, IDisposable { + public T Create() where T : ITypedProtobuf, INetMessage, IDisposable + { var handle = AllocateNetMessage(T.MessageId); var message = T.Wrap(handle, true); return message; } - public void Send(Action configureMessage) where T : ITypedProtobuf, INetMessage, IDisposable { + public void Send( Action configureMessage ) where T : ITypedProtobuf, INetMessage, IDisposable + { var handle = AllocateNetMessage(T.MessageId); var message = T.Wrap(handle, true); configureMessage(message); NativeNetMessages.SendMessageToPlayers(handle, T.MessageId, message.Recipients.ToMask()); } - public void Dispose() { - lock (_lock) { - foreach (var callback in _callbacks) { + public void Dispose() + { + lock (_lock) + { + foreach (var callback in _callbacks) + { callback.Dispose(); } _callbacks.Clear(); diff --git a/managed/src/SwiftlyS2.Core/Modules/Permissions/PermissionManager.cs b/managed/src/SwiftlyS2.Core/Modules/Permissions/PermissionManager.cs index 611225aa5..457ee92ad 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Permissions/PermissionManager.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Permissions/PermissionManager.cs @@ -8,7 +8,8 @@ namespace SwiftlyS2.Core.Permissions; -internal class PermissionManager : IPermissionManager { +internal class PermissionManager : IPermissionManager +{ private Dictionary> _playerPermissions = new(); private Dictionary> _temporaryPlayerPermissions = new(); @@ -18,23 +19,30 @@ internal class PermissionManager : IPermissionManager { private ImmutableDictionary _queryCache = ImmutableDictionary.Create(); private object _lock = new(); - public PermissionManager(IOptionsMonitor options, ILogger logger) { + public PermissionManager( IOptionsMonitor options, ILogger logger ) + { LoadPermissions(options.CurrentValue); - options.OnChange((config) => { - try { + options.OnChange(( config ) => + { + try + { logger.LogInformation("Permission config changed, reloading..."); LoadPermissions(config); logger.LogInformation("Permission config reloaded."); - } catch (Exception e) { + } + catch (Exception e) + { + if (!GlobalExceptionHandler.Handle(e)) return; logger.LogError(e, "Error reloading permission config."); } }); - } + } - private void LoadPermissions(PermissionConfig config) + private void LoadPermissions( PermissionConfig config ) { - lock(_lock) { + lock (_lock) + { _queryCache = _queryCache.Clear(); _defaultPermissions = config.PermissionGroups.ContainsKey("__default") ? config.PermissionGroups["__default"] : []; _playerPermissions = config.Players.ToDictionary(x => ulong.Parse(x.Key), x => x.Value); @@ -42,14 +50,17 @@ private void LoadPermissions(PermissionConfig config) } } - private List GetPlayerPermissions(ulong playerId) { + private List GetPlayerPermissions( ulong playerId ) + { List permissions = new(); - if(_playerPermissions.TryGetValue(playerId, out var playerPermission)) { + if (_playerPermissions.TryGetValue(playerId, out var playerPermission)) + { permissions.AddRange(playerPermission); } - if(_temporaryPlayerPermissions.TryGetValue(playerId, out var temporaryPermissions)) { + if (_temporaryPlayerPermissions.TryGetValue(playerId, out var temporaryPermissions)) + { permissions.AddRange(temporaryPermissions); } @@ -58,7 +69,8 @@ private List GetPlayerPermissions(ulong playerId) { return permissions; } - private Dictionary> GetSubPermissions() { + private Dictionary> GetSubPermissions() + { var result = new Dictionary>(); foreach (var kvp in _subPermissions) @@ -86,11 +98,14 @@ private Dictionary> GetSubPermissions() { return result; } - private bool IsEqual(string from, string target) { - if (from == "*") { + private bool IsEqual( string from, string target ) + { + if (from == "*") + { return true; } - if (!from.Contains("*")) { + if (!from.Contains("*")) + { return string.Equals(from, target, StringComparison.OrdinalIgnoreCase); } @@ -98,21 +113,27 @@ private bool IsEqual(string from, string target) { return target.StartsWith(prefix, StringComparison.OrdinalIgnoreCase); } - private bool HasNestedPermission(string rootPermission, string targetPermission, HashSet visitedPermissions) { - if(visitedPermissions.Contains(rootPermission)) { + private bool HasNestedPermission( string rootPermission, string targetPermission, HashSet visitedPermissions ) + { + if (visitedPermissions.Contains(rootPermission)) + { AnsiConsole.WriteLine("Loop detected for permission: " + rootPermission); return false; } visitedPermissions.Add(rootPermission); - if(IsEqual(rootPermission, targetPermission)) { + if (IsEqual(rootPermission, targetPermission)) + { return true; } - if (GetSubPermissions().TryGetValue(rootPermission, out var subPermissions)) { - foreach(var subPermission in subPermissions) { - if(HasNestedPermission(subPermission, targetPermission, visitedPermissions)) { + if (GetSubPermissions().TryGetValue(rootPermission, out var subPermissions)) + { + foreach (var subPermission in subPermissions) + { + if (HasNestedPermission(subPermission, targetPermission, visitedPermissions)) + { return true; } } @@ -121,13 +142,15 @@ private bool HasNestedPermission(string rootPermission, string targetPermission, return false; } - public bool PlayerHasPermission(ulong playerId, string permission) { + public bool PlayerHasPermission( ulong playerId, string permission ) + { var key = new PermissionCacheKey { PlayerId = playerId, Permission = permission }; - if(_queryCache.TryGetValue(key, out var result)) { + if (_queryCache.TryGetValue(key, out var result)) + { return result; } - lock(_lock) + lock (_lock) { var permissions = GetPlayerPermissions(playerId); @@ -158,14 +181,19 @@ public bool PlayerHasPermission(ulong playerId, string permission) { } - public void AddPermission(ulong playerId, string permission) { - lock(_lock) { - if (_temporaryPlayerPermissions.TryGetValue(playerId, out var permissions)) { - if(!permissions.Contains(permission)) { + public void AddPermission( ulong playerId, string permission ) + { + lock (_lock) + { + if (_temporaryPlayerPermissions.TryGetValue(playerId, out var permissions)) + { + if (!permissions.Contains(permission)) + { permissions.Add(permission); } } - else { + else + { _temporaryPlayerPermissions[playerId] = [permission]; } @@ -173,10 +201,14 @@ public void AddPermission(ulong playerId, string permission) { } } - public void RemovePermission(ulong playerId, string permission) { - lock(_lock) { - if (_temporaryPlayerPermissions.TryGetValue(playerId, out var permissions)) { - if(permissions.Contains(permission)) { + public void RemovePermission( ulong playerId, string permission ) + { + lock (_lock) + { + if (_temporaryPlayerPermissions.TryGetValue(playerId, out var permissions)) + { + if (permissions.Contains(permission)) + { permissions.Remove(permission); } } @@ -185,24 +217,33 @@ public void RemovePermission(ulong playerId, string permission) { _queryCache = _queryCache.Clear(); } - public void AddSubPermission(string permission, string subPermission) { - lock(_lock) { - if(_temporarySubPermissions.TryGetValue(permission, out var subPermissions)) { - if(!subPermissions.Contains(subPermission)) { + public void AddSubPermission( string permission, string subPermission ) + { + lock (_lock) + { + if (_temporarySubPermissions.TryGetValue(permission, out var subPermissions)) + { + if (!subPermissions.Contains(subPermission)) + { subPermissions.Add(subPermission); } } - else { + else + { _temporarySubPermissions[permission] = [subPermission]; } } _queryCache = _queryCache.Clear(); } - public void RemoveSubPermission(string permission, string subPermission) { - lock(_lock) { - if(_temporarySubPermissions.TryGetValue(permission, out var subPermissions)) { - if(subPermissions.Contains(subPermission)) { + public void RemoveSubPermission( string permission, string subPermission ) + { + lock (_lock) + { + if (_temporarySubPermissions.TryGetValue(permission, out var subPermissions)) + { + if (subPermissions.Contains(subPermission)) + { subPermissions.Remove(subPermission); } } diff --git a/managed/src/SwiftlyS2.Core/Modules/Players/Player.cs b/managed/src/SwiftlyS2.Core/Modules/Players/Player.cs index c7d4dc906..7976dc504 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Players/Player.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Players/Player.cs @@ -11,7 +11,7 @@ namespace SwiftlyS2.Core.Players; internal class Player : IPlayer { - public Player(int pid) + public Player( int pid ) { Slot = pid; } @@ -56,7 +56,7 @@ public Player(int pid) Language IPlayer.PlayerLanguage => PlayerLanguage; - public void ChangeTeam(Team team) + public void ChangeTeam( Team team ) { NativePlayer.ChangeTeam(Slot, (byte)team); } @@ -66,42 +66,42 @@ public void ClearTransmitEntityBlocks() NativePlayer.ClearTransmitEntityBlocked(Slot); } - public ListenOverride GetListenOverride(int player) + public ListenOverride GetListenOverride( int player ) { return (ListenOverride)NativeVoiceManager.GetClientListenOverride(Slot, player); } - public bool IsTransmitEntityBlocked(int entityid) + public bool IsTransmitEntityBlocked( int entityid ) { return NativePlayer.IsTransmitEntityBlocked(Slot, entityid); } - public void Kick(string reason, ENetworkDisconnectionReason gameReason) + public void Kick( string reason, ENetworkDisconnectionReason gameReason ) { NativePlayer.Kick(Slot, reason, (int)gameReason); } - public void SendMessage(MessageType kind, string message) + public void SendMessage( MessageType kind, string message ) { - NativePlayer.SendMessage(Slot, (int)kind, message); + NativePlayer.SendMessage(Slot, (int)kind, message, 5000); } - public void SetListenOverride(int player, ListenOverride listenOverride) + public void SetListenOverride( int player, ListenOverride listenOverride ) { NativeVoiceManager.SetClientListenOverride(Slot, player, (int)listenOverride); } - public void ShouldBlockTransmitEntity(int entityid, bool shouldBlockTransmit) + public void ShouldBlockTransmitEntity( int entityid, bool shouldBlockTransmit ) { NativePlayer.ShouldBlockTransmitEntity(Slot, entityid, shouldBlockTransmit); } - public void SwitchTeam(Team team) + public void SwitchTeam( Team team ) { NativePlayer.SwitchTeam(Slot, (byte)team); } - public void TakeDamage(CTakeDamageInfo damageInfo) + public void TakeDamage( CTakeDamageInfo damageInfo ) { unsafe { @@ -109,7 +109,7 @@ public void TakeDamage(CTakeDamageInfo damageInfo) } } - public void Teleport(Vector pos, QAngle angle, Vector velocity) + public void Teleport( Vector pos, QAngle angle, Vector velocity ) { NativePlayer.Teleport(Slot, pos, angle, velocity); } @@ -119,17 +119,17 @@ public void Respawn() Controller?.Respawn(); } - public void ExecuteCommand(string command) + public void ExecuteCommand( string command ) { NativePlayer.ExecuteCommand(Slot, command); } - public bool Equals(IPlayer? other) + public bool Equals( IPlayer? other ) { return other is not null && PlayerID == other.PlayerID; } - public override bool Equals(object? obj) + public override bool Equals( object? obj ) { return obj is IPlayer player && Equals(player); } @@ -139,10 +139,50 @@ public override int GetHashCode() return PlayerID.GetHashCode(); } - public static bool operator ==(Player? left, Player? right) + public void SendMessage( MessageType kind, string message, int htmlDuration = 5000 ) + { + NativePlayer.SendMessage(Slot, (int)kind, message, htmlDuration); + } + + public void SendNotify( string message ) + { + SendMessage(MessageType.Notify, message); + } + + public void SendConsole( string message ) + { + SendMessage(MessageType.Console, message); + } + + public void SendChat( string message ) + { + SendMessage(MessageType.Chat, message); + } + + public void SendCenter( string message ) + { + SendMessage(MessageType.Center, message); + } + + public void SendAlert( string message ) + { + SendMessage(MessageType.Alert, message); + } + + public void SendCenterHTML( string message, int duration = 5000 ) + { + SendMessage(MessageType.CenterHTML, message, duration); + } + + public void SendChatEOT( string message ) + { + SendMessage(MessageType.ChatEOT, message); + } + + public static bool operator ==( Player? left, Player? right ) { return left is not null && right is not null && left.Equals(right); } - public static bool operator !=(Player left, Player right) => !(left == right); + public static bool operator !=( Player left, Player right ) => !(left == right); } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Players/PlayerManagerService.cs b/managed/src/SwiftlyS2.Core/Modules/Players/PlayerManagerService.cs index da2b2b09a..815319bee 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Players/PlayerManagerService.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Players/PlayerManagerService.cs @@ -17,22 +17,22 @@ public void ClearAllBlockedTransmitEntities() NativePlayerManager.ClearAllBlockedTransmitEntity(); } - public IPlayer GetPlayer(int playerid) + public IPlayer GetPlayer( int playerid ) { return new Player(playerid); } - public bool IsPlayerOnline(int playerid) + public bool IsPlayerOnline( int playerid ) { return NativePlayerManager.IsPlayerOnline(playerid); } - public void SendMessage(MessageType kind, string message) + public void SendMessage( MessageType kind, string message ) { - NativePlayerManager.SendMessage((int)kind, message); + NativePlayerManager.SendMessage((int)kind, message, 5000); } - public void ShouldBlockTransmitEntity(int entityid, bool shouldBlockTransmit) + public void ShouldBlockTransmitEntity( int entityid, bool shouldBlockTransmit ) { NativePlayerManager.ShouldBlockTransmitEntity(entityid, shouldBlockTransmit); } @@ -44,7 +44,7 @@ public IEnumerable GetAllPlayers() .Select(GetPlayer); } - private static ulong SteamIDToSteamID64(string steamID) + private static ulong SteamIDToSteamID64( string steamID ) { string[] parts = steamID.Split(':'); if (parts.Length != 3) return 0; @@ -57,7 +57,7 @@ private static ulong SteamIDToSteamID64(string steamID) } - public IEnumerable FindTargettedPlayers(IPlayer player, string target, TargetSearchMode searchMode) + public IEnumerable FindTargettedPlayers( IPlayer player, string target, TargetSearchMode searchMode ) { IEnumerable allPlayers = []; @@ -163,4 +163,44 @@ public IEnumerable FindTargettedPlayers(IPlayer player, string target, return allPlayers; } + + public void SendMessage( MessageType kind, string message, int htmlDuration = 5000 ) + { + NativePlayerManager.SendMessage((int)kind, message, htmlDuration); + } + + public void SendNotify( string message ) + { + SendMessage(MessageType.Notify, message); + } + + public void SendConsole( string message ) + { + SendMessage(MessageType.Console, message); + } + + public void SendChat( string message ) + { + SendMessage(MessageType.Chat, message); + } + + public void SendCenter( string message ) + { + SendMessage(MessageType.Center, message); + } + + public void SendAlert( string message ) + { + SendMessage(MessageType.Alert, message); + } + + public void SendCenterHTML( string message, int duration = 5000 ) + { + SendMessage(MessageType.CenterHTML, message, duration); + } + + public void SendChatEOT( string message ) + { + SendMessage(MessageType.ChatEOT, message); + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Plugins/DependencyResolver.cs b/managed/src/SwiftlyS2.Core/Modules/Plugins/DependencyResolver.cs index 20a05d243..e56133b7f 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Plugins/DependencyResolver.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Plugins/DependencyResolver.cs @@ -9,12 +9,12 @@ internal class DependencyResolver private readonly Dictionary> _dependencyGraph = new(); private readonly Dictionary _pluginPaths = new(); - public DependencyResolver(ILogger logger) + public DependencyResolver( ILogger logger ) { _logger = logger; } - private void ReadDependencies(string pluginDir, ref Dictionary exportAssemblies) + private void ReadDependencies( string pluginDir, ref Dictionary exportAssemblies ) { var exportDir = Path.Combine(pluginDir, "resources", "exports"); if (Directory.Exists(exportDir)) @@ -38,13 +38,14 @@ private void ReadDependencies(string pluginDir, ref Dictionary e } catch (Exception ex) { + if (!GlobalExceptionHandler.Handle(ex)) return; _logger.LogWarning(ex, $"Failed to read assembly {exportFile}"); } } } } - private void PopulateAssemblies(string startDirectory, ref Dictionary exportAssemblies) + private void PopulateAssemblies( string startDirectory, ref Dictionary exportAssemblies ) { var pluginDirs = Directory.GetDirectories(startDirectory); foreach (var pluginDir in pluginDirs) @@ -55,7 +56,7 @@ private void PopulateAssemblies(string startDirectory, ref Dictionary visited, HashSet visiting, - List result) + List result ) { if (visiting.Contains(assembly)) { @@ -140,7 +142,7 @@ private void TopologicalSort( visited.Add(assembly); result.Add(assembly); } - private string BuildCyclePath(string start, HashSet visiting) + private string BuildCyclePath( string start, HashSet visiting ) { var path = new List { start }; var current = start; diff --git a/managed/src/SwiftlyS2.Core/Modules/Plugins/PluginContext.cs b/managed/src/SwiftlyS2.Core/Modules/Plugins/PluginContext.cs index 0afd021fc..4468e4ee0 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Plugins/PluginContext.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Plugins/PluginContext.cs @@ -1,6 +1,4 @@ using McMaster.NETCore.Plugins; -using Microsoft.Extensions.DependencyInjection; -using SwiftlyS2.Core.Plugins; using SwiftlyS2.Core.Services; using SwiftlyS2.Shared; using SwiftlyS2.Shared.Plugins; @@ -9,22 +7,23 @@ namespace SwiftlyS2.Core.Plugins; internal class PluginContext : IDisposable { - public SwiftlyCore? Core { get; set; } + public SwiftlyCore? Core { get; set; } - public PluginMetadata? Metadata { get; set; } + public PluginMetadata? Metadata { get; set; } - public string? PluginDirectory { get; set; } + public string? PluginDirectory { get; set; } - public PluginStatus? Status { get; set; } - public BasePlugin? Plugin { get; set; } + public PluginStatus? Status { get; set; } + public BasePlugin? Plugin { get; set; } - public PluginLoader? Loader { get; set; } + public PluginLoader? Loader { get; set; } - public void Dispose() - { - Plugin?.Unload(); - Loader?.Dispose(); - Core?.MenuManager?.CloseAllMenus(); - Core?.Dispose(); - } + public void Dispose() + { + Plugin?.Unload(); + Loader?.Dispose(); + // Core?.MenuManager?.CloseAllMenus(); + Core?.MenuManagerAPI?.CloseAllMenus(); + Core?.Dispose(); + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Plugins/PluginManager.cs b/managed/src/SwiftlyS2.Core/Modules/Plugins/PluginManager.cs index bc19dbb98..a2e9c3f5f 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Plugins/PluginManager.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Plugins/PluginManager.cs @@ -1,467 +1,475 @@ -using System.Reflection; -using McMaster.NETCore.Plugins; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; -using SwiftlyS2.Core.Natives; -using SwiftlyS2.Core.Modules.Plugins; -using SwiftlyS2.Core.Services; -using SwiftlyS2.Shared; -using SwiftlyS2.Shared.Plugins; - - -namespace SwiftlyS2.Core.Plugins; - -internal class PluginManager -{ - private IServiceProvider _Provider { get; init; } - private RootDirService _RootDirService { get; init; } - private ILogger _Logger { get; init; } - private List _Plugins { get; } = new(); - private FileSystemWatcher? _Watcher { get; set; } - private InterfaceManager _InterfaceManager { get; set; } = new(); - private List _SharedTypes { get; set; } = new(); - private DataDirectoryService _DataDirectoryService { get; init; } - private DateTime lastRead = DateTime.MinValue; - private readonly HashSet reloadingPlugins = new(); - - public PluginManager( - IServiceProvider provider, - ILogger logger, - RootDirService rootDirService, - DataDirectoryService dataDirectoryService - ) - { - _Provider = provider; - _RootDirService = rootDirService; - _Logger = logger; - _DataDirectoryService = dataDirectoryService; - _Watcher = new FileSystemWatcher - { - Path = rootDirService.GetPluginsRoot(), - Filter = "*.dll", - IncludeSubdirectories = true, - NotifyFilter = NotifyFilters.LastWrite, - }; - - _Watcher.Changed += HandlePluginChange; - - _Watcher.EnableRaisingEvents = true; - - Initialize(); - } - - public void Initialize() - { - AppDomain.CurrentDomain.AssemblyResolve += (sender, e) => - { - var loadingAssemblyName = new AssemblyName(e.Name).Name ?? ""; - if (loadingAssemblyName == "") - { - return null; - } - if (loadingAssemblyName == "SwiftlyS2.CS2") - { - return Assembly.GetExecutingAssembly(); - } - - var loadedAssembly = AppDomain.CurrentDomain.GetAssemblies() - .FirstOrDefault(a => loadingAssemblyName == a.GetName().Name); - - if (loadedAssembly != null) - { - return loadedAssembly; - } - return null; - }; - LoadExports(); - LoadPlugins(); - } - - public void HandlePluginChange(object sender, FileSystemEventArgs e) - { - try - { - if (!NativeServerHelpers.UseAutoHotReload()) - { - return; - } - - // Windows FileSystemWatcher triggers multiple (open, write, close) events for a single file change - if (DateTime.Now - lastRead < TimeSpan.FromSeconds(1)) - { - return; - } - - var directory = Path.GetDirectoryName(e.FullPath); - if (directory == null) - { - return; - } - - foreach (var plugin in _Plugins) - { - if (Path.GetFileName(plugin?.PluginDirectory) == Path.GetFileName(directory)) - { - var pluginId = plugin.Metadata?.Id; - if (string.IsNullOrWhiteSpace(pluginId)) - { - break; - } - - lock (reloadingPlugins) - { - if (reloadingPlugins.Contains(pluginId)) - { - return; - } - reloadingPlugins.Add(pluginId); - } - - lastRead = DateTime.Now; - - // meh, Idk why, but when using Mstsc to copy and overwrite files - // it sometimes triggers: "System.IO.IOException: The process cannot access the file because it is being used by another process." - // therefore, we use a retry mechanism - Task.Run(async () => - { - try - { - await Task.Delay(500); - - bool fileLockSuccess = false; - for (int attempt = 0; attempt < 3; attempt++) - { - try - { - using (var stream = File.Open(e.FullPath, FileMode.Open, FileAccess.Read, FileShare.None)) - { - } - fileLockSuccess = true; - break; - } - catch (IOException) when (attempt < 1) - { - _Logger.LogWarning($"{Path.GetFileName(plugin?.PluginDirectory)} is locked, retrying in 500ms... (Attempt {attempt + 1}/3)"); - await Task.Delay(500); - } - catch (IOException) - { - _Logger.LogError($"Failed to reload {Path.GetFileName(plugin?.PluginDirectory)} after 3 attempts"); - } - } - - if (fileLockSuccess) - { - ReloadPlugin(pluginId); - } - } - finally - { - lock (reloadingPlugins) - { - reloadingPlugins.Remove(pluginId); - } - } - }); - - break; - } - } - } - catch (Exception ex) - { - _Logger.LogError(ex, "Error handling plugin change"); - } - } - - private void PopulateSharedManually(string startDirectory) - { - var pluginDirs = Directory.GetDirectories(startDirectory); - - foreach (var pluginDir in pluginDirs) - { - var dirName = Path.GetFileName(pluginDir); - if (dirName.StartsWith("[") && dirName.EndsWith("]")) PopulateSharedManually(pluginDir); - else - { - if (Directory.Exists(Path.Combine(pluginDir, "resources", "exports"))) - { - var exportFiles = Directory.GetFiles(Path.Combine(pluginDir, "resources", "exports"), "*.dll"); - foreach (var exportFile in exportFiles) - { - try - { - var assembly = Assembly.LoadFrom(exportFile); - var exports = assembly.GetTypes(); - foreach (var export in exports) - { - _SharedTypes.Add(export); - } - } - catch (Exception innerEx) - { - _Logger.LogWarning(innerEx, $"Failed to load export assembly: {exportFile}"); - } - } - } - } - } - } - - private void LoadExports() - { - var resolver = new DependencyResolver(_Logger); - - try - { - resolver.AnalyzeDependencies(_RootDirService.GetPluginsRoot()); - - _Logger.LogInformation(resolver.GetDependencyGraphVisualization()); - - var loadOrder = resolver.GetLoadOrder(); - - _Logger.LogInformation($"Loading {loadOrder.Count} export assemblies in dependency order."); - - foreach (var exportFile in loadOrder) - { - try - { - var assembly = Assembly.LoadFrom(exportFile); - var exports = assembly.GetTypes(); - - _Logger.LogDebug($"Loaded {exports.Length} types from {Path.GetFileName(exportFile)}."); - - - foreach (var export in exports) - { - _SharedTypes.Add(export); - } - } - catch (Exception ex) - { - _Logger.LogWarning(ex, $"Failed to load export assembly: {exportFile}"); - } - } - - _Logger.LogInformation($"Successfully loaded {_SharedTypes.Count} shared types."); - } - catch (InvalidOperationException ex) when (ex.Message.Contains("Circular dependency")) - { - _Logger.LogError(ex, "Circular dependency detected in plugin exports. Loading exports without dependency resolution."); - PopulateSharedManually(_RootDirService.GetPluginsRoot()); - } - catch (Exception ex) - { - _Logger.LogError(ex, "Unexpected error during export loading"); - } - } - - private void LoadPluginsFromFolder(string directory) - { - var pluginDirs = Directory.GetDirectories(directory); - - foreach (var pluginDir in pluginDirs) - { - var dirName = Path.GetFileName(pluginDir); - if (dirName.StartsWith("[") && dirName.EndsWith("]")) LoadPluginsFromFolder(pluginDir); - else - { - try - { - var context = LoadPlugin(pluginDir, false); - if (context != null && context.Status == PluginStatus.Loaded) - { - _Logger.LogInformation("Loaded plugin " + context.Metadata!.Id); - } - } - catch (Exception e) - { - _Logger.LogWarning(e, "Error loading plugin: " + pluginDir); - continue; - } - } - } - } - - private void LoadPlugins() - { - LoadPluginsFromFolder(_RootDirService.GetPluginsRoot()); - - RebuildSharedServices(); - } - - public List GetPlugins() - { - return _Plugins; - } - - private void RebuildSharedServices() - { - - _InterfaceManager.Dispose(); - - _Plugins - .Where(p => p.Status == PluginStatus.Loaded) - .ToList() - .ForEach(p => p.Plugin!.ConfigureSharedInterface(_InterfaceManager)); - - - _InterfaceManager.Build(); - - _Plugins - .Where(p => p.Status == PluginStatus.Loaded) - .ToList() - .ForEach(p => p.Plugin!.UseSharedInterface(_InterfaceManager)); - } - - - public PluginContext? LoadPlugin(string dir, bool hotReload) - { - - - PluginContext context = new() - { - PluginDirectory = dir, - Status = PluginStatus.Loading, - }; - _Plugins.Add(context); - - var entrypointDll = Path.Combine(dir, Path.GetFileName(dir) + ".dll"); - - if (!File.Exists(entrypointDll)) - { - _Logger.LogWarning("Plugin entrypoint DLL not found: " + entrypointDll); - context.Status = PluginStatus.Error; - return null; - } - - var loader = PluginLoader.CreateFromAssemblyFile( - assemblyFile: entrypointDll, - sharedTypes: [typeof(BasePlugin), .. _SharedTypes], - config => - { - config.IsUnloadable = true; - config.LoadInMemory = true; - } - ); - - var assembly = loader.LoadDefaultAssembly(); - - var pluginType = assembly.GetTypes().FirstOrDefault(t => t.IsSubclassOf(typeof(BasePlugin)))!; - - if (pluginType == null) - { - _Logger.LogWarning("Plugin type not found: " + entrypointDll); - context.Status = PluginStatus.Error; - return null; - } - - var metadata = pluginType.GetCustomAttribute(); - if (metadata == null) - { - _Logger.LogWarning("Plugin metadata not found: " + entrypointDll); - context.Status = PluginStatus.Error; - return null; - } - - context.Metadata = metadata; - - _DataDirectoryService.EnsurePluginDataDirectory(metadata.Id); - - var core = new SwiftlyCore(metadata.Id, Path.GetDirectoryName(entrypointDll)!, metadata, pluginType, _Provider, _DataDirectoryService.GetPluginDataDirectory(metadata.Id)); - - core.InitializeType(pluginType); - - var plugin = (BasePlugin)Activator.CreateInstance(pluginType, [core])!; - - core.InitializeObject(plugin); - - - try - { - plugin.Load(hotReload); - } - catch (Exception e) - { - _Logger.LogWarning(e, $"Error loading plugin {entrypointDll}"); - context.Status = PluginStatus.Error; - return null; - } - ; - - context.Status = PluginStatus.Loaded; - context.Core = core; - context.Plugin = plugin; - context.Loader = loader; - - return context; - } - - public bool UnloadPlugin(string id) - { - var context = _Plugins - .Where(p => p.Status == PluginStatus.Loaded) - .FirstOrDefault(p => p.Metadata?.Id == id); - if (context == null) - { - _Logger.LogWarning("Plugin not found or not loaded: " + id); - return false; - } - - context.Dispose(); - context.Status = PluginStatus.Unloaded; - return true; - } - - public bool LoadPluginById(string id) - { - var context = _Plugins - .Where(p => p.Status == PluginStatus.Unloaded) - .FirstOrDefault(p => p.Metadata?.Id == id); - if (context == null) - { - // try to find new plugins - var root = _RootDirService.GetPluginsRoot(); - var pluginDirs = Directory.GetDirectories(root); - foreach (var pluginDir in pluginDirs) - { - if (Path.GetFileName(pluginDir) == id) - { - context = LoadPlugin(pluginDir, false); - break; - } - } - if (context == null) - { - _Logger.LogWarning("Plugin not found: " + id); - return false; - } - } - else - { - var directory = context.PluginDirectory!; - _Plugins.Remove(context); - LoadPlugin(directory, true); - } - - RebuildSharedServices(); - return true; - } - - public void ReloadPlugin(string id) - { - _Logger.LogInformation("Reloading plugin " + id); - - if (!UnloadPlugin(id)) - { - return; - } - - if (!LoadPluginById(id)) - { - RebuildSharedServices(); - } - - _Logger.LogInformation("Reloaded plugin " + id); - } +using System.Reflection; +using System.Runtime.Loader; +using McMaster.NETCore.Plugins; +using Microsoft.Extensions.Logging; +using SwiftlyS2.Core.Natives; +using SwiftlyS2.Core.Modules.Plugins; +using SwiftlyS2.Core.Services; +using SwiftlyS2.Shared; +using SwiftlyS2.Shared.Plugins; + +namespace SwiftlyS2.Core.Plugins; + +internal class PluginManager +{ + private IServiceProvider _Provider { get; init; } + private RootDirService _RootDirService { get; init; } + private ILogger _Logger { get; init; } + private List _Plugins { get; } = new(); + private FileSystemWatcher? _Watcher { get; set; } + private InterfaceManager _InterfaceManager { get; set; } = new(); + private List _SharedTypes { get; set; } = new(); + private DataDirectoryService _DataDirectoryService { get; init; } + private DateTime lastRead = DateTime.MinValue; + private readonly HashSet reloadingPlugins = new(); + + public PluginManager( + IServiceProvider provider, + ILogger logger, + RootDirService rootDirService, + DataDirectoryService dataDirectoryService + ) + { + _Provider = provider; + _RootDirService = rootDirService; + _Logger = logger; + _DataDirectoryService = dataDirectoryService; + _Watcher = new FileSystemWatcher { + Path = rootDirService.GetPluginsRoot(), + Filter = "*.dll", + IncludeSubdirectories = true, + NotifyFilter = NotifyFilters.LastWrite, + }; + + _Watcher.Changed += HandlePluginChange; + + _Watcher.EnableRaisingEvents = true; + + Initialize(); + } + + public void Initialize() + { + AppDomain.CurrentDomain.AssemblyResolve += ( sender, e ) => + { + var loadingAssemblyName = new AssemblyName(e.Name).Name ?? ""; + if (string.IsNullOrWhiteSpace(loadingAssemblyName)) + { + return null; + } + + if (loadingAssemblyName == "SwiftlyS2.CS2") + { + return Assembly.GetExecutingAssembly(); + } + + var loadedAssembly = AppDomain.CurrentDomain.GetAssemblies() + .FirstOrDefault(a => loadingAssemblyName == a.GetName().Name); + + return loadedAssembly ?? null; + }; + LoadExports(); + LoadPlugins(); + } + + public void HandlePluginChange( object sender, FileSystemEventArgs e ) + { + try + { + if (!NativeServerHelpers.UseAutoHotReload()) + { + return; + } + + // Windows FileSystemWatcher triggers multiple (open, write, close) events for a single file change + if (DateTime.Now - lastRead < TimeSpan.FromSeconds(1)) + { + return; + } + + var directory = Path.GetDirectoryName(e.FullPath); + if (directory == null) + { + return; + } + + foreach (var plugin in _Plugins) + { + if (Path.GetFileName(plugin?.PluginDirectory) == Path.GetFileName(directory)) + { + var pluginId = plugin?.Metadata?.Id; + if (string.IsNullOrWhiteSpace(pluginId)) + { + break; + } + + lock (reloadingPlugins) + { + if (reloadingPlugins.Contains(pluginId)) + { + return; + } + _ = reloadingPlugins.Add(pluginId); + } + + lastRead = DateTime.Now; + + // meh, Idk why, but when using Mstsc to copy and overwrite files + // it sometimes triggers: "System.IO.IOException: The process cannot access the file because it is being used by another process." + // therefore, we use a retry mechanism + _ = Task.Run(async () => + { + try + { + await Task.Delay(500); + + var fileLockSuccess = false; + for (var attempt = 0; attempt < 3; attempt++) + { + try + { + using (var stream = File.Open(e.FullPath, FileMode.Open, FileAccess.Read, FileShare.None)) + { + } + fileLockSuccess = true; + break; + } + catch (IOException) when (attempt < 1) + { + _Logger.LogWarning($"{Path.GetFileName(plugin?.PluginDirectory)} is locked, retrying in 500ms... (Attempt {attempt + 1}/3)"); + await Task.Delay(500); + } + catch (IOException) + { + _Logger.LogError($"Failed to reload {Path.GetFileName(plugin?.PluginDirectory)} after 3 attempts"); + } + } + + if (fileLockSuccess) + { + ReloadPlugin(pluginId); + } + } + finally + { + lock (reloadingPlugins) + { + _ = reloadingPlugins.Remove(pluginId); + } + } + }); + + break; + } + } + } + catch (Exception ex) + { + if (!GlobalExceptionHandler.Handle(ex)) return; + _Logger.LogError(ex, "Error handling plugin change"); + } + } + + private void PopulateSharedManually( string startDirectory ) + { + var pluginDirs = Directory.GetDirectories(startDirectory); + + foreach (var pluginDir in pluginDirs) + { + var dirName = Path.GetFileName(pluginDir); + if (dirName.StartsWith("[") && dirName.EndsWith("]")) PopulateSharedManually(pluginDir); + else + { + if (Directory.Exists(Path.Combine(pluginDir, "resources", "exports"))) + { + var exportFiles = Directory.GetFiles(Path.Combine(pluginDir, "resources", "exports"), "*.dll"); + foreach (var exportFile in exportFiles) + { + try + { + var assembly = Assembly.LoadFrom(exportFile); + var exports = assembly.GetTypes(); + foreach (var export in exports) + { + _SharedTypes.Add(export); + } + } + catch (Exception innerEx) + { + if (!GlobalExceptionHandler.Handle(innerEx)) return; + _Logger.LogWarning(innerEx, $"Failed to load export assembly: {exportFile}"); + } + } + } + } + } + } + + private void LoadExports() + { + var resolver = new DependencyResolver(_Logger); + + try + { + resolver.AnalyzeDependencies(_RootDirService.GetPluginsRoot()); + + _Logger.LogInformation(resolver.GetDependencyGraphVisualization()); + + var loadOrder = resolver.GetLoadOrder(); + + _Logger.LogInformation($"Loading {loadOrder.Count} export assemblies in dependency order."); + + foreach (var exportFile in loadOrder) + { + try + { + var assembly = Assembly.LoadFrom(exportFile); + var exports = assembly.GetTypes(); + + _Logger.LogDebug($"Loaded {exports.Length} types from {Path.GetFileName(exportFile)}."); + + + foreach (var export in exports) + { + _SharedTypes.Add(export); + } + } + catch (Exception ex) + { + if (!GlobalExceptionHandler.Handle(ex)) return; + _Logger.LogWarning(ex, $"Failed to load export assembly: {exportFile}"); + } + } + + _Logger.LogInformation($"Successfully loaded {_SharedTypes.Count} shared types."); + } + catch (InvalidOperationException ex) when (ex.Message.Contains("Circular dependency")) + { + _Logger.LogError(ex, "Circular dependency detected in plugin exports. Loading exports without dependency resolution."); + PopulateSharedManually(_RootDirService.GetPluginsRoot()); + } + catch (Exception ex) + { + if (!GlobalExceptionHandler.Handle(ex)) return; + _Logger.LogError(ex, "Unexpected error during export loading"); + } + } + + private void LoadPluginsFromFolder( string directory ) + { + var pluginDirs = Directory.GetDirectories(directory); + + foreach (var pluginDir in pluginDirs) + { + var dirName = Path.GetFileName(pluginDir); + if (dirName.StartsWith("[") && dirName.EndsWith("]")) LoadPluginsFromFolder(pluginDir); + else + { + try + { + var context = LoadPlugin(pluginDir, false); + if (context != null && context.Status == PluginStatus.Loaded) + { + _Logger.LogInformation("Loaded plugin " + context.Metadata!.Id); + } + } + catch (Exception e) + { + if (!GlobalExceptionHandler.Handle(e)) continue; + _Logger.LogWarning(e, "Error loading plugin: " + pluginDir); + continue; + } + } + } + } + + private void LoadPlugins() + { + LoadPluginsFromFolder(_RootDirService.GetPluginsRoot()); + + RebuildSharedServices(); + } + + public List GetPlugins() + { + return _Plugins; + } + + private void RebuildSharedServices() + { + _InterfaceManager.Dispose(); + + _Plugins + .Where(p => p.Status == PluginStatus.Loaded) + .ToList() + .ForEach(p => p.Plugin!.ConfigureSharedInterface(_InterfaceManager)); + + + _InterfaceManager.Build(); + + _Plugins + .Where(p => p.Status == PluginStatus.Loaded) + .ToList() + .ForEach(p => p.Plugin!.UseSharedInterface(_InterfaceManager)); + } + + + public PluginContext? LoadPlugin( string dir, bool hotReload ) + { + + + PluginContext context = new() { + PluginDirectory = dir, + Status = PluginStatus.Loading, + }; + _Plugins.Add(context); + + var entrypointDll = Path.Combine(dir, Path.GetFileName(dir) + ".dll"); + + if (!File.Exists(entrypointDll)) + { + _Logger.LogWarning("Plugin entrypoint DLL not found: " + entrypointDll); + context.Status = PluginStatus.Error; + return null; + } + + var loader = PluginLoader.CreateFromAssemblyFile( + assemblyFile: entrypointDll, + sharedTypes: [typeof(BasePlugin), .. _SharedTypes], + config => + { + config.IsUnloadable = true; + config.LoadInMemory = true; + var currentContext = AssemblyLoadContext.GetLoadContext(Assembly.GetExecutingAssembly()); + if (currentContext != null) + { + config.DefaultContext = currentContext; + config.PreferSharedTypes = true; + } + } + ); + + var assembly = loader.LoadDefaultAssembly(); + + var pluginType = assembly.GetTypes().FirstOrDefault(t => t.IsSubclassOf(typeof(BasePlugin)))!; + + if (pluginType == null) + { + _Logger.LogWarning("Plugin type not found: " + entrypointDll); + context.Status = PluginStatus.Error; + return null; + } + + var metadata = pluginType.GetCustomAttribute(); + if (metadata == null) + { + _Logger.LogWarning("Plugin metadata not found: " + entrypointDll); + context.Status = PluginStatus.Error; + return null; + } + + context.Metadata = metadata; + + _DataDirectoryService.EnsurePluginDataDirectory(metadata.Id); + + var core = new SwiftlyCore(metadata.Id, Path.GetDirectoryName(entrypointDll)!, metadata, pluginType, _Provider, _DataDirectoryService.GetPluginDataDirectory(metadata.Id)); + + core.InitializeType(pluginType); + + var plugin = (BasePlugin)Activator.CreateInstance(pluginType, [core])!; + + core.InitializeObject(plugin); + + + try + { + plugin.Load(hotReload); + } + catch (Exception e) + { + if (!GlobalExceptionHandler.Handle(e)) + { + context.Status = PluginStatus.Error; + return null; + } + _Logger.LogWarning(e, $"Error loading plugin {entrypointDll}"); + context.Status = PluginStatus.Error; + return null; + } + + context.Status = PluginStatus.Loaded; + context.Core = core; + context.Plugin = plugin; + context.Loader = loader; + + return context; + } + + public bool UnloadPlugin( string id ) + { + var context = _Plugins + .Where(p => p.Status == PluginStatus.Loaded) + .FirstOrDefault(p => p.Metadata?.Id == id); + if (context == null) + { + _Logger.LogWarning("Plugin not found or not loaded: " + id); + return false; + } + + context.Dispose(); + context.Status = PluginStatus.Unloaded; + return true; + } + + public bool LoadPluginById( string id ) + { + var context = _Plugins + .Where(p => p.Status == PluginStatus.Unloaded) + .FirstOrDefault(p => p.Metadata?.Id == id); + if (context == null) + { + // try to find new plugins + var root = _RootDirService.GetPluginsRoot(); + var pluginDirs = Directory.GetDirectories(root); + foreach (var pluginDir in pluginDirs) + { + if (Path.GetFileName(pluginDir) == id) + { + context = LoadPlugin(pluginDir, false); + break; + } + } + if (context == null) + { + _Logger.LogWarning("Plugin not found: " + id); + return false; + } + } + else + { + var directory = context.PluginDirectory!; + _ = _Plugins.Remove(context); + _ = LoadPlugin(directory, true); + } + + RebuildSharedServices(); + return true; + } + + public void ReloadPlugin( string id ) + { + _Logger.LogInformation("Reloading plugin " + id); + + if (!UnloadPlugin(id)) + { + return; + } + + if (!LoadPluginById(id)) + { + RebuildSharedServices(); + } + + _Logger.LogInformation("Reloaded plugin " + id); + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Plugins/SwiftlyCore.cs b/managed/src/SwiftlyS2.Core/Modules/Plugins/SwiftlyCore.cs index d7f86451c..177c6223c 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Plugins/SwiftlyCore.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Plugins/SwiftlyCore.cs @@ -39,186 +39,191 @@ using SwiftlyS2.Core.CommandLine; using SwiftlyS2.Shared.Helpers; using SwiftlyS2.Core.Natives; +using SwiftlyS2.Core.FileSystem; +using SwiftlyS2.Shared.FileSystem; namespace SwiftlyS2.Core.Services; - internal class SwiftlyCore : ISwiftlyCore, IDisposable { - - private ServiceProvider _ServiceProvider { get; init; } - - public EventSubscriber EventSubscriber { get; init; } - public GameEventService GameEventService { get; init; } - public NetMessageService NetMessageService { get; init; } - public PluginConfigurationService Configuration { get; init; } - public ILoggerFactory LoggerFactory { get; init; } - public CommandService CommandService { get; init; } - public ConsoleOutputService ConsoleOutputService { get; init; } - public EntitySystemService EntitySystemService { get; init; } - public ConVarService ConVarService { get; init; } - public GameDataService GameDataService { get; init; } - public PlayerManagerService PlayerManagerService { get; init; } - public ILogger Logger { get; init; } - public EngineService Engine { get; init; } - public TraceManager Trace { get; init; } - public ContextedProfilerService ProfilerService { get; init; } - public MemoryService MemoryService { get; init; } - public SchedulerService SchedulerService { get; init; } - public DatabaseService DatabaseService { get; init; } - public TranslationService TranslationService { get; init; } - public Localizer Localizer { get; init; } - public PermissionManager PermissionManager { get; init; } - public RegistratorService RegistratorService { get; init; } - public MenuManager MenuManager { get; init; } - public CommandLineService CommandLineService { get; init; } - public HelpersService Helpers { get; init; } - public string ContextBasePath { get; init; } - public string PluginDataDirectory { get; init; } - public SwiftlyCore(string contextId, string contextBaseDirectory, PluginMetadata? pluginManifest, Type contextType, IServiceProvider coreProvider, string pluginDataDirectory) - { - - CoreContext id = new(contextId, contextBaseDirectory, pluginManifest); - ContextBasePath = contextBaseDirectory; - PluginDataDirectory = pluginDataDirectory; - ServiceCollection services = new(); - - services - .AddSingleton(id) - .AddSingleton(this) - .AddSingleton(this) - .AddSingleton(coreProvider.GetRequiredService()) - .AddSingleton(coreProvider.GetRequiredService()) - .AddSingleton(coreProvider.GetRequiredService()) - .AddSingleton(coreProvider.GetRequiredService()) - .AddSingleton(coreProvider.GetRequiredService()) - .AddSingleton(coreProvider.GetRequiredService()) - .AddSingleton(coreProvider.GetRequiredService()) - - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton(provider => provider.GetRequiredService().GetLocalizer()) - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton(provider => provider.GetRequiredService()) - - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService().GetLocalizer()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - .AddSingleton(provider => provider.GetRequiredService()) - - .AddLogging( - builder => - { - builder.AddProvider(new SwiftlyLoggerProvider(id.Name)); - } - ); - - - _ServiceProvider = services.BuildServiceProvider(); - - EventSubscriber = _ServiceProvider.GetRequiredService(); - Configuration = _ServiceProvider.GetRequiredService(); - GameEventService = _ServiceProvider.GetRequiredService(); - LoggerFactory = _ServiceProvider.GetRequiredService(); - NetMessageService = _ServiceProvider.GetRequiredService(); - CommandService = _ServiceProvider.GetRequiredService(); - ConsoleOutputService = _ServiceProvider.GetRequiredService(); - EntitySystemService = _ServiceProvider.GetRequiredService(); - GameDataService = _ServiceProvider.GetRequiredService(); - PlayerManagerService = _ServiceProvider.GetRequiredService(); - ConVarService = _ServiceProvider.GetRequiredService(); - MemoryService = _ServiceProvider.GetRequiredService(); - Engine = _ServiceProvider.GetRequiredService(); - Trace = _ServiceProvider.GetRequiredService(); - ProfilerService = _ServiceProvider.GetRequiredService(); - SchedulerService = _ServiceProvider.GetRequiredService(); - DatabaseService = _ServiceProvider.GetRequiredService(); - TranslationService = _ServiceProvider.GetRequiredService(); - Localizer = _ServiceProvider.GetRequiredService(); - PermissionManager = _ServiceProvider.GetRequiredService(); - RegistratorService = _ServiceProvider.GetRequiredService(); - MenuManager = _ServiceProvider.GetRequiredService(); - CommandLineService = _ServiceProvider.GetRequiredService(); - Helpers = _ServiceProvider.GetRequiredService(); - Logger = LoggerFactory.CreateLogger(contextType); - } - - public void InitializeType(Type type) - { - this.Parse(type); - } - - public void InitializeObject(object instance) - { - RegistratorService.Register(instance); - } - - public void Dispose() - { - _ServiceProvider.Dispose(); - } - - IEventSubscriber ISwiftlyCore.Event => EventSubscriber; - IPluginConfigurationService ISwiftlyCore.Configuration => Configuration; - ILoggerFactory ISwiftlyCore.LoggerFactory => LoggerFactory; - IGameEventService ISwiftlyCore.GameEvent => GameEventService; - INetMessageService ISwiftlyCore.NetMessage => NetMessageService; - ICommandService ISwiftlyCore.Command => CommandService; - IConsoleOutputService ISwiftlyCore.ConsoleOutput => ConsoleOutputService; - IEntitySystemService ISwiftlyCore.EntitySystem => EntitySystemService; - IConVarService ISwiftlyCore.ConVar => ConVarService; - IGameDataService ISwiftlyCore.GameData => GameDataService; - IPlayerManagerService ISwiftlyCore.PlayerManager => PlayerManagerService; - IMemoryService ISwiftlyCore.Memory => MemoryService; - ILogger ISwiftlyCore.Logger => Logger; - IContextedProfilerService ISwiftlyCore.Profiler => ProfilerService; - IEngineService ISwiftlyCore.Engine => Engine; - ITraceManager ISwiftlyCore.Trace => Trace; - ISchedulerService ISwiftlyCore.Scheduler => SchedulerService; - IDatabaseService ISwiftlyCore.Database => DatabaseService; - ITranslationService ISwiftlyCore.Translation => TranslationService; - ILocalizer ISwiftlyCore.Localizer => Localizer; - IPermissionManager ISwiftlyCore.Permission => PermissionManager; - IRegistratorService ISwiftlyCore.Registrator => RegistratorService; - IMenuManager ISwiftlyCore.Menus => MenuManager; - string ISwiftlyCore.PluginPath => ContextBasePath; - string ISwiftlyCore.CSGODirectory => NativeEngineHelpers.GetCSGODirectoryPath(); - string ISwiftlyCore.GameDirectory => NativeEngineHelpers.GetGameDirectoryPath(); - ICommandLine ISwiftlyCore.CommandLine => CommandLineService; - IHelpers ISwiftlyCore.Helpers => Helpers; + private readonly ServiceProvider serviceProvider; + + public EventSubscriber EventSubscriber { get; init; } + public GameEventService GameEventService { get; init; } + public NetMessageService NetMessageService { get; init; } + public PluginConfigurationService Configuration { get; init; } + public ILoggerFactory LoggerFactory { get; init; } + public CommandService CommandService { get; init; } + public ConsoleOutputService ConsoleOutputService { get; init; } + public EntitySystemService EntitySystemService { get; init; } + public ConVarService ConVarService { get; init; } + public GameDataService GameDataService { get; init; } + public PlayerManagerService PlayerManagerService { get; init; } + public ILogger Logger { get; init; } + public EngineService Engine { get; init; } + public TraceManager Trace { get; init; } + public ContextedProfilerService ProfilerService { get; init; } + public MemoryService MemoryService { get; init; } + public SchedulerService SchedulerService { get; init; } + public DatabaseService DatabaseService { get; init; } + public TranslationService TranslationService { get; init; } + public Localizer Localizer { get; init; } + public PermissionManager PermissionManager { get; init; } + public RegistratorService RegistratorService { get; init; } + // [Obsolete("MenuManager will be deprecared at the release of SwiftlyS2. Please use MenuManagerAPI instead")] + // public MenuManager MenuManager { get; init; } + public MenuManagerAPI MenuManagerAPI { get; init; } + public CommandLineService CommandLineService { get; init; } + public HelpersService Helpers { get; init; } + public string ContextBasePath { get; init; } + public string PluginDataDirectory { get; init; } + public GameFileSystem GameFileSystem { get; init; } + public SwiftlyCore( string contextId, string contextBaseDirectory, PluginMetadata? pluginManifest, Type contextType, IServiceProvider coreProvider, string pluginDataDirectory ) + { + + CoreContext id = new(contextId, contextBaseDirectory, pluginManifest); + ContextBasePath = contextBaseDirectory; + PluginDataDirectory = pluginDataDirectory; + + serviceProvider = new ServiceCollection() + .AddSingleton(id) + .AddSingleton(this) + .AddSingleton(this) + .AddSingleton(coreProvider.GetRequiredService()) + .AddSingleton(coreProvider.GetRequiredService()) + .AddSingleton(coreProvider.GetRequiredService()) + .AddSingleton(coreProvider.GetRequiredService()) + .AddSingleton(coreProvider.GetRequiredService()) + .AddSingleton(coreProvider.GetRequiredService()) + .AddSingleton(coreProvider.GetRequiredService()) + + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton(provider => provider.GetRequiredService().GetLocalizer()) + .AddSingleton() + // .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton(provider => provider.GetRequiredService()) + + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService().GetLocalizer()) + .AddSingleton(provider => provider.GetRequiredService()) + // .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + .AddSingleton(provider => provider.GetRequiredService()) + + .AddLogging(builder => builder.AddProvider(new SwiftlyLoggerProvider(id.Name))) + + .BuildServiceProvider(); + + EventSubscriber = serviceProvider.GetRequiredService(); + Configuration = serviceProvider.GetRequiredService(); + GameEventService = serviceProvider.GetRequiredService(); + LoggerFactory = serviceProvider.GetRequiredService(); + NetMessageService = serviceProvider.GetRequiredService(); + CommandService = serviceProvider.GetRequiredService(); + ConsoleOutputService = serviceProvider.GetRequiredService(); + EntitySystemService = serviceProvider.GetRequiredService(); + GameDataService = serviceProvider.GetRequiredService(); + PlayerManagerService = serviceProvider.GetRequiredService(); + ConVarService = serviceProvider.GetRequiredService(); + MemoryService = serviceProvider.GetRequiredService(); + Engine = serviceProvider.GetRequiredService(); + Trace = serviceProvider.GetRequiredService(); + ProfilerService = serviceProvider.GetRequiredService(); + SchedulerService = serviceProvider.GetRequiredService(); + DatabaseService = serviceProvider.GetRequiredService(); + TranslationService = serviceProvider.GetRequiredService(); + Localizer = serviceProvider.GetRequiredService(); + PermissionManager = serviceProvider.GetRequiredService(); + RegistratorService = serviceProvider.GetRequiredService(); + // MenuManager = serviceProvider.GetRequiredService(); + MenuManagerAPI = serviceProvider.GetRequiredService(); + CommandLineService = serviceProvider.GetRequiredService(); + Helpers = serviceProvider.GetRequiredService(); + Logger = LoggerFactory.CreateLogger(contextType); + GameFileSystem = serviceProvider.GetRequiredService(); + } + + public void InitializeType( Type type ) + { + this.Parse(type); + } + + public void InitializeObject( object instance ) + { + RegistratorService.Register(instance); + } + + public void Dispose() + { + serviceProvider.Dispose(); + } + + IEventSubscriber ISwiftlyCore.Event => EventSubscriber; + IPluginConfigurationService ISwiftlyCore.Configuration => Configuration; + ILoggerFactory ISwiftlyCore.LoggerFactory => LoggerFactory; + IGameEventService ISwiftlyCore.GameEvent => GameEventService; + INetMessageService ISwiftlyCore.NetMessage => NetMessageService; + ICommandService ISwiftlyCore.Command => CommandService; + IConsoleOutputService ISwiftlyCore.ConsoleOutput => ConsoleOutputService; + IEntitySystemService ISwiftlyCore.EntitySystem => EntitySystemService; + IConVarService ISwiftlyCore.ConVar => ConVarService; + IGameDataService ISwiftlyCore.GameData => GameDataService; + IPlayerManagerService ISwiftlyCore.PlayerManager => PlayerManagerService; + IMemoryService ISwiftlyCore.Memory => MemoryService; + ILogger ISwiftlyCore.Logger => Logger; + IContextedProfilerService ISwiftlyCore.Profiler => ProfilerService; + IEngineService ISwiftlyCore.Engine => Engine; + ITraceManager ISwiftlyCore.Trace => Trace; + ISchedulerService ISwiftlyCore.Scheduler => SchedulerService; + IDatabaseService ISwiftlyCore.Database => DatabaseService; + ITranslationService ISwiftlyCore.Translation => TranslationService; + ILocalizer ISwiftlyCore.Localizer => Localizer; + IPermissionManager ISwiftlyCore.Permission => PermissionManager; + IRegistratorService ISwiftlyCore.Registrator => RegistratorService; + // [Obsolete("MenuManager will be deprecared at the release of SwiftlyS2. Please use MenuManagerAPI instead")] + // IMenuManager ISwiftlyCore.Menus => MenuManager; + IMenuManagerAPI ISwiftlyCore.MenusAPI => MenuManagerAPI; + string ISwiftlyCore.PluginPath => ContextBasePath; + string ISwiftlyCore.CSGODirectory => NativeEngineHelpers.GetCSGODirectoryPath(); + string ISwiftlyCore.GameDirectory => NativeEngineHelpers.GetGameDirectoryPath(); + ICommandLine ISwiftlyCore.CommandLine => CommandLineService; + IHelpers ISwiftlyCore.Helpers => Helpers; + IGameFileSystem ISwiftlyCore.GameFileSystem => GameFileSystem; } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Scheduler/SchedulerManager.cs b/managed/src/SwiftlyS2.Core/Modules/Scheduler/SchedulerManager.cs index 67dca6db4..096f8bf5c 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Scheduler/SchedulerManager.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Scheduler/SchedulerManager.cs @@ -8,7 +8,8 @@ namespace SwiftlyS2.Core.Scheduler; -internal class Timer { +internal class Timer +{ public required int PeriodTick { get; set; } public required int DelayTick { get; set; } public required Action Task { get; set; } @@ -17,9 +18,10 @@ internal class Timer { public CancellationToken OwnerToken { get; set; } } -internal static class SchedulerManager { +internal static class SchedulerManager +{ - private static readonly object _lock = new object(); + private static readonly Lock _lock = new(); private static long _currentTick = 0; // Min-heap keyed by DueTick @@ -28,7 +30,8 @@ internal static class SchedulerManager { // Next-tick tasks keyed by guid so services can remove them before they run private static readonly List<(Action action, CancellationToken ownerToken)> _nextTickTasks = new(); - public static void OnTick() { + public static void OnTick() + { List<(Action action, CancellationToken ownerToken)> nextTickActions; List dueTimers = new(); @@ -41,13 +44,15 @@ public static void OnTick() { _nextTickTasks.Clear(); // Pop all due timers from the heap - while (_timerQueue.Count > 0) { + while (_timerQueue.Count > 0) + { if (!_timerQueue.TryPeek(out var timer, out var due)) break; if (due > _currentTick) break; _timerQueue.Dequeue(); // Skip canceled/owner-disposed timers - if (timer.CancellationTokenSource.IsCancellationRequested || timer.OwnerToken.IsCancellationRequested) { + if (timer.CancellationTokenSource.IsCancellationRequested || timer.OwnerToken.IsCancellationRequested) + { continue; } @@ -56,52 +61,69 @@ public static void OnTick() { } // Execute next-tick actions outside the lock - if (nextTickActions.Count > 0) { - foreach (var tuple in nextTickActions) { + if (nextTickActions.Count > 0) + { + foreach (var tuple in nextTickActions) + { if (tuple.ownerToken.IsCancellationRequested) continue; - try { + try + { tuple.action(); - } catch (Exception ex) { + } + catch (Exception ex) + { + if (!GlobalExceptionHandler.Handle(ex)) return; AnsiConsole.WriteException(ex); } } } // Execute due timers outside the lock and reschedule if repeating - if (dueTimers.Count > 0) { - foreach (var timer in dueTimers) { - try { + if (dueTimers.Count > 0) + { + foreach (var timer in dueTimers) + { + try + { timer.Task(); - } catch (Exception ex) { + } + catch (Exception ex) + { + if (!GlobalExceptionHandler.Handle(ex)) return; AnsiConsole.WriteException(ex); } // If not repeating or canceled/owner disposed after callback, don't reschedule - if (timer.PeriodTick == 0) { + if (timer.PeriodTick == 0) + { timer.CancellationTokenSource.Cancel(); continue; } - if (timer.CancellationTokenSource.IsCancellationRequested || timer.OwnerToken.IsCancellationRequested) { + if (timer.CancellationTokenSource.IsCancellationRequested || timer.OwnerToken.IsCancellationRequested) + { continue; } // Reschedule timer.DueTick = Interlocked.Read(ref _currentTick) + timer.PeriodTick; - lock (_lock) { + lock (_lock) + { _timerQueue.Enqueue(timer, timer.DueTick); } } } } - public static void NextTick(Action task, CancellationToken ownerToken) { + public static void NextTick( Action task, CancellationToken ownerToken ) + { lock (_lock) { _nextTickTasks.Add((task, ownerToken)); } } - public static CancellationTokenSource AddTimer(int delayTick, int periodTick, Action task, CancellationToken ownerToken) { + public static CancellationTokenSource AddTimer( int delayTick, int periodTick, Action task, CancellationToken ownerToken ) + { var cancellationTokenSource = new CancellationTokenSource(); var timer = new Timer { DelayTick = delayTick, @@ -112,7 +134,8 @@ public static CancellationTokenSource AddTimer(int delayTick, int periodTick, Ac DueTick = Interlocked.Read(ref _currentTick) + delayTick }; - lock (_lock) { + lock (_lock) + { _timerQueue.Enqueue(timer, timer.DueTick); } diff --git a/managed/src/SwiftlyS2.Core/Modules/Scheduler/SchedulerService.cs b/managed/src/SwiftlyS2.Core/Modules/Scheduler/SchedulerService.cs index e749524a3..6ad08ffba 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Scheduler/SchedulerService.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Scheduler/SchedulerService.cs @@ -3,88 +3,108 @@ namespace SwiftlyS2.Core.Scheduler; -internal class SchedulerService : ISchedulerService, IDisposable { +internal class SchedulerService : ISchedulerService, IDisposable +{ private readonly List _timers = new(); - private readonly object _lock = new object(); + private readonly Lock _lock = new(); private readonly CancellationTokenSource _lifecycleCts = new(); private CancellationTokenSource _mapChangeCts = new(); private static int tickPerSecond = 64; - public SchedulerService(IEventSubscriber eventSubscriber) { - eventSubscriber.OnMapUnload += (@event) => { - lock (_lock) { + public SchedulerService( IEventSubscriber eventSubscriber ) + { + eventSubscriber.OnMapUnload += ( @event ) => + { + lock (_lock) + { _mapChangeCts.Cancel(); _mapChangeCts.Dispose(); _mapChangeCts = new CancellationTokenSource(); } - + CleanFinishedTimers(); }; } - public void NextTick(Action task) { + public void NextTick( Action task ) + { SchedulerManager.NextTick(task, _lifecycleCts.Token); } - public CancellationTokenSource Delay(int delayTick, Action task) { + public CancellationTokenSource Delay( int delayTick, Action task ) + { CleanFinishedTimers(); var cts = SchedulerManager.AddTimer(delayTick, 0, task, _lifecycleCts.Token); - lock (_lock) { + lock (_lock) + { _timers.Add(cts); } return cts; } - public CancellationTokenSource Repeat(int periodTick, Action task) { + public CancellationTokenSource Repeat( int periodTick, Action task ) + { var cts = SchedulerManager.AddTimer(0, periodTick, task, _lifecycleCts.Token); - lock (_lock) { + lock (_lock) + { _timers.Add(cts); } return cts; } - public CancellationTokenSource DelayAndRepeat(int delayTick, int periodTick, Action task) { + public CancellationTokenSource DelayAndRepeat( int delayTick, int periodTick, Action task ) + { var cts = SchedulerManager.AddTimer(delayTick, periodTick, task, _lifecycleCts.Token); - lock (_lock) { + lock (_lock) + { _timers.Add(cts); } return cts; } - public CancellationTokenSource DelayBySeconds(float delaySeconds, Action task) { + public CancellationTokenSource DelayBySeconds( float delaySeconds, Action task ) + { return Delay((int)(delaySeconds * tickPerSecond), task); } - public CancellationTokenSource RepeatBySeconds(float periodSeconds, Action task) { + public CancellationTokenSource RepeatBySeconds( float periodSeconds, Action task ) + { return Repeat((int)(periodSeconds * tickPerSecond), task); } - public CancellationTokenSource DelayAndRepeatBySeconds(float delaySeconds, float periodSeconds, Action task) { + public CancellationTokenSource DelayAndRepeatBySeconds( float delaySeconds, float periodSeconds, Action task ) + { return DelayAndRepeat((int)(delaySeconds * tickPerSecond), (int)(periodSeconds * tickPerSecond), task); } - public void StopOnMapChange(CancellationTokenSource cts) { + public void StopOnMapChange( CancellationTokenSource cts ) + { _mapChangeCts.Token.Register(cts.Cancel); } - private void CleanFinishedTimers() { - lock (_lock) { + private void CleanFinishedTimers() + { + lock (_lock) + { _timers.RemoveAll(timer => timer.IsCancellationRequested); } } - public void Dispose() { - lock (_lock) { + public void Dispose() + { + lock (_lock) + { if (_lifecycleCts.IsCancellationRequested) return; _lifecycleCts.Cancel(); _lifecycleCts.Dispose(); _mapChangeCts.Cancel(); _mapChangeCts.Dispose(); - foreach (var timer in _timers) { + foreach (var timer in _timers) + { timer.Cancel(); timer.Dispose(); } diff --git a/managed/src/SwiftlyS2.Core/Modules/Schemas/Extensions/CBaseEntityImpl.cs b/managed/src/SwiftlyS2.Core/Modules/Schemas/Extensions/CBaseEntityImpl.cs index 6c3cdf4e0..0be83aebd 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Schemas/Extensions/CBaseEntityImpl.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Schemas/Extensions/CBaseEntityImpl.cs @@ -6,10 +6,8 @@ namespace SwiftlyS2.Core.SchemaDefinitions; internal partial class CBaseEntityImpl : CBaseEntity { - public CEntitySubclassVDataBase VData - { - get - { + public CEntitySubclassVDataBase VData { + get { return new CEntitySubclassVDataBaseImpl(NativeSchema.GetVData(_Handle)); } } @@ -17,7 +15,7 @@ public CEntitySubclassVDataBase VData public Vector? AbsOrigin => CBodyComponent?.SceneNode?.AbsOrigin; public QAngle? AbsRotation => CBodyComponent?.SceneNode?.AbsRotation; - public void Teleport(Vector? position, QAngle? angle, Vector? velocity) + public void Teleport( Vector? position, QAngle? angle, Vector? velocity ) { unsafe { diff --git a/managed/src/SwiftlyS2.Core/Modules/Schemas/Extensions/CCSGameRules.cs b/managed/src/SwiftlyS2.Core/Modules/Schemas/Extensions/CCSGameRules.cs index 781e87039..f5b0f7539 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Schemas/Extensions/CCSGameRules.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Schemas/Extensions/CCSGameRules.cs @@ -1,4 +1,5 @@ -using SwiftlyS2.Shared.SchemaDefinitions; +using SwiftlyS2.Shared.Natives; +using SwiftlyS2.Shared.SchemaDefinitions; using SwiftlyS2.Shared.Schemas; namespace SwiftlyS2.Shared.SchemaDefinitions; @@ -10,5 +11,12 @@ public partial interface CCSGameRules /// /// Entity Class /// Player Controller - public T? FindPickerEntity(CBasePlayerController controller) where T: ISchemaClass; + public T? FindPickerEntity( CBasePlayerController controller ) where T : ISchemaClass; + + /// + /// Ends the current round with the specified reason after an optional delay + /// + /// The reason for ending the round + /// The delay before ending the round + public void TerminateRound( RoundEndReason reason, float delay ); } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Schemas/Extensions/CCSGameRulesImpl.cs b/managed/src/SwiftlyS2.Core/Modules/Schemas/Extensions/CCSGameRulesImpl.cs index 2aa63d9fa..2d568ed54 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Schemas/Extensions/CCSGameRulesImpl.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Schemas/Extensions/CCSGameRulesImpl.cs @@ -1,4 +1,5 @@ using SwiftlyS2.Core.Natives; +using SwiftlyS2.Shared.Natives; using SwiftlyS2.Shared.SchemaDefinitions; using SwiftlyS2.Shared.Schemas; @@ -6,9 +7,14 @@ namespace SwiftlyS2.Core.SchemaDefinitions; internal partial class CCSGameRulesImpl : CCSGameRules { - public T? FindPickerEntity(CBasePlayerController controller) where T : ISchemaClass + public T? FindPickerEntity( CBasePlayerController controller ) where T : ISchemaClass { CBaseEntity ent = new CBaseEntityImpl(GameFunctions.FindPickerEntity(Address, controller.Address)); return ent.As(); } + + public void TerminateRound( RoundEndReason reason, float delay ) + { + GameFunctions.TerminateRound(Address, (uint)reason, delay); + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Schemas/Extensions/CCSPlayerControllerImpl.cs b/managed/src/SwiftlyS2.Core/Modules/Schemas/Extensions/CCSPlayerControllerImpl.cs index 15f677045..fd5b5461c 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Schemas/Extensions/CCSPlayerControllerImpl.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Schemas/Extensions/CCSPlayerControllerImpl.cs @@ -6,6 +6,10 @@ internal partial class CCSPlayerControllerImpl { public void Respawn() { + var pawn = PlayerPawn; + if (pawn is { IsValid: false }) return; + + SetPawn(pawn.Value!); GameFunctions.CCSPlayerController_Respawn(Address); } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Core/Modules/Schemas/Schema.cs b/managed/src/SwiftlyS2.Core/Modules/Schemas/Schema.cs index a8ec85de9..017e3cc76 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Schemas/Schema.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Schemas/Schema.cs @@ -7,7 +7,8 @@ namespace SwiftlyS2.Core.Schemas; -internal static class Schema { +internal static class Schema +{ private static readonly HashSet dangerousFields = new() { 0x509D90A88DFCB984, // CMaterialAttributeAnimTag.m_flValue 0xCB1D2D708DFCB984, // CNmConstFloatNode__CDefinition.m_flValue @@ -46,53 +47,55 @@ internal static class Schema { private static readonly bool isFollowingServerGuidelines = NativeServerHelpers.IsFollowingServerGuidelines(); - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static int GetOffset(ulong hash) { - if (isFollowingServerGuidelines && dangerousFields.Contains(hash)) { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetOffset( ulong hash ) + { + if (isFollowingServerGuidelines && dangerousFields.Contains(hash)) + { throw new InvalidOperationException($"Cannot get or set 0x{hash:X16} while \"FollowCS2ServerGuidelines\" is enabled.\n\tTo use this operation, disable the option in core.jsonc."); } return NativeSchema.GetOffset(hash); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void Update(nint handle, ulong hash) { - if (isFollowingServerGuidelines && dangerousFields.Contains(hash)) { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Update( nint handle, ulong hash ) + { + if (isFollowingServerGuidelines && dangerousFields.Contains(hash)) + { throw new InvalidOperationException($"Cannot get or set 0x{hash:X16} while \"FollowCS2ServerGuidelines\" is enabled.\n\tTo use this operation, disable the option in core.jsonc."); } NativeSchema.SetStateChanged(handle, hash); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void SetString(nint handle, ulong hash, string value) { - if (isFollowingServerGuidelines && dangerousFields.Contains(hash)) { - throw new InvalidOperationException($"Cannot get or set 0x{hash:X16} while \"FollowCS2ServerGuidelines\" is enabled.\n\tTo use this operation, disable the option in core.jsonc."); - } - (handle + GetOffset(hash)).Write(StringPool.Allocate(value)); + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetString( nint handle, nint offset, string value ) + { + handle.Write(offset, StringPool.Allocate(value)); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void SetFixedString(nint handle, ulong hash, string value, int maxSize) { - if (isFollowingServerGuidelines && dangerousFields.Contains(hash)) { - throw new InvalidOperationException($"Cannot get or set 0x{hash:X16} while \"FollowCS2ServerGuidelines\" is enabled.\n\tTo use this operation, disable the option in core.jsonc."); - } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetFixedString( nint handle, nint offset, string value, int maxSize ) + { var pool = ArrayPool.Shared; var size = Encoding.UTF8.GetByteCount(value); - if (size + 1 > maxSize) { + if (size + 1 > maxSize) + { throw new ArgumentException("Value is too long. Max size is " + maxSize); } var bytes = pool.Rent(size + 1); Encoding.UTF8.GetBytes(value, bytes); bytes[size] = 0; Unsafe.CopyBlockUnaligned( - ref (handle + GetOffset(hash)).AsRef(), + ref handle.AsRef(offset), ref bytes[0], (uint)(size + 1) ); pool.Return(bytes); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static string GetString(nint handle) { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string GetString( nint handle ) + { return Marshal.PtrToStringUTF8(handle) ?? string.Empty; } diff --git a/managed/src/SwiftlyS2.Core/Modules/Schemas/SchemaField.cs b/managed/src/SwiftlyS2.Core/Modules/Schemas/SchemaField.cs index 96ae5522f..eb6b97384 100644 --- a/managed/src/SwiftlyS2.Core/Modules/Schemas/SchemaField.cs +++ b/managed/src/SwiftlyS2.Core/Modules/Schemas/SchemaField.cs @@ -5,7 +5,7 @@ namespace SwiftlyS2.Core.Schemas; internal abstract class SchemaField : NativeHandle, ISchemaField { - public int FieldOffset { get; set; } + public nint FieldOffset { get; set; } private ulong _hash { get; set; } = 0; diff --git a/managed/src/SwiftlyS2.Core/Modules/StringPool/StringPool.cs b/managed/src/SwiftlyS2.Core/Modules/StringPool/StringPool.cs index 2825008e6..d934d8ecd 100644 --- a/managed/src/SwiftlyS2.Core/Modules/StringPool/StringPool.cs +++ b/managed/src/SwiftlyS2.Core/Modules/StringPool/StringPool.cs @@ -3,23 +3,28 @@ namespace SwiftlyS2.Core.Natives; -internal class StringPool { +internal class StringPool +{ private static Dictionary stringToAddr = new(); - private static object _lock = new(); + private static Lock _lock = new(); - public static nint Allocate(string str) { - lock (_lock) { - if (stringToAddr.TryGetValue(str, out var addr)) { + public static nint Allocate( string str ) + { + lock (_lock) + { + if (stringToAddr.TryGetValue(str, out var addr)) + { return addr; } - var length = Encoding.UTF8.GetByteCount(str); - addr = NativeAllocator.Alloc((ulong)(length + 1)); - stringToAddr[str] = addr; - unsafe { - Span bytes = new(addr.ToPointer(), length + 1); - Encoding.UTF8.GetBytes(str, bytes); + var length = Encoding.UTF8.GetByteCount(str); + addr = NativeAllocator.Alloc((ulong)(length + 1)); + stringToAddr[str] = addr; + unsafe + { + Span bytes = new(addr.ToPointer(), length + 1); + Encoding.UTF8.GetBytes(str, bytes); bytes[length] = 0; } return addr; diff --git a/managed/src/SwiftlyS2.Core/Natives/GameFunctions.cs b/managed/src/SwiftlyS2.Core/Natives/GameFunctions.cs index 6a2a6418c..d6ef2a5d6 100644 --- a/managed/src/SwiftlyS2.Core/Natives/GameFunctions.cs +++ b/managed/src/SwiftlyS2.Core/Natives/GameFunctions.cs @@ -16,6 +16,8 @@ internal static class GameFunctions public static unsafe delegate* unmanaged< nint, nint, float, void > pSetOrAddAttribute; public static unsafe delegate* unmanaged< int, nint, nint > pGetWeaponCSDataFromKey; public static unsafe delegate* unmanaged< nint, uint, nint, byte, CUtlSymbolLarge, byte, int, nint, nint, void > pDispatchParticleEffect; + public static unsafe delegate* unmanaged< nint, uint, float, nint, byte, void > pTerminateRound; + public static unsafe delegate* unmanaged< nint, Vector*, QAngle*, Vector*, void > pTeleport; public static int TeleportOffset => NativeOffsets.Fetch("CBaseEntity::Teleport"); public static int CommitSuicideOffset => NativeOffsets.Fetch("CBasePlayerPawn::CommitSuicide"); public static int GetSkeletonInstanceOffset => NativeOffsets.Fetch("CGameSceneNode::GetSkeletonInstance"); @@ -41,10 +43,33 @@ public static void Initialize() pSetOrAddAttribute = (delegate* unmanaged< nint, IntPtr, float, void >)NativeSignatures.Fetch("CAttributeList::SetOrAddAttributeValueByName"); pGetWeaponCSDataFromKey = (delegate* unmanaged< int, nint, nint >)NativeSignatures.Fetch("GetWeaponCSDataFromKey"); pDispatchParticleEffect = (delegate* unmanaged< nint, uint, nint, byte, CUtlSymbolLarge, byte, int, nint, nint, void >)NativeSignatures.Fetch("DispatchParticleEffect"); + pTerminateRound = (delegate* unmanaged< nint, uint, float, nint, byte, void >)NativeSignatures.Fetch("CGameRules::TerminateRound"); + pTeleport = (delegate* unmanaged< nint, Vector*, QAngle*, Vector*, void >)((void**)NativeMemoryHelpers.GetVirtualTableAddress("server", "CBaseEntity"))[TeleportOffset]; } } - public unsafe static void DispatchParticleEffect( string particleName, uint attachmentType, nint entity, byte attachmentPoint, CUtlSymbolLarge attachmentName, bool resetAllParticlesOnEntity, int splitScreenSlot, CRecipientFilter filter ) + public unsafe static void* GetVirtualFunction( nint handle, int offset ) + { + var ppVTable = (void***)handle; + return *(*ppVTable + offset); + } + + public static void TerminateRound( nint gameRules, uint reason, float delay ) + { + try + { + unsafe + { + pTerminateRound(gameRules, reason, delay, 0, 0); + } + } + catch (Exception e) + { + AnsiConsole.WriteException(e); + } + } + + public static void DispatchParticleEffect( string particleName, uint attachmentType, nint entity, byte attachmentPoint, CUtlSymbolLarge attachmentName, bool resetAllParticlesOnEntity, int splitScreenSlot, CRecipientFilter filter ) { try { @@ -68,7 +93,7 @@ public unsafe static void DispatchParticleEffect( string particleName, uint atta } } - public unsafe static nint GetWeaponCSDataFromKey( int unknown, string key ) + public static nint GetWeaponCSDataFromKey( int unknown, string key ) { try { @@ -92,15 +117,14 @@ public unsafe static nint GetWeaponCSDataFromKey( int unknown, string key ) } } - public unsafe static nint FindPickerEntity( nint handle, nint controller ) + public static nint FindPickerEntity( nint handle, nint controller ) { try { unsafe { - void*** ppVTable = (void***)handle; - var pFindPickerEntity = (delegate* unmanaged< nint, nint, nint, nint >)ppVTable[0][FindPickerEntityOffset]; - return pFindPickerEntity(handle, controller, IntPtr.Zero); + var vfunc = (delegate* unmanaged< nint, nint, nint, nint >)GetVirtualFunction(handle, FindPickerEntityOffset); + return vfunc(handle, controller, IntPtr.Zero); } } catch (Exception e) @@ -110,14 +134,13 @@ public unsafe static nint FindPickerEntity( nint handle, nint controller ) return 0; } - public unsafe static nint GetSkeletonInstance( nint handle ) + public static nint GetSkeletonInstance( nint handle ) { try { unsafe { - void*** ppVTable = (void***)handle; - var pSkeletonInstance = (delegate* unmanaged< nint, nint >)ppVTable[0][GetSkeletonInstanceOffset]; + var pSkeletonInstance = (delegate* unmanaged< nint, nint >)GetVirtualFunction(handle, GetSkeletonInstanceOffset); return pSkeletonInstance(handle); } } @@ -134,8 +157,7 @@ public unsafe static void PawnCommitSuicide( nint pPawn, bool bExplode, bool bFo { unsafe { - void*** ppVTable = (void***)pPawn; - var pCommitSuicide = (delegate* unmanaged< nint, byte, byte, void >)ppVTable[0][CommitSuicideOffset]; + var pCommitSuicide = (delegate* unmanaged< nint, byte, byte, void >)GetVirtualFunction(pPawn, CommitSuicideOffset); pCommitSuicide(pPawn, (byte)(bExplode ? 1 : 0), (byte)(bForce ? 1 : 0)); } } @@ -195,8 +217,6 @@ public unsafe static void Teleport( { unsafe { - void*** ppVTable = (void***)pEntity; - var pTeleport = (delegate* unmanaged< nint, Vector*, QAngle*, Vector*, void >)ppVTable[0][TeleportOffset]; pTeleport(pEntity, vecPosition, vecAngle, vecVelocity); } } @@ -281,8 +301,7 @@ public unsafe static void CCSPlayer_ItemServices_RemoveWeapons( nint pThis ) { unsafe { - void*** ppVTable = (void***)pThis; - var pRemoveWeapons = (delegate* unmanaged< nint, void >)ppVTable[0][RemoveWeaponsOffset]; + var pRemoveWeapons = (delegate* unmanaged< nint, void >)GetVirtualFunction(pThis, RemoveWeaponsOffset); pRemoveWeapons(pThis); } } @@ -324,8 +343,7 @@ public unsafe static void CCSPlayer_ItemServices_DropActiveItem( nint pThis, Vec { unsafe { - void*** ppVTable = (void***)pThis; - var pDropActiveItem = (delegate* unmanaged< nint, Vector*, void >)ppVTable[0][DropActiveItemOffset]; + var pDropActiveItem = (delegate* unmanaged< nint, Vector*, void >)GetVirtualFunction(pThis, DropActiveItemOffset); pDropActiveItem(pThis, &momentum); } } @@ -341,8 +359,7 @@ public unsafe static void CCSPlayer_WeaponServices_DropWeapon( nint pThis, nint { unsafe { - void*** ppVTable = (void***)pThis; - var pDropWeapon = (delegate* unmanaged< nint, nint, void >)ppVTable[0][DropWeaponOffset]; + var pDropWeapon = (delegate* unmanaged< nint, nint, void >)GetVirtualFunction(pThis, DropWeaponOffset); pDropWeapon(pThis, pWeapon); } } @@ -358,8 +375,7 @@ public unsafe static void CCSPlayer_WeaponServices_SelectWeapon( nint pThis, nin { unsafe { - void*** ppVTable = (void***)pThis; - var pSelectWeapon = (delegate* unmanaged< nint, nint, void >)ppVTable[0][SelectWeaponOffset]; + var pSelectWeapon = (delegate* unmanaged< nint, nint, void >)GetVirtualFunction(pThis, SelectWeaponOffset); pSelectWeapon(pThis, pWeapon); } } @@ -380,8 +396,7 @@ public unsafe static void CEntityResourceManifest_AddResource( nint pThis, strin var pathBuffer = pool.Rent(pathLength + 1); Encoding.UTF8.GetBytes(path, pathBuffer); pathBuffer[pathLength] = 0; - void*** ppVTable = (void***)pThis; - var pAddResource = (delegate* unmanaged< nint, nint, void >)ppVTable[0][AddResourceOffset]; + var pAddResource = (delegate* unmanaged< nint, nint, void >)GetVirtualFunction(pThis, AddResourceOffset); fixed (byte* pPath = pathBuffer) { pAddResource(pThis, (IntPtr)pPath); @@ -425,8 +440,7 @@ public unsafe static void CBaseEntity_CollisionRulesChanged( nint pThis ) { unsafe { - void*** ppVTable = (void***)pThis; - var pCollisionRulesChanged = (delegate* unmanaged< nint, void >)ppVTable[0][CollisionRulesChangedOffset]; + var pCollisionRulesChanged = (delegate* unmanaged< nint, void >)GetVirtualFunction(pThis, CollisionRulesChangedOffset); pCollisionRulesChanged(pThis); } } @@ -442,8 +456,7 @@ public unsafe static void CCSPlayerController_Respawn( nint pThis ) { unsafe { - void*** ppVTable = (void***)pThis; - var pRespawn = (delegate* unmanaged< nint, void >)ppVTable[0][RespawnOffset]; + var pRespawn = (delegate* unmanaged< nint, void >)GetVirtualFunction(pThis, RespawnOffset); pRespawn(pThis); } } diff --git a/managed/src/SwiftlyS2.Core/Natives/NativeBinding.cs b/managed/src/SwiftlyS2.Core/Natives/NativeBinding.cs index e795616f6..ea8b4f6dc 100644 --- a/managed/src/SwiftlyS2.Core/Natives/NativeBinding.cs +++ b/managed/src/SwiftlyS2.Core/Natives/NativeBinding.cs @@ -4,13 +4,15 @@ using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; + internal class NativeBinding { - public static void BindNatives(IntPtr nativeTable, int nativeTableSize) + public static void BindNatives( IntPtr nativeTable, int nativeTableSize ) { unsafe { - try { + try + { var pNativeTables = (NativeFunction*)nativeTable; @@ -25,15 +27,17 @@ public static void BindNatives(IntPtr nativeTable, int nativeTableSize) var nativeNameSpace = "SwiftlyS2.Core.Natives.Native" + className; var nativeClass = Type.GetType(nativeNameSpace)!; - var nativeStaticField = nativeClass.GetField("_"+funcName, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); + var nativeStaticField = nativeClass.GetField("_" + funcName, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); nativeStaticField!.SetValue(null, pNativeTables[i].Function); var mainThreadIDStaticField = nativeClass.GetField("_MainThreadID", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); mainThreadIDStaticField!.SetValue(null, Thread.CurrentThread.ManagedThreadId); } - } catch (Exception e) + } + catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; AnsiConsole.WriteException(e); - } + } } } diff --git a/managed/src/SwiftlyS2.Core/Services/CoreCommandService.cs b/managed/src/SwiftlyS2.Core/Services/CoreCommandService.cs index 630bfa59c..febcaf0e3 100644 --- a/managed/src/SwiftlyS2.Core/Services/CoreCommandService.cs +++ b/managed/src/SwiftlyS2.Core/Services/CoreCommandService.cs @@ -20,7 +20,7 @@ internal class CoreCommandService private PluginManager _PluginManager { get; init; } private ProfileService _ProfileService { get; init; } - public CoreCommandService(ILogger logger, ISwiftlyCore core, PluginManager pluginManager, ProfileService profileService) + public CoreCommandService( ILogger logger, ISwiftlyCore core, PluginManager pluginManager, ProfileService profileService ) { _Logger = logger; _Core = core; @@ -30,7 +30,7 @@ public CoreCommandService(ILogger logger, ISwiftlyCore core, _CommandService.RegisterCommand("sw", OnCommand, true); } - private void OnCommand(ICommandContext context) + private void OnCommand( ICommandContext context ) { try { @@ -129,11 +129,12 @@ SwiftlyS2 is licensed under the GNU General Public License v3.0 or later. } catch (Exception e) { + if (!GlobalExceptionHandler.Handle(e)) return; _Logger.LogError(e, "Error executing command"); } } - private static void ShowHelp(ICommandContext context) + private static void ShowHelp( ICommandContext context ) { var table = new Table().AddColumn("Command").AddColumn("Description"); table.AddRow("credits", "List Swiftly credits"); @@ -151,7 +152,7 @@ private static void ShowHelp(ICommandContext context) AnsiConsole.Write(table); } - private void ConfilterCommand(ICommandContext context) + private void ConfilterCommand( ICommandContext context ) { var args = context.Args; if (args.Length == 1) @@ -188,7 +189,7 @@ private void ConfilterCommand(ICommandContext context) } } - private void ProfilerCommand(ICommandContext context) + private void ProfilerCommand( ICommandContext context ) { var args = context.Args; if (args.Length == 1) @@ -233,7 +234,7 @@ private void ProfilerCommand(ICommandContext context) } } - private void PluginCommand(ICommandContext context) + private void PluginCommand( ICommandContext context ) { var args = context.Args; if (args.Length == 1) @@ -250,10 +251,10 @@ private void PluginCommand(ICommandContext context) switch (args[1]) { case "list": - var table = new Table().AddColumn("Name").AddColumn("Status"); + var table = new Table().AddColumn("Name").AddColumn("Status").AddColumn("Version").AddColumn("Author").AddColumn("Website"); foreach (var plugin in _PluginManager.GetPlugins()) { - table.AddRow(plugin.Metadata?.Id ?? "", plugin.Status?.ToString() ?? "Unknown"); + table.AddRow(plugin.Metadata?.Id ?? "", plugin.Status?.ToString() ?? "Unknown", plugin.Metadata?.Version ?? "", plugin.Metadata?.Author ?? "", plugin.Metadata?.Website ?? ""); } AnsiConsole.Write(table); break; diff --git a/managed/src/SwiftlyS2.Core/Services/ProfileService.cs b/managed/src/SwiftlyS2.Core/Services/ProfileService.cs index f07c35309..ba188640d 100644 --- a/managed/src/SwiftlyS2.Core/Services/ProfileService.cs +++ b/managed/src/SwiftlyS2.Core/Services/ProfileService.cs @@ -6,27 +6,30 @@ namespace SwiftlyS2.Core.Services; -internal class ProfileService { +internal class ProfileService +{ - private readonly object _lock = new(); + private readonly Lock _lock = new(); private bool _enabled = false; private readonly Dictionary> _statsTable = new(); private readonly Dictionary> _activeStartsUs = new(); - + // High-precision timestamping via Stopwatch, mapped to epoch micros private readonly long _swBaseTicks; private readonly ulong _epochBaseMicros; private readonly double _ticksToMicro; - - private sealed class Stat { + + private sealed class Stat + { public ulong Count; public ulong TotalUs; public ulong MinUs = ulong.MaxValue; public ulong MaxUs = 0UL; } - public ProfileService() { + public ProfileService() + { _swBaseTicks = Stopwatch.GetTimestamp(); // Capture epoch micros at approximately the same moment as base ticks var epochTicks = DateTimeOffset.UtcNow.Ticks - DateTimeOffset.UnixEpoch.Ticks; // 100ns ticks @@ -34,60 +37,72 @@ public ProfileService() { _ticksToMicro = 1_000_000.0 / Stopwatch.Frequency; } - private ulong NowMicrosecondsSinceUnixEpoch() { + private ulong NowMicrosecondsSinceUnixEpoch() + { var deltaTicks = Stopwatch.GetTimestamp() - _swBaseTicks; var micros = (ulong)(deltaTicks * _ticksToMicro); return _epochBaseMicros + micros; } - public void Enable() { - lock (_lock) { + public void Enable() + { + lock (_lock) + { _statsTable.Clear(); _activeStartsUs.Clear(); _enabled = true; } } - public void Disable() { - lock (_lock) { + public void Disable() + { + lock (_lock) + { _enabled = false; _statsTable.Clear(); _activeStartsUs.Clear(); } } - public bool IsEnabled() { - lock (_lock) { + public bool IsEnabled() + { + lock (_lock) + { return _enabled; } } - public void StartRecordingWithIdentifier(string identifier, string name) + public void StartRecordingWithIdentifier( string identifier, string name ) { if (!_enabled) return; - lock (_lock) { - if (!_activeStartsUs.TryGetValue(identifier, out var startMap)) { + lock (_lock) + { + if (!_activeStartsUs.TryGetValue(identifier, out var startMap)) + { startMap = new Dictionary(StringComparer.Ordinal); _activeStartsUs[identifier] = startMap; } startMap[name] = NowMicrosecondsSinceUnixEpoch(); } } - public void StopRecordingWithIdentifier(string identifier, string name) + public void StopRecordingWithIdentifier( string identifier, string name ) { if (!_enabled) return; - lock (_lock) { + lock (_lock) + { if (!_activeStartsUs.TryGetValue(identifier, out var startMap)) return; if (!startMap.TryGetValue(name, out var startUs)) return; var endUs = NowMicrosecondsSinceUnixEpoch(); var durUs = endUs > startUs ? endUs - startUs : 0UL; startMap.Remove(name); - if (!_statsTable.TryGetValue(identifier, out var nameToStat)) { + if (!_statsTable.TryGetValue(identifier, out var nameToStat)) + { nameToStat = new Dictionary(StringComparer.Ordinal); _statsTable[identifier] = nameToStat; } - if (!nameToStat.TryGetValue(name, out var stat)) { + if (!nameToStat.TryGetValue(name, out var stat)) + { stat = new Stat(); nameToStat[name] = stat; } @@ -98,17 +113,21 @@ public void StopRecordingWithIdentifier(string identifier, string name) if (durUs > stat.MaxUs) stat.MaxUs = durUs; } } - public void RecordTimeWithIdentifier(string identifier, string name, double duration) { - lock (_lock) { + public void RecordTimeWithIdentifier( string identifier, string name, double duration ) + { + lock (_lock) + { if (!_enabled) return; var durUs = duration <= 0 ? 0UL : (ulong)duration; - if (!_statsTable.TryGetValue(identifier, out var nameToStat)) { + if (!_statsTable.TryGetValue(identifier, out var nameToStat)) + { nameToStat = new Dictionary(StringComparer.Ordinal); _statsTable[identifier] = nameToStat; } - if (!nameToStat.TryGetValue(name, out var stat)) { + if (!nameToStat.TryGetValue(name, out var stat)) + { stat = new Stat(); nameToStat[name] = stat; } @@ -120,22 +139,27 @@ public void RecordTimeWithIdentifier(string identifier, string name, double dura } } - public void StartRecording(string name) { + public void StartRecording( string name ) + { StartRecordingWithIdentifier("SwiftlyS2", name); } - public void StopRecording(string name) { + public void StopRecording( string name ) + { StopRecordingWithIdentifier("SwiftlyS2", name); } - public void RecordTime(string name, double duration) { + public void RecordTime( string name, double duration ) + { RecordTimeWithIdentifier("SwiftlyS2", name, duration); } - public string GenerateJSONPerformance(string pluginId) { + public string GenerateJSONPerformance( string pluginId ) + { // snapshot stats Dictionary> stats; - lock (_lock) { + lock (_lock) + { stats = _statsTable.ToDictionary( kv => kv.Key, kv => kv.Value.ToDictionary(inner => inner.Key, inner => new Stat { @@ -177,9 +201,11 @@ public string GenerateJSONPerformance(string pluginId) { { "ts", 0UL }, }); - string FormatUs(float us) { + string FormatUs( float us ) + { // switch to ms when duration reaches 0.01 ms (10 microseconds) - if (us >= 10f) { + if (us >= 10f) + { var ms = us / 1000f; return $"{ms:F2}ms"; } @@ -187,11 +213,14 @@ string FormatUs(float us) { return $"{ius:d}.00μs"; } - foreach (var (plugin, nameMap) in stats) { - if (!string.IsNullOrEmpty(pluginId) && !string.Equals(pluginId, plugin, StringComparison.Ordinal)) { + foreach (var (plugin, nameMap) in stats) + { + if (!string.IsNullOrEmpty(pluginId) && !string.Equals(pluginId, plugin, StringComparison.Ordinal)) + { continue; } - foreach (var (name, stat) in nameMap) { + foreach (var (name, stat) in nameMap) + { var count = stat.Count; float minUs = count == 0 ? 0f : stat.MinUs; float maxUs = stat.MaxUs; diff --git a/managed/src/SwiftlyS2.Core/Services/StartupService.cs b/managed/src/SwiftlyS2.Core/Services/StartupService.cs index c80aae6a3..fa86dc966 100644 --- a/managed/src/SwiftlyS2.Core/Services/StartupService.cs +++ b/managed/src/SwiftlyS2.Core/Services/StartupService.cs @@ -17,7 +17,7 @@ public StartupService(IServiceProvider provider) provider.UsePermissionManager(); provider.UsePluginManager(); provider.UseCommandTrackerService(); - provider.UseTestService(); + // provider.UseTestService(); } public Task StartAsync(CancellationToken cancellationToken) diff --git a/managed/src/SwiftlyS2.Core/Services/TestService.cs b/managed/src/SwiftlyS2.Core/Services/TestService.cs index bb3fc2dcb..e4e8d4cf7 100644 --- a/managed/src/SwiftlyS2.Core/Services/TestService.cs +++ b/managed/src/SwiftlyS2.Core/Services/TestService.cs @@ -37,17 +37,31 @@ ISwiftlyCore core _Core = core; _Logger = logger; + _Logger.LogWarning("TestService created"); + _Logger.LogWarning("TestService created"); + _Logger.LogWarning("TestService created"); + _Logger.LogWarning("TestService created"); + _Logger.LogWarning("TestService created"); + _Logger.LogWarning("TestService created"); + _Logger.LogWarning("TestService created"); + _Logger.LogWarning("TestService created"); + _Logger.LogWarning("TestService created"); + Test(); } public void Test() { - _Core.Command.RegisterCommand("rrr", (context) => { - _Core.Engine.ExecuteCommandWithBuffer("echo 1", (buffer) => { - Console.WriteLine(buffer); - }); - }); + _Core.Event.OnEntityCreated += (@event) => + { + var name = _Core.Memory.GetObjectPtrVtableName(@event.Entity.Address); + Console.WriteLine("Entity spawned: " + name); + var hasVtable = _Core.Memory.ObjectPtrHasVtable(@event.Entity.Address + 1); + Console.WriteLine("Has vtable: " + hasVtable); + var vtable = _Core.Memory.ObjectPtrHasBaseClass(@event.Entity.Address, "CBaseEntity"); + Console.WriteLine("Has base class: " + vtable); + }; // _Core.Event.OnItemServicesCanAcquireHook += (@event) => { // Console.WriteLine(@event.EconItemView.ItemDefinitionIndex); diff --git a/managed/src/SwiftlyS2.Generated/Natives/Allocator.cs b/managed/src/SwiftlyS2.Generated/Natives/Allocator.cs index 945494fc4..edd404955 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/Allocator.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/Allocator.cs @@ -1,106 +1,105 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeAllocator { - private static int _MainThreadID; - - private unsafe static delegate* unmanaged _Alloc; - - public unsafe static nint Alloc(ulong size) { - var ret = _Alloc(size); - return ret; - } - - private unsafe static delegate* unmanaged _TrackedAlloc; - - public unsafe static nint TrackedAlloc(ulong size, string identifier, string details) { - var pool = ArrayPool.Shared; - var identifierLength = Encoding.UTF8.GetByteCount(identifier); - var identifierBuffer = pool.Rent(identifierLength + 1); - Encoding.UTF8.GetBytes(identifier, identifierBuffer); - identifierBuffer[identifierLength] = 0; - var detailsLength = Encoding.UTF8.GetByteCount(details); - var detailsBuffer = pool.Rent(detailsLength + 1); - Encoding.UTF8.GetBytes(details, detailsBuffer); - detailsBuffer[detailsLength] = 0; - fixed (byte* identifierBufferPtr = identifierBuffer) { - fixed (byte* detailsBufferPtr = detailsBuffer) { - var ret = _TrackedAlloc(size, identifierBufferPtr, detailsBufferPtr); - pool.Return(identifierBuffer); - pool.Return(detailsBuffer); +internal static class NativeAllocator +{ + private static int _MainThreadID; + + private unsafe static delegate* unmanaged _Alloc; + + public unsafe static nint Alloc(ulong size) + { + var ret = _Alloc(size); + return ret; + } + + private unsafe static delegate* unmanaged _TrackedAlloc; + + public unsafe static nint TrackedAlloc(ulong size, string identifier, string details) + { + byte[] identifierBuffer = Encoding.UTF8.GetBytes(identifier + "\0"); + byte[] detailsBuffer = Encoding.UTF8.GetBytes(details + "\0"); + fixed (byte* identifierBufferPtr = identifierBuffer) + { + fixed (byte* detailsBufferPtr = detailsBuffer) + { + var ret = _TrackedAlloc(size, identifierBufferPtr, detailsBufferPtr); + return ret; + } + } + } + + private unsafe static delegate* unmanaged _Free; + + public unsafe static void Free(nint pointer) + { + _Free(pointer); + } + + private unsafe static delegate* unmanaged _Resize; + + public unsafe static nint Resize(nint pointer, ulong new_size) + { + var ret = _Resize(pointer, new_size); + return ret; + } + + private unsafe static delegate* unmanaged _GetSize; + + /// + /// works only for pointers allocated through Memory.Allocator + /// + public unsafe static ulong GetSize(nint pointer) + { + var ret = _GetSize(pointer); + return ret; + } + + private unsafe static delegate* unmanaged _GetTotalAllocated; + + public unsafe static ulong GetTotalAllocated() + { + var ret = _GetTotalAllocated(); return ret; - } } - } - - private unsafe static delegate* unmanaged _Free; - - public unsafe static void Free(nint pointer) { - _Free(pointer); - } - - private unsafe static delegate* unmanaged _Resize; - - public unsafe static nint Resize(nint pointer, ulong new_size) { - var ret = _Resize(pointer, new_size); - return ret; - } - - private unsafe static delegate* unmanaged _GetSize; - - /// - /// works only for pointers allocated through Memory.Allocator - /// - public unsafe static ulong GetSize(nint pointer) { - var ret = _GetSize(pointer); - return ret; - } - - private unsafe static delegate* unmanaged _GetTotalAllocated; - - public unsafe static ulong GetTotalAllocated() { - var ret = _GetTotalAllocated(); - return ret; - } - - private unsafe static delegate* unmanaged _GetAllocatedByTrackedIdentifier; - - public unsafe static ulong GetAllocatedByTrackedIdentifier(string identifier) { - var pool = ArrayPool.Shared; - var identifierLength = Encoding.UTF8.GetByteCount(identifier); - var identifierBuffer = pool.Rent(identifierLength + 1); - Encoding.UTF8.GetBytes(identifier, identifierBuffer); - identifierBuffer[identifierLength] = 0; - fixed (byte* identifierBufferPtr = identifierBuffer) { - var ret = _GetAllocatedByTrackedIdentifier(identifierBufferPtr); - pool.Return(identifierBuffer); - return ret; + + private unsafe static delegate* unmanaged _GetAllocatedByTrackedIdentifier; + + public unsafe static ulong GetAllocatedByTrackedIdentifier(string identifier) + { + byte[] identifierBuffer = Encoding.UTF8.GetBytes(identifier + "\0"); + fixed (byte* identifierBufferPtr = identifierBuffer) + { + var ret = _GetAllocatedByTrackedIdentifier(identifierBufferPtr); + return ret; + } } - } - private unsafe static delegate* unmanaged _IsPointerValid; + private unsafe static delegate* unmanaged _IsPointerValid; - public unsafe static bool IsPointerValid(nint pointer) { - var ret = _IsPointerValid(pointer); - return ret == 1; - } + public unsafe static bool IsPointerValid(nint pointer) + { + var ret = _IsPointerValid(pointer); + return ret == 1; + } - private unsafe static delegate* unmanaged _Copy; + private unsafe static delegate* unmanaged _Copy; - public unsafe static void Copy(nint dst, nint src, ulong size) { - _Copy(dst, src, size); - } + public unsafe static void Copy(nint dst, nint src, ulong size) + { + _Copy(dst, src, size); + } - private unsafe static delegate* unmanaged _Move; + private unsafe static delegate* unmanaged _Move; - public unsafe static void Move(nint dst, nint src, ulong size) { - _Move(dst, src, size); - } + public unsafe static void Move(nint dst, nint src, ulong size) + { + _Move(dst, src, size); + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/Benchmark.cs b/managed/src/SwiftlyS2.Generated/Natives/Benchmark.cs new file mode 100644 index 000000000..0aba93ee6 --- /dev/null +++ b/managed/src/SwiftlyS2.Generated/Natives/Benchmark.cs @@ -0,0 +1,237 @@ +#pragma warning disable CS0649 +#pragma warning disable CS0169 + +using System.Text; +using System.Threading; +using SwiftlyS2.Shared.Natives; + +namespace SwiftlyS2.Core.Natives; + +public static class NativeBenchmark +{ + private static int _MainThreadID; + + private unsafe static delegate* unmanaged _VoidToVoid; + + public unsafe static void VoidToVoid() + { + _VoidToVoid(); + } + + private unsafe static delegate* unmanaged _GetBool; + + public unsafe static bool GetBool() + { + var ret = _GetBool(); + return ret == 1; + } + + private unsafe static delegate* unmanaged _GetInt32; + + public unsafe static int GetInt32() + { + var ret = _GetInt32(); + return ret; + } + + private unsafe static delegate* unmanaged _GetUInt32; + + public unsafe static uint GetUInt32() + { + var ret = _GetUInt32(); + return ret; + } + + private unsafe static delegate* unmanaged _GetInt64; + + public unsafe static long GetInt64() + { + var ret = _GetInt64(); + return ret; + } + + private unsafe static delegate* unmanaged _GetUInt64; + + public unsafe static ulong GetUInt64() + { + var ret = _GetUInt64(); + return ret; + } + + private unsafe static delegate* unmanaged _GetFloat; + + public unsafe static float GetFloat() + { + var ret = _GetFloat(); + return ret; + } + + private unsafe static delegate* unmanaged _GetDouble; + + public unsafe static double GetDouble() + { + var ret = _GetDouble(); + return ret; + } + + private unsafe static delegate* unmanaged _GetPtr; + + public unsafe static nint GetPtr() + { + var ret = _GetPtr(); + return ret; + } + + private unsafe static delegate* unmanaged _BoolToBool; + + public unsafe static bool BoolToBool(bool value) + { + var ret = _BoolToBool(value ? (byte)1 : (byte)0); + return ret == 1; + } + + private unsafe static delegate* unmanaged _Int32ToInt32; + + public unsafe static int Int32ToInt32(int value) + { + var ret = _Int32ToInt32(value); + return ret; + } + + private unsafe static delegate* unmanaged _UInt32ToUInt32; + + public unsafe static uint UInt32ToUInt32(uint value) + { + var ret = _UInt32ToUInt32(value); + return ret; + } + + private unsafe static delegate* unmanaged _Int64ToInt64; + + public unsafe static long Int64ToInt64(long value) + { + var ret = _Int64ToInt64(value); + return ret; + } + + private unsafe static delegate* unmanaged _UInt64ToUInt64; + + public unsafe static ulong UInt64ToUInt64(ulong value) + { + var ret = _UInt64ToUInt64(value); + return ret; + } + + private unsafe static delegate* unmanaged _FloatToFloat; + + public unsafe static float FloatToFloat(float value) + { + var ret = _FloatToFloat(value); + return ret; + } + + private unsafe static delegate* unmanaged _DoubleToDouble; + + public unsafe static double DoubleToDouble(double value) + { + var ret = _DoubleToDouble(value); + return ret; + } + + private unsafe static delegate* unmanaged _PtrToPtr; + + public unsafe static nint PtrToPtr(nint value) + { + var ret = _PtrToPtr(value); + return ret; + } + + private unsafe static delegate* unmanaged _StringToString; + + public unsafe static string StringToString(string value) + { + byte[] valueBuffer = Encoding.UTF8.GetBytes(value + "\0"); + fixed (byte* valueBufferPtr = valueBuffer) + { + var ret = _StringToString(null, valueBufferPtr); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _StringToString(retBufferPtr, valueBufferPtr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } + } + } + + private unsafe static delegate* unmanaged _StringToPtr; + + public unsafe static nint StringToPtr(string value) + { + byte[] valueBuffer = Encoding.UTF8.GetBytes(value + "\0"); + fixed (byte* valueBufferPtr = valueBuffer) + { + var ret = _StringToPtr(valueBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _MultiPrimitives; + + public unsafe static int MultiPrimitives(nint p1, int i1, float f1, bool b1, ulong u1) + { + var ret = _MultiPrimitives(p1, i1, f1, b1 ? (byte)1 : (byte)0, u1); + return ret; + } + + private unsafe static delegate* unmanaged _MultiWithOneString; + + public unsafe static int MultiWithOneString(nint p1, string s1, nint p2, int i1, float f1) + { + byte[] s1Buffer = Encoding.UTF8.GetBytes(s1 + "\0"); + fixed (byte* s1BufferPtr = s1Buffer) + { + var ret = _MultiWithOneString(p1, s1BufferPtr, p2, i1, f1); + return ret; + } + } + + private unsafe static delegate* unmanaged _MultiWithTwoStrings; + + public unsafe static void MultiWithTwoStrings(nint p1, string s1, nint p2, string s2, int i1) + { + byte[] s1Buffer = Encoding.UTF8.GetBytes(s1 + "\0"); + byte[] s2Buffer = Encoding.UTF8.GetBytes(s2 + "\0"); + fixed (byte* s1BufferPtr = s1Buffer) + { + fixed (byte* s2BufferPtr = s2Buffer) + { + _MultiWithTwoStrings(p1, s1BufferPtr, p2, s2BufferPtr, i1); + } + } + } + + private unsafe static delegate* unmanaged _VectorToVector; + + public unsafe static void VectorToVector(nint result, Vector value) + { + _VectorToVector(result, value); + } + + private unsafe static delegate* unmanaged _QAngleToQAngle; + + public unsafe static void QAngleToQAngle(nint result, QAngle value) + { + _QAngleToQAngle(result, value); + } + + private unsafe static delegate* unmanaged _ComplexWithString; + + public unsafe static void ComplexWithString(nint entity, Vector pos, string name, QAngle angle) + { + byte[] nameBuffer = Encoding.UTF8.GetBytes(name + "\0"); + fixed (byte* nameBufferPtr = nameBuffer) + { + _ComplexWithString(entity, pos, nameBufferPtr, angle); + } + } +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/CEntityKeyValues.cs b/managed/src/SwiftlyS2.Generated/Natives/CEntityKeyValues.cs index 0370bae5f..e8dee0f70 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/CEntityKeyValues.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/CEntityKeyValues.cs @@ -1,474 +1,382 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeCEntityKeyValues { - private static int _MainThreadID; - - private unsafe static delegate* unmanaged _Allocate; - - public unsafe static nint Allocate() { - var ret = _Allocate(); - return ret; - } - - private unsafe static delegate* unmanaged _Deallocate; - - public unsafe static void Deallocate(nint keyvalues) { - _Deallocate(keyvalues); - } - - private unsafe static delegate* unmanaged _GetBool; - - public unsafe static bool GetBool(nint keyvalues, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetBool(keyvalues, keyBufferPtr); - pool.Return(keyBuffer); - return ret == 1; - } - } - - private unsafe static delegate* unmanaged _GetInt; - - public unsafe static int GetInt(nint keyvalues, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetInt(keyvalues, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetUint; - - public unsafe static uint GetUint(nint keyvalues, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetUint(keyvalues, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetInt64; - - public unsafe static long GetInt64(nint keyvalues, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetInt64(keyvalues, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetUint64; - - public unsafe static ulong GetUint64(nint keyvalues, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetUint64(keyvalues, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetFloat; - - public unsafe static float GetFloat(nint keyvalues, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetFloat(keyvalues, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetDouble; - - public unsafe static double GetDouble(nint keyvalues, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetDouble(keyvalues, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetString; - - public unsafe static string GetString(nint keyvalues, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetString(null, keyvalues, keyBufferPtr); - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetString(retBufferPtr, keyvalues, keyBufferPtr); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - pool.Return(keyBuffer); - return retString; - } - } - } - - private unsafe static delegate* unmanaged _GetPtr; - - public unsafe static nint GetPtr(nint keyvalues, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetPtr(keyvalues, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetStringToken; - - public unsafe static CUtlStringToken GetStringToken(nint keyvalues, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetStringToken(keyvalues, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetColor; - - public unsafe static Color GetColor(nint keyvalues, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetColor(keyvalues, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetVector; - - public unsafe static Vector GetVector(nint keyvalues, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetVector(keyvalues, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetVector2D; - - public unsafe static Vector2D GetVector2D(nint keyvalues, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetVector2D(keyvalues, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetVector4D; - - public unsafe static Vector4D GetVector4D(nint keyvalues, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetVector4D(keyvalues, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetQAngle; - - public unsafe static QAngle GetQAngle(nint keyvalues, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetQAngle(keyvalues, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _SetBool; - - public unsafe static void SetBool(nint keyvalues, string key, bool value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetBool(keyvalues, keyBufferPtr, value ? (byte)1 : (byte)0); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetInt; - - public unsafe static void SetInt(nint keyvalues, string key, int value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetInt(keyvalues, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetUint; - - public unsafe static void SetUint(nint keyvalues, string key, uint value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetUint(keyvalues, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetInt64; - - public unsafe static void SetInt64(nint keyvalues, string key, long value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetInt64(keyvalues, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetUint64; - - public unsafe static void SetUint64(nint keyvalues, string key, ulong value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetUint64(keyvalues, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetFloat; - - public unsafe static void SetFloat(nint keyvalues, string key, float value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetFloat(keyvalues, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetDouble; - - public unsafe static void SetDouble(nint keyvalues, string key, double value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetDouble(keyvalues, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetString; - - public unsafe static void SetString(nint keyvalues, string key, string value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - var valueLength = Encoding.UTF8.GetByteCount(value); - var valueBuffer = pool.Rent(valueLength + 1); - Encoding.UTF8.GetBytes(value, valueBuffer); - valueBuffer[valueLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - fixed (byte* valueBufferPtr = valueBuffer) { - _SetString(keyvalues, keyBufferPtr, valueBufferPtr); - pool.Return(keyBuffer); - pool.Return(valueBuffer); - } - } - } - - private unsafe static delegate* unmanaged _SetPtr; - - public unsafe static void SetPtr(nint keyvalues, string key, nint value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetPtr(keyvalues, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetStringToken; - - public unsafe static void SetStringToken(nint keyvalues, string key, CUtlStringToken value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetStringToken(keyvalues, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetColor; - - public unsafe static void SetColor(nint keyvalues, string key, Color value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetColor(keyvalues, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetVector; - - public unsafe static void SetVector(nint keyvalues, string key, Vector value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetVector(keyvalues, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetVector2D; - - public unsafe static void SetVector2D(nint keyvalues, string key, Vector2D value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetVector2D(keyvalues, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetVector4D; - - public unsafe static void SetVector4D(nint keyvalues, string key, Vector4D value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetVector4D(keyvalues, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetQAngle; - - public unsafe static void SetQAngle(nint keyvalues, string key, QAngle value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetQAngle(keyvalues, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } +internal static class NativeCEntityKeyValues +{ + private static int _MainThreadID; + + private unsafe static delegate* unmanaged _Allocate; + + public unsafe static nint Allocate() + { + var ret = _Allocate(); + return ret; + } + + private unsafe static delegate* unmanaged _Deallocate; + + public unsafe static void Deallocate(nint keyvalues) + { + _Deallocate(keyvalues); + } + + private unsafe static delegate* unmanaged _GetBool; + + public unsafe static bool GetBool(nint keyvalues, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetBool(keyvalues, keyBufferPtr); + return ret == 1; + } + } + + private unsafe static delegate* unmanaged _GetInt; + + public unsafe static int GetInt(nint keyvalues, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetInt(keyvalues, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetUint; + + public unsafe static uint GetUint(nint keyvalues, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetUint(keyvalues, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetInt64; + + public unsafe static long GetInt64(nint keyvalues, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetInt64(keyvalues, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetUint64; + + public unsafe static ulong GetUint64(nint keyvalues, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetUint64(keyvalues, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetFloat; + + public unsafe static float GetFloat(nint keyvalues, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetFloat(keyvalues, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetDouble; + + public unsafe static double GetDouble(nint keyvalues, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetDouble(keyvalues, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetString; + + public unsafe static string GetString(nint keyvalues, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetString(null, keyvalues, keyBufferPtr); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetString(retBufferPtr, keyvalues, keyBufferPtr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } + } + } + + private unsafe static delegate* unmanaged _GetPtr; + + public unsafe static nint GetPtr(nint keyvalues, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetPtr(keyvalues, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetStringToken; + + public unsafe static CUtlStringToken GetStringToken(nint keyvalues, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetStringToken(keyvalues, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetColor; + + public unsafe static Color GetColor(nint keyvalues, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetColor(keyvalues, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetVector; + + public unsafe static Vector GetVector(nint keyvalues, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetVector(keyvalues, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetVector2D; + + public unsafe static Vector2D GetVector2D(nint keyvalues, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetVector2D(keyvalues, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetVector4D; + + public unsafe static Vector4D GetVector4D(nint keyvalues, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetVector4D(keyvalues, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetQAngle; + + public unsafe static QAngle GetQAngle(nint keyvalues, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetQAngle(keyvalues, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _SetBool; + + public unsafe static void SetBool(nint keyvalues, string key, bool value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetBool(keyvalues, keyBufferPtr, value ? (byte)1 : (byte)0); + } + } + + private unsafe static delegate* unmanaged _SetInt; + + public unsafe static void SetInt(nint keyvalues, string key, int value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetInt(keyvalues, keyBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetUint; + + public unsafe static void SetUint(nint keyvalues, string key, uint value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetUint(keyvalues, keyBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetInt64; + + public unsafe static void SetInt64(nint keyvalues, string key, long value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetInt64(keyvalues, keyBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetUint64; + + public unsafe static void SetUint64(nint keyvalues, string key, ulong value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetUint64(keyvalues, keyBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetFloat; + + public unsafe static void SetFloat(nint keyvalues, string key, float value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetFloat(keyvalues, keyBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetDouble; + + public unsafe static void SetDouble(nint keyvalues, string key, double value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetDouble(keyvalues, keyBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetString; + + public unsafe static void SetString(nint keyvalues, string key, string value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + byte[] valueBuffer = Encoding.UTF8.GetBytes(value + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + fixed (byte* valueBufferPtr = valueBuffer) + { + _SetString(keyvalues, keyBufferPtr, valueBufferPtr); + } + } + } + + private unsafe static delegate* unmanaged _SetPtr; + + public unsafe static void SetPtr(nint keyvalues, string key, nint value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetPtr(keyvalues, keyBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetStringToken; + + public unsafe static void SetStringToken(nint keyvalues, string key, CUtlStringToken value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetStringToken(keyvalues, keyBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetColor; + + public unsafe static void SetColor(nint keyvalues, string key, Color value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetColor(keyvalues, keyBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetVector; + + public unsafe static void SetVector(nint keyvalues, string key, Vector value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetVector(keyvalues, keyBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetVector2D; + + public unsafe static void SetVector2D(nint keyvalues, string key, Vector2D value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetVector2D(keyvalues, keyBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetVector4D; + + public unsafe static void SetVector4D(nint keyvalues, string key, Vector4D value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetVector4D(keyvalues, keyBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetQAngle; + + public unsafe static void SetQAngle(nint keyvalues, string key, QAngle value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetQAngle(keyvalues, keyBufferPtr, value); + } + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/CommandLine.cs b/managed/src/SwiftlyS2.Generated/Natives/CommandLine.cs index 616e778b4..a0e6da30f 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/CommandLine.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/CommandLine.cs @@ -1,114 +1,99 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeCommandLine { - private static int _MainThreadID; - - private unsafe static delegate* unmanaged _HasParameter; - - public unsafe static bool HasParameter(string parameter) { - var pool = ArrayPool.Shared; - var parameterLength = Encoding.UTF8.GetByteCount(parameter); - var parameterBuffer = pool.Rent(parameterLength + 1); - Encoding.UTF8.GetBytes(parameter, parameterBuffer); - parameterBuffer[parameterLength] = 0; - fixed (byte* parameterBufferPtr = parameterBuffer) { - var ret = _HasParameter(parameterBufferPtr); - pool.Return(parameterBuffer); - return ret == 1; +internal static class NativeCommandLine +{ + private static int _MainThreadID; + + private unsafe static delegate* unmanaged _HasParameter; + + public unsafe static bool HasParameter(string parameter) + { + byte[] parameterBuffer = Encoding.UTF8.GetBytes(parameter + "\0"); + fixed (byte* parameterBufferPtr = parameterBuffer) + { + var ret = _HasParameter(parameterBufferPtr); + return ret == 1; + } } - } - - private unsafe static delegate* unmanaged _GetParameterCount; - - public unsafe static int GetParameterCount() { - var ret = _GetParameterCount(); - return ret; - } - - private unsafe static delegate* unmanaged _GetParameterValueString; - - public unsafe static string GetParameterValueString(string parameter, string defaultValue) { - var pool = ArrayPool.Shared; - var parameterLength = Encoding.UTF8.GetByteCount(parameter); - var parameterBuffer = pool.Rent(parameterLength + 1); - Encoding.UTF8.GetBytes(parameter, parameterBuffer); - parameterBuffer[parameterLength] = 0; - var defaultValueLength = Encoding.UTF8.GetByteCount(defaultValue); - var defaultValueBuffer = pool.Rent(defaultValueLength + 1); - Encoding.UTF8.GetBytes(defaultValue, defaultValueBuffer); - defaultValueBuffer[defaultValueLength] = 0; - fixed (byte* parameterBufferPtr = parameterBuffer) { - fixed (byte* defaultValueBufferPtr = defaultValueBuffer) { - var ret = _GetParameterValueString(null, parameterBufferPtr, defaultValueBufferPtr); - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetParameterValueString(retBufferPtr, parameterBufferPtr, defaultValueBufferPtr); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - pool.Return(parameterBuffer); - pool.Return(defaultValueBuffer); - return retString; + + private unsafe static delegate* unmanaged _GetParameterCount; + + public unsafe static int GetParameterCount() + { + var ret = _GetParameterCount(); + return ret; + } + + private unsafe static delegate* unmanaged _GetParameterValueString; + + public unsafe static string GetParameterValueString(string parameter, string defaultValue) + { + byte[] parameterBuffer = Encoding.UTF8.GetBytes(parameter + "\0"); + byte[] defaultValueBuffer = Encoding.UTF8.GetBytes(defaultValue + "\0"); + fixed (byte* parameterBufferPtr = parameterBuffer) + { + fixed (byte* defaultValueBufferPtr = defaultValueBuffer) + { + var ret = _GetParameterValueString(null, parameterBufferPtr, defaultValueBufferPtr); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetParameterValueString(retBufferPtr, parameterBufferPtr, defaultValueBufferPtr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } + } } - } } - } - - private unsafe static delegate* unmanaged _GetParameterValueInt; - - public unsafe static int GetParameterValueInt(string parameter, int defaultValue) { - var pool = ArrayPool.Shared; - var parameterLength = Encoding.UTF8.GetByteCount(parameter); - var parameterBuffer = pool.Rent(parameterLength + 1); - Encoding.UTF8.GetBytes(parameter, parameterBuffer); - parameterBuffer[parameterLength] = 0; - fixed (byte* parameterBufferPtr = parameterBuffer) { - var ret = _GetParameterValueInt(parameterBufferPtr, defaultValue); - pool.Return(parameterBuffer); - return ret; + + private unsafe static delegate* unmanaged _GetParameterValueInt; + + public unsafe static int GetParameterValueInt(string parameter, int defaultValue) + { + byte[] parameterBuffer = Encoding.UTF8.GetBytes(parameter + "\0"); + fixed (byte* parameterBufferPtr = parameterBuffer) + { + var ret = _GetParameterValueInt(parameterBufferPtr, defaultValue); + return ret; + } } - } - - private unsafe static delegate* unmanaged _GetParameterValueFloat; - - public unsafe static float GetParameterValueFloat(string parameter, float defaultValue) { - var pool = ArrayPool.Shared; - var parameterLength = Encoding.UTF8.GetByteCount(parameter); - var parameterBuffer = pool.Rent(parameterLength + 1); - Encoding.UTF8.GetBytes(parameter, parameterBuffer); - parameterBuffer[parameterLength] = 0; - fixed (byte* parameterBufferPtr = parameterBuffer) { - var ret = _GetParameterValueFloat(parameterBufferPtr, defaultValue); - pool.Return(parameterBuffer); - return ret; + + private unsafe static delegate* unmanaged _GetParameterValueFloat; + + public unsafe static float GetParameterValueFloat(string parameter, float defaultValue) + { + byte[] parameterBuffer = Encoding.UTF8.GetBytes(parameter + "\0"); + fixed (byte* parameterBufferPtr = parameterBuffer) + { + var ret = _GetParameterValueFloat(parameterBufferPtr, defaultValue); + return ret; + } } - } - - private unsafe static delegate* unmanaged _GetCommandLine; - - public unsafe static string GetCommandLine() { - var ret = _GetCommandLine(null); - var pool = ArrayPool.Shared; - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetCommandLine(retBufferPtr); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - return retString; + + private unsafe static delegate* unmanaged _GetCommandLine; + + public unsafe static string GetCommandLine() + { + var ret = _GetCommandLine(null); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetCommandLine(retBufferPtr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } } - } - private unsafe static delegate* unmanaged _HasParameters; + private unsafe static delegate* unmanaged _HasParameters; - public unsafe static bool HasParameters() { - var ret = _HasParameters(); - return ret == 1; - } + public unsafe static bool HasParameters() + { + var ret = _HasParameters(); + return ret == 1; + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/Commands.cs b/managed/src/SwiftlyS2.Generated/Natives/Commands.cs index 510130fda..cfe57c711 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/Commands.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/Commands.cs @@ -1,118 +1,112 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeCommands { - private static int _MainThreadID; - - private unsafe static delegate* unmanaged _HandleCommandForPlayer; - - /// - /// 1 -> not silent, 2 -> silent, -1 -> invalid player, 0 -> no command - /// - public unsafe static int HandleCommandForPlayer(int playerid, string command) { - var pool = ArrayPool.Shared; - var commandLength = Encoding.UTF8.GetByteCount(command); - var commandBuffer = pool.Rent(commandLength + 1); - Encoding.UTF8.GetBytes(command, commandBuffer); - commandBuffer[commandLength] = 0; - fixed (byte* commandBufferPtr = commandBuffer) { - var ret = _HandleCommandForPlayer(playerid, commandBufferPtr); - pool.Return(commandBuffer); - return ret; +internal static class NativeCommands +{ + private static int _MainThreadID; + + private unsafe static delegate* unmanaged _HandleCommandForPlayer; + + /// + /// 1 -> not silent, 2 -> silent, -1 -> invalid player, 0 -> no command + /// + public unsafe static int HandleCommandForPlayer(int playerid, string command) + { + byte[] commandBuffer = Encoding.UTF8.GetBytes(command + "\0"); + fixed (byte* commandBufferPtr = commandBuffer) + { + var ret = _HandleCommandForPlayer(playerid, commandBufferPtr); + return ret; + } } - } - - private unsafe static delegate* unmanaged _RegisterCommand; - - /// - /// callback should receive (int32 playerid, string arguments_list (separated by \x01), string commandName, string prefix, bool silent), if registerRaw is false, it will not put "sw_" before the command name - /// - public unsafe static ulong RegisterCommand(string commandName, nint callback, bool registerRaw) { - var pool = ArrayPool.Shared; - var commandNameLength = Encoding.UTF8.GetByteCount(commandName); - var commandNameBuffer = pool.Rent(commandNameLength + 1); - Encoding.UTF8.GetBytes(commandName, commandNameBuffer); - commandNameBuffer[commandNameLength] = 0; - fixed (byte* commandNameBufferPtr = commandNameBuffer) { - var ret = _RegisterCommand(commandNameBufferPtr, callback, registerRaw ? (byte)1 : (byte)0); - pool.Return(commandNameBuffer); - return ret; + + private unsafe static delegate* unmanaged _RegisterCommand; + + /// + /// callback should receive (int32 playerid, string arguments_list (separated by \x01), string commandName, string prefix, bool silent), if registerRaw is false, it will not put "sw_" before the command name + /// + public unsafe static ulong RegisterCommand(string commandName, nint callback, bool registerRaw) + { + byte[] commandNameBuffer = Encoding.UTF8.GetBytes(commandName + "\0"); + fixed (byte* commandNameBufferPtr = commandNameBuffer) + { + var ret = _RegisterCommand(commandNameBufferPtr, callback, registerRaw ? (byte)1 : (byte)0); + return ret; + } } - } - - private unsafe static delegate* unmanaged _UnregisterCommand; - - public unsafe static void UnregisterCommand(ulong callbackID) { - _UnregisterCommand(callbackID); - } - - private unsafe static delegate* unmanaged _RegisterAlias; - - /// - /// registerRaw behaves the same as on RegisterCommand, for commandName you need to also put the "sw_" prefix if the command is registered without raw mode - /// - public unsafe static ulong RegisterAlias(string aliasName, string commandName, bool registerRaw) { - var pool = ArrayPool.Shared; - var aliasNameLength = Encoding.UTF8.GetByteCount(aliasName); - var aliasNameBuffer = pool.Rent(aliasNameLength + 1); - Encoding.UTF8.GetBytes(aliasName, aliasNameBuffer); - aliasNameBuffer[aliasNameLength] = 0; - var commandNameLength = Encoding.UTF8.GetByteCount(commandName); - var commandNameBuffer = pool.Rent(commandNameLength + 1); - Encoding.UTF8.GetBytes(commandName, commandNameBuffer); - commandNameBuffer[commandNameLength] = 0; - fixed (byte* aliasNameBufferPtr = aliasNameBuffer) { - fixed (byte* commandNameBufferPtr = commandNameBuffer) { - var ret = _RegisterAlias(aliasNameBufferPtr, commandNameBufferPtr, registerRaw ? (byte)1 : (byte)0); - pool.Return(aliasNameBuffer); - pool.Return(commandNameBuffer); - return ret; - } + + private unsafe static delegate* unmanaged _UnregisterCommand; + + public unsafe static void UnregisterCommand(ulong callbackID) + { + _UnregisterCommand(callbackID); } - } - private unsafe static delegate* unmanaged _UnregisterAlias; + private unsafe static delegate* unmanaged _RegisterAlias; + + /// + /// registerRaw behaves the same as on RegisterCommand, for commandName you need to also put the "sw_" prefix if the command is registered without raw mode + /// + public unsafe static ulong RegisterAlias(string aliasName, string commandName, bool registerRaw) + { + byte[] aliasNameBuffer = Encoding.UTF8.GetBytes(aliasName + "\0"); + byte[] commandNameBuffer = Encoding.UTF8.GetBytes(commandName + "\0"); + fixed (byte* aliasNameBufferPtr = aliasNameBuffer) + { + fixed (byte* commandNameBufferPtr = commandNameBuffer) + { + var ret = _RegisterAlias(aliasNameBufferPtr, commandNameBufferPtr, registerRaw ? (byte)1 : (byte)0); + return ret; + } + } + } - public unsafe static void UnregisterAlias(ulong callbackID) { - _UnregisterAlias(callbackID); - } + private unsafe static delegate* unmanaged _UnregisterAlias; - private unsafe static delegate* unmanaged _RegisterClientCommandsListener; + public unsafe static void UnregisterAlias(ulong callbackID) + { + _UnregisterAlias(callbackID); + } - /// - /// callback should receive: int32 playerid, string commandline, return true -> ignored, return false -> supercede - /// - public unsafe static ulong RegisterClientCommandsListener(nint callback) { - var ret = _RegisterClientCommandsListener(callback); - return ret; - } + private unsafe static delegate* unmanaged _RegisterClientCommandsListener; - private unsafe static delegate* unmanaged _UnregisterClientCommandsListener; + /// + /// callback should receive: int32 playerid, string commandline, return true -> ignored, return false -> supercede + /// + public unsafe static ulong RegisterClientCommandsListener(nint callback) + { + var ret = _RegisterClientCommandsListener(callback); + return ret; + } + + private unsafe static delegate* unmanaged _UnregisterClientCommandsListener; - public unsafe static void UnregisterClientCommandsListener(ulong callbackID) { - _UnregisterClientCommandsListener(callbackID); - } + public unsafe static void UnregisterClientCommandsListener(ulong callbackID) + { + _UnregisterClientCommandsListener(callbackID); + } - private unsafe static delegate* unmanaged _RegisterClientChatListener; + private unsafe static delegate* unmanaged _RegisterClientChatListener; - /// - /// callback should receive: int32 playerid, string text, bool teamonly, return true -> ignored, return false -> supercede, when superceded it's not gonna send the message - /// - public unsafe static ulong RegisterClientChatListener(nint callback) { - var ret = _RegisterClientChatListener(callback); - return ret; - } + /// + /// callback should receive: int32 playerid, string text, bool teamonly, return true -> ignored, return false -> supercede, when superceded it's not gonna send the message + /// + public unsafe static ulong RegisterClientChatListener(nint callback) + { + var ret = _RegisterClientChatListener(callback); + return ret; + } - private unsafe static delegate* unmanaged _UnregisterClientChatListener; + private unsafe static delegate* unmanaged _UnregisterClientChatListener; - public unsafe static void UnregisterClientChatListener(ulong callbackID) { - _UnregisterClientChatListener(callbackID); - } + public unsafe static void UnregisterClientChatListener(ulong callbackID) + { + _UnregisterClientChatListener(callbackID); + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/ConsoleOutput.cs b/managed/src/SwiftlyS2.Generated/Natives/ConsoleOutput.cs index a27a46f13..6907ef5dc 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/ConsoleOutput.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/ConsoleOutput.cs @@ -1,92 +1,93 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeConsoleOutput { - private static int _MainThreadID; - - private unsafe static delegate* unmanaged _AddConsoleListener; - - /// - /// callback should receive: string message - /// - public unsafe static ulong AddConsoleListener(nint callback) { - var ret = _AddConsoleListener(callback); - return ret; - } - - private unsafe static delegate* unmanaged _RemoveConsoleListener; - - public unsafe static void RemoveConsoleListener(ulong listenerId) { - _RemoveConsoleListener(listenerId); - } - - private unsafe static delegate* unmanaged _IsEnabled; - - /// - /// returns whether console filtering is enabled - /// - public unsafe static bool IsEnabled() { - var ret = _IsEnabled(); - return ret == 1; - } - - private unsafe static delegate* unmanaged _ToggleFilter; - - /// - /// toggles the console filter on/off - /// - public unsafe static void ToggleFilter() { - _ToggleFilter(); - } - - private unsafe static delegate* unmanaged _ReloadFilterConfiguration; - - /// - /// reloads the filter configuration from file - /// - public unsafe static void ReloadFilterConfiguration() { - _ReloadFilterConfiguration(); - } - - private unsafe static delegate* unmanaged _NeedsFiltering; - - /// - /// checks if a message needs filtering - /// - public unsafe static bool NeedsFiltering(string text) { - var pool = ArrayPool.Shared; - var textLength = Encoding.UTF8.GetByteCount(text); - var textBuffer = pool.Rent(textLength + 1); - Encoding.UTF8.GetBytes(text, textBuffer); - textBuffer[textLength] = 0; - fixed (byte* textBufferPtr = textBuffer) { - var ret = _NeedsFiltering(textBufferPtr); - pool.Return(textBuffer); - return ret == 1; +internal static class NativeConsoleOutput +{ + private static int _MainThreadID; + + private unsafe static delegate* unmanaged _AddConsoleListener; + + /// + /// callback should receive: string message + /// + public unsafe static ulong AddConsoleListener(nint callback) + { + var ret = _AddConsoleListener(callback); + return ret; + } + + private unsafe static delegate* unmanaged _RemoveConsoleListener; + + public unsafe static void RemoveConsoleListener(ulong listenerId) + { + _RemoveConsoleListener(listenerId); } - } - - private unsafe static delegate* unmanaged _GetCounterText; - - /// - /// gets the counter text showing how many messages were filtered - /// - public unsafe static string GetCounterText() { - var ret = _GetCounterText(null); - var pool = ArrayPool.Shared; - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetCounterText(retBufferPtr); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - return retString; + + private unsafe static delegate* unmanaged _IsEnabled; + + /// + /// returns whether console filtering is enabled + /// + public unsafe static bool IsEnabled() + { + var ret = _IsEnabled(); + return ret == 1; + } + + private unsafe static delegate* unmanaged _ToggleFilter; + + /// + /// toggles the console filter on/off + /// + public unsafe static void ToggleFilter() + { + _ToggleFilter(); + } + + private unsafe static delegate* unmanaged _ReloadFilterConfiguration; + + /// + /// reloads the filter configuration from file + /// + public unsafe static void ReloadFilterConfiguration() + { + _ReloadFilterConfiguration(); + } + + private unsafe static delegate* unmanaged _NeedsFiltering; + + /// + /// checks if a message needs filtering + /// + public unsafe static bool NeedsFiltering(string text) + { + byte[] textBuffer = Encoding.UTF8.GetBytes(text + "\0"); + fixed (byte* textBufferPtr = textBuffer) + { + var ret = _NeedsFiltering(textBufferPtr); + return ret == 1; + } + } + + private unsafe static delegate* unmanaged _GetCounterText; + + /// + /// gets the counter text showing how many messages were filtered + /// + public unsafe static string GetCounterText() + { + var ret = _GetCounterText(null); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetCounterText(retBufferPtr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } } - } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/Convars.cs b/managed/src/SwiftlyS2.Generated/Natives/Convars.cs index 491dd2f7a..cbbdf29b6 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/Convars.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/Convars.cs @@ -1,1194 +1,506 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeConvars { - private static int _MainThreadID; +internal static class NativeConvars +{ + private static int _MainThreadID; - private unsafe static delegate* unmanaged _QueryClientConvar; + private unsafe static delegate* unmanaged _QueryClientConvar; - public unsafe static void QueryClientConvar(int playerid, string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _QueryClientConvar(playerid, cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - } - } - - private unsafe static delegate* unmanaged _AddQueryClientCvarCallback; - - /// - /// the callback should receive the following: int32 playerid, string cvarName, string cvarValue - /// - public unsafe static int AddQueryClientCvarCallback(nint callback) { - var ret = _AddQueryClientCvarCallback(callback); - return ret; - } - - private unsafe static delegate* unmanaged _RemoveQueryClientCvarCallback; - - public unsafe static void RemoveQueryClientCvarCallback(int callbackID) { - _RemoveQueryClientCvarCallback(callbackID); - } - - private unsafe static delegate* unmanaged _AddGlobalChangeListener; - - /// - /// the callback should receive the following: string convarName, int playerid, string newValue, string oldValue - /// - public unsafe static ulong AddGlobalChangeListener(nint callback) { - var ret = _AddGlobalChangeListener(callback); - return ret; - } - - private unsafe static delegate* unmanaged _RemoveGlobalChangeListener; - - public unsafe static void RemoveGlobalChangeListener(ulong callbackID) { - _RemoveGlobalChangeListener(callbackID); - } - - private unsafe static delegate* unmanaged _AddConvarCreatedListener; - - /// - /// the callback should receive the following: string convarName - /// - public unsafe static ulong AddConvarCreatedListener(nint callback) { - var ret = _AddConvarCreatedListener(callback); - return ret; - } - - private unsafe static delegate* unmanaged _RemoveConvarCreatedListener; - - public unsafe static void RemoveConvarCreatedListener(ulong callbackID) { - _RemoveConvarCreatedListener(callbackID); - } - - private unsafe static delegate* unmanaged _AddConCommandCreatedListener; - - /// - /// the callback should receive the following: string commandName - /// - public unsafe static ulong AddConCommandCreatedListener(nint callback) { - var ret = _AddConCommandCreatedListener(callback); - return ret; - } - - private unsafe static delegate* unmanaged _RemoveConCommandCreatedListener; - - public unsafe static void RemoveConCommandCreatedListener(ulong callbackID) { - _RemoveConCommandCreatedListener(callbackID); - } - - private unsafe static delegate* unmanaged _CreateConvarInt16; - - public unsafe static void CreateConvarInt16(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, short defaultValue, nint minValue, nint maxValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - var helpMessageLength = Encoding.UTF8.GetByteCount(helpMessage); - var helpMessageBuffer = pool.Rent(helpMessageLength + 1); - Encoding.UTF8.GetBytes(helpMessage, helpMessageBuffer); - helpMessageBuffer[helpMessageLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - fixed (byte* helpMessageBufferPtr = helpMessageBuffer) { - _CreateConvarInt16(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); - pool.Return(cvarNameBuffer); - pool.Return(helpMessageBuffer); - } - } - } - - private unsafe static delegate* unmanaged _CreateConvarUInt16; - - public unsafe static void CreateConvarUInt16(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, ushort defaultValue, nint minValue, nint maxValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - var helpMessageLength = Encoding.UTF8.GetByteCount(helpMessage); - var helpMessageBuffer = pool.Rent(helpMessageLength + 1); - Encoding.UTF8.GetBytes(helpMessage, helpMessageBuffer); - helpMessageBuffer[helpMessageLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - fixed (byte* helpMessageBufferPtr = helpMessageBuffer) { - _CreateConvarUInt16(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); - pool.Return(cvarNameBuffer); - pool.Return(helpMessageBuffer); - } - } - } - - private unsafe static delegate* unmanaged _CreateConvarInt32; - - public unsafe static void CreateConvarInt32(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, int defaultValue, nint minValue, nint maxValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - var helpMessageLength = Encoding.UTF8.GetByteCount(helpMessage); - var helpMessageBuffer = pool.Rent(helpMessageLength + 1); - Encoding.UTF8.GetBytes(helpMessage, helpMessageBuffer); - helpMessageBuffer[helpMessageLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - fixed (byte* helpMessageBufferPtr = helpMessageBuffer) { - _CreateConvarInt32(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); - pool.Return(cvarNameBuffer); - pool.Return(helpMessageBuffer); - } - } - } - - private unsafe static delegate* unmanaged _CreateConvarUInt32; - - public unsafe static void CreateConvarUInt32(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, uint defaultValue, nint minValue, nint maxValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - var helpMessageLength = Encoding.UTF8.GetByteCount(helpMessage); - var helpMessageBuffer = pool.Rent(helpMessageLength + 1); - Encoding.UTF8.GetBytes(helpMessage, helpMessageBuffer); - helpMessageBuffer[helpMessageLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - fixed (byte* helpMessageBufferPtr = helpMessageBuffer) { - _CreateConvarUInt32(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); - pool.Return(cvarNameBuffer); - pool.Return(helpMessageBuffer); - } - } - } - - private unsafe static delegate* unmanaged _CreateConvarInt64; - - public unsafe static void CreateConvarInt64(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, long defaultValue, nint minValue, nint maxValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - var helpMessageLength = Encoding.UTF8.GetByteCount(helpMessage); - var helpMessageBuffer = pool.Rent(helpMessageLength + 1); - Encoding.UTF8.GetBytes(helpMessage, helpMessageBuffer); - helpMessageBuffer[helpMessageLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - fixed (byte* helpMessageBufferPtr = helpMessageBuffer) { - _CreateConvarInt64(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); - pool.Return(cvarNameBuffer); - pool.Return(helpMessageBuffer); - } - } - } - - private unsafe static delegate* unmanaged _CreateConvarUInt64; - - public unsafe static void CreateConvarUInt64(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, ulong defaultValue, nint minValue, nint maxValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - var helpMessageLength = Encoding.UTF8.GetByteCount(helpMessage); - var helpMessageBuffer = pool.Rent(helpMessageLength + 1); - Encoding.UTF8.GetBytes(helpMessage, helpMessageBuffer); - helpMessageBuffer[helpMessageLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - fixed (byte* helpMessageBufferPtr = helpMessageBuffer) { - _CreateConvarUInt64(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); - pool.Return(cvarNameBuffer); - pool.Return(helpMessageBuffer); - } - } - } - - private unsafe static delegate* unmanaged _CreateConvarBool; - - public unsafe static void CreateConvarBool(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, bool defaultValue, nint minValue, nint maxValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - var helpMessageLength = Encoding.UTF8.GetByteCount(helpMessage); - var helpMessageBuffer = pool.Rent(helpMessageLength + 1); - Encoding.UTF8.GetBytes(helpMessage, helpMessageBuffer); - helpMessageBuffer[helpMessageLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - fixed (byte* helpMessageBufferPtr = helpMessageBuffer) { - _CreateConvarBool(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue ? (byte)1 : (byte)0, minValue, maxValue); - pool.Return(cvarNameBuffer); - pool.Return(helpMessageBuffer); - } - } - } - - private unsafe static delegate* unmanaged _CreateConvarFloat; - - public unsafe static void CreateConvarFloat(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, float defaultValue, nint minValue, nint maxValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - var helpMessageLength = Encoding.UTF8.GetByteCount(helpMessage); - var helpMessageBuffer = pool.Rent(helpMessageLength + 1); - Encoding.UTF8.GetBytes(helpMessage, helpMessageBuffer); - helpMessageBuffer[helpMessageLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - fixed (byte* helpMessageBufferPtr = helpMessageBuffer) { - _CreateConvarFloat(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); - pool.Return(cvarNameBuffer); - pool.Return(helpMessageBuffer); - } - } - } - - private unsafe static delegate* unmanaged _CreateConvarDouble; - - public unsafe static void CreateConvarDouble(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, double defaultValue, nint minValue, nint maxValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - var helpMessageLength = Encoding.UTF8.GetByteCount(helpMessage); - var helpMessageBuffer = pool.Rent(helpMessageLength + 1); - Encoding.UTF8.GetBytes(helpMessage, helpMessageBuffer); - helpMessageBuffer[helpMessageLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - fixed (byte* helpMessageBufferPtr = helpMessageBuffer) { - _CreateConvarDouble(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); - pool.Return(cvarNameBuffer); - pool.Return(helpMessageBuffer); - } - } - } - - private unsafe static delegate* unmanaged _CreateConvarColor; - - public unsafe static void CreateConvarColor(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, Color defaultValue, nint minValue, nint maxValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - var helpMessageLength = Encoding.UTF8.GetByteCount(helpMessage); - var helpMessageBuffer = pool.Rent(helpMessageLength + 1); - Encoding.UTF8.GetBytes(helpMessage, helpMessageBuffer); - helpMessageBuffer[helpMessageLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - fixed (byte* helpMessageBufferPtr = helpMessageBuffer) { - _CreateConvarColor(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); - pool.Return(cvarNameBuffer); - pool.Return(helpMessageBuffer); - } - } - } - - private unsafe static delegate* unmanaged _CreateConvarVector2D; - - public unsafe static void CreateConvarVector2D(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, Vector2D defaultValue, nint minValue, nint maxValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - var helpMessageLength = Encoding.UTF8.GetByteCount(helpMessage); - var helpMessageBuffer = pool.Rent(helpMessageLength + 1); - Encoding.UTF8.GetBytes(helpMessage, helpMessageBuffer); - helpMessageBuffer[helpMessageLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - fixed (byte* helpMessageBufferPtr = helpMessageBuffer) { - _CreateConvarVector2D(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); - pool.Return(cvarNameBuffer); - pool.Return(helpMessageBuffer); - } - } - } - - private unsafe static delegate* unmanaged _CreateConvarVector; - - public unsafe static void CreateConvarVector(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, Vector defaultValue, nint minValue, nint maxValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - var helpMessageLength = Encoding.UTF8.GetByteCount(helpMessage); - var helpMessageBuffer = pool.Rent(helpMessageLength + 1); - Encoding.UTF8.GetBytes(helpMessage, helpMessageBuffer); - helpMessageBuffer[helpMessageLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - fixed (byte* helpMessageBufferPtr = helpMessageBuffer) { - _CreateConvarVector(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); - pool.Return(cvarNameBuffer); - pool.Return(helpMessageBuffer); - } - } - } - - private unsafe static delegate* unmanaged _CreateConvarVector4D; - - public unsafe static void CreateConvarVector4D(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, Vector4D defaultValue, nint minValue, nint maxValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - var helpMessageLength = Encoding.UTF8.GetByteCount(helpMessage); - var helpMessageBuffer = pool.Rent(helpMessageLength + 1); - Encoding.UTF8.GetBytes(helpMessage, helpMessageBuffer); - helpMessageBuffer[helpMessageLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - fixed (byte* helpMessageBufferPtr = helpMessageBuffer) { - _CreateConvarVector4D(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); - pool.Return(cvarNameBuffer); - pool.Return(helpMessageBuffer); - } - } - } - - private unsafe static delegate* unmanaged _CreateConvarQAngle; - - public unsafe static void CreateConvarQAngle(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, QAngle defaultValue, nint minValue, nint maxValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - var helpMessageLength = Encoding.UTF8.GetByteCount(helpMessage); - var helpMessageBuffer = pool.Rent(helpMessageLength + 1); - Encoding.UTF8.GetBytes(helpMessage, helpMessageBuffer); - helpMessageBuffer[helpMessageLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - fixed (byte* helpMessageBufferPtr = helpMessageBuffer) { - _CreateConvarQAngle(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); - pool.Return(cvarNameBuffer); - pool.Return(helpMessageBuffer); - } - } - } - - private unsafe static delegate* unmanaged _CreateConvarString; - - public unsafe static void CreateConvarString(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, string defaultValue, nint minValue, nint maxValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - var helpMessageLength = Encoding.UTF8.GetByteCount(helpMessage); - var helpMessageBuffer = pool.Rent(helpMessageLength + 1); - Encoding.UTF8.GetBytes(helpMessage, helpMessageBuffer); - helpMessageBuffer[helpMessageLength] = 0; - var defaultValueLength = Encoding.UTF8.GetByteCount(defaultValue); - var defaultValueBuffer = pool.Rent(defaultValueLength + 1); - Encoding.UTF8.GetBytes(defaultValue, defaultValueBuffer); - defaultValueBuffer[defaultValueLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - fixed (byte* helpMessageBufferPtr = helpMessageBuffer) { - fixed (byte* defaultValueBufferPtr = defaultValueBuffer) { - _CreateConvarString(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValueBufferPtr, minValue, maxValue); - pool.Return(cvarNameBuffer); - pool.Return(helpMessageBuffer); - pool.Return(defaultValueBuffer); + public unsafe static void QueryClientConvar(int playerid, string cvarName) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + _QueryClientConvar(playerid, cvarNameBufferPtr); } - } - } - } - - private unsafe static delegate* unmanaged _DeleteConvar; - - public unsafe static void DeleteConvar(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _DeleteConvar(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - } - } - - private unsafe static delegate* unmanaged _ExistsConvar; - - public unsafe static bool ExistsConvar(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _ExistsConvar(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - return ret == 1; } - } - - private unsafe static delegate* unmanaged _GetConvarType; - - public unsafe static int GetConvarType(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _GetConvarType(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetConvarDataAddress; - - public unsafe static nint GetConvarDataAddress(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _GetConvarDataAddress(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetConvarValueInt16; - - public unsafe static short GetConvarValueInt16(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _GetConvarValueInt16(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetConvarValueUInt16; - - public unsafe static ushort GetConvarValueUInt16(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _GetConvarValueUInt16(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetConvarValueInt32; - - public unsafe static int GetConvarValueInt32(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _GetConvarValueInt32(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetConvarValueUInt32; - - public unsafe static uint GetConvarValueUInt32(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _GetConvarValueUInt32(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetConvarValueInt64; - - public unsafe static long GetConvarValueInt64(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _GetConvarValueInt64(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetConvarValueUInt64; - - public unsafe static ulong GetConvarValueUInt64(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _GetConvarValueUInt64(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetConvarValueBool; - - public unsafe static bool GetConvarValueBool(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _GetConvarValueBool(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - return ret == 1; - } - } - - private unsafe static delegate* unmanaged _GetConvarValueFloat; - - public unsafe static float GetConvarValueFloat(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _GetConvarValueFloat(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetConvarValueDouble; - - public unsafe static double GetConvarValueDouble(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _GetConvarValueDouble(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetConvarValueColor; - - public unsafe static Color GetConvarValueColor(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _GetConvarValueColor(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetConvarValueVector2D; - - public unsafe static Vector2D GetConvarValueVector2D(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _GetConvarValueVector2D(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetConvarValueVector; - - public unsafe static Vector GetConvarValueVector(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _GetConvarValueVector(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - return ret; + + private unsafe static delegate* unmanaged _AddQueryClientCvarCallback; + + /// + /// the callback should receive the following: int32 playerid, string cvarName, string cvarValue + /// + public unsafe static int AddQueryClientCvarCallback(nint callback) + { + var ret = _AddQueryClientCvarCallback(callback); + return ret; } - } - - private unsafe static delegate* unmanaged _GetConvarValueVector4D; - - public unsafe static Vector4D GetConvarValueVector4D(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _GetConvarValueVector4D(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - return ret; + + private unsafe static delegate* unmanaged _RemoveQueryClientCvarCallback; + + public unsafe static void RemoveQueryClientCvarCallback(int callbackID) + { + _RemoveQueryClientCvarCallback(callbackID); } - } - - private unsafe static delegate* unmanaged _GetConvarValueQAngle; - - public unsafe static QAngle GetConvarValueQAngle(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _GetConvarValueQAngle(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - return ret; + + private unsafe static delegate* unmanaged _AddGlobalChangeListener; + + /// + /// the callback should receive the following: string convarName, int playerid, string newValue, string oldValue + /// + public unsafe static ulong AddGlobalChangeListener(nint callback) + { + var ret = _AddGlobalChangeListener(callback); + return ret; } - } - - private unsafe static delegate* unmanaged _GetConvarValueString; - - public unsafe static string GetConvarValueString(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _GetConvarValueString(null, cvarNameBufferPtr); - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetConvarValueString(retBufferPtr, cvarNameBufferPtr); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - pool.Return(cvarNameBuffer); - return retString; - } + + private unsafe static delegate* unmanaged _RemoveGlobalChangeListener; + + public unsafe static void RemoveGlobalChangeListener(ulong callbackID) + { + _RemoveGlobalChangeListener(callbackID); } - } - - private unsafe static delegate* unmanaged _SetConvarValueInt16; - - public unsafe static void SetConvarValueInt16(string cvarName, short defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetConvarValueInt16(cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _AddConvarCreatedListener; + + /// + /// the callback should receive the following: string convarName + /// + public unsafe static ulong AddConvarCreatedListener(nint callback) + { + var ret = _AddConvarCreatedListener(callback); + return ret; } - } - - private unsafe static delegate* unmanaged _SetConvarValueUInt16; - - public unsafe static void SetConvarValueUInt16(string cvarName, ushort defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetConvarValueUInt16(cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _RemoveConvarCreatedListener; + + public unsafe static void RemoveConvarCreatedListener(ulong callbackID) + { + _RemoveConvarCreatedListener(callbackID); } - } - - private unsafe static delegate* unmanaged _SetConvarValueInt32; - - public unsafe static void SetConvarValueInt32(string cvarName, int defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetConvarValueInt32(cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _AddConCommandCreatedListener; + + /// + /// the callback should receive the following: string commandName + /// + public unsafe static ulong AddConCommandCreatedListener(nint callback) + { + var ret = _AddConCommandCreatedListener(callback); + return ret; } - } - - private unsafe static delegate* unmanaged _SetConvarValueUInt32; - - public unsafe static void SetConvarValueUInt32(string cvarName, uint defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetConvarValueUInt32(cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _RemoveConCommandCreatedListener; + + public unsafe static void RemoveConCommandCreatedListener(ulong callbackID) + { + _RemoveConCommandCreatedListener(callbackID); } - } - - private unsafe static delegate* unmanaged _SetConvarValueInt64; - - public unsafe static void SetConvarValueInt64(string cvarName, long defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetConvarValueInt64(cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _CreateConvarInt16; + + public unsafe static void CreateConvarInt16(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, short defaultValue, nint minValue, nint maxValue) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + byte[] helpMessageBuffer = Encoding.UTF8.GetBytes(helpMessage + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + fixed (byte* helpMessageBufferPtr = helpMessageBuffer) + { + _CreateConvarInt16(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); + } + } } - } - - private unsafe static delegate* unmanaged _SetConvarValueUInt64; - - public unsafe static void SetConvarValueUInt64(string cvarName, ulong defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetConvarValueUInt64(cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _CreateConvarUInt16; + + public unsafe static void CreateConvarUInt16(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, ushort defaultValue, nint minValue, nint maxValue) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + byte[] helpMessageBuffer = Encoding.UTF8.GetBytes(helpMessage + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + fixed (byte* helpMessageBufferPtr = helpMessageBuffer) + { + _CreateConvarUInt16(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); + } + } } - } - - private unsafe static delegate* unmanaged _SetConvarValueBool; - - public unsafe static void SetConvarValueBool(string cvarName, bool defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetConvarValueBool(cvarNameBufferPtr, defaultValue ? (byte)1 : (byte)0); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _CreateConvarInt32; + + public unsafe static void CreateConvarInt32(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, int defaultValue, nint minValue, nint maxValue) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + byte[] helpMessageBuffer = Encoding.UTF8.GetBytes(helpMessage + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + fixed (byte* helpMessageBufferPtr = helpMessageBuffer) + { + _CreateConvarInt32(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); + } + } } - } - - private unsafe static delegate* unmanaged _SetConvarValueFloat; - - public unsafe static void SetConvarValueFloat(string cvarName, float defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetConvarValueFloat(cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _CreateConvarUInt32; + + public unsafe static void CreateConvarUInt32(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, uint defaultValue, nint minValue, nint maxValue) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + byte[] helpMessageBuffer = Encoding.UTF8.GetBytes(helpMessage + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + fixed (byte* helpMessageBufferPtr = helpMessageBuffer) + { + _CreateConvarUInt32(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); + } + } } - } - - private unsafe static delegate* unmanaged _SetConvarValueDouble; - - public unsafe static void SetConvarValueDouble(string cvarName, double defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetConvarValueDouble(cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _CreateConvarInt64; + + public unsafe static void CreateConvarInt64(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, long defaultValue, nint minValue, nint maxValue) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + byte[] helpMessageBuffer = Encoding.UTF8.GetBytes(helpMessage + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + fixed (byte* helpMessageBufferPtr = helpMessageBuffer) + { + _CreateConvarInt64(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); + } + } } - } - - private unsafe static delegate* unmanaged _SetConvarValueColor; - - public unsafe static void SetConvarValueColor(string cvarName, Color defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetConvarValueColor(cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _CreateConvarUInt64; + + public unsafe static void CreateConvarUInt64(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, ulong defaultValue, nint minValue, nint maxValue) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + byte[] helpMessageBuffer = Encoding.UTF8.GetBytes(helpMessage + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + fixed (byte* helpMessageBufferPtr = helpMessageBuffer) + { + _CreateConvarUInt64(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); + } + } } - } - - private unsafe static delegate* unmanaged _SetConvarValueVector2D; - - public unsafe static void SetConvarValueVector2D(string cvarName, Vector2D defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetConvarValueVector2D(cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _CreateConvarBool; + + public unsafe static void CreateConvarBool(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, bool defaultValue, nint minValue, nint maxValue) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + byte[] helpMessageBuffer = Encoding.UTF8.GetBytes(helpMessage + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + fixed (byte* helpMessageBufferPtr = helpMessageBuffer) + { + _CreateConvarBool(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue ? (byte)1 : (byte)0, minValue, maxValue); + } + } } - } - - private unsafe static delegate* unmanaged _SetConvarValueVector; - - public unsafe static void SetConvarValueVector(string cvarName, Vector defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetConvarValueVector(cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _CreateConvarFloat; + + public unsafe static void CreateConvarFloat(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, float defaultValue, nint minValue, nint maxValue) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + byte[] helpMessageBuffer = Encoding.UTF8.GetBytes(helpMessage + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + fixed (byte* helpMessageBufferPtr = helpMessageBuffer) + { + _CreateConvarFloat(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); + } + } } - } - - private unsafe static delegate* unmanaged _SetConvarValueVector4D; - - public unsafe static void SetConvarValueVector4D(string cvarName, Vector4D defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetConvarValueVector4D(cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _CreateConvarDouble; + + public unsafe static void CreateConvarDouble(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, double defaultValue, nint minValue, nint maxValue) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + byte[] helpMessageBuffer = Encoding.UTF8.GetBytes(helpMessage + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + fixed (byte* helpMessageBufferPtr = helpMessageBuffer) + { + _CreateConvarDouble(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); + } + } } - } - - private unsafe static delegate* unmanaged _SetConvarValueQAngle; - - public unsafe static void SetConvarValueQAngle(string cvarName, QAngle defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetConvarValueQAngle(cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _CreateConvarColor; + + public unsafe static void CreateConvarColor(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, Color defaultValue, nint minValue, nint maxValue) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + byte[] helpMessageBuffer = Encoding.UTF8.GetBytes(helpMessage + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + fixed (byte* helpMessageBufferPtr = helpMessageBuffer) + { + _CreateConvarColor(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); + } + } } - } - - private unsafe static delegate* unmanaged _SetConvarValueString; - - public unsafe static void SetConvarValueString(string cvarName, string defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - var defaultValueLength = Encoding.UTF8.GetByteCount(defaultValue); - var defaultValueBuffer = pool.Rent(defaultValueLength + 1); - Encoding.UTF8.GetBytes(defaultValue, defaultValueBuffer); - defaultValueBuffer[defaultValueLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - fixed (byte* defaultValueBufferPtr = defaultValueBuffer) { - _SetConvarValueString(cvarNameBufferPtr, defaultValueBufferPtr); - pool.Return(cvarNameBuffer); - pool.Return(defaultValueBuffer); - } + + private unsafe static delegate* unmanaged _CreateConvarVector2D; + + public unsafe static void CreateConvarVector2D(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, Vector2D defaultValue, nint minValue, nint maxValue) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + byte[] helpMessageBuffer = Encoding.UTF8.GetBytes(helpMessage + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + fixed (byte* helpMessageBufferPtr = helpMessageBuffer) + { + _CreateConvarVector2D(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); + } + } } - } - - private unsafe static delegate* unmanaged _SetClientConvarValueInt16; - - public unsafe static void SetClientConvarValueInt16(int playerid, string cvarName, short defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetClientConvarValueInt16(playerid, cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _CreateConvarVector; + + public unsafe static void CreateConvarVector(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, Vector defaultValue, nint minValue, nint maxValue) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + byte[] helpMessageBuffer = Encoding.UTF8.GetBytes(helpMessage + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + fixed (byte* helpMessageBufferPtr = helpMessageBuffer) + { + _CreateConvarVector(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); + } + } } - } - - private unsafe static delegate* unmanaged _SetClientConvarValueUInt16; - - public unsafe static void SetClientConvarValueUInt16(int playerid, string cvarName, ushort defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetClientConvarValueUInt16(playerid, cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _CreateConvarVector4D; + + public unsafe static void CreateConvarVector4D(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, Vector4D defaultValue, nint minValue, nint maxValue) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + byte[] helpMessageBuffer = Encoding.UTF8.GetBytes(helpMessage + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + fixed (byte* helpMessageBufferPtr = helpMessageBuffer) + { + _CreateConvarVector4D(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); + } + } } - } - - private unsafe static delegate* unmanaged _SetClientConvarValueInt32; - - public unsafe static void SetClientConvarValueInt32(int playerid, string cvarName, int defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetClientConvarValueInt32(playerid, cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _CreateConvarQAngle; + + public unsafe static void CreateConvarQAngle(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, QAngle defaultValue, nint minValue, nint maxValue) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + byte[] helpMessageBuffer = Encoding.UTF8.GetBytes(helpMessage + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + fixed (byte* helpMessageBufferPtr = helpMessageBuffer) + { + _CreateConvarQAngle(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValue, minValue, maxValue); + } + } } - } - - private unsafe static delegate* unmanaged _SetClientConvarValueUInt32; - - public unsafe static void SetClientConvarValueUInt32(int playerid, string cvarName, uint defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetClientConvarValueUInt32(playerid, cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _CreateConvarString; + + public unsafe static void CreateConvarString(string cvarName, int cvarType, ulong cvarFlags, string helpMessage, string defaultValue, nint minValue, nint maxValue) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + byte[] helpMessageBuffer = Encoding.UTF8.GetBytes(helpMessage + "\0"); + byte[] defaultValueBuffer = Encoding.UTF8.GetBytes(defaultValue + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + fixed (byte* helpMessageBufferPtr = helpMessageBuffer) + { + fixed (byte* defaultValueBufferPtr = defaultValueBuffer) + { + _CreateConvarString(cvarNameBufferPtr, cvarType, cvarFlags, helpMessageBufferPtr, defaultValueBufferPtr, minValue, maxValue); + } + } + } } - } - - private unsafe static delegate* unmanaged _SetClientConvarValueInt64; - - public unsafe static void SetClientConvarValueInt64(int playerid, string cvarName, long defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetClientConvarValueInt64(playerid, cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _DeleteConvar; + + public unsafe static void DeleteConvar(string cvarName) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + _DeleteConvar(cvarNameBufferPtr); + } } - } - - private unsafe static delegate* unmanaged _SetClientConvarValueUInt64; - - public unsafe static void SetClientConvarValueUInt64(int playerid, string cvarName, ulong defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetClientConvarValueUInt64(playerid, cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _ExistsConvar; + + public unsafe static bool ExistsConvar(string cvarName) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + var ret = _ExistsConvar(cvarNameBufferPtr); + return ret == 1; + } } - } - - private unsafe static delegate* unmanaged _SetClientConvarValueBool; - - public unsafe static void SetClientConvarValueBool(int playerid, string cvarName, bool defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetClientConvarValueBool(playerid, cvarNameBufferPtr, defaultValue ? (byte)1 : (byte)0); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _GetConvarType; + + public unsafe static int GetConvarType(string cvarName) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + var ret = _GetConvarType(cvarNameBufferPtr); + return ret; + } } - } - - private unsafe static delegate* unmanaged _SetClientConvarValueFloat; - - public unsafe static void SetClientConvarValueFloat(int playerid, string cvarName, float defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetClientConvarValueFloat(playerid, cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _SetClientConvarValueString; + + public unsafe static void SetClientConvarValueString(int playerid, string cvarName, string defaultValue) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + byte[] defaultValueBuffer = Encoding.UTF8.GetBytes(defaultValue + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + fixed (byte* defaultValueBufferPtr = defaultValueBuffer) + { + _SetClientConvarValueString(playerid, cvarNameBufferPtr, defaultValueBufferPtr); + } + } } - } - - private unsafe static delegate* unmanaged _SetClientConvarValueDouble; - - public unsafe static void SetClientConvarValueDouble(int playerid, string cvarName, double defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetClientConvarValueDouble(playerid, cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _GetFlags; + + public unsafe static ulong GetFlags(string cvarName) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + var ret = _GetFlags(cvarNameBufferPtr); + return ret; + } } - } - - private unsafe static delegate* unmanaged _SetClientConvarValueColor; - - public unsafe static void SetClientConvarValueColor(int playerid, string cvarName, Color defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetClientConvarValueColor(playerid, cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _SetFlags; + + public unsafe static void SetFlags(string cvarName, ulong flags) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + _SetFlags(cvarNameBufferPtr, flags); + } } - } - - private unsafe static delegate* unmanaged _SetClientConvarValueVector2D; - - public unsafe static void SetClientConvarValueVector2D(int playerid, string cvarName, Vector2D defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetClientConvarValueVector2D(playerid, cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _GetMinValuePtrPtr; + + public unsafe static nint GetMinValuePtrPtr(string cvarName) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + var ret = _GetMinValuePtrPtr(cvarNameBufferPtr); + return ret; + } } - } - - private unsafe static delegate* unmanaged _SetClientConvarValueVector; - - public unsafe static void SetClientConvarValueVector(int playerid, string cvarName, Vector defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetClientConvarValueVector(playerid, cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _GetMaxValuePtrPtr; + + public unsafe static nint GetMaxValuePtrPtr(string cvarName) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + var ret = _GetMaxValuePtrPtr(cvarNameBufferPtr); + return ret; + } } - } - - private unsafe static delegate* unmanaged _SetClientConvarValueVector4D; - - public unsafe static void SetClientConvarValueVector4D(int playerid, string cvarName, Vector4D defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetClientConvarValueVector4D(playerid, cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _HasDefaultValue; + + public unsafe static bool HasDefaultValue(string cvarName) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + var ret = _HasDefaultValue(cvarNameBufferPtr); + return ret == 1; + } } - } - - private unsafe static delegate* unmanaged _SetClientConvarValueQAngle; - - public unsafe static void SetClientConvarValueQAngle(int playerid, string cvarName, QAngle defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _SetClientConvarValueQAngle(playerid, cvarNameBufferPtr, defaultValue); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _GetDefaultValuePtr; + + public unsafe static nint GetDefaultValuePtr(string cvarName) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + var ret = _GetDefaultValuePtr(cvarNameBufferPtr); + return ret; + } } - } - - private unsafe static delegate* unmanaged _SetClientConvarValueString; - - public unsafe static void SetClientConvarValueString(int playerid, string cvarName, string defaultValue) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - var defaultValueLength = Encoding.UTF8.GetByteCount(defaultValue); - var defaultValueBuffer = pool.Rent(defaultValueLength + 1); - Encoding.UTF8.GetBytes(defaultValue, defaultValueBuffer); - defaultValueBuffer[defaultValueLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - fixed (byte* defaultValueBufferPtr = defaultValueBuffer) { - _SetClientConvarValueString(playerid, cvarNameBufferPtr, defaultValueBufferPtr); - pool.Return(cvarNameBuffer); - pool.Return(defaultValueBuffer); - } + + private unsafe static delegate* unmanaged _SetDefaultValue; + + public unsafe static void SetDefaultValue(string cvarName, nint defaultValue) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + _SetDefaultValue(cvarNameBufferPtr, defaultValue); + } } - } - - private unsafe static delegate* unmanaged _AddFlags; - - public unsafe static void AddFlags(string cvarName, ulong flags) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _AddFlags(cvarNameBufferPtr, flags); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _SetDefaultValueString; + + public unsafe static void SetDefaultValueString(string cvarName, string defaultValue) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + byte[] defaultValueBuffer = Encoding.UTF8.GetBytes(defaultValue + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + fixed (byte* defaultValueBufferPtr = defaultValueBuffer) + { + _SetDefaultValueString(cvarNameBufferPtr, defaultValueBufferPtr); + } + } } - } - - private unsafe static delegate* unmanaged _RemoveFlags; - - public unsafe static void RemoveFlags(string cvarName, ulong flags) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _RemoveFlags(cvarNameBufferPtr, flags); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _GetValuePtr; + + public unsafe static nint GetValuePtr(string cvarName) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + var ret = _GetValuePtr(cvarNameBufferPtr); + return ret; + } } - } - - private unsafe static delegate* unmanaged _ClearFlags; - - public unsafe static void ClearFlags(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - _ClearFlags(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); + + private unsafe static delegate* unmanaged _SetValuePtr; + + public unsafe static void SetValuePtr(string cvarName, nint value) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + _SetValuePtr(cvarNameBufferPtr, value); + } } - } - - private unsafe static delegate* unmanaged _GetFlags; - - public unsafe static ulong GetFlags(string cvarName) { - var pool = ArrayPool.Shared; - var cvarNameLength = Encoding.UTF8.GetByteCount(cvarName); - var cvarNameBuffer = pool.Rent(cvarNameLength + 1); - Encoding.UTF8.GetBytes(cvarName, cvarNameBuffer); - cvarNameBuffer[cvarNameLength] = 0; - fixed (byte* cvarNameBufferPtr = cvarNameBuffer) { - var ret = _GetFlags(cvarNameBufferPtr); - pool.Return(cvarNameBuffer); - return ret; + + private unsafe static delegate* unmanaged _SetValueInternalPtr; + + public unsafe static void SetValueInternalPtr(string cvarName, nint value) + { + byte[] cvarNameBuffer = Encoding.UTF8.GetBytes(cvarName + "\0"); + fixed (byte* cvarNameBufferPtr = cvarNameBuffer) + { + _SetValueInternalPtr(cvarNameBufferPtr, value); + } } - } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/Database.cs b/managed/src/SwiftlyS2.Generated/Natives/Database.cs index 08c9a9c3a..616a67337 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/Database.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/Database.cs @@ -1,77 +1,68 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeDatabase { - private static int _MainThreadID; +internal static class NativeDatabase +{ + private static int _MainThreadID; - private unsafe static delegate* unmanaged _GetDefaultConnection; + private unsafe static delegate* unmanaged _GetDefaultConnection; - public unsafe static string GetDefaultConnection() { - var ret = _GetDefaultConnection(null); - var pool = ArrayPool.Shared; - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetDefaultConnection(retBufferPtr); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - return retString; + public unsafe static string GetDefaultConnection() + { + var ret = _GetDefaultConnection(null); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetDefaultConnection(retBufferPtr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } } - } - private unsafe static delegate* unmanaged _GetDefaultConnectionCredentials; + private unsafe static delegate* unmanaged _GetDefaultConnectionCredentials; - public unsafe static string GetDefaultConnectionCredentials() { - var ret = _GetDefaultConnectionCredentials(null); - var pool = ArrayPool.Shared; - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetDefaultConnectionCredentials(retBufferPtr); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - return retString; + public unsafe static string GetDefaultConnectionCredentials() + { + var ret = _GetDefaultConnectionCredentials(null); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetDefaultConnectionCredentials(retBufferPtr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } } - } - private unsafe static delegate* unmanaged _GetCredentials; + private unsafe static delegate* unmanaged _GetCredentials; - public unsafe static string GetCredentials(string connectionName) { - var pool = ArrayPool.Shared; - var connectionNameLength = Encoding.UTF8.GetByteCount(connectionName); - var connectionNameBuffer = pool.Rent(connectionNameLength + 1); - Encoding.UTF8.GetBytes(connectionName, connectionNameBuffer); - connectionNameBuffer[connectionNameLength] = 0; - fixed (byte* connectionNameBufferPtr = connectionNameBuffer) { - var ret = _GetCredentials(null, connectionNameBufferPtr); - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetCredentials(retBufferPtr, connectionNameBufferPtr); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - pool.Return(connectionNameBuffer); - return retString; - } + public unsafe static string GetCredentials(string connectionName) + { + byte[] connectionNameBuffer = Encoding.UTF8.GetBytes(connectionName + "\0"); + fixed (byte* connectionNameBufferPtr = connectionNameBuffer) + { + var ret = _GetCredentials(null, connectionNameBufferPtr); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetCredentials(retBufferPtr, connectionNameBufferPtr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } + } } - } - private unsafe static delegate* unmanaged _ConnectionExists; + private unsafe static delegate* unmanaged _ConnectionExists; - public unsafe static bool ConnectionExists(string connectionName) { - var pool = ArrayPool.Shared; - var connectionNameLength = Encoding.UTF8.GetByteCount(connectionName); - var connectionNameBuffer = pool.Rent(connectionNameLength + 1); - Encoding.UTF8.GetBytes(connectionName, connectionNameBuffer); - connectionNameBuffer[connectionNameLength] = 0; - fixed (byte* connectionNameBufferPtr = connectionNameBuffer) { - var ret = _ConnectionExists(connectionNameBufferPtr); - pool.Return(connectionNameBuffer); - return ret == 1; + public unsafe static bool ConnectionExists(string connectionName) + { + byte[] connectionNameBuffer = Encoding.UTF8.GetBytes(connectionName + "\0"); + fixed (byte* connectionNameBufferPtr = connectionNameBuffer) + { + var ret = _ConnectionExists(connectionNameBufferPtr); + return ret == 1; + } } - } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/EngineHelpers.cs b/managed/src/SwiftlyS2.Generated/Natives/EngineHelpers.cs index c22b102a0..8e924dda2 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/EngineHelpers.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/EngineHelpers.cs @@ -1,158 +1,156 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeEngineHelpers { - private static int _MainThreadID; - - private unsafe static delegate* unmanaged _IsMapValid; - - /// - /// it can be map name, or workshop id - /// - public unsafe static bool IsMapValid(string map_name) { - var pool = ArrayPool.Shared; - var map_nameLength = Encoding.UTF8.GetByteCount(map_name); - var map_nameBuffer = pool.Rent(map_nameLength + 1); - Encoding.UTF8.GetBytes(map_name, map_nameBuffer); - map_nameBuffer[map_nameLength] = 0; - fixed (byte* map_nameBufferPtr = map_nameBuffer) { - var ret = _IsMapValid(map_nameBufferPtr); - pool.Return(map_nameBuffer); - return ret == 1; +internal static class NativeEngineHelpers +{ + private static int _MainThreadID; + + private unsafe static delegate* unmanaged _GetIP; + + public unsafe static string GetIP() + { + var ret = _GetIP(null); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetIP(retBufferPtr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } } - } - - private unsafe static delegate* unmanaged _ExecuteCommand; - - public unsafe static void ExecuteCommand(string command) { - var pool = ArrayPool.Shared; - var commandLength = Encoding.UTF8.GetByteCount(command); - var commandBuffer = pool.Rent(commandLength + 1); - Encoding.UTF8.GetBytes(command, commandBuffer); - commandBuffer[commandLength] = 0; - fixed (byte* commandBufferPtr = commandBuffer) { - _ExecuteCommand(commandBufferPtr); - pool.Return(commandBuffer); + + private unsafe static delegate* unmanaged _IsMapValid; + + /// + /// it can be map name, or workshop id + /// + public unsafe static bool IsMapValid(string map_name) + { + byte[] map_nameBuffer = Encoding.UTF8.GetBytes(map_name + "\0"); + fixed (byte* map_nameBufferPtr = map_nameBuffer) + { + var ret = _IsMapValid(map_nameBufferPtr); + return ret == 1; + } } - } - - private unsafe static delegate* unmanaged _FindGameSystemByName; - - public unsafe static nint FindGameSystemByName(string name) { - var pool = ArrayPool.Shared; - var nameLength = Encoding.UTF8.GetByteCount(name); - var nameBuffer = pool.Rent(nameLength + 1); - Encoding.UTF8.GetBytes(name, nameBuffer); - nameBuffer[nameLength] = 0; - fixed (byte* nameBufferPtr = nameBuffer) { - var ret = _FindGameSystemByName(nameBufferPtr); - pool.Return(nameBuffer); - return ret; + + private unsafe static delegate* unmanaged _ExecuteCommand; + + public unsafe static void ExecuteCommand(string command) + { + byte[] commandBuffer = Encoding.UTF8.GetBytes(command + "\0"); + fixed (byte* commandBufferPtr = commandBuffer) + { + _ExecuteCommand(commandBufferPtr); + } } - } - - private unsafe static delegate* unmanaged _SendMessageToConsole; - - public unsafe static void SendMessageToConsole(string msg) { - var pool = ArrayPool.Shared; - var msgLength = Encoding.UTF8.GetByteCount(msg); - var msgBuffer = pool.Rent(msgLength + 1); - Encoding.UTF8.GetBytes(msg, msgBuffer); - msgBuffer[msgLength] = 0; - fixed (byte* msgBufferPtr = msgBuffer) { - _SendMessageToConsole(msgBufferPtr); - pool.Return(msgBuffer); + + private unsafe static delegate* unmanaged _FindGameSystemByName; + + public unsafe static nint FindGameSystemByName(string name) + { + byte[] nameBuffer = Encoding.UTF8.GetBytes(name + "\0"); + fixed (byte* nameBufferPtr = nameBuffer) + { + var ret = _FindGameSystemByName(nameBufferPtr); + return ret; + } } - } - - private unsafe static delegate* unmanaged _GetTraceManager; - - public unsafe static nint GetTraceManager() { - var ret = _GetTraceManager(); - return ret; - } - - private unsafe static delegate* unmanaged _GetCurrentGame; - - public unsafe static string GetCurrentGame() { - var ret = _GetCurrentGame(null); - var pool = ArrayPool.Shared; - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetCurrentGame(retBufferPtr); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - return retString; + + private unsafe static delegate* unmanaged _SendMessageToConsole; + + public unsafe static void SendMessageToConsole(string msg) + { + byte[] msgBuffer = Encoding.UTF8.GetBytes(msg + "\0"); + fixed (byte* msgBufferPtr = msgBuffer) + { + _SendMessageToConsole(msgBufferPtr); + } } - } - - private unsafe static delegate* unmanaged _GetNativeVersion; - - public unsafe static string GetNativeVersion() { - var ret = _GetNativeVersion(null); - var pool = ArrayPool.Shared; - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetNativeVersion(retBufferPtr); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - return retString; + + private unsafe static delegate* unmanaged _GetTraceManager; + + public unsafe static nint GetTraceManager() + { + var ret = _GetTraceManager(); + return ret; } - } - - private unsafe static delegate* unmanaged _GetMenuSettings; - - public unsafe static string GetMenuSettings() { - var ret = _GetMenuSettings(null); - var pool = ArrayPool.Shared; - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetMenuSettings(retBufferPtr); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - return retString; + + private unsafe static delegate* unmanaged _GetCurrentGame; + + public unsafe static string GetCurrentGame() + { + var ret = _GetCurrentGame(null); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetCurrentGame(retBufferPtr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } } - } - - private unsafe static delegate* unmanaged _GetGlobalVars; - - public unsafe static nint GetGlobalVars() { - var ret = _GetGlobalVars(); - return ret; - } - - private unsafe static delegate* unmanaged _GetCSGODirectoryPath; - - public unsafe static string GetCSGODirectoryPath() { - var ret = _GetCSGODirectoryPath(null); - var pool = ArrayPool.Shared; - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetCSGODirectoryPath(retBufferPtr); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - return retString; + + private unsafe static delegate* unmanaged _GetNativeVersion; + + public unsafe static string GetNativeVersion() + { + var ret = _GetNativeVersion(null); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetNativeVersion(retBufferPtr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } + } + + private unsafe static delegate* unmanaged _GetMenuSettings; + + public unsafe static string GetMenuSettings() + { + var ret = _GetMenuSettings(null); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetMenuSettings(retBufferPtr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } } - } - - private unsafe static delegate* unmanaged _GetGameDirectoryPath; - - public unsafe static string GetGameDirectoryPath() { - var ret = _GetGameDirectoryPath(null); - var pool = ArrayPool.Shared; - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetGameDirectoryPath(retBufferPtr); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - return retString; + + private unsafe static delegate* unmanaged _GetGlobalVars; + + public unsafe static nint GetGlobalVars() + { + var ret = _GetGlobalVars(); + return ret; + } + + private unsafe static delegate* unmanaged _GetCSGODirectoryPath; + + public unsafe static string GetCSGODirectoryPath() + { + var ret = _GetCSGODirectoryPath(null); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetCSGODirectoryPath(retBufferPtr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } + } + + private unsafe static delegate* unmanaged _GetGameDirectoryPath; + + public unsafe static string GetGameDirectoryPath() + { + var ret = _GetGameDirectoryPath(null); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetGameDirectoryPath(retBufferPtr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } } - } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/EntitySystem.cs b/managed/src/SwiftlyS2.Generated/Natives/EntitySystem.cs index 3dfdc1d6d..78a5b3473 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/EntitySystem.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/EntitySystem.cs @@ -1,365 +1,313 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeEntitySystem { - private static int _MainThreadID; +internal static class NativeEntitySystem +{ + private static int _MainThreadID; - private unsafe static delegate* unmanaged _Spawn; + private unsafe static delegate* unmanaged _Spawn; - public unsafe static void Spawn(nint entity, nint keyvalues) { - _Spawn(entity, keyvalues); - } + public unsafe static void Spawn(nint entity, nint keyvalues) + { + _Spawn(entity, keyvalues); + } - private unsafe static delegate* unmanaged _Despawn; + private unsafe static delegate* unmanaged _Despawn; - public unsafe static void Despawn(nint entity) { - _Despawn(entity); - } + public unsafe static void Despawn(nint entity) + { + _Despawn(entity); + } - private unsafe static delegate* unmanaged _CreateEntityByName; + private unsafe static delegate* unmanaged _CreateEntityByName; - public unsafe static nint CreateEntityByName(string name) { - var pool = ArrayPool.Shared; - var nameLength = Encoding.UTF8.GetByteCount(name); - var nameBuffer = pool.Rent(nameLength + 1); - Encoding.UTF8.GetBytes(name, nameBuffer); - nameBuffer[nameLength] = 0; - fixed (byte* nameBufferPtr = nameBuffer) { - var ret = _CreateEntityByName(nameBufferPtr); - pool.Return(nameBuffer); - return ret; + public unsafe static nint CreateEntityByName(string name) + { + byte[] nameBuffer = Encoding.UTF8.GetBytes(name + "\0"); + fixed (byte* nameBufferPtr = nameBuffer) + { + var ret = _CreateEntityByName(nameBufferPtr); + return ret; + } } - } - - private unsafe static delegate* unmanaged _AcceptInputInt32; - - public unsafe static void AcceptInputInt32(nint entity, string input, nint activator, nint caller, int value, int outputID) { - var pool = ArrayPool.Shared; - var inputLength = Encoding.UTF8.GetByteCount(input); - var inputBuffer = pool.Rent(inputLength + 1); - Encoding.UTF8.GetBytes(input, inputBuffer); - inputBuffer[inputLength] = 0; - fixed (byte* inputBufferPtr = inputBuffer) { - _AcceptInputInt32(entity, inputBufferPtr, activator, caller, value, outputID); - pool.Return(inputBuffer); + + private unsafe static delegate* unmanaged _AcceptInputInt32; + + public unsafe static void AcceptInputInt32(nint entity, string input, nint activator, nint caller, int value, int outputID) + { + byte[] inputBuffer = Encoding.UTF8.GetBytes(input + "\0"); + fixed (byte* inputBufferPtr = inputBuffer) + { + _AcceptInputInt32(entity, inputBufferPtr, activator, caller, value, outputID); + } } - } - - private unsafe static delegate* unmanaged _AcceptInputUInt32; - - public unsafe static void AcceptInputUInt32(nint entity, string input, nint activator, nint caller, uint value, int outputID) { - var pool = ArrayPool.Shared; - var inputLength = Encoding.UTF8.GetByteCount(input); - var inputBuffer = pool.Rent(inputLength + 1); - Encoding.UTF8.GetBytes(input, inputBuffer); - inputBuffer[inputLength] = 0; - fixed (byte* inputBufferPtr = inputBuffer) { - _AcceptInputUInt32(entity, inputBufferPtr, activator, caller, value, outputID); - pool.Return(inputBuffer); + + private unsafe static delegate* unmanaged _AcceptInputUInt32; + + public unsafe static void AcceptInputUInt32(nint entity, string input, nint activator, nint caller, uint value, int outputID) + { + byte[] inputBuffer = Encoding.UTF8.GetBytes(input + "\0"); + fixed (byte* inputBufferPtr = inputBuffer) + { + _AcceptInputUInt32(entity, inputBufferPtr, activator, caller, value, outputID); + } } - } - - private unsafe static delegate* unmanaged _AcceptInputInt64; - - public unsafe static void AcceptInputInt64(nint entity, string input, nint activator, nint caller, long value, int outputID) { - var pool = ArrayPool.Shared; - var inputLength = Encoding.UTF8.GetByteCount(input); - var inputBuffer = pool.Rent(inputLength + 1); - Encoding.UTF8.GetBytes(input, inputBuffer); - inputBuffer[inputLength] = 0; - fixed (byte* inputBufferPtr = inputBuffer) { - _AcceptInputInt64(entity, inputBufferPtr, activator, caller, value, outputID); - pool.Return(inputBuffer); + + private unsafe static delegate* unmanaged _AcceptInputInt64; + + public unsafe static void AcceptInputInt64(nint entity, string input, nint activator, nint caller, long value, int outputID) + { + byte[] inputBuffer = Encoding.UTF8.GetBytes(input + "\0"); + fixed (byte* inputBufferPtr = inputBuffer) + { + _AcceptInputInt64(entity, inputBufferPtr, activator, caller, value, outputID); + } } - } - - private unsafe static delegate* unmanaged _AcceptInputUInt64; - - public unsafe static void AcceptInputUInt64(nint entity, string input, nint activator, nint caller, ulong value, int outputID) { - var pool = ArrayPool.Shared; - var inputLength = Encoding.UTF8.GetByteCount(input); - var inputBuffer = pool.Rent(inputLength + 1); - Encoding.UTF8.GetBytes(input, inputBuffer); - inputBuffer[inputLength] = 0; - fixed (byte* inputBufferPtr = inputBuffer) { - _AcceptInputUInt64(entity, inputBufferPtr, activator, caller, value, outputID); - pool.Return(inputBuffer); + + private unsafe static delegate* unmanaged _AcceptInputUInt64; + + public unsafe static void AcceptInputUInt64(nint entity, string input, nint activator, nint caller, ulong value, int outputID) + { + byte[] inputBuffer = Encoding.UTF8.GetBytes(input + "\0"); + fixed (byte* inputBufferPtr = inputBuffer) + { + _AcceptInputUInt64(entity, inputBufferPtr, activator, caller, value, outputID); + } } - } - - private unsafe static delegate* unmanaged _AcceptInputFloat; - - public unsafe static void AcceptInputFloat(nint entity, string input, nint activator, nint caller, float value, int outputID) { - var pool = ArrayPool.Shared; - var inputLength = Encoding.UTF8.GetByteCount(input); - var inputBuffer = pool.Rent(inputLength + 1); - Encoding.UTF8.GetBytes(input, inputBuffer); - inputBuffer[inputLength] = 0; - fixed (byte* inputBufferPtr = inputBuffer) { - _AcceptInputFloat(entity, inputBufferPtr, activator, caller, value, outputID); - pool.Return(inputBuffer); + + private unsafe static delegate* unmanaged _AcceptInputFloat; + + public unsafe static void AcceptInputFloat(nint entity, string input, nint activator, nint caller, float value, int outputID) + { + byte[] inputBuffer = Encoding.UTF8.GetBytes(input + "\0"); + fixed (byte* inputBufferPtr = inputBuffer) + { + _AcceptInputFloat(entity, inputBufferPtr, activator, caller, value, outputID); + } } - } - - private unsafe static delegate* unmanaged _AcceptInputDouble; - - public unsafe static void AcceptInputDouble(nint entity, string input, nint activator, nint caller, double value, int outputID) { - var pool = ArrayPool.Shared; - var inputLength = Encoding.UTF8.GetByteCount(input); - var inputBuffer = pool.Rent(inputLength + 1); - Encoding.UTF8.GetBytes(input, inputBuffer); - inputBuffer[inputLength] = 0; - fixed (byte* inputBufferPtr = inputBuffer) { - _AcceptInputDouble(entity, inputBufferPtr, activator, caller, value, outputID); - pool.Return(inputBuffer); + + private unsafe static delegate* unmanaged _AcceptInputDouble; + + public unsafe static void AcceptInputDouble(nint entity, string input, nint activator, nint caller, double value, int outputID) + { + byte[] inputBuffer = Encoding.UTF8.GetBytes(input + "\0"); + fixed (byte* inputBufferPtr = inputBuffer) + { + _AcceptInputDouble(entity, inputBufferPtr, activator, caller, value, outputID); + } } - } - - private unsafe static delegate* unmanaged _AcceptInputBool; - - public unsafe static void AcceptInputBool(nint entity, string input, nint activator, nint caller, bool value, int outputID) { - var pool = ArrayPool.Shared; - var inputLength = Encoding.UTF8.GetByteCount(input); - var inputBuffer = pool.Rent(inputLength + 1); - Encoding.UTF8.GetBytes(input, inputBuffer); - inputBuffer[inputLength] = 0; - fixed (byte* inputBufferPtr = inputBuffer) { - _AcceptInputBool(entity, inputBufferPtr, activator, caller, value ? (byte)1 : (byte)0, outputID); - pool.Return(inputBuffer); + + private unsafe static delegate* unmanaged _AcceptInputBool; + + public unsafe static void AcceptInputBool(nint entity, string input, nint activator, nint caller, bool value, int outputID) + { + byte[] inputBuffer = Encoding.UTF8.GetBytes(input + "\0"); + fixed (byte* inputBufferPtr = inputBuffer) + { + _AcceptInputBool(entity, inputBufferPtr, activator, caller, value ? (byte)1 : (byte)0, outputID); + } } - } - - private unsafe static delegate* unmanaged _AcceptInputString; - - public unsafe static void AcceptInputString(nint entity, string input, nint activator, nint caller, string value, int outputID) { - var pool = ArrayPool.Shared; - var inputLength = Encoding.UTF8.GetByteCount(input); - var inputBuffer = pool.Rent(inputLength + 1); - Encoding.UTF8.GetBytes(input, inputBuffer); - inputBuffer[inputLength] = 0; - var valueLength = Encoding.UTF8.GetByteCount(value); - var valueBuffer = pool.Rent(valueLength + 1); - Encoding.UTF8.GetBytes(value, valueBuffer); - valueBuffer[valueLength] = 0; - fixed (byte* inputBufferPtr = inputBuffer) { - fixed (byte* valueBufferPtr = valueBuffer) { - _AcceptInputString(entity, inputBufferPtr, activator, caller, valueBufferPtr, outputID); - pool.Return(inputBuffer); - pool.Return(valueBuffer); - } + + private unsafe static delegate* unmanaged _AcceptInputString; + + public unsafe static void AcceptInputString(nint entity, string input, nint activator, nint caller, string value, int outputID) + { + byte[] inputBuffer = Encoding.UTF8.GetBytes(input + "\0"); + byte[] valueBuffer = Encoding.UTF8.GetBytes(value + "\0"); + fixed (byte* inputBufferPtr = inputBuffer) + { + fixed (byte* valueBufferPtr = valueBuffer) + { + _AcceptInputString(entity, inputBufferPtr, activator, caller, valueBufferPtr, outputID); + } + } } - } - - private unsafe static delegate* unmanaged _AddEntityIOEventInt32; - - public unsafe static void AddEntityIOEventInt32(nint entity, string input, nint activator, nint caller, int value, float delay) { - var pool = ArrayPool.Shared; - var inputLength = Encoding.UTF8.GetByteCount(input); - var inputBuffer = pool.Rent(inputLength + 1); - Encoding.UTF8.GetBytes(input, inputBuffer); - inputBuffer[inputLength] = 0; - fixed (byte* inputBufferPtr = inputBuffer) { - _AddEntityIOEventInt32(entity, inputBufferPtr, activator, caller, value, delay); - pool.Return(inputBuffer); + + private unsafe static delegate* unmanaged _AddEntityIOEventInt32; + + public unsafe static void AddEntityIOEventInt32(nint entity, string input, nint activator, nint caller, int value, float delay) + { + byte[] inputBuffer = Encoding.UTF8.GetBytes(input + "\0"); + fixed (byte* inputBufferPtr = inputBuffer) + { + _AddEntityIOEventInt32(entity, inputBufferPtr, activator, caller, value, delay); + } } - } - - private unsafe static delegate* unmanaged _AddEntityIOEventUInt32; - - public unsafe static void AddEntityIOEventUInt32(nint entity, string input, nint activator, nint caller, uint value, float delay) { - var pool = ArrayPool.Shared; - var inputLength = Encoding.UTF8.GetByteCount(input); - var inputBuffer = pool.Rent(inputLength + 1); - Encoding.UTF8.GetBytes(input, inputBuffer); - inputBuffer[inputLength] = 0; - fixed (byte* inputBufferPtr = inputBuffer) { - _AddEntityIOEventUInt32(entity, inputBufferPtr, activator, caller, value, delay); - pool.Return(inputBuffer); + + private unsafe static delegate* unmanaged _AddEntityIOEventUInt32; + + public unsafe static void AddEntityIOEventUInt32(nint entity, string input, nint activator, nint caller, uint value, float delay) + { + byte[] inputBuffer = Encoding.UTF8.GetBytes(input + "\0"); + fixed (byte* inputBufferPtr = inputBuffer) + { + _AddEntityIOEventUInt32(entity, inputBufferPtr, activator, caller, value, delay); + } } - } - - private unsafe static delegate* unmanaged _AddEntityIOEventInt64; - - public unsafe static void AddEntityIOEventInt64(nint entity, string input, nint activator, nint caller, long value, float delay) { - var pool = ArrayPool.Shared; - var inputLength = Encoding.UTF8.GetByteCount(input); - var inputBuffer = pool.Rent(inputLength + 1); - Encoding.UTF8.GetBytes(input, inputBuffer); - inputBuffer[inputLength] = 0; - fixed (byte* inputBufferPtr = inputBuffer) { - _AddEntityIOEventInt64(entity, inputBufferPtr, activator, caller, value, delay); - pool.Return(inputBuffer); + + private unsafe static delegate* unmanaged _AddEntityIOEventInt64; + + public unsafe static void AddEntityIOEventInt64(nint entity, string input, nint activator, nint caller, long value, float delay) + { + byte[] inputBuffer = Encoding.UTF8.GetBytes(input + "\0"); + fixed (byte* inputBufferPtr = inputBuffer) + { + _AddEntityIOEventInt64(entity, inputBufferPtr, activator, caller, value, delay); + } } - } - - private unsafe static delegate* unmanaged _AddEntityIOEventUInt64; - - public unsafe static void AddEntityIOEventUInt64(nint entity, string input, nint activator, nint caller, ulong value, float delay) { - var pool = ArrayPool.Shared; - var inputLength = Encoding.UTF8.GetByteCount(input); - var inputBuffer = pool.Rent(inputLength + 1); - Encoding.UTF8.GetBytes(input, inputBuffer); - inputBuffer[inputLength] = 0; - fixed (byte* inputBufferPtr = inputBuffer) { - _AddEntityIOEventUInt64(entity, inputBufferPtr, activator, caller, value, delay); - pool.Return(inputBuffer); + + private unsafe static delegate* unmanaged _AddEntityIOEventUInt64; + + public unsafe static void AddEntityIOEventUInt64(nint entity, string input, nint activator, nint caller, ulong value, float delay) + { + byte[] inputBuffer = Encoding.UTF8.GetBytes(input + "\0"); + fixed (byte* inputBufferPtr = inputBuffer) + { + _AddEntityIOEventUInt64(entity, inputBufferPtr, activator, caller, value, delay); + } } - } - - private unsafe static delegate* unmanaged _AddEntityIOEventFloat; - - public unsafe static void AddEntityIOEventFloat(nint entity, string input, nint activator, nint caller, float value, float delay) { - var pool = ArrayPool.Shared; - var inputLength = Encoding.UTF8.GetByteCount(input); - var inputBuffer = pool.Rent(inputLength + 1); - Encoding.UTF8.GetBytes(input, inputBuffer); - inputBuffer[inputLength] = 0; - fixed (byte* inputBufferPtr = inputBuffer) { - _AddEntityIOEventFloat(entity, inputBufferPtr, activator, caller, value, delay); - pool.Return(inputBuffer); + + private unsafe static delegate* unmanaged _AddEntityIOEventFloat; + + public unsafe static void AddEntityIOEventFloat(nint entity, string input, nint activator, nint caller, float value, float delay) + { + byte[] inputBuffer = Encoding.UTF8.GetBytes(input + "\0"); + fixed (byte* inputBufferPtr = inputBuffer) + { + _AddEntityIOEventFloat(entity, inputBufferPtr, activator, caller, value, delay); + } } - } - - private unsafe static delegate* unmanaged _AddEntityIOEventDouble; - - public unsafe static void AddEntityIOEventDouble(nint entity, string input, nint activator, nint caller, double value, float delay) { - var pool = ArrayPool.Shared; - var inputLength = Encoding.UTF8.GetByteCount(input); - var inputBuffer = pool.Rent(inputLength + 1); - Encoding.UTF8.GetBytes(input, inputBuffer); - inputBuffer[inputLength] = 0; - fixed (byte* inputBufferPtr = inputBuffer) { - _AddEntityIOEventDouble(entity, inputBufferPtr, activator, caller, value, delay); - pool.Return(inputBuffer); + + private unsafe static delegate* unmanaged _AddEntityIOEventDouble; + + public unsafe static void AddEntityIOEventDouble(nint entity, string input, nint activator, nint caller, double value, float delay) + { + byte[] inputBuffer = Encoding.UTF8.GetBytes(input + "\0"); + fixed (byte* inputBufferPtr = inputBuffer) + { + _AddEntityIOEventDouble(entity, inputBufferPtr, activator, caller, value, delay); + } } - } - - private unsafe static delegate* unmanaged _AddEntityIOEventBool; - - public unsafe static void AddEntityIOEventBool(nint entity, string input, nint activator, nint caller, bool value, float delay) { - var pool = ArrayPool.Shared; - var inputLength = Encoding.UTF8.GetByteCount(input); - var inputBuffer = pool.Rent(inputLength + 1); - Encoding.UTF8.GetBytes(input, inputBuffer); - inputBuffer[inputLength] = 0; - fixed (byte* inputBufferPtr = inputBuffer) { - _AddEntityIOEventBool(entity, inputBufferPtr, activator, caller, value ? (byte)1 : (byte)0, delay); - pool.Return(inputBuffer); + + private unsafe static delegate* unmanaged _AddEntityIOEventBool; + + public unsafe static void AddEntityIOEventBool(nint entity, string input, nint activator, nint caller, bool value, float delay) + { + byte[] inputBuffer = Encoding.UTF8.GetBytes(input + "\0"); + fixed (byte* inputBufferPtr = inputBuffer) + { + _AddEntityIOEventBool(entity, inputBufferPtr, activator, caller, value ? (byte)1 : (byte)0, delay); + } } - } - - private unsafe static delegate* unmanaged _AddEntityIOEventString; - - public unsafe static void AddEntityIOEventString(nint entity, string input, nint activator, nint caller, string value, float delay) { - var pool = ArrayPool.Shared; - var inputLength = Encoding.UTF8.GetByteCount(input); - var inputBuffer = pool.Rent(inputLength + 1); - Encoding.UTF8.GetBytes(input, inputBuffer); - inputBuffer[inputLength] = 0; - var valueLength = Encoding.UTF8.GetByteCount(value); - var valueBuffer = pool.Rent(valueLength + 1); - Encoding.UTF8.GetBytes(value, valueBuffer); - valueBuffer[valueLength] = 0; - fixed (byte* inputBufferPtr = inputBuffer) { - fixed (byte* valueBufferPtr = valueBuffer) { - _AddEntityIOEventString(entity, inputBufferPtr, activator, caller, valueBufferPtr, delay); - pool.Return(inputBuffer); - pool.Return(valueBuffer); - } + + private unsafe static delegate* unmanaged _AddEntityIOEventString; + + public unsafe static void AddEntityIOEventString(nint entity, string input, nint activator, nint caller, string value, float delay) + { + byte[] inputBuffer = Encoding.UTF8.GetBytes(input + "\0"); + byte[] valueBuffer = Encoding.UTF8.GetBytes(value + "\0"); + fixed (byte* inputBufferPtr = inputBuffer) + { + fixed (byte* valueBufferPtr = valueBuffer) + { + _AddEntityIOEventString(entity, inputBufferPtr, activator, caller, valueBufferPtr, delay); + } + } + } + + private unsafe static delegate* unmanaged _IsValidEntity; + + public unsafe static bool IsValidEntity(nint entity) + { + var ret = _IsValidEntity(entity); + return ret == 1; + } + + private unsafe static delegate* unmanaged _GetGameRules; + + public unsafe static nint GetGameRules() + { + var ret = _GetGameRules(); + return ret; + } + + private unsafe static delegate* unmanaged _GetEntitySystem; + + public unsafe static nint GetEntitySystem() + { + var ret = _GetEntitySystem(); + return ret; + } + + private unsafe static delegate* unmanaged _EntityHandleIsValid; + + public unsafe static bool EntityHandleIsValid(uint handle) + { + var ret = _EntityHandleIsValid(handle); + return ret == 1; } - } - - private unsafe static delegate* unmanaged _IsValidEntity; - - public unsafe static bool IsValidEntity(nint entity) { - var ret = _IsValidEntity(entity); - return ret == 1; - } - - private unsafe static delegate* unmanaged _GetGameRules; - - public unsafe static nint GetGameRules() { - var ret = _GetGameRules(); - return ret; - } - - private unsafe static delegate* unmanaged _GetEntitySystem; - - public unsafe static nint GetEntitySystem() { - var ret = _GetEntitySystem(); - return ret; - } - - private unsafe static delegate* unmanaged _EntityHandleIsValid; - - public unsafe static bool EntityHandleIsValid(uint handle) { - var ret = _EntityHandleIsValid(handle); - return ret == 1; - } - - private unsafe static delegate* unmanaged _EntityHandleGet; - - public unsafe static nint EntityHandleGet(uint handle) { - var ret = _EntityHandleGet(handle); - return ret; - } - - private unsafe static delegate* unmanaged _GetEntityHandleFromEntity; - - public unsafe static uint GetEntityHandleFromEntity(nint entity) { - var ret = _GetEntityHandleFromEntity(entity); - return ret; - } - - private unsafe static delegate* unmanaged _GetFirstActiveEntity; - - public unsafe static nint GetFirstActiveEntity() { - var ret = _GetFirstActiveEntity(); - return ret; - } - - private unsafe static delegate* unmanaged _HookEntityOutput; - - /// - /// CEntityIOOutput*, string outputName, CEntityInstance* activator, CEntityInstance* caller, float delay -> int (HookResult) - /// - public unsafe static ulong HookEntityOutput(string className, string outputName, nint callback) { - var pool = ArrayPool.Shared; - var classNameLength = Encoding.UTF8.GetByteCount(className); - var classNameBuffer = pool.Rent(classNameLength + 1); - Encoding.UTF8.GetBytes(className, classNameBuffer); - classNameBuffer[classNameLength] = 0; - var outputNameLength = Encoding.UTF8.GetByteCount(outputName); - var outputNameBuffer = pool.Rent(outputNameLength + 1); - Encoding.UTF8.GetBytes(outputName, outputNameBuffer); - outputNameBuffer[outputNameLength] = 0; - fixed (byte* classNameBufferPtr = classNameBuffer) { - fixed (byte* outputNameBufferPtr = outputNameBuffer) { - var ret = _HookEntityOutput(classNameBufferPtr, outputNameBufferPtr, callback); - pool.Return(classNameBuffer); - pool.Return(outputNameBuffer); + + private unsafe static delegate* unmanaged _EntityHandleGet; + + public unsafe static nint EntityHandleGet(uint handle) + { + var ret = _EntityHandleGet(handle); return ret; - } } - } - private unsafe static delegate* unmanaged _UnhookEntityOutput; + private unsafe static delegate* unmanaged _GetEntityHandleFromEntity; + + public unsafe static uint GetEntityHandleFromEntity(nint entity) + { + var ret = _GetEntityHandleFromEntity(entity); + return ret; + } - public unsafe static void UnhookEntityOutput(ulong hookid) { - _UnhookEntityOutput(hookid); - } + private unsafe static delegate* unmanaged _GetFirstActiveEntity; - private unsafe static delegate* unmanaged _GetEntityByIndex; + public unsafe static nint GetFirstActiveEntity() + { + var ret = _GetFirstActiveEntity(); + return ret; + } - public unsafe static nint GetEntityByIndex(uint index) { - var ret = _GetEntityByIndex(index); - return ret; - } + private unsafe static delegate* unmanaged _HookEntityOutput; + + /// + /// CEntityIOOutput*, string outputName, CEntityInstance* activator, CEntityInstance* caller, float delay -> int (HookResult) + /// + public unsafe static ulong HookEntityOutput(string className, string outputName, nint callback) + { + byte[] classNameBuffer = Encoding.UTF8.GetBytes(className + "\0"); + byte[] outputNameBuffer = Encoding.UTF8.GetBytes(outputName + "\0"); + fixed (byte* classNameBufferPtr = classNameBuffer) + { + fixed (byte* outputNameBufferPtr = outputNameBuffer) + { + var ret = _HookEntityOutput(classNameBufferPtr, outputNameBufferPtr, callback); + return ret; + } + } + } + + private unsafe static delegate* unmanaged _UnhookEntityOutput; + + public unsafe static void UnhookEntityOutput(ulong hookid) + { + _UnhookEntityOutput(hookid); + } + + private unsafe static delegate* unmanaged _GetEntityByIndex; + + public unsafe static nint GetEntityByIndex(uint index) + { + var ret = _GetEntityByIndex(index); + return ret; + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/Events.cs b/managed/src/SwiftlyS2.Generated/Natives/Events.cs index fb0efce2f..2c0a6a721 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/Events.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/Events.cs @@ -1,157 +1,173 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeEvents { - private static int _MainThreadID; - - private unsafe static delegate* unmanaged _RegisterOnGameTickCallback; - - /// - /// bool simulating, bool first, bool last -> void - /// - public unsafe static void RegisterOnGameTickCallback(nint callback) { - _RegisterOnGameTickCallback(callback); - } - - private unsafe static delegate* unmanaged _RegisterOnClientConnectCallback; - - /// - /// int32 playerid -> bool (true -> ignored, false -> supercede) - /// - public unsafe static void RegisterOnClientConnectCallback(nint callback) { - _RegisterOnClientConnectCallback(callback); - } - - private unsafe static delegate* unmanaged _RegisterOnClientDisconnectCallback; - - /// - /// int32 playerid, ENetworkDisconnectReason (int32) reason -> void - /// - public unsafe static void RegisterOnClientDisconnectCallback(nint callback) { - _RegisterOnClientDisconnectCallback(callback); - } - - private unsafe static delegate* unmanaged _RegisterOnClientKeyStateChangedCallback; - - /// - /// int32 playerid, string key, bool pressed -> void - /// - public unsafe static void RegisterOnClientKeyStateChangedCallback(nint callback) { - _RegisterOnClientKeyStateChangedCallback(callback); - } - - private unsafe static delegate* unmanaged _RegisterOnClientProcessUsercmdsCallback; - - /// - /// int32 playerid, ptr* usercmds, int numcmds, bool paused, float margin -> void - /// - public unsafe static void RegisterOnClientProcessUsercmdsCallback(nint callback) { - _RegisterOnClientProcessUsercmdsCallback(callback); - } - - private unsafe static delegate* unmanaged _RegisterOnClientPutInServerCallback; - - /// - /// int32 playerid, int32 client_kind (0 -> player, 1 -> bot, 2 -> unknown) -> void - /// - public unsafe static void RegisterOnClientPutInServerCallback(nint callback) { - _RegisterOnClientPutInServerCallback(callback); - } - - private unsafe static delegate* unmanaged _RegisterOnClientSteamAuthorizeCallback; - - /// - /// int32 playerid -> void - /// - public unsafe static void RegisterOnClientSteamAuthorizeCallback(nint callback) { - _RegisterOnClientSteamAuthorizeCallback(callback); - } - - private unsafe static delegate* unmanaged _RegisterOnClientSteamAuthorizeFailCallback; - - /// - /// int32 playerid -> void - /// - public unsafe static void RegisterOnClientSteamAuthorizeFailCallback(nint callback) { - _RegisterOnClientSteamAuthorizeFailCallback(callback); - } - - private unsafe static delegate* unmanaged _RegisterOnEntityCreatedCallback; - - /// - /// CEntityInstance* entity - /// - public unsafe static void RegisterOnEntityCreatedCallback(nint callback) { - _RegisterOnEntityCreatedCallback(callback); - } - - private unsafe static delegate* unmanaged _RegisterOnEntityDeletedCallback; - - /// - /// CEntityInstance* entity - /// - public unsafe static void RegisterOnEntityDeletedCallback(nint callback) { - _RegisterOnEntityDeletedCallback(callback); - } - - private unsafe static delegate* unmanaged _RegisterOnEntityParentChangedCallback; - - /// - /// CEntityInstance* entity, CEntityInstance* newparent - /// - public unsafe static void RegisterOnEntityParentChangedCallback(nint callback) { - _RegisterOnEntityParentChangedCallback(callback); - } - - private unsafe static delegate* unmanaged _RegisterOnEntitySpawnedCallback; - - /// - /// CEntityInstance* entity - /// - public unsafe static void RegisterOnEntitySpawnedCallback(nint callback) { - _RegisterOnEntitySpawnedCallback(callback); - } - - private unsafe static delegate* unmanaged _RegisterOnMapLoadCallback; - - /// - /// string mapname - /// - public unsafe static void RegisterOnMapLoadCallback(nint callback) { - _RegisterOnMapLoadCallback(callback); - } - - private unsafe static delegate* unmanaged _RegisterOnMapUnloadCallback; - - /// - /// string mapname - /// - public unsafe static void RegisterOnMapUnloadCallback(nint callback) { - _RegisterOnMapUnloadCallback(callback); - } - - private unsafe static delegate* unmanaged _RegisterOnEntityTakeDamageCallback; - - /// - /// CBaseEntity* entity, CTakeDamageInfo* info -> bool (true -> ignored, false -> supercede) - /// - public unsafe static void RegisterOnEntityTakeDamageCallback(nint callback) { - _RegisterOnEntityTakeDamageCallback(callback); - } - - private unsafe static delegate* unmanaged _RegisterOnPrecacheResourceCallback; - - /// - /// IEntityResourceManifest* pResourceManifest - /// - public unsafe static void RegisterOnPrecacheResourceCallback(nint callback) { - _RegisterOnPrecacheResourceCallback(callback); - } +internal static class NativeEvents +{ + private static int _MainThreadID; + + private unsafe static delegate* unmanaged _RegisterOnGameTickCallback; + + /// + /// bool simulating, bool first, bool last -> void + /// + public unsafe static void RegisterOnGameTickCallback(nint callback) + { + _RegisterOnGameTickCallback(callback); + } + + private unsafe static delegate* unmanaged _RegisterOnClientConnectCallback; + + /// + /// int32 playerid -> bool (true -> ignored, false -> supercede) + /// + public unsafe static void RegisterOnClientConnectCallback(nint callback) + { + _RegisterOnClientConnectCallback(callback); + } + + private unsafe static delegate* unmanaged _RegisterOnClientDisconnectCallback; + + /// + /// int32 playerid, ENetworkDisconnectReason (int32) reason -> void + /// + public unsafe static void RegisterOnClientDisconnectCallback(nint callback) + { + _RegisterOnClientDisconnectCallback(callback); + } + + private unsafe static delegate* unmanaged _RegisterOnClientKeyStateChangedCallback; + + /// + /// int32 playerid, string key, bool pressed -> void + /// + public unsafe static void RegisterOnClientKeyStateChangedCallback(nint callback) + { + _RegisterOnClientKeyStateChangedCallback(callback); + } + + private unsafe static delegate* unmanaged _RegisterOnClientProcessUsercmdsCallback; + + /// + /// int32 playerid, ptr* usercmds, int numcmds, bool paused, float margin -> void + /// + public unsafe static void RegisterOnClientProcessUsercmdsCallback(nint callback) + { + _RegisterOnClientProcessUsercmdsCallback(callback); + } + + private unsafe static delegate* unmanaged _RegisterOnClientPutInServerCallback; + + /// + /// int32 playerid, int32 client_kind (0 -> player, 1 -> bot, 2 -> unknown) -> void + /// + public unsafe static void RegisterOnClientPutInServerCallback(nint callback) + { + _RegisterOnClientPutInServerCallback(callback); + } + + private unsafe static delegate* unmanaged _RegisterOnClientSteamAuthorizeCallback; + + /// + /// int32 playerid -> void + /// + public unsafe static void RegisterOnClientSteamAuthorizeCallback(nint callback) + { + _RegisterOnClientSteamAuthorizeCallback(callback); + } + + private unsafe static delegate* unmanaged _RegisterOnClientSteamAuthorizeFailCallback; + + /// + /// int32 playerid -> void + /// + public unsafe static void RegisterOnClientSteamAuthorizeFailCallback(nint callback) + { + _RegisterOnClientSteamAuthorizeFailCallback(callback); + } + + private unsafe static delegate* unmanaged _RegisterOnEntityCreatedCallback; + + /// + /// CEntityInstance* entity + /// + public unsafe static void RegisterOnEntityCreatedCallback(nint callback) + { + _RegisterOnEntityCreatedCallback(callback); + } + + private unsafe static delegate* unmanaged _RegisterOnEntityDeletedCallback; + + /// + /// CEntityInstance* entity + /// + public unsafe static void RegisterOnEntityDeletedCallback(nint callback) + { + _RegisterOnEntityDeletedCallback(callback); + } + + private unsafe static delegate* unmanaged _RegisterOnEntityParentChangedCallback; + + /// + /// CEntityInstance* entity, CEntityInstance* newparent + /// + public unsafe static void RegisterOnEntityParentChangedCallback(nint callback) + { + _RegisterOnEntityParentChangedCallback(callback); + } + + private unsafe static delegate* unmanaged _RegisterOnEntitySpawnedCallback; + + /// + /// CEntityInstance* entity + /// + public unsafe static void RegisterOnEntitySpawnedCallback(nint callback) + { + _RegisterOnEntitySpawnedCallback(callback); + } + + private unsafe static delegate* unmanaged _RegisterOnMapLoadCallback; + + /// + /// string mapname + /// + public unsafe static void RegisterOnMapLoadCallback(nint callback) + { + _RegisterOnMapLoadCallback(callback); + } + + private unsafe static delegate* unmanaged _RegisterOnMapUnloadCallback; + + /// + /// string mapname + /// + public unsafe static void RegisterOnMapUnloadCallback(nint callback) + { + _RegisterOnMapUnloadCallback(callback); + } + + private unsafe static delegate* unmanaged _RegisterOnEntityTakeDamageCallback; + + /// + /// CBaseEntity* entity, CTakeDamageInfo* info -> bool (true -> ignored, false -> supercede) + /// + public unsafe static void RegisterOnEntityTakeDamageCallback(nint callback) + { + _RegisterOnEntityTakeDamageCallback(callback); + } + + private unsafe static delegate* unmanaged _RegisterOnPrecacheResourceCallback; + + /// + /// IEntityResourceManifest* pResourceManifest + /// + public unsafe static void RegisterOnPrecacheResourceCallback(nint callback) + { + _RegisterOnPrecacheResourceCallback(callback); + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/FileSystem.cs b/managed/src/SwiftlyS2.Generated/Natives/FileSystem.cs new file mode 100644 index 000000000..134a76b5f --- /dev/null +++ b/managed/src/SwiftlyS2.Generated/Natives/FileSystem.cs @@ -0,0 +1,205 @@ +#pragma warning disable CS0649 +#pragma warning disable CS0169 + +using System.Text; +using System.Threading; +using SwiftlyS2.Shared.Natives; + +namespace SwiftlyS2.Core.Natives; + +internal static class NativeFileSystem +{ + private static int _MainThreadID; + + private unsafe static delegate* unmanaged _GetSearchPath; + + public unsafe static string GetSearchPath(string pathId, int searchPathType, int searchPathsToGet) + { + byte[] pathIdBuffer = Encoding.UTF8.GetBytes(pathId + "\0"); + fixed (byte* pathIdBufferPtr = pathIdBuffer) + { + var ret = _GetSearchPath(null, pathIdBufferPtr, searchPathType, searchPathsToGet); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetSearchPath(retBufferPtr, pathIdBufferPtr, searchPathType, searchPathsToGet); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } + } + } + + private unsafe static delegate* unmanaged _AddSearchPath; + + public unsafe static void AddSearchPath(string path, string pathId, int searchPathAdd, int searchPathPriority) + { + byte[] pathBuffer = Encoding.UTF8.GetBytes(path + "\0"); + byte[] pathIdBuffer = Encoding.UTF8.GetBytes(pathId + "\0"); + fixed (byte* pathBufferPtr = pathBuffer) + { + fixed (byte* pathIdBufferPtr = pathIdBuffer) + { + _AddSearchPath(pathBufferPtr, pathIdBufferPtr, searchPathAdd, searchPathPriority); + } + } + } + + private unsafe static delegate* unmanaged _RemoveSearchPath; + + public unsafe static bool RemoveSearchPath(string path, string pathId) + { + byte[] pathBuffer = Encoding.UTF8.GetBytes(path + "\0"); + byte[] pathIdBuffer = Encoding.UTF8.GetBytes(pathId + "\0"); + fixed (byte* pathBufferPtr = pathBuffer) + { + fixed (byte* pathIdBufferPtr = pathIdBuffer) + { + var ret = _RemoveSearchPath(pathBufferPtr, pathIdBufferPtr); + return ret == 1; + } + } + } + + private unsafe static delegate* unmanaged _FileExists; + + public unsafe static bool FileExists(string fileName, string pathId) + { + byte[] fileNameBuffer = Encoding.UTF8.GetBytes(fileName + "\0"); + byte[] pathIdBuffer = Encoding.UTF8.GetBytes(pathId + "\0"); + fixed (byte* fileNameBufferPtr = fileNameBuffer) + { + fixed (byte* pathIdBufferPtr = pathIdBuffer) + { + var ret = _FileExists(fileNameBufferPtr, pathIdBufferPtr); + return ret == 1; + } + } + } + + private unsafe static delegate* unmanaged _IsDirectory; + + public unsafe static bool IsDirectory(string path, string pathId) + { + byte[] pathBuffer = Encoding.UTF8.GetBytes(path + "\0"); + byte[] pathIdBuffer = Encoding.UTF8.GetBytes(pathId + "\0"); + fixed (byte* pathBufferPtr = pathBuffer) + { + fixed (byte* pathIdBufferPtr = pathIdBuffer) + { + var ret = _IsDirectory(pathBufferPtr, pathIdBufferPtr); + return ret == 1; + } + } + } + + private unsafe static delegate* unmanaged _PrintSearchPaths; + + public unsafe static void PrintSearchPaths() + { + _PrintSearchPaths(); + } + + private unsafe static delegate* unmanaged _ReadFile; + + public unsafe static string ReadFile(string fileName, string pathId) + { + byte[] fileNameBuffer = Encoding.UTF8.GetBytes(fileName + "\0"); + byte[] pathIdBuffer = Encoding.UTF8.GetBytes(pathId + "\0"); + fixed (byte* fileNameBufferPtr = fileNameBuffer) + { + fixed (byte* pathIdBufferPtr = pathIdBuffer) + { + var ret = _ReadFile(null, fileNameBufferPtr, pathIdBufferPtr); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _ReadFile(retBufferPtr, fileNameBufferPtr, pathIdBufferPtr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } + } + } + } + + private unsafe static delegate* unmanaged _WriteFile; + + public unsafe static bool WriteFile(string fileName, string pathId, string content) + { + byte[] fileNameBuffer = Encoding.UTF8.GetBytes(fileName + "\0"); + byte[] pathIdBuffer = Encoding.UTF8.GetBytes(pathId + "\0"); + byte[] contentBuffer = Encoding.UTF8.GetBytes(content + "\0"); + fixed (byte* fileNameBufferPtr = fileNameBuffer) + { + fixed (byte* pathIdBufferPtr = pathIdBuffer) + { + fixed (byte* contentBufferPtr = contentBuffer) + { + var ret = _WriteFile(fileNameBufferPtr, pathIdBufferPtr, contentBufferPtr); + return ret == 1; + } + } + } + } + + private unsafe static delegate* unmanaged _GetFileSize; + + public unsafe static uint GetFileSize(string fileName, string pathId) + { + byte[] fileNameBuffer = Encoding.UTF8.GetBytes(fileName + "\0"); + byte[] pathIdBuffer = Encoding.UTF8.GetBytes(pathId + "\0"); + fixed (byte* fileNameBufferPtr = fileNameBuffer) + { + fixed (byte* pathIdBufferPtr = pathIdBuffer) + { + var ret = _GetFileSize(fileNameBufferPtr, pathIdBufferPtr); + return ret; + } + } + } + + private unsafe static delegate* unmanaged _PrecacheFile; + + public unsafe static bool PrecacheFile(string fileName, string pathId) + { + byte[] fileNameBuffer = Encoding.UTF8.GetBytes(fileName + "\0"); + byte[] pathIdBuffer = Encoding.UTF8.GetBytes(pathId + "\0"); + fixed (byte* fileNameBufferPtr = fileNameBuffer) + { + fixed (byte* pathIdBufferPtr = pathIdBuffer) + { + var ret = _PrecacheFile(fileNameBufferPtr, pathIdBufferPtr); + return ret == 1; + } + } + } + + private unsafe static delegate* unmanaged _IsFileWritable; + + public unsafe static bool IsFileWritable(string fileName, string pathId) + { + byte[] fileNameBuffer = Encoding.UTF8.GetBytes(fileName + "\0"); + byte[] pathIdBuffer = Encoding.UTF8.GetBytes(pathId + "\0"); + fixed (byte* fileNameBufferPtr = fileNameBuffer) + { + fixed (byte* pathIdBufferPtr = pathIdBuffer) + { + var ret = _IsFileWritable(fileNameBufferPtr, pathIdBufferPtr); + return ret == 1; + } + } + } + + private unsafe static delegate* unmanaged _SetFileWritable; + + public unsafe static bool SetFileWritable(string fileName, string pathId, bool writable) + { + byte[] fileNameBuffer = Encoding.UTF8.GetBytes(fileName + "\0"); + byte[] pathIdBuffer = Encoding.UTF8.GetBytes(pathId + "\0"); + fixed (byte* fileNameBufferPtr = fileNameBuffer) + { + fixed (byte* pathIdBufferPtr = pathIdBuffer) + { + var ret = _SetFileWritable(fileNameBufferPtr, pathIdBufferPtr, writable ? (byte)1 : (byte)0); + return ret == 1; + } + } + } +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/GameEvents.cs b/managed/src/SwiftlyS2.Generated/Natives/GameEvents.cs index 2b7e3a325..b598fe90b 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/GameEvents.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/GameEvents.cs @@ -1,498 +1,423 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeGameEvents { - private static int _MainThreadID; - - private unsafe static delegate* unmanaged _GetBool; - - public unsafe static bool GetBool(nint _event, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetBool(_event, keyBufferPtr); - pool.Return(keyBuffer); - return ret == 1; - } - } - - private unsafe static delegate* unmanaged _GetInt; - - public unsafe static int GetInt(nint _event, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetInt(_event, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetUint64; - - public unsafe static ulong GetUint64(nint _event, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetUint64(_event, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetFloat; - - public unsafe static float GetFloat(nint _event, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetFloat(_event, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetString; - - public unsafe static string GetString(nint _event, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetString(null, _event, keyBufferPtr); - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetString(retBufferPtr, _event, keyBufferPtr); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - pool.Return(keyBuffer); - return retString; - } - } - } - - private unsafe static delegate* unmanaged _GetPtr; - - public unsafe static nint GetPtr(nint _event, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetPtr(_event, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetEHandle; - - /// - /// returns the pointer stored inside the handle - /// - public unsafe static nint GetEHandle(nint _event, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetEHandle(_event, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetEntity; - - public unsafe static nint GetEntity(nint _event, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetEntity(_event, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetEntityIndex; - - public unsafe static int GetEntityIndex(nint _event, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetEntityIndex(_event, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetPlayerSlot; - - public unsafe static int GetPlayerSlot(nint _event, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetPlayerSlot(_event, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetPlayerController; - - public unsafe static nint GetPlayerController(nint _event, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetPlayerController(_event, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetPlayerPawn; - - public unsafe static nint GetPlayerPawn(nint _event, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetPlayerPawn(_event, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetPawnEHandle; - - /// - /// returns the pointer stored inside the handle - /// - public unsafe static nint GetPawnEHandle(nint _event, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetPawnEHandle(_event, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetPawnEntityIndex; - - public unsafe static int GetPawnEntityIndex(nint _event, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _GetPawnEntityIndex(_event, keyBufferPtr); - pool.Return(keyBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _SetBool; - - public unsafe static void SetBool(nint _event, string key, bool value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetBool(_event, keyBufferPtr, value ? (byte)1 : (byte)0); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetInt; - - public unsafe static void SetInt(nint _event, string key, int value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetInt(_event, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetUint64; - - public unsafe static void SetUint64(nint _event, string key, ulong value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetUint64(_event, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetFloat; - - public unsafe static void SetFloat(nint _event, string key, float value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetFloat(_event, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetString; - - public unsafe static void SetString(nint _event, string key, string value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - var valueLength = Encoding.UTF8.GetByteCount(value); - var valueBuffer = pool.Rent(valueLength + 1); - Encoding.UTF8.GetBytes(value, valueBuffer); - valueBuffer[valueLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - fixed (byte* valueBufferPtr = valueBuffer) { - _SetString(_event, keyBufferPtr, valueBufferPtr); - pool.Return(keyBuffer); - pool.Return(valueBuffer); - } - } - } - - private unsafe static delegate* unmanaged _SetPtr; - - public unsafe static void SetPtr(nint _event, string key, nint value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetPtr(_event, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetEntity; - - public unsafe static void SetEntity(nint _event, string key, nint value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetEntity(_event, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetEntityIndex; - - public unsafe static void SetEntityIndex(nint _event, string key, int value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetEntityIndex(_event, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _SetPlayerSlot; - - public unsafe static void SetPlayerSlot(nint _event, string key, int value) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - _SetPlayerSlot(_event, keyBufferPtr, value); - pool.Return(keyBuffer); - } - } - - private unsafe static delegate* unmanaged _HasKey; - - public unsafe static bool HasKey(nint _event, string key) { - var pool = ArrayPool.Shared; - var keyLength = Encoding.UTF8.GetByteCount(key); - var keyBuffer = pool.Rent(keyLength + 1); - Encoding.UTF8.GetBytes(key, keyBuffer); - keyBuffer[keyLength] = 0; - fixed (byte* keyBufferPtr = keyBuffer) { - var ret = _HasKey(_event, keyBufferPtr); - pool.Return(keyBuffer); - return ret == 1; - } - } - - private unsafe static delegate* unmanaged _IsReliable; - - public unsafe static bool IsReliable(nint _event) { - var ret = _IsReliable(_event); - return ret == 1; - } - - private unsafe static delegate* unmanaged _IsLocal; - - public unsafe static bool IsLocal(nint _event) { - var ret = _IsLocal(_event); - return ret == 1; - } - - private unsafe static delegate* unmanaged _RegisterListener; - - public unsafe static void RegisterListener(string eventName) { - var pool = ArrayPool.Shared; - var eventNameLength = Encoding.UTF8.GetByteCount(eventName); - var eventNameBuffer = pool.Rent(eventNameLength + 1); - Encoding.UTF8.GetBytes(eventName, eventNameBuffer); - eventNameBuffer[eventNameLength] = 0; - fixed (byte* eventNameBufferPtr = eventNameBuffer) { - _RegisterListener(eventNameBufferPtr); - pool.Return(eventNameBuffer); - } - } - - private unsafe static delegate* unmanaged _AddListenerPreCallback; - - /// - /// the callback should receive the following: uint32 eventNameHash, IntPtr gameEvent, bool* dontBroadcast, return bool (true -> ignored, false -> supercede) - /// - public unsafe static ulong AddListenerPreCallback(nint callback) { - var ret = _AddListenerPreCallback(callback); - return ret; - } - - private unsafe static delegate* unmanaged _AddListenerPostCallback; - - /// - /// the callback should receive the following: uint32 eventNameHash, IntPtr gameEvent, bool* dontBroadcast, return bool (true -> ignored, false -> supercede) - /// - public unsafe static ulong AddListenerPostCallback(nint callback) { - var ret = _AddListenerPostCallback(callback); - return ret; - } - - private unsafe static delegate* unmanaged _RemoveListenerPreCallback; - - public unsafe static void RemoveListenerPreCallback(ulong listenerID) { - _RemoveListenerPreCallback(listenerID); - } - - private unsafe static delegate* unmanaged _RemoveListenerPostCallback; - - public unsafe static void RemoveListenerPostCallback(ulong listenerID) { - _RemoveListenerPostCallback(listenerID); - } - - private unsafe static delegate* unmanaged _CreateEvent; - - public unsafe static nint CreateEvent(string eventName) { - var pool = ArrayPool.Shared; - var eventNameLength = Encoding.UTF8.GetByteCount(eventName); - var eventNameBuffer = pool.Rent(eventNameLength + 1); - Encoding.UTF8.GetBytes(eventName, eventNameBuffer); - eventNameBuffer[eventNameLength] = 0; - fixed (byte* eventNameBufferPtr = eventNameBuffer) { - var ret = _CreateEvent(eventNameBufferPtr); - pool.Return(eventNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _FreeEvent; - - public unsafe static void FreeEvent(nint _event) { - _FreeEvent(_event); - } +internal static class NativeGameEvents +{ + private static int _MainThreadID; - private unsafe static delegate* unmanaged _FireEvent; + private unsafe static delegate* unmanaged _GetBool; - public unsafe static void FireEvent(nint _event, bool dontBroadcast) { - _FireEvent(_event, dontBroadcast ? (byte)1 : (byte)0); - } - - private unsafe static delegate* unmanaged _FireEventToClient; - - public unsafe static void FireEventToClient(nint _event, int playerid) { - _FireEventToClient(_event, playerid); - } + public unsafe static bool GetBool(nint _event, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetBool(_event, keyBufferPtr); + return ret == 1; + } + } + + private unsafe static delegate* unmanaged _GetInt; + + public unsafe static int GetInt(nint _event, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetInt(_event, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetUint64; + + public unsafe static ulong GetUint64(nint _event, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetUint64(_event, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetFloat; + + public unsafe static float GetFloat(nint _event, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetFloat(_event, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetString; + + public unsafe static string GetString(nint _event, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetString(null, _event, keyBufferPtr); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetString(retBufferPtr, _event, keyBufferPtr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } + } + } + + private unsafe static delegate* unmanaged _GetPtr; + + public unsafe static nint GetPtr(nint _event, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetPtr(_event, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetEHandle; + + /// + /// returns the pointer stored inside the handle + /// + public unsafe static nint GetEHandle(nint _event, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetEHandle(_event, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetEntity; + + public unsafe static nint GetEntity(nint _event, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetEntity(_event, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetEntityIndex; + + public unsafe static int GetEntityIndex(nint _event, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetEntityIndex(_event, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetPlayerSlot; + + public unsafe static int GetPlayerSlot(nint _event, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetPlayerSlot(_event, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetPlayerController; + + public unsafe static nint GetPlayerController(nint _event, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetPlayerController(_event, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetPlayerPawn; + + public unsafe static nint GetPlayerPawn(nint _event, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetPlayerPawn(_event, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetPawnEHandle; + + /// + /// returns the pointer stored inside the handle + /// + public unsafe static nint GetPawnEHandle(nint _event, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetPawnEHandle(_event, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetPawnEntityIndex; + + public unsafe static int GetPawnEntityIndex(nint _event, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _GetPawnEntityIndex(_event, keyBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _SetBool; + + public unsafe static void SetBool(nint _event, string key, bool value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetBool(_event, keyBufferPtr, value ? (byte)1 : (byte)0); + } + } + + private unsafe static delegate* unmanaged _SetInt; + + public unsafe static void SetInt(nint _event, string key, int value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetInt(_event, keyBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetUint64; + + public unsafe static void SetUint64(nint _event, string key, ulong value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetUint64(_event, keyBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetFloat; + + public unsafe static void SetFloat(nint _event, string key, float value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetFloat(_event, keyBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetString; + + public unsafe static void SetString(nint _event, string key, string value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + byte[] valueBuffer = Encoding.UTF8.GetBytes(value + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + fixed (byte* valueBufferPtr = valueBuffer) + { + _SetString(_event, keyBufferPtr, valueBufferPtr); + } + } + } - private unsafe static delegate* unmanaged _IsPlayerListeningToEventName; + private unsafe static delegate* unmanaged _SetPtr; - public unsafe static bool IsPlayerListeningToEventName(int playerid, string eventName) { - var pool = ArrayPool.Shared; - var eventNameLength = Encoding.UTF8.GetByteCount(eventName); - var eventNameBuffer = pool.Rent(eventNameLength + 1); - Encoding.UTF8.GetBytes(eventName, eventNameBuffer); - eventNameBuffer[eventNameLength] = 0; - fixed (byte* eventNameBufferPtr = eventNameBuffer) { - var ret = _IsPlayerListeningToEventName(playerid, eventNameBufferPtr); - pool.Return(eventNameBuffer); - return ret == 1; + public unsafe static void SetPtr(nint _event, string key, nint value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetPtr(_event, keyBufferPtr, value); + } } - } - private unsafe static delegate* unmanaged _IsPlayerListeningToEvent; - - public unsafe static bool IsPlayerListeningToEvent(int playerid, nint _event) { - var ret = _IsPlayerListeningToEvent(playerid, _event); - return ret == 1; - } + private unsafe static delegate* unmanaged _SetEntity; + + public unsafe static void SetEntity(nint _event, string key, nint value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetEntity(_event, keyBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetEntityIndex; + + public unsafe static void SetEntityIndex(nint _event, string key, int value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetEntityIndex(_event, keyBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetPlayerSlot; + + public unsafe static void SetPlayerSlot(nint _event, string key, int value) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + _SetPlayerSlot(_event, keyBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _HasKey; + + public unsafe static bool HasKey(nint _event, string key) + { + byte[] keyBuffer = Encoding.UTF8.GetBytes(key + "\0"); + fixed (byte* keyBufferPtr = keyBuffer) + { + var ret = _HasKey(_event, keyBufferPtr); + return ret == 1; + } + } + + private unsafe static delegate* unmanaged _IsReliable; + + public unsafe static bool IsReliable(nint _event) + { + var ret = _IsReliable(_event); + return ret == 1; + } + + private unsafe static delegate* unmanaged _IsLocal; + + public unsafe static bool IsLocal(nint _event) + { + var ret = _IsLocal(_event); + return ret == 1; + } + + private unsafe static delegate* unmanaged _RegisterListener; + + public unsafe static void RegisterListener(string eventName) + { + byte[] eventNameBuffer = Encoding.UTF8.GetBytes(eventName + "\0"); + fixed (byte* eventNameBufferPtr = eventNameBuffer) + { + _RegisterListener(eventNameBufferPtr); + } + } + + private unsafe static delegate* unmanaged _AddListenerPreCallback; + + /// + /// the callback should receive the following: uint32 eventNameHash, IntPtr gameEvent, bool* dontBroadcast, return bool (true -> ignored, false -> supercede) + /// + public unsafe static ulong AddListenerPreCallback(nint callback) + { + var ret = _AddListenerPreCallback(callback); + return ret; + } + + private unsafe static delegate* unmanaged _AddListenerPostCallback; + + /// + /// the callback should receive the following: uint32 eventNameHash, IntPtr gameEvent, bool* dontBroadcast, return bool (true -> ignored, false -> supercede) + /// + public unsafe static ulong AddListenerPostCallback(nint callback) + { + var ret = _AddListenerPostCallback(callback); + return ret; + } + + private unsafe static delegate* unmanaged _RemoveListenerPreCallback; + + public unsafe static void RemoveListenerPreCallback(ulong listenerID) + { + _RemoveListenerPreCallback(listenerID); + } + + private unsafe static delegate* unmanaged _RemoveListenerPostCallback; + + public unsafe static void RemoveListenerPostCallback(ulong listenerID) + { + _RemoveListenerPostCallback(listenerID); + } + + private unsafe static delegate* unmanaged _CreateEvent; + + public unsafe static nint CreateEvent(string eventName) + { + byte[] eventNameBuffer = Encoding.UTF8.GetBytes(eventName + "\0"); + fixed (byte* eventNameBufferPtr = eventNameBuffer) + { + var ret = _CreateEvent(eventNameBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _FreeEvent; + + public unsafe static void FreeEvent(nint _event) + { + _FreeEvent(_event); + } + + private unsafe static delegate* unmanaged _FireEvent; + + public unsafe static void FireEvent(nint _event, bool dontBroadcast) + { + _FireEvent(_event, dontBroadcast ? (byte)1 : (byte)0); + } + + private unsafe static delegate* unmanaged _FireEventToClient; + + public unsafe static void FireEventToClient(nint _event, int playerid) + { + _FireEventToClient(_event, playerid); + } + + private unsafe static delegate* unmanaged _IsPlayerListeningToEventName; + + public unsafe static bool IsPlayerListeningToEventName(int playerid, string eventName) + { + byte[] eventNameBuffer = Encoding.UTF8.GetBytes(eventName + "\0"); + fixed (byte* eventNameBufferPtr = eventNameBuffer) + { + var ret = _IsPlayerListeningToEventName(playerid, eventNameBufferPtr); + return ret == 1; + } + } + + private unsafe static delegate* unmanaged _IsPlayerListeningToEvent; + + public unsafe static bool IsPlayerListeningToEvent(int playerid, nint _event) + { + var ret = _IsPlayerListeningToEvent(playerid, _event); + return ret == 1; + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/Hooks.cs b/managed/src/SwiftlyS2.Generated/Natives/Hooks.cs index 37f8d97df..18db02861 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/Hooks.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/Hooks.cs @@ -1,150 +1,170 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeHooks { - private static int _MainThreadID; +internal static class NativeHooks +{ + private static int _MainThreadID; - private unsafe static delegate* unmanaged _AllocateHook; + private unsafe static delegate* unmanaged _AllocateHook; - public unsafe static nint AllocateHook() { - var ret = _AllocateHook(); - return ret; - } + public unsafe static nint AllocateHook() + { + var ret = _AllocateHook(); + return ret; + } - private unsafe static delegate* unmanaged _AllocateVHook; + private unsafe static delegate* unmanaged _AllocateVHook; - public unsafe static nint AllocateVHook() { - var ret = _AllocateVHook(); - return ret; - } + public unsafe static nint AllocateVHook() + { + var ret = _AllocateVHook(); + return ret; + } - private unsafe static delegate* unmanaged _AllocateMHook; + private unsafe static delegate* unmanaged _AllocateMHook; - public unsafe static nint AllocateMHook() { - var ret = _AllocateMHook(); - return ret; - } + public unsafe static nint AllocateMHook() + { + var ret = _AllocateMHook(); + return ret; + } - private unsafe static delegate* unmanaged _DeallocateHook; + private unsafe static delegate* unmanaged _DeallocateHook; - public unsafe static void DeallocateHook(nint hook) { - _DeallocateHook(hook); - } + public unsafe static void DeallocateHook(nint hook) + { + _DeallocateHook(hook); + } - private unsafe static delegate* unmanaged _DeallocateVHook; + private unsafe static delegate* unmanaged _DeallocateVHook; - public unsafe static void DeallocateVHook(nint hook) { - _DeallocateVHook(hook); - } + public unsafe static void DeallocateVHook(nint hook) + { + _DeallocateVHook(hook); + } - private unsafe static delegate* unmanaged _DeallocateMHook; + private unsafe static delegate* unmanaged _DeallocateMHook; - public unsafe static void DeallocateMHook(nint hook) { - _DeallocateMHook(hook); - } + public unsafe static void DeallocateMHook(nint hook) + { + _DeallocateMHook(hook); + } - private unsafe static delegate* unmanaged _SetHook; + private unsafe static delegate* unmanaged _SetHook; - /// - /// the callback should receive the exact arguments as the function has, and to return the same amount of arguments - /// - public unsafe static void SetHook(nint hook, nint func, nint callback) { - _SetHook(hook, func, callback); - } + /// + /// the callback should receive the exact arguments as the function has, and to return the same amount of arguments + /// + public unsafe static void SetHook(nint hook, nint func, nint callback) + { + _SetHook(hook, func, callback); + } - private unsafe static delegate* unmanaged _SetVHook; + private unsafe static delegate* unmanaged _SetVHook; - /// - /// the callback should receive the exact arguments as the function has, and to return the same amount of arguments, plus the first argument needs to be the pointer to the original function - /// - public unsafe static void SetVHook(nint hook, nint entityOrVTable, int index, nint callback, bool isVtable) { - _SetVHook(hook, entityOrVTable, index, callback, isVtable ? (byte)1 : (byte)0); - } + /// + /// the callback should receive the exact arguments as the function has, and to return the same amount of arguments, plus the first argument needs to be the pointer to the original function + /// + public unsafe static void SetVHook(nint hook, nint entityOrVTable, int index, nint callback, bool isVtable) + { + _SetVHook(hook, entityOrVTable, index, callback, isVtable ? (byte)1 : (byte)0); + } - private unsafe static delegate* unmanaged _SetMHook; + private unsafe static delegate* unmanaged _SetMHook; - /// - /// the callback should receive `ref Context64` - /// - public unsafe static void SetMHook(nint hook, nint addr, nint callback) { - _SetMHook(hook, addr, callback); - } + /// + /// the callback should receive `ref Context64` + /// + public unsafe static void SetMHook(nint hook, nint addr, nint callback) + { + _SetMHook(hook, addr, callback); + } - private unsafe static delegate* unmanaged _EnableHook; + private unsafe static delegate* unmanaged _EnableHook; - public unsafe static void EnableHook(nint hook) { - _EnableHook(hook); - } + public unsafe static void EnableHook(nint hook) + { + _EnableHook(hook); + } - private unsafe static delegate* unmanaged _EnableVHook; + private unsafe static delegate* unmanaged _EnableVHook; - public unsafe static void EnableVHook(nint hook) { - _EnableVHook(hook); - } + public unsafe static void EnableVHook(nint hook) + { + _EnableVHook(hook); + } - private unsafe static delegate* unmanaged _EnableMHook; + private unsafe static delegate* unmanaged _EnableMHook; - public unsafe static void EnableMHook(nint hook) { - _EnableMHook(hook); - } + public unsafe static void EnableMHook(nint hook) + { + _EnableMHook(hook); + } - private unsafe static delegate* unmanaged _DisableHook; + private unsafe static delegate* unmanaged _DisableHook; - public unsafe static void DisableHook(nint hook) { - _DisableHook(hook); - } + public unsafe static void DisableHook(nint hook) + { + _DisableHook(hook); + } - private unsafe static delegate* unmanaged _DisableVHook; + private unsafe static delegate* unmanaged _DisableVHook; - public unsafe static void DisableVHook(nint hook) { - _DisableVHook(hook); - } + public unsafe static void DisableVHook(nint hook) + { + _DisableVHook(hook); + } - private unsafe static delegate* unmanaged _DisableMHook; + private unsafe static delegate* unmanaged _DisableMHook; - public unsafe static void DisableMHook(nint hook) { - _DisableMHook(hook); - } + public unsafe static void DisableMHook(nint hook) + { + _DisableMHook(hook); + } - private unsafe static delegate* unmanaged _IsHookEnabled; + private unsafe static delegate* unmanaged _IsHookEnabled; - public unsafe static bool IsHookEnabled(nint hook) { - var ret = _IsHookEnabled(hook); - return ret == 1; - } + public unsafe static bool IsHookEnabled(nint hook) + { + var ret = _IsHookEnabled(hook); + return ret == 1; + } - private unsafe static delegate* unmanaged _IsVHookEnabled; + private unsafe static delegate* unmanaged _IsVHookEnabled; - public unsafe static bool IsVHookEnabled(nint hook) { - var ret = _IsVHookEnabled(hook); - return ret == 1; - } + public unsafe static bool IsVHookEnabled(nint hook) + { + var ret = _IsVHookEnabled(hook); + return ret == 1; + } - private unsafe static delegate* unmanaged _IsMHookEnabled; + private unsafe static delegate* unmanaged _IsMHookEnabled; - public unsafe static bool IsMHookEnabled(nint hook) { - var ret = _IsMHookEnabled(hook); - return ret == 1; - } + public unsafe static bool IsMHookEnabled(nint hook) + { + var ret = _IsMHookEnabled(hook); + return ret == 1; + } + + private unsafe static delegate* unmanaged _GetHookOriginal; - private unsafe static delegate* unmanaged _GetHookOriginal; + public unsafe static nint GetHookOriginal(nint hook) + { + var ret = _GetHookOriginal(hook); + return ret; + } + + private unsafe static delegate* unmanaged _GetVHookOriginal; - public unsafe static nint GetHookOriginal(nint hook) { - var ret = _GetHookOriginal(hook); - return ret; - } - - private unsafe static delegate* unmanaged _GetVHookOriginal; - - public unsafe static nint GetVHookOriginal(nint hook) { - var ret = _GetVHookOriginal(hook); - return ret; - } + public unsafe static nint GetVHookOriginal(nint hook) + { + var ret = _GetVHookOriginal(hook); + return ret; + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/MemoryHelpers.cs b/managed/src/SwiftlyS2.Generated/Natives/MemoryHelpers.cs index f0441f6c7..2f2c4fdf8 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/MemoryHelpers.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/MemoryHelpers.cs @@ -1,75 +1,93 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeMemoryHelpers { - private static int _MainThreadID; +internal static class NativeMemoryHelpers +{ + private static int _MainThreadID; - private unsafe static delegate* unmanaged _FetchInterfaceByName; + private unsafe static delegate* unmanaged _FetchInterfaceByName; - /// - /// supports both internal interface system, but also valve interface system - /// - public unsafe static nint FetchInterfaceByName(string ifaceName) { - var pool = ArrayPool.Shared; - var ifaceNameLength = Encoding.UTF8.GetByteCount(ifaceName); - var ifaceNameBuffer = pool.Rent(ifaceNameLength + 1); - Encoding.UTF8.GetBytes(ifaceName, ifaceNameBuffer); - ifaceNameBuffer[ifaceNameLength] = 0; - fixed (byte* ifaceNameBufferPtr = ifaceNameBuffer) { - var ret = _FetchInterfaceByName(ifaceNameBufferPtr); - pool.Return(ifaceNameBuffer); - return ret; + /// + /// supports both internal interface system, but also valve interface system + /// + public unsafe static nint FetchInterfaceByName(string ifaceName) + { + byte[] ifaceNameBuffer = Encoding.UTF8.GetBytes(ifaceName + "\0"); + fixed (byte* ifaceNameBufferPtr = ifaceNameBuffer) + { + var ret = _FetchInterfaceByName(ifaceNameBufferPtr); + return ret; + } } - } - private unsafe static delegate* unmanaged _GetVirtualTableAddress; + private unsafe static delegate* unmanaged _GetVirtualTableAddress; - public unsafe static nint GetVirtualTableAddress(string library, string vtableName) { - var pool = ArrayPool.Shared; - var libraryLength = Encoding.UTF8.GetByteCount(library); - var libraryBuffer = pool.Rent(libraryLength + 1); - Encoding.UTF8.GetBytes(library, libraryBuffer); - libraryBuffer[libraryLength] = 0; - var vtableNameLength = Encoding.UTF8.GetByteCount(vtableName); - var vtableNameBuffer = pool.Rent(vtableNameLength + 1); - Encoding.UTF8.GetBytes(vtableName, vtableNameBuffer); - vtableNameBuffer[vtableNameLength] = 0; - fixed (byte* libraryBufferPtr = libraryBuffer) { - fixed (byte* vtableNameBufferPtr = vtableNameBuffer) { - var ret = _GetVirtualTableAddress(libraryBufferPtr, vtableNameBufferPtr); - pool.Return(libraryBuffer); - pool.Return(vtableNameBuffer); - return ret; - } + public unsafe static nint GetVirtualTableAddress(string library, string vtableName) + { + byte[] libraryBuffer = Encoding.UTF8.GetBytes(library + "\0"); + byte[] vtableNameBuffer = Encoding.UTF8.GetBytes(vtableName + "\0"); + fixed (byte* libraryBufferPtr = libraryBuffer) + { + fixed (byte* vtableNameBufferPtr = vtableNameBuffer) + { + var ret = _GetVirtualTableAddress(libraryBufferPtr, vtableNameBufferPtr); + return ret; + } + } } - } - private unsafe static delegate* unmanaged _GetAddressBySignature; + private unsafe static delegate* unmanaged _GetAddressBySignature; - public unsafe static nint GetAddressBySignature(string library, string sig, int len, bool rawBytes) { - var pool = ArrayPool.Shared; - var libraryLength = Encoding.UTF8.GetByteCount(library); - var libraryBuffer = pool.Rent(libraryLength + 1); - Encoding.UTF8.GetBytes(library, libraryBuffer); - libraryBuffer[libraryLength] = 0; - var sigLength = Encoding.UTF8.GetByteCount(sig); - var sigBuffer = pool.Rent(sigLength + 1); - Encoding.UTF8.GetBytes(sig, sigBuffer); - sigBuffer[sigLength] = 0; - fixed (byte* libraryBufferPtr = libraryBuffer) { - fixed (byte* sigBufferPtr = sigBuffer) { - var ret = _GetAddressBySignature(libraryBufferPtr, sigBufferPtr, len, rawBytes ? (byte)1 : (byte)0); - pool.Return(libraryBuffer); - pool.Return(sigBuffer); - return ret; - } + public unsafe static nint GetAddressBySignature(string library, string sig, int len, bool rawBytes) + { + byte[] libraryBuffer = Encoding.UTF8.GetBytes(library + "\0"); + byte[] sigBuffer = Encoding.UTF8.GetBytes(sig + "\0"); + fixed (byte* libraryBufferPtr = libraryBuffer) + { + fixed (byte* sigBufferPtr = sigBuffer) + { + var ret = _GetAddressBySignature(libraryBufferPtr, sigBufferPtr, len, rawBytes ? (byte)1 : (byte)0); + return ret; + } + } + } + + private unsafe static delegate* unmanaged _GetObjectPtrVtableName; + + public unsafe static string GetObjectPtrVtableName(nint objptr) + { + var ret = _GetObjectPtrVtableName(null, objptr); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetObjectPtrVtableName(retBufferPtr, objptr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } + } + + private unsafe static delegate* unmanaged _ObjectPtrHasVtable; + + public unsafe static bool ObjectPtrHasVtable(nint objptr) + { + var ret = _ObjectPtrHasVtable(objptr); + return ret == 1; + } + + private unsafe static delegate* unmanaged _ObjectPtrHasBaseClass; + + public unsafe static bool ObjectPtrHasBaseClass(nint objptr, string baseClassName) + { + byte[] baseClassNameBuffer = Encoding.UTF8.GetBytes(baseClassName + "\0"); + fixed (byte* baseClassNameBufferPtr = baseClassNameBuffer) + { + var ret = _ObjectPtrHasBaseClass(objptr, baseClassNameBufferPtr); + return ret == 1; + } } - } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/NetMessages.cs b/managed/src/SwiftlyS2.Generated/Natives/NetMessages.cs index 91e00dcc2..7a8d0ba87 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/NetMessages.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/NetMessages.cs @@ -1,1169 +1,953 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeNetMessages { - private static int _MainThreadID; - - private unsafe static delegate* unmanaged _AllocateNetMessageByID; - - public unsafe static nint AllocateNetMessageByID(int msgid) { - var ret = _AllocateNetMessageByID(msgid); - return ret; - } - - private unsafe static delegate* unmanaged _AllocateNetMessageByPartialName; - - public unsafe static nint AllocateNetMessageByPartialName(string name) { - var pool = ArrayPool.Shared; - var nameLength = Encoding.UTF8.GetByteCount(name); - var nameBuffer = pool.Rent(nameLength + 1); - Encoding.UTF8.GetBytes(name, nameBuffer); - nameBuffer[nameLength] = 0; - fixed (byte* nameBufferPtr = nameBuffer) { - var ret = _AllocateNetMessageByPartialName(nameBufferPtr); - pool.Return(nameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _DeallocateNetMessage; - - public unsafe static void DeallocateNetMessage(nint netmsg) { - _DeallocateNetMessage(netmsg); - } - - private unsafe static delegate* unmanaged _HasField; - - public unsafe static bool HasField(nint netmsg, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _HasField(netmsg, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret == 1; - } - } - - private unsafe static delegate* unmanaged _GetInt32; - - public unsafe static int GetInt32(nint netmsg, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetInt32(netmsg, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetRepeatedInt32; - - public unsafe static int GetRepeatedInt32(nint netmsg, string fieldName, int index) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetRepeatedInt32(netmsg, fieldNameBufferPtr, index); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _SetInt32; - - public unsafe static void SetInt32(nint netmsg, string fieldName, int value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetInt32(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _SetRepeatedInt32; - - public unsafe static void SetRepeatedInt32(nint netmsg, string fieldName, int index, int value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetRepeatedInt32(netmsg, fieldNameBufferPtr, index, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _AddInt32; - - public unsafe static void AddInt32(nint netmsg, string fieldName, int value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _AddInt32(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _GetInt64; - - public unsafe static long GetInt64(nint netmsg, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetInt64(netmsg, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetRepeatedInt64; - - public unsafe static long GetRepeatedInt64(nint netmsg, string fieldName, int index) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetRepeatedInt64(netmsg, fieldNameBufferPtr, index); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _SetInt64; - - public unsafe static void SetInt64(nint netmsg, string fieldName, long value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetInt64(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _SetRepeatedInt64; - - public unsafe static void SetRepeatedInt64(nint netmsg, string fieldName, int index, long value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetRepeatedInt64(netmsg, fieldNameBufferPtr, index, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _AddInt64; - - public unsafe static void AddInt64(nint netmsg, string fieldName, long value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _AddInt64(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _GetUInt32; - - public unsafe static uint GetUInt32(nint netmsg, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetUInt32(netmsg, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetRepeatedUInt32; - - public unsafe static uint GetRepeatedUInt32(nint netmsg, string fieldName, int index) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetRepeatedUInt32(netmsg, fieldNameBufferPtr, index); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _SetUInt32; - - public unsafe static void SetUInt32(nint netmsg, string fieldName, uint value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetUInt32(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _SetRepeatedUInt32; - - public unsafe static void SetRepeatedUInt32(nint netmsg, string fieldName, int index, uint value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetRepeatedUInt32(netmsg, fieldNameBufferPtr, index, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _AddUInt32; - - public unsafe static void AddUInt32(nint netmsg, string fieldName, uint value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _AddUInt32(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _GetUInt64; - - public unsafe static ulong GetUInt64(nint netmsg, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetUInt64(netmsg, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetRepeatedUInt64; - - public unsafe static ulong GetRepeatedUInt64(nint netmsg, string fieldName, int index) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetRepeatedUInt64(netmsg, fieldNameBufferPtr, index); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _SetUInt64; - - public unsafe static void SetUInt64(nint netmsg, string fieldName, ulong value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetUInt64(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _SetRepeatedUInt64; - - public unsafe static void SetRepeatedUInt64(nint netmsg, string fieldName, int index, ulong value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetRepeatedUInt64(netmsg, fieldNameBufferPtr, index, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _AddUInt64; - - public unsafe static void AddUInt64(nint netmsg, string fieldName, ulong value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _AddUInt64(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _GetBool; - - public unsafe static bool GetBool(nint netmsg, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetBool(netmsg, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret == 1; - } - } - - private unsafe static delegate* unmanaged _GetRepeatedBool; - - public unsafe static bool GetRepeatedBool(nint netmsg, string fieldName, int index) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetRepeatedBool(netmsg, fieldNameBufferPtr, index); - pool.Return(fieldNameBuffer); - return ret == 1; - } - } - - private unsafe static delegate* unmanaged _SetBool; - - public unsafe static void SetBool(nint netmsg, string fieldName, bool value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetBool(netmsg, fieldNameBufferPtr, value ? (byte)1 : (byte)0); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _SetRepeatedBool; - - public unsafe static void SetRepeatedBool(nint netmsg, string fieldName, int index, bool value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetRepeatedBool(netmsg, fieldNameBufferPtr, index, value ? (byte)1 : (byte)0); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _AddBool; - - public unsafe static void AddBool(nint netmsg, string fieldName, bool value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _AddBool(netmsg, fieldNameBufferPtr, value ? (byte)1 : (byte)0); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _GetFloat; - - public unsafe static float GetFloat(nint netmsg, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetFloat(netmsg, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetRepeatedFloat; - - public unsafe static float GetRepeatedFloat(nint netmsg, string fieldName, int index) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetRepeatedFloat(netmsg, fieldNameBufferPtr, index); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _SetFloat; - - public unsafe static void SetFloat(nint netmsg, string fieldName, float value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetFloat(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _SetRepeatedFloat; - - public unsafe static void SetRepeatedFloat(nint netmsg, string fieldName, int index, float value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetRepeatedFloat(netmsg, fieldNameBufferPtr, index, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _AddFloat; - - public unsafe static void AddFloat(nint netmsg, string fieldName, float value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _AddFloat(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _GetDouble; - - public unsafe static double GetDouble(nint netmsg, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetDouble(netmsg, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetRepeatedDouble; - - public unsafe static double GetRepeatedDouble(nint netmsg, string fieldName, int index) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetRepeatedDouble(netmsg, fieldNameBufferPtr, index); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _SetDouble; - - public unsafe static void SetDouble(nint netmsg, string fieldName, double value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetDouble(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _SetRepeatedDouble; - - public unsafe static void SetRepeatedDouble(nint netmsg, string fieldName, int index, double value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetRepeatedDouble(netmsg, fieldNameBufferPtr, index, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _AddDouble; - - public unsafe static void AddDouble(nint netmsg, string fieldName, double value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _AddDouble(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _GetString; - - public unsafe static string GetString(nint netmsg, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetString(null, netmsg, fieldNameBufferPtr); - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetString(retBufferPtr, netmsg, fieldNameBufferPtr); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - pool.Return(fieldNameBuffer); - return retString; - } - } - } - - private unsafe static delegate* unmanaged _GetRepeatedString; - - public unsafe static string GetRepeatedString(nint netmsg, string fieldName, int index) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetRepeatedString(null, netmsg, fieldNameBufferPtr, index); - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetRepeatedString(retBufferPtr, netmsg, fieldNameBufferPtr, index); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - pool.Return(fieldNameBuffer); - return retString; - } - } - } - - private unsafe static delegate* unmanaged _SetString; - - public unsafe static void SetString(nint netmsg, string fieldName, string value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - var valueLength = Encoding.UTF8.GetByteCount(value); - var valueBuffer = pool.Rent(valueLength + 1); - Encoding.UTF8.GetBytes(value, valueBuffer); - valueBuffer[valueLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - fixed (byte* valueBufferPtr = valueBuffer) { - _SetString(netmsg, fieldNameBufferPtr, valueBufferPtr); - pool.Return(fieldNameBuffer); - pool.Return(valueBuffer); - } - } - } - - private unsafe static delegate* unmanaged _SetRepeatedString; - - public unsafe static void SetRepeatedString(nint netmsg, string fieldName, int index, string value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - var valueLength = Encoding.UTF8.GetByteCount(value); - var valueBuffer = pool.Rent(valueLength + 1); - Encoding.UTF8.GetBytes(value, valueBuffer); - valueBuffer[valueLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - fixed (byte* valueBufferPtr = valueBuffer) { - _SetRepeatedString(netmsg, fieldNameBufferPtr, index, valueBufferPtr); - pool.Return(fieldNameBuffer); - pool.Return(valueBuffer); - } - } - } - - private unsafe static delegate* unmanaged _AddString; - - public unsafe static void AddString(nint netmsg, string fieldName, string value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - var valueLength = Encoding.UTF8.GetByteCount(value); - var valueBuffer = pool.Rent(valueLength + 1); - Encoding.UTF8.GetBytes(value, valueBuffer); - valueBuffer[valueLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - fixed (byte* valueBufferPtr = valueBuffer) { - _AddString(netmsg, fieldNameBufferPtr, valueBufferPtr); - pool.Return(fieldNameBuffer); - pool.Return(valueBuffer); - } - } - } - - private unsafe static delegate* unmanaged _GetVector2D; - - public unsafe static Vector2D GetVector2D(nint netmsg, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetVector2D(netmsg, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetRepeatedVector2D; - - public unsafe static Vector2D GetRepeatedVector2D(nint netmsg, string fieldName, int index) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetRepeatedVector2D(netmsg, fieldNameBufferPtr, index); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _SetVector2D; - - public unsafe static void SetVector2D(nint netmsg, string fieldName, Vector2D value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetVector2D(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _SetRepeatedVector2D; - - public unsafe static void SetRepeatedVector2D(nint netmsg, string fieldName, int index, Vector2D value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetRepeatedVector2D(netmsg, fieldNameBufferPtr, index, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _AddVector2D; - - public unsafe static void AddVector2D(nint netmsg, string fieldName, Vector2D value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _AddVector2D(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _GetVector; - - public unsafe static Vector GetVector(nint netmsg, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetVector(netmsg, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetRepeatedVector; - - public unsafe static Vector GetRepeatedVector(nint netmsg, string fieldName, int index) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetRepeatedVector(netmsg, fieldNameBufferPtr, index); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _SetVector; - - public unsafe static void SetVector(nint netmsg, string fieldName, Vector value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetVector(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _SetRepeatedVector; - - public unsafe static void SetRepeatedVector(nint netmsg, string fieldName, int index, Vector value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetRepeatedVector(netmsg, fieldNameBufferPtr, index, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _AddVector; - - public unsafe static void AddVector(nint netmsg, string fieldName, Vector value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _AddVector(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _GetColor; - - public unsafe static Color GetColor(nint netmsg, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetColor(netmsg, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetRepeatedColor; - - public unsafe static Color GetRepeatedColor(nint netmsg, string fieldName, int index) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetRepeatedColor(netmsg, fieldNameBufferPtr, index); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _SetColor; - - public unsafe static void SetColor(nint netmsg, string fieldName, Color value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetColor(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _SetRepeatedColor; - - public unsafe static void SetRepeatedColor(nint netmsg, string fieldName, int index, Color value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetRepeatedColor(netmsg, fieldNameBufferPtr, index, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _AddColor; - - public unsafe static void AddColor(nint netmsg, string fieldName, Color value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _AddColor(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _GetQAngle; - - public unsafe static QAngle GetQAngle(nint netmsg, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetQAngle(netmsg, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetRepeatedQAngle; - - public unsafe static QAngle GetRepeatedQAngle(nint netmsg, string fieldName, int index) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetRepeatedQAngle(netmsg, fieldNameBufferPtr, index); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _SetQAngle; - - public unsafe static void SetQAngle(nint netmsg, string fieldName, QAngle value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetQAngle(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _SetRepeatedQAngle; - - public unsafe static void SetRepeatedQAngle(nint netmsg, string fieldName, int index, QAngle value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetRepeatedQAngle(netmsg, fieldNameBufferPtr, index, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _AddQAngle; - - public unsafe static void AddQAngle(nint netmsg, string fieldName, QAngle value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _AddQAngle(netmsg, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _GetBytes; - - public unsafe static byte[] GetBytes(nint netmsg, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetBytes(null, netmsg, fieldNameBufferPtr); - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetBytes(retBufferPtr, netmsg, fieldNameBufferPtr); - var retBytes = new byte[ret]; - for (int i = 0; i < ret; i++) retBytes[i] = retBufferPtr[i]; - pool.Return(retBuffer); - pool.Return(fieldNameBuffer); - return retBytes; - } - } - } - - private unsafe static delegate* unmanaged _GetRepeatedBytes; - - public unsafe static byte[] GetRepeatedBytes(nint netmsg, string fieldName, int index) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetRepeatedBytes(null, netmsg, fieldNameBufferPtr, index); - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetRepeatedBytes(retBufferPtr, netmsg, fieldNameBufferPtr, index); - var retBytes = new byte[ret]; - for (int i = 0; i < ret; i++) retBytes[i] = retBufferPtr[i]; - pool.Return(retBuffer); - pool.Return(fieldNameBuffer); - return retBytes; - } - } - } - - private unsafe static delegate* unmanaged _SetBytes; - - public unsafe static void SetBytes(nint netmsg, string fieldName, byte[] value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - var valueLength = value.Length; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - fixed (byte* valueBufferPtr = value) { - _SetBytes(netmsg, fieldNameBufferPtr, valueBufferPtr, valueLength); - pool.Return(fieldNameBuffer); - } - } - } - - private unsafe static delegate* unmanaged _SetRepeatedBytes; - - public unsafe static void SetRepeatedBytes(nint netmsg, string fieldName, int index, byte[] value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - var valueLength = value.Length; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - fixed (byte* valueBufferPtr = value) { - _SetRepeatedBytes(netmsg, fieldNameBufferPtr, index, valueBufferPtr, valueLength); - pool.Return(fieldNameBuffer); - } - } - } - - private unsafe static delegate* unmanaged _AddBytes; - - public unsafe static void AddBytes(nint netmsg, string fieldName, byte[] value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - var valueLength = value.Length; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - fixed (byte* valueBufferPtr = value) { - _AddBytes(netmsg, fieldNameBufferPtr, valueBufferPtr, valueLength); - pool.Return(fieldNameBuffer); - } - } - } - - private unsafe static delegate* unmanaged _GetNestedMessage; - - public unsafe static nint GetNestedMessage(nint netmsg, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetNestedMessage(netmsg, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetRepeatedNestedMessage; - - public unsafe static nint GetRepeatedNestedMessage(nint netmsg, string fieldName, int index) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetRepeatedNestedMessage(netmsg, fieldNameBufferPtr, index); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _AddNestedMessage; - - public unsafe static nint AddNestedMessage(nint netmsg, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _AddNestedMessage(netmsg, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _GetRepeatedFieldSize; - - public unsafe static int GetRepeatedFieldSize(nint netmsg, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetRepeatedFieldSize(netmsg, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret; - } - } - - private unsafe static delegate* unmanaged _ClearRepeatedField; - - public unsafe static void ClearRepeatedField(nint netmsg, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _ClearRepeatedField(netmsg, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - } - } - - private unsafe static delegate* unmanaged _SendMessage; - - public unsafe static void SendMessage(nint netmsg, int msgid, int playerid) { - _SendMessage(netmsg, msgid, playerid); - } - - private unsafe static delegate* unmanaged _SendMessageToPlayers; - - /// - /// each bit in player_mask represents a playerid - /// - public unsafe static void SendMessageToPlayers(nint netmsg, int msgid, ulong playermask) { - _SendMessageToPlayers(netmsg, msgid, playermask); - } - - private unsafe static delegate* unmanaged _AddNetMessageServerHook; - - /// - /// the callback should receive the following: uint64* playermask_ptr, int netmessage_id, void* netmsg, return bool (true -> ignored, false -> supercede) - /// - public unsafe static ulong AddNetMessageServerHook(nint callback) { - var ret = _AddNetMessageServerHook(callback); - return ret; - } - - private unsafe static delegate* unmanaged _RemoveNetMessageServerHook; - - public unsafe static void RemoveNetMessageServerHook(ulong callbackID) { - _RemoveNetMessageServerHook(callbackID); - } - - private unsafe static delegate* unmanaged _AddNetMessageClientHook; - - /// - /// the callback should receive the following: int32 playerid, int netmessage_id, void* netmsg, return bool (true -> ignored, false -> supercede) - /// - public unsafe static ulong AddNetMessageClientHook(nint callback) { - var ret = _AddNetMessageClientHook(callback); - return ret; - } - - private unsafe static delegate* unmanaged _RemoveNetMessageClientHook; - - public unsafe static void RemoveNetMessageClientHook(ulong callbackID) { - _RemoveNetMessageClientHook(callbackID); - } +internal static class NativeNetMessages +{ + private static int _MainThreadID; + + private unsafe static delegate* unmanaged _AllocateNetMessageByID; + + public unsafe static nint AllocateNetMessageByID(int msgid) + { + var ret = _AllocateNetMessageByID(msgid); + return ret; + } + + private unsafe static delegate* unmanaged _AllocateNetMessageByPartialName; + + public unsafe static nint AllocateNetMessageByPartialName(string name) + { + byte[] nameBuffer = Encoding.UTF8.GetBytes(name + "\0"); + fixed (byte* nameBufferPtr = nameBuffer) + { + var ret = _AllocateNetMessageByPartialName(nameBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _DeallocateNetMessage; + + public unsafe static void DeallocateNetMessage(nint netmsg) + { + _DeallocateNetMessage(netmsg); + } + + private unsafe static delegate* unmanaged _HasField; + + public unsafe static bool HasField(nint netmsg, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _HasField(netmsg, fieldNameBufferPtr); + return ret == 1; + } + } + + private unsafe static delegate* unmanaged _GetInt32; + + public unsafe static int GetInt32(nint netmsg, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetInt32(netmsg, fieldNameBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetRepeatedInt32; + + public unsafe static int GetRepeatedInt32(nint netmsg, string fieldName, int index) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetRepeatedInt32(netmsg, fieldNameBufferPtr, index); + return ret; + } + } + + private unsafe static delegate* unmanaged _SetInt32; + + public unsafe static void SetInt32(nint netmsg, string fieldName, int value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetInt32(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetRepeatedInt32; + + public unsafe static void SetRepeatedInt32(nint netmsg, string fieldName, int index, int value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetRepeatedInt32(netmsg, fieldNameBufferPtr, index, value); + } + } + + private unsafe static delegate* unmanaged _AddInt32; + + public unsafe static void AddInt32(nint netmsg, string fieldName, int value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _AddInt32(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _GetInt64; + + public unsafe static long GetInt64(nint netmsg, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetInt64(netmsg, fieldNameBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetRepeatedInt64; + + public unsafe static long GetRepeatedInt64(nint netmsg, string fieldName, int index) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetRepeatedInt64(netmsg, fieldNameBufferPtr, index); + return ret; + } + } + + private unsafe static delegate* unmanaged _SetInt64; + + public unsafe static void SetInt64(nint netmsg, string fieldName, long value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetInt64(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetRepeatedInt64; + + public unsafe static void SetRepeatedInt64(nint netmsg, string fieldName, int index, long value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetRepeatedInt64(netmsg, fieldNameBufferPtr, index, value); + } + } + + private unsafe static delegate* unmanaged _AddInt64; + + public unsafe static void AddInt64(nint netmsg, string fieldName, long value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _AddInt64(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _GetUInt32; + + public unsafe static uint GetUInt32(nint netmsg, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetUInt32(netmsg, fieldNameBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetRepeatedUInt32; + + public unsafe static uint GetRepeatedUInt32(nint netmsg, string fieldName, int index) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetRepeatedUInt32(netmsg, fieldNameBufferPtr, index); + return ret; + } + } + + private unsafe static delegate* unmanaged _SetUInt32; + + public unsafe static void SetUInt32(nint netmsg, string fieldName, uint value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetUInt32(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetRepeatedUInt32; + + public unsafe static void SetRepeatedUInt32(nint netmsg, string fieldName, int index, uint value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetRepeatedUInt32(netmsg, fieldNameBufferPtr, index, value); + } + } + + private unsafe static delegate* unmanaged _AddUInt32; + + public unsafe static void AddUInt32(nint netmsg, string fieldName, uint value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _AddUInt32(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _GetUInt64; + + public unsafe static ulong GetUInt64(nint netmsg, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetUInt64(netmsg, fieldNameBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetRepeatedUInt64; + + public unsafe static ulong GetRepeatedUInt64(nint netmsg, string fieldName, int index) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetRepeatedUInt64(netmsg, fieldNameBufferPtr, index); + return ret; + } + } + + private unsafe static delegate* unmanaged _SetUInt64; + + public unsafe static void SetUInt64(nint netmsg, string fieldName, ulong value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetUInt64(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetRepeatedUInt64; + + public unsafe static void SetRepeatedUInt64(nint netmsg, string fieldName, int index, ulong value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetRepeatedUInt64(netmsg, fieldNameBufferPtr, index, value); + } + } + + private unsafe static delegate* unmanaged _AddUInt64; + + public unsafe static void AddUInt64(nint netmsg, string fieldName, ulong value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _AddUInt64(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _GetBool; + + public unsafe static bool GetBool(nint netmsg, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetBool(netmsg, fieldNameBufferPtr); + return ret == 1; + } + } + + private unsafe static delegate* unmanaged _GetRepeatedBool; + + public unsafe static bool GetRepeatedBool(nint netmsg, string fieldName, int index) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetRepeatedBool(netmsg, fieldNameBufferPtr, index); + return ret == 1; + } + } + + private unsafe static delegate* unmanaged _SetBool; + + public unsafe static void SetBool(nint netmsg, string fieldName, bool value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetBool(netmsg, fieldNameBufferPtr, value ? (byte)1 : (byte)0); + } + } + + private unsafe static delegate* unmanaged _SetRepeatedBool; + + public unsafe static void SetRepeatedBool(nint netmsg, string fieldName, int index, bool value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetRepeatedBool(netmsg, fieldNameBufferPtr, index, value ? (byte)1 : (byte)0); + } + } + + private unsafe static delegate* unmanaged _AddBool; + + public unsafe static void AddBool(nint netmsg, string fieldName, bool value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _AddBool(netmsg, fieldNameBufferPtr, value ? (byte)1 : (byte)0); + } + } + + private unsafe static delegate* unmanaged _GetFloat; + + public unsafe static float GetFloat(nint netmsg, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetFloat(netmsg, fieldNameBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetRepeatedFloat; + + public unsafe static float GetRepeatedFloat(nint netmsg, string fieldName, int index) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetRepeatedFloat(netmsg, fieldNameBufferPtr, index); + return ret; + } + } + + private unsafe static delegate* unmanaged _SetFloat; + + public unsafe static void SetFloat(nint netmsg, string fieldName, float value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetFloat(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetRepeatedFloat; + + public unsafe static void SetRepeatedFloat(nint netmsg, string fieldName, int index, float value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetRepeatedFloat(netmsg, fieldNameBufferPtr, index, value); + } + } + + private unsafe static delegate* unmanaged _AddFloat; + + public unsafe static void AddFloat(nint netmsg, string fieldName, float value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _AddFloat(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _GetDouble; + + public unsafe static double GetDouble(nint netmsg, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetDouble(netmsg, fieldNameBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetRepeatedDouble; + + public unsafe static double GetRepeatedDouble(nint netmsg, string fieldName, int index) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetRepeatedDouble(netmsg, fieldNameBufferPtr, index); + return ret; + } + } + + private unsafe static delegate* unmanaged _SetDouble; + + public unsafe static void SetDouble(nint netmsg, string fieldName, double value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetDouble(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetRepeatedDouble; + + public unsafe static void SetRepeatedDouble(nint netmsg, string fieldName, int index, double value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetRepeatedDouble(netmsg, fieldNameBufferPtr, index, value); + } + } + + private unsafe static delegate* unmanaged _AddDouble; + + public unsafe static void AddDouble(nint netmsg, string fieldName, double value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _AddDouble(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _GetString; + + public unsafe static string GetString(nint netmsg, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetString(null, netmsg, fieldNameBufferPtr); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetString(retBufferPtr, netmsg, fieldNameBufferPtr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } + } + } + + private unsafe static delegate* unmanaged _GetRepeatedString; + + public unsafe static string GetRepeatedString(nint netmsg, string fieldName, int index) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetRepeatedString(null, netmsg, fieldNameBufferPtr, index); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetRepeatedString(retBufferPtr, netmsg, fieldNameBufferPtr, index); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } + } + } + + private unsafe static delegate* unmanaged _SetString; + + public unsafe static void SetString(nint netmsg, string fieldName, string value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + byte[] valueBuffer = Encoding.UTF8.GetBytes(value + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + fixed (byte* valueBufferPtr = valueBuffer) + { + _SetString(netmsg, fieldNameBufferPtr, valueBufferPtr); + } + } + } + + private unsafe static delegate* unmanaged _SetRepeatedString; + + public unsafe static void SetRepeatedString(nint netmsg, string fieldName, int index, string value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + byte[] valueBuffer = Encoding.UTF8.GetBytes(value + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + fixed (byte* valueBufferPtr = valueBuffer) + { + _SetRepeatedString(netmsg, fieldNameBufferPtr, index, valueBufferPtr); + } + } + } + + private unsafe static delegate* unmanaged _AddString; + + public unsafe static void AddString(nint netmsg, string fieldName, string value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + byte[] valueBuffer = Encoding.UTF8.GetBytes(value + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + fixed (byte* valueBufferPtr = valueBuffer) + { + _AddString(netmsg, fieldNameBufferPtr, valueBufferPtr); + } + } + } + + private unsafe static delegate* unmanaged _GetVector2D; + + public unsafe static Vector2D GetVector2D(nint netmsg, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetVector2D(netmsg, fieldNameBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetRepeatedVector2D; + + public unsafe static Vector2D GetRepeatedVector2D(nint netmsg, string fieldName, int index) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetRepeatedVector2D(netmsg, fieldNameBufferPtr, index); + return ret; + } + } + + private unsafe static delegate* unmanaged _SetVector2D; + + public unsafe static void SetVector2D(nint netmsg, string fieldName, Vector2D value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetVector2D(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetRepeatedVector2D; + + public unsafe static void SetRepeatedVector2D(nint netmsg, string fieldName, int index, Vector2D value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetRepeatedVector2D(netmsg, fieldNameBufferPtr, index, value); + } + } + + private unsafe static delegate* unmanaged _AddVector2D; + + public unsafe static void AddVector2D(nint netmsg, string fieldName, Vector2D value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _AddVector2D(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _GetVector; + + public unsafe static Vector GetVector(nint netmsg, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetVector(netmsg, fieldNameBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetRepeatedVector; + + public unsafe static Vector GetRepeatedVector(nint netmsg, string fieldName, int index) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetRepeatedVector(netmsg, fieldNameBufferPtr, index); + return ret; + } + } + + private unsafe static delegate* unmanaged _SetVector; + + public unsafe static void SetVector(nint netmsg, string fieldName, Vector value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetVector(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetRepeatedVector; + + public unsafe static void SetRepeatedVector(nint netmsg, string fieldName, int index, Vector value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetRepeatedVector(netmsg, fieldNameBufferPtr, index, value); + } + } + + private unsafe static delegate* unmanaged _AddVector; + + public unsafe static void AddVector(nint netmsg, string fieldName, Vector value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _AddVector(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _GetColor; + + public unsafe static Color GetColor(nint netmsg, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetColor(netmsg, fieldNameBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetRepeatedColor; + + public unsafe static Color GetRepeatedColor(nint netmsg, string fieldName, int index) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetRepeatedColor(netmsg, fieldNameBufferPtr, index); + return ret; + } + } + + private unsafe static delegate* unmanaged _SetColor; + + public unsafe static void SetColor(nint netmsg, string fieldName, Color value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetColor(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetRepeatedColor; + + public unsafe static void SetRepeatedColor(nint netmsg, string fieldName, int index, Color value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetRepeatedColor(netmsg, fieldNameBufferPtr, index, value); + } + } + + private unsafe static delegate* unmanaged _AddColor; + + public unsafe static void AddColor(nint netmsg, string fieldName, Color value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _AddColor(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _GetQAngle; + + public unsafe static QAngle GetQAngle(nint netmsg, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetQAngle(netmsg, fieldNameBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetRepeatedQAngle; + + public unsafe static QAngle GetRepeatedQAngle(nint netmsg, string fieldName, int index) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetRepeatedQAngle(netmsg, fieldNameBufferPtr, index); + return ret; + } + } + + private unsafe static delegate* unmanaged _SetQAngle; + + public unsafe static void SetQAngle(nint netmsg, string fieldName, QAngle value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetQAngle(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _SetRepeatedQAngle; + + public unsafe static void SetRepeatedQAngle(nint netmsg, string fieldName, int index, QAngle value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetRepeatedQAngle(netmsg, fieldNameBufferPtr, index, value); + } + } + + private unsafe static delegate* unmanaged _AddQAngle; + + public unsafe static void AddQAngle(nint netmsg, string fieldName, QAngle value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _AddQAngle(netmsg, fieldNameBufferPtr, value); + } + } + + private unsafe static delegate* unmanaged _GetBytes; + + public unsafe static byte[] GetBytes(nint netmsg, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetBytes(null, netmsg, fieldNameBufferPtr); + var retBuffer = new byte[ret]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetBytes(retBufferPtr, netmsg, fieldNameBufferPtr); + var retBytes = new byte[ret]; + for (int i = 0; i < ret; i++) retBytes[i] = retBufferPtr[i]; + return retBytes; + } + } + } + + private unsafe static delegate* unmanaged _GetRepeatedBytes; + + public unsafe static byte[] GetRepeatedBytes(nint netmsg, string fieldName, int index) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetRepeatedBytes(null, netmsg, fieldNameBufferPtr, index); + var retBuffer = new byte[ret]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetRepeatedBytes(retBufferPtr, netmsg, fieldNameBufferPtr, index); + var retBytes = new byte[ret]; + for (int i = 0; i < ret; i++) retBytes[i] = retBufferPtr[i]; + return retBytes; + } + } + } + + private unsafe static delegate* unmanaged _SetBytes; + + public unsafe static void SetBytes(nint netmsg, string fieldName, byte[] value) + { + var valueLength = value.Length; + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + fixed (byte* valueBufferPtr = value) + { + _SetBytes(netmsg, fieldNameBufferPtr, valueBufferPtr, valueLength); + } + } + } + + private unsafe static delegate* unmanaged _SetRepeatedBytes; + + public unsafe static void SetRepeatedBytes(nint netmsg, string fieldName, int index, byte[] value) + { + var valueLength = value.Length; + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + fixed (byte* valueBufferPtr = value) + { + _SetRepeatedBytes(netmsg, fieldNameBufferPtr, index, valueBufferPtr, valueLength); + } + } + } + + private unsafe static delegate* unmanaged _AddBytes; + + public unsafe static void AddBytes(nint netmsg, string fieldName, byte[] value) + { + var valueLength = value.Length; + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + fixed (byte* valueBufferPtr = value) + { + _AddBytes(netmsg, fieldNameBufferPtr, valueBufferPtr, valueLength); + } + } + } + + private unsafe static delegate* unmanaged _GetNestedMessage; + + public unsafe static nint GetNestedMessage(nint netmsg, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetNestedMessage(netmsg, fieldNameBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetRepeatedNestedMessage; + + public unsafe static nint GetRepeatedNestedMessage(nint netmsg, string fieldName, int index) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetRepeatedNestedMessage(netmsg, fieldNameBufferPtr, index); + return ret; + } + } + + private unsafe static delegate* unmanaged _AddNestedMessage; + + public unsafe static nint AddNestedMessage(nint netmsg, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _AddNestedMessage(netmsg, fieldNameBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _GetRepeatedFieldSize; + + public unsafe static int GetRepeatedFieldSize(nint netmsg, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetRepeatedFieldSize(netmsg, fieldNameBufferPtr); + return ret; + } + } + + private unsafe static delegate* unmanaged _ClearRepeatedField; + + public unsafe static void ClearRepeatedField(nint netmsg, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _ClearRepeatedField(netmsg, fieldNameBufferPtr); + } + } + + private unsafe static delegate* unmanaged _SendMessage; + + public unsafe static void SendMessage(nint netmsg, int msgid, int playerid) + { + _SendMessage(netmsg, msgid, playerid); + } + + private unsafe static delegate* unmanaged _SendMessageToPlayers; + + /// + /// each bit in player_mask represents a playerid + /// + public unsafe static void SendMessageToPlayers(nint netmsg, int msgid, ulong playermask) + { + _SendMessageToPlayers(netmsg, msgid, playermask); + } + + private unsafe static delegate* unmanaged _AddNetMessageServerHook; + + /// + /// the callback should receive the following: uint64* playermask_ptr, int netmessage_id, void* netmsg, return bool (true -> ignored, false -> supercede) + /// + public unsafe static ulong AddNetMessageServerHook(nint callback) + { + var ret = _AddNetMessageServerHook(callback); + return ret; + } + + private unsafe static delegate* unmanaged _RemoveNetMessageServerHook; + + public unsafe static void RemoveNetMessageServerHook(ulong callbackID) + { + _RemoveNetMessageServerHook(callbackID); + } + + private unsafe static delegate* unmanaged _AddNetMessageClientHook; + + /// + /// the callback should receive the following: int32 playerid, int netmessage_id, void* netmsg, return bool (true -> ignored, false -> supercede) + /// + public unsafe static ulong AddNetMessageClientHook(nint callback) + { + var ret = _AddNetMessageClientHook(callback); + return ret; + } + + private unsafe static delegate* unmanaged _RemoveNetMessageClientHook; + + public unsafe static void RemoveNetMessageClientHook(ulong callbackID) + { + _RemoveNetMessageClientHook(callbackID); + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/Offsets.cs b/managed/src/SwiftlyS2.Generated/Natives/Offsets.cs index 8a06d82b8..7e72b7468 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/Offsets.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/Offsets.cs @@ -1,43 +1,37 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeOffsets { - private static int _MainThreadID; +internal static class NativeOffsets +{ + private static int _MainThreadID; - private unsafe static delegate* unmanaged _Exists; + private unsafe static delegate* unmanaged _Exists; - public unsafe static bool Exists(string name) { - var pool = ArrayPool.Shared; - var nameLength = Encoding.UTF8.GetByteCount(name); - var nameBuffer = pool.Rent(nameLength + 1); - Encoding.UTF8.GetBytes(name, nameBuffer); - nameBuffer[nameLength] = 0; - fixed (byte* nameBufferPtr = nameBuffer) { - var ret = _Exists(nameBufferPtr); - pool.Return(nameBuffer); - return ret == 1; + public unsafe static bool Exists(string name) + { + byte[] nameBuffer = Encoding.UTF8.GetBytes(name + "\0"); + fixed (byte* nameBufferPtr = nameBuffer) + { + var ret = _Exists(nameBufferPtr); + return ret == 1; + } } - } - private unsafe static delegate* unmanaged _Fetch; + private unsafe static delegate* unmanaged _Fetch; - public unsafe static int Fetch(string name) { - var pool = ArrayPool.Shared; - var nameLength = Encoding.UTF8.GetByteCount(name); - var nameBuffer = pool.Rent(nameLength + 1); - Encoding.UTF8.GetBytes(name, nameBuffer); - nameBuffer[nameLength] = 0; - fixed (byte* nameBufferPtr = nameBuffer) { - var ret = _Fetch(nameBufferPtr); - pool.Return(nameBuffer); - return ret; + public unsafe static int Fetch(string name) + { + byte[] nameBuffer = Encoding.UTF8.GetBytes(name + "\0"); + fixed (byte* nameBufferPtr = nameBuffer) + { + var ret = _Fetch(nameBufferPtr); + return ret; + } } - } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/Patches.cs b/managed/src/SwiftlyS2.Generated/Natives/Patches.cs index 8404fcff2..4ddb60fba 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/Patches.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/Patches.cs @@ -1,56 +1,47 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativePatches { - private static int _MainThreadID; +internal static class NativePatches +{ + private static int _MainThreadID; - private unsafe static delegate* unmanaged _Apply; + private unsafe static delegate* unmanaged _Apply; - public unsafe static void Apply(string patchName) { - var pool = ArrayPool.Shared; - var patchNameLength = Encoding.UTF8.GetByteCount(patchName); - var patchNameBuffer = pool.Rent(patchNameLength + 1); - Encoding.UTF8.GetBytes(patchName, patchNameBuffer); - patchNameBuffer[patchNameLength] = 0; - fixed (byte* patchNameBufferPtr = patchNameBuffer) { - _Apply(patchNameBufferPtr); - pool.Return(patchNameBuffer); + public unsafe static void Apply(string patchName) + { + byte[] patchNameBuffer = Encoding.UTF8.GetBytes(patchName + "\0"); + fixed (byte* patchNameBufferPtr = patchNameBuffer) + { + _Apply(patchNameBufferPtr); + } } - } - - private unsafe static delegate* unmanaged _Revert; - - public unsafe static void Revert(string patchName) { - var pool = ArrayPool.Shared; - var patchNameLength = Encoding.UTF8.GetByteCount(patchName); - var patchNameBuffer = pool.Rent(patchNameLength + 1); - Encoding.UTF8.GetBytes(patchName, patchNameBuffer); - patchNameBuffer[patchNameLength] = 0; - fixed (byte* patchNameBufferPtr = patchNameBuffer) { - _Revert(patchNameBufferPtr); - pool.Return(patchNameBuffer); + + private unsafe static delegate* unmanaged _Revert; + + public unsafe static void Revert(string patchName) + { + byte[] patchNameBuffer = Encoding.UTF8.GetBytes(patchName + "\0"); + fixed (byte* patchNameBufferPtr = patchNameBuffer) + { + _Revert(patchNameBufferPtr); + } } - } - - private unsafe static delegate* unmanaged _Exists; - - public unsafe static bool Exists(string patchName) { - var pool = ArrayPool.Shared; - var patchNameLength = Encoding.UTF8.GetByteCount(patchName); - var patchNameBuffer = pool.Rent(patchNameLength + 1); - Encoding.UTF8.GetBytes(patchName, patchNameBuffer); - patchNameBuffer[patchNameLength] = 0; - fixed (byte* patchNameBufferPtr = patchNameBuffer) { - var ret = _Exists(patchNameBufferPtr); - pool.Return(patchNameBuffer); - return ret == 1; + + private unsafe static delegate* unmanaged _Exists; + + public unsafe static bool Exists(string patchName) + { + byte[] patchNameBuffer = Encoding.UTF8.GetBytes(patchName + "\0"); + fixed (byte* patchNameBufferPtr = patchNameBuffer) + { + var ret = _Exists(patchNameBufferPtr); + return ret == 1; + } } - } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/Player.cs b/managed/src/SwiftlyS2.Generated/Natives/Player.cs index 818e735ff..33c5927d3 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/Player.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/Player.cs @@ -1,230 +1,231 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativePlayer { - private static int _MainThreadID; +internal static class NativePlayer +{ + private static int _MainThreadID; - private unsafe static delegate* unmanaged _SendMessage; + private unsafe static delegate* unmanaged _SendMessage; - public unsafe static void SendMessage(int playerid, int kind, string message) { - var pool = ArrayPool.Shared; - var messageLength = Encoding.UTF8.GetByteCount(message); - var messageBuffer = pool.Rent(messageLength + 1); - Encoding.UTF8.GetBytes(message, messageBuffer); - messageBuffer[messageLength] = 0; - fixed (byte* messageBufferPtr = messageBuffer) { - _SendMessage(playerid, kind, messageBufferPtr); - pool.Return(messageBuffer); + public unsafe static void SendMessage(int playerid, int kind, string message, int htmlDuration) + { + byte[] messageBuffer = Encoding.UTF8.GetBytes(message + "\0"); + fixed (byte* messageBufferPtr = messageBuffer) + { + _SendMessage(playerid, kind, messageBufferPtr, htmlDuration); + } } - } - private unsafe static delegate* unmanaged _IsFakeClient; + private unsafe static delegate* unmanaged _IsFakeClient; - public unsafe static bool IsFakeClient(int playerid) { - var ret = _IsFakeClient(playerid); - return ret == 1; - } + public unsafe static bool IsFakeClient(int playerid) + { + var ret = _IsFakeClient(playerid); + return ret == 1; + } - private unsafe static delegate* unmanaged _IsAuthorized; + private unsafe static delegate* unmanaged _IsAuthorized; - public unsafe static bool IsAuthorized(int playerid) { - var ret = _IsAuthorized(playerid); - return ret == 1; - } + public unsafe static bool IsAuthorized(int playerid) + { + var ret = _IsAuthorized(playerid); + return ret == 1; + } - private unsafe static delegate* unmanaged _GetConnectedTime; + private unsafe static delegate* unmanaged _GetConnectedTime; - public unsafe static uint GetConnectedTime(int playerid) { - var ret = _GetConnectedTime(playerid); - return ret; - } + public unsafe static uint GetConnectedTime(int playerid) + { + var ret = _GetConnectedTime(playerid); + return ret; + } - private unsafe static delegate* unmanaged _GetUnauthorizedSteamID; + private unsafe static delegate* unmanaged _GetUnauthorizedSteamID; - public unsafe static ulong GetUnauthorizedSteamID(int playerid) { - var ret = _GetUnauthorizedSteamID(playerid); - return ret; - } + public unsafe static ulong GetUnauthorizedSteamID(int playerid) + { + var ret = _GetUnauthorizedSteamID(playerid); + return ret; + } - private unsafe static delegate* unmanaged _GetSteamID; + private unsafe static delegate* unmanaged _GetSteamID; - public unsafe static ulong GetSteamID(int playerid) { - var ret = _GetSteamID(playerid); - return ret; - } + public unsafe static ulong GetSteamID(int playerid) + { + var ret = _GetSteamID(playerid); + return ret; + } - private unsafe static delegate* unmanaged _GetController; + private unsafe static delegate* unmanaged _GetController; - public unsafe static nint GetController(int playerid) { - var ret = _GetController(playerid); - return ret; - } + public unsafe static nint GetController(int playerid) + { + var ret = _GetController(playerid); + return ret; + } - private unsafe static delegate* unmanaged _GetPawn; + private unsafe static delegate* unmanaged _GetPawn; - public unsafe static nint GetPawn(int playerid) { - var ret = _GetPawn(playerid); - return ret; - } + public unsafe static nint GetPawn(int playerid) + { + var ret = _GetPawn(playerid); + return ret; + } - private unsafe static delegate* unmanaged _GetPlayerPawn; + private unsafe static delegate* unmanaged _GetPlayerPawn; - public unsafe static nint GetPlayerPawn(int playerid) { - var ret = _GetPlayerPawn(playerid); - return ret; - } + public unsafe static nint GetPlayerPawn(int playerid) + { + var ret = _GetPlayerPawn(playerid); + return ret; + } - private unsafe static delegate* unmanaged _GetPressedButtons; + private unsafe static delegate* unmanaged _GetPressedButtons; - public unsafe static ulong GetPressedButtons(int playerid) { - var ret = _GetPressedButtons(playerid); - return ret; - } + public unsafe static ulong GetPressedButtons(int playerid) + { + var ret = _GetPressedButtons(playerid); + return ret; + } - private unsafe static delegate* unmanaged _PerformCommand; + private unsafe static delegate* unmanaged _PerformCommand; - public unsafe static void PerformCommand(int playerid, string command) { - var pool = ArrayPool.Shared; - var commandLength = Encoding.UTF8.GetByteCount(command); - var commandBuffer = pool.Rent(commandLength + 1); - Encoding.UTF8.GetBytes(command, commandBuffer); - commandBuffer[commandLength] = 0; - fixed (byte* commandBufferPtr = commandBuffer) { - _PerformCommand(playerid, commandBufferPtr); - pool.Return(commandBuffer); + public unsafe static void PerformCommand(int playerid, string command) + { + byte[] commandBuffer = Encoding.UTF8.GetBytes(command + "\0"); + fixed (byte* commandBufferPtr = commandBuffer) + { + _PerformCommand(playerid, commandBufferPtr); + } } - } - - private unsafe static delegate* unmanaged _GetIPAddress; - public unsafe static string GetIPAddress(int playerid) { - var ret = _GetIPAddress(null, playerid); - var pool = ArrayPool.Shared; - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetIPAddress(retBufferPtr, playerid); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - return retString; + private unsafe static delegate* unmanaged _GetIPAddress; + + public unsafe static string GetIPAddress(int playerid) + { + var ret = _GetIPAddress(null, playerid); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetIPAddress(retBufferPtr, playerid); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } } - } - private unsafe static delegate* unmanaged _Kick; + private unsafe static delegate* unmanaged _Kick; - public unsafe static void Kick(int playerid, string reason, int gamereason) { - var pool = ArrayPool.Shared; - var reasonLength = Encoding.UTF8.GetByteCount(reason); - var reasonBuffer = pool.Rent(reasonLength + 1); - Encoding.UTF8.GetBytes(reason, reasonBuffer); - reasonBuffer[reasonLength] = 0; - fixed (byte* reasonBufferPtr = reasonBuffer) { - _Kick(playerid, reasonBufferPtr, gamereason); - pool.Return(reasonBuffer); + public unsafe static void Kick(int playerid, string reason, int gamereason) + { + byte[] reasonBuffer = Encoding.UTF8.GetBytes(reason + "\0"); + fixed (byte* reasonBufferPtr = reasonBuffer) + { + _Kick(playerid, reasonBufferPtr, gamereason); + } } - } - private unsafe static delegate* unmanaged _ShouldBlockTransmitEntity; + private unsafe static delegate* unmanaged _ShouldBlockTransmitEntity; - public unsafe static void ShouldBlockTransmitEntity(int playerid, int entityidx, bool shouldBlockTransmit) { - _ShouldBlockTransmitEntity(playerid, entityidx, shouldBlockTransmit ? (byte)1 : (byte)0); - } - - private unsafe static delegate* unmanaged _IsTransmitEntityBlocked; + public unsafe static void ShouldBlockTransmitEntity(int playerid, int entityidx, bool shouldBlockTransmit) + { + _ShouldBlockTransmitEntity(playerid, entityidx, shouldBlockTransmit ? (byte)1 : (byte)0); + } - public unsafe static bool IsTransmitEntityBlocked(int playerid, int entityidx) { - var ret = _IsTransmitEntityBlocked(playerid, entityidx); - return ret == 1; - } + private unsafe static delegate* unmanaged _IsTransmitEntityBlocked; - private unsafe static delegate* unmanaged _ClearTransmitEntityBlocked; + public unsafe static bool IsTransmitEntityBlocked(int playerid, int entityidx) + { + var ret = _IsTransmitEntityBlocked(playerid, entityidx); + return ret == 1; + } - public unsafe static void ClearTransmitEntityBlocked(int playerid) { - _ClearTransmitEntityBlocked(playerid); - } + private unsafe static delegate* unmanaged _ClearTransmitEntityBlocked; - private unsafe static delegate* unmanaged _ChangeTeam; + public unsafe static void ClearTransmitEntityBlocked(int playerid) + { + _ClearTransmitEntityBlocked(playerid); + } - public unsafe static void ChangeTeam(int playerid, int newteam) { - _ChangeTeam(playerid, newteam); - } + private unsafe static delegate* unmanaged _ChangeTeam; - private unsafe static delegate* unmanaged _SwitchTeam; + public unsafe static void ChangeTeam(int playerid, int newteam) + { + _ChangeTeam(playerid, newteam); + } - public unsafe static void SwitchTeam(int playerid, int newteam) { - _SwitchTeam(playerid, newteam); - } + private unsafe static delegate* unmanaged _SwitchTeam; - private unsafe static delegate* unmanaged _TakeDamage; + public unsafe static void SwitchTeam(int playerid, int newteam) + { + _SwitchTeam(playerid, newteam); + } - public unsafe static void TakeDamage(int playerid, nint dmginfo) { - _TakeDamage(playerid, dmginfo); - } + private unsafe static delegate* unmanaged _TakeDamage; - private unsafe static delegate* unmanaged _Teleport; + public unsafe static void TakeDamage(int playerid, nint dmginfo) + { + _TakeDamage(playerid, dmginfo); + } - public unsafe static void Teleport(int playerid, Vector pos, QAngle angle, Vector velocity) { - _Teleport(playerid, pos, angle, velocity); - } + private unsafe static delegate* unmanaged _Teleport; - private unsafe static delegate* unmanaged _GetLanguage; + public unsafe static void Teleport(int playerid, Vector pos, QAngle angle, Vector velocity) + { + _Teleport(playerid, pos, angle, velocity); + } - public unsafe static string GetLanguage(int playerid) { - var ret = _GetLanguage(null, playerid); - var pool = ArrayPool.Shared; - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetLanguage(retBufferPtr, playerid); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - return retString; + private unsafe static delegate* unmanaged _GetLanguage; + + public unsafe static string GetLanguage(int playerid) + { + var ret = _GetLanguage(null, playerid); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetLanguage(retBufferPtr, playerid); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } } - } - private unsafe static delegate* unmanaged _SetCenterMenuRender; + private unsafe static delegate* unmanaged _SetCenterMenuRender; - public unsafe static void SetCenterMenuRender(int playerid, string text) { - var pool = ArrayPool.Shared; - var textLength = Encoding.UTF8.GetByteCount(text); - var textBuffer = pool.Rent(textLength + 1); - Encoding.UTF8.GetBytes(text, textBuffer); - textBuffer[textLength] = 0; - fixed (byte* textBufferPtr = textBuffer) { - _SetCenterMenuRender(playerid, textBufferPtr); - pool.Return(textBuffer); + public unsafe static void SetCenterMenuRender(int playerid, string text) + { + byte[] textBuffer = Encoding.UTF8.GetBytes(text + "\0"); + fixed (byte* textBufferPtr = textBuffer) + { + _SetCenterMenuRender(playerid, textBufferPtr); + } } - } - private unsafe static delegate* unmanaged _ClearCenterMenuRender; + private unsafe static delegate* unmanaged _ClearCenterMenuRender; - public unsafe static void ClearCenterMenuRender(int playerid) { - _ClearCenterMenuRender(playerid); - } + public unsafe static void ClearCenterMenuRender(int playerid) + { + _ClearCenterMenuRender(playerid); + } - private unsafe static delegate* unmanaged _HasMenuShown; + private unsafe static delegate* unmanaged _HasMenuShown; - public unsafe static bool HasMenuShown(int playerid) { - var ret = _HasMenuShown(playerid); - return ret == 1; - } + public unsafe static bool HasMenuShown(int playerid) + { + var ret = _HasMenuShown(playerid); + return ret == 1; + } - private unsafe static delegate* unmanaged _ExecuteCommand; + private unsafe static delegate* unmanaged _ExecuteCommand; - public unsafe static void ExecuteCommand(int playerid, string command) { - var pool = ArrayPool.Shared; - var commandLength = Encoding.UTF8.GetByteCount(command); - var commandBuffer = pool.Rent(commandLength + 1); - Encoding.UTF8.GetBytes(command, commandBuffer); - commandBuffer[commandLength] = 0; - fixed (byte* commandBufferPtr = commandBuffer) { - _ExecuteCommand(playerid, commandBufferPtr); - pool.Return(commandBuffer); + public unsafe static void ExecuteCommand(int playerid, string command) + { + byte[] commandBuffer = Encoding.UTF8.GetBytes(command + "\0"); + fixed (byte* commandBufferPtr = commandBuffer) + { + _ExecuteCommand(playerid, commandBufferPtr); + } } - } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/PlayerManager.cs b/managed/src/SwiftlyS2.Generated/Natives/PlayerManager.cs index 58b7b3d98..835d9756a 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/PlayerManager.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/PlayerManager.cs @@ -1,60 +1,62 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativePlayerManager { - private static int _MainThreadID; +internal static class NativePlayerManager +{ + private static int _MainThreadID; - private unsafe static delegate* unmanaged _IsPlayerOnline; + private unsafe static delegate* unmanaged _IsPlayerOnline; - public unsafe static bool IsPlayerOnline(int playerid) { - var ret = _IsPlayerOnline(playerid); - return ret == 1; - } + public unsafe static bool IsPlayerOnline(int playerid) + { + var ret = _IsPlayerOnline(playerid); + return ret == 1; + } - private unsafe static delegate* unmanaged _GetPlayerCount; + private unsafe static delegate* unmanaged _GetPlayerCount; - public unsafe static int GetPlayerCount() { - var ret = _GetPlayerCount(); - return ret; - } + public unsafe static int GetPlayerCount() + { + var ret = _GetPlayerCount(); + return ret; + } - private unsafe static delegate* unmanaged _GetPlayerCap; + private unsafe static delegate* unmanaged _GetPlayerCap; - public unsafe static int GetPlayerCap() { - var ret = _GetPlayerCap(); - return ret; - } + public unsafe static int GetPlayerCap() + { + var ret = _GetPlayerCap(); + return ret; + } - private unsafe static delegate* unmanaged _SendMessage; + private unsafe static delegate* unmanaged _SendMessage; - public unsafe static void SendMessage(int kind, string message) { - var pool = ArrayPool.Shared; - var messageLength = Encoding.UTF8.GetByteCount(message); - var messageBuffer = pool.Rent(messageLength + 1); - Encoding.UTF8.GetBytes(message, messageBuffer); - messageBuffer[messageLength] = 0; - fixed (byte* messageBufferPtr = messageBuffer) { - _SendMessage(kind, messageBufferPtr); - pool.Return(messageBuffer); + public unsafe static void SendMessage(int kind, string message, int duration) + { + byte[] messageBuffer = Encoding.UTF8.GetBytes(message + "\0"); + fixed (byte* messageBufferPtr = messageBuffer) + { + _SendMessage(kind, messageBufferPtr, duration); + } } - } - private unsafe static delegate* unmanaged _ShouldBlockTransmitEntity; + private unsafe static delegate* unmanaged _ShouldBlockTransmitEntity; - public unsafe static void ShouldBlockTransmitEntity(int entityidx, bool shouldBlockTransmit) { - _ShouldBlockTransmitEntity(entityidx, shouldBlockTransmit ? (byte)1 : (byte)0); - } + public unsafe static void ShouldBlockTransmitEntity(int entityidx, bool shouldBlockTransmit) + { + _ShouldBlockTransmitEntity(entityidx, shouldBlockTransmit ? (byte)1 : (byte)0); + } - private unsafe static delegate* unmanaged _ClearAllBlockedTransmitEntity; + private unsafe static delegate* unmanaged _ClearAllBlockedTransmitEntity; - public unsafe static void ClearAllBlockedTransmitEntity() { - _ClearAllBlockedTransmitEntity(); - } + public unsafe static void ClearAllBlockedTransmitEntity() + { + _ClearAllBlockedTransmitEntity(); + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/Schema.cs b/managed/src/SwiftlyS2.Generated/Natives/Schema.cs index 4253b05ad..de1cb5fc9 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/Schema.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/Schema.cs @@ -1,91 +1,87 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeSchema { - private static int _MainThreadID; +internal static class NativeSchema +{ + private static int _MainThreadID; - private unsafe static delegate* unmanaged _SetStateChanged; + private unsafe static delegate* unmanaged _SetStateChanged; - public unsafe static void SetStateChanged(nint entity, ulong hash) { - _SetStateChanged(entity, hash); - } + public unsafe static void SetStateChanged(nint entity, ulong hash) + { + _SetStateChanged(entity, hash); + } - private unsafe static delegate* unmanaged _FindChainOffset; + private unsafe static delegate* unmanaged _FindChainOffset; - public unsafe static uint FindChainOffset(string className) { - var pool = ArrayPool.Shared; - var classNameLength = Encoding.UTF8.GetByteCount(className); - var classNameBuffer = pool.Rent(classNameLength + 1); - Encoding.UTF8.GetBytes(className, classNameBuffer); - classNameBuffer[classNameLength] = 0; - fixed (byte* classNameBufferPtr = classNameBuffer) { - var ret = _FindChainOffset(classNameBufferPtr); - pool.Return(classNameBuffer); - return ret; + public unsafe static uint FindChainOffset(string className) + { + byte[] classNameBuffer = Encoding.UTF8.GetBytes(className + "\0"); + fixed (byte* classNameBufferPtr = classNameBuffer) + { + var ret = _FindChainOffset(classNameBufferPtr); + return ret; + } } - } - - private unsafe static delegate* unmanaged _GetOffset; - - public unsafe static int GetOffset(ulong hash) { - var ret = _GetOffset(hash); - return ret; - } - - private unsafe static delegate* unmanaged _IsStruct; - - public unsafe static bool IsStruct(string className) { - var pool = ArrayPool.Shared; - var classNameLength = Encoding.UTF8.GetByteCount(className); - var classNameBuffer = pool.Rent(classNameLength + 1); - Encoding.UTF8.GetBytes(className, classNameBuffer); - classNameBuffer[classNameLength] = 0; - fixed (byte* classNameBufferPtr = classNameBuffer) { - var ret = _IsStruct(classNameBufferPtr); - pool.Return(classNameBuffer); - return ret == 1; + + private unsafe static delegate* unmanaged _GetOffset; + + public unsafe static int GetOffset(ulong hash) + { + var ret = _GetOffset(hash); + return ret; } - } - - private unsafe static delegate* unmanaged _IsClassLoaded; - - public unsafe static bool IsClassLoaded(string className) { - var pool = ArrayPool.Shared; - var classNameLength = Encoding.UTF8.GetByteCount(className); - var classNameBuffer = pool.Rent(classNameLength + 1); - Encoding.UTF8.GetBytes(className, classNameBuffer); - classNameBuffer[classNameLength] = 0; - fixed (byte* classNameBufferPtr = classNameBuffer) { - var ret = _IsClassLoaded(classNameBufferPtr); - pool.Return(classNameBuffer); - return ret == 1; + + private unsafe static delegate* unmanaged _IsStruct; + + public unsafe static bool IsStruct(string className) + { + byte[] classNameBuffer = Encoding.UTF8.GetBytes(className + "\0"); + fixed (byte* classNameBufferPtr = classNameBuffer) + { + var ret = _IsStruct(classNameBufferPtr); + return ret == 1; + } } - } - private unsafe static delegate* unmanaged _GetPropPtr; + private unsafe static delegate* unmanaged _IsClassLoaded; - public unsafe static nint GetPropPtr(nint entity, ulong hash) { - var ret = _GetPropPtr(entity, hash); - return ret; - } + public unsafe static bool IsClassLoaded(string className) + { + byte[] classNameBuffer = Encoding.UTF8.GetBytes(className + "\0"); + fixed (byte* classNameBufferPtr = classNameBuffer) + { + var ret = _IsClassLoaded(classNameBufferPtr); + return ret == 1; + } + } - private unsafe static delegate* unmanaged _WritePropPtr; + private unsafe static delegate* unmanaged _GetPropPtr; - public unsafe static void WritePropPtr(nint entity, ulong hash, nint value, uint size) { - _WritePropPtr(entity, hash, value, size); - } + public unsafe static nint GetPropPtr(nint entity, ulong hash) + { + var ret = _GetPropPtr(entity, hash); + return ret; + } + + private unsafe static delegate* unmanaged _WritePropPtr; - private unsafe static delegate* unmanaged _GetVData; + public unsafe static void WritePropPtr(nint entity, ulong hash, nint value, uint size) + { + _WritePropPtr(entity, hash, value, size); + } - public unsafe static nint GetVData(nint entity) { - var ret = _GetVData(entity); - return ret; - } + private unsafe static delegate* unmanaged _GetVData; + + public unsafe static nint GetVData(nint entity) + { + var ret = _GetVData(entity); + return ret; + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/ServerHelpers.cs b/managed/src/SwiftlyS2.Generated/Natives/ServerHelpers.cs index d3cc02596..602373309 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/ServerHelpers.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/ServerHelpers.cs @@ -1,48 +1,50 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeServerHelpers { - private static int _MainThreadID; - - private unsafe static delegate* unmanaged _GetServerLanguage; - - public unsafe static string GetServerLanguage() { - var ret = _GetServerLanguage(null); - var pool = ArrayPool.Shared; - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetServerLanguage(retBufferPtr); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - return retString; +internal static class NativeServerHelpers +{ + private static int _MainThreadID; + + private unsafe static delegate* unmanaged _GetServerLanguage; + + public unsafe static string GetServerLanguage() + { + var ret = _GetServerLanguage(null); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetServerLanguage(retBufferPtr); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } } - } - private unsafe static delegate* unmanaged _UsePlayerLanguage; + private unsafe static delegate* unmanaged _UsePlayerLanguage; - public unsafe static bool UsePlayerLanguage() { - var ret = _UsePlayerLanguage(); - return ret == 1; - } + public unsafe static bool UsePlayerLanguage() + { + var ret = _UsePlayerLanguage(); + return ret == 1; + } - private unsafe static delegate* unmanaged _IsFollowingServerGuidelines; + private unsafe static delegate* unmanaged _IsFollowingServerGuidelines; - public unsafe static bool IsFollowingServerGuidelines() { - var ret = _IsFollowingServerGuidelines(); - return ret == 1; - } + public unsafe static bool IsFollowingServerGuidelines() + { + var ret = _IsFollowingServerGuidelines(); + return ret == 1; + } - private unsafe static delegate* unmanaged _UseAutoHotReload; + private unsafe static delegate* unmanaged _UseAutoHotReload; - public unsafe static bool UseAutoHotReload() { - var ret = _UseAutoHotReload(); - return ret == 1; - } + public unsafe static bool UseAutoHotReload() + { + var ret = _UseAutoHotReload(); + return ret == 1; + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/Signatures.cs b/managed/src/SwiftlyS2.Generated/Natives/Signatures.cs index 49003c1b2..b481e6a85 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/Signatures.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/Signatures.cs @@ -1,43 +1,37 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeSignatures { - private static int _MainThreadID; +internal static class NativeSignatures +{ + private static int _MainThreadID; - private unsafe static delegate* unmanaged _Exists; + private unsafe static delegate* unmanaged _Exists; - public unsafe static bool Exists(string signatureName) { - var pool = ArrayPool.Shared; - var signatureNameLength = Encoding.UTF8.GetByteCount(signatureName); - var signatureNameBuffer = pool.Rent(signatureNameLength + 1); - Encoding.UTF8.GetBytes(signatureName, signatureNameBuffer); - signatureNameBuffer[signatureNameLength] = 0; - fixed (byte* signatureNameBufferPtr = signatureNameBuffer) { - var ret = _Exists(signatureNameBufferPtr); - pool.Return(signatureNameBuffer); - return ret == 1; + public unsafe static bool Exists(string signatureName) + { + byte[] signatureNameBuffer = Encoding.UTF8.GetBytes(signatureName + "\0"); + fixed (byte* signatureNameBufferPtr = signatureNameBuffer) + { + var ret = _Exists(signatureNameBufferPtr); + return ret == 1; + } } - } - private unsafe static delegate* unmanaged _Fetch; + private unsafe static delegate* unmanaged _Fetch; - public unsafe static nint Fetch(string signatureName) { - var pool = ArrayPool.Shared; - var signatureNameLength = Encoding.UTF8.GetByteCount(signatureName); - var signatureNameBuffer = pool.Rent(signatureNameLength + 1); - Encoding.UTF8.GetBytes(signatureName, signatureNameBuffer); - signatureNameBuffer[signatureNameLength] = 0; - fixed (byte* signatureNameBufferPtr = signatureNameBuffer) { - var ret = _Fetch(signatureNameBufferPtr); - pool.Return(signatureNameBuffer); - return ret; + public unsafe static nint Fetch(string signatureName) + { + byte[] signatureNameBuffer = Encoding.UTF8.GetBytes(signatureName + "\0"); + fixed (byte* signatureNameBufferPtr = signatureNameBuffer) + { + var ret = _Fetch(signatureNameBufferPtr); + return ret; + } } - } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/Sounds.cs b/managed/src/SwiftlyS2.Generated/Natives/Sounds.cs index a06040bed..78586db32 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/Sounds.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/Sounds.cs @@ -1,306 +1,275 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeSounds { - private static int _MainThreadID; +internal static class NativeSounds +{ + private static int _MainThreadID; - private unsafe static delegate* unmanaged _CreateSoundEvent; + private unsafe static delegate* unmanaged _CreateSoundEvent; - public unsafe static nint CreateSoundEvent() { - var ret = _CreateSoundEvent(); - return ret; - } + public unsafe static nint CreateSoundEvent() + { + var ret = _CreateSoundEvent(); + return ret; + } - private unsafe static delegate* unmanaged _DestroySoundEvent; + private unsafe static delegate* unmanaged _DestroySoundEvent; - public unsafe static void DestroySoundEvent(nint soundEvent) { - _DestroySoundEvent(soundEvent); - } + public unsafe static void DestroySoundEvent(nint soundEvent) + { + _DestroySoundEvent(soundEvent); + } - private unsafe static delegate* unmanaged _Emit; + private unsafe static delegate* unmanaged _Emit; - public unsafe static uint Emit(nint soundEvent) { - if (Thread.CurrentThread.ManagedThreadId != _MainThreadID) { - throw new InvalidOperationException("This method can only be called from the main thread."); + public unsafe static uint Emit(nint soundEvent) + { + if (Thread.CurrentThread.ManagedThreadId != _MainThreadID) + { + throw new InvalidOperationException("This method can only be called from the main thread."); + } + var ret = _Emit(soundEvent); + return ret; } - var ret = _Emit(soundEvent); - return ret; - } - - private unsafe static delegate* unmanaged _SetName; - - public unsafe static void SetName(nint soundEvent, string name) { - var pool = ArrayPool.Shared; - var nameLength = Encoding.UTF8.GetByteCount(name); - var nameBuffer = pool.Rent(nameLength + 1); - Encoding.UTF8.GetBytes(name, nameBuffer); - nameBuffer[nameLength] = 0; - fixed (byte* nameBufferPtr = nameBuffer) { - _SetName(soundEvent, nameBufferPtr); - pool.Return(nameBuffer); + + private unsafe static delegate* unmanaged _SetName; + + public unsafe static void SetName(nint soundEvent, string name) + { + byte[] nameBuffer = Encoding.UTF8.GetBytes(name + "\0"); + fixed (byte* nameBufferPtr = nameBuffer) + { + _SetName(soundEvent, nameBufferPtr); + } } - } - - private unsafe static delegate* unmanaged _GetName; - - public unsafe static string GetName(nint soundEvent) { - var ret = _GetName(null, soundEvent); - var pool = ArrayPool.Shared; - var retBuffer = pool.Rent(ret + 1); - fixed (byte* retBufferPtr = retBuffer) { - ret = _GetName(retBufferPtr, soundEvent); - var retString = Encoding.UTF8.GetString(retBufferPtr, ret); - pool.Return(retBuffer); - return retString; + + private unsafe static delegate* unmanaged _GetName; + + public unsafe static string GetName(nint soundEvent) + { + var ret = _GetName(null, soundEvent); + var retBuffer = new byte[ret + 1]; + fixed (byte* retBufferPtr = retBuffer) + { + ret = _GetName(retBufferPtr, soundEvent); + return Encoding.UTF8.GetString(retBufferPtr, ret); + } } - } - private unsafe static delegate* unmanaged _SetSourceEntityIndex; + private unsafe static delegate* unmanaged _SetSourceEntityIndex; - public unsafe static void SetSourceEntityIndex(nint soundEvent, int index) { - _SetSourceEntityIndex(soundEvent, index); - } + public unsafe static void SetSourceEntityIndex(nint soundEvent, int index) + { + _SetSourceEntityIndex(soundEvent, index); + } - private unsafe static delegate* unmanaged _GetSourceEntityIndex; + private unsafe static delegate* unmanaged _GetSourceEntityIndex; - public unsafe static int GetSourceEntityIndex(nint soundEvent) { - var ret = _GetSourceEntityIndex(soundEvent); - return ret; - } + public unsafe static int GetSourceEntityIndex(nint soundEvent) + { + var ret = _GetSourceEntityIndex(soundEvent); + return ret; + } - private unsafe static delegate* unmanaged _AddClient; + private unsafe static delegate* unmanaged _AddClient; - public unsafe static void AddClient(nint soundEvent, int playerid) { - _AddClient(soundEvent, playerid); - } + public unsafe static void AddClient(nint soundEvent, int playerid) + { + _AddClient(soundEvent, playerid); + } - private unsafe static delegate* unmanaged _RemoveClient; + private unsafe static delegate* unmanaged _RemoveClient; - public unsafe static void RemoveClient(nint soundEvent, int playerid) { - _RemoveClient(soundEvent, playerid); - } + public unsafe static void RemoveClient(nint soundEvent, int playerid) + { + _RemoveClient(soundEvent, playerid); + } - private unsafe static delegate* unmanaged _ClearClients; + private unsafe static delegate* unmanaged _ClearClients; - public unsafe static void ClearClients(nint soundEvent) { - _ClearClients(soundEvent); - } + public unsafe static void ClearClients(nint soundEvent) + { + _ClearClients(soundEvent); + } - private unsafe static delegate* unmanaged _AddAllClients; + private unsafe static delegate* unmanaged _AddAllClients; - public unsafe static void AddAllClients(nint soundEvent) { - _AddAllClients(soundEvent); - } + public unsafe static void AddAllClients(nint soundEvent) + { + _AddAllClients(soundEvent); + } - private unsafe static delegate* unmanaged _HasField; + private unsafe static delegate* unmanaged _HasField; - public unsafe static bool HasField(nint soundEvent, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _HasField(soundEvent, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret == 1; + public unsafe static bool HasField(nint soundEvent, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _HasField(soundEvent, fieldNameBufferPtr); + return ret == 1; + } } - } - - private unsafe static delegate* unmanaged _SetBool; - - public unsafe static void SetBool(nint soundEvent, string fieldName, bool value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetBool(soundEvent, fieldNameBufferPtr, value ? (byte)1 : (byte)0); - pool.Return(fieldNameBuffer); + + private unsafe static delegate* unmanaged _SetBool; + + public unsafe static void SetBool(nint soundEvent, string fieldName, bool value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetBool(soundEvent, fieldNameBufferPtr, value ? (byte)1 : (byte)0); + } } - } - - private unsafe static delegate* unmanaged _GetBool; - - public unsafe static bool GetBool(nint soundEvent, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetBool(soundEvent, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret == 1; + + private unsafe static delegate* unmanaged _GetBool; + + public unsafe static bool GetBool(nint soundEvent, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetBool(soundEvent, fieldNameBufferPtr); + return ret == 1; + } } - } - - private unsafe static delegate* unmanaged _SetInt32; - - public unsafe static void SetInt32(nint soundEvent, string fieldName, int value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetInt32(soundEvent, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); + + private unsafe static delegate* unmanaged _SetInt32; + + public unsafe static void SetInt32(nint soundEvent, string fieldName, int value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetInt32(soundEvent, fieldNameBufferPtr, value); + } } - } - - private unsafe static delegate* unmanaged _GetInt32; - - public unsafe static int GetInt32(nint soundEvent, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetInt32(soundEvent, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret; + + private unsafe static delegate* unmanaged _GetInt32; + + public unsafe static int GetInt32(nint soundEvent, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetInt32(soundEvent, fieldNameBufferPtr); + return ret; + } } - } - - private unsafe static delegate* unmanaged _SetUInt32; - - public unsafe static void SetUInt32(nint soundEvent, string fieldName, uint value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetUInt32(soundEvent, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); + + private unsafe static delegate* unmanaged _SetUInt32; + + public unsafe static void SetUInt32(nint soundEvent, string fieldName, uint value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetUInt32(soundEvent, fieldNameBufferPtr, value); + } } - } - - private unsafe static delegate* unmanaged _GetUInt32; - - public unsafe static uint GetUInt32(nint soundEvent, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetUInt32(soundEvent, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret; + + private unsafe static delegate* unmanaged _GetUInt32; + + public unsafe static uint GetUInt32(nint soundEvent, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetUInt32(soundEvent, fieldNameBufferPtr); + return ret; + } } - } - - private unsafe static delegate* unmanaged _SetUInt64; - - public unsafe static void SetUInt64(nint soundEvent, string fieldName, ulong value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetUInt64(soundEvent, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); + + private unsafe static delegate* unmanaged _SetUInt64; + + public unsafe static void SetUInt64(nint soundEvent, string fieldName, ulong value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetUInt64(soundEvent, fieldNameBufferPtr, value); + } } - } - - private unsafe static delegate* unmanaged _GetUInt64; - - public unsafe static ulong GetUInt64(nint soundEvent, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetUInt64(soundEvent, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret; + + private unsafe static delegate* unmanaged _GetUInt64; + + public unsafe static ulong GetUInt64(nint soundEvent, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetUInt64(soundEvent, fieldNameBufferPtr); + return ret; + } } - } - - private unsafe static delegate* unmanaged _SetFloat; - - public unsafe static void SetFloat(nint soundEvent, string fieldName, float value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetFloat(soundEvent, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); + + private unsafe static delegate* unmanaged _SetFloat; + + public unsafe static void SetFloat(nint soundEvent, string fieldName, float value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetFloat(soundEvent, fieldNameBufferPtr, value); + } } - } - - private unsafe static delegate* unmanaged _GetFloat; - - public unsafe static float GetFloat(nint soundEvent, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetFloat(soundEvent, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret; + + private unsafe static delegate* unmanaged _GetFloat; + + public unsafe static float GetFloat(nint soundEvent, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetFloat(soundEvent, fieldNameBufferPtr); + return ret; + } } - } - - private unsafe static delegate* unmanaged _SetFloat3; - - public unsafe static void SetFloat3(nint soundEvent, string fieldName, Vector value) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - _SetFloat3(soundEvent, fieldNameBufferPtr, value); - pool.Return(fieldNameBuffer); + + private unsafe static delegate* unmanaged _SetFloat3; + + public unsafe static void SetFloat3(nint soundEvent, string fieldName, Vector value) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + _SetFloat3(soundEvent, fieldNameBufferPtr, value); + } } - } - - private unsafe static delegate* unmanaged _GetFloat3; - - public unsafe static Vector GetFloat3(nint soundEvent, string fieldName) { - var pool = ArrayPool.Shared; - var fieldNameLength = Encoding.UTF8.GetByteCount(fieldName); - var fieldNameBuffer = pool.Rent(fieldNameLength + 1); - Encoding.UTF8.GetBytes(fieldName, fieldNameBuffer); - fieldNameBuffer[fieldNameLength] = 0; - fixed (byte* fieldNameBufferPtr = fieldNameBuffer) { - var ret = _GetFloat3(soundEvent, fieldNameBufferPtr); - pool.Return(fieldNameBuffer); - return ret; + + private unsafe static delegate* unmanaged _GetFloat3; + + public unsafe static Vector GetFloat3(nint soundEvent, string fieldName) + { + byte[] fieldNameBuffer = Encoding.UTF8.GetBytes(fieldName + "\0"); + fixed (byte* fieldNameBufferPtr = fieldNameBuffer) + { + var ret = _GetFloat3(soundEvent, fieldNameBufferPtr); + return ret; + } } - } - private unsafe static delegate* unmanaged _GetClients; + private unsafe static delegate* unmanaged _GetClients; - /// - /// returns player mask - /// - public unsafe static ulong GetClients(nint soundEvent) { - var ret = _GetClients(soundEvent); - return ret; - } + /// + /// returns player mask + /// + public unsafe static ulong GetClients(nint soundEvent) + { + var ret = _GetClients(soundEvent); + return ret; + } - private unsafe static delegate* unmanaged _SetClients; + private unsafe static delegate* unmanaged _SetClients; - public unsafe static void SetClients(nint soundEvent, ulong playermask) { - _SetClients(soundEvent, playermask); - } + public unsafe static void SetClients(nint soundEvent, ulong playermask) + { + _SetClients(soundEvent, playermask); + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/Test.cs b/managed/src/SwiftlyS2.Generated/Natives/Test.cs index fd32dd2c6..f5ba662c3 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/Test.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/Test.cs @@ -1,20 +1,21 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeTest { - private static int _MainThreadID; +internal static class NativeTest +{ + private static int _MainThreadID; - private unsafe static delegate* unmanaged _Test; + private unsafe static delegate* unmanaged _Test; - public unsafe static nint Test() { - var ret = _Test(); - return ret; - } + public unsafe static nint Test() + { + var ret = _Test(); + return ret; + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/VGUI.cs b/managed/src/SwiftlyS2.Generated/Natives/VGUI.cs index ad6d06ee9..ee80b1a92 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/VGUI.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/VGUI.cs @@ -1,61 +1,63 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeVGUI { - private static int _MainThreadID; +internal static class NativeVGUI +{ + private static int _MainThreadID; - private unsafe static delegate* unmanaged _RegisterScreenText; + private unsafe static delegate* unmanaged _RegisterScreenText; - public unsafe static ulong RegisterScreenText() { - var ret = _RegisterScreenText(); - return ret; - } + public unsafe static ulong RegisterScreenText() + { + var ret = _RegisterScreenText(); + return ret; + } - private unsafe static delegate* unmanaged _UnregisterScreenText; + private unsafe static delegate* unmanaged _UnregisterScreenText; - public unsafe static void UnregisterScreenText(ulong textid) { - _UnregisterScreenText(textid); - } + public unsafe static void UnregisterScreenText(ulong textid) + { + _UnregisterScreenText(textid); + } - private unsafe static delegate* unmanaged _ScreenTextCreate; + private unsafe static delegate* unmanaged _ScreenTextCreate; - public unsafe static void ScreenTextCreate(ulong textid, Color col, int fontsize, bool drawBackground, bool isMenu) { - _ScreenTextCreate(textid, col, fontsize, drawBackground ? (byte)1 : (byte)0, isMenu ? (byte)1 : (byte)0); - } + public unsafe static void ScreenTextCreate(ulong textid, Color col, int fontsize, bool drawBackground, bool isMenu) + { + _ScreenTextCreate(textid, col, fontsize, drawBackground ? (byte)1 : (byte)0, isMenu ? (byte)1 : (byte)0); + } - private unsafe static delegate* unmanaged _ScreenTextSetText; + private unsafe static delegate* unmanaged _ScreenTextSetText; - public unsafe static void ScreenTextSetText(ulong textid, string text) { - var pool = ArrayPool.Shared; - var textLength = Encoding.UTF8.GetByteCount(text); - var textBuffer = pool.Rent(textLength + 1); - Encoding.UTF8.GetBytes(text, textBuffer); - textBuffer[textLength] = 0; - fixed (byte* textBufferPtr = textBuffer) { - _ScreenTextSetText(textid, textBufferPtr); - pool.Return(textBuffer); + public unsafe static void ScreenTextSetText(ulong textid, string text) + { + byte[] textBuffer = Encoding.UTF8.GetBytes(text + "\0"); + fixed (byte* textBufferPtr = textBuffer) + { + _ScreenTextSetText(textid, textBufferPtr); + } } - } - private unsafe static delegate* unmanaged _ScreenTextSetColor; + private unsafe static delegate* unmanaged _ScreenTextSetColor; - public unsafe static void ScreenTextSetColor(ulong textid, Color col) { - _ScreenTextSetColor(textid, col); - } + public unsafe static void ScreenTextSetColor(ulong textid, Color col) + { + _ScreenTextSetColor(textid, col); + } - private unsafe static delegate* unmanaged _ScreenTextSetPosition; + private unsafe static delegate* unmanaged _ScreenTextSetPosition; - /// - /// 0.0-1.0, where 0.0 is bottom/left, and 1.0 is top/right - /// - public unsafe static void ScreenTextSetPosition(ulong textid, float x, float y) { - _ScreenTextSetPosition(textid, x, y); - } + /// + /// 0.0-1.0, where 0.0 is bottom/left, and 1.0 is top/right + /// + public unsafe static void ScreenTextSetPosition(ulong textid, float x, float y) + { + _ScreenTextSetPosition(textid, x, y); + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Natives/VoiceManager.cs b/managed/src/SwiftlyS2.Generated/Natives/VoiceManager.cs index c9418a374..674514bea 100644 --- a/managed/src/SwiftlyS2.Generated/Natives/VoiceManager.cs +++ b/managed/src/SwiftlyS2.Generated/Natives/VoiceManager.cs @@ -1,39 +1,43 @@ #pragma warning disable CS0649 #pragma warning disable CS0169 -using System.Buffers; using System.Text; using System.Threading; using SwiftlyS2.Shared.Natives; namespace SwiftlyS2.Core.Natives; -internal static class NativeVoiceManager { - private static int _MainThreadID; +internal static class NativeVoiceManager +{ + private static int _MainThreadID; - private unsafe static delegate* unmanaged _SetClientListenOverride; + private unsafe static delegate* unmanaged _SetClientListenOverride; - public unsafe static void SetClientListenOverride(int playerid, int targetid, int listenOverride) { - _SetClientListenOverride(playerid, targetid, listenOverride); - } + public unsafe static void SetClientListenOverride(int playerid, int targetid, int listenOverride) + { + _SetClientListenOverride(playerid, targetid, listenOverride); + } - private unsafe static delegate* unmanaged _GetClientListenOverride; + private unsafe static delegate* unmanaged _GetClientListenOverride; - public unsafe static int GetClientListenOverride(int playerid, int targetid) { - var ret = _GetClientListenOverride(playerid, targetid); - return ret; - } + public unsafe static int GetClientListenOverride(int playerid, int targetid) + { + var ret = _GetClientListenOverride(playerid, targetid); + return ret; + } - private unsafe static delegate* unmanaged _SetClientVoiceFlags; + private unsafe static delegate* unmanaged _SetClientVoiceFlags; - public unsafe static void SetClientVoiceFlags(int playerid, int flags) { - _SetClientVoiceFlags(playerid, flags); - } + public unsafe static void SetClientVoiceFlags(int playerid, int flags) + { + _SetClientVoiceFlags(playerid, flags); + } - private unsafe static delegate* unmanaged _GetClientVoiceFlags; + private unsafe static delegate* unmanaged _GetClientVoiceFlags; - public unsafe static int GetClientVoiceFlags(int playerid) { - var ret = _GetClientVoiceFlags(playerid); - return ret; - } + public unsafe static int GetClientVoiceFlags(int playerid) + { + var ret = _GetClientVoiceFlags(playerid); + return ret; + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Protobufs/Classes/CEconItemPreviewDataBlock_StickerImpl.cs b/managed/src/SwiftlyS2.Generated/Protobufs/Classes/CEconItemPreviewDataBlock_StickerImpl.cs index 7b61f59df..378af5faa 100644 --- a/managed/src/SwiftlyS2.Generated/Protobufs/Classes/CEconItemPreviewDataBlock_StickerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Protobufs/Classes/CEconItemPreviewDataBlock_StickerImpl.cs @@ -57,4 +57,8 @@ public uint Pattern public uint HighlightReel { get => Accessor.GetUInt32("highlight_reel"); set => Accessor.SetUInt32("highlight_reel", value); } + + public uint WrappedSticker + { get => Accessor.GetUInt32("wrapped_sticker"); set => Accessor.SetUInt32("wrapped_sticker", value); } + } diff --git a/managed/src/SwiftlyS2.Generated/Protobufs/Classes/CMsgPlayerBulletHitImpl.cs b/managed/src/SwiftlyS2.Generated/Protobufs/Classes/CMsgPlayerBulletHitImpl.cs new file mode 100644 index 000000000..f08f94236 --- /dev/null +++ b/managed/src/SwiftlyS2.Generated/Protobufs/Classes/CMsgPlayerBulletHitImpl.cs @@ -0,0 +1,44 @@ + +using SwiftlyS2.Core.Natives; +using SwiftlyS2.Core.NetMessages; +using SwiftlyS2.Shared.Natives; +using SwiftlyS2.Shared.NetMessages; +using SwiftlyS2.Shared.ProtobufDefinitions; + +namespace SwiftlyS2.Core.ProtobufDefinitions; + +internal class CMsgPlayerBulletHitImpl : TypedProtobuf, CMsgPlayerBulletHit +{ + public CMsgPlayerBulletHitImpl(nint handle, bool isManuallyAllocated): base(handle) + { + } + + + public int AttackerSlot + { get => Accessor.GetInt32("attacker_slot"); set => Accessor.SetInt32("attacker_slot", value); } + + + public int VictimSlot + { get => Accessor.GetInt32("victim_slot"); set => Accessor.SetInt32("victim_slot", value); } + + + public Vector VictimPos + { get => Accessor.GetVector("victim_pos"); set => Accessor.SetVector("victim_pos", value); } + + + public int HitGroup + { get => Accessor.GetInt32("hit_group"); set => Accessor.SetInt32("hit_group", value); } + + + public int Damage + { get => Accessor.GetInt32("damage"); set => Accessor.SetInt32("damage", value); } + + + public int PenetrationCount + { get => Accessor.GetInt32("penetration_count"); set => Accessor.SetInt32("penetration_count", value); } + + + public bool IsKill + { get => Accessor.GetBool("is_kill"); set => Accessor.SetBool("is_kill", value); } + +} diff --git a/managed/src/SwiftlyS2.Generated/Protobufs/Classes/CMsgTEFireBulletsImpl.cs b/managed/src/SwiftlyS2.Generated/Protobufs/Classes/CMsgTEFireBulletsImpl.cs index ebd3f9b73..580f462a8 100644 --- a/managed/src/SwiftlyS2.Generated/Protobufs/Classes/CMsgTEFireBulletsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Protobufs/Classes/CMsgTEFireBulletsImpl.cs @@ -74,6 +74,18 @@ public uint AttackType { get => Accessor.GetUInt32("attack_type"); set => Accessor.SetUInt32("attack_type", value); } + public bool PlayerInair + { get => Accessor.GetBool("player_inair"); set => Accessor.SetBool("player_inair", value); } + + + public bool PlayerScoped + { get => Accessor.GetBool("player_scoped"); set => Accessor.SetBool("player_scoped", value); } + + + public int Tick + { get => Accessor.GetInt32("tick"); set => Accessor.SetInt32("tick", value); } + + public CMsgTEFireBullets_Extra Extra { get => new CMsgTEFireBullets_ExtraImpl(NativeNetMessages.GetNestedMessage(Address, "extra"), false); } diff --git a/managed/src/SwiftlyS2.Generated/Protobufs/Enums/ECsgoGameEvents.cs b/managed/src/SwiftlyS2.Generated/Protobufs/Enums/ECsgoGameEvents.cs index bbb767b4f..4c59195fb 100644 --- a/managed/src/SwiftlyS2.Generated/Protobufs/Enums/ECsgoGameEvents.cs +++ b/managed/src/SwiftlyS2.Generated/Protobufs/Enums/ECsgoGameEvents.cs @@ -6,4 +6,5 @@ public enum ECsgoGameEvents GE_PlayerAnimEventId = 450, GE_RadioIconEventId = 451, GE_FireBulletsId = 452, + GE_PlayerBulletHitId = 453, } diff --git a/managed/src/SwiftlyS2.Generated/Protobufs/Enums/EGCItemCustomizationNotification.cs b/managed/src/SwiftlyS2.Generated/Protobufs/Enums/EGCItemCustomizationNotification.cs index c9ef77e29..4a571698f 100644 --- a/managed/src/SwiftlyS2.Generated/Protobufs/Enums/EGCItemCustomizationNotification.cs +++ b/managed/src/SwiftlyS2.Generated/Protobufs/Enums/EGCItemCustomizationNotification.cs @@ -15,6 +15,8 @@ public enum EGCItemCustomizationNotification k_EGCItemCustomizationNotification_NameBaseItem = 1019, k_EGCItemCustomizationNotification_RemoveItemName = 1030, k_EGCItemCustomizationNotification_RemoveSticker = 1053, + k_EGCItemCustomizationNotification_ExtractSticker = 1054, + k_EGCItemCustomizationNotification_EncapsulateSticker = 1055, k_EGCItemCustomizationNotification_ApplySticker = 1086, k_EGCItemCustomizationNotification_StatTrakSwap = 1088, k_EGCItemCustomizationNotification_RemovePatch = 1089, diff --git a/managed/src/SwiftlyS2.Generated/Protobufs/Interfaces/CEconItemPreviewDataBlock_Sticker.cs b/managed/src/SwiftlyS2.Generated/Protobufs/Interfaces/CEconItemPreviewDataBlock_Sticker.cs index 5358d4068..dd44d61a5 100644 --- a/managed/src/SwiftlyS2.Generated/Protobufs/Interfaces/CEconItemPreviewDataBlock_Sticker.cs +++ b/managed/src/SwiftlyS2.Generated/Protobufs/Interfaces/CEconItemPreviewDataBlock_Sticker.cs @@ -42,4 +42,7 @@ public interface CEconItemPreviewDataBlock_Sticker : ITypedProtobuf +{ + static CMsgPlayerBulletHit ITypedProtobuf.Wrap(nint handle, bool isManuallyAllocated) => new CMsgPlayerBulletHitImpl(handle, isManuallyAllocated); + + + public int AttackerSlot { get; set; } + + + public int VictimSlot { get; set; } + + + public Vector VictimPos { get; set; } + + + public int HitGroup { get; set; } + + + public int Damage { get; set; } + + + public int PenetrationCount { get; set; } + + + public bool IsKill { get; set; } + +} diff --git a/managed/src/SwiftlyS2.Generated/Protobufs/Interfaces/CMsgTEFireBullets.cs b/managed/src/SwiftlyS2.Generated/Protobufs/Interfaces/CMsgTEFireBullets.cs index 1c9f9db95..f839e9848 100644 --- a/managed/src/SwiftlyS2.Generated/Protobufs/Interfaces/CMsgTEFireBullets.cs +++ b/managed/src/SwiftlyS2.Generated/Protobufs/Interfaces/CMsgTEFireBullets.cs @@ -60,6 +60,15 @@ public interface CMsgTEFireBullets : ITypedProtobuf, INetMess public uint AttackType { get; set; } + public bool PlayerInair { get; set; } + + + public bool PlayerScoped { get; set; } + + + public int Tick { get; set; } + + public CMsgTEFireBullets_Extra Extra { get; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AABB_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AABB_tImpl.cs index f0fcbee1a..38c544413 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AABB_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AABB_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class AABB_tImpl : SchemaClass, AABB_t { public AABB_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinBoundsOffset = new(() => Schema.GetOffset(0xC0D32A84114799FE), LazyThreadSafetyMode.None); + public ref Vector MinBounds { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0D32A84114799FE)); + get => ref _Handle.AsRef(_MinBoundsOffset.Value); } + private static readonly Lazy _MaxBoundsOffset = new(() => Schema.GetOffset(0xC0D32A84C0B4CE60), LazyThreadSafetyMode.None); + public ref Vector MaxBounds { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0D32A84C0B4CE60)); + get => ref _Handle.AsRef(_MaxBoundsOffset.Value); } public void MinBoundsUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ActiveModelConfig_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ActiveModelConfig_tImpl.cs index dfc3e3ba3..fd0b97256 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ActiveModelConfig_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ActiveModelConfig_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class ActiveModelConfig_tImpl : SchemaClass, ActiveModelConfig_ public ActiveModelConfig_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _HandleOffset = new(() => Schema.GetOffset(0x554D81919D208453), LazyThreadSafetyMode.None); + public ModelConfigHandle_t Handle { - get => new ModelConfigHandle_tImpl(_Handle + Schema.GetOffset(0x554D81919D208453)); + get => new ModelConfigHandle_tImpl(_Handle + _HandleOffset.Value); } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x554D8191CAE8A266), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x554D8191CAE8A266)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x554D8191CAE8A266, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _AssociatedEntitiesOffset = new(() => Schema.GetOffset(0x554D8191D6EB4F18), LazyThreadSafetyMode.None); + public ref CUtlVector> AssociatedEntities { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x554D8191D6EB4F18)); + get => ref _Handle.AsRef>>(_AssociatedEntitiesOffset.Value); } + private static readonly Lazy _AssociatedEntityNamesOffset = new(() => Schema.GetOffset(0x554D8191EB3B241C), LazyThreadSafetyMode.None); + public ref CUtlVector AssociatedEntityNames { - get => ref _Handle.AsRef>(Schema.GetOffset(0x554D8191EB3B241C)); + get => ref _Handle.AsRef>(_AssociatedEntityNamesOffset.Value); } public void HandleUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateInstanceStreamOnDiskData_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateInstanceStreamOnDiskData_tImpl.cs index 877709620..c5a09626e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateInstanceStreamOnDiskData_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateInstanceStreamOnDiskData_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class AggregateInstanceStreamOnDiskData_tImpl : SchemaClass, Ag public AggregateInstanceStreamOnDiskData_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _DecodedSizeOffset = new(() => Schema.GetOffset(0x8EDB1298803205A0), LazyThreadSafetyMode.None); + public ref uint DecodedSize { - get => ref _Handle.AsRef(Schema.GetOffset(0x8EDB1298803205A0)); + get => ref _Handle.AsRef(_DecodedSizeOffset.Value); } + private static readonly Lazy _BufferDataOffset = new(() => Schema.GetOffset(0x8EDB1298ED884C43), LazyThreadSafetyMode.None); + public ref CUtlBinaryBlock BufferData { - get => ref _Handle.AsRef(Schema.GetOffset(0x8EDB1298ED884C43)); + get => ref _Handle.AsRef(_BufferDataOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateLODSetup_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateLODSetup_tImpl.cs index 922255d52..5fd02452a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateLODSetup_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateLODSetup_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class AggregateLODSetup_tImpl : SchemaClass, AggregateLODSetup_ public AggregateLODSetup_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _LODOriginOffset = new(() => Schema.GetOffset(0xA931690332EC7486), LazyThreadSafetyMode.None); + public ref Vector LODOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0xA931690332EC7486)); + get => ref _Handle.AsRef(_LODOriginOffset.Value); } + private static readonly Lazy _MaxObjectScaleOffset = new(() => Schema.GetOffset(0xA9316903D0DAF878), LazyThreadSafetyMode.None); + public ref float MaxObjectScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xA9316903D0DAF878)); + get => ref _Handle.AsRef(_MaxObjectScaleOffset.Value); } + private static readonly Lazy _SwitchDistancesOffset = new(() => Schema.GetOffset(0xA9316903E49F3FC3), LazyThreadSafetyMode.None); + public ref CUtlVector SwitchDistances { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA9316903E49F3FC3)); + get => ref _Handle.AsRef>(_SwitchDistancesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateMeshInfo_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateMeshInfo_tImpl.cs index f0a2f0e8a..f7d5181bf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateMeshInfo_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateMeshInfo_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,65 @@ internal partial class AggregateMeshInfo_tImpl : SchemaClass, AggregateMeshInfo_ public AggregateMeshInfo_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _VisClusterMemberOffsetOffset = new(() => Schema.GetOffset(0x609E946C6C3F158), LazyThreadSafetyMode.None); + public ref uint VisClusterMemberOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x609E946C6C3F158)); + get => ref _Handle.AsRef(_VisClusterMemberOffsetOffset.Value); } + private static readonly Lazy _VisClusterMemberCountOffset = new(() => Schema.GetOffset(0x609E946C42DC1CA), LazyThreadSafetyMode.None); + public ref byte VisClusterMemberCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x609E946C42DC1CA)); + get => ref _Handle.AsRef(_VisClusterMemberCountOffset.Value); } + private static readonly Lazy _HasTransformOffset = new(() => Schema.GetOffset(0x609E9467D1E0F35), LazyThreadSafetyMode.None); + public ref bool HasTransform { - get => ref _Handle.AsRef(Schema.GetOffset(0x609E9467D1E0F35)); + get => ref _Handle.AsRef(_HasTransformOffset.Value); } + private static readonly Lazy _LODGroupMaskOffset = new(() => Schema.GetOffset(0x609E94672482103), LazyThreadSafetyMode.None); + public ref byte LODGroupMask { - get => ref _Handle.AsRef(Schema.GetOffset(0x609E94672482103)); + get => ref _Handle.AsRef(_LODGroupMaskOffset.Value); } + private static readonly Lazy _DrawCallIndexOffset = new(() => Schema.GetOffset(0x609E946FA5614D5), LazyThreadSafetyMode.None); + public ref short DrawCallIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x609E946FA5614D5)); + get => ref _Handle.AsRef(_DrawCallIndexOffset.Value); } + private static readonly Lazy _LODSetupIndexOffset = new(() => Schema.GetOffset(0x609E946FDC9C6B7), LazyThreadSafetyMode.None); + public ref short LODSetupIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x609E946FDC9C6B7)); + get => ref _Handle.AsRef(_LODSetupIndexOffset.Value); } + private static readonly Lazy _TintColorOffset = new(() => Schema.GetOffset(0x609E94650AFF21F), LazyThreadSafetyMode.None); + public ref Color TintColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x609E94650AFF21F)); + get => ref _Handle.AsRef(_TintColorOffset.Value); } + private static readonly Lazy _ObjectFlagsOffset = new(() => Schema.GetOffset(0x609E946E93821F5), LazyThreadSafetyMode.None); + public ref ObjectTypeFlags_t ObjectFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0x609E946E93821F5)); + get => ref _Handle.AsRef(_ObjectFlagsOffset.Value); } + private static readonly Lazy _LightProbeVolumePrecomputedHandshakeOffset = new(() => Schema.GetOffset(0x609E946C6233022), LazyThreadSafetyMode.None); + public ref int LightProbeVolumePrecomputedHandshake { - get => ref _Handle.AsRef(Schema.GetOffset(0x609E946C6233022)); + get => ref _Handle.AsRef(_LightProbeVolumePrecomputedHandshakeOffset.Value); } + private static readonly Lazy _InstanceStreamOffsetOffset = new(() => Schema.GetOffset(0x609E946DD604379), LazyThreadSafetyMode.None); + public ref uint InstanceStreamOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x609E946DD604379)); + get => ref _Handle.AsRef(_InstanceStreamOffsetOffset.Value); } + private static readonly Lazy _VertexAlbedoStreamOffsetOffset = new(() => Schema.GetOffset(0x609E94644E636B9), LazyThreadSafetyMode.None); + public ref uint VertexAlbedoStreamOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x609E94644E636B9)); + get => ref _Handle.AsRef(_VertexAlbedoStreamOffsetOffset.Value); } + private static readonly Lazy _InstanceStreamsOffset = new(() => Schema.GetOffset(0x609E94630D081BB), LazyThreadSafetyMode.None); + public ref AggregateInstanceStream_t InstanceStreams { - get => ref _Handle.AsRef(Schema.GetOffset(0x609E94630D081BB)); + get => ref _Handle.AsRef(_InstanceStreamsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateSceneObject_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateSceneObject_tImpl.cs index 9b8088d41..dabd17048 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateSceneObject_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateSceneObject_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class AggregateSceneObject_tImpl : SchemaClass, AggregateSceneO public AggregateSceneObject_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _AllFlagsOffset = new(() => Schema.GetOffset(0xEF81F2D4DD9F35F7), LazyThreadSafetyMode.None); + public ref ObjectTypeFlags_t AllFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0xEF81F2D4DD9F35F7)); + get => ref _Handle.AsRef(_AllFlagsOffset.Value); } + private static readonly Lazy _AnyFlagsOffset = new(() => Schema.GetOffset(0xEF81F2D456CC84B4), LazyThreadSafetyMode.None); + public ref ObjectTypeFlags_t AnyFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0xEF81F2D456CC84B4)); + get => ref _Handle.AsRef(_AnyFlagsOffset.Value); } + private static readonly Lazy _LayerOffset = new(() => Schema.GetOffset(0xEF81F2D4477C7B2A), LazyThreadSafetyMode.None); + public ref short Layer { - get => ref _Handle.AsRef(Schema.GetOffset(0xEF81F2D4477C7B2A)); + get => ref _Handle.AsRef(_LayerOffset.Value); } + private static readonly Lazy _InstanceStreamOffset = new(() => Schema.GetOffset(0xEF81F2D4B5A8384A), LazyThreadSafetyMode.None); + public ref short InstanceStream { - get => ref _Handle.AsRef(Schema.GetOffset(0xEF81F2D4B5A8384A)); + get => ref _Handle.AsRef(_InstanceStreamOffset.Value); } + private static readonly Lazy _VertexAlbedoStreamOffset = new(() => Schema.GetOffset(0xEF81F2D42540B1EA), LazyThreadSafetyMode.None); + public ref short VertexAlbedoStream { - get => ref _Handle.AsRef(Schema.GetOffset(0xEF81F2D42540B1EA)); + get => ref _Handle.AsRef(_VertexAlbedoStreamOffset.Value); } + private static readonly Lazy _AggregateMeshesOffset = new(() => Schema.GetOffset(0xEF81F2D402570BA1), LazyThreadSafetyMode.None); + public ref CUtlVector AggregateMeshes { - get => ref _Handle.AsRef>(Schema.GetOffset(0xEF81F2D402570BA1)); + get => ref _Handle.AsRef>(_AggregateMeshesOffset.Value); } + private static readonly Lazy _LodSetupsOffset = new(() => Schema.GetOffset(0xEF81F2D4B0CE61E2), LazyThreadSafetyMode.None); + public ref CUtlVector LodSetups { - get => ref _Handle.AsRef>(Schema.GetOffset(0xEF81F2D4B0CE61E2)); + get => ref _Handle.AsRef>(_LodSetupsOffset.Value); } + private static readonly Lazy _VisClusterMembershipOffset = new(() => Schema.GetOffset(0xEF81F2D4F2C828CD), LazyThreadSafetyMode.None); + public ref CUtlVector VisClusterMembership { - get => ref _Handle.AsRef>(Schema.GetOffset(0xEF81F2D4F2C828CD)); + get => ref _Handle.AsRef>(_VisClusterMembershipOffset.Value); } + private static readonly Lazy _FragmentTransformsOffset = new(() => Schema.GetOffset(0xEF81F2D4192EBA20), LazyThreadSafetyMode.None); + public ref CUtlVector FragmentTransforms { - get => ref _Handle.AsRef>(Schema.GetOffset(0xEF81F2D4192EBA20)); + get => ref _Handle.AsRef>(_FragmentTransformsOffset.Value); } + private static readonly Lazy _RenderableModelOffset = new(() => Schema.GetOffset(0xEF81F2D42AEEFA82), LazyThreadSafetyMode.None); + public ref CStrongHandle RenderableModel { - get => ref _Handle.AsRef>(Schema.GetOffset(0xEF81F2D42AEEFA82)); + get => ref _Handle.AsRef>(_RenderableModelOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateVertexAlbedoStreamOnDiskData_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateVertexAlbedoStreamOnDiskData_tImpl.cs index 4123ba640..2bb68d574 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateVertexAlbedoStreamOnDiskData_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AggregateVertexAlbedoStreamOnDiskData_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class AggregateVertexAlbedoStreamOnDiskData_tImpl : SchemaClass public AggregateVertexAlbedoStreamOnDiskData_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BufferDataOffset = new(() => Schema.GetOffset(0x2C9A1CB4ED884C43), LazyThreadSafetyMode.None); + public ref CUtlBinaryBlock BufferData { - get => ref _Handle.AsRef(Schema.GetOffset(0x2C9A1CB4ED884C43)); + get => ref _Handle.AsRef(_BufferDataOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AimCameraOpFixedSettings_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AimCameraOpFixedSettings_tImpl.cs index da94c6a9e..3406e66a9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AimCameraOpFixedSettings_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AimCameraOpFixedSettings_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class AimCameraOpFixedSettings_tImpl : SchemaClass, AimCameraOp public AimCameraOpFixedSettings_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChainIndexOffset = new(() => Schema.GetOffset(0xA3971F52A34589B6), LazyThreadSafetyMode.None); + public ref int ChainIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3971F52A34589B6)); + get => ref _Handle.AsRef(_ChainIndexOffset.Value); } + private static readonly Lazy _CameraJointIndexOffset = new(() => Schema.GetOffset(0xA3971F52346981DA), LazyThreadSafetyMode.None); + public ref int CameraJointIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3971F52346981DA)); + get => ref _Handle.AsRef(_CameraJointIndexOffset.Value); } + private static readonly Lazy _PelvisJointIndexOffset = new(() => Schema.GetOffset(0xA3971F52800F5FB4), LazyThreadSafetyMode.None); + public ref int PelvisJointIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3971F52800F5FB4)); + get => ref _Handle.AsRef(_PelvisJointIndexOffset.Value); } + private static readonly Lazy _ClavicleLeftJointIndexOffset = new(() => Schema.GetOffset(0xA3971F5207F7ABDB), LazyThreadSafetyMode.None); + public ref int ClavicleLeftJointIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3971F5207F7ABDB)); + get => ref _Handle.AsRef(_ClavicleLeftJointIndexOffset.Value); } + private static readonly Lazy _ClavicleRightJointIndexOffset = new(() => Schema.GetOffset(0xA3971F522F2C40A4), LazyThreadSafetyMode.None); + public ref int ClavicleRightJointIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3971F522F2C40A4)); + get => ref _Handle.AsRef(_ClavicleRightJointIndexOffset.Value); } + private static readonly Lazy _DepenetrationJointIndexOffset = new(() => Schema.GetOffset(0xA3971F526307286F), LazyThreadSafetyMode.None); + public ref int DepenetrationJointIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3971F526307286F)); + get => ref _Handle.AsRef(_DepenetrationJointIndexOffset.Value); } + private static readonly Lazy _PropJointsOffset = new(() => Schema.GetOffset(0xA3971F5224880565), LazyThreadSafetyMode.None); + public ref CUtlVector PropJoints { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA3971F5224880565)); + get => ref _Handle.AsRef>(_PropJointsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AimMatrixOpFixedSettings_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AimMatrixOpFixedSettings_tImpl.cs index c15ea40b1..77fdf27b1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AimMatrixOpFixedSettings_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AimMatrixOpFixedSettings_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,70 @@ internal partial class AimMatrixOpFixedSettings_tImpl : SchemaClass, AimMatrixOp public AimMatrixOpFixedSettings_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _AttachmentOffset = new(() => Schema.GetOffset(0xE059B1E02C5CA308), LazyThreadSafetyMode.None); + public CAnimAttachment Attachment { - get => new CAnimAttachmentImpl(_Handle + Schema.GetOffset(0xE059B1E02C5CA308)); + get => new CAnimAttachmentImpl(_Handle + _AttachmentOffset.Value); } + private static readonly Lazy _DampingOffset = new(() => Schema.GetOffset(0xE059B1E015440FB5), LazyThreadSafetyMode.None); + public CAnimInputDamping Damping { - get => new CAnimInputDampingImpl(_Handle + Schema.GetOffset(0xE059B1E015440FB5)); + get => new CAnimInputDampingImpl(_Handle + _DampingOffset.Value); } + private static readonly Lazy _PoseCacheHandlesOffset = new(() => Schema.GetOffset(0xE059B1E0E7BA8E61), LazyThreadSafetyMode.None); + public SchemaUntypedField PoseCacheHandles { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xE059B1E0E7BA8E61)); + get => new SchemaUntypedField(_Handle + _PoseCacheHandlesOffset.Value); } + private static readonly Lazy _BlendModeOffset = new(() => Schema.GetOffset(0xE059B1E0DBED6224), LazyThreadSafetyMode.None); + public ref AimMatrixBlendMode BlendMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xE059B1E0DBED6224)); + get => ref _Handle.AsRef(_BlendModeOffset.Value); } + private static readonly Lazy _MaxYawAngleOffset = new(() => Schema.GetOffset(0xE059B1E049BAD4B1), LazyThreadSafetyMode.None); + public ref float MaxYawAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0xE059B1E049BAD4B1)); + get => ref _Handle.AsRef(_MaxYawAngleOffset.Value); } + private static readonly Lazy _MaxPitchAngleOffset = new(() => Schema.GetOffset(0xE059B1E0AE96A782), LazyThreadSafetyMode.None); + public ref float MaxPitchAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0xE059B1E0AE96A782)); + get => ref _Handle.AsRef(_MaxPitchAngleOffset.Value); } + private static readonly Lazy _SequenceMaxFrameOffset = new(() => Schema.GetOffset(0xE059B1E05FD0AE0B), LazyThreadSafetyMode.None); + public ref int SequenceMaxFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0xE059B1E05FD0AE0B)); + get => ref _Handle.AsRef(_SequenceMaxFrameOffset.Value); } + private static readonly Lazy _BoneMaskIndexOffset = new(() => Schema.GetOffset(0xE059B1E04871547D), LazyThreadSafetyMode.None); + public ref int BoneMaskIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xE059B1E04871547D)); + get => ref _Handle.AsRef(_BoneMaskIndexOffset.Value); } + private static readonly Lazy _TargetIsPositionOffset = new(() => Schema.GetOffset(0xE059B1E014C34163), LazyThreadSafetyMode.None); + public ref bool TargetIsPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0xE059B1E014C34163)); + get => ref _Handle.AsRef(_TargetIsPositionOffset.Value); } + private static readonly Lazy _UseBiasAndClampOffset = new(() => Schema.GetOffset(0xE059B1E0F71F7341), LazyThreadSafetyMode.None); + public ref bool UseBiasAndClamp { - get => ref _Handle.AsRef(Schema.GetOffset(0xE059B1E0F71F7341)); + get => ref _Handle.AsRef(_UseBiasAndClampOffset.Value); } + private static readonly Lazy _BiasAndClampYawOffsetOffset = new(() => Schema.GetOffset(0xE059B1E07D3789F6), LazyThreadSafetyMode.None); + public ref float BiasAndClampYawOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xE059B1E07D3789F6)); + get => ref _Handle.AsRef(_BiasAndClampYawOffsetOffset.Value); } + private static readonly Lazy _BiasAndClampPitchOffsetOffset = new(() => Schema.GetOffset(0xE059B1E08421472F), LazyThreadSafetyMode.None); + public ref float BiasAndClampPitchOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xE059B1E08421472F)); + get => ref _Handle.AsRef(_BiasAndClampPitchOffsetOffset.Value); } + private static readonly Lazy _BiasAndClampBlendCurveOffset = new(() => Schema.GetOffset(0xE059B1E0D81016FE), LazyThreadSafetyMode.None); + public CBlendCurve BiasAndClampBlendCurve { - get => new CBlendCurveImpl(_Handle + Schema.GetOffset(0xE059B1E0D81016FE)); + get => new CBlendCurveImpl(_Handle + _BiasAndClampBlendCurveOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AmmoIndex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AmmoIndex_tImpl.cs index 0c6c1192c..8c1f53a6e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AmmoIndex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AmmoIndex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class AmmoIndex_tImpl : SchemaClass, AmmoIndex_t { public AmmoIndex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x47E6281EDCB0894A), LazyThreadSafetyMode.None); + public ref byte Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x47E6281EDCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AmmoTypeInfo_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AmmoTypeInfo_tImpl.cs index 6e294a383..f3fec8158 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AmmoTypeInfo_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AmmoTypeInfo_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class AmmoTypeInfo_tImpl : SchemaClass, AmmoTypeInfo_t { public AmmoTypeInfo_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaxCarryOffset = new(() => Schema.GetOffset(0xFC774B09B708280), LazyThreadSafetyMode.None); + public ref int MaxCarry { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC774B09B708280)); + get => ref _Handle.AsRef(_MaxCarryOffset.Value); } + private static readonly Lazy _SplashSizeOffset = new(() => Schema.GetOffset(0xFC774B045E320D3), LazyThreadSafetyMode.None); + public CRangeInt SplashSize { - get => new CRangeIntImpl(_Handle + Schema.GetOffset(0xFC774B045E320D3)); + get => new CRangeIntImpl(_Handle + _SplashSizeOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0xFC774B0CE6E9C28), LazyThreadSafetyMode.None); + public ref AmmoFlags_t Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC774B0CE6E9C28)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _MassOffset = new(() => Schema.GetOffset(0xFC774B0CD83D263), LazyThreadSafetyMode.None); + public ref float Mass { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC774B0CD83D263)); + get => ref _Handle.AsRef(_MassOffset.Value); } + private static readonly Lazy _SpeedOffset = new(() => Schema.GetOffset(0xFC774B0C631B7EA), LazyThreadSafetyMode.None); + public CRangeFloat Speed { - get => new CRangeFloatImpl(_Handle + Schema.GetOffset(0xFC774B0C631B7EA)); + get => new CRangeFloatImpl(_Handle + _SpeedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimComponentIDImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimComponentIDImpl.cs index 7876aaa76..1049d79ec 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimComponentIDImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimComponentIDImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class AnimComponentIDImpl : SchemaClass, AnimComponentID { public AnimComponentIDImpl(nint handle) : base(handle) { } + private static readonly Lazy _IdOffset = new(() => Schema.GetOffset(0xFE162672B4B6E980), LazyThreadSafetyMode.None); + public ref uint Id { - get => ref _Handle.AsRef(Schema.GetOffset(0xFE162672B4B6E980)); + get => ref _Handle.AsRef(_IdOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimNodeIDImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimNodeIDImpl.cs index 45cb1b044..15aef6a85 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimNodeIDImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimNodeIDImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class AnimNodeIDImpl : SchemaClass, AnimNodeID { public AnimNodeIDImpl(nint handle) : base(handle) { } + private static readonly Lazy _IdOffset = new(() => Schema.GetOffset(0x9E71ACD1B4B6E980), LazyThreadSafetyMode.None); + public ref uint Id { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E71ACD1B4B6E980)); + get => ref _Handle.AsRef(_IdOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimNodeOutputIDImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimNodeOutputIDImpl.cs index e9639284a..f4e7ce1c0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimNodeOutputIDImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimNodeOutputIDImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class AnimNodeOutputIDImpl : SchemaClass, AnimNodeOutputID { public AnimNodeOutputIDImpl(nint handle) : base(handle) { } + private static readonly Lazy _IdOffset = new(() => Schema.GetOffset(0x3873FD84B4B6E980), LazyThreadSafetyMode.None); + public ref uint Id { - get => ref _Handle.AsRef(Schema.GetOffset(0x3873FD84B4B6E980)); + get => ref _Handle.AsRef(_IdOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimParamIDImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimParamIDImpl.cs index 60818438a..2c69ed79a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimParamIDImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimParamIDImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class AnimParamIDImpl : SchemaClass, AnimParamID { public AnimParamIDImpl(nint handle) : base(handle) { } + private static readonly Lazy _IdOffset = new(() => Schema.GetOffset(0xFD66F334B4B6E980), LazyThreadSafetyMode.None); + public ref uint Id { - get => ref _Handle.AsRef(Schema.GetOffset(0xFD66F334B4B6E980)); + get => ref _Handle.AsRef(_IdOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimScriptHandleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimScriptHandleImpl.cs index bdd550429..64eaa4416 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimScriptHandleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimScriptHandleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class AnimScriptHandleImpl : SchemaClass, AnimScriptHandle { public AnimScriptHandleImpl(nint handle) : base(handle) { } + private static readonly Lazy _IdOffset = new(() => Schema.GetOffset(0x8A9EC535B4B6E980), LazyThreadSafetyMode.None); + public ref uint Id { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A9EC535B4B6E980)); + get => ref _Handle.AsRef(_IdOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimStateIDImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimStateIDImpl.cs index 7f496737f..6d13bcdd6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimStateIDImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimStateIDImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class AnimStateIDImpl : SchemaClass, AnimStateID { public AnimStateIDImpl(nint handle) : base(handle) { } + private static readonly Lazy _IdOffset = new(() => Schema.GetOffset(0x3C308CC0B4B6E980), LazyThreadSafetyMode.None); + public ref uint Id { - get => ref _Handle.AsRef(Schema.GetOffset(0x3C308CC0B4B6E980)); + get => ref _Handle.AsRef(_IdOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimTagIDImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimTagIDImpl.cs index ae1c48cfa..7472d0f08 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimTagIDImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimTagIDImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class AnimTagIDImpl : SchemaClass, AnimTagID { public AnimTagIDImpl(nint handle) : base(handle) { } + private static readonly Lazy _IdOffset = new(() => Schema.GetOffset(0xCEE1E76DB4B6E980), LazyThreadSafetyMode.None); + public ref uint Id { - get => ref _Handle.AsRef(Schema.GetOffset(0xCEE1E76DB4B6E980)); + get => ref _Handle.AsRef(_IdOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimationDecodeDebugDumpElement_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimationDecodeDebugDumpElement_tImpl.cs index f41647e6c..76d337f82 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimationDecodeDebugDumpElement_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimationDecodeDebugDumpElement_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,27 +17,39 @@ internal partial class AnimationDecodeDebugDumpElement_tImpl : SchemaClass, Anim public AnimationDecodeDebugDumpElement_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _EntityIndexOffset = new(() => Schema.GetOffset(0x4CAFE8F7BDB9BC5A), LazyThreadSafetyMode.None); + public ref int EntityIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x4CAFE8F7BDB9BC5A)); + get => ref _Handle.AsRef(_EntityIndexOffset.Value); } + private static readonly Lazy _ModelNameOffset = new(() => Schema.GetOffset(0x4CAFE8F75D35B6E1), LazyThreadSafetyMode.None); + public string ModelName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4CAFE8F75D35B6E1)); + var ptr = _Handle.Read(_ModelNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x4CAFE8F75D35B6E1, value); + set => Schema.SetString(_Handle, _ModelNameOffset.Value, value); } + private static readonly Lazy _PoseParamsOffset = new(() => Schema.GetOffset(0x4CAFE8F7B4A27762), LazyThreadSafetyMode.None); + public ref CUtlVector PoseParams { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4CAFE8F7B4A27762)); + get => ref _Handle.AsRef>(_PoseParamsOffset.Value); } + private static readonly Lazy _DecodeOpsOffset = new(() => Schema.GetOffset(0x4CAFE8F7D39502F9), LazyThreadSafetyMode.None); + public ref CUtlVector DecodeOps { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4CAFE8F7D39502F9)); + get => ref _Handle.AsRef>(_DecodeOpsOffset.Value); } + private static readonly Lazy _InternalOpsOffset = new(() => Schema.GetOffset(0x4CAFE8F775823E0C), LazyThreadSafetyMode.None); + public ref CUtlVector InternalOps { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4CAFE8F775823E0C)); + get => ref _Handle.AsRef>(_InternalOpsOffset.Value); } + private static readonly Lazy _DecodedAnimsOffset = new(() => Schema.GetOffset(0x4CAFE8F7B20FFAAD), LazyThreadSafetyMode.None); + public ref CUtlVector DecodedAnims { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4CAFE8F7B20FFAAD)); + get => ref _Handle.AsRef>(_DecodedAnimsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimationDecodeDebugDump_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimationDecodeDebugDump_tImpl.cs index c19b0e968..987084048 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimationDecodeDebugDump_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimationDecodeDebugDump_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class AnimationDecodeDebugDump_tImpl : SchemaClass, AnimationDe public AnimationDecodeDebugDump_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ProcessingTypeOffset = new(() => Schema.GetOffset(0xA584797F5F059FB6), LazyThreadSafetyMode.None); + public ref AnimationProcessingType_t ProcessingType { - get => ref _Handle.AsRef(Schema.GetOffset(0xA584797F5F059FB6)); + get => ref _Handle.AsRef(_ProcessingTypeOffset.Value); } + private static readonly Lazy _ElemsOffset = new(() => Schema.GetOffset(0xA584797F3F2FC92B), LazyThreadSafetyMode.None); + public ref CUtlVector Elems { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA584797F3F2FC92B)); + get => ref _Handle.AsRef>(_ElemsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimationSnapshotBase_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimationSnapshotBase_tImpl.cs index a4823a6f4..82f4ce39d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimationSnapshotBase_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimationSnapshotBase_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class AnimationSnapshotBase_tImpl : SchemaClass, AnimationSnaps public AnimationSnapshotBase_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _RealTimeOffset = new(() => Schema.GetOffset(0x608F9331168EC02), LazyThreadSafetyMode.None); + public ref float RealTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x608F9331168EC02)); + get => ref _Handle.AsRef(_RealTimeOffset.Value); } + private static readonly Lazy _RootToWorldOffset = new(() => Schema.GetOffset(0x608F9331F80AFC0), LazyThreadSafetyMode.None); + public ref matrix3x4_t RootToWorld { - get => ref _Handle.AsRef(Schema.GetOffset(0x608F9331F80AFC0)); + get => ref _Handle.AsRef(_RootToWorldOffset.Value); } + private static readonly Lazy _BonesInWorldSpaceOffset = new(() => Schema.GetOffset(0x608F933BDD22AA1), LazyThreadSafetyMode.None); + public ref bool BonesInWorldSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x608F933BDD22AA1)); + get => ref _Handle.AsRef(_BonesInWorldSpaceOffset.Value); } + private static readonly Lazy _BoneSetupMaskOffset = new(() => Schema.GetOffset(0x608F9334B3C48C8), LazyThreadSafetyMode.None); + public ref CUtlVector BoneSetupMask { - get => ref _Handle.AsRef>(Schema.GetOffset(0x608F9334B3C48C8)); + get => ref _Handle.AsRef>(_BoneSetupMaskOffset.Value); } + private static readonly Lazy _BoneTransformsOffset = new(() => Schema.GetOffset(0x608F933ED000DE6), LazyThreadSafetyMode.None); + public ref CUtlVector BoneTransforms { - get => ref _Handle.AsRef>(Schema.GetOffset(0x608F933ED000DE6)); + get => ref _Handle.AsRef>(_BoneTransformsOffset.Value); } + private static readonly Lazy _FlexControllersOffset = new(() => Schema.GetOffset(0x608F9337742939B), LazyThreadSafetyMode.None); + public ref CUtlVector FlexControllers { - get => ref _Handle.AsRef>(Schema.GetOffset(0x608F9337742939B)); + get => ref _Handle.AsRef>(_FlexControllersOffset.Value); } + private static readonly Lazy _SnapshotTypeOffset = new(() => Schema.GetOffset(0x608F933533E5725), LazyThreadSafetyMode.None); + public ref AnimationSnapshotType_t SnapshotType { - get => ref _Handle.AsRef(Schema.GetOffset(0x608F933533E5725)); + get => ref _Handle.AsRef(_SnapshotTypeOffset.Value); } + private static readonly Lazy _HasDecodeDumpOffset = new(() => Schema.GetOffset(0x608F933BECD8B97), LazyThreadSafetyMode.None); + public ref bool HasDecodeDump { - get => ref _Handle.AsRef(Schema.GetOffset(0x608F933BECD8B97)); + get => ref _Handle.AsRef(_HasDecodeDumpOffset.Value); } + private static readonly Lazy _DecodeDumpOffset = new(() => Schema.GetOffset(0x608F9332577A819), LazyThreadSafetyMode.None); + public AnimationDecodeDebugDumpElement_t DecodeDump { - get => new AnimationDecodeDebugDumpElement_tImpl(_Handle + Schema.GetOffset(0x608F9332577A819)); + get => new AnimationDecodeDebugDumpElement_tImpl(_Handle + _DecodeDumpOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimationSnapshot_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimationSnapshot_tImpl.cs index bb235806d..89ec347de 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimationSnapshot_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AnimationSnapshot_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class AnimationSnapshot_tImpl : AnimationSnapshotBase_tImpl, An public AnimationSnapshot_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _EntIndexOffset = new(() => Schema.GetOffset(0xAC640D3E5558C54A), LazyThreadSafetyMode.None); + public ref int EntIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xAC640D3E5558C54A)); + get => ref _Handle.AsRef(_EntIndexOffset.Value); } + private static readonly Lazy _ModelNameOffset = new(() => Schema.GetOffset(0xAC640D3E5D35B6E1), LazyThreadSafetyMode.None); + public string ModelName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xAC640D3E5D35B6E1)); + var ptr = _Handle.Read(_ModelNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xAC640D3E5D35B6E1, value); + set => Schema.SetString(_Handle, _ModelNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AttachmentHandle_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AttachmentHandle_tImpl.cs index b11e099a0..3321656a7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AttachmentHandle_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AttachmentHandle_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class AttachmentHandle_tImpl : SchemaClass, AttachmentHandle_t public AttachmentHandle_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x7F31E925DCB0894A), LazyThreadSafetyMode.None); + public ref byte Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x7F31E925DCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AutoRoomDoorwayPairs_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AutoRoomDoorwayPairs_tImpl.cs index 81ad7ed19..6e6e11c35 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/AutoRoomDoorwayPairs_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/AutoRoomDoorwayPairs_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class AutoRoomDoorwayPairs_tImpl : SchemaClass, AutoRoomDoorway public AutoRoomDoorwayPairs_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _P1Offset = new(() => Schema.GetOffset(0x735A94BECD01805E), LazyThreadSafetyMode.None); + public ref Vector P1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x735A94BECD01805E)); + get => ref _Handle.AsRef(_P1Offset.Value); } + private static readonly Lazy _P2Offset = new(() => Schema.GetOffset(0x735A94BECC017ECB), LazyThreadSafetyMode.None); + public ref Vector P2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x735A94BECC017ECB)); + get => ref _Handle.AsRef(_P2Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/BakedLightingInfo_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/BakedLightingInfo_tImpl.cs index 6e4a5f9da..cf2707d60 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/BakedLightingInfo_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/BakedLightingInfo_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class BakedLightingInfo_tImpl : SchemaClass, BakedLightingInfo_ public BakedLightingInfo_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _LightmapVersionNumberOffset = new(() => Schema.GetOffset(0x6909F4EF909450E0), LazyThreadSafetyMode.None); + public ref uint LightmapVersionNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x6909F4EF909450E0)); + get => ref _Handle.AsRef(_LightmapVersionNumberOffset.Value); } + private static readonly Lazy _LightmapGameVersionNumberOffset = new(() => Schema.GetOffset(0x6909F4EFC1181112), LazyThreadSafetyMode.None); + public ref uint LightmapGameVersionNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x6909F4EFC1181112)); + get => ref _Handle.AsRef(_LightmapGameVersionNumberOffset.Value); } + private static readonly Lazy _LightmapUvScaleOffset = new(() => Schema.GetOffset(0x6909F4EF36320516), LazyThreadSafetyMode.None); + public ref Vector2D LightmapUvScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x6909F4EF36320516)); + get => ref _Handle.AsRef(_LightmapUvScaleOffset.Value); } + private static readonly Lazy _HasLightmapsOffset = new(() => Schema.GetOffset(0x6909F4EF86932F1E), LazyThreadSafetyMode.None); + public ref bool HasLightmaps { - get => ref _Handle.AsRef(Schema.GetOffset(0x6909F4EF86932F1E)); + get => ref _Handle.AsRef(_HasLightmapsOffset.Value); } + private static readonly Lazy _BakedShadowsGamma20Offset = new(() => Schema.GetOffset(0x6909F4EF2FA903D4), LazyThreadSafetyMode.None); + public ref bool BakedShadowsGamma20 { - get => ref _Handle.AsRef(Schema.GetOffset(0x6909F4EF2FA903D4)); + get => ref _Handle.AsRef(_BakedShadowsGamma20Offset.Value); } + private static readonly Lazy _CompressionEnabledOffset = new(() => Schema.GetOffset(0x6909F4EF0082912E), LazyThreadSafetyMode.None); + public ref bool CompressionEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x6909F4EF0082912E)); + get => ref _Handle.AsRef(_CompressionEnabledOffset.Value); } + private static readonly Lazy _SHLightmapsOffset = new(() => Schema.GetOffset(0x6909F4EF04697DAD), LazyThreadSafetyMode.None); + public ref bool SHLightmaps { - get => ref _Handle.AsRef(Schema.GetOffset(0x6909F4EF04697DAD)); + get => ref _Handle.AsRef(_SHLightmapsOffset.Value); } + private static readonly Lazy _ChartPackIterationsOffset = new(() => Schema.GetOffset(0x6909F4EF7CF370A6), LazyThreadSafetyMode.None); + public ref byte ChartPackIterations { - get => ref _Handle.AsRef(Schema.GetOffset(0x6909F4EF7CF370A6)); + get => ref _Handle.AsRef(_ChartPackIterationsOffset.Value); } + private static readonly Lazy _VradQualityOffset = new(() => Schema.GetOffset(0x6909F4EFDFCA05D9), LazyThreadSafetyMode.None); + public ref byte VradQuality { - get => ref _Handle.AsRef(Schema.GetOffset(0x6909F4EFDFCA05D9)); + get => ref _Handle.AsRef(_VradQualityOffset.Value); } + private static readonly Lazy _LightMapsOffset = new(() => Schema.GetOffset(0x6909F4EF6F2EFF94), LazyThreadSafetyMode.None); + public ref CUtlVector> LightMaps { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x6909F4EF6F2EFF94)); + get => ref _Handle.AsRef>>(_LightMapsOffset.Value); } + private static readonly Lazy _BakedShadowsOffset = new(() => Schema.GetOffset(0x6909F4EFE8C9B481), LazyThreadSafetyMode.None); + public ref CUtlVector BakedShadows { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6909F4EFE8C9B481)); + get => ref _Handle.AsRef>(_BakedShadowsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/BakedLightingInfo_t__BakedShadowAssignment_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/BakedLightingInfo_t__BakedShadowAssignment_tImpl.cs index 465251c88..75e0911ee 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/BakedLightingInfo_t__BakedShadowAssignment_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/BakedLightingInfo_t__BakedShadowAssignment_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class BakedLightingInfo_t__BakedShadowAssignment_tImpl : Schema public BakedLightingInfo_t__BakedShadowAssignment_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _LightHashOffset = new(() => Schema.GetOffset(0x1A17A94C74E0509B), LazyThreadSafetyMode.None); + public ref uint LightHash { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A17A94C74E0509B)); + get => ref _Handle.AsRef(_LightHashOffset.Value); } + private static readonly Lazy _MapHashOffset = new(() => Schema.GetOffset(0x1A17A94CD5C02B59), LazyThreadSafetyMode.None); + public ref uint MapHash { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A17A94CD5C02B59)); + get => ref _Handle.AsRef(_MapHashOffset.Value); } + private static readonly Lazy _ShadowChannelOffset = new(() => Schema.GetOffset(0x1A17A94C10A02654), LazyThreadSafetyMode.None); + public ref byte ShadowChannel { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A17A94C10A02654)); + get => ref _Handle.AsRef(_ShadowChannelOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/BaseSceneObjectOverride_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/BaseSceneObjectOverride_tImpl.cs index 461b058b8..66430e30f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/BaseSceneObjectOverride_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/BaseSceneObjectOverride_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class BaseSceneObjectOverride_tImpl : SchemaClass, BaseSceneObj public BaseSceneObjectOverride_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SceneObjectIndexOffset = new(() => Schema.GetOffset(0xDC119FF44026A3B8), LazyThreadSafetyMode.None); + public ref uint SceneObjectIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC119FF44026A3B8)); + get => ref _Handle.AsRef(_SceneObjectIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/BlendItem_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/BlendItem_tImpl.cs index 55fbd734a..6d2dc4899 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/BlendItem_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/BlendItem_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class BlendItem_tImpl : SchemaClass, BlendItem_t { public BlendItem_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TagsOffset = new(() => Schema.GetOffset(0x8FC3054B46C8540), LazyThreadSafetyMode.None); + public ref CUtlVector Tags { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8FC3054B46C8540)); + get => ref _Handle.AsRef>(_TagsOffset.Value); } + private static readonly Lazy _ChildOffset = new(() => Schema.GetOffset(0x8FC30544A0B773F), LazyThreadSafetyMode.None); + public CAnimUpdateNodeRef Child { - get => new CAnimUpdateNodeRefImpl(_Handle + Schema.GetOffset(0x8FC30544A0B773F)); + get => new CAnimUpdateNodeRefImpl(_Handle + _ChildOffset.Value); } + private static readonly Lazy _SequenceOffset = new(() => Schema.GetOffset(0x8FC3054E0A0598E), LazyThreadSafetyMode.None); + public HSequence Sequence { - get => new HSequenceImpl(_Handle + Schema.GetOffset(0x8FC3054E0A0598E)); + get => new HSequenceImpl(_Handle + _SequenceOffset.Value); } + private static readonly Lazy _PosOffset = new(() => Schema.GetOffset(0x8FC3054DE9CFC5D), LazyThreadSafetyMode.None); + public ref Vector2D Pos { - get => ref _Handle.AsRef(Schema.GetOffset(0x8FC3054DE9CFC5D)); + get => ref _Handle.AsRef(_PosOffset.Value); } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0x8FC3054BC5E3BAB), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0x8FC3054BC5E3BAB)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _UseCustomDurationOffset = new(() => Schema.GetOffset(0x8FC3054F9BF05AB), LazyThreadSafetyMode.None); + public ref bool UseCustomDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x8FC3054F9BF05AB)); + get => ref _Handle.AsRef(_UseCustomDurationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/BoneDemoCaptureSettings_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/BoneDemoCaptureSettings_tImpl.cs index 6e8f7057e..9f92a109d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/BoneDemoCaptureSettings_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/BoneDemoCaptureSettings_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,30 +17,44 @@ internal partial class BoneDemoCaptureSettings_tImpl : SchemaClass, BoneDemoCapt public BoneDemoCaptureSettings_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneNameOffset = new(() => Schema.GetOffset(0x17A5730FDEE0E0C), LazyThreadSafetyMode.None); + public string BoneName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x17A5730FDEE0E0C)); + var ptr = _Handle.Read(_BoneNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x17A5730FDEE0E0C, value); + set => Schema.SetString(_Handle, _BoneNameOffset.Value, value); } + private static readonly Lazy _ErrorSplineRotationMaxOffset = new(() => Schema.GetOffset(0x17A5730AB5B6CD2), LazyThreadSafetyMode.None); + public ref float ErrorSplineRotationMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x17A5730AB5B6CD2)); + get => ref _Handle.AsRef(_ErrorSplineRotationMaxOffset.Value); } + private static readonly Lazy _ErrorSplineTranslationMaxOffset = new(() => Schema.GetOffset(0x17A57306248F645), LazyThreadSafetyMode.None); + public ref float ErrorSplineTranslationMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x17A57306248F645)); + get => ref _Handle.AsRef(_ErrorSplineTranslationMaxOffset.Value); } + private static readonly Lazy _ErrorSplineScaleMaxOffset = new(() => Schema.GetOffset(0x17A5730A30B95BA), LazyThreadSafetyMode.None); + public ref float ErrorSplineScaleMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x17A5730A30B95BA)); + get => ref _Handle.AsRef(_ErrorSplineScaleMaxOffset.Value); } + private static readonly Lazy _ErrorQuantizationRotationMaxOffset = new(() => Schema.GetOffset(0x17A57303509C8AA), LazyThreadSafetyMode.None); + public ref float ErrorQuantizationRotationMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x17A57303509C8AA)); + get => ref _Handle.AsRef(_ErrorQuantizationRotationMaxOffset.Value); } + private static readonly Lazy _ErrorQuantizationTranslationMaxOffset = new(() => Schema.GetOffset(0x17A5730F1E2893D), LazyThreadSafetyMode.None); + public ref float ErrorQuantizationTranslationMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x17A5730F1E2893D)); + get => ref _Handle.AsRef(_ErrorQuantizationTranslationMaxOffset.Value); } + private static readonly Lazy _ErrorQuantizationScaleMaxOffset = new(() => Schema.GetOffset(0x17A57302ACF0072), LazyThreadSafetyMode.None); + public ref float ErrorQuantizationScaleMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x17A57302ACF0072)); + get => ref _Handle.AsRef(_ErrorQuantizationScaleMaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAI_ChangeHintGroupImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAI_ChangeHintGroupImpl.cs index e1839671e..bd592cb61 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAI_ChangeHintGroupImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAI_ChangeHintGroupImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,25 +17,33 @@ internal partial class CAI_ChangeHintGroupImpl : CBaseEntityImpl, CAI_ChangeHint public CAI_ChangeHintGroupImpl(nint handle) : base(handle) { } + private static readonly Lazy _SearchTypeOffset = new(() => Schema.GetOffset(0xE2F9617B09088830), LazyThreadSafetyMode.None); + public ref int SearchType { - get => ref _Handle.AsRef(Schema.GetOffset(0xE2F9617B09088830)); + get => ref _Handle.AsRef(_SearchTypeOffset.Value); } + private static readonly Lazy _StrSearchNameOffset = new(() => Schema.GetOffset(0xE2F9617B8A77B967), LazyThreadSafetyMode.None); + public string StrSearchName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE2F9617B8A77B967)); + var ptr = _Handle.Read(_StrSearchNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xE2F9617B8A77B967, value); + set => Schema.SetString(_Handle, _StrSearchNameOffset.Value, value); } + private static readonly Lazy _StrNewHintGroupOffset = new(() => Schema.GetOffset(0xE2F9617BD4585F62), LazyThreadSafetyMode.None); + public string StrNewHintGroup { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE2F9617BD4585F62)); + var ptr = _Handle.Read(_StrNewHintGroupOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xE2F9617BD4585F62, value); + set => Schema.SetString(_Handle, _StrNewHintGroupOffset.Value, value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0xE2F9617B5ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0xE2F9617B5ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAI_ExpresserImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAI_ExpresserImpl.cs index 4096d7ddf..3352f2efe 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAI_ExpresserImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAI_ExpresserImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,39 +17,61 @@ internal partial class CAI_ExpresserImpl : SchemaClass, CAI_Expresser { public CAI_ExpresserImpl(nint handle) : base(handle) { } + private static readonly Lazy _StopTalkTimeOffset = new(() => Schema.GetOffset(0xFB9DA1AC36131EC4), LazyThreadSafetyMode.None); + public GameTime_t StopTalkTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xFB9DA1AC36131EC4)); + get => new GameTime_tImpl(_Handle + _StopTalkTimeOffset.Value); } + private static readonly Lazy _StopTalkTimeWithoutDelayOffset = new(() => Schema.GetOffset(0xFB9DA1ACB3CAE32F), LazyThreadSafetyMode.None); + public GameTime_t StopTalkTimeWithoutDelay { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xFB9DA1ACB3CAE32F)); + get => new GameTime_tImpl(_Handle + _StopTalkTimeWithoutDelayOffset.Value); } + private static readonly Lazy _QueuedSpeechTimeOffset = new(() => Schema.GetOffset(0xFB9DA1AC93DE376D), LazyThreadSafetyMode.None); + public GameTime_t QueuedSpeechTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xFB9DA1AC93DE376D)); + get => new GameTime_tImpl(_Handle + _QueuedSpeechTimeOffset.Value); } + private static readonly Lazy _BlockedTalkTimeOffset = new(() => Schema.GetOffset(0xFB9DA1AC2A2AC272), LazyThreadSafetyMode.None); + public GameTime_t BlockedTalkTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xFB9DA1AC2A2AC272)); + get => new GameTime_tImpl(_Handle + _BlockedTalkTimeOffset.Value); } + private static readonly Lazy _VoicePitchOffset = new(() => Schema.GetOffset(0xFB9DA1ACAB038A45), LazyThreadSafetyMode.None); + public ref int VoicePitch { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB9DA1ACAB038A45)); + get => ref _Handle.AsRef(_VoicePitchOffset.Value); } + private static readonly Lazy _LastTimeAcceptedSpeakOffset = new(() => Schema.GetOffset(0xFB9DA1AC8D9FF64F), LazyThreadSafetyMode.None); + public GameTime_t LastTimeAcceptedSpeak { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xFB9DA1AC8D9FF64F)); + get => new GameTime_tImpl(_Handle + _LastTimeAcceptedSpeakOffset.Value); } + private static readonly Lazy _AllowSpeakingInterruptsOffset = new(() => Schema.GetOffset(0xFB9DA1ACC77E4694), LazyThreadSafetyMode.None); + public ref bool AllowSpeakingInterrupts { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB9DA1ACC77E4694)); + get => ref _Handle.AsRef(_AllowSpeakingInterruptsOffset.Value); } + private static readonly Lazy _ConsiderSceneInvolvementAsSpeechOffset = new(() => Schema.GetOffset(0xFB9DA1ACB1C249B1), LazyThreadSafetyMode.None); + public ref bool ConsiderSceneInvolvementAsSpeech { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB9DA1ACB1C249B1)); + get => ref _Handle.AsRef(_ConsiderSceneInvolvementAsSpeechOffset.Value); } + private static readonly Lazy _SceneEntityDisabledOffset = new(() => Schema.GetOffset(0xFB9DA1AC6AC7EEF4), LazyThreadSafetyMode.None); + public ref bool SceneEntityDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB9DA1AC6AC7EEF4)); + get => ref _Handle.AsRef(_SceneEntityDisabledOffset.Value); } + private static readonly Lazy _LastSpokenPriorityOffset = new(() => Schema.GetOffset(0xFB9DA1AC9722D67B), LazyThreadSafetyMode.None); + public ref int LastSpokenPriority { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB9DA1AC9722D67B)); + get => ref _Handle.AsRef(_LastSpokenPriorityOffset.Value); } + private static readonly Lazy _OuterOffset = new(() => Schema.GetOffset(0xFB9DA1AC7359CF3A), LazyThreadSafetyMode.None); + public CBaseFlex? Outer { get { - var ptr = _Handle.Read(Schema.GetOffset(0xFB9DA1AC7359CF3A)); + var ptr = _Handle.Read(_OuterOffset.Value); return ptr.IsValidPtr() ? new CBaseFlexImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAI_ExpresserWithFollowupImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAI_ExpresserWithFollowupImpl.cs index d463680c3..4dee73837 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAI_ExpresserWithFollowupImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAI_ExpresserWithFollowupImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAK47Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAK47Impl.cs index ef29ba682..6384cf406 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAK47Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAK47Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CActionComponentUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CActionComponentUpdaterImpl.cs index b03629888..2b46cab54 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CActionComponentUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CActionComponentUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CActionComponentUpdaterImpl : CAnimComponentUpdaterImpl, public CActionComponentUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _ActionsOffset = new(() => Schema.GetOffset(0xA700EA248D622684), LazyThreadSafetyMode.None); + public ref CUtlVector Actions { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA700EA248D622684)); + get => ref _Handle.AsRef>(_ActionsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAddUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAddUpdateNodeImpl.cs index 37b209ff0..dee382757 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAddUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAddUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CAddUpdateNodeImpl : CBinaryUpdateNodeImpl, CAddUpdateNod public CAddUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _FootMotionTimingOffset = new(() => Schema.GetOffset(0x607346F4BB17F13D), LazyThreadSafetyMode.None); + public ref BinaryNodeChildOption FootMotionTiming { - get => ref _Handle.AsRef(Schema.GetOffset(0x607346F4BB17F13D)); + get => ref _Handle.AsRef(_FootMotionTimingOffset.Value); } + private static readonly Lazy _ApplyToFootMotionOffset = new(() => Schema.GetOffset(0x607346F43D831E94), LazyThreadSafetyMode.None); + public ref bool ApplyToFootMotion { - get => ref _Handle.AsRef(Schema.GetOffset(0x607346F43D831E94)); + get => ref _Handle.AsRef(_ApplyToFootMotionOffset.Value); } + private static readonly Lazy _ApplyChannelsSeparatelyOffset = new(() => Schema.GetOffset(0x607346F4FF2DBB45), LazyThreadSafetyMode.None); + public ref bool ApplyChannelsSeparately { - get => ref _Handle.AsRef(Schema.GetOffset(0x607346F4FF2DBB45)); + get => ref _Handle.AsRef(_ApplyChannelsSeparatelyOffset.Value); } + private static readonly Lazy _UseModelSpaceOffset = new(() => Schema.GetOffset(0x607346F448863521), LazyThreadSafetyMode.None); + public ref bool UseModelSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x607346F448863521)); + get => ref _Handle.AsRef(_UseModelSpaceOffset.Value); } + private static readonly Lazy _ApplyScaleOffset = new(() => Schema.GetOffset(0x607346F469D11233), LazyThreadSafetyMode.None); + public ref bool ApplyScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x607346F469D11233)); + get => ref _Handle.AsRef(_ApplyScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAimCameraUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAimCameraUpdateNodeImpl.cs index d9b9eeaae..9ed21a970 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAimCameraUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAimCameraUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class CAimCameraUpdateNodeImpl : CUnaryUpdateNodeImpl, CAimCame public CAimCameraUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParameterPositionOffset = new(() => Schema.GetOffset(0xE8DD6D01DA71CD41), LazyThreadSafetyMode.None); + public CAnimParamHandle ParameterPosition { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xE8DD6D01DA71CD41)); + get => new CAnimParamHandleImpl(_Handle + _ParameterPositionOffset.Value); } + private static readonly Lazy _ParameterOrientationOffset = new(() => Schema.GetOffset(0xE8DD6D011320E9C8), LazyThreadSafetyMode.None); + public CAnimParamHandle ParameterOrientation { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xE8DD6D011320E9C8)); + get => new CAnimParamHandleImpl(_Handle + _ParameterOrientationOffset.Value); } + private static readonly Lazy _ParameterSpineRotationWeightOffset = new(() => Schema.GetOffset(0xE8DD6D013A4DC0C7), LazyThreadSafetyMode.None); + public CAnimParamHandle ParameterSpineRotationWeight { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xE8DD6D013A4DC0C7)); + get => new CAnimParamHandleImpl(_Handle + _ParameterSpineRotationWeightOffset.Value); } + private static readonly Lazy _ParameterPelvisOffsetOffset = new(() => Schema.GetOffset(0xE8DD6D01C4C67FA8), LazyThreadSafetyMode.None); + public CAnimParamHandle ParameterPelvisOffset { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xE8DD6D01C4C67FA8)); + get => new CAnimParamHandleImpl(_Handle + _ParameterPelvisOffsetOffset.Value); } + private static readonly Lazy _ParameterUseIKOffset = new(() => Schema.GetOffset(0xE8DD6D01C8F88C49), LazyThreadSafetyMode.None); + public CAnimParamHandle ParameterUseIK { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xE8DD6D01C8F88C49)); + get => new CAnimParamHandleImpl(_Handle + _ParameterUseIKOffset.Value); } + private static readonly Lazy _ParameterCameraOnlyOffset = new(() => Schema.GetOffset(0xE8DD6D013A129627), LazyThreadSafetyMode.None); + public CAnimParamHandle ParameterCameraOnly { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xE8DD6D013A129627)); + get => new CAnimParamHandleImpl(_Handle + _ParameterCameraOnlyOffset.Value); } + private static readonly Lazy _ParameterWeaponDepenetrationDistanceOffset = new(() => Schema.GetOffset(0xE8DD6D01316BB0BD), LazyThreadSafetyMode.None); + public CAnimParamHandle ParameterWeaponDepenetrationDistance { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xE8DD6D01316BB0BD)); + get => new CAnimParamHandleImpl(_Handle + _ParameterWeaponDepenetrationDistanceOffset.Value); } + private static readonly Lazy _ParameterWeaponDepenetrationDeltaOffset = new(() => Schema.GetOffset(0xE8DD6D01D6C8CDF0), LazyThreadSafetyMode.None); + public CAnimParamHandle ParameterWeaponDepenetrationDelta { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xE8DD6D01D6C8CDF0)); + get => new CAnimParamHandleImpl(_Handle + _ParameterWeaponDepenetrationDeltaOffset.Value); } + private static readonly Lazy _ParameterCameraClearanceDistanceOffset = new(() => Schema.GetOffset(0xE8DD6D01F4F2C992), LazyThreadSafetyMode.None); + public CAnimParamHandle ParameterCameraClearanceDistance { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xE8DD6D01F4F2C992)); + get => new CAnimParamHandleImpl(_Handle + _ParameterCameraClearanceDistanceOffset.Value); } + private static readonly Lazy _OpFixedSettingsOffset = new(() => Schema.GetOffset(0xE8DD6D01E533AB09), LazyThreadSafetyMode.None); + public AimCameraOpFixedSettings_t OpFixedSettings { - get => new AimCameraOpFixedSettings_tImpl(_Handle + Schema.GetOffset(0xE8DD6D01E533AB09)); + get => new AimCameraOpFixedSettings_tImpl(_Handle + _OpFixedSettingsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAimConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAimConstraintImpl.cs index ee218e33d..4939b11ef 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAimConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAimConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CAimConstraintImpl : CBaseConstraintImpl, CAimConstraint public CAimConstraintImpl(nint handle) : base(handle) { } + private static readonly Lazy _AimOffsetOffset = new(() => Schema.GetOffset(0x6C67AB6C43737FEA), LazyThreadSafetyMode.None); + public ref Quaternion AimOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C67AB6C43737FEA)); + get => ref _Handle.AsRef(_AimOffsetOffset.Value); } + private static readonly Lazy _UpTypeOffset = new(() => Schema.GetOffset(0x6C67AB6C038EA2BC), LazyThreadSafetyMode.None); + public ref uint UpType { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C67AB6C038EA2BC)); + get => ref _Handle.AsRef(_UpTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAimMatrixUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAimMatrixUpdateNodeImpl.cs index dc79dfde3..a36ec9106 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAimMatrixUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAimMatrixUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CAimMatrixUpdateNodeImpl : CUnaryUpdateNodeImpl, CAimMatr public CAimMatrixUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _OpFixedSettingsOffset = new(() => Schema.GetOffset(0xB3687A53E533AB09), LazyThreadSafetyMode.None); + public AimMatrixOpFixedSettings_t OpFixedSettings { - get => new AimMatrixOpFixedSettings_tImpl(_Handle + Schema.GetOffset(0xB3687A53E533AB09)); + get => new AimMatrixOpFixedSettings_tImpl(_Handle + _OpFixedSettingsOffset.Value); } + private static readonly Lazy _TargetOffset = new(() => Schema.GetOffset(0xB3687A53FA08A9E8), LazyThreadSafetyMode.None); + public ref AnimVectorSource Target { - get => ref _Handle.AsRef(Schema.GetOffset(0xB3687A53FA08A9E8)); + get => ref _Handle.AsRef(_TargetOffset.Value); } + private static readonly Lazy _ParamIndexOffset = new(() => Schema.GetOffset(0xB3687A5361990A86), LazyThreadSafetyMode.None); + public CAnimParamHandle ParamIndex { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xB3687A5361990A86)); + get => new CAnimParamHandleImpl(_Handle + _ParamIndexOffset.Value); } + private static readonly Lazy _SequenceOffset = new(() => Schema.GetOffset(0xB3687A53E0A0598E), LazyThreadSafetyMode.None); + public HSequence Sequence { - get => new HSequenceImpl(_Handle + Schema.GetOffset(0xB3687A53E0A0598E)); + get => new HSequenceImpl(_Handle + _SequenceOffset.Value); } + private static readonly Lazy _ResetChildOffset = new(() => Schema.GetOffset(0xB3687A5365CC88B6), LazyThreadSafetyMode.None); + public ref bool ResetChild { - get => ref _Handle.AsRef(Schema.GetOffset(0xB3687A5365CC88B6)); + get => ref _Handle.AsRef(_ResetChildOffset.Value); } + private static readonly Lazy _LockWhenWaningOffset = new(() => Schema.GetOffset(0xB3687A53EED48004), LazyThreadSafetyMode.None); + public ref bool LockWhenWaning { - get => ref _Handle.AsRef(Schema.GetOffset(0xB3687A53EED48004)); + get => ref _Handle.AsRef(_LockWhenWaningOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAmbientGenericImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAmbientGenericImpl.cs index 1c251350b..c301615f2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAmbientGenericImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAmbientGenericImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,43 +17,63 @@ internal partial class CAmbientGenericImpl : CPointEntityImpl, CAmbientGeneric { public CAmbientGenericImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0xD45BE96FA921CA53), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0xD45BE96FA921CA53)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _MaxRadiusOffset = new(() => Schema.GetOffset(0xD45BE96F89E61C15), LazyThreadSafetyMode.None); + public ref float MaxRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xD45BE96F89E61C15)); + get => ref _Handle.AsRef(_MaxRadiusOffset.Value); } + private static readonly Lazy _SoundLevelOffset = new(() => Schema.GetOffset(0xD45BE96FB69D19BB), LazyThreadSafetyMode.None); + public ref soundlevel_t SoundLevel { - get => ref _Handle.AsRef(Schema.GetOffset(0xD45BE96FB69D19BB)); + get => ref _Handle.AsRef(_SoundLevelOffset.Value); } + private static readonly Lazy _DpvOffset = new(() => Schema.GetOffset(0xD45BE96FD7C5AFFD), LazyThreadSafetyMode.None); + public dynpitchvol_t Dpv { - get => new dynpitchvol_tImpl(_Handle + Schema.GetOffset(0xD45BE96FD7C5AFFD)); + get => new dynpitchvol_tImpl(_Handle + _DpvOffset.Value); } + private static readonly Lazy _ActiveOffset = new(() => Schema.GetOffset(0xD45BE96FC4EB465B), LazyThreadSafetyMode.None); + public ref bool Active { - get => ref _Handle.AsRef(Schema.GetOffset(0xD45BE96FC4EB465B)); + get => ref _Handle.AsRef(_ActiveOffset.Value); } + private static readonly Lazy _LoopingOffset = new(() => Schema.GetOffset(0xD45BE96F4FEBC8C1), LazyThreadSafetyMode.None); + public ref bool Looping { - get => ref _Handle.AsRef(Schema.GetOffset(0xD45BE96F4FEBC8C1)); + get => ref _Handle.AsRef(_LoopingOffset.Value); } + private static readonly Lazy _SoundOffset = new(() => Schema.GetOffset(0xD45BE96F5FF1867C), LazyThreadSafetyMode.None); + public string Sound { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD45BE96F5FF1867C)); + var ptr = _Handle.Read(_SoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD45BE96F5FF1867C, value); + set => Schema.SetString(_Handle, _SoundOffset.Value, value); } + private static readonly Lazy _SourceEntNameOffset = new(() => Schema.GetOffset(0xD45BE96F2FABBF97), LazyThreadSafetyMode.None); + public string SourceEntName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD45BE96F2FABBF97)); + var ptr = _Handle.Read(_SourceEntNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD45BE96F2FABBF97, value); + set => Schema.SetString(_Handle, _SourceEntNameOffset.Value, value); } + private static readonly Lazy _SoundSourceOffset = new(() => Schema.GetOffset(0xD45BE96FA2036C43), LazyThreadSafetyMode.None); + public ref CHandle SoundSource { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD45BE96FA2036C43)); + get => ref _Handle.AsRef>(_SoundSourceOffset.Value); } + private static readonly Lazy _SoundSourceEntIndexOffset = new(() => Schema.GetOffset(0xD45BE96F5C1CB026), LazyThreadSafetyMode.None); + public ref uint SoundSourceEntIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xD45BE96F5C1CB026)); + get => ref _Handle.AsRef(_SoundSourceEntIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimActionUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimActionUpdaterImpl.cs index f11b14d03..ca5a2c82e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimActionUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimActionUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimActivityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimActivityImpl.cs index 80c01cd2f..57984c940 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimActivityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimActivityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CAnimActivityImpl : SchemaClass, CAnimActivity { public CAnimActivityImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xB773FBB24D8F5786), LazyThreadSafetyMode.None); + public ref CBufferString Name { - get => ref _Handle.AsRef(Schema.GetOffset(0xB773FBB24D8F5786)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _ActivityOffset = new(() => Schema.GetOffset(0xB773FBB2E3986930), LazyThreadSafetyMode.None); + public ref int Activity { - get => ref _Handle.AsRef(Schema.GetOffset(0xB773FBB2E3986930)); + get => ref _Handle.AsRef(_ActivityOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0xB773FBB2CE6E9C28), LazyThreadSafetyMode.None); + public ref int Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0xB773FBB2CE6E9C28)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0xB773FBB2C5CC6905), LazyThreadSafetyMode.None); + public ref int Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0xB773FBB2C5CC6905)); + get => ref _Handle.AsRef(_WeightOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimAttachmentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimAttachmentImpl.cs index 962a19ba2..89f71ba4c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimAttachmentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimAttachmentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -27,8 +29,10 @@ public ISchemaFixedArray InfluenceIndices { public ISchemaFixedArray InfluenceWeights { get => new SchemaFixedArray(_Handle, 0xCF91818649916951, 3, 4, 4); } + private static readonly Lazy _NumInfluencesOffset = new(() => Schema.GetOffset(0xCF9181861B36F553), LazyThreadSafetyMode.None); + public ref byte NumInfluences { - get => ref _Handle.AsRef(Schema.GetOffset(0xCF9181861B36F553)); + get => ref _Handle.AsRef(_NumInfluencesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimBoneDifferenceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimBoneDifferenceImpl.cs index cea958b65..bdbebd9fe 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimBoneDifferenceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimBoneDifferenceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CAnimBoneDifferenceImpl : SchemaClass, CAnimBoneDifferenc public CAnimBoneDifferenceImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xCC65F41E4D8F5786), LazyThreadSafetyMode.None); + public ref CBufferString Name { - get => ref _Handle.AsRef(Schema.GetOffset(0xCC65F41E4D8F5786)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _ParentOffset = new(() => Schema.GetOffset(0xCC65F41E2FF7A69D), LazyThreadSafetyMode.None); + public ref CBufferString Parent { - get => ref _Handle.AsRef(Schema.GetOffset(0xCC65F41E2FF7A69D)); + get => ref _Handle.AsRef(_ParentOffset.Value); } + private static readonly Lazy _PosErrorOffset = new(() => Schema.GetOffset(0xCC65F41E48F0F4CD), LazyThreadSafetyMode.None); + public ref Vector PosError { - get => ref _Handle.AsRef(Schema.GetOffset(0xCC65F41E48F0F4CD)); + get => ref _Handle.AsRef(_PosErrorOffset.Value); } + private static readonly Lazy _HasRotationOffset = new(() => Schema.GetOffset(0xCC65F41E84FE2D9D), LazyThreadSafetyMode.None); + public ref bool HasRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0xCC65F41E84FE2D9D)); + get => ref _Handle.AsRef(_HasRotationOffset.Value); } + private static readonly Lazy _HasMovementOffset = new(() => Schema.GetOffset(0xCC65F41E07AC967A), LazyThreadSafetyMode.None); + public ref bool HasMovement { - get => ref _Handle.AsRef(Schema.GetOffset(0xCC65F41E07AC967A)); + get => ref _Handle.AsRef(_HasMovementOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimBoneImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimBoneImpl.cs index 520d31f74..df7035dff 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimBoneImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimBoneImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CAnimBoneImpl : SchemaClass, CAnimBone { public CAnimBoneImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x891F6AB94D8F5786), LazyThreadSafetyMode.None); + public ref CBufferString Name { - get => ref _Handle.AsRef(Schema.GetOffset(0x891F6AB94D8F5786)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _ParentOffset = new(() => Schema.GetOffset(0x891F6AB92FF7A69D), LazyThreadSafetyMode.None); + public ref int Parent { - get => ref _Handle.AsRef(Schema.GetOffset(0x891F6AB92FF7A69D)); + get => ref _Handle.AsRef(_ParentOffset.Value); } + private static readonly Lazy _PosOffset = new(() => Schema.GetOffset(0x891F6AB944CEBEA9), LazyThreadSafetyMode.None); + public ref Vector Pos { - get => ref _Handle.AsRef(Schema.GetOffset(0x891F6AB944CEBEA9)); + get => ref _Handle.AsRef(_PosOffset.Value); } + private static readonly Lazy _QuatOffset = new(() => Schema.GetOffset(0x891F6AB9157658BE), LazyThreadSafetyMode.None); + public SchemaUntypedField Quat { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x891F6AB9157658BE)); + get => new SchemaUntypedField(_Handle + _QuatOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x891F6AB9C2A44391), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0x891F6AB9C2A44391)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _AlignmentOffset = new(() => Schema.GetOffset(0x891F6AB9CA0E45D1), LazyThreadSafetyMode.None); + public SchemaUntypedField Alignment { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x891F6AB9CA0E45D1)); + get => new SchemaUntypedField(_Handle + _AlignmentOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x891F6AB9DC74A14C), LazyThreadSafetyMode.None); + public ref int Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x891F6AB9DC74A14C)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimComponentUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimComponentUpdaterImpl.cs index 7b096c912..4b9bd5bd8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimComponentUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimComponentUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class CAnimComponentUpdaterImpl : SchemaClass, CAnimComponentUp public CAnimComponentUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x3E0F51C74D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x3E0F51C74D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x3E0F51C74D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _IdOffset = new(() => Schema.GetOffset(0x3E0F51C7B4B6E980), LazyThreadSafetyMode.None); + public AnimComponentID Id { - get => new AnimComponentIDImpl(_Handle + Schema.GetOffset(0x3E0F51C7B4B6E980)); + get => new AnimComponentIDImpl(_Handle + _IdOffset.Value); } + private static readonly Lazy _NetworkModeOffset = new(() => Schema.GetOffset(0x3E0F51C7E3307112), LazyThreadSafetyMode.None); + public ref AnimNodeNetworkMode NetworkMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E0F51C7E3307112)); + get => ref _Handle.AsRef(_NetworkModeOffset.Value); } + private static readonly Lazy _StartEnabledOffset = new(() => Schema.GetOffset(0x3E0F51C7500D5C24), LazyThreadSafetyMode.None); + public ref bool StartEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E0F51C7500D5C24)); + get => ref _Handle.AsRef(_StartEnabledOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimCycleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimCycleImpl.cs index 3e594a027..44348c406 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimCycleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimCycleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDataChannelDescImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDataChannelDescImpl.cs index 616071bbc..73ba41962 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDataChannelDescImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDataChannelDescImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class CAnimDataChannelDescImpl : SchemaClass, CAnimDataChannelD public CAnimDataChannelDescImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChannelClassOffset = new(() => Schema.GetOffset(0x2D253CFB8F5E9AD5), LazyThreadSafetyMode.None); + public ref CBufferString ChannelClass { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D253CFB8F5E9AD5)); + get => ref _Handle.AsRef(_ChannelClassOffset.Value); } + private static readonly Lazy _VariableNameOffset = new(() => Schema.GetOffset(0x2D253CFB369599AB), LazyThreadSafetyMode.None); + public ref CBufferString VariableName { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D253CFB369599AB)); + get => ref _Handle.AsRef(_VariableNameOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x2D253CFBCE6E9C28), LazyThreadSafetyMode.None); + public ref int Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D253CFBCE6E9C28)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x2D253CFB18853D59), LazyThreadSafetyMode.None); + public ref int Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D253CFB18853D59)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _GroupingOffset = new(() => Schema.GetOffset(0x2D253CFB4308F10D), LazyThreadSafetyMode.None); + public ref CBufferString Grouping { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D253CFB4308F10D)); + get => ref _Handle.AsRef(_GroupingOffset.Value); } + private static readonly Lazy _DescriptionOffset = new(() => Schema.GetOffset(0x2D253CFB5BF47182), LazyThreadSafetyMode.None); + public ref CBufferString Description { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D253CFB5BF47182)); + get => ref _Handle.AsRef(_DescriptionOffset.Value); } + private static readonly Lazy _ElementNameArrayOffset = new(() => Schema.GetOffset(0x2D253CFBE31652C8), LazyThreadSafetyMode.None); + public ref CUtlVector ElementNameArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2D253CFBE31652C8)); + get => ref _Handle.AsRef>(_ElementNameArrayOffset.Value); } + private static readonly Lazy _ElementIndexArrayOffset = new(() => Schema.GetOffset(0x2D253CFB3FABC2B2), LazyThreadSafetyMode.None); + public ref CUtlVector ElementIndexArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2D253CFB3FABC2B2)); + get => ref _Handle.AsRef>(_ElementIndexArrayOffset.Value); } + private static readonly Lazy _ElementMaskArrayOffset = new(() => Schema.GetOffset(0x2D253CFB5927F764), LazyThreadSafetyMode.None); + public ref CUtlVector ElementMaskArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2D253CFB5927F764)); + get => ref _Handle.AsRef>(_ElementMaskArrayOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDataImpl.cs index 7c5787231..2f1317bf3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CAnimDataImpl : SchemaClass, CAnimData { public CAnimDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xA4868F934D8F5786), LazyThreadSafetyMode.None); + public ref CBufferString Name { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4868F934D8F5786)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _AnimArrayOffset = new(() => Schema.GetOffset(0xA4868F939FE8AF0D), LazyThreadSafetyMode.None); + public ref CUtlVector AnimArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA4868F939FE8AF0D)); + get => ref _Handle.AsRef>(_AnimArrayOffset.Value); } + private static readonly Lazy _DecoderArrayOffset = new(() => Schema.GetOffset(0xA4868F93AB12D6C4), LazyThreadSafetyMode.None); + public ref CUtlVector DecoderArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA4868F93AB12D6C4)); + get => ref _Handle.AsRef>(_DecoderArrayOffset.Value); } + private static readonly Lazy _MaxUniqueFrameIndexOffset = new(() => Schema.GetOffset(0xA4868F938FB0EA0D), LazyThreadSafetyMode.None); + public ref int MaxUniqueFrameIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4868F938FB0EA0D)); + get => ref _Handle.AsRef(_MaxUniqueFrameIndexOffset.Value); } + private static readonly Lazy _SegmentArrayOffset = new(() => Schema.GetOffset(0xA4868F933714FD2F), LazyThreadSafetyMode.None); + public ref CUtlVector SegmentArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA4868F933714FD2F)); + get => ref _Handle.AsRef>(_SegmentArrayOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDecoderImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDecoderImpl.cs index 36f0a0500..edbfb77a7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDecoderImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDecoderImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CAnimDecoderImpl : SchemaClass, CAnimDecoder { public CAnimDecoderImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xA6D7DF2D6750BACB), LazyThreadSafetyMode.None); + public ref CBufferString Name { - get => ref _Handle.AsRef(Schema.GetOffset(0xA6D7DF2D6750BACB)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _VersionOffset = new(() => Schema.GetOffset(0xA6D7DF2DB0AB8B1B), LazyThreadSafetyMode.None); + public ref int Version { - get => ref _Handle.AsRef(Schema.GetOffset(0xA6D7DF2DB0AB8B1B)); + get => ref _Handle.AsRef(_VersionOffset.Value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0xA6D7DF2D18853D59), LazyThreadSafetyMode.None); + public ref int Type { - get => ref _Handle.AsRef(Schema.GetOffset(0xA6D7DF2D18853D59)); + get => ref _Handle.AsRef(_TypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDemoCaptureSettingsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDemoCaptureSettingsImpl.cs index 92712c684..2790ebbed 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDemoCaptureSettingsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDemoCaptureSettingsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,54 +17,84 @@ internal partial class CAnimDemoCaptureSettingsImpl : SchemaClass, CAnimDemoCapt public CAnimDemoCaptureSettingsImpl(nint handle) : base(handle) { } + private static readonly Lazy _ErrorRangeSplineRotationOffset = new(() => Schema.GetOffset(0xD4FC71974DBFEF49), LazyThreadSafetyMode.None); + public ref Vector2D ErrorRangeSplineRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4FC71974DBFEF49)); + get => ref _Handle.AsRef(_ErrorRangeSplineRotationOffset.Value); } + private static readonly Lazy _ErrorRangeSplineTranslationOffset = new(() => Schema.GetOffset(0xD4FC71972D53C5DE), LazyThreadSafetyMode.None); + public ref Vector2D ErrorRangeSplineTranslation { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4FC71972D53C5DE)); + get => ref _Handle.AsRef(_ErrorRangeSplineTranslationOffset.Value); } + private static readonly Lazy _ErrorRangeSplineScaleOffset = new(() => Schema.GetOffset(0xD4FC7197E6E421C7), LazyThreadSafetyMode.None); + public ref Vector2D ErrorRangeSplineScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4FC7197E6E421C7)); + get => ref _Handle.AsRef(_ErrorRangeSplineScaleOffset.Value); } + private static readonly Lazy _IkRotation_MaxSplineErrorOffset = new(() => Schema.GetOffset(0xD4FC71971DA8FCB5), LazyThreadSafetyMode.None); + public ref float IkRotation_MaxSplineError { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4FC71971DA8FCB5)); + get => ref _Handle.AsRef(_IkRotation_MaxSplineErrorOffset.Value); } + private static readonly Lazy _IkTranslation_MaxSplineErrorOffset = new(() => Schema.GetOffset(0xD4FC719732DF1990), LazyThreadSafetyMode.None); + public ref float IkTranslation_MaxSplineError { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4FC719732DF1990)); + get => ref _Handle.AsRef(_IkTranslation_MaxSplineErrorOffset.Value); } + private static readonly Lazy _ErrorRangeQuantizationRotationOffset = new(() => Schema.GetOffset(0xD4FC7197D6AADA59), LazyThreadSafetyMode.None); + public ref Vector2D ErrorRangeQuantizationRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4FC7197D6AADA59)); + get => ref _Handle.AsRef(_ErrorRangeQuantizationRotationOffset.Value); } + private static readonly Lazy _ErrorRangeQuantizationTranslationOffset = new(() => Schema.GetOffset(0xD4FC71975BCCF6AE), LazyThreadSafetyMode.None); + public ref Vector2D ErrorRangeQuantizationTranslation { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4FC71975BCCF6AE)); + get => ref _Handle.AsRef(_ErrorRangeQuantizationTranslationOffset.Value); } + private static readonly Lazy _ErrorRangeQuantizationScaleOffset = new(() => Schema.GetOffset(0xD4FC7197E7487A37), LazyThreadSafetyMode.None); + public ref Vector2D ErrorRangeQuantizationScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4FC7197E7487A37)); + get => ref _Handle.AsRef(_ErrorRangeQuantizationScaleOffset.Value); } + private static readonly Lazy _IkRotation_MaxQuantizationErrorOffset = new(() => Schema.GetOffset(0xD4FC71973F1ED56D), LazyThreadSafetyMode.None); + public ref float IkRotation_MaxQuantizationError { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4FC71973F1ED56D)); + get => ref _Handle.AsRef(_IkRotation_MaxQuantizationErrorOffset.Value); } + private static readonly Lazy _IkTranslation_MaxQuantizationErrorOffset = new(() => Schema.GetOffset(0xD4FC7197BF5570E8), LazyThreadSafetyMode.None); + public ref float IkTranslation_MaxQuantizationError { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4FC7197BF5570E8)); + get => ref _Handle.AsRef(_IkTranslation_MaxQuantizationErrorOffset.Value); } + private static readonly Lazy _BaseSequenceOffset = new(() => Schema.GetOffset(0xD4FC719704AABA45), LazyThreadSafetyMode.None); + public string BaseSequence { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD4FC719704AABA45)); + var ptr = _Handle.Read(_BaseSequenceOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD4FC719704AABA45, value); + set => Schema.SetString(_Handle, _BaseSequenceOffset.Value, value); } + private static readonly Lazy _BaseSequenceFrameOffset = new(() => Schema.GetOffset(0xD4FC71972BAAA932), LazyThreadSafetyMode.None); + public ref int BaseSequenceFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4FC71972BAAA932)); + get => ref _Handle.AsRef(_BaseSequenceFrameOffset.Value); } + private static readonly Lazy _BoneSelectionModeOffset = new(() => Schema.GetOffset(0xD4FC71971C4BEF04), LazyThreadSafetyMode.None); + public ref EDemoBoneSelectionMode BoneSelectionMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4FC71971C4BEF04)); + get => ref _Handle.AsRef(_BoneSelectionModeOffset.Value); } + private static readonly Lazy _BonesOffset = new(() => Schema.GetOffset(0xD4FC71970FDA60D4), LazyThreadSafetyMode.None); + public ref CUtlVector Bones { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD4FC71970FDA60D4)); + get => ref _Handle.AsRef>(_BonesOffset.Value); } + private static readonly Lazy _IkChainsOffset = new(() => Schema.GetOffset(0xD4FC7197A467D4E7), LazyThreadSafetyMode.None); + public ref CUtlVector IkChains { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD4FC7197A467D4E7)); + get => ref _Handle.AsRef>(_IkChainsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDescImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDescImpl.cs index 8664c2761..3fdb0bda8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDescImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDescImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,50 +17,80 @@ internal partial class CAnimDescImpl : SchemaClass, CAnimDesc { public CAnimDescImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xF48A66664D8F5786), LazyThreadSafetyMode.None); + public ref CBufferString Name { - get => ref _Handle.AsRef(Schema.GetOffset(0xF48A66664D8F5786)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0xF48A6666DC74A14C), LazyThreadSafetyMode.None); + public CAnimDesc_Flag Flags { - get => new CAnimDesc_FlagImpl(_Handle + Schema.GetOffset(0xF48A6666DC74A14C)); + get => new CAnimDesc_FlagImpl(_Handle + _FlagsOffset.Value); } + private static readonly Lazy _FpsOffset = new(() => Schema.GetOffset(0xF48A6666BDD34AA8), LazyThreadSafetyMode.None); + public ref float Fps { - get => ref _Handle.AsRef(Schema.GetOffset(0xF48A6666BDD34AA8)); + get => ref _Handle.AsRef(_FpsOffset.Value); } + private static readonly Lazy _DataOffset = new(() => Schema.GetOffset(0xF48A66661621C725), LazyThreadSafetyMode.None); + public CAnimEncodedFrames Data { - get => new CAnimEncodedFramesImpl(_Handle + Schema.GetOffset(0xF48A66661621C725)); + get => new CAnimEncodedFramesImpl(_Handle + _DataOffset.Value); } + private static readonly Lazy _MovementArrayOffset = new(() => Schema.GetOffset(0xF48A6666A7A8E615), LazyThreadSafetyMode.None); + public ref CUtlVector MovementArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF48A6666A7A8E615)); + get => ref _Handle.AsRef>(_MovementArrayOffset.Value); } + private static readonly Lazy _XInitialOffsetOffset = new(() => Schema.GetOffset(0xF48A6666BAB8D6AA), LazyThreadSafetyMode.None); + public ref CTransform XInitialOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xF48A6666BAB8D6AA)); + get => ref _Handle.AsRef(_XInitialOffsetOffset.Value); } + private static readonly Lazy _EventArrayOffset = new(() => Schema.GetOffset(0xF48A6666B9FB599C), LazyThreadSafetyMode.None); + public ref CUtlVector EventArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF48A6666B9FB599C)); + get => ref _Handle.AsRef>(_EventArrayOffset.Value); } + private static readonly Lazy _ActivityArrayOffset = new(() => Schema.GetOffset(0xF48A666638F0ACE1), LazyThreadSafetyMode.None); + public ref CUtlVector ActivityArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF48A666638F0ACE1)); + get => ref _Handle.AsRef>(_ActivityArrayOffset.Value); } + private static readonly Lazy _HierarchyArrayOffset = new(() => Schema.GetOffset(0xF48A6666A806B925), LazyThreadSafetyMode.None); + public ref CUtlVector HierarchyArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF48A6666A806B925)); + get => ref _Handle.AsRef>(_HierarchyArrayOffset.Value); } + private static readonly Lazy _FramestalltimeOffset = new(() => Schema.GetOffset(0xF48A666641995711), LazyThreadSafetyMode.None); + public ref float Framestalltime { - get => ref _Handle.AsRef(Schema.GetOffset(0xF48A666641995711)); + get => ref _Handle.AsRef(_FramestalltimeOffset.Value); } + private static readonly Lazy _RootMinOffset = new(() => Schema.GetOffset(0xF48A66666EC1D517), LazyThreadSafetyMode.None); + public ref Vector RootMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xF48A66666EC1D517)); + get => ref _Handle.AsRef(_RootMinOffset.Value); } + private static readonly Lazy _RootMaxOffset = new(() => Schema.GetOffset(0xF48A66667CD572D9), LazyThreadSafetyMode.None); + public ref Vector RootMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xF48A66667CD572D9)); + get => ref _Handle.AsRef(_RootMaxOffset.Value); } + private static readonly Lazy _BoneWorldMinOffset = new(() => Schema.GetOffset(0xF48A66663E4E9D3F), LazyThreadSafetyMode.None); + public ref CUtlVector BoneWorldMin { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF48A66663E4E9D3F)); + get => ref _Handle.AsRef>(_BoneWorldMinOffset.Value); } + private static readonly Lazy _BoneWorldMaxOffset = new(() => Schema.GetOffset(0xF48A66664C3B2B91), LazyThreadSafetyMode.None); + public ref CUtlVector BoneWorldMax { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF48A66664C3B2B91)); + get => ref _Handle.AsRef>(_BoneWorldMaxOffset.Value); } + private static readonly Lazy _SequenceParamsOffset = new(() => Schema.GetOffset(0xF48A666645F20F3E), LazyThreadSafetyMode.None); + public CAnimSequenceParams SequenceParams { - get => new CAnimSequenceParamsImpl(_Handle + Schema.GetOffset(0xF48A666645F20F3E)); + get => new CAnimSequenceParamsImpl(_Handle + _SequenceParamsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDesc_FlagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDesc_FlagImpl.cs index c49f1f6a8..df775db69 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDesc_FlagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimDesc_FlagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CAnimDesc_FlagImpl : SchemaClass, CAnimDesc_Flag { public CAnimDesc_FlagImpl(nint handle) : base(handle) { } + private static readonly Lazy _LoopingOffset = new(() => Schema.GetOffset(0xF86D993525449B0D), LazyThreadSafetyMode.None); + public ref bool Looping { - get => ref _Handle.AsRef(Schema.GetOffset(0xF86D993525449B0D)); + get => ref _Handle.AsRef(_LoopingOffset.Value); } + private static readonly Lazy _AllZerosOffset = new(() => Schema.GetOffset(0xF86D99350524016F), LazyThreadSafetyMode.None); + public ref bool AllZeros { - get => ref _Handle.AsRef(Schema.GetOffset(0xF86D99350524016F)); + get => ref _Handle.AsRef(_AllZerosOffset.Value); } + private static readonly Lazy _HiddenOffset = new(() => Schema.GetOffset(0xF86D993557D2DC99), LazyThreadSafetyMode.None); + public ref bool Hidden { - get => ref _Handle.AsRef(Schema.GetOffset(0xF86D993557D2DC99)); + get => ref _Handle.AsRef(_HiddenOffset.Value); } + private static readonly Lazy _DeltaOffset = new(() => Schema.GetOffset(0xF86D99352E4BCA01), LazyThreadSafetyMode.None); + public ref bool Delta { - get => ref _Handle.AsRef(Schema.GetOffset(0xF86D99352E4BCA01)); + get => ref _Handle.AsRef(_DeltaOffset.Value); } + private static readonly Lazy _LegacyWorldspaceOffset = new(() => Schema.GetOffset(0xF86D9935E598BF5C), LazyThreadSafetyMode.None); + public ref bool LegacyWorldspace { - get => ref _Handle.AsRef(Schema.GetOffset(0xF86D9935E598BF5C)); + get => ref _Handle.AsRef(_LegacyWorldspaceOffset.Value); } + private static readonly Lazy _ModelDocOffset = new(() => Schema.GetOffset(0xF86D9935815FEAE4), LazyThreadSafetyMode.None); + public ref bool ModelDoc { - get => ref _Handle.AsRef(Schema.GetOffset(0xF86D9935815FEAE4)); + get => ref _Handle.AsRef(_ModelDocOffset.Value); } + private static readonly Lazy _ImplicitSeqIgnoreDeltaOffset = new(() => Schema.GetOffset(0xF86D9935C902252B), LazyThreadSafetyMode.None); + public ref bool ImplicitSeqIgnoreDelta { - get => ref _Handle.AsRef(Schema.GetOffset(0xF86D9935C902252B)); + get => ref _Handle.AsRef(_ImplicitSeqIgnoreDeltaOffset.Value); } + private static readonly Lazy _AnimGraphAdditiveOffset = new(() => Schema.GetOffset(0xF86D9935704DBB70), LazyThreadSafetyMode.None); + public ref bool AnimGraphAdditive { - get => ref _Handle.AsRef(Schema.GetOffset(0xF86D9935704DBB70)); + get => ref _Handle.AsRef(_AnimGraphAdditiveOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEncodeDifferenceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEncodeDifferenceImpl.cs index c29c96c1e..41a6e5685 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEncodeDifferenceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEncodeDifferenceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CAnimEncodeDifferenceImpl : SchemaClass, CAnimEncodeDiffe public CAnimEncodeDifferenceImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneArrayOffset = new(() => Schema.GetOffset(0x65474B2E80273F0C), LazyThreadSafetyMode.None); + public ref CUtlVector BoneArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x65474B2E80273F0C)); + get => ref _Handle.AsRef>(_BoneArrayOffset.Value); } + private static readonly Lazy _MorphArrayOffset = new(() => Schema.GetOffset(0x65474B2E8C6827E6), LazyThreadSafetyMode.None); + public ref CUtlVector MorphArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x65474B2E8C6827E6)); + get => ref _Handle.AsRef>(_MorphArrayOffset.Value); } + private static readonly Lazy _UserArrayOffset = new(() => Schema.GetOffset(0x65474B2EFBDB0C13), LazyThreadSafetyMode.None); + public ref CUtlVector UserArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x65474B2EFBDB0C13)); + get => ref _Handle.AsRef>(_UserArrayOffset.Value); } + private static readonly Lazy _HasRotationBitArrayOffset = new(() => Schema.GetOffset(0x65474B2E6AD7DEA5), LazyThreadSafetyMode.None); + public ref CUtlVector HasRotationBitArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x65474B2E6AD7DEA5)); + get => ref _Handle.AsRef>(_HasRotationBitArrayOffset.Value); } + private static readonly Lazy _HasMovementBitArrayOffset = new(() => Schema.GetOffset(0x65474B2EAD247FA6), LazyThreadSafetyMode.None); + public ref CUtlVector HasMovementBitArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x65474B2EAD247FA6)); + get => ref _Handle.AsRef>(_HasMovementBitArrayOffset.Value); } + private static readonly Lazy _HasMorphBitArrayOffset = new(() => Schema.GetOffset(0x65474B2E5F84C5D3), LazyThreadSafetyMode.None); + public ref CUtlVector HasMorphBitArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x65474B2E5F84C5D3)); + get => ref _Handle.AsRef>(_HasMorphBitArrayOffset.Value); } + private static readonly Lazy _HasUserBitArrayOffset = new(() => Schema.GetOffset(0x65474B2EB41ED7E0), LazyThreadSafetyMode.None); + public ref CUtlVector HasUserBitArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x65474B2EB41ED7E0)); + get => ref _Handle.AsRef>(_HasUserBitArrayOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEncodedFramesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEncodedFramesImpl.cs index fa05215fb..9c59ebc43 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEncodedFramesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEncodedFramesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CAnimEncodedFramesImpl : SchemaClass, CAnimEncodedFrames public CAnimEncodedFramesImpl(nint handle) : base(handle) { } + private static readonly Lazy _FileNameOffset = new(() => Schema.GetOffset(0x63992F5DC8D68508), LazyThreadSafetyMode.None); + public ref CBufferString FileName { - get => ref _Handle.AsRef(Schema.GetOffset(0x63992F5DC8D68508)); + get => ref _Handle.AsRef(_FileNameOffset.Value); } + private static readonly Lazy _FramesOffset = new(() => Schema.GetOffset(0x63992F5DD2101EE3), LazyThreadSafetyMode.None); + public ref int Frames { - get => ref _Handle.AsRef(Schema.GetOffset(0x63992F5DD2101EE3)); + get => ref _Handle.AsRef(_FramesOffset.Value); } + private static readonly Lazy _FramesPerBlockOffset = new(() => Schema.GetOffset(0x63992F5DFFC5A547), LazyThreadSafetyMode.None); + public ref int FramesPerBlock { - get => ref _Handle.AsRef(Schema.GetOffset(0x63992F5DFFC5A547)); + get => ref _Handle.AsRef(_FramesPerBlockOffset.Value); } + private static readonly Lazy _FrameblockArrayOffset = new(() => Schema.GetOffset(0x63992F5D2805E598), LazyThreadSafetyMode.None); + public ref CUtlVector FrameblockArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x63992F5D2805E598)); + get => ref _Handle.AsRef>(_FrameblockArrayOffset.Value); } + private static readonly Lazy _UsageDifferencesOffset = new(() => Schema.GetOffset(0x63992F5D27B13638), LazyThreadSafetyMode.None); + public CAnimEncodeDifference UsageDifferences { - get => new CAnimEncodeDifferenceImpl(_Handle + Schema.GetOffset(0x63992F5D27B13638)); + get => new CAnimEncodeDifferenceImpl(_Handle + _UsageDifferencesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEnumImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEnumImpl.cs index f9443b453..6c8edc249 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEnumImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEnumImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CAnimEnumImpl : SchemaClass, CAnimEnum { public CAnimEnumImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xFB67C2A26B99AEEA), LazyThreadSafetyMode.None); + public ref byte Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB67C2A26B99AEEA)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEventDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEventDefinitionImpl.cs index 82b80e5d7..c2d2ad502 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEventDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEventDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CAnimEventDefinitionImpl : SchemaClass, CAnimEventDefinit public CAnimEventDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _FrameOffset = new(() => Schema.GetOffset(0x27C8C8BC494AFF02), LazyThreadSafetyMode.None); + public ref int Frame { - get => ref _Handle.AsRef(Schema.GetOffset(0x27C8C8BC494AFF02)); + get => ref _Handle.AsRef(_FrameOffset.Value); } + private static readonly Lazy _EndFrameOffset = new(() => Schema.GetOffset(0x27C8C8BCEA91BD07), LazyThreadSafetyMode.None); + public ref int EndFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x27C8C8BCEA91BD07)); + get => ref _Handle.AsRef(_EndFrameOffset.Value); } + private static readonly Lazy _CycleOffset = new(() => Schema.GetOffset(0x27C8C8BC0C77829F), LazyThreadSafetyMode.None); + public ref float Cycle { - get => ref _Handle.AsRef(Schema.GetOffset(0x27C8C8BC0C77829F)); + get => ref _Handle.AsRef(_CycleOffset.Value); } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0x27C8C8BCBC5E3BAB), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0x27C8C8BCBC5E3BAB)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _EventDataOffset = new(() => Schema.GetOffset(0x27C8C8BC03E547A7), LazyThreadSafetyMode.None); + public SchemaUntypedField EventData { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x27C8C8BC03E547A7)); + get => new SchemaUntypedField(_Handle + _EventDataOffset.Value); } + private static readonly Lazy _LegacyOptionsOffset = new(() => Schema.GetOffset(0x27C8C8BCD613D4A1), LazyThreadSafetyMode.None); + public ref CBufferString LegacyOptions { - get => ref _Handle.AsRef(Schema.GetOffset(0x27C8C8BCD613D4A1)); + get => ref _Handle.AsRef(_LegacyOptionsOffset.Value); } + private static readonly Lazy _EventNameOffset = new(() => Schema.GetOffset(0x27C8C8BC464F847D), LazyThreadSafetyMode.None); + public ref CGlobalSymbol EventName { - get => ref _Handle.AsRef(Schema.GetOffset(0x27C8C8BC464F847D)); + get => ref _Handle.AsRef(_EventNameOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEventListenerBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEventListenerBaseImpl.cs index 081ae88b9..f5dcfac63 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEventListenerBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEventListenerBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEventListenerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEventListenerImpl.cs index 3a83a8921..8f2f9d6d8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEventListenerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEventListenerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEventQueueListenerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEventQueueListenerImpl.cs index 8383ef20a..cc77e73a9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEventQueueListenerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimEventQueueListenerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimFootImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimFootImpl.cs index 0953705e2..50466ddc3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimFootImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimFootImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class CAnimFootImpl : SchemaClass, CAnimFoot { public CAnimFootImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x583A05E34D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x583A05E34D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x583A05E34D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _BallOffsetOffset = new(() => Schema.GetOffset(0x583A05E3E3376F1B), LazyThreadSafetyMode.None); + public ref Vector BallOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x583A05E3E3376F1B)); + get => ref _Handle.AsRef(_BallOffsetOffset.Value); } + private static readonly Lazy _HeelOffsetOffset = new(() => Schema.GetOffset(0x583A05E3306AE608), LazyThreadSafetyMode.None); + public ref Vector HeelOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x583A05E3306AE608)); + get => ref _Handle.AsRef(_HeelOffsetOffset.Value); } + private static readonly Lazy _AnkleBoneIndexOffset = new(() => Schema.GetOffset(0x583A05E31E89F146), LazyThreadSafetyMode.None); + public ref int AnkleBoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x583A05E31E89F146)); + get => ref _Handle.AsRef(_AnkleBoneIndexOffset.Value); } + private static readonly Lazy _ToeBoneIndexOffset = new(() => Schema.GetOffset(0x583A05E3EEF7CC57), LazyThreadSafetyMode.None); + public ref int ToeBoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x583A05E3EEF7CC57)); + get => ref _Handle.AsRef(_ToeBoneIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimFrameBlockAnimImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimFrameBlockAnimImpl.cs index 4ea163609..1f9333302 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimFrameBlockAnimImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimFrameBlockAnimImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CAnimFrameBlockAnimImpl : SchemaClass, CAnimFrameBlockAni public CAnimFrameBlockAnimImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartFrameOffset = new(() => Schema.GetOffset(0x6318445C9134F088), LazyThreadSafetyMode.None); + public ref int StartFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x6318445C9134F088)); + get => ref _Handle.AsRef(_StartFrameOffset.Value); } + private static readonly Lazy _EndFrameOffset = new(() => Schema.GetOffset(0x6318445CEA91BD07), LazyThreadSafetyMode.None); + public ref int EndFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x6318445CEA91BD07)); + get => ref _Handle.AsRef(_EndFrameOffset.Value); } + private static readonly Lazy _SegmentIndexArrayOffset = new(() => Schema.GetOffset(0x6318445C1A46EA6B), LazyThreadSafetyMode.None); + public ref CUtlVector SegmentIndexArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6318445C1A46EA6B)); + get => ref _Handle.AsRef>(_SegmentIndexArrayOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimFrameSegmentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimFrameSegmentImpl.cs index 0e1151635..bd48ed473 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimFrameSegmentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimFrameSegmentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CAnimFrameSegmentImpl : SchemaClass, CAnimFrameSegment { public CAnimFrameSegmentImpl(nint handle) : base(handle) { } + private static readonly Lazy _UniqueFrameIndexOffset = new(() => Schema.GetOffset(0x1D6E27D17D02E339), LazyThreadSafetyMode.None); + public ref int UniqueFrameIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x1D6E27D17D02E339)); + get => ref _Handle.AsRef(_UniqueFrameIndexOffset.Value); } + private static readonly Lazy _LocalElementMasksOffset = new(() => Schema.GetOffset(0x1D6E27D16981357D), LazyThreadSafetyMode.None); + public ref uint LocalElementMasks { - get => ref _Handle.AsRef(Schema.GetOffset(0x1D6E27D16981357D)); + get => ref _Handle.AsRef(_LocalElementMasksOffset.Value); } + private static readonly Lazy _LocalChannelOffset = new(() => Schema.GetOffset(0x1D6E27D10BCF9E77), LazyThreadSafetyMode.None); + public ref int LocalChannel { - get => ref _Handle.AsRef(Schema.GetOffset(0x1D6E27D10BCF9E77)); + get => ref _Handle.AsRef(_LocalChannelOffset.Value); } + private static readonly Lazy _ContainerOffset = new(() => Schema.GetOffset(0x1D6E27D13F54D498), LazyThreadSafetyMode.None); + public ref CUtlBinaryBlock Container { - get => ref _Handle.AsRef(Schema.GetOffset(0x1D6E27D13F54D498)); + get => ref _Handle.AsRef(_ContainerOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphControllerBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphControllerBaseImpl.cs index 7c0d9914e..4301801da 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphControllerBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphControllerBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CAnimGraphControllerBaseImpl : SchemaClass, CAnimGraphCon public CAnimGraphControllerBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParamsToResetInPostGraphUpdateOffset = new(() => Schema.GetOffset(0x1AA25B60A3E3A289), LazyThreadSafetyMode.None); + public SchemaUntypedField ParamsToResetInPostGraphUpdate { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x1AA25B60A3E3A289)); + get => new SchemaUntypedField(_Handle + _ParamsToResetInPostGraphUpdateOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphDebugReplayImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphDebugReplayImpl.cs index 624fcef22..a7bc61291 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphDebugReplayImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphDebugReplayImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class CAnimGraphDebugReplayImpl : SchemaClass, CAnimGraphDebugR public CAnimGraphDebugReplayImpl(nint handle) : base(handle) { } + private static readonly Lazy _AnimGraphFileNameOffset = new(() => Schema.GetOffset(0x31D5349314D2CC69), LazyThreadSafetyMode.None); + public string AnimGraphFileName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x31D5349314D2CC69)); + var ptr = _Handle.Read(_AnimGraphFileNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x31D5349314D2CC69, value); + set => Schema.SetString(_Handle, _AnimGraphFileNameOffset.Value, value); } + private static readonly Lazy _FrameListOffset = new(() => Schema.GetOffset(0x31D5349393EB99F2), LazyThreadSafetyMode.None); + public ref CUtlVector FrameList { - get => ref _Handle.AsRef>(Schema.GetOffset(0x31D5349393EB99F2)); + get => ref _Handle.AsRef>(_FrameListOffset.Value); } + private static readonly Lazy _StartIndexOffset = new(() => Schema.GetOffset(0x31D534939F316D25), LazyThreadSafetyMode.None); + public ref int StartIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x31D534939F316D25)); + get => ref _Handle.AsRef(_StartIndexOffset.Value); } + private static readonly Lazy _WriteIndexOffset = new(() => Schema.GetOffset(0x31D53493161871B8), LazyThreadSafetyMode.None); + public ref int WriteIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x31D53493161871B8)); + get => ref _Handle.AsRef(_WriteIndexOffset.Value); } + private static readonly Lazy _FrameCountOffset = new(() => Schema.GetOffset(0x31D53493B0C97215), LazyThreadSafetyMode.None); + public ref int FrameCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x31D53493B0C97215)); + get => ref _Handle.AsRef(_FrameCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphModelBindingImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphModelBindingImpl.cs index 61a86b72c..0cdb18df7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphModelBindingImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphModelBindingImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CAnimGraphModelBindingImpl : SchemaClass, CAnimGraphModel public CAnimGraphModelBindingImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModelNameOffset = new(() => Schema.GetOffset(0xC0F296335D35B6E1), LazyThreadSafetyMode.None); + public string ModelName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC0F296335D35B6E1)); + var ptr = _Handle.Read(_ModelNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xC0F296335D35B6E1, value); + set => Schema.SetString(_Handle, _ModelNameOffset.Value, value); } + private static readonly Lazy _SharedDataOffset = new(() => Schema.GetOffset(0xC0F29633D0085FE6), LazyThreadSafetyMode.None); + public SchemaUntypedField SharedData { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC0F29633D0085FE6)); + get => new SchemaUntypedField(_Handle + _SharedDataOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphNetworkSettingsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphNetworkSettingsImpl.cs index 9a7b486e9..b12ddaafd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphNetworkSettingsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphNetworkSettingsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CAnimGraphNetworkSettingsImpl : CAnimGraphSettingsGroupIm public CAnimGraphNetworkSettingsImpl(nint handle) : base(handle) { } + private static readonly Lazy _NetworkingEnabledOffset = new(() => Schema.GetOffset(0xAF5ADE2491EF35E0), LazyThreadSafetyMode.None); + public ref bool NetworkingEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xAF5ADE2491EF35E0)); + get => ref _Handle.AsRef(_NetworkingEnabledOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphNetworkedVariablesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphNetworkedVariablesImpl.cs index 8f8cc0364..6f8add526 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphNetworkedVariablesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphNetworkedVariablesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,77 +17,125 @@ internal partial class CAnimGraphNetworkedVariablesImpl : SchemaClass, CAnimGrap public CAnimGraphNetworkedVariablesImpl(nint handle) : base(handle) { } + private static readonly Lazy _PredNetBoolVariablesOffset = new(() => Schema.GetOffset(0x1E17B4B906DCE9F6), LazyThreadSafetyMode.None); + public ref CUtlVector PredNetBoolVariables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B906DCE9F6)); + get => ref _Handle.AsRef>(_PredNetBoolVariablesOffset.Value); } + private static readonly Lazy _PredNetByteVariablesOffset = new(() => Schema.GetOffset(0x1E17B4B989E64D04), LazyThreadSafetyMode.None); + public ref CUtlVector PredNetByteVariables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B989E64D04)); + get => ref _Handle.AsRef>(_PredNetByteVariablesOffset.Value); } + private static readonly Lazy _PredNetUInt16VariablesOffset = new(() => Schema.GetOffset(0x1E17B4B977F08773), LazyThreadSafetyMode.None); + public ref CUtlVector PredNetUInt16Variables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B977F08773)); + get => ref _Handle.AsRef>(_PredNetUInt16VariablesOffset.Value); } + private static readonly Lazy _PredNetIntVariablesOffset = new(() => Schema.GetOffset(0x1E17B4B96B8A2ED7), LazyThreadSafetyMode.None); + public ref CUtlVector PredNetIntVariables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B96B8A2ED7)); + get => ref _Handle.AsRef>(_PredNetIntVariablesOffset.Value); } + private static readonly Lazy _PredNetUInt32VariablesOffset = new(() => Schema.GetOffset(0x1E17B4B9E4E7C391), LazyThreadSafetyMode.None); + public ref CUtlVector PredNetUInt32Variables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B9E4E7C391)); + get => ref _Handle.AsRef>(_PredNetUInt32VariablesOffset.Value); } + private static readonly Lazy _PredNetUInt64VariablesOffset = new(() => Schema.GetOffset(0x1E17B4B99DAD8E90), LazyThreadSafetyMode.None); + public ref CUtlVector PredNetUInt64Variables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B99DAD8E90)); + get => ref _Handle.AsRef>(_PredNetUInt64VariablesOffset.Value); } + private static readonly Lazy _PredNetFloatVariablesOffset = new(() => Schema.GetOffset(0x1E17B4B998D66E5E), LazyThreadSafetyMode.None); + public ref CUtlVector PredNetFloatVariables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B998D66E5E)); + get => ref _Handle.AsRef>(_PredNetFloatVariablesOffset.Value); } + private static readonly Lazy _PredNetVectorVariablesOffset = new(() => Schema.GetOffset(0x1E17B4B9181E9E43), LazyThreadSafetyMode.None); + public ref CUtlVector PredNetVectorVariables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B9181E9E43)); + get => ref _Handle.AsRef>(_PredNetVectorVariablesOffset.Value); } + private static readonly Lazy _PredNetQuaternionVariablesOffset = new(() => Schema.GetOffset(0x1E17B4B97DB635DE), LazyThreadSafetyMode.None); + public ref CUtlVector PredNetQuaternionVariables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B97DB635DE)); + get => ref _Handle.AsRef>(_PredNetQuaternionVariablesOffset.Value); } + private static readonly Lazy _PredNetGlobalSymbolVariablesOffset = new(() => Schema.GetOffset(0x1E17B4B9617FC65F), LazyThreadSafetyMode.None); + public ref CUtlVector PredNetGlobalSymbolVariables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B9617FC65F)); + get => ref _Handle.AsRef>(_PredNetGlobalSymbolVariablesOffset.Value); } + private static readonly Lazy _OwnerOnlyPredNetBoolVariablesOffset = new(() => Schema.GetOffset(0x1E17B4B929EC42ED), LazyThreadSafetyMode.None); + public ref CUtlVector OwnerOnlyPredNetBoolVariables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B929EC42ED)); + get => ref _Handle.AsRef>(_OwnerOnlyPredNetBoolVariablesOffset.Value); } + private static readonly Lazy _OwnerOnlyPredNetByteVariablesOffset = new(() => Schema.GetOffset(0x1E17B4B930A63C33), LazyThreadSafetyMode.None); + public ref CUtlVector OwnerOnlyPredNetByteVariables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B930A63C33)); + get => ref _Handle.AsRef>(_OwnerOnlyPredNetByteVariablesOffset.Value); } + private static readonly Lazy _OwnerOnlyPredNetUInt16VariablesOffset = new(() => Schema.GetOffset(0x1E17B4B9F4141ACC), LazyThreadSafetyMode.None); + public ref CUtlVector OwnerOnlyPredNetUInt16Variables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B9F4141ACC)); + get => ref _Handle.AsRef>(_OwnerOnlyPredNetUInt16VariablesOffset.Value); } + private static readonly Lazy _OwnerOnlyPredNetIntVariablesOffset = new(() => Schema.GetOffset(0x1E17B4B9334BC692), LazyThreadSafetyMode.None); + public ref CUtlVector OwnerOnlyPredNetIntVariables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B9334BC692)); + get => ref _Handle.AsRef>(_OwnerOnlyPredNetIntVariablesOffset.Value); } + private static readonly Lazy _OwnerOnlyPredNetUInt32VariablesOffset = new(() => Schema.GetOffset(0x1E17B4B92F3399D2), LazyThreadSafetyMode.None); + public ref CUtlVector OwnerOnlyPredNetUInt32Variables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B92F3399D2)); + get => ref _Handle.AsRef>(_OwnerOnlyPredNetUInt32VariablesOffset.Value); } + private static readonly Lazy _OwnerOnlyPredNetUInt64VariablesOffset = new(() => Schema.GetOffset(0x1E17B4B922F96523), LazyThreadSafetyMode.None); + public ref CUtlVector OwnerOnlyPredNetUInt64Variables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B922F96523)); + get => ref _Handle.AsRef>(_OwnerOnlyPredNetUInt64VariablesOffset.Value); } + private static readonly Lazy _OwnerOnlyPredNetFloatVariablesOffset = new(() => Schema.GetOffset(0x1E17B4B9BA2D74CB), LazyThreadSafetyMode.None); + public ref CUtlVector OwnerOnlyPredNetFloatVariables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B9BA2D74CB)); + get => ref _Handle.AsRef>(_OwnerOnlyPredNetFloatVariablesOffset.Value); } + private static readonly Lazy _OwnerOnlyPredNetVectorVariablesOffset = new(() => Schema.GetOffset(0x1E17B4B91BA357BC), LazyThreadSafetyMode.None); + public ref CUtlVector OwnerOnlyPredNetVectorVariables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B91BA357BC)); + get => ref _Handle.AsRef>(_OwnerOnlyPredNetVectorVariablesOffset.Value); } + private static readonly Lazy _OwnerOnlyPredNetQuaternionVariablesOffset = new(() => Schema.GetOffset(0x1E17B4B9D91AD9ED), LazyThreadSafetyMode.None); + public ref CUtlVector OwnerOnlyPredNetQuaternionVariables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B9D91AD9ED)); + get => ref _Handle.AsRef>(_OwnerOnlyPredNetQuaternionVariablesOffset.Value); } + private static readonly Lazy _OwnerOnlyPredNetGlobalSymbolVariablesOffset = new(() => Schema.GetOffset(0x1E17B4B9F5EB98E4), LazyThreadSafetyMode.None); + public ref CUtlVector OwnerOnlyPredNetGlobalSymbolVariables { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E17B4B9F5EB98E4)); + get => ref _Handle.AsRef>(_OwnerOnlyPredNetGlobalSymbolVariablesOffset.Value); } + private static readonly Lazy _BoolVariablesCountOffset = new(() => Schema.GetOffset(0x1E17B4B9C49C7BDD), LazyThreadSafetyMode.None); + public ref int BoolVariablesCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x1E17B4B9C49C7BDD)); + get => ref _Handle.AsRef(_BoolVariablesCountOffset.Value); } + private static readonly Lazy _OwnerOnlyBoolVariablesCountOffset = new(() => Schema.GetOffset(0x1E17B4B9CF1E0D52), LazyThreadSafetyMode.None); + public ref int OwnerOnlyBoolVariablesCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x1E17B4B9CF1E0D52)); + get => ref _Handle.AsRef(_OwnerOnlyBoolVariablesCountOffset.Value); } + private static readonly Lazy _RandomSeedOffsetOffset = new(() => Schema.GetOffset(0x1E17B4B942BA3B9C), LazyThreadSafetyMode.None); + public ref int RandomSeedOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x1E17B4B942BA3B9C)); + get => ref _Handle.AsRef(_RandomSeedOffsetOffset.Value); } + private static readonly Lazy _LastTeleportTimeOffset = new(() => Schema.GetOffset(0x1E17B4B9C1AD2641), LazyThreadSafetyMode.None); + public ref float LastTeleportTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x1E17B4B9C1AD2641)); + get => ref _Handle.AsRef(_LastTeleportTimeOffset.Value); } public void PredNetBoolVariablesUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphSettingsGroupImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphSettingsGroupImpl.cs index e9972dd0b..43a6127df 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphSettingsGroupImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphSettingsGroupImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphSettingsManagerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphSettingsManagerImpl.cs index ae3e427f2..c7ab1d627 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphSettingsManagerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimGraphSettingsManagerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CAnimGraphSettingsManagerImpl : SchemaClass, CAnimGraphSe public CAnimGraphSettingsManagerImpl(nint handle) : base(handle) { } + private static readonly Lazy _SettingsGroupsOffset = new(() => Schema.GetOffset(0x53B994DB178D6408), LazyThreadSafetyMode.None); + public ref CUtlVector SettingsGroups { - get => ref _Handle.AsRef>(Schema.GetOffset(0x53B994DB178D6408)); + get => ref _Handle.AsRef>(_SettingsGroupsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimInputDampingImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimInputDampingImpl.cs index 1a23ae06d..d8e16634b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimInputDampingImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimInputDampingImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CAnimInputDampingImpl : SchemaClass, CAnimInputDamping { public CAnimInputDampingImpl(nint handle) : base(handle) { } + private static readonly Lazy _SpeedFunctionOffset = new(() => Schema.GetOffset(0xFAECFC318682F508), LazyThreadSafetyMode.None); + public ref DampingSpeedFunction SpeedFunction { - get => ref _Handle.AsRef(Schema.GetOffset(0xFAECFC318682F508)); + get => ref _Handle.AsRef(_SpeedFunctionOffset.Value); } + private static readonly Lazy _SpeedScaleOffset = new(() => Schema.GetOffset(0xFAECFC31E70BB6FE), LazyThreadSafetyMode.None); + public ref float SpeedScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xFAECFC31E70BB6FE)); + get => ref _Handle.AsRef(_SpeedScaleOffset.Value); } + private static readonly Lazy _FallingSpeedScaleOffset = new(() => Schema.GetOffset(0xFAECFC31128A6857), LazyThreadSafetyMode.None); + public ref float FallingSpeedScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xFAECFC31128A6857)); + get => ref _Handle.AsRef(_FallingSpeedScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimKeyDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimKeyDataImpl.cs index e0d983318..81c4786a8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimKeyDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimKeyDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CAnimKeyDataImpl : SchemaClass, CAnimKeyData { public CAnimKeyDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x790610E24D8F5786), LazyThreadSafetyMode.None); + public ref CBufferString Name { - get => ref _Handle.AsRef(Schema.GetOffset(0x790610E24D8F5786)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _BoneArrayOffset = new(() => Schema.GetOffset(0x790610E280273F0C), LazyThreadSafetyMode.None); + public ref CUtlVector BoneArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x790610E280273F0C)); + get => ref _Handle.AsRef>(_BoneArrayOffset.Value); } + private static readonly Lazy _UserArrayOffset = new(() => Schema.GetOffset(0x790610E2FBDB0C13), LazyThreadSafetyMode.None); + public ref CUtlVector UserArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x790610E2FBDB0C13)); + get => ref _Handle.AsRef>(_UserArrayOffset.Value); } + private static readonly Lazy _MorphArrayOffset = new(() => Schema.GetOffset(0x790610E28C6827E6), LazyThreadSafetyMode.None); + public ref CUtlVector MorphArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x790610E28C6827E6)); + get => ref _Handle.AsRef>(_MorphArrayOffset.Value); } + private static readonly Lazy _ChannelElementsOffset = new(() => Schema.GetOffset(0x790610E20D1DA989), LazyThreadSafetyMode.None); + public ref int ChannelElements { - get => ref _Handle.AsRef(Schema.GetOffset(0x790610E20D1DA989)); + get => ref _Handle.AsRef(_ChannelElementsOffset.Value); } + private static readonly Lazy _DataChannelArrayOffset = new(() => Schema.GetOffset(0x790610E2D1641EB9), LazyThreadSafetyMode.None); + public ref CUtlVector DataChannelArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x790610E2D1641EB9)); + get => ref _Handle.AsRef>(_DataChannelArrayOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimLocalHierarchyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimLocalHierarchyImpl.cs index 93a518ec8..224bd3a39 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimLocalHierarchyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimLocalHierarchyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CAnimLocalHierarchyImpl : SchemaClass, CAnimLocalHierarch public CAnimLocalHierarchyImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneOffset = new(() => Schema.GetOffset(0x3D14C1ED515646C4), LazyThreadSafetyMode.None); + public ref CBufferString Bone { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D14C1ED515646C4)); + get => ref _Handle.AsRef(_BoneOffset.Value); } + private static readonly Lazy _NewParentOffset = new(() => Schema.GetOffset(0x3D14C1ED40620004), LazyThreadSafetyMode.None); + public ref CBufferString NewParent { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D14C1ED40620004)); + get => ref _Handle.AsRef(_NewParentOffset.Value); } + private static readonly Lazy _StartFrameOffset = new(() => Schema.GetOffset(0x3D14C1ED9134F088), LazyThreadSafetyMode.None); + public ref int StartFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D14C1ED9134F088)); + get => ref _Handle.AsRef(_StartFrameOffset.Value); } + private static readonly Lazy _PeakFrameOffset = new(() => Schema.GetOffset(0x3D14C1ED3BAFAFC7), LazyThreadSafetyMode.None); + public ref int PeakFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D14C1ED3BAFAFC7)); + get => ref _Handle.AsRef(_PeakFrameOffset.Value); } + private static readonly Lazy _TailFrameOffset = new(() => Schema.GetOffset(0x3D14C1ED3F824524), LazyThreadSafetyMode.None); + public ref int TailFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D14C1ED3F824524)); + get => ref _Handle.AsRef(_TailFrameOffset.Value); } + private static readonly Lazy _EndFrameOffset = new(() => Schema.GetOffset(0x3D14C1EDEA91BD07), LazyThreadSafetyMode.None); + public ref int EndFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D14C1EDEA91BD07)); + get => ref _Handle.AsRef(_EndFrameOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimMorphDifferenceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimMorphDifferenceImpl.cs index 0ad811565..70aeae607 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimMorphDifferenceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimMorphDifferenceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CAnimMorphDifferenceImpl : SchemaClass, CAnimMorphDiffere public CAnimMorphDifferenceImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x57D69D104D8F5786), LazyThreadSafetyMode.None); + public ref CBufferString Name { - get => ref _Handle.AsRef(Schema.GetOffset(0x57D69D104D8F5786)); + get => ref _Handle.AsRef(_NameOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimMotorUpdaterBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimMotorUpdaterBaseImpl.cs index 3c72d287d..ec7bb1da7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimMotorUpdaterBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimMotorUpdaterBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CAnimMotorUpdaterBaseImpl : SchemaClass, CAnimMotorUpdate public CAnimMotorUpdaterBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x3FB6E1144D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x3FB6E1144D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x3FB6E1144D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _DefaultOffset = new(() => Schema.GetOffset(0x3FB6E11485F067BE), LazyThreadSafetyMode.None); + public ref bool Default { - get => ref _Handle.AsRef(Schema.GetOffset(0x3FB6E11485F067BE)); + get => ref _Handle.AsRef(_DefaultOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimMovementImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimMovementImpl.cs index 6429f266e..b222822a9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimMovementImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimMovementImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CAnimMovementImpl : SchemaClass, CAnimMovement { public CAnimMovementImpl(nint handle) : base(handle) { } + private static readonly Lazy _EndframeOffset = new(() => Schema.GetOffset(0xF78C2AA2BD8E2D9B), LazyThreadSafetyMode.None); + public ref int Endframe { - get => ref _Handle.AsRef(Schema.GetOffset(0xF78C2AA2BD8E2D9B)); + get => ref _Handle.AsRef(_EndframeOffset.Value); } + private static readonly Lazy _MotionflagsOffset = new(() => Schema.GetOffset(0xF78C2AA22261973E), LazyThreadSafetyMode.None); + public ref int Motionflags { - get => ref _Handle.AsRef(Schema.GetOffset(0xF78C2AA22261973E)); + get => ref _Handle.AsRef(_MotionflagsOffset.Value); } + private static readonly Lazy _V0Offset = new(() => Schema.GetOffset(0xF78C2AA2954A47FB), LazyThreadSafetyMode.None); + public ref float V0 { - get => ref _Handle.AsRef(Schema.GetOffset(0xF78C2AA2954A47FB)); + get => ref _Handle.AsRef(_V0Offset.Value); } + private static readonly Lazy _V1Offset = new(() => Schema.GetOffset(0xF78C2AA2944A4668), LazyThreadSafetyMode.None); + public ref float V1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xF78C2AA2944A4668)); + get => ref _Handle.AsRef(_V1Offset.Value); } + private static readonly Lazy _AngleOffset = new(() => Schema.GetOffset(0xF78C2AA2AD544418), LazyThreadSafetyMode.None); + public ref float Angle { - get => ref _Handle.AsRef(Schema.GetOffset(0xF78C2AA2AD544418)); + get => ref _Handle.AsRef(_AngleOffset.Value); } + private static readonly Lazy _VectorOffset = new(() => Schema.GetOffset(0xF78C2AA28F89E802), LazyThreadSafetyMode.None); + public ref Vector Vector { - get => ref _Handle.AsRef(Schema.GetOffset(0xF78C2AA28F89E802)); + get => ref _Handle.AsRef(_VectorOffset.Value); } + private static readonly Lazy _PositionOffset = new(() => Schema.GetOffset(0xF78C2AA2934F4E0A), LazyThreadSafetyMode.None); + public ref Vector Position { - get => ref _Handle.AsRef(Schema.GetOffset(0xF78C2AA2934F4E0A)); + get => ref _Handle.AsRef(_PositionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimNodePathImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimNodePathImpl.cs index 8c8e5ff89..f00a90f7d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimNodePathImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimNodePathImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CAnimNodePathImpl : SchemaClass, CAnimNodePath { public CAnimNodePathImpl(nint handle) : base(handle) { } + private static readonly Lazy _PathOffset = new(() => Schema.GetOffset(0xE070E30C2915C8D6), LazyThreadSafetyMode.None); + public SchemaUntypedField Path { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xE070E30C2915C8D6)); + get => new SchemaUntypedField(_Handle + _PathOffset.Value); } + private static readonly Lazy _CountOffset = new(() => Schema.GetOffset(0xE070E30C7D31AC08), LazyThreadSafetyMode.None); + public ref int Count { - get => ref _Handle.AsRef(Schema.GetOffset(0xE070E30C7D31AC08)); + get => ref _Handle.AsRef(_CountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimParamHandleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimParamHandleImpl.cs index b726be3d9..6d74b1d8a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimParamHandleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimParamHandleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CAnimParamHandleImpl : SchemaClass, CAnimParamHandle { public CAnimParamHandleImpl(nint handle) : base(handle) { } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x7B9461E0F04B4ED), LazyThreadSafetyMode.None); + public ref AnimParamType_t Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x7B9461E0F04B4ED)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _IndexOffset = new(() => Schema.GetOffset(0x7B9461E491963CB), LazyThreadSafetyMode.None); + public ref byte Index { - get => ref _Handle.AsRef(Schema.GetOffset(0x7B9461E491963CB)); + get => ref _Handle.AsRef(_IndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimParamHandleMapImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimParamHandleMapImpl.cs index dbf26cfb6..b7b6e6109 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimParamHandleMapImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimParamHandleMapImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CAnimParamHandleMapImpl : SchemaClass, CAnimParamHandleMa public CAnimParamHandleMapImpl(nint handle) : base(handle) { } + private static readonly Lazy _ListOffset = new(() => Schema.GetOffset(0x82522A78CAD81C21), LazyThreadSafetyMode.None); + public SchemaUntypedField List { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x82522A78CAD81C21)); + get => new SchemaUntypedField(_Handle + _ListOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimParameterBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimParameterBaseImpl.cs index 6789da669..7b3bd7b76 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimParameterBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimParameterBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,52 @@ internal partial class CAnimParameterBaseImpl : SchemaClass, CAnimParameterBase public CAnimParameterBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x9E097C8F4D8F5786), LazyThreadSafetyMode.None); + public ref CGlobalSymbol Name { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E097C8F4D8F5786)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _CommentOffset = new(() => Schema.GetOffset(0x9E097C8F88A0B4DF), LazyThreadSafetyMode.None); + public string Comment { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9E097C8F88A0B4DF)); + var ptr = _Handle.Read(_CommentOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9E097C8F88A0B4DF, value); + set => Schema.SetString(_Handle, _CommentOffset.Value, value); } + private static readonly Lazy _GroupOffset = new(() => Schema.GetOffset(0x9E097C8F9FC645AC), LazyThreadSafetyMode.None); + public string Group { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9E097C8F9FC645AC)); + var ptr = _Handle.Read(_GroupOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9E097C8F9FC645AC, value); + set => Schema.SetString(_Handle, _GroupOffset.Value, value); } + private static readonly Lazy _IdOffset = new(() => Schema.GetOffset(0x9E097C8FB4B6E980), LazyThreadSafetyMode.None); + public AnimParamID Id { - get => new AnimParamIDImpl(_Handle + Schema.GetOffset(0x9E097C8FB4B6E980)); + get => new AnimParamIDImpl(_Handle + _IdOffset.Value); } + private static readonly Lazy _ComponentNameOffset = new(() => Schema.GetOffset(0x9E097C8F7CAC3EA3), LazyThreadSafetyMode.None); + public string ComponentName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9E097C8F7CAC3EA3)); + var ptr = _Handle.Read(_ComponentNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9E097C8F7CAC3EA3, value); + set => Schema.SetString(_Handle, _ComponentNameOffset.Value, value); } + private static readonly Lazy _NetworkingRequestedOffset = new(() => Schema.GetOffset(0x9E097C8FE57548D5), LazyThreadSafetyMode.None); + public ref bool NetworkingRequested { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E097C8FE57548D5)); + get => ref _Handle.AsRef(_NetworkingRequestedOffset.Value); } + private static readonly Lazy _IsReferencedOffset = new(() => Schema.GetOffset(0x9E097C8FCEABFB2A), LazyThreadSafetyMode.None); + public ref bool IsReferenced { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E097C8FCEABFB2A)); + get => ref _Handle.AsRef(_IsReferencedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimParameterManagerUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimParameterManagerUpdaterImpl.cs index abed8a3bd..c2d6e49da 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimParameterManagerUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimParameterManagerUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CAnimParameterManagerUpdaterImpl : SchemaClass, CAnimPara public CAnimParameterManagerUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParametersOffset = new(() => Schema.GetOffset(0x2289044E99935479), LazyThreadSafetyMode.None); + public ref CUtlVector Parameters { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2289044E99935479)); + get => ref _Handle.AsRef>(_ParametersOffset.Value); } + private static readonly Lazy _IdToIndexMapOffset = new(() => Schema.GetOffset(0x2289044E7B873A5F), LazyThreadSafetyMode.None); + public SchemaUntypedField IdToIndexMap { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x2289044E7B873A5F)); + get => new SchemaUntypedField(_Handle + _IdToIndexMapOffset.Value); } + private static readonly Lazy _NameToIndexMapOffset = new(() => Schema.GetOffset(0x2289044EDA1FC14D), LazyThreadSafetyMode.None); + public SchemaUntypedField NameToIndexMap { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x2289044EDA1FC14D)); + get => new SchemaUntypedField(_Handle + _NameToIndexMapOffset.Value); } + private static readonly Lazy _IndexToHandleOffset = new(() => Schema.GetOffset(0x2289044E3F943600), LazyThreadSafetyMode.None); + public ref CUtlVector IndexToHandle { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2289044E3F943600)); + get => ref _Handle.AsRef>(_IndexToHandleOffset.Value); } + private static readonly Lazy _AutoResetParamsOffset = new(() => Schema.GetOffset(0x2289044EA74F889F), LazyThreadSafetyMode.None); + public ref CUtlVector AutoResetParams { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2289044EA74F889F)); + get => ref _Handle.AsRef>(_AutoResetParamsOffset.Value); } + private static readonly Lazy _AutoResetMapOffset = new(() => Schema.GetOffset(0x2289044E024CB2F5), LazyThreadSafetyMode.None); + public SchemaUntypedField AutoResetMap { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x2289044E024CB2F5)); + get => new SchemaUntypedField(_Handle + _AutoResetMapOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimReplayFrameImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimReplayFrameImpl.cs index abab948a2..e5cc17f23 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimReplayFrameImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimReplayFrameImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CAnimReplayFrameImpl : SchemaClass, CAnimReplayFrame { public CAnimReplayFrameImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputDataBlocksOffset = new(() => Schema.GetOffset(0xBED2F401F7E8195D), LazyThreadSafetyMode.None); + public ref CUtlVector InputDataBlocks { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBED2F401F7E8195D)); + get => ref _Handle.AsRef>(_InputDataBlocksOffset.Value); } + private static readonly Lazy _InstanceDataOffset = new(() => Schema.GetOffset(0xBED2F401AE26D9C2), LazyThreadSafetyMode.None); + public ref CUtlBinaryBlock InstanceData { - get => ref _Handle.AsRef(Schema.GetOffset(0xBED2F401AE26D9C2)); + get => ref _Handle.AsRef(_InstanceDataOffset.Value); } + private static readonly Lazy _StartingLocalToWorldTransformOffset = new(() => Schema.GetOffset(0xBED2F40140311BA5), LazyThreadSafetyMode.None); + public ref CTransform StartingLocalToWorldTransform { - get => ref _Handle.AsRef(Schema.GetOffset(0xBED2F40140311BA5)); + get => ref _Handle.AsRef(_StartingLocalToWorldTransformOffset.Value); } + private static readonly Lazy _LocalToWorldTransformOffset = new(() => Schema.GetOffset(0xBED2F401AE75F5B9), LazyThreadSafetyMode.None); + public ref CTransform LocalToWorldTransform { - get => ref _Handle.AsRef(Schema.GetOffset(0xBED2F401AE75F5B9)); + get => ref _Handle.AsRef(_LocalToWorldTransformOffset.Value); } + private static readonly Lazy _TimeStampOffset = new(() => Schema.GetOffset(0xBED2F4014335BEE3), LazyThreadSafetyMode.None); + public ref float TimeStamp { - get => ref _Handle.AsRef(Schema.GetOffset(0xBED2F4014335BEE3)); + get => ref _Handle.AsRef(_TimeStampOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimScriptBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimScriptBaseImpl.cs index d46d91b75..02ee2384d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimScriptBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimScriptBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CAnimScriptBaseImpl : SchemaClass, CAnimScriptBase { public CAnimScriptBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _IsValidOffset = new(() => Schema.GetOffset(0x621CEA890E4A2BC1), LazyThreadSafetyMode.None); + public ref bool IsValid { - get => ref _Handle.AsRef(Schema.GetOffset(0x621CEA890E4A2BC1)); + get => ref _Handle.AsRef(_IsValidOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimScriptComponentUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimScriptComponentUpdaterImpl.cs index bdd29f680..13d9bffd1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimScriptComponentUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimScriptComponentUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CAnimScriptComponentUpdaterImpl : CAnimComponentUpdaterIm public CAnimScriptComponentUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScriptOffset = new(() => Schema.GetOffset(0x2BD2101829D70FB0), LazyThreadSafetyMode.None); + public AnimScriptHandle Script { - get => new AnimScriptHandleImpl(_Handle + Schema.GetOffset(0x2BD2101829D70FB0)); + get => new AnimScriptHandleImpl(_Handle + _ScriptOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimScriptManagerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimScriptManagerImpl.cs index d808d2077..c0a1533c0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimScriptManagerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimScriptManagerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CAnimScriptManagerImpl : SchemaClass, CAnimScriptManager public CAnimScriptManagerImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScriptInfoOffset = new(() => Schema.GetOffset(0x13962EC3119509F2), LazyThreadSafetyMode.None); + public ref CUtlVector ScriptInfo { - get => ref _Handle.AsRef>(Schema.GetOffset(0x13962EC3119509F2)); + get => ref _Handle.AsRef>(_ScriptInfoOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimSequenceParamsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimSequenceParamsImpl.cs index e78dbd551..f2aeaacca 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimSequenceParamsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimSequenceParamsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CAnimSequenceParamsImpl : SchemaClass, CAnimSequenceParam public CAnimSequenceParamsImpl(nint handle) : base(handle) { } + private static readonly Lazy _FadeInTimeOffset = new(() => Schema.GetOffset(0x651691F81F0255B3), LazyThreadSafetyMode.None); + public ref float FadeInTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x651691F81F0255B3)); + get => ref _Handle.AsRef(_FadeInTimeOffset.Value); } + private static readonly Lazy _FadeOutTimeOffset = new(() => Schema.GetOffset(0x651691F8E86D2FC2), LazyThreadSafetyMode.None); + public ref float FadeOutTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x651691F8E86D2FC2)); + get => ref _Handle.AsRef(_FadeOutTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimSkeletonImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimSkeletonImpl.cs index b028becfc..19fb8c469 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimSkeletonImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimSkeletonImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CAnimSkeletonImpl : SchemaClass, CAnimSkeleton { public CAnimSkeletonImpl(nint handle) : base(handle) { } + private static readonly Lazy _LocalSpaceTransformsOffset = new(() => Schema.GetOffset(0x33309AA433B34B4F), LazyThreadSafetyMode.None); + public ref CUtlVector LocalSpaceTransforms { - get => ref _Handle.AsRef>(Schema.GetOffset(0x33309AA433B34B4F)); + get => ref _Handle.AsRef>(_LocalSpaceTransformsOffset.Value); } + private static readonly Lazy _ModelSpaceTransformsOffset = new(() => Schema.GetOffset(0x33309AA4F9870969), LazyThreadSafetyMode.None); + public ref CUtlVector ModelSpaceTransforms { - get => ref _Handle.AsRef>(Schema.GetOffset(0x33309AA4F9870969)); + get => ref _Handle.AsRef>(_ModelSpaceTransformsOffset.Value); } + private static readonly Lazy _BoneNamesOffset = new(() => Schema.GetOffset(0x33309AA43CC0D1ED), LazyThreadSafetyMode.None); + public ref CUtlVector BoneNames { - get => ref _Handle.AsRef>(Schema.GetOffset(0x33309AA43CC0D1ED)); + get => ref _Handle.AsRef>(_BoneNamesOffset.Value); } + private static readonly Lazy _ChildrenOffset = new(() => Schema.GetOffset(0x33309AA47415FA72), LazyThreadSafetyMode.None); + public ref CUtlVector> Children { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x33309AA47415FA72)); + get => ref _Handle.AsRef>>(_ChildrenOffset.Value); } + private static readonly Lazy _ParentsOffset = new(() => Schema.GetOffset(0x33309AA470DBC8AA), LazyThreadSafetyMode.None); + public ref CUtlVector Parents { - get => ref _Handle.AsRef>(Schema.GetOffset(0x33309AA470DBC8AA)); + get => ref _Handle.AsRef>(_ParentsOffset.Value); } + private static readonly Lazy _FeetOffset = new(() => Schema.GetOffset(0x33309AA47910AFF5), LazyThreadSafetyMode.None); + public ref CUtlVector Feet { - get => ref _Handle.AsRef>(Schema.GetOffset(0x33309AA47910AFF5)); + get => ref _Handle.AsRef>(_FeetOffset.Value); } + private static readonly Lazy _MorphNamesOffset = new(() => Schema.GetOffset(0x33309AA4E8F4EC4F), LazyThreadSafetyMode.None); + public ref CUtlVector MorphNames { - get => ref _Handle.AsRef>(Schema.GetOffset(0x33309AA4E8F4EC4F)); + get => ref _Handle.AsRef>(_MorphNamesOffset.Value); } + private static readonly Lazy _LodBoneCountsOffset = new(() => Schema.GetOffset(0x33309AA4403723B2), LazyThreadSafetyMode.None); + public ref CUtlVector LodBoneCounts { - get => ref _Handle.AsRef>(Schema.GetOffset(0x33309AA4403723B2)); + get => ref _Handle.AsRef>(_LodBoneCountsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimStateMachineUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimStateMachineUpdaterImpl.cs index cb6173e56..49c2d3712 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimStateMachineUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimStateMachineUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CAnimStateMachineUpdaterImpl : SchemaClass, CAnimStateMac public CAnimStateMachineUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _StatesOffset = new(() => Schema.GetOffset(0xD25DFB766F284CFF), LazyThreadSafetyMode.None); + public ref CUtlVector States { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD25DFB766F284CFF)); + get => ref _Handle.AsRef>(_StatesOffset.Value); } + private static readonly Lazy _TransitionsOffset = new(() => Schema.GetOffset(0xD25DFB76AD108163), LazyThreadSafetyMode.None); + public ref CUtlVector Transitions { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD25DFB76AD108163)); + get => ref _Handle.AsRef>(_TransitionsOffset.Value); } + private static readonly Lazy _StartStateIndexOffset = new(() => Schema.GetOffset(0xD25DFB762881C68C), LazyThreadSafetyMode.None); + public ref int StartStateIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xD25DFB762881C68C)); + get => ref _Handle.AsRef(_StartStateIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimTagBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimTagBaseImpl.cs index 46115ec34..86580e04f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimTagBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimTagBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class CAnimTagBaseImpl : SchemaClass, CAnimTagBase { public CAnimTagBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x8F7709C44D8F5786), LazyThreadSafetyMode.None); + public ref CGlobalSymbol Name { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F7709C44D8F5786)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _CommentOffset = new(() => Schema.GetOffset(0x8F7709C488A0B4DF), LazyThreadSafetyMode.None); + public string Comment { get { - var ptr = _Handle.Read(Schema.GetOffset(0x8F7709C488A0B4DF)); + var ptr = _Handle.Read(_CommentOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x8F7709C488A0B4DF, value); + set => Schema.SetString(_Handle, _CommentOffset.Value, value); } + private static readonly Lazy _GroupOffset = new(() => Schema.GetOffset(0x8F7709C49FC645AC), LazyThreadSafetyMode.None); + public ref CGlobalSymbol Group { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F7709C49FC645AC)); + get => ref _Handle.AsRef(_GroupOffset.Value); } + private static readonly Lazy _TagIDOffset = new(() => Schema.GetOffset(0x8F7709C41F65DDFE), LazyThreadSafetyMode.None); + public AnimTagID TagID { - get => new AnimTagIDImpl(_Handle + Schema.GetOffset(0x8F7709C41F65DDFE)); + get => new AnimTagIDImpl(_Handle + _TagIDOffset.Value); } + private static readonly Lazy _IsReferencedOffset = new(() => Schema.GetOffset(0x8F7709C4CEABFB2A), LazyThreadSafetyMode.None); + public ref bool IsReferenced { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F7709C4CEABFB2A)); + get => ref _Handle.AsRef(_IsReferencedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimTagManagerUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimTagManagerUpdaterImpl.cs index fb2715fc9..648c59543 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimTagManagerUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimTagManagerUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CAnimTagManagerUpdaterImpl : SchemaClass, CAnimTagManager public CAnimTagManagerUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _TagsOffset = new(() => Schema.GetOffset(0xF09D3FB1B46C8540), LazyThreadSafetyMode.None); + public ref CUtlVector Tags { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF09D3FB1B46C8540)); + get => ref _Handle.AsRef>(_TagsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUpdateNodeBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUpdateNodeBaseImpl.cs index beeea78d2..0ccf01127 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUpdateNodeBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUpdateNodeBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class CAnimUpdateNodeBaseImpl : SchemaClass, CAnimUpdateNodeBas public CAnimUpdateNodeBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _NodePathOffset = new(() => Schema.GetOffset(0xA16B836B69EE5E4E), LazyThreadSafetyMode.None); + public CAnimNodePath NodePath { - get => new CAnimNodePathImpl(_Handle + Schema.GetOffset(0xA16B836B69EE5E4E)); + get => new CAnimNodePathImpl(_Handle + _NodePathOffset.Value); } + private static readonly Lazy _NetworkModeOffset = new(() => Schema.GetOffset(0xA16B836BE3307112), LazyThreadSafetyMode.None); + public ref AnimNodeNetworkMode NetworkMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xA16B836BE3307112)); + get => ref _Handle.AsRef(_NetworkModeOffset.Value); } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xA16B836B4D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA16B836B4D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA16B836B4D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUpdateNodeRefImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUpdateNodeRefImpl.cs index 51cc45646..5d1ba6ec9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUpdateNodeRefImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUpdateNodeRefImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CAnimUpdateNodeRefImpl : SchemaClass, CAnimUpdateNodeRef public CAnimUpdateNodeRefImpl(nint handle) : base(handle) { } + private static readonly Lazy _NodeIndexOffset = new(() => Schema.GetOffset(0x71F7CF87E37313D3), LazyThreadSafetyMode.None); + public ref int NodeIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x71F7CF87E37313D3)); + get => ref _Handle.AsRef(_NodeIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUpdateSharedDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUpdateSharedDataImpl.cs index 4e7298932..2ebeab4c1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUpdateSharedDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUpdateSharedDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class CAnimUpdateSharedDataImpl : SchemaClass, CAnimUpdateShare public CAnimUpdateSharedDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _NodesOffset = new(() => Schema.GetOffset(0xA294DB47780F027A), LazyThreadSafetyMode.None); + public ref CUtlVector Nodes { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA294DB47780F027A)); + get => ref _Handle.AsRef>(_NodesOffset.Value); } + private static readonly Lazy _NodeIndexMapOffset = new(() => Schema.GetOffset(0xA294DB47D3B3E7A3), LazyThreadSafetyMode.None); + public SchemaUntypedField NodeIndexMap { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA294DB47D3B3E7A3)); + get => new SchemaUntypedField(_Handle + _NodeIndexMapOffset.Value); } + private static readonly Lazy _ComponentsOffset = new(() => Schema.GetOffset(0xA294DB47F87FC409), LazyThreadSafetyMode.None); + public ref CUtlVector Components { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA294DB47F87FC409)); + get => ref _Handle.AsRef>(_ComponentsOffset.Value); } + private static readonly Lazy _ParamListUpdaterOffset = new(() => Schema.GetOffset(0xA294DB4784AA7F15), LazyThreadSafetyMode.None); + public SchemaUntypedField ParamListUpdater { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA294DB4784AA7F15)); + get => new SchemaUntypedField(_Handle + _ParamListUpdaterOffset.Value); } + private static readonly Lazy _TagManagerUpdaterOffset = new(() => Schema.GetOffset(0xA294DB47432E460D), LazyThreadSafetyMode.None); + public SchemaUntypedField TagManagerUpdater { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA294DB47432E460D)); + get => new SchemaUntypedField(_Handle + _TagManagerUpdaterOffset.Value); } + private static readonly Lazy _ScriptManagerOffset = new(() => Schema.GetOffset(0xA294DB47F4257D31), LazyThreadSafetyMode.None); + public SchemaUntypedField ScriptManager { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA294DB47F4257D31)); + get => new SchemaUntypedField(_Handle + _ScriptManagerOffset.Value); } + private static readonly Lazy _SettingsOffset = new(() => Schema.GetOffset(0xA294DB47B3DE33A8), LazyThreadSafetyMode.None); + public CAnimGraphSettingsManager Settings { - get => new CAnimGraphSettingsManagerImpl(_Handle + Schema.GetOffset(0xA294DB47B3DE33A8)); + get => new CAnimGraphSettingsManagerImpl(_Handle + _SettingsOffset.Value); } + private static readonly Lazy _StaticPoseCacheOffset = new(() => Schema.GetOffset(0xA294DB475BFC0C1E), LazyThreadSafetyMode.None); + public SchemaUntypedField StaticPoseCache { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA294DB475BFC0C1E)); + get => new SchemaUntypedField(_Handle + _StaticPoseCacheOffset.Value); } + private static readonly Lazy _SkeletonOffset = new(() => Schema.GetOffset(0xA294DB4744BBF688), LazyThreadSafetyMode.None); + public SchemaUntypedField Skeleton { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA294DB4744BBF688)); + get => new SchemaUntypedField(_Handle + _SkeletonOffset.Value); } + private static readonly Lazy _RootNodePathOffset = new(() => Schema.GetOffset(0xA294DB476893B9EE), LazyThreadSafetyMode.None); + public CAnimNodePath RootNodePath { - get => new CAnimNodePathImpl(_Handle + Schema.GetOffset(0xA294DB476893B9EE)); + get => new CAnimNodePathImpl(_Handle + _RootNodePathOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUserDifferenceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUserDifferenceImpl.cs index f16901b46..c944a94e0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUserDifferenceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUserDifferenceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CAnimUserDifferenceImpl : SchemaClass, CAnimUserDifferenc public CAnimUserDifferenceImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x8F174EDB4D8F5786), LazyThreadSafetyMode.None); + public ref CBufferString Name { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F174EDB4D8F5786)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x8F174EDB18853D59), LazyThreadSafetyMode.None); + public ref int Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F174EDB18853D59)); + get => ref _Handle.AsRef(_TypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUserImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUserImpl.cs index 6ccddcf05..a34e10c0f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUserImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimUserImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CAnimUserImpl : SchemaClass, CAnimUser { public CAnimUserImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xA77D4C084D8F5786), LazyThreadSafetyMode.None); + public ref CBufferString Name { - get => ref _Handle.AsRef(Schema.GetOffset(0xA77D4C084D8F5786)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0xA77D4C0818853D59), LazyThreadSafetyMode.None); + public ref int Type { - get => ref _Handle.AsRef(Schema.GetOffset(0xA77D4C0818853D59)); + get => ref _Handle.AsRef(_TypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerAxisImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerAxisImpl.cs index 055e34c93..969278eaf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerAxisImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerAxisImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CAnimationGraphVisualizerAxisImpl : CAnimationGraphVisual public CAnimationGraphVisualizerAxisImpl(nint handle) : base(handle) { } + private static readonly Lazy _XWsTransformOffset = new(() => Schema.GetOffset(0xB0A274E9AE1478FF), LazyThreadSafetyMode.None); + public ref CTransform XWsTransform { - get => ref _Handle.AsRef(Schema.GetOffset(0xB0A274E9AE1478FF)); + get => ref _Handle.AsRef(_XWsTransformOffset.Value); } + private static readonly Lazy _AxisSizeOffset = new(() => Schema.GetOffset(0xB0A274E9224B2A23), LazyThreadSafetyMode.None); + public ref float AxisSize { - get => ref _Handle.AsRef(Schema.GetOffset(0xB0A274E9224B2A23)); + get => ref _Handle.AsRef(_AxisSizeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerLineImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerLineImpl.cs index d196fb50a..d9fb5edba 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerLineImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerLineImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CAnimationGraphVisualizerLineImpl : CAnimationGraphVisual public CAnimationGraphVisualizerLineImpl(nint handle) : base(handle) { } + private static readonly Lazy _WsPositionStartOffset = new(() => Schema.GetOffset(0x688831B2D941E214), LazyThreadSafetyMode.None); + public ref Vector WsPositionStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x688831B2D941E214)); + get => ref _Handle.AsRef(_WsPositionStartOffset.Value); } + private static readonly Lazy _WsPositionEndOffset = new(() => Schema.GetOffset(0x688831B26EB28B6D), LazyThreadSafetyMode.None); + public ref Vector WsPositionEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x688831B26EB28B6D)); + get => ref _Handle.AsRef(_WsPositionEndOffset.Value); } + private static readonly Lazy _ColorOffset = new(() => Schema.GetOffset(0x688831B2D7D017D8), LazyThreadSafetyMode.None); + public ref Color Color { - get => ref _Handle.AsRef(Schema.GetOffset(0x688831B2D7D017D8)); + get => ref _Handle.AsRef(_ColorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerPieImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerPieImpl.cs index 48b1d1eec..8415cfde2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerPieImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerPieImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CAnimationGraphVisualizerPieImpl : CAnimationGraphVisuali public CAnimationGraphVisualizerPieImpl(nint handle) : base(handle) { } + private static readonly Lazy _WsCenterOffset = new(() => Schema.GetOffset(0x152844C290A3905E), LazyThreadSafetyMode.None); + public ref Vector WsCenter { - get => ref _Handle.AsRef(Schema.GetOffset(0x152844C290A3905E)); + get => ref _Handle.AsRef(_WsCenterOffset.Value); } + private static readonly Lazy _WsStartOffset = new(() => Schema.GetOffset(0x152844C2EFF42149), LazyThreadSafetyMode.None); + public ref Vector WsStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x152844C2EFF42149)); + get => ref _Handle.AsRef(_WsStartOffset.Value); } + private static readonly Lazy _WsEndOffset = new(() => Schema.GetOffset(0x152844C280C1EC98), LazyThreadSafetyMode.None); + public ref Vector WsEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x152844C280C1EC98)); + get => ref _Handle.AsRef(_WsEndOffset.Value); } + private static readonly Lazy _ColorOffset = new(() => Schema.GetOffset(0x152844C2D7D017D8), LazyThreadSafetyMode.None); + public ref Color Color { - get => ref _Handle.AsRef(Schema.GetOffset(0x152844C2D7D017D8)); + get => ref _Handle.AsRef(_ColorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerPrimitiveBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerPrimitiveBaseImpl.cs index f46ffc6c0..bb2439cfd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerPrimitiveBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerPrimitiveBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CAnimationGraphVisualizerPrimitiveBaseImpl : SchemaClass, public CAnimationGraphVisualizerPrimitiveBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x5204B0848ED6D5CD), LazyThreadSafetyMode.None); + public ref CAnimationGraphVisualizerPrimitiveType Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x5204B0848ED6D5CD)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _OwningAnimNodePathsOffset = new(() => Schema.GetOffset(0x5204B08461A2E55C), LazyThreadSafetyMode.None); + public SchemaUntypedField OwningAnimNodePaths { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x5204B08461A2E55C)); + get => new SchemaUntypedField(_Handle + _OwningAnimNodePathsOffset.Value); } + private static readonly Lazy _OwningAnimNodePathCountOffset = new(() => Schema.GetOffset(0x5204B0844241A972), LazyThreadSafetyMode.None); + public ref int OwningAnimNodePathCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x5204B0844241A972)); + get => ref _Handle.AsRef(_OwningAnimNodePathCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerSphereImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerSphereImpl.cs index fe80fb9d1..fcb1fffac 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerSphereImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerSphereImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CAnimationGraphVisualizerSphereImpl : CAnimationGraphVisu public CAnimationGraphVisualizerSphereImpl(nint handle) : base(handle) { } + private static readonly Lazy _WsPositionOffset = new(() => Schema.GetOffset(0x85D725BDCA77AB88), LazyThreadSafetyMode.None); + public ref Vector WsPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x85D725BDCA77AB88)); + get => ref _Handle.AsRef(_WsPositionOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x85D725BD5ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x85D725BD5ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _ColorOffset = new(() => Schema.GetOffset(0x85D725BDD7D017D8), LazyThreadSafetyMode.None); + public ref Color Color { - get => ref _Handle.AsRef(Schema.GetOffset(0x85D725BDD7D017D8)); + get => ref _Handle.AsRef(_ColorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerTextImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerTextImpl.cs index 51747ab93..9d7fa903a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerTextImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGraphVisualizerTextImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class CAnimationGraphVisualizerTextImpl : CAnimationGraphVisual public CAnimationGraphVisualizerTextImpl(nint handle) : base(handle) { } + private static readonly Lazy _WsPositionOffset = new(() => Schema.GetOffset(0x123E08CFCA77AB88), LazyThreadSafetyMode.None); + public ref Vector WsPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x123E08CFCA77AB88)); + get => ref _Handle.AsRef(_WsPositionOffset.Value); } + private static readonly Lazy _ColorOffset = new(() => Schema.GetOffset(0x123E08CFD7D017D8), LazyThreadSafetyMode.None); + public ref Color Color { - get => ref _Handle.AsRef(Schema.GetOffset(0x123E08CFD7D017D8)); + get => ref _Handle.AsRef(_ColorOffset.Value); } + private static readonly Lazy _TextOffset = new(() => Schema.GetOffset(0x123E08CFFB9532BE), LazyThreadSafetyMode.None); + public string Text { get { - var ptr = _Handle.Read(Schema.GetOffset(0x123E08CFFB9532BE)); + var ptr = _Handle.Read(_TextOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x123E08CFFB9532BE, value); + set => Schema.SetString(_Handle, _TextOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGroupImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGroupImpl.cs index 160a9d5be..1beaeee6f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGroupImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAnimationGroupImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CAnimationGroupImpl : SchemaClass, CAnimationGroup { public CAnimationGroupImpl(nint handle) : base(handle) { } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x338D4483CE6E9C28), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x338D4483CE6E9C28)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x338D44834D8F5786), LazyThreadSafetyMode.None); + public ref CBufferString Name { - get => ref _Handle.AsRef(Schema.GetOffset(0x338D44834D8F5786)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _LocalHAnimArray_HandleOffset = new(() => Schema.GetOffset(0x338D44834059130D), LazyThreadSafetyMode.None); + public ref CUtlVector> LocalHAnimArray_Handle { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x338D44834059130D)); + get => ref _Handle.AsRef>>(_LocalHAnimArray_HandleOffset.Value); } + private static readonly Lazy _IncludedGroupArray_HandleOffset = new(() => Schema.GetOffset(0x338D4483029BD190), LazyThreadSafetyMode.None); + public ref CUtlVector> IncludedGroupArray_Handle { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x338D4483029BD190)); + get => ref _Handle.AsRef>>(_IncludedGroupArray_HandleOffset.Value); } + private static readonly Lazy _DirectHSeqGroup_HandleOffset = new(() => Schema.GetOffset(0x338D44836F0E7A99), LazyThreadSafetyMode.None); + public ref CStrongHandle DirectHSeqGroup_Handle { - get => ref _Handle.AsRef>(Schema.GetOffset(0x338D44836F0E7A99)); + get => ref _Handle.AsRef>(_DirectHSeqGroup_HandleOffset.Value); } + private static readonly Lazy _DecodeKeyOffset = new(() => Schema.GetOffset(0x338D4483923D44D6), LazyThreadSafetyMode.None); + public CAnimKeyData DecodeKey { - get => new CAnimKeyDataImpl(_Handle + Schema.GetOffset(0x338D4483923D44D6)); + get => new CAnimKeyDataImpl(_Handle + _DecodeKeyOffset.Value); } + private static readonly Lazy _ScriptsOffset = new(() => Schema.GetOffset(0x338D4483F1FF2218), LazyThreadSafetyMode.None); + public ref CUtlVector Scripts { - get => ref _Handle.AsRef>(Schema.GetOffset(0x338D4483F1FF2218)); + get => ref _Handle.AsRef>(_ScriptsOffset.Value); } + private static readonly Lazy _AdditionalExtRefsOffset = new(() => Schema.GetOffset(0x338D448349CEFD51), LazyThreadSafetyMode.None); + public ref CUtlVector AdditionalExtRefs { - get => ref _Handle.AsRef>(Schema.GetOffset(0x338D448349CEFD51)); + get => ref _Handle.AsRef>(_AdditionalExtRefsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttachmentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttachmentImpl.cs index cd6bf8183..bf91e0f15 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttachmentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttachmentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,19 +17,23 @@ internal partial class CAttachmentImpl : SchemaClass, CAttachment { public CAttachmentImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x5F09808F4D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x5F09808F4D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x5F09808F4D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _InfluenceNamesOffset = new(() => Schema.GetOffset(0x5F09808FFD9B3CB8), LazyThreadSafetyMode.None); + public string InfluenceNames { get { - var ptr = _Handle.Read(Schema.GetOffset(0x5F09808FFD9B3CB8)); + var ptr = _Handle.Read(_InfluenceNamesOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x5F09808FFD9B3CB8, value); + set => Schema.SetString(_Handle, _InfluenceNamesOffset.Value, value); } public ISchemaFixedArray InfluenceRotations { get => new SchemaFixedArray(_Handle, 0x5F09808FD277168B, 3, 16, 16); @@ -41,11 +47,15 @@ public ISchemaFixedArray InfluenceWeights { public ISchemaFixedArray InfluenceRootTransform { get => new SchemaFixedArray(_Handle, 0x5F09808F5763011C, 3, 1, 1); } + private static readonly Lazy _InfluencesOffset = new(() => Schema.GetOffset(0x5F09808F8E94AB85), LazyThreadSafetyMode.None); + public ref byte Influences { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F09808F8E94AB85)); + get => ref _Handle.AsRef(_InfluencesOffset.Value); } + private static readonly Lazy _IgnoreRotationOffset = new(() => Schema.GetOffset(0x5F09808FC7A0F33D), LazyThreadSafetyMode.None); + public ref bool IgnoreRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F09808FC7A0F33D)); + get => ref _Handle.AsRef(_IgnoreRotationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttributeContainerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttributeContainerImpl.cs index 0d273efd6..1d2346ab8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttributeContainerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttributeContainerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CAttributeContainerImpl : CAttributeManagerImpl, CAttribu public CAttributeContainerImpl(nint handle) : base(handle) { } + private static readonly Lazy _ItemOffset = new(() => Schema.GetOffset(0x554833CDDCE71866), LazyThreadSafetyMode.None); + public CEconItemView Item { - get => new CEconItemViewImpl(_Handle + Schema.GetOffset(0x554833CDDCE71866)); + get => new CEconItemViewImpl(_Handle + _ItemOffset.Value); } public void ItemUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttributeListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttributeListImpl.cs index 6677c24a4..8ece6059f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttributeListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttributeListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,16 @@ internal partial class CAttributeListImpl : SchemaClass, CAttributeList { public CAttributeListImpl(nint handle) : base(handle) { } + private static readonly Lazy _AttributesOffset = new(() => Schema.GetOffset(0x1028A18A7E139C14), LazyThreadSafetyMode.None); + public ref CUtlVector Attributes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1028A18A7E139C14)); + get => ref _Handle.AsRef>(_AttributesOffset.Value); } + private static readonly Lazy _ManagerOffset = new(() => Schema.GetOffset(0x1028A18AB9A09BE6), LazyThreadSafetyMode.None); + public CAttributeManager? Manager { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1028A18AB9A09BE6)); + var ptr = _Handle.Read(_ManagerOffset.Value); return ptr.IsValidPtr() ? new CAttributeManagerImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttributeManagerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttributeManagerImpl.cs index 2fc734a6f..47a41eafc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttributeManagerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttributeManagerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CAttributeManagerImpl : SchemaClass, CAttributeManager { public CAttributeManagerImpl(nint handle) : base(handle) { } + private static readonly Lazy _ProvidersOffset = new(() => Schema.GetOffset(0x7FCB380DA07F345D), LazyThreadSafetyMode.None); + public ref CUtlVector> Providers { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x7FCB380DA07F345D)); + get => ref _Handle.AsRef>>(_ProvidersOffset.Value); } + private static readonly Lazy _ReapplyProvisionParityOffset = new(() => Schema.GetOffset(0x7FCB380D2F68110B), LazyThreadSafetyMode.None); + public ref int ReapplyProvisionParity { - get => ref _Handle.AsRef(Schema.GetOffset(0x7FCB380D2F68110B)); + get => ref _Handle.AsRef(_ReapplyProvisionParityOffset.Value); } + private static readonly Lazy _OuterOffset = new(() => Schema.GetOffset(0x7FCB380D30AE9FA2), LazyThreadSafetyMode.None); + public ref CHandle Outer { - get => ref _Handle.AsRef>(Schema.GetOffset(0x7FCB380D30AE9FA2)); + get => ref _Handle.AsRef>(_OuterOffset.Value); } + private static readonly Lazy _PreventLoopbackOffset = new(() => Schema.GetOffset(0x7FCB380D2CE71CA4), LazyThreadSafetyMode.None); + public ref bool PreventLoopback { - get => ref _Handle.AsRef(Schema.GetOffset(0x7FCB380D2CE71CA4)); + get => ref _Handle.AsRef(_PreventLoopbackOffset.Value); } + private static readonly Lazy _ProviderTypeOffset = new(() => Schema.GetOffset(0x7FCB380DD5677CB4), LazyThreadSafetyMode.None); + public ref attributeprovidertypes_t ProviderType { - get => ref _Handle.AsRef(Schema.GetOffset(0x7FCB380DD5677CB4)); + get => ref _Handle.AsRef(_ProviderTypeOffset.Value); } + private static readonly Lazy _CachedResultsOffset = new(() => Schema.GetOffset(0x7FCB380D3CD4B7CB), LazyThreadSafetyMode.None); + public ref CUtlVector CachedResults { - get => ref _Handle.AsRef>(Schema.GetOffset(0x7FCB380D3CD4B7CB)); + get => ref _Handle.AsRef>(_CachedResultsOffset.Value); } public void ReapplyProvisionParityUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttributeManager__cached_attribute_float_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttributeManager__cached_attribute_float_tImpl.cs index aadb32610..5456085d4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttributeManager__cached_attribute_float_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAttributeManager__cached_attribute_float_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class CAttributeManager__cached_attribute_float_tImpl : SchemaC public CAttributeManager__cached_attribute_float_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _InOffset = new(() => Schema.GetOffset(0xE3C5A1BAD526F734), LazyThreadSafetyMode.None); + public ref float In { - get => ref _Handle.AsRef(Schema.GetOffset(0xE3C5A1BAD526F734)); + get => ref _Handle.AsRef(_InOffset.Value); } + private static readonly Lazy _AttribHookOffset = new(() => Schema.GetOffset(0xE3C5A1BACD388D67), LazyThreadSafetyMode.None); + public string AttribHook { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE3C5A1BACD388D67)); + var ptr = _Handle.Read(_AttribHookOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xE3C5A1BACD388D67, value); + set => Schema.SetString(_Handle, _AttribHookOffset.Value, value); } + private static readonly Lazy _OutOffset = new(() => Schema.GetOffset(0xE3C5A1BA546B7BE1), LazyThreadSafetyMode.None); + public ref float Out { - get => ref _Handle.AsRef(Schema.GetOffset(0xE3C5A1BA546B7BE1)); + get => ref _Handle.AsRef(_OutOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioAnimTagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioAnimTagImpl.cs index 75de9d928..ca754c297 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioAnimTagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioAnimTagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,34 +17,48 @@ internal partial class CAudioAnimTagImpl : CAnimTagBaseImpl, CAudioAnimTag { public CAudioAnimTagImpl(nint handle) : base(handle) { } + private static readonly Lazy _ClipNameOffset = new(() => Schema.GetOffset(0x785914777D84420), LazyThreadSafetyMode.None); + public string ClipName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x785914777D84420)); + var ptr = _Handle.Read(_ClipNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x785914777D84420, value); + set => Schema.SetString(_Handle, _ClipNameOffset.Value, value); } + private static readonly Lazy _AttachmentNameOffset = new(() => Schema.GetOffset(0x7859147295DA9CB), LazyThreadSafetyMode.None); + public string AttachmentName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7859147295DA9CB)); + var ptr = _Handle.Read(_AttachmentNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7859147295DA9CB, value); + set => Schema.SetString(_Handle, _AttachmentNameOffset.Value, value); } + private static readonly Lazy _VolumeOffset = new(() => Schema.GetOffset(0x78591477647E0C9), LazyThreadSafetyMode.None); + public ref float Volume { - get => ref _Handle.AsRef(Schema.GetOffset(0x78591477647E0C9)); + get => ref _Handle.AsRef(_VolumeOffset.Value); } + private static readonly Lazy _StopWhenTagEndsOffset = new(() => Schema.GetOffset(0x7859147878BB46D), LazyThreadSafetyMode.None); + public ref bool StopWhenTagEnds { - get => ref _Handle.AsRef(Schema.GetOffset(0x7859147878BB46D)); + get => ref _Handle.AsRef(_StopWhenTagEndsOffset.Value); } + private static readonly Lazy _StopWhenGraphEndsOffset = new(() => Schema.GetOffset(0x785914705444061), LazyThreadSafetyMode.None); + public ref bool StopWhenGraphEnds { - get => ref _Handle.AsRef(Schema.GetOffset(0x785914705444061)); + get => ref _Handle.AsRef(_StopWhenGraphEndsOffset.Value); } + private static readonly Lazy _PlayOnServerOffset = new(() => Schema.GetOffset(0x7859147BAA179F9), LazyThreadSafetyMode.None); + public ref bool PlayOnServer { - get => ref _Handle.AsRef(Schema.GetOffset(0x7859147BAA179F9)); + get => ref _Handle.AsRef(_PlayOnServerOffset.Value); } + private static readonly Lazy _PlayOnClientOffset = new(() => Schema.GetOffset(0x78591471136791D), LazyThreadSafetyMode.None); + public ref bool PlayOnClient { - get => ref _Handle.AsRef(Schema.GetOffset(0x78591471136791D)); + get => ref _Handle.AsRef(_PlayOnClientOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioEmphasisSampleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioEmphasisSampleImpl.cs index 9b0812cfd..ef59e0e65 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioEmphasisSampleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioEmphasisSampleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CAudioEmphasisSampleImpl : SchemaClass, CAudioEmphasisSam public CAudioEmphasisSampleImpl(nint handle) : base(handle) { } + private static readonly Lazy _TimeOffset = new(() => Schema.GetOffset(0x37D4D710C957229E), LazyThreadSafetyMode.None); + public ref float Time { - get => ref _Handle.AsRef(Schema.GetOffset(0x37D4D710C957229E)); + get => ref _Handle.AsRef(_TimeOffset.Value); } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x37D4D7108DFCB984), LazyThreadSafetyMode.None); + public ref float Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x37D4D7108DFCB984)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioMorphDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioMorphDataImpl.cs index 6e5ddb7ab..f21304e1b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioMorphDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioMorphDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CAudioMorphDataImpl : SchemaClass, CAudioMorphData { public CAudioMorphDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _TimesOffset = new(() => Schema.GetOffset(0xA13726EA86A55CD5), LazyThreadSafetyMode.None); + public ref CUtlVector Times { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA13726EA86A55CD5)); + get => ref _Handle.AsRef>(_TimesOffset.Value); } + private static readonly Lazy _NameHashCodesOffset = new(() => Schema.GetOffset(0xA13726EAC13918BC), LazyThreadSafetyMode.None); + public ref CUtlVector NameHashCodes { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA13726EAC13918BC)); + get => ref _Handle.AsRef>(_NameHashCodesOffset.Value); } + private static readonly Lazy _NameStringsOffset = new(() => Schema.GetOffset(0xA13726EA23776A0C), LazyThreadSafetyMode.None); + public ref CUtlVector NameStrings { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA13726EA23776A0C)); + get => ref _Handle.AsRef>(_NameStringsOffset.Value); } + private static readonly Lazy _SamplesOffset = new(() => Schema.GetOffset(0xA13726EA364CA9DC), LazyThreadSafetyMode.None); + public ref CUtlVector> Samples { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xA13726EA364CA9DC)); + get => ref _Handle.AsRef>>(_SamplesOffset.Value); } + private static readonly Lazy _EaseInOffset = new(() => Schema.GetOffset(0xA13726EA4514C026), LazyThreadSafetyMode.None); + public ref float EaseIn { - get => ref _Handle.AsRef(Schema.GetOffset(0xA13726EA4514C026)); + get => ref _Handle.AsRef(_EaseInOffset.Value); } + private static readonly Lazy _EaseOutOffset = new(() => Schema.GetOffset(0xA13726EA46B49C07), LazyThreadSafetyMode.None); + public ref float EaseOut { - get => ref _Handle.AsRef(Schema.GetOffset(0xA13726EA46B49C07)); + get => ref _Handle.AsRef(_EaseOutOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioPhonemeTagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioPhonemeTagImpl.cs index 4f572e903..bfebe6ecf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioPhonemeTagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioPhonemeTagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CAudioPhonemeTagImpl : SchemaClass, CAudioPhonemeTag { public CAudioPhonemeTagImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0xBE68CF3E67FE9DC4), LazyThreadSafetyMode.None); + public ref float StartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE68CF3E67FE9DC4)); + get => ref _Handle.AsRef(_StartTimeOffset.Value); } + private static readonly Lazy _EndTimeOffset = new(() => Schema.GetOffset(0xBE68CF3E2041DF9D), LazyThreadSafetyMode.None); + public ref float EndTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE68CF3E2041DF9D)); + get => ref _Handle.AsRef(_EndTimeOffset.Value); } + private static readonly Lazy _PhonemeCodeOffset = new(() => Schema.GetOffset(0xBE68CF3EBFB1B4C4), LazyThreadSafetyMode.None); + public ref int PhonemeCode { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE68CF3EBFB1B4C4)); + get => ref _Handle.AsRef(_PhonemeCodeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioSentenceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioSentenceImpl.cs index 6f51ca0fe..134609dc8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioSentenceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CAudioSentenceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CAudioSentenceImpl : SchemaClass, CAudioSentence { public CAudioSentenceImpl(nint handle) : base(handle) { } + private static readonly Lazy _ShouldVoiceDuckOffset = new(() => Schema.GetOffset(0x25F8D719C546CD15), LazyThreadSafetyMode.None); + public ref bool ShouldVoiceDuck { - get => ref _Handle.AsRef(Schema.GetOffset(0x25F8D719C546CD15)); + get => ref _Handle.AsRef(_ShouldVoiceDuckOffset.Value); } + private static readonly Lazy _RunTimePhonemesOffset = new(() => Schema.GetOffset(0x25F8D719C0434838), LazyThreadSafetyMode.None); + public ref CUtlVector RunTimePhonemes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x25F8D719C0434838)); + get => ref _Handle.AsRef>(_RunTimePhonemesOffset.Value); } + private static readonly Lazy _EmphasisSamplesOffset = new(() => Schema.GetOffset(0x25F8D7194EBE8F82), LazyThreadSafetyMode.None); + public ref CUtlVector EmphasisSamples { - get => ref _Handle.AsRef>(Schema.GetOffset(0x25F8D7194EBE8F82)); + get => ref _Handle.AsRef>(_EmphasisSamplesOffset.Value); } + private static readonly Lazy _MorphDataOffset = new(() => Schema.GetOffset(0x25F8D719A8207F65), LazyThreadSafetyMode.None); + public CAudioMorphData MorphData { - get => new CAudioMorphDataImpl(_Handle + Schema.GetOffset(0x25F8D719A8207F65)); + get => new CAudioMorphDataImpl(_Handle + _MorphDataOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBarnLightImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBarnLightImpl.cs index 1d17d7a87..9998d342a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBarnLightImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBarnLightImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,237 +17,389 @@ internal partial class CBarnLightImpl : CBaseModelEntityImpl, CBarnLight { public CBarnLightImpl(nint handle) : base(handle) { } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0xB5E331D16154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D16154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } + private static readonly Lazy _ColorModeOffset = new(() => Schema.GetOffset(0xB5E331D135E5C3F7), LazyThreadSafetyMode.None); + public ref int ColorMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D135E5C3F7)); + get => ref _Handle.AsRef(_ColorModeOffset.Value); } + private static readonly Lazy _ColorOffset = new(() => Schema.GetOffset(0xB5E331D1D7D017D8), LazyThreadSafetyMode.None); + public ref Color Color { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1D7D017D8)); + get => ref _Handle.AsRef(_ColorOffset.Value); } + private static readonly Lazy _ColorTemperatureOffset = new(() => Schema.GetOffset(0xB5E331D1E9FB4614), LazyThreadSafetyMode.None); + public ref float ColorTemperature { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1E9FB4614)); + get => ref _Handle.AsRef(_ColorTemperatureOffset.Value); } + private static readonly Lazy _BrightnessOffset = new(() => Schema.GetOffset(0xB5E331D19132D314), LazyThreadSafetyMode.None); + public ref float Brightness { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D19132D314)); + get => ref _Handle.AsRef(_BrightnessOffset.Value); } + private static readonly Lazy _BrightnessScaleOffset = new(() => Schema.GetOffset(0xB5E331D15EFC3AAE), LazyThreadSafetyMode.None); + public ref float BrightnessScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D15EFC3AAE)); + get => ref _Handle.AsRef(_BrightnessScaleOffset.Value); } + private static readonly Lazy _DirectLightOffset = new(() => Schema.GetOffset(0xB5E331D1DEC0AAB4), LazyThreadSafetyMode.None); + public ref int DirectLight { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1DEC0AAB4)); + get => ref _Handle.AsRef(_DirectLightOffset.Value); } + private static readonly Lazy _BakedShadowIndexOffset = new(() => Schema.GetOffset(0xB5E331D1D4F129E0), LazyThreadSafetyMode.None); + public ref int BakedShadowIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1D4F129E0)); + get => ref _Handle.AsRef(_BakedShadowIndexOffset.Value); } + private static readonly Lazy _LightPathUniqueIdOffset = new(() => Schema.GetOffset(0xB5E331D18626C8FE), LazyThreadSafetyMode.None); + public ref int LightPathUniqueId { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D18626C8FE)); + get => ref _Handle.AsRef(_LightPathUniqueIdOffset.Value); } + private static readonly Lazy _LightMapUniqueIdOffset = new(() => Schema.GetOffset(0xB5E331D18E111BB5), LazyThreadSafetyMode.None); + public ref int LightMapUniqueId { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D18E111BB5)); + get => ref _Handle.AsRef(_LightMapUniqueIdOffset.Value); } + private static readonly Lazy _LuminaireShapeOffset = new(() => Schema.GetOffset(0xB5E331D1F648BF4A), LazyThreadSafetyMode.None); + public ref int LuminaireShape { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1F648BF4A)); + get => ref _Handle.AsRef(_LuminaireShapeOffset.Value); } + private static readonly Lazy _LuminaireSizeOffset = new(() => Schema.GetOffset(0xB5E331D185EECB6A), LazyThreadSafetyMode.None); + public ref float LuminaireSize { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D185EECB6A)); + get => ref _Handle.AsRef(_LuminaireSizeOffset.Value); } + private static readonly Lazy _LuminaireAnisotropyOffset = new(() => Schema.GetOffset(0xB5E331D1A50CAFAF), LazyThreadSafetyMode.None); + public ref float LuminaireAnisotropy { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1A50CAFAF)); + get => ref _Handle.AsRef(_LuminaireAnisotropyOffset.Value); } + private static readonly Lazy _LightStyleStringOffset = new(() => Schema.GetOffset(0xB5E331D135505939), LazyThreadSafetyMode.None); + public string LightStyleString { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB5E331D135505939)); + var ptr = _Handle.Read(_LightStyleStringOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB5E331D135505939, value); + set => Schema.SetString(_Handle, _LightStyleStringOffset.Value, value); } + private static readonly Lazy _LightStyleStartTimeOffset = new(() => Schema.GetOffset(0xB5E331D1A3B159A3), LazyThreadSafetyMode.None); + public GameTime_t LightStyleStartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xB5E331D1A3B159A3)); + get => new GameTime_tImpl(_Handle + _LightStyleStartTimeOffset.Value); } + private static readonly Lazy _QueuedLightStyleStringsOffset = new(() => Schema.GetOffset(0xB5E331D1635061E9), LazyThreadSafetyMode.None); + public ref CUtlVector QueuedLightStyleStrings { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB5E331D1635061E9)); + get => ref _Handle.AsRef>(_QueuedLightStyleStringsOffset.Value); } + private static readonly Lazy _LightStyleEventsOffset = new(() => Schema.GetOffset(0xB5E331D15CAA0F51), LazyThreadSafetyMode.None); + public ref CUtlVector LightStyleEvents { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB5E331D15CAA0F51)); + get => ref _Handle.AsRef>(_LightStyleEventsOffset.Value); } + private static readonly Lazy _LightStyleTargetsOffset = new(() => Schema.GetOffset(0xB5E331D1FA0DC93E), LazyThreadSafetyMode.None); + public ref CUtlVector> LightStyleTargets { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xB5E331D1FA0DC93E)); + get => ref _Handle.AsRef>>(_LightStyleTargetsOffset.Value); } + private static readonly Lazy _StyleEventOffset = new(() => Schema.GetOffset(0xB5E331D15EEF4062), LazyThreadSafetyMode.None); + public SchemaUntypedField StyleEvent { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xB5E331D15EEF4062)); + get => new SchemaUntypedField(_Handle + _StyleEventOffset.Value); } + private static readonly Lazy _LightCookieOffset = new(() => Schema.GetOffset(0xB5E331D10609D103), LazyThreadSafetyMode.None); + public ref CStrongHandle LightCookie { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB5E331D10609D103)); + get => ref _Handle.AsRef>(_LightCookieOffset.Value); } + private static readonly Lazy _ShapeOffset = new(() => Schema.GetOffset(0xB5E331D15DCE07D8), LazyThreadSafetyMode.None); + public ref float Shape { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D15DCE07D8)); + get => ref _Handle.AsRef(_ShapeOffset.Value); } + private static readonly Lazy _SoftXOffset = new(() => Schema.GetOffset(0xB5E331D1ED19BFA1), LazyThreadSafetyMode.None); + public ref float SoftX { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1ED19BFA1)); + get => ref _Handle.AsRef(_SoftXOffset.Value); } + private static readonly Lazy _SoftYOffset = new(() => Schema.GetOffset(0xB5E331D1EC19BE0E), LazyThreadSafetyMode.None); + public ref float SoftY { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1EC19BE0E)); + get => ref _Handle.AsRef(_SoftYOffset.Value); } + private static readonly Lazy _SkirtOffset = new(() => Schema.GetOffset(0xB5E331D1EAFB6D2A), LazyThreadSafetyMode.None); + public ref float Skirt { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1EAFB6D2A)); + get => ref _Handle.AsRef(_SkirtOffset.Value); } + private static readonly Lazy _SkirtNearOffset = new(() => Schema.GetOffset(0xB5E331D15CE2A8E4), LazyThreadSafetyMode.None); + public ref float SkirtNear { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D15CE2A8E4)); + get => ref _Handle.AsRef(_SkirtNearOffset.Value); } + private static readonly Lazy _SizeParamsOffset = new(() => Schema.GetOffset(0xB5E331D187414B4E), LazyThreadSafetyMode.None); + public ref Vector SizeParams { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D187414B4E)); + get => ref _Handle.AsRef(_SizeParamsOffset.Value); } + private static readonly Lazy _RangeOffset = new(() => Schema.GetOffset(0xB5E331D13FC92844), LazyThreadSafetyMode.None); + public ref float Range { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D13FC92844)); + get => ref _Handle.AsRef(_RangeOffset.Value); } + private static readonly Lazy _ShearOffset = new(() => Schema.GetOffset(0xB5E331D1F044CF2A), LazyThreadSafetyMode.None); + public ref Vector Shear { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1F044CF2A)); + get => ref _Handle.AsRef(_ShearOffset.Value); } + private static readonly Lazy _BakeSpecularToCubemapsOffset = new(() => Schema.GetOffset(0xB5E331D172208D6A), LazyThreadSafetyMode.None); + public ref int BakeSpecularToCubemaps { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D172208D6A)); + get => ref _Handle.AsRef(_BakeSpecularToCubemapsOffset.Value); } + private static readonly Lazy _BakeSpecularToCubemapsSizeOffset = new(() => Schema.GetOffset(0xB5E331D1A4CF804B), LazyThreadSafetyMode.None); + public ref Vector BakeSpecularToCubemapsSize { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1A4CF804B)); + get => ref _Handle.AsRef(_BakeSpecularToCubemapsSizeOffset.Value); } + private static readonly Lazy _CastShadowsOffset = new(() => Schema.GetOffset(0xB5E331D151564EBB), LazyThreadSafetyMode.None); + public ref int CastShadows { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D151564EBB)); + get => ref _Handle.AsRef(_CastShadowsOffset.Value); } + private static readonly Lazy _ShadowMapSizeOffset = new(() => Schema.GetOffset(0xB5E331D1163F44B0), LazyThreadSafetyMode.None); + public ref int ShadowMapSize { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1163F44B0)); + get => ref _Handle.AsRef(_ShadowMapSizeOffset.Value); } + private static readonly Lazy _ShadowPriorityOffset = new(() => Schema.GetOffset(0xB5E331D115B296B9), LazyThreadSafetyMode.None); + public ref int ShadowPriority { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D115B296B9)); + get => ref _Handle.AsRef(_ShadowPriorityOffset.Value); } + private static readonly Lazy _ContactShadowOffset = new(() => Schema.GetOffset(0xB5E331D13C0922B3), LazyThreadSafetyMode.None); + public ref bool ContactShadow { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D13C0922B3)); + get => ref _Handle.AsRef(_ContactShadowOffset.Value); } + private static readonly Lazy _ForceShadowsEnabledOffset = new(() => Schema.GetOffset(0xB5E331D179F7B762), LazyThreadSafetyMode.None); + public ref bool ForceShadowsEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D179F7B762)); + get => ref _Handle.AsRef(_ForceShadowsEnabledOffset.Value); } + private static readonly Lazy _BounceLightOffset = new(() => Schema.GetOffset(0xB5E331D17A8E13D3), LazyThreadSafetyMode.None); + public ref int BounceLight { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D17A8E13D3)); + get => ref _Handle.AsRef(_BounceLightOffset.Value); } + private static readonly Lazy _BounceScaleOffset = new(() => Schema.GetOffset(0xB5E331D1918AF747), LazyThreadSafetyMode.None); + public ref float BounceScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1918AF747)); + get => ref _Handle.AsRef(_BounceScaleOffset.Value); } + private static readonly Lazy _MinRoughnessOffset = new(() => Schema.GetOffset(0xB5E331D1B3A6FDC9), LazyThreadSafetyMode.None); + public ref float MinRoughness { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1B3A6FDC9)); + get => ref _Handle.AsRef(_MinRoughnessOffset.Value); } + private static readonly Lazy _AlternateColorOffset = new(() => Schema.GetOffset(0xB5E331D1A6BAD29C), LazyThreadSafetyMode.None); + public ref Vector AlternateColor { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1A6BAD29C)); + get => ref _Handle.AsRef(_AlternateColorOffset.Value); } + private static readonly Lazy _AlternateColorBrightnessOffset = new(() => Schema.GetOffset(0xB5E331D14C877943), LazyThreadSafetyMode.None); + public ref float AlternateColorBrightness { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D14C877943)); + get => ref _Handle.AsRef(_AlternateColorBrightnessOffset.Value); } + private static readonly Lazy _FogOffset = new(() => Schema.GetOffset(0xB5E331D1B855CC6B), LazyThreadSafetyMode.None); + public ref int Fog { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1B855CC6B)); + get => ref _Handle.AsRef(_FogOffset.Value); } + private static readonly Lazy _FogStrengthOffset = new(() => Schema.GetOffset(0xB5E331D12DCA8F14), LazyThreadSafetyMode.None); + public ref float FogStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D12DCA8F14)); + get => ref _Handle.AsRef(_FogStrengthOffset.Value); } + private static readonly Lazy _FogShadowsOffset = new(() => Schema.GetOffset(0xB5E331D1D0C53238), LazyThreadSafetyMode.None); + public ref int FogShadows { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1D0C53238)); + get => ref _Handle.AsRef(_FogShadowsOffset.Value); } + private static readonly Lazy _FogScaleOffset = new(() => Schema.GetOffset(0xB5E331D1CF999E05), LazyThreadSafetyMode.None); + public ref float FogScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1CF999E05)); + get => ref _Handle.AsRef(_FogScaleOffset.Value); } + private static readonly Lazy _FogMixedShadowsOffset = new(() => Schema.GetOffset(0xB5E331D17FAB6DC7), LazyThreadSafetyMode.None); + public ref bool FogMixedShadows { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D17FAB6DC7)); + get => ref _Handle.AsRef(_FogMixedShadowsOffset.Value); } + private static readonly Lazy _FadeSizeStartOffset = new(() => Schema.GetOffset(0xB5E331D17D0D6C9C), LazyThreadSafetyMode.None); + public ref float FadeSizeStart { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D17D0D6C9C)); + get => ref _Handle.AsRef(_FadeSizeStartOffset.Value); } + private static readonly Lazy _FadeSizeEndOffset = new(() => Schema.GetOffset(0xB5E331D14D20D885), LazyThreadSafetyMode.None); + public ref float FadeSizeEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D14D20D885)); + get => ref _Handle.AsRef(_FadeSizeEndOffset.Value); } + private static readonly Lazy _ShadowFadeSizeStartOffset = new(() => Schema.GetOffset(0xB5E331D1D2A843D4), LazyThreadSafetyMode.None); + public ref float ShadowFadeSizeStart { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1D2A843D4)); + get => ref _Handle.AsRef(_ShadowFadeSizeStartOffset.Value); } + private static readonly Lazy _ShadowFadeSizeEndOffset = new(() => Schema.GetOffset(0xB5E331D16A79DE2D), LazyThreadSafetyMode.None); + public ref float ShadowFadeSizeEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D16A79DE2D)); + get => ref _Handle.AsRef(_ShadowFadeSizeEndOffset.Value); } + private static readonly Lazy _PrecomputedFieldsValidOffset = new(() => Schema.GetOffset(0xB5E331D191C883D6), LazyThreadSafetyMode.None); + public ref bool PrecomputedFieldsValid { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D191C883D6)); + get => ref _Handle.AsRef(_PrecomputedFieldsValidOffset.Value); } + private static readonly Lazy _PrecomputedBoundsMinsOffset = new(() => Schema.GetOffset(0xB5E331D16F3FE3C1), LazyThreadSafetyMode.None); + public ref Vector PrecomputedBoundsMins { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D16F3FE3C1)); + get => ref _Handle.AsRef(_PrecomputedBoundsMinsOffset.Value); } + private static readonly Lazy _PrecomputedBoundsMaxsOffset = new(() => Schema.GetOffset(0xB5E331D1C5E5BC03), LazyThreadSafetyMode.None); + public ref Vector PrecomputedBoundsMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1C5E5BC03)); + get => ref _Handle.AsRef(_PrecomputedBoundsMaxsOffset.Value); } + private static readonly Lazy _PrecomputedOBBOriginOffset = new(() => Schema.GetOffset(0xB5E331D1D6D011C8), LazyThreadSafetyMode.None); + public ref Vector PrecomputedOBBOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1D6D011C8)); + get => ref _Handle.AsRef(_PrecomputedOBBOriginOffset.Value); } + private static readonly Lazy _PrecomputedOBBAnglesOffset = new(() => Schema.GetOffset(0xB5E331D189054822), LazyThreadSafetyMode.None); + public ref QAngle PrecomputedOBBAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D189054822)); + get => ref _Handle.AsRef(_PrecomputedOBBAnglesOffset.Value); } + private static readonly Lazy _PrecomputedOBBExtentOffset = new(() => Schema.GetOffset(0xB5E331D185AE2732), LazyThreadSafetyMode.None); + public ref Vector PrecomputedOBBExtent { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D185AE2732)); + get => ref _Handle.AsRef(_PrecomputedOBBExtentOffset.Value); } + private static readonly Lazy _PrecomputedSubFrustaOffset = new(() => Schema.GetOffset(0xB5E331D1190230CA), LazyThreadSafetyMode.None); + public ref int PrecomputedSubFrusta { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1190230CA)); + get => ref _Handle.AsRef(_PrecomputedSubFrustaOffset.Value); } + private static readonly Lazy _PrecomputedOBBOrigin0Offset = new(() => Schema.GetOffset(0xB5E331D1218C4968), LazyThreadSafetyMode.None); + public ref Vector PrecomputedOBBOrigin0 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1218C4968)); + get => ref _Handle.AsRef(_PrecomputedOBBOrigin0Offset.Value); } + private static readonly Lazy _PrecomputedOBBAngles0Offset = new(() => Schema.GetOffset(0xB5E331D1C5507456), LazyThreadSafetyMode.None); + public ref QAngle PrecomputedOBBAngles0 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1C5507456)); + get => ref _Handle.AsRef(_PrecomputedOBBAngles0Offset.Value); } + private static readonly Lazy _PrecomputedOBBExtent0Offset = new(() => Schema.GetOffset(0xB5E331D173276826), LazyThreadSafetyMode.None); + public ref Vector PrecomputedOBBExtent0 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D173276826)); + get => ref _Handle.AsRef(_PrecomputedOBBExtent0Offset.Value); } + private static readonly Lazy _PrecomputedOBBOrigin1Offset = new(() => Schema.GetOffset(0xB5E331D1228C4AFB), LazyThreadSafetyMode.None); + public ref Vector PrecomputedOBBOrigin1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1228C4AFB)); + get => ref _Handle.AsRef(_PrecomputedOBBOrigin1Offset.Value); } + private static readonly Lazy _PrecomputedOBBAngles1Offset = new(() => Schema.GetOffset(0xB5E331D1C65075E9), LazyThreadSafetyMode.None); + public ref QAngle PrecomputedOBBAngles1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1C65075E9)); + get => ref _Handle.AsRef(_PrecomputedOBBAngles1Offset.Value); } + private static readonly Lazy _PrecomputedOBBExtent1Offset = new(() => Schema.GetOffset(0xB5E331D1742769B9), LazyThreadSafetyMode.None); + public ref Vector PrecomputedOBBExtent1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1742769B9)); + get => ref _Handle.AsRef(_PrecomputedOBBExtent1Offset.Value); } + private static readonly Lazy _PrecomputedOBBOrigin2Offset = new(() => Schema.GetOffset(0xB5E331D1238C4C8E), LazyThreadSafetyMode.None); + public ref Vector PrecomputedOBBOrigin2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1238C4C8E)); + get => ref _Handle.AsRef(_PrecomputedOBBOrigin2Offset.Value); } + private static readonly Lazy _PrecomputedOBBAngles2Offset = new(() => Schema.GetOffset(0xB5E331D1C3507130), LazyThreadSafetyMode.None); + public ref QAngle PrecomputedOBBAngles2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1C3507130)); + get => ref _Handle.AsRef(_PrecomputedOBBAngles2Offset.Value); } + private static readonly Lazy _PrecomputedOBBExtent2Offset = new(() => Schema.GetOffset(0xB5E331D171276500), LazyThreadSafetyMode.None); + public ref Vector PrecomputedOBBExtent2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D171276500)); + get => ref _Handle.AsRef(_PrecomputedOBBExtent2Offset.Value); } + private static readonly Lazy _PrecomputedOBBOrigin3Offset = new(() => Schema.GetOffset(0xB5E331D1248C4E21), LazyThreadSafetyMode.None); + public ref Vector PrecomputedOBBOrigin3 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1248C4E21)); + get => ref _Handle.AsRef(_PrecomputedOBBOrigin3Offset.Value); } + private static readonly Lazy _PrecomputedOBBAngles3Offset = new(() => Schema.GetOffset(0xB5E331D1C45072C3), LazyThreadSafetyMode.None); + public ref QAngle PrecomputedOBBAngles3 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1C45072C3)); + get => ref _Handle.AsRef(_PrecomputedOBBAngles3Offset.Value); } + private static readonly Lazy _PrecomputedOBBExtent3Offset = new(() => Schema.GetOffset(0xB5E331D172276693), LazyThreadSafetyMode.None); + public ref Vector PrecomputedOBBExtent3 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D172276693)); + get => ref _Handle.AsRef(_PrecomputedOBBExtent3Offset.Value); } + private static readonly Lazy _PrecomputedOBBOrigin4Offset = new(() => Schema.GetOffset(0xB5E331D1258C4FB4), LazyThreadSafetyMode.None); + public ref Vector PrecomputedOBBOrigin4 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1258C4FB4)); + get => ref _Handle.AsRef(_PrecomputedOBBOrigin4Offset.Value); } + private static readonly Lazy _PrecomputedOBBAngles4Offset = new(() => Schema.GetOffset(0xB5E331D1C9507AA2), LazyThreadSafetyMode.None); + public ref QAngle PrecomputedOBBAngles4 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1C9507AA2)); + get => ref _Handle.AsRef(_PrecomputedOBBAngles4Offset.Value); } + private static readonly Lazy _PrecomputedOBBExtent4Offset = new(() => Schema.GetOffset(0xB5E331D177276E72), LazyThreadSafetyMode.None); + public ref Vector PrecomputedOBBExtent4 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D177276E72)); + get => ref _Handle.AsRef(_PrecomputedOBBExtent4Offset.Value); } + private static readonly Lazy _PrecomputedOBBOrigin5Offset = new(() => Schema.GetOffset(0xB5E331D1268C5147), LazyThreadSafetyMode.None); + public ref Vector PrecomputedOBBOrigin5 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1268C5147)); + get => ref _Handle.AsRef(_PrecomputedOBBOrigin5Offset.Value); } + private static readonly Lazy _PrecomputedOBBAngles5Offset = new(() => Schema.GetOffset(0xB5E331D1CA507C35), LazyThreadSafetyMode.None); + public ref QAngle PrecomputedOBBAngles5 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D1CA507C35)); + get => ref _Handle.AsRef(_PrecomputedOBBAngles5Offset.Value); } + private static readonly Lazy _PrecomputedOBBExtent5Offset = new(() => Schema.GetOffset(0xB5E331D178277005), LazyThreadSafetyMode.None); + public ref Vector PrecomputedOBBExtent5 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D178277005)); + get => ref _Handle.AsRef(_PrecomputedOBBExtent5Offset.Value); } + private static readonly Lazy _PvsModifyEntityOffset = new(() => Schema.GetOffset(0xB5E331D133895595), LazyThreadSafetyMode.None); + public ref bool PvsModifyEntity { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5E331D133895595)); + get => ref _Handle.AsRef(_PvsModifyEntityOffset.Value); } + private static readonly Lazy _VisClustersOffset = new(() => Schema.GetOffset(0xB5E331D19E97C0CE), LazyThreadSafetyMode.None); + public ref CUtlVector VisClusters { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB5E331D19E97C0CE)); + get => ref _Handle.AsRef>(_VisClustersOffset.Value); } public void EnabledUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseAnimGraphAnimGraphControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseAnimGraphAnimGraphControllerImpl.cs index 351f52532..9ecd004f3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseAnimGraphAnimGraphControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseAnimGraphAnimGraphControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,50 +17,80 @@ internal partial class CBaseAnimGraphAnimGraphControllerImpl : CAnimGraphControl public CBaseAnimGraphAnimGraphControllerImpl(nint handle) : base(handle) { } + private static readonly Lazy _DestructiblePartDestroyedHitGroupOffset = new(() => Schema.GetOffset(0x14CE6891659B7288), LazyThreadSafetyMode.None); + public SchemaUntypedField DestructiblePartDestroyedHitGroup { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x14CE6891659B7288)); + get => new SchemaUntypedField(_Handle + _DestructiblePartDestroyedHitGroupOffset.Value); } + private static readonly Lazy _DestructiblePartDestroyedPartIndexOffset = new(() => Schema.GetOffset(0x14CE68913BC00A58), LazyThreadSafetyMode.None); + public SchemaUntypedField DestructiblePartDestroyedPartIndex { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x14CE68913BC00A58)); + get => new SchemaUntypedField(_Handle + _DestructiblePartDestroyedPartIndexOffset.Value); } + private static readonly Lazy _HITGROUP_INVALID_DestroyedOffset = new(() => Schema.GetOffset(0x14CE68919028C031), LazyThreadSafetyMode.None); + public SchemaUntypedField HITGROUP_INVALID_Destroyed { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x14CE68919028C031)); + get => new SchemaUntypedField(_Handle + _HITGROUP_INVALID_DestroyedOffset.Value); } + private static readonly Lazy _HITGROUP_GENERIC_DestroyedOffset = new(() => Schema.GetOffset(0x14CE689176845553), LazyThreadSafetyMode.None); + public SchemaUntypedField HITGROUP_GENERIC_Destroyed { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x14CE689176845553)); + get => new SchemaUntypedField(_Handle + _HITGROUP_GENERIC_DestroyedOffset.Value); } + private static readonly Lazy _HITGROUP_HEAD_DestroyedOffset = new(() => Schema.GetOffset(0x14CE6891AEFB4EB4), LazyThreadSafetyMode.None); + public SchemaUntypedField HITGROUP_HEAD_Destroyed { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x14CE6891AEFB4EB4)); + get => new SchemaUntypedField(_Handle + _HITGROUP_HEAD_DestroyedOffset.Value); } + private static readonly Lazy _HITGROUP_CHEST_DestroyedOffset = new(() => Schema.GetOffset(0x14CE68917B0D9613), LazyThreadSafetyMode.None); + public SchemaUntypedField HITGROUP_CHEST_Destroyed { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x14CE68917B0D9613)); + get => new SchemaUntypedField(_Handle + _HITGROUP_CHEST_DestroyedOffset.Value); } + private static readonly Lazy _HITGROUP_STOMACH_DestroyedOffset = new(() => Schema.GetOffset(0x14CE689174D1B79B), LazyThreadSafetyMode.None); + public SchemaUntypedField HITGROUP_STOMACH_Destroyed { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x14CE689174D1B79B)); + get => new SchemaUntypedField(_Handle + _HITGROUP_STOMACH_DestroyedOffset.Value); } + private static readonly Lazy _HITGROUP_LEFTARM_DestroyedOffset = new(() => Schema.GetOffset(0x14CE6891FF25BE87), LazyThreadSafetyMode.None); + public SchemaUntypedField HITGROUP_LEFTARM_Destroyed { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x14CE6891FF25BE87)); + get => new SchemaUntypedField(_Handle + _HITGROUP_LEFTARM_DestroyedOffset.Value); } + private static readonly Lazy _HITGROUP_RIGHTARM_DestroyedOffset = new(() => Schema.GetOffset(0x14CE6891525B05D2), LazyThreadSafetyMode.None); + public SchemaUntypedField HITGROUP_RIGHTARM_Destroyed { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x14CE6891525B05D2)); + get => new SchemaUntypedField(_Handle + _HITGROUP_RIGHTARM_DestroyedOffset.Value); } + private static readonly Lazy _HITGROUP_LEFTLEG_DestroyedOffset = new(() => Schema.GetOffset(0x14CE6891C7C4CE19), LazyThreadSafetyMode.None); + public SchemaUntypedField HITGROUP_LEFTLEG_Destroyed { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x14CE6891C7C4CE19)); + get => new SchemaUntypedField(_Handle + _HITGROUP_LEFTLEG_DestroyedOffset.Value); } + private static readonly Lazy _HITGROUP_RIGHTLEG_DestroyedOffset = new(() => Schema.GetOffset(0x14CE68915A8CF65C), LazyThreadSafetyMode.None); + public SchemaUntypedField HITGROUP_RIGHTLEG_Destroyed { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x14CE68915A8CF65C)); + get => new SchemaUntypedField(_Handle + _HITGROUP_RIGHTLEG_DestroyedOffset.Value); } + private static readonly Lazy _HITGROUP_NECK_DestroyedOffset = new(() => Schema.GetOffset(0x14CE689195C0D851), LazyThreadSafetyMode.None); + public SchemaUntypedField HITGROUP_NECK_Destroyed { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x14CE689195C0D851)); + get => new SchemaUntypedField(_Handle + _HITGROUP_NECK_DestroyedOffset.Value); } + private static readonly Lazy _HITGROUP_UNUSED_DestroyedOffset = new(() => Schema.GetOffset(0x14CE689157414A54), LazyThreadSafetyMode.None); + public SchemaUntypedField HITGROUP_UNUSED_Destroyed { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x14CE689157414A54)); + get => new SchemaUntypedField(_Handle + _HITGROUP_UNUSED_DestroyedOffset.Value); } + private static readonly Lazy _HITGROUP_GEAR_DestroyedOffset = new(() => Schema.GetOffset(0x14CE68918C532735), LazyThreadSafetyMode.None); + public SchemaUntypedField HITGROUP_GEAR_Destroyed { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x14CE68918C532735)); + get => new SchemaUntypedField(_Handle + _HITGROUP_GEAR_DestroyedOffset.Value); } + private static readonly Lazy _HITGROUP_SPECIAL_DestroyedOffset = new(() => Schema.GetOffset(0x14CE68918FBDE7C1), LazyThreadSafetyMode.None); + public SchemaUntypedField HITGROUP_SPECIAL_Destroyed { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x14CE68918FBDE7C1)); + get => new SchemaUntypedField(_Handle + _HITGROUP_SPECIAL_DestroyedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseAnimGraphControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseAnimGraphControllerImpl.cs index eac5217f1..3ff481ba9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseAnimGraphControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseAnimGraphControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,71 +17,115 @@ internal partial class CBaseAnimGraphControllerImpl : CSkeletonAnimationControll public CBaseAnimGraphControllerImpl(nint handle) : base(handle) { } + private static readonly Lazy _AnimGraphNetworkedVarsOffset = new(() => Schema.GetOffset(0xFA1FB81EA83A7C39), LazyThreadSafetyMode.None); + public CAnimGraphNetworkedVariables AnimGraphNetworkedVars { - get => new CAnimGraphNetworkedVariablesImpl(_Handle + Schema.GetOffset(0xFA1FB81EA83A7C39)); + get => new CAnimGraphNetworkedVariablesImpl(_Handle + _AnimGraphNetworkedVarsOffset.Value); } + private static readonly Lazy _SequenceFinishedOffset = new(() => Schema.GetOffset(0xFA1FB81E5DB8EB16), LazyThreadSafetyMode.None); + public ref bool SequenceFinished { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA1FB81E5DB8EB16)); + get => ref _Handle.AsRef(_SequenceFinishedOffset.Value); } + private static readonly Lazy _SoundSyncTimeOffset = new(() => Schema.GetOffset(0xFA1FB81EE52B5EB4), LazyThreadSafetyMode.None); + public ref float SoundSyncTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA1FB81EE52B5EB4)); + get => ref _Handle.AsRef(_SoundSyncTimeOffset.Value); } + private static readonly Lazy _ActiveIKChainMaskOffset = new(() => Schema.GetOffset(0xFA1FB81E070EB774), LazyThreadSafetyMode.None); + public ref uint ActiveIKChainMask { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA1FB81E070EB774)); + get => ref _Handle.AsRef(_ActiveIKChainMaskOffset.Value); } + private static readonly Lazy _SequenceOffset = new(() => Schema.GetOffset(0xFA1FB81EE0A0598E), LazyThreadSafetyMode.None); + public HSequence Sequence { - get => new HSequenceImpl(_Handle + Schema.GetOffset(0xFA1FB81EE0A0598E)); + get => new HSequenceImpl(_Handle + _SequenceOffset.Value); } + private static readonly Lazy _SeqStartTimeOffset = new(() => Schema.GetOffset(0xFA1FB81E9120356F), LazyThreadSafetyMode.None); + public GameTime_t SeqStartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xFA1FB81E9120356F)); + get => new GameTime_tImpl(_Handle + _SeqStartTimeOffset.Value); } + private static readonly Lazy _SeqFixedCycleOffset = new(() => Schema.GetOffset(0xFA1FB81E77103EAE), LazyThreadSafetyMode.None); + public ref float SeqFixedCycle { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA1FB81E77103EAE)); + get => ref _Handle.AsRef(_SeqFixedCycleOffset.Value); } + private static readonly Lazy _AnimLoopModeOffset = new(() => Schema.GetOffset(0xFA1FB81E9C9688D9), LazyThreadSafetyMode.None); + public ref AnimLoopMode_t AnimLoopMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA1FB81E9C9688D9)); + get => ref _Handle.AsRef(_AnimLoopModeOffset.Value); } + private static readonly Lazy _PlaybackRateOffset = new(() => Schema.GetOffset(0xFA1FB81EC396F9D8), LazyThreadSafetyMode.None); + public ref CNetworkedQuantizedFloat PlaybackRate { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA1FB81EC396F9D8)); + get => ref _Handle.AsRef(_PlaybackRateOffset.Value); } + private static readonly Lazy _NotifyStateOffset = new(() => Schema.GetOffset(0xFA1FB81EEEDBFC3D), LazyThreadSafetyMode.None); + public ref SequenceFinishNotifyState_t NotifyState { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA1FB81EEEDBFC3D)); + get => ref _Handle.AsRef(_NotifyStateOffset.Value); } + private static readonly Lazy _NetworkedAnimationInputsChangedOffset = new(() => Schema.GetOffset(0xFA1FB81E97092075), LazyThreadSafetyMode.None); + public ref bool NetworkedAnimationInputsChanged { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA1FB81E97092075)); + get => ref _Handle.AsRef(_NetworkedAnimationInputsChangedOffset.Value); } + private static readonly Lazy _NetworkedSequenceChangedOffset = new(() => Schema.GetOffset(0xFA1FB81E9A05208F), LazyThreadSafetyMode.None); + public ref bool NetworkedSequenceChanged { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA1FB81E9A05208F)); + get => ref _Handle.AsRef(_NetworkedSequenceChangedOffset.Value); } + private static readonly Lazy _LastUpdateSkippedOffset = new(() => Schema.GetOffset(0xFA1FB81E53472D94), LazyThreadSafetyMode.None); + public ref bool LastUpdateSkipped { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA1FB81E53472D94)); + get => ref _Handle.AsRef(_LastUpdateSkippedOffset.Value); } + private static readonly Lazy _PrevAnimUpdateTimeOffset = new(() => Schema.GetOffset(0xFA1FB81E724643D3), LazyThreadSafetyMode.None); + public GameTime_t PrevAnimUpdateTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xFA1FB81E724643D3)); + get => new GameTime_tImpl(_Handle + _PrevAnimUpdateTimeOffset.Value); } + private static readonly Lazy _GraphDefinitionAG2Offset = new(() => Schema.GetOffset(0xFA1FB81EBE14922A), LazyThreadSafetyMode.None); + public ref CStrongHandle GraphDefinitionAG2 { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFA1FB81EBE14922A)); + get => ref _Handle.AsRef>(_GraphDefinitionAG2Offset.Value); } + private static readonly Lazy _IsUsingAG2Offset = new(() => Schema.GetOffset(0xFA1FB81EB54DDF17), LazyThreadSafetyMode.None); + public ref bool IsUsingAG2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA1FB81EB54DDF17)); + get => ref _Handle.AsRef(_IsUsingAG2Offset.Value); } + private static readonly Lazy _SerializedPoseRecipeAG2Offset = new(() => Schema.GetOffset(0xFA1FB81E61B92D46), LazyThreadSafetyMode.None); + public ref CUtlVector SerializedPoseRecipeAG2 { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFA1FB81E61B92D46)); + get => ref _Handle.AsRef>(_SerializedPoseRecipeAG2Offset.Value); } + private static readonly Lazy _SerializePoseRecipeSizeAG2Offset = new(() => Schema.GetOffset(0xFA1FB81E0121F373), LazyThreadSafetyMode.None); + public ref int SerializePoseRecipeSizeAG2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA1FB81E0121F373)); + get => ref _Handle.AsRef(_SerializePoseRecipeSizeAG2Offset.Value); } + private static readonly Lazy _SerializePoseRecipeVersionAG2Offset = new(() => Schema.GetOffset(0xFA1FB81EC099725C), LazyThreadSafetyMode.None); + public ref int SerializePoseRecipeVersionAG2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA1FB81EC099725C)); + get => ref _Handle.AsRef(_SerializePoseRecipeVersionAG2Offset.Value); } + private static readonly Lazy _GraphCreationFlagsAG2Offset = new(() => Schema.GetOffset(0xFA1FB81EA3781101), LazyThreadSafetyMode.None); + public ref byte GraphCreationFlagsAG2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA1FB81EA3781101)); + get => ref _Handle.AsRef(_GraphCreationFlagsAG2Offset.Value); } + private static readonly Lazy _ServerGraphDefReloadCountAG2Offset = new(() => Schema.GetOffset(0xFA1FB81E6A8D1A13), LazyThreadSafetyMode.None); + public ref int ServerGraphDefReloadCountAG2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA1FB81E6A8D1A13)); + get => ref _Handle.AsRef(_ServerGraphDefReloadCountAG2Offset.Value); } + private static readonly Lazy _ServerSerializationContextIterationOffset = new(() => Schema.GetOffset(0xFA1FB81ED9F8A6D4), LazyThreadSafetyMode.None); + public ref int ServerSerializationContextIteration { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA1FB81ED9F8A6D4)); + get => ref _Handle.AsRef(_ServerSerializationContextIterationOffset.Value); } public void AnimGraphNetworkedVarsUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseAnimGraphImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseAnimGraphImpl.cs index dda0ebc5b..c1e18e6ae 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseAnimGraphImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseAnimGraphImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,68 @@ internal partial class CBaseAnimGraphImpl : CBaseModelEntityImpl, CBaseAnimGraph public CBaseAnimGraphImpl(nint handle) : base(handle) { } + private static readonly Lazy _InitiallyPopulateInterpHistoryOffset = new(() => Schema.GetOffset(0xE501DB1E3087361C), LazyThreadSafetyMode.None); + public ref bool InitiallyPopulateInterpHistory { - get => ref _Handle.AsRef(Schema.GetOffset(0xE501DB1E3087361C)); + get => ref _Handle.AsRef(_InitiallyPopulateInterpHistoryOffset.Value); } + private static readonly Lazy _ChoreoServicesOffset = new(() => Schema.GetOffset(0xE501DB1E89C6D559), LazyThreadSafetyMode.None); + public IChoreoServices? ChoreoServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE501DB1E89C6D559)); + var ptr = _Handle.Read(_ChoreoServicesOffset.Value); return ptr.IsValidPtr() ? new IChoreoServicesImpl(ptr) : null; } } + private static readonly Lazy _AnimGraphUpdateEnabledOffset = new(() => Schema.GetOffset(0xE501DB1E724F7FEE), LazyThreadSafetyMode.None); + public ref bool AnimGraphUpdateEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xE501DB1E724F7FEE)); + get => ref _Handle.AsRef(_AnimGraphUpdateEnabledOffset.Value); } + private static readonly Lazy _MaxSlopeDistanceOffset = new(() => Schema.GetOffset(0xE501DB1E531F618D), LazyThreadSafetyMode.None); + public ref float MaxSlopeDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xE501DB1E531F618D)); + get => ref _Handle.AsRef(_MaxSlopeDistanceOffset.Value); } + private static readonly Lazy _LastSlopeCheckPosOffset = new(() => Schema.GetOffset(0xE501DB1E586A5E32), LazyThreadSafetyMode.None); + public ref Vector LastSlopeCheckPos { - get => ref _Handle.AsRef(Schema.GetOffset(0xE501DB1E586A5E32)); + get => ref _Handle.AsRef(_LastSlopeCheckPosOffset.Value); } + private static readonly Lazy _AnimationUpdateScheduledOffset = new(() => Schema.GetOffset(0xE501DB1E49747BCF), LazyThreadSafetyMode.None); + public ref bool AnimationUpdateScheduled { - get => ref _Handle.AsRef(Schema.GetOffset(0xE501DB1E49747BCF)); + get => ref _Handle.AsRef(_AnimationUpdateScheduledOffset.Value); } + private static readonly Lazy _ForceOffset = new(() => Schema.GetOffset(0xE501DB1E566BD764), LazyThreadSafetyMode.None); + public ref Vector Force { - get => ref _Handle.AsRef(Schema.GetOffset(0xE501DB1E566BD764)); + get => ref _Handle.AsRef(_ForceOffset.Value); } + private static readonly Lazy _ForceBoneOffset = new(() => Schema.GetOffset(0xE501DB1EDDAC019E), LazyThreadSafetyMode.None); + public ref int ForceBone { - get => ref _Handle.AsRef(Schema.GetOffset(0xE501DB1EDDAC019E)); + get => ref _Handle.AsRef(_ForceBoneOffset.Value); } + private static readonly Lazy _RagdollPoseOffset = new(() => Schema.GetOffset(0xE501DB1E49F01F45), LazyThreadSafetyMode.None); + public PhysicsRagdollPose_t RagdollPose { - get => new PhysicsRagdollPose_tImpl(_Handle + Schema.GetOffset(0xE501DB1E49F01F45)); + get => new PhysicsRagdollPose_tImpl(_Handle + _RagdollPoseOffset.Value); } + private static readonly Lazy _RagdollEnabledOffset = new(() => Schema.GetOffset(0xE501DB1E03EA7599), LazyThreadSafetyMode.None); + public ref bool RagdollEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xE501DB1E03EA7599)); + get => ref _Handle.AsRef(_RagdollEnabledOffset.Value); } + private static readonly Lazy _RagdollClientSideOffset = new(() => Schema.GetOffset(0xE501DB1EB6A5159C), LazyThreadSafetyMode.None); + public ref bool RagdollClientSide { - get => ref _Handle.AsRef(Schema.GetOffset(0xE501DB1EB6A5159C)); + get => ref _Handle.AsRef(_RagdollClientSideOffset.Value); } + private static readonly Lazy _XParentedRagdollRootInEntitySpaceOffset = new(() => Schema.GetOffset(0xE501DB1EFC4C1401), LazyThreadSafetyMode.None); + public ref CTransform XParentedRagdollRootInEntitySpace { - get => ref _Handle.AsRef(Schema.GetOffset(0xE501DB1EFC4C1401)); + get => ref _Handle.AsRef(_XParentedRagdollRootInEntitySpaceOffset.Value); } public void InitiallyPopulateInterpHistoryUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseButtonImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseButtonImpl.cs index bcc77a7be..715b55ff2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseButtonImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseButtonImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,104 +17,154 @@ internal partial class CBaseButtonImpl : CBaseToggleImpl, CBaseButton { public CBaseButtonImpl(nint handle) : base(handle) { } + private static readonly Lazy _MoveEntitySpaceOffset = new(() => Schema.GetOffset(0x1911FA7F325319F9), LazyThreadSafetyMode.None); + public ref QAngle MoveEntitySpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x1911FA7F325319F9)); + get => ref _Handle.AsRef(_MoveEntitySpaceOffset.Value); } + private static readonly Lazy _StayPushedOffset = new(() => Schema.GetOffset(0x1911FA7FF5E81349), LazyThreadSafetyMode.None); + public ref bool StayPushed { - get => ref _Handle.AsRef(Schema.GetOffset(0x1911FA7FF5E81349)); + get => ref _Handle.AsRef(_StayPushedOffset.Value); } + private static readonly Lazy _RotatingOffset = new(() => Schema.GetOffset(0x1911FA7F6DAD9199), LazyThreadSafetyMode.None); + public ref bool Rotating { - get => ref _Handle.AsRef(Schema.GetOffset(0x1911FA7F6DAD9199)); + get => ref _Handle.AsRef(_RotatingOffset.Value); } + private static readonly Lazy _LsOffset = new(() => Schema.GetOffset(0x1911FA7FD3B05E88), LazyThreadSafetyMode.None); + public locksound_t Ls { - get => new locksound_tImpl(_Handle + Schema.GetOffset(0x1911FA7FD3B05E88)); + get => new locksound_tImpl(_Handle + _LsOffset.Value); } + private static readonly Lazy _UseSoundOffset = new(() => Schema.GetOffset(0x1911FA7FCCC8AC24), LazyThreadSafetyMode.None); + public string UseSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1911FA7FCCC8AC24)); + var ptr = _Handle.Read(_UseSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1911FA7FCCC8AC24, value); + set => Schema.SetString(_Handle, _UseSoundOffset.Value, value); } + private static readonly Lazy _LockedSoundOffset = new(() => Schema.GetOffset(0x1911FA7FB3FCB84B), LazyThreadSafetyMode.None); + public string LockedSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1911FA7FB3FCB84B)); + var ptr = _Handle.Read(_LockedSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1911FA7FB3FCB84B, value); + set => Schema.SetString(_Handle, _LockedSoundOffset.Value, value); } + private static readonly Lazy _UnlockedSoundOffset = new(() => Schema.GetOffset(0x1911FA7FDC697A96), LazyThreadSafetyMode.None); + public string UnlockedSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1911FA7FDC697A96)); + var ptr = _Handle.Read(_UnlockedSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1911FA7FDC697A96, value); + set => Schema.SetString(_Handle, _UnlockedSoundOffset.Value, value); } + private static readonly Lazy _OverrideAnticipationNameOffset = new(() => Schema.GetOffset(0x1911FA7FDBCCC724), LazyThreadSafetyMode.None); + public string OverrideAnticipationName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1911FA7FDBCCC724)); + var ptr = _Handle.Read(_OverrideAnticipationNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1911FA7FDBCCC724, value); + set => Schema.SetString(_Handle, _OverrideAnticipationNameOffset.Value, value); } + private static readonly Lazy _LockedOffset = new(() => Schema.GetOffset(0x1911FA7FD08E97F3), LazyThreadSafetyMode.None); + public ref bool Locked { - get => ref _Handle.AsRef(Schema.GetOffset(0x1911FA7FD08E97F3)); + get => ref _Handle.AsRef(_LockedOffset.Value); } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x1911FA7F3A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x1911FA7F3A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _UseLockedTimeOffset = new(() => Schema.GetOffset(0x1911FA7FE94A05A1), LazyThreadSafetyMode.None); + public GameTime_t UseLockedTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1911FA7FE94A05A1)); + get => new GameTime_tImpl(_Handle + _UseLockedTimeOffset.Value); } + private static readonly Lazy _SolidBspOffset = new(() => Schema.GetOffset(0x1911FA7FA50CEC89), LazyThreadSafetyMode.None); + public ref bool SolidBsp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1911FA7FA50CEC89)); + get => ref _Handle.AsRef(_SolidBspOffset.Value); } + private static readonly Lazy _OnDamagedOffset = new(() => Schema.GetOffset(0x1911FA7F1667F41F), LazyThreadSafetyMode.None); + public CEntityIOOutput OnDamaged { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1911FA7F1667F41F)); + get => new CEntityIOOutputImpl(_Handle + _OnDamagedOffset.Value); } + private static readonly Lazy _OnPressedOffset = new(() => Schema.GetOffset(0x1911FA7F6707E726), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPressed { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1911FA7F6707E726)); + get => new CEntityIOOutputImpl(_Handle + _OnPressedOffset.Value); } + private static readonly Lazy _OnUseLockedOffset = new(() => Schema.GetOffset(0x1911FA7FE603388D), LazyThreadSafetyMode.None); + public CEntityIOOutput OnUseLocked { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1911FA7FE603388D)); + get => new CEntityIOOutputImpl(_Handle + _OnUseLockedOffset.Value); } + private static readonly Lazy _OnInOffset = new(() => Schema.GetOffset(0x1911FA7FE9F7186F), LazyThreadSafetyMode.None); + public CEntityIOOutput OnIn { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1911FA7FE9F7186F)); + get => new CEntityIOOutputImpl(_Handle + _OnInOffset.Value); } + private static readonly Lazy _OnOutOffset = new(() => Schema.GetOffset(0x1911FA7FF28E1D54), LazyThreadSafetyMode.None); + public CEntityIOOutput OnOut { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1911FA7FF28E1D54)); + get => new CEntityIOOutputImpl(_Handle + _OnOutOffset.Value); } + private static readonly Lazy _StateOffset = new(() => Schema.GetOffset(0x1911FA7F7C824322), LazyThreadSafetyMode.None); + public ref int State { - get => ref _Handle.AsRef(Schema.GetOffset(0x1911FA7F7C824322)); + get => ref _Handle.AsRef(_StateOffset.Value); } + private static readonly Lazy _ConstraintOffset = new(() => Schema.GetOffset(0x1911FA7F16F916EC), LazyThreadSafetyMode.None); + public ref CHandle Constraint { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1911FA7F16F916EC)); + get => ref _Handle.AsRef>(_ConstraintOffset.Value); } + private static readonly Lazy _ConstraintParentOffset = new(() => Schema.GetOffset(0x1911FA7F0E2D0AA4), LazyThreadSafetyMode.None); + public ref CHandle ConstraintParent { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1911FA7F0E2D0AA4)); + get => ref _Handle.AsRef>(_ConstraintParentOffset.Value); } + private static readonly Lazy _ForceNpcExcludeOffset = new(() => Schema.GetOffset(0x1911FA7F4194963F), LazyThreadSafetyMode.None); + public ref bool ForceNpcExclude { - get => ref _Handle.AsRef(Schema.GetOffset(0x1911FA7F4194963F)); + get => ref _Handle.AsRef(_ForceNpcExcludeOffset.Value); } + private static readonly Lazy _GlowEntityOffset = new(() => Schema.GetOffset(0x1911FA7F8B25D228), LazyThreadSafetyMode.None); + public string GlowEntity { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1911FA7F8B25D228)); + var ptr = _Handle.Read(_GlowEntityOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1911FA7F8B25D228, value); + set => Schema.SetString(_Handle, _GlowEntityOffset.Value, value); } + private static readonly Lazy _GlowEntity1Offset = new(() => Schema.GetOffset(0x1911FA7F35C883E7), LazyThreadSafetyMode.None); + public ref CHandle GlowEntity1 { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1911FA7F35C883E7)); + get => ref _Handle.AsRef>(_GlowEntity1Offset.Value); } + private static readonly Lazy _UsableOffset = new(() => Schema.GetOffset(0x1911FA7F44B8E369), LazyThreadSafetyMode.None); + public ref bool Usable { - get => ref _Handle.AsRef(Schema.GetOffset(0x1911FA7F44B8E369)); + get => ref _Handle.AsRef(_UsableOffset.Value); } + private static readonly Lazy _DisplayTextOffset = new(() => Schema.GetOffset(0x1911FA7FDE5320C5), LazyThreadSafetyMode.None); + public string DisplayText { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1911FA7FDE5320C5)); + var ptr = _Handle.Read(_DisplayTextOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1911FA7FDE5320C5, value); + set => Schema.SetString(_Handle, _DisplayTextOffset.Value, value); } public void GlowEntity1Updated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseCSGrenadeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseCSGrenadeImpl.cs index 8652af5ea..f82e03068 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseCSGrenadeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseCSGrenadeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,70 @@ internal partial class CBaseCSGrenadeImpl : CCSWeaponBaseImpl, CBaseCSGrenade { public CBaseCSGrenadeImpl(nint handle) : base(handle) { } + private static readonly Lazy _RedrawOffset = new(() => Schema.GetOffset(0x8680ADED612F4EB2), LazyThreadSafetyMode.None); + public ref bool Redraw { - get => ref _Handle.AsRef(Schema.GetOffset(0x8680ADED612F4EB2)); + get => ref _Handle.AsRef(_RedrawOffset.Value); } + private static readonly Lazy _IsHeldByPlayerOffset = new(() => Schema.GetOffset(0x8680ADED5FB07B26), LazyThreadSafetyMode.None); + public ref bool IsHeldByPlayer { - get => ref _Handle.AsRef(Schema.GetOffset(0x8680ADED5FB07B26)); + get => ref _Handle.AsRef(_IsHeldByPlayerOffset.Value); } + private static readonly Lazy _PinPulledOffset = new(() => Schema.GetOffset(0x8680ADEDB3D8AABA), LazyThreadSafetyMode.None); + public ref bool PinPulled { - get => ref _Handle.AsRef(Schema.GetOffset(0x8680ADEDB3D8AABA)); + get => ref _Handle.AsRef(_PinPulledOffset.Value); } + private static readonly Lazy _JumpThrowOffset = new(() => Schema.GetOffset(0x8680ADED3202A7A7), LazyThreadSafetyMode.None); + public ref bool JumpThrow { - get => ref _Handle.AsRef(Schema.GetOffset(0x8680ADED3202A7A7)); + get => ref _Handle.AsRef(_JumpThrowOffset.Value); } + private static readonly Lazy _ThrowAnimatingOffset = new(() => Schema.GetOffset(0x8680ADEDB2614685), LazyThreadSafetyMode.None); + public ref bool ThrowAnimating { - get => ref _Handle.AsRef(Schema.GetOffset(0x8680ADEDB2614685)); + get => ref _Handle.AsRef(_ThrowAnimatingOffset.Value); } + private static readonly Lazy _ThrowTimeOffset = new(() => Schema.GetOffset(0x8680ADED57C1B8DA), LazyThreadSafetyMode.None); + public GameTime_t ThrowTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8680ADED57C1B8DA)); + get => new GameTime_tImpl(_Handle + _ThrowTimeOffset.Value); } + private static readonly Lazy _ThrowStrengthOffset = new(() => Schema.GetOffset(0x8680ADEDF4D38CF4), LazyThreadSafetyMode.None); + public ref float ThrowStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x8680ADEDF4D38CF4)); + get => ref _Handle.AsRef(_ThrowStrengthOffset.Value); } + private static readonly Lazy _DropTimeOffset = new(() => Schema.GetOffset(0x8680ADED2DE88B09), LazyThreadSafetyMode.None); + public GameTime_t DropTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8680ADED2DE88B09)); + get => new GameTime_tImpl(_Handle + _DropTimeOffset.Value); } + private static readonly Lazy _PinPullTimeOffset = new(() => Schema.GetOffset(0x8680ADEDFCD7B2E6), LazyThreadSafetyMode.None); + public GameTime_t PinPullTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8680ADEDFCD7B2E6)); + get => new GameTime_tImpl(_Handle + _PinPullTimeOffset.Value); } + private static readonly Lazy _JustPulledPinOffset = new(() => Schema.GetOffset(0x8680ADEDDA12F260), LazyThreadSafetyMode.None); + public ref bool JustPulledPin { - get => ref _Handle.AsRef(Schema.GetOffset(0x8680ADEDDA12F260)); + get => ref _Handle.AsRef(_JustPulledPinOffset.Value); } + private static readonly Lazy _NextHoldTickOffset = new(() => Schema.GetOffset(0x8680ADEDDB254738), LazyThreadSafetyMode.None); + public GameTick_t NextHoldTick { - get => new GameTick_tImpl(_Handle + Schema.GetOffset(0x8680ADEDDB254738)); + get => new GameTick_tImpl(_Handle + _NextHoldTickOffset.Value); } + private static readonly Lazy _NextHoldFracOffset = new(() => Schema.GetOffset(0x8680ADED09F02BB7), LazyThreadSafetyMode.None); + public ref float NextHoldFrac { - get => ref _Handle.AsRef(Schema.GetOffset(0x8680ADED09F02BB7)); + get => ref _Handle.AsRef(_NextHoldFracOffset.Value); } + private static readonly Lazy _SwitchToWeaponAfterThrowOffset = new(() => Schema.GetOffset(0x8680ADED72CB2A60), LazyThreadSafetyMode.None); + public ref CHandle SwitchToWeaponAfterThrow { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8680ADED72CB2A60)); + get => ref _Handle.AsRef>(_SwitchToWeaponAfterThrowOffset.Value); } public void RedrawUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseCSGrenadeProjectileImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseCSGrenadeProjectileImpl.cs index d857ebe96..506ffd41c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseCSGrenadeProjectileImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseCSGrenadeProjectileImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,53 +17,85 @@ internal partial class CBaseCSGrenadeProjectileImpl : CBaseGrenadeImpl, CBaseCSG public CBaseCSGrenadeProjectileImpl(nint handle) : base(handle) { } + private static readonly Lazy _InitialPositionOffset = new(() => Schema.GetOffset(0xC09C67027E9CA9C4), LazyThreadSafetyMode.None); + public ref Vector InitialPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0xC09C67027E9CA9C4)); + get => ref _Handle.AsRef(_InitialPositionOffset.Value); } + private static readonly Lazy _InitialVelocityOffset = new(() => Schema.GetOffset(0xC09C67027C20BD90), LazyThreadSafetyMode.None); + public ref Vector InitialVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xC09C67027C20BD90)); + get => ref _Handle.AsRef(_InitialVelocityOffset.Value); } + private static readonly Lazy _BouncesOffset = new(() => Schema.GetOffset(0xC09C67026B81EBCE), LazyThreadSafetyMode.None); + public ref int Bounces { - get => ref _Handle.AsRef(Schema.GetOffset(0xC09C67026B81EBCE)); + get => ref _Handle.AsRef(_BouncesOffset.Value); } + private static readonly Lazy _ExplodeEffectIndexOffset = new(() => Schema.GetOffset(0xC09C6702178B5975), LazyThreadSafetyMode.None); + public ref CStrongHandle ExplodeEffectIndex { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC09C6702178B5975)); + get => ref _Handle.AsRef>(_ExplodeEffectIndexOffset.Value); } + private static readonly Lazy _ExplodeEffectTickBeginOffset = new(() => Schema.GetOffset(0xC09C67022F04F603), LazyThreadSafetyMode.None); + public ref int ExplodeEffectTickBegin { - get => ref _Handle.AsRef(Schema.GetOffset(0xC09C67022F04F603)); + get => ref _Handle.AsRef(_ExplodeEffectTickBeginOffset.Value); } + private static readonly Lazy _ExplodeEffectOriginOffset = new(() => Schema.GetOffset(0xC09C6702AA7B4525), LazyThreadSafetyMode.None); + public ref Vector ExplodeEffectOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0xC09C6702AA7B4525)); + get => ref _Handle.AsRef(_ExplodeEffectOriginOffset.Value); } + private static readonly Lazy _SpawnTimeOffset = new(() => Schema.GetOffset(0xC09C67029596A16B), LazyThreadSafetyMode.None); + public GameTime_t SpawnTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xC09C67029596A16B)); + get => new GameTime_tImpl(_Handle + _SpawnTimeOffset.Value); } + private static readonly Lazy _OGSExtraFlagsOffset = new(() => Schema.GetOffset(0xC09C670221F95684), LazyThreadSafetyMode.None); + public ref byte OGSExtraFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0xC09C670221F95684)); + get => ref _Handle.AsRef(_OGSExtraFlagsOffset.Value); } + private static readonly Lazy _DetonationRecordedOffset = new(() => Schema.GetOffset(0xC09C67024164A13C), LazyThreadSafetyMode.None); + public ref bool DetonationRecorded { - get => ref _Handle.AsRef(Schema.GetOffset(0xC09C67024164A13C)); + get => ref _Handle.AsRef(_DetonationRecordedOffset.Value); } + private static readonly Lazy _ItemIndexOffset = new(() => Schema.GetOffset(0xC09C67025D8A6E7E), LazyThreadSafetyMode.None); + public ref ushort ItemIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xC09C67025D8A6E7E)); + get => ref _Handle.AsRef(_ItemIndexOffset.Value); } + private static readonly Lazy _OriginalSpawnLocationOffset = new(() => Schema.GetOffset(0xC09C67025E59F382), LazyThreadSafetyMode.None); + public ref Vector OriginalSpawnLocation { - get => ref _Handle.AsRef(Schema.GetOffset(0xC09C67025E59F382)); + get => ref _Handle.AsRef(_OriginalSpawnLocationOffset.Value); } + private static readonly Lazy _LastBounceSoundTimeOffset = new(() => Schema.GetOffset(0xC09C670206AF4AB7), LazyThreadSafetyMode.None); + public GameTime_t LastBounceSoundTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xC09C670206AF4AB7)); + get => new GameTime_tImpl(_Handle + _LastBounceSoundTimeOffset.Value); } + private static readonly Lazy _GrenadeSpinOffset = new(() => Schema.GetOffset(0xC09C67025A836591), LazyThreadSafetyMode.None); + public SchemaUntypedField GrenadeSpin { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC09C67025A836591)); + get => new SchemaUntypedField(_Handle + _GrenadeSpinOffset.Value); } + private static readonly Lazy _LastHitSurfaceNormalOffset = new(() => Schema.GetOffset(0xC09C6702FAEF57FA), LazyThreadSafetyMode.None); + public ref Vector LastHitSurfaceNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0xC09C6702FAEF57FA)); + get => ref _Handle.AsRef(_LastHitSurfaceNormalOffset.Value); } + private static readonly Lazy _TicksAtZeroVelocityOffset = new(() => Schema.GetOffset(0xC09C6702A4946C6D), LazyThreadSafetyMode.None); + public ref int TicksAtZeroVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xC09C6702A4946C6D)); + get => ref _Handle.AsRef(_TicksAtZeroVelocityOffset.Value); } + private static readonly Lazy _HasEverHitEnemyOffset = new(() => Schema.GetOffset(0xC09C670259285A50), LazyThreadSafetyMode.None); + public ref bool HasEverHitEnemy { - get => ref _Handle.AsRef(Schema.GetOffset(0xC09C670259285A50)); + get => ref _Handle.AsRef(_HasEverHitEnemyOffset.Value); } public void InitialPositionUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseClientUIEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseClientUIEntityImpl.cs index 4afd3768c..99a67dc65 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseClientUIEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseClientUIEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,59 +17,87 @@ internal partial class CBaseClientUIEntityImpl : CBaseModelEntityImpl, CBaseClie public CBaseClientUIEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0x51A22D116154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x51A22D116154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } + private static readonly Lazy _DialogXMLNameOffset = new(() => Schema.GetOffset(0x51A22D11D13858C9), LazyThreadSafetyMode.None); + public string DialogXMLName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x51A22D11D13858C9)); + var ptr = _Handle.Read(_DialogXMLNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x51A22D11D13858C9, value); + set => Schema.SetString(_Handle, _DialogXMLNameOffset.Value, value); } + private static readonly Lazy _PanelClassNameOffset = new(() => Schema.GetOffset(0x51A22D115C958CBC), LazyThreadSafetyMode.None); + public string PanelClassName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x51A22D115C958CBC)); + var ptr = _Handle.Read(_PanelClassNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x51A22D115C958CBC, value); + set => Schema.SetString(_Handle, _PanelClassNameOffset.Value, value); } + private static readonly Lazy _PanelIDOffset = new(() => Schema.GetOffset(0x51A22D1107A4EF60), LazyThreadSafetyMode.None); + public string PanelID { get { - var ptr = _Handle.Read(Schema.GetOffset(0x51A22D1107A4EF60)); + var ptr = _Handle.Read(_PanelIDOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x51A22D1107A4EF60, value); + set => Schema.SetString(_Handle, _PanelIDOffset.Value, value); } + private static readonly Lazy _CustomOutput0Offset = new(() => Schema.GetOffset(0x51A22D119AA5C775), LazyThreadSafetyMode.None); + public CEntityIOOutput CustomOutput0 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x51A22D119AA5C775)); + get => new CEntityIOOutputImpl(_Handle + _CustomOutput0Offset.Value); } + private static readonly Lazy _CustomOutput1Offset = new(() => Schema.GetOffset(0x51A22D1199A5C5E2), LazyThreadSafetyMode.None); + public CEntityIOOutput CustomOutput1 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x51A22D1199A5C5E2)); + get => new CEntityIOOutputImpl(_Handle + _CustomOutput1Offset.Value); } + private static readonly Lazy _CustomOutput2Offset = new(() => Schema.GetOffset(0x51A22D1198A5C44F), LazyThreadSafetyMode.None); + public CEntityIOOutput CustomOutput2 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x51A22D1198A5C44F)); + get => new CEntityIOOutputImpl(_Handle + _CustomOutput2Offset.Value); } + private static readonly Lazy _CustomOutput3Offset = new(() => Schema.GetOffset(0x51A22D1197A5C2BC), LazyThreadSafetyMode.None); + public CEntityIOOutput CustomOutput3 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x51A22D1197A5C2BC)); + get => new CEntityIOOutputImpl(_Handle + _CustomOutput3Offset.Value); } + private static readonly Lazy _CustomOutput4Offset = new(() => Schema.GetOffset(0x51A22D1196A5C129), LazyThreadSafetyMode.None); + public CEntityIOOutput CustomOutput4 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x51A22D1196A5C129)); + get => new CEntityIOOutputImpl(_Handle + _CustomOutput4Offset.Value); } + private static readonly Lazy _CustomOutput5Offset = new(() => Schema.GetOffset(0x51A22D1195A5BF96), LazyThreadSafetyMode.None); + public CEntityIOOutput CustomOutput5 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x51A22D1195A5BF96)); + get => new CEntityIOOutputImpl(_Handle + _CustomOutput5Offset.Value); } + private static readonly Lazy _CustomOutput6Offset = new(() => Schema.GetOffset(0x51A22D1194A5BE03), LazyThreadSafetyMode.None); + public CEntityIOOutput CustomOutput6 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x51A22D1194A5BE03)); + get => new CEntityIOOutputImpl(_Handle + _CustomOutput6Offset.Value); } + private static readonly Lazy _CustomOutput7Offset = new(() => Schema.GetOffset(0x51A22D1193A5BC70), LazyThreadSafetyMode.None); + public CEntityIOOutput CustomOutput7 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x51A22D1193A5BC70)); + get => new CEntityIOOutputImpl(_Handle + _CustomOutput7Offset.Value); } + private static readonly Lazy _CustomOutput8Offset = new(() => Schema.GetOffset(0x51A22D11A2A5D40D), LazyThreadSafetyMode.None); + public CEntityIOOutput CustomOutput8 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x51A22D11A2A5D40D)); + get => new CEntityIOOutputImpl(_Handle + _CustomOutput8Offset.Value); } + private static readonly Lazy _CustomOutput9Offset = new(() => Schema.GetOffset(0x51A22D11A1A5D27A), LazyThreadSafetyMode.None); + public CEntityIOOutput CustomOutput9 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x51A22D11A1A5D27A)); + get => new CEntityIOOutputImpl(_Handle + _CustomOutput9Offset.Value); } public void EnabledUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseCombatCharacterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseCombatCharacterImpl.cs index 59771ae7e..d478ba662 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseCombatCharacterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseCombatCharacterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,39 +17,59 @@ internal partial class CBaseCombatCharacterImpl : CBaseFlexImpl, CBaseCombatChar public CBaseCombatCharacterImpl(nint handle) : base(handle) { } + private static readonly Lazy _ForceServerRagdollOffset = new(() => Schema.GetOffset(0xB47DE3DEC0D0B742), LazyThreadSafetyMode.None); + public ref bool ForceServerRagdoll { - get => ref _Handle.AsRef(Schema.GetOffset(0xB47DE3DEC0D0B742)); + get => ref _Handle.AsRef(_ForceServerRagdollOffset.Value); } + private static readonly Lazy _MyWearablesOffset = new(() => Schema.GetOffset(0xB47DE3DE000B8B43), LazyThreadSafetyMode.None); + public ref CUtlVector> MyWearables { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xB47DE3DE000B8B43)); + get => ref _Handle.AsRef>>(_MyWearablesOffset.Value); } + private static readonly Lazy _ImpactEnergyScaleOffset = new(() => Schema.GetOffset(0xB47DE3DEC66BAC1B), LazyThreadSafetyMode.None); + public ref float ImpactEnergyScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xB47DE3DEC66BAC1B)); + get => ref _Handle.AsRef(_ImpactEnergyScaleOffset.Value); } + private static readonly Lazy _ApplyStressDamageOffset = new(() => Schema.GetOffset(0xB47DE3DEC16FF452), LazyThreadSafetyMode.None); + public ref bool ApplyStressDamage { - get => ref _Handle.AsRef(Schema.GetOffset(0xB47DE3DEC16FF452)); + get => ref _Handle.AsRef(_ApplyStressDamageOffset.Value); } + private static readonly Lazy _DeathEventsDispatchedOffset = new(() => Schema.GetOffset(0xB47DE3DE8F5C8C9F), LazyThreadSafetyMode.None); + public ref bool DeathEventsDispatched { - get => ref _Handle.AsRef(Schema.GetOffset(0xB47DE3DE8F5C8C9F)); + get => ref _Handle.AsRef(_DeathEventsDispatchedOffset.Value); } + private static readonly Lazy _VecRelationshipsOffset = new(() => Schema.GetOffset(0xB47DE3DE2B978F5E), LazyThreadSafetyMode.None); + public ref CUtlVector VecRelationships { - get => ref _Handle.Deref>(Schema.GetOffset(0xB47DE3DE2B978F5E)); + get => ref _Handle.Deref>(_VecRelationshipsOffset.Value); } + private static readonly Lazy _StrRelationshipsOffset = new(() => Schema.GetOffset(0xB47DE3DEF96E2AD7), LazyThreadSafetyMode.None); + public string StrRelationships { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB47DE3DEF96E2AD7)); + var ptr = _Handle.Read(_StrRelationshipsOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB47DE3DEF96E2AD7, value); + set => Schema.SetString(_Handle, _StrRelationshipsOffset.Value, value); } + private static readonly Lazy _HullOffset = new(() => Schema.GetOffset(0xB47DE3DE20B7E577), LazyThreadSafetyMode.None); + public ref Hull_t Hull { - get => ref _Handle.AsRef(Schema.GetOffset(0xB47DE3DE20B7E577)); + get => ref _Handle.AsRef(_HullOffset.Value); } + private static readonly Lazy _NavHullIdxOffset = new(() => Schema.GetOffset(0xB47DE3DE90C08DF0), LazyThreadSafetyMode.None); + public ref uint NavHullIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xB47DE3DE90C08DF0)); + get => ref _Handle.AsRef(_NavHullIdxOffset.Value); } + private static readonly Lazy _MovementStatsOffset = new(() => Schema.GetOffset(0xB47DE3DE4CF2CCDB), LazyThreadSafetyMode.None); + public CMovementStatsProperty MovementStats { - get => new CMovementStatsPropertyImpl(_Handle + Schema.GetOffset(0xB47DE3DE4CF2CCDB)); + get => new CMovementStatsPropertyImpl(_Handle + _MovementStatsOffset.Value); } public void MyWearablesUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseConstraintImpl.cs index 941a2705f..ef7c956e8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class CBaseConstraintImpl : CBoneConstraintBaseImpl, CBaseConst public CBaseConstraintImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xE972C2844D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE972C2844D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xE972C2844D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _UpVectorOffset = new(() => Schema.GetOffset(0xE972C28487645F1B), LazyThreadSafetyMode.None); + public ref Vector UpVector { - get => ref _Handle.AsRef(Schema.GetOffset(0xE972C28487645F1B)); + get => ref _Handle.AsRef(_UpVectorOffset.Value); } + private static readonly Lazy _SlavesOffset = new(() => Schema.GetOffset(0xE972C284A62BA9E9), LazyThreadSafetyMode.None); + public ref CUtlLeanVector Slaves { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE972C284A62BA9E9)); + get => ref _Handle.AsRef>(_SlavesOffset.Value); } + private static readonly Lazy _TargetsOffset = new(() => Schema.GetOffset(0xE972C28436A2FF01), LazyThreadSafetyMode.None); + public ref CUtlVector Targets { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE972C28436A2FF01)); + get => ref _Handle.AsRef>(_TargetsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseDMStartImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseDMStartImpl.cs index a19c881da..058395c95 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseDMStartImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseDMStartImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CBaseDMStartImpl : CPointEntityImpl, CBaseDMStart { public CBaseDMStartImpl(nint handle) : base(handle) { } + private static readonly Lazy _MasterOffset = new(() => Schema.GetOffset(0x4182FA98392E77B3), LazyThreadSafetyMode.None); + public string Master { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4182FA98392E77B3)); + var ptr = _Handle.Read(_MasterOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x4182FA98392E77B3, value); + set => Schema.SetString(_Handle, _MasterOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseDoorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseDoorImpl.cs index 66217b6f2..ff16495b1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseDoorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseDoorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,109 +17,165 @@ internal partial class CBaseDoorImpl : CBaseToggleImpl, CBaseDoor { public CBaseDoorImpl(nint handle) : base(handle) { } + private static readonly Lazy _MoveEntitySpaceOffset = new(() => Schema.GetOffset(0x798B70E7325319F9), LazyThreadSafetyMode.None); + public ref QAngle MoveEntitySpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x798B70E7325319F9)); + get => ref _Handle.AsRef(_MoveEntitySpaceOffset.Value); } + private static readonly Lazy _MoveDirParentSpaceOffset = new(() => Schema.GetOffset(0x798B70E7EC2120EF), LazyThreadSafetyMode.None); + public ref Vector MoveDirParentSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x798B70E7EC2120EF)); + get => ref _Handle.AsRef(_MoveDirParentSpaceOffset.Value); } + private static readonly Lazy _LsOffset = new(() => Schema.GetOffset(0x798B70E7D3B05E88), LazyThreadSafetyMode.None); + public locksound_t Ls { - get => new locksound_tImpl(_Handle + Schema.GetOffset(0x798B70E7D3B05E88)); + get => new locksound_tImpl(_Handle + _LsOffset.Value); } + private static readonly Lazy _ForceClosedOffset = new(() => Schema.GetOffset(0x798B70E7397D7E34), LazyThreadSafetyMode.None); + public ref bool ForceClosed { - get => ref _Handle.AsRef(Schema.GetOffset(0x798B70E7397D7E34)); + get => ref _Handle.AsRef(_ForceClosedOffset.Value); } + private static readonly Lazy _DoorGroupOffset = new(() => Schema.GetOffset(0x798B70E7391E1820), LazyThreadSafetyMode.None); + public ref bool DoorGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0x798B70E7391E1820)); + get => ref _Handle.AsRef(_DoorGroupOffset.Value); } + private static readonly Lazy _LockedOffset = new(() => Schema.GetOffset(0x798B70E7D08E97F3), LazyThreadSafetyMode.None); + public ref bool Locked { - get => ref _Handle.AsRef(Schema.GetOffset(0x798B70E7D08E97F3)); + get => ref _Handle.AsRef(_LockedOffset.Value); } + private static readonly Lazy _IgnoreDebrisOffset = new(() => Schema.GetOffset(0x798B70E7A67DDAD4), LazyThreadSafetyMode.None); + public ref bool IgnoreDebris { - get => ref _Handle.AsRef(Schema.GetOffset(0x798B70E7A67DDAD4)); + get => ref _Handle.AsRef(_IgnoreDebrisOffset.Value); } + private static readonly Lazy _NoNPCsOffset = new(() => Schema.GetOffset(0x798B70E7237405C2), LazyThreadSafetyMode.None); + public ref bool NoNPCs { - get => ref _Handle.AsRef(Schema.GetOffset(0x798B70E7237405C2)); + get => ref _Handle.AsRef(_NoNPCsOffset.Value); } + private static readonly Lazy _SpawnPositionOffset = new(() => Schema.GetOffset(0x798B70E7F5AD878C), LazyThreadSafetyMode.None); + public ref FuncDoorSpawnPos_t SpawnPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x798B70E7F5AD878C)); + get => ref _Handle.AsRef(_SpawnPositionOffset.Value); } + private static readonly Lazy _BlockDamageOffset = new(() => Schema.GetOffset(0x798B70E7A5348091), LazyThreadSafetyMode.None); + public ref float BlockDamage { - get => ref _Handle.AsRef(Schema.GetOffset(0x798B70E7A5348091)); + get => ref _Handle.AsRef(_BlockDamageOffset.Value); } + private static readonly Lazy _NoiseMovingOffset = new(() => Schema.GetOffset(0x798B70E7415AB84B), LazyThreadSafetyMode.None); + public string NoiseMoving { get { - var ptr = _Handle.Read(Schema.GetOffset(0x798B70E7415AB84B)); + var ptr = _Handle.Read(_NoiseMovingOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x798B70E7415AB84B, value); + set => Schema.SetString(_Handle, _NoiseMovingOffset.Value, value); } + private static readonly Lazy _NoiseArrivedOffset = new(() => Schema.GetOffset(0x798B70E7D2CDE47A), LazyThreadSafetyMode.None); + public string NoiseArrived { get { - var ptr = _Handle.Read(Schema.GetOffset(0x798B70E7D2CDE47A)); + var ptr = _Handle.Read(_NoiseArrivedOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x798B70E7D2CDE47A, value); + set => Schema.SetString(_Handle, _NoiseArrivedOffset.Value, value); } + private static readonly Lazy _NoiseMovingClosedOffset = new(() => Schema.GetOffset(0x798B70E7ED56FC0F), LazyThreadSafetyMode.None); + public string NoiseMovingClosed { get { - var ptr = _Handle.Read(Schema.GetOffset(0x798B70E7ED56FC0F)); + var ptr = _Handle.Read(_NoiseMovingClosedOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x798B70E7ED56FC0F, value); + set => Schema.SetString(_Handle, _NoiseMovingClosedOffset.Value, value); } + private static readonly Lazy _NoiseArrivedClosedOffset = new(() => Schema.GetOffset(0x798B70E78637F9A6), LazyThreadSafetyMode.None); + public string NoiseArrivedClosed { get { - var ptr = _Handle.Read(Schema.GetOffset(0x798B70E78637F9A6)); + var ptr = _Handle.Read(_NoiseArrivedClosedOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x798B70E78637F9A6, value); + set => Schema.SetString(_Handle, _NoiseArrivedClosedOffset.Value, value); } + private static readonly Lazy _ChainTargetOffset = new(() => Schema.GetOffset(0x798B70E762B5A227), LazyThreadSafetyMode.None); + public string ChainTarget { get { - var ptr = _Handle.Read(Schema.GetOffset(0x798B70E762B5A227)); + var ptr = _Handle.Read(_ChainTargetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x798B70E762B5A227, value); + set => Schema.SetString(_Handle, _ChainTargetOffset.Value, value); } + private static readonly Lazy _OnBlockedClosingOffset = new(() => Schema.GetOffset(0x798B70E7EC8BC45F), LazyThreadSafetyMode.None); + public CEntityIOOutput OnBlockedClosing { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x798B70E7EC8BC45F)); + get => new CEntityIOOutputImpl(_Handle + _OnBlockedClosingOffset.Value); } + private static readonly Lazy _OnBlockedOpeningOffset = new(() => Schema.GetOffset(0x798B70E7F0BA7AA8), LazyThreadSafetyMode.None); + public CEntityIOOutput OnBlockedOpening { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x798B70E7F0BA7AA8)); + get => new CEntityIOOutputImpl(_Handle + _OnBlockedOpeningOffset.Value); } + private static readonly Lazy _OnUnblockedClosingOffset = new(() => Schema.GetOffset(0x798B70E7B150C15C), LazyThreadSafetyMode.None); + public CEntityIOOutput OnUnblockedClosing { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x798B70E7B150C15C)); + get => new CEntityIOOutputImpl(_Handle + _OnUnblockedClosingOffset.Value); } + private static readonly Lazy _OnUnblockedOpeningOffset = new(() => Schema.GetOffset(0x798B70E71AC8E62F), LazyThreadSafetyMode.None); + public CEntityIOOutput OnUnblockedOpening { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x798B70E71AC8E62F)); + get => new CEntityIOOutputImpl(_Handle + _OnUnblockedOpeningOffset.Value); } + private static readonly Lazy _OnFullyClosedOffset = new(() => Schema.GetOffset(0x798B70E775470294), LazyThreadSafetyMode.None); + public CEntityIOOutput OnFullyClosed { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x798B70E775470294)); + get => new CEntityIOOutputImpl(_Handle + _OnFullyClosedOffset.Value); } + private static readonly Lazy _OnFullyOpenOffset = new(() => Schema.GetOffset(0x798B70E721733AE4), LazyThreadSafetyMode.None); + public CEntityIOOutput OnFullyOpen { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x798B70E721733AE4)); + get => new CEntityIOOutputImpl(_Handle + _OnFullyOpenOffset.Value); } + private static readonly Lazy _OnCloseOffset = new(() => Schema.GetOffset(0x798B70E7BE036874), LazyThreadSafetyMode.None); + public CEntityIOOutput OnClose { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x798B70E7BE036874)); + get => new CEntityIOOutputImpl(_Handle + _OnCloseOffset.Value); } + private static readonly Lazy _OnOpenOffset = new(() => Schema.GetOffset(0x798B70E7109A2278), LazyThreadSafetyMode.None); + public CEntityIOOutput OnOpen { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x798B70E7109A2278)); + get => new CEntityIOOutputImpl(_Handle + _OnOpenOffset.Value); } + private static readonly Lazy _OnLockedUseOffset = new(() => Schema.GetOffset(0x798B70E7FD62B6A1), LazyThreadSafetyMode.None); + public CEntityIOOutput OnLockedUse { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x798B70E7FD62B6A1)); + get => new CEntityIOOutputImpl(_Handle + _OnLockedUseOffset.Value); } + private static readonly Lazy _LoopMoveSoundOffset = new(() => Schema.GetOffset(0x798B70E7A274AA19), LazyThreadSafetyMode.None); + public ref bool LoopMoveSound { - get => ref _Handle.AsRef(Schema.GetOffset(0x798B70E7A274AA19)); + get => ref _Handle.AsRef(_LoopMoveSoundOffset.Value); } + private static readonly Lazy _CreateNavObstacleOffset = new(() => Schema.GetOffset(0x798B70E71849970B), LazyThreadSafetyMode.None); + public ref bool CreateNavObstacle { - get => ref _Handle.AsRef(Schema.GetOffset(0x798B70E71849970B)); + get => ref _Handle.AsRef(_CreateNavObstacleOffset.Value); } + private static readonly Lazy _IsChainingOffset = new(() => Schema.GetOffset(0x798B70E7A186D5CA), LazyThreadSafetyMode.None); + public ref bool IsChaining { - get => ref _Handle.AsRef(Schema.GetOffset(0x798B70E7A186D5CA)); + get => ref _Handle.AsRef(_IsChainingOffset.Value); } + private static readonly Lazy _IsUsableOffset = new(() => Schema.GetOffset(0x798B70E799E20219), LazyThreadSafetyMode.None); + public ref bool IsUsable { - get => ref _Handle.AsRef(Schema.GetOffset(0x798B70E799E20219)); + get => ref _Handle.AsRef(_IsUsableOffset.Value); } public void IsUsableUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseEntityAPIImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseEntityAPIImpl.cs index c93679c13..38a40e514 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseEntityAPIImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseEntityAPIImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseEntityImpl.cs index 5c6b2771c..8e135a426 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,272 +17,432 @@ internal partial class CBaseEntityImpl : CEntityInstanceImpl, CBaseEntity { public CBaseEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _CBodyComponentOffset = new(() => Schema.GetOffset(0x9DC483B8D116E3C5), LazyThreadSafetyMode.None); + public CBodyComponent? CBodyComponent { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9DC483B8D116E3C5)); + var ptr = _Handle.Read(_CBodyComponentOffset.Value); return ptr.IsValidPtr() ? new CBodyComponentImpl(ptr) : null; } } + private static readonly Lazy _NetworkTransmitComponentOffset = new(() => Schema.GetOffset(0x9DC483B8FF010CE4), LazyThreadSafetyMode.None); + public CNetworkTransmitComponent NetworkTransmitComponent { - get => new CNetworkTransmitComponentImpl(_Handle + Schema.GetOffset(0x9DC483B8FF010CE4)); + get => new CNetworkTransmitComponentImpl(_Handle + _NetworkTransmitComponentOffset.Value); } + private static readonly Lazy _ThinkFunctionsOffset = new(() => Schema.GetOffset(0x9DC483B8D2C79415), LazyThreadSafetyMode.None); + public ref CUtlVector ThinkFunctions { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9DC483B8D2C79415)); + get => ref _Handle.AsRef>(_ThinkFunctionsOffset.Value); } + private static readonly Lazy _CurrentThinkContextOffset = new(() => Schema.GetOffset(0x9DC483B8B04F8BF6), LazyThreadSafetyMode.None); + public ref int CurrentThinkContext { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8B04F8BF6)); + get => ref _Handle.AsRef(_CurrentThinkContextOffset.Value); } + private static readonly Lazy _LastThinkTickOffset = new(() => Schema.GetOffset(0x9DC483B8CE8FE7F2), LazyThreadSafetyMode.None); + public GameTick_t LastThinkTick { - get => new GameTick_tImpl(_Handle + Schema.GetOffset(0x9DC483B8CE8FE7F2)); + get => new GameTick_tImpl(_Handle + _LastThinkTickOffset.Value); } + private static readonly Lazy _DisabledContextThinksOffset = new(() => Schema.GetOffset(0x9DC483B8C2C22BED), LazyThreadSafetyMode.None); + public ref bool DisabledContextThinks { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8C2C22BED)); + get => ref _Handle.AsRef(_DisabledContextThinksOffset.Value); } + private static readonly Lazy _IsSteadyStateOffset = new(() => Schema.GetOffset(0x9DC483B84626D6B4), LazyThreadSafetyMode.None); + public SchemaUntypedField IsSteadyState { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x9DC483B84626D6B4)); + get => new SchemaUntypedField(_Handle + _IsSteadyStateOffset.Value); } + private static readonly Lazy _LastNetworkChangeOffset = new(() => Schema.GetOffset(0x9DC483B80351D699), LazyThreadSafetyMode.None); + public ref float LastNetworkChange { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B80351D699)); + get => ref _Handle.AsRef(_LastNetworkChangeOffset.Value); } + private static readonly Lazy _ResponseContextsOffset = new(() => Schema.GetOffset(0x9DC483B85120C9AE), LazyThreadSafetyMode.None); + public ref CUtlVector ResponseContexts { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9DC483B85120C9AE)); + get => ref _Handle.AsRef>(_ResponseContextsOffset.Value); } + private static readonly Lazy _ResponseContextOffset = new(() => Schema.GetOffset(0x9DC483B8ECDEFE61), LazyThreadSafetyMode.None); + public string ResponseContext { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9DC483B8ECDEFE61)); + var ptr = _Handle.Read(_ResponseContextOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9DC483B8ECDEFE61, value); + set => Schema.SetString(_Handle, _ResponseContextOffset.Value, value); } + private static readonly Lazy _HealthOffset = new(() => Schema.GetOffset(0x9DC483B8084CDAD2), LazyThreadSafetyMode.None); + public ref int Health { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8084CDAD2)); + get => ref _Handle.AsRef(_HealthOffset.Value); } + private static readonly Lazy _MaxHealthOffset = new(() => Schema.GetOffset(0x9DC483B80D159178), LazyThreadSafetyMode.None); + public ref int MaxHealth { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B80D159178)); + get => ref _Handle.AsRef(_MaxHealthOffset.Value); } + private static readonly Lazy _LifeStateOffset = new(() => Schema.GetOffset(0x9DC483B81C93BCF0), LazyThreadSafetyMode.None); + public ref byte LifeState { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B81C93BCF0)); + get => ref _Handle.AsRef(_LifeStateOffset.Value); } + private static readonly Lazy _DamageAccumulatorOffset = new(() => Schema.GetOffset(0x9DC483B85B3DCE98), LazyThreadSafetyMode.None); + public ref float DamageAccumulator { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B85B3DCE98)); + get => ref _Handle.AsRef(_DamageAccumulatorOffset.Value); } + private static readonly Lazy _TakesDamageOffset = new(() => Schema.GetOffset(0x9DC483B8FFF5420E), LazyThreadSafetyMode.None); + public ref bool TakesDamage { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8FFF5420E)); + get => ref _Handle.AsRef(_TakesDamageOffset.Value); } + private static readonly Lazy _TakeDamageFlagsOffset = new(() => Schema.GetOffset(0x9DC483B81C16CB56), LazyThreadSafetyMode.None); + public ref TakeDamageFlags_t TakeDamageFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B81C16CB56)); + get => ref _Handle.AsRef(_TakeDamageFlagsOffset.Value); } + private static readonly Lazy _PlatformTypeOffset = new(() => Schema.GetOffset(0x9DC483B818698BA6), LazyThreadSafetyMode.None); + public ref EntityPlatformTypes_t PlatformType { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B818698BA6)); + get => ref _Handle.AsRef(_PlatformTypeOffset.Value); } + private static readonly Lazy _MoveCollideOffset = new(() => Schema.GetOffset(0x9DC483B8C32EF192), LazyThreadSafetyMode.None); + public ref MoveCollide_t MoveCollide { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8C32EF192)); + get => ref _Handle.AsRef(_MoveCollideOffset.Value); } + private static readonly Lazy _MoveTypeOffset = new(() => Schema.GetOffset(0x9DC483B890BCCC1C), LazyThreadSafetyMode.None); + public ref MoveType_t MoveType { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B890BCCC1C)); + get => ref _Handle.AsRef(_MoveTypeOffset.Value); } + private static readonly Lazy _ActualMoveTypeOffset = new(() => Schema.GetOffset(0x9DC483B85600AA92), LazyThreadSafetyMode.None); + public ref MoveType_t ActualMoveType { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B85600AA92)); + get => ref _Handle.AsRef(_ActualMoveTypeOffset.Value); } + private static readonly Lazy _WaterTouchOffset = new(() => Schema.GetOffset(0x9DC483B86FDAC663), LazyThreadSafetyMode.None); + public ref byte WaterTouch { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B86FDAC663)); + get => ref _Handle.AsRef(_WaterTouchOffset.Value); } + private static readonly Lazy _SlimeTouchOffset = new(() => Schema.GetOffset(0x9DC483B849519DFE), LazyThreadSafetyMode.None); + public ref byte SlimeTouch { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B849519DFE)); + get => ref _Handle.AsRef(_SlimeTouchOffset.Value); } + private static readonly Lazy _RestoreInHierarchyOffset = new(() => Schema.GetOffset(0x9DC483B8D3622095), LazyThreadSafetyMode.None); + public ref bool RestoreInHierarchy { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8D3622095)); + get => ref _Handle.AsRef(_RestoreInHierarchyOffset.Value); } + private static readonly Lazy _TargetOffset = new(() => Schema.GetOffset(0x9DC483B8FA08A9E8), LazyThreadSafetyMode.None); + public string Target { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9DC483B8FA08A9E8)); + var ptr = _Handle.Read(_TargetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9DC483B8FA08A9E8, value); + set => Schema.SetString(_Handle, _TargetOffset.Value, value); } + private static readonly Lazy _DamageFilterOffset = new(() => Schema.GetOffset(0x9DC483B831E01230), LazyThreadSafetyMode.None); + public ref CHandle DamageFilter { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9DC483B831E01230)); + get => ref _Handle.AsRef>(_DamageFilterOffset.Value); } + private static readonly Lazy _DamageFilterNameOffset = new(() => Schema.GetOffset(0x9DC483B8F58A21C1), LazyThreadSafetyMode.None); + public string DamageFilterName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9DC483B8F58A21C1)); + var ptr = _Handle.Read(_DamageFilterNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9DC483B8F58A21C1, value); + set => Schema.SetString(_Handle, _DamageFilterNameOffset.Value, value); } + private static readonly Lazy _MoveDoneTimeOffset = new(() => Schema.GetOffset(0x9DC483B860639E87), LazyThreadSafetyMode.None); + public ref float MoveDoneTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B860639E87)); + get => ref _Handle.AsRef(_MoveDoneTimeOffset.Value); } + private static readonly Lazy _SubclassIDOffset = new(() => Schema.GetOffset(0x9DC483B8C02CE796), LazyThreadSafetyMode.None); + public ref CUtlStringToken SubclassID { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8C02CE796)); + get => ref _Handle.AsRef(_SubclassIDOffset.Value); } + private static readonly Lazy _AnimTimeOffset = new(() => Schema.GetOffset(0x9DC483B882735D4F), LazyThreadSafetyMode.None); + public ref float AnimTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B882735D4F)); + get => ref _Handle.AsRef(_AnimTimeOffset.Value); } + private static readonly Lazy _SimulationTimeOffset = new(() => Schema.GetOffset(0x9DC483B87FCB378D), LazyThreadSafetyMode.None); + public ref float SimulationTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B87FCB378D)); + get => ref _Handle.AsRef(_SimulationTimeOffset.Value); } + private static readonly Lazy _CreateTimeOffset = new(() => Schema.GetOffset(0x9DC483B875C91626), LazyThreadSafetyMode.None); + public GameTime_t CreateTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x9DC483B875C91626)); + get => new GameTime_tImpl(_Handle + _CreateTimeOffset.Value); } + private static readonly Lazy _ClientSideRagdollOffset = new(() => Schema.GetOffset(0x9DC483B8F1B9C3D0), LazyThreadSafetyMode.None); + public ref bool ClientSideRagdoll { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8F1B9C3D0)); + get => ref _Handle.AsRef(_ClientSideRagdollOffset.Value); } + private static readonly Lazy _InterpolationFrameOffset = new(() => Schema.GetOffset(0x9DC483B8937E9619), LazyThreadSafetyMode.None); + public ref byte InterpolationFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8937E9619)); + get => ref _Handle.AsRef(_InterpolationFrameOffset.Value); } + private static readonly Lazy _PrevVPhysicsUpdatePosOffset = new(() => Schema.GetOffset(0x9DC483B825F6A1B4), LazyThreadSafetyMode.None); + public ref Vector PrevVPhysicsUpdatePos { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B825F6A1B4)); + get => ref _Handle.AsRef(_PrevVPhysicsUpdatePosOffset.Value); } + private static readonly Lazy _TeamNumOffset = new(() => Schema.GetOffset(0x9DC483B8A5BFEFB3), LazyThreadSafetyMode.None); + public ref byte TeamNum { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8A5BFEFB3)); + get => ref _Handle.AsRef(_TeamNumOffset.Value); } + private static readonly Lazy _GlobalnameOffset = new(() => Schema.GetOffset(0x9DC483B82F8B8190), LazyThreadSafetyMode.None); + public string Globalname { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9DC483B82F8B8190)); + var ptr = _Handle.Read(_GlobalnameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9DC483B82F8B8190, value); + set => Schema.SetString(_Handle, _GlobalnameOffset.Value, value); } + private static readonly Lazy _SentToClientsOffset = new(() => Schema.GetOffset(0x9DC483B81C68C809), LazyThreadSafetyMode.None); + public ref int SentToClients { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B81C68C809)); + get => ref _Handle.AsRef(_SentToClientsOffset.Value); } + private static readonly Lazy _SpeedOffset = new(() => Schema.GetOffset(0x9DC483B8C631B7EA), LazyThreadSafetyMode.None); + public ref float Speed { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8C631B7EA)); + get => ref _Handle.AsRef(_SpeedOffset.Value); } + private static readonly Lazy _UniqueHammerIDOffset = new(() => Schema.GetOffset(0x9DC483B84A371EB2), LazyThreadSafetyMode.None); + public string UniqueHammerID { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9DC483B84A371EB2)); + var ptr = _Handle.Read(_UniqueHammerIDOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9DC483B84A371EB2, value); + set => Schema.SetString(_Handle, _UniqueHammerIDOffset.Value, value); } + private static readonly Lazy _SpawnflagsOffset = new(() => Schema.GetOffset(0x9DC483B83A4BBF6B), LazyThreadSafetyMode.None); + public ref uint Spawnflags { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B83A4BBF6B)); + get => ref _Handle.AsRef(_SpawnflagsOffset.Value); } + private static readonly Lazy _NextThinkTickOffset = new(() => Schema.GetOffset(0x9DC483B8B7CEF021), LazyThreadSafetyMode.None); + public GameTick_t NextThinkTick { - get => new GameTick_tImpl(_Handle + Schema.GetOffset(0x9DC483B8B7CEF021)); + get => new GameTick_tImpl(_Handle + _NextThinkTickOffset.Value); } + private static readonly Lazy _SimulationTickOffset = new(() => Schema.GetOffset(0x9DC483B8144F0737), LazyThreadSafetyMode.None); + public ref int SimulationTick { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8144F0737)); + get => ref _Handle.AsRef(_SimulationTickOffset.Value); } + private static readonly Lazy _OnKilledOffset = new(() => Schema.GetOffset(0x9DC483B8A64A5BF1), LazyThreadSafetyMode.None); + public CEntityIOOutput OnKilled { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x9DC483B8A64A5BF1)); + get => new CEntityIOOutputImpl(_Handle + _OnKilledOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x9DC483B8A4A37590), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8A4A37590)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _AbsVelocityOffset = new(() => Schema.GetOffset(0x9DC483B816C096CC), LazyThreadSafetyMode.None); + public ref Vector AbsVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B816C096CC)); + get => ref _Handle.AsRef(_AbsVelocityOffset.Value); } + private static readonly Lazy _VelocityOffset = new(() => Schema.GetOffset(0x9DC483B87CF77892), LazyThreadSafetyMode.None); + public CNetworkVelocityVector Velocity { - get => new CNetworkVelocityVectorImpl(_Handle + Schema.GetOffset(0x9DC483B87CF77892)); + get => new CNetworkVelocityVectorImpl(_Handle + _VelocityOffset.Value); } + private static readonly Lazy _BaseVelocityOffset = new(() => Schema.GetOffset(0x9DC483B813B19DCB), LazyThreadSafetyMode.None); + public ref Vector BaseVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B813B19DCB)); + get => ref _Handle.AsRef(_BaseVelocityOffset.Value); } + private static readonly Lazy _PushEnumCountOffset = new(() => Schema.GetOffset(0x9DC483B87BDCED73), LazyThreadSafetyMode.None); + public ref int PushEnumCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B87BDCED73)); + get => ref _Handle.AsRef(_PushEnumCountOffset.Value); } + private static readonly Lazy _CollisionOffset = new(() => Schema.GetOffset(0x9DC483B8C1E3AAA1), LazyThreadSafetyMode.None); + public CCollisionProperty? Collision { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9DC483B8C1E3AAA1)); + var ptr = _Handle.Read(_CollisionOffset.Value); return ptr.IsValidPtr() ? new CCollisionPropertyImpl(ptr) : null; } } + private static readonly Lazy _EffectEntityOffset = new(() => Schema.GetOffset(0x9DC483B86BA85951), LazyThreadSafetyMode.None); + public ref CHandle EffectEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9DC483B86BA85951)); + get => ref _Handle.AsRef>(_EffectEntityOffset.Value); } + private static readonly Lazy _OwnerEntityOffset = new(() => Schema.GetOffset(0x9DC483B86D279C31), LazyThreadSafetyMode.None); + public ref CHandle OwnerEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9DC483B86D279C31)); + get => ref _Handle.AsRef>(_OwnerEntityOffset.Value); } + private static readonly Lazy _EffectsOffset = new(() => Schema.GetOffset(0x9DC483B8DF272D79), LazyThreadSafetyMode.None); + public ref uint Effects { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8DF272D79)); + get => ref _Handle.AsRef(_EffectsOffset.Value); } + private static readonly Lazy _GroundEntityOffset = new(() => Schema.GetOffset(0x9DC483B8253120D3), LazyThreadSafetyMode.None); + public ref CHandle GroundEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9DC483B8253120D3)); + get => ref _Handle.AsRef>(_GroundEntityOffset.Value); } + private static readonly Lazy _GroundBodyIndexOffset = new(() => Schema.GetOffset(0x9DC483B81D1BA62A), LazyThreadSafetyMode.None); + public ref int GroundBodyIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B81D1BA62A)); + get => ref _Handle.AsRef(_GroundBodyIndexOffset.Value); } + private static readonly Lazy _FrictionOffset = new(() => Schema.GetOffset(0x9DC483B86F5FEBA1), LazyThreadSafetyMode.None); + public ref float Friction { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B86F5FEBA1)); + get => ref _Handle.AsRef(_FrictionOffset.Value); } + private static readonly Lazy _ElasticityOffset = new(() => Schema.GetOffset(0x9DC483B84EC38DF6), LazyThreadSafetyMode.None); + public ref float Elasticity { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B84EC38DF6)); + get => ref _Handle.AsRef(_ElasticityOffset.Value); } + private static readonly Lazy _GravityScaleOffset = new(() => Schema.GetOffset(0x9DC483B8328A3947), LazyThreadSafetyMode.None); + public ref float GravityScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8328A3947)); + get => ref _Handle.AsRef(_GravityScaleOffset.Value); } + private static readonly Lazy _TimeScaleOffset = new(() => Schema.GetOffset(0x9DC483B8B49D735C), LazyThreadSafetyMode.None); + public ref float TimeScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8B49D735C)); + get => ref _Handle.AsRef(_TimeScaleOffset.Value); } + private static readonly Lazy _WaterLevelOffset = new(() => Schema.GetOffset(0x9DC483B86CC4285C), LazyThreadSafetyMode.None); + public ref float WaterLevel { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B86CC4285C)); + get => ref _Handle.AsRef(_WaterLevelOffset.Value); } + private static readonly Lazy _GravityDisabledOffset = new(() => Schema.GetOffset(0x9DC483B86489B245), LazyThreadSafetyMode.None); + public ref bool GravityDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B86489B245)); + get => ref _Handle.AsRef(_GravityDisabledOffset.Value); } + private static readonly Lazy _AnimatedEveryTickOffset = new(() => Schema.GetOffset(0x9DC483B8FC757D7E), LazyThreadSafetyMode.None); + public ref bool AnimatedEveryTick { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8FC757D7E)); + get => ref _Handle.AsRef(_AnimatedEveryTickOffset.Value); } + private static readonly Lazy _ActualGravityScaleOffset = new(() => Schema.GetOffset(0x9DC483B8386AD491), LazyThreadSafetyMode.None); + public ref float ActualGravityScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8386AD491)); + get => ref _Handle.AsRef(_ActualGravityScaleOffset.Value); } + private static readonly Lazy _GravityActuallyDisabledOffset = new(() => Schema.GetOffset(0x9DC483B842E715B0), LazyThreadSafetyMode.None); + public ref bool GravityActuallyDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B842E715B0)); + get => ref _Handle.AsRef(_GravityActuallyDisabledOffset.Value); } + private static readonly Lazy _DisableLowViolenceOffset = new(() => Schema.GetOffset(0x9DC483B8DE0FB0EE), LazyThreadSafetyMode.None); + public ref bool DisableLowViolence { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8DE0FB0EE)); + get => ref _Handle.AsRef(_DisableLowViolenceOffset.Value); } + private static readonly Lazy _WaterTypeOffset = new(() => Schema.GetOffset(0x9DC483B81053FF74), LazyThreadSafetyMode.None); + public ref byte WaterType { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B81053FF74)); + get => ref _Handle.AsRef(_WaterTypeOffset.Value); } + private static readonly Lazy _EFlagsOffset = new(() => Schema.GetOffset(0x9DC483B8466C684A), LazyThreadSafetyMode.None); + public ref int EFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8466C684A)); + get => ref _Handle.AsRef(_EFlagsOffset.Value); } + private static readonly Lazy _OnUser1Offset = new(() => Schema.GetOffset(0x9DC483B8183E0806), LazyThreadSafetyMode.None); + public CEntityIOOutput OnUser1 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x9DC483B8183E0806)); + get => new CEntityIOOutputImpl(_Handle + _OnUser1Offset.Value); } + private static readonly Lazy _OnUser2Offset = new(() => Schema.GetOffset(0x9DC483B8173E0673), LazyThreadSafetyMode.None); + public CEntityIOOutput OnUser2 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x9DC483B8173E0673)); + get => new CEntityIOOutputImpl(_Handle + _OnUser2Offset.Value); } + private static readonly Lazy _OnUser3Offset = new(() => Schema.GetOffset(0x9DC483B8163E04E0), LazyThreadSafetyMode.None); + public CEntityIOOutput OnUser3 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x9DC483B8163E04E0)); + get => new CEntityIOOutputImpl(_Handle + _OnUser3Offset.Value); } + private static readonly Lazy _OnUser4Offset = new(() => Schema.GetOffset(0x9DC483B81D3E0FE5), LazyThreadSafetyMode.None); + public CEntityIOOutput OnUser4 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x9DC483B81D3E0FE5)); + get => new CEntityIOOutputImpl(_Handle + _OnUser4Offset.Value); } + private static readonly Lazy _InitialTeamNumOffset = new(() => Schema.GetOffset(0x9DC483B807D42CFF), LazyThreadSafetyMode.None); + public ref int InitialTeamNum { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B807D42CFF)); + get => ref _Handle.AsRef(_InitialTeamNumOffset.Value); } + private static readonly Lazy _NavIgnoreUntilTimeOffset = new(() => Schema.GetOffset(0x9DC483B88228BC8B), LazyThreadSafetyMode.None); + public GameTime_t NavIgnoreUntilTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x9DC483B88228BC8B)); + get => new GameTime_tImpl(_Handle + _NavIgnoreUntilTimeOffset.Value); } + private static readonly Lazy _AngVelocityOffset = new(() => Schema.GetOffset(0x9DC483B8022592E4), LazyThreadSafetyMode.None); + public ref QAngle AngVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8022592E4)); + get => ref _Handle.AsRef(_AngVelocityOffset.Value); } + private static readonly Lazy _NetworkQuantizeOriginAndAnglesOffset = new(() => Schema.GetOffset(0x9DC483B89E12171D), LazyThreadSafetyMode.None); + public ref bool NetworkQuantizeOriginAndAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B89E12171D)); + get => ref _Handle.AsRef(_NetworkQuantizeOriginAndAnglesOffset.Value); } + private static readonly Lazy _LagCompensateOffset = new(() => Schema.GetOffset(0x9DC483B835099A18), LazyThreadSafetyMode.None); + public ref bool LagCompensate { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B835099A18)); + get => ref _Handle.AsRef(_LagCompensateOffset.Value); } + private static readonly Lazy _BlockerOffset = new(() => Schema.GetOffset(0x9DC483B840B754B7), LazyThreadSafetyMode.None); + public ref CHandle Blocker { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9DC483B840B754B7)); + get => ref _Handle.AsRef>(_BlockerOffset.Value); } + private static readonly Lazy _LocalTimeOffset = new(() => Schema.GetOffset(0x9DC483B8E23DEFC7), LazyThreadSafetyMode.None); + public ref float LocalTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8E23DEFC7)); + get => ref _Handle.AsRef(_LocalTimeOffset.Value); } + private static readonly Lazy _VPhysicsUpdateLocalTimeOffset = new(() => Schema.GetOffset(0x9DC483B8CEAEBFA5), LazyThreadSafetyMode.None); + public ref float VPhysicsUpdateLocalTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8CEAEBFA5)); + get => ref _Handle.AsRef(_VPhysicsUpdateLocalTimeOffset.Value); } + private static readonly Lazy _BloodTypeOffset = new(() => Schema.GetOffset(0x9DC483B8E472F393), LazyThreadSafetyMode.None); + public ref BloodType BloodType { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DC483B8E472F393)); + get => ref _Handle.AsRef(_BloodTypeOffset.Value); } + private static readonly Lazy _PulseGraphInstanceOffset = new(() => Schema.GetOffset(0x9DC483B87D608947), LazyThreadSafetyMode.None); + public CPulseGraphInstance_ServerEntity? PulseGraphInstance { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9DC483B87D608947)); + var ptr = _Handle.Read(_PulseGraphInstanceOffset.Value); return ptr.IsValidPtr() ? new CPulseGraphInstance_ServerEntityImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseFilterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseFilterImpl.cs index 44d14606b..9595d11d4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseFilterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseFilterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CBaseFilterImpl : CLogicalEntityImpl, CBaseFilter { public CBaseFilterImpl(nint handle) : base(handle) { } + private static readonly Lazy _NegatedOffset = new(() => Schema.GetOffset(0x2D59B2893803BF0D), LazyThreadSafetyMode.None); + public ref bool Negated { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D59B2893803BF0D)); + get => ref _Handle.AsRef(_NegatedOffset.Value); } + private static readonly Lazy _OnPassOffset = new(() => Schema.GetOffset(0x2D59B2899B527249), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPass { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x2D59B2899B527249)); + get => new CEntityIOOutputImpl(_Handle + _OnPassOffset.Value); } + private static readonly Lazy _OnFailOffset = new(() => Schema.GetOffset(0x2D59B289794EF854), LazyThreadSafetyMode.None); + public CEntityIOOutput OnFail { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x2D59B289794EF854)); + get => new CEntityIOOutputImpl(_Handle + _OnFailOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseFlexAlias_funCBaseFlexImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseFlexAlias_funCBaseFlexImpl.cs index a7ebdaf9b..6bc801fc9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseFlexAlias_funCBaseFlexImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseFlexAlias_funCBaseFlexImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseFlexImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseFlexImpl.cs index a2bfed560..254f1b86d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseFlexImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseFlexImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CBaseFlexImpl : CBaseAnimGraphImpl, CBaseFlex { public CBaseFlexImpl(nint handle) : base(handle) { } + private static readonly Lazy _FlexWeightOffset = new(() => Schema.GetOffset(0xEE4FEF48AB868EDA), LazyThreadSafetyMode.None); + public ref CUtlVector FlexWeight { - get => ref _Handle.AsRef>(Schema.GetOffset(0xEE4FEF48AB868EDA)); + get => ref _Handle.AsRef>(_FlexWeightOffset.Value); } + private static readonly Lazy _LookTargetPositionOffset = new(() => Schema.GetOffset(0xEE4FEF480DCD7B00), LazyThreadSafetyMode.None); + public ref Vector LookTargetPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0xEE4FEF480DCD7B00)); + get => ref _Handle.AsRef(_LookTargetPositionOffset.Value); } + private static readonly Lazy _BlinktoggleOffset = new(() => Schema.GetOffset(0xEE4FEF48CA230309), LazyThreadSafetyMode.None); + public ref bool Blinktoggle { - get => ref _Handle.AsRef(Schema.GetOffset(0xEE4FEF48CA230309)); + get => ref _Handle.AsRef(_BlinktoggleOffset.Value); } + private static readonly Lazy _AllowResponsesEndTimeOffset = new(() => Schema.GetOffset(0xEE4FEF4858EB0248), LazyThreadSafetyMode.None); + public GameTime_t AllowResponsesEndTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xEE4FEF4858EB0248)); + get => new GameTime_tImpl(_Handle + _AllowResponsesEndTimeOffset.Value); } + private static readonly Lazy _LastFlexAnimationTimeOffset = new(() => Schema.GetOffset(0xEE4FEF48D5ADEDFF), LazyThreadSafetyMode.None); + public GameTime_t LastFlexAnimationTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xEE4FEF48D5ADEDFF)); + get => new GameTime_tImpl(_Handle + _LastFlexAnimationTimeOffset.Value); } + private static readonly Lazy _NextSceneEventIdOffset = new(() => Schema.GetOffset(0xEE4FEF483756F461), LazyThreadSafetyMode.None); + public SceneEventId_t NextSceneEventId { - get => new SceneEventId_tImpl(_Handle + Schema.GetOffset(0xEE4FEF483756F461)); + get => new SceneEventId_tImpl(_Handle + _NextSceneEventIdOffset.Value); } + private static readonly Lazy _UpdateLayerPrioritiesOffset = new(() => Schema.GetOffset(0xEE4FEF48446AC3B9), LazyThreadSafetyMode.None); + public ref bool UpdateLayerPriorities { - get => ref _Handle.AsRef(Schema.GetOffset(0xEE4FEF48446AC3B9)); + get => ref _Handle.AsRef(_UpdateLayerPrioritiesOffset.Value); } public void FlexWeightUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseGrenadeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseGrenadeImpl.cs index 1ccff7b8f..3cab40557 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseGrenadeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseGrenadeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,55 +17,83 @@ internal partial class CBaseGrenadeImpl : CBaseFlexImpl, CBaseGrenade { public CBaseGrenadeImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnPlayerPickupOffset = new(() => Schema.GetOffset(0xB6ACD98FDE81BF25), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPlayerPickup { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xB6ACD98FDE81BF25)); + get => new CEntityIOOutputImpl(_Handle + _OnPlayerPickupOffset.Value); } + private static readonly Lazy _OnExplodeOffset = new(() => Schema.GetOffset(0xB6ACD98F5153ED85), LazyThreadSafetyMode.None); + public CEntityIOOutput OnExplode { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xB6ACD98F5153ED85)); + get => new CEntityIOOutputImpl(_Handle + _OnExplodeOffset.Value); } + private static readonly Lazy _HasWarnedAIOffset = new(() => Schema.GetOffset(0xB6ACD98F52149340), LazyThreadSafetyMode.None); + public ref bool HasWarnedAI { - get => ref _Handle.AsRef(Schema.GetOffset(0xB6ACD98F52149340)); + get => ref _Handle.AsRef(_HasWarnedAIOffset.Value); } + private static readonly Lazy _IsSmokeGrenadeOffset = new(() => Schema.GetOffset(0xB6ACD98FD26F58DC), LazyThreadSafetyMode.None); + public ref bool IsSmokeGrenade { - get => ref _Handle.AsRef(Schema.GetOffset(0xB6ACD98FD26F58DC)); + get => ref _Handle.AsRef(_IsSmokeGrenadeOffset.Value); } + private static readonly Lazy _IsLiveOffset = new(() => Schema.GetOffset(0xB6ACD98F4DBE6B1F), LazyThreadSafetyMode.None); + public ref bool IsLive { - get => ref _Handle.AsRef(Schema.GetOffset(0xB6ACD98F4DBE6B1F)); + get => ref _Handle.AsRef(_IsLiveOffset.Value); } + private static readonly Lazy _DmgRadiusOffset = new(() => Schema.GetOffset(0xB6ACD98FB9ADFB35), LazyThreadSafetyMode.None); + public ref float DmgRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xB6ACD98FB9ADFB35)); + get => ref _Handle.AsRef(_DmgRadiusOffset.Value); } + private static readonly Lazy _DetonateTimeOffset = new(() => Schema.GetOffset(0xB6ACD98F884102F2), LazyThreadSafetyMode.None); + public GameTime_t DetonateTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xB6ACD98F884102F2)); + get => new GameTime_tImpl(_Handle + _DetonateTimeOffset.Value); } + private static readonly Lazy _WarnAITimeOffset = new(() => Schema.GetOffset(0xB6ACD98FFC4F4550), LazyThreadSafetyMode.None); + public ref float WarnAITime { - get => ref _Handle.AsRef(Schema.GetOffset(0xB6ACD98FFC4F4550)); + get => ref _Handle.AsRef(_WarnAITimeOffset.Value); } + private static readonly Lazy _DamageOffset = new(() => Schema.GetOffset(0xB6ACD98FDC60E53E), LazyThreadSafetyMode.None); + public ref float Damage { - get => ref _Handle.AsRef(Schema.GetOffset(0xB6ACD98FDC60E53E)); + get => ref _Handle.AsRef(_DamageOffset.Value); } + private static readonly Lazy _BounceSoundOffset = new(() => Schema.GetOffset(0xB6ACD98F060D1544), LazyThreadSafetyMode.None); + public string BounceSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB6ACD98F060D1544)); + var ptr = _Handle.Read(_BounceSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB6ACD98F060D1544, value); + set => Schema.SetString(_Handle, _BounceSoundOffset.Value, value); } + private static readonly Lazy _ExplosionSoundOffset = new(() => Schema.GetOffset(0xB6ACD98FEA1C20EF), LazyThreadSafetyMode.None); + public string ExplosionSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB6ACD98FEA1C20EF)); + var ptr = _Handle.Read(_ExplosionSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB6ACD98FEA1C20EF, value); + set => Schema.SetString(_Handle, _ExplosionSoundOffset.Value, value); } + private static readonly Lazy _ThrowerOffset = new(() => Schema.GetOffset(0xB6ACD98FC9CF8702), LazyThreadSafetyMode.None); + public ref CHandle Thrower { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB6ACD98FC9CF8702)); + get => ref _Handle.AsRef>(_ThrowerOffset.Value); } + private static readonly Lazy _NextAttackOffset = new(() => Schema.GetOffset(0xB6ACD98F3DFDCDEA), LazyThreadSafetyMode.None); + public GameTime_t NextAttack { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xB6ACD98F3DFDCDEA)); + get => new GameTime_tImpl(_Handle + _NextAttackOffset.Value); } + private static readonly Lazy _OriginalThrowerOffset = new(() => Schema.GetOffset(0xB6ACD98F34FD45A3), LazyThreadSafetyMode.None); + public ref CHandle OriginalThrower { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB6ACD98F34FD45A3)); + get => ref _Handle.AsRef>(_OriginalThrowerOffset.Value); } public void IsLiveUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseIssueImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseIssueImpl.cs index a10e7f8b0..12997e8ad 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseIssueImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseIssueImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,44 @@ internal partial class CBaseIssueImpl : SchemaClass, CBaseIssue { public CBaseIssueImpl(nint handle) : base(handle) { } + private static readonly Lazy _TypeStringOffset = new(() => Schema.GetOffset(0xE0727D1E2E3EE7A9), LazyThreadSafetyMode.None); + public string TypeString { get { - var ptr = _Handle + Schema.GetOffset(0xE0727D1E2E3EE7A9); + var ptr = _Handle + _TypeStringOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xE0727D1E2E3EE7A9, value, 64); + set => Schema.SetFixedString(_Handle, _TypeStringOffset.Value, value, 64); } + private static readonly Lazy _DetailsStringOffset = new(() => Schema.GetOffset(0xE0727D1ECCE4C9BF), LazyThreadSafetyMode.None); + public string DetailsString { get { - var ptr = _Handle + Schema.GetOffset(0xE0727D1ECCE4C9BF); + var ptr = _Handle + _DetailsStringOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xE0727D1ECCE4C9BF, value, 260); + set => Schema.SetFixedString(_Handle, _DetailsStringOffset.Value, value, 260); } + private static readonly Lazy _NumYesVotesOffset = new(() => Schema.GetOffset(0xE0727D1E7ED4202C), LazyThreadSafetyMode.None); + public ref int NumYesVotes { - get => ref _Handle.AsRef(Schema.GetOffset(0xE0727D1E7ED4202C)); + get => ref _Handle.AsRef(_NumYesVotesOffset.Value); } + private static readonly Lazy _NumNoVotesOffset = new(() => Schema.GetOffset(0xE0727D1E54F18188), LazyThreadSafetyMode.None); + public ref int NumNoVotes { - get => ref _Handle.AsRef(Schema.GetOffset(0xE0727D1E54F18188)); + get => ref _Handle.AsRef(_NumNoVotesOffset.Value); } + private static readonly Lazy _NumPotentialVotesOffset = new(() => Schema.GetOffset(0xE0727D1E61EC9307), LazyThreadSafetyMode.None); + public ref int NumPotentialVotes { - get => ref _Handle.AsRef(Schema.GetOffset(0xE0727D1E61EC9307)); + get => ref _Handle.AsRef(_NumPotentialVotesOffset.Value); } + private static readonly Lazy _VoteControllerOffset = new(() => Schema.GetOffset(0xE0727D1ECB818C7B), LazyThreadSafetyMode.None); + public CVoteController? VoteController { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE0727D1ECB818C7B)); + var ptr = _Handle.Read(_VoteControllerOffset.Value); return ptr.IsValidPtr() ? new CVoteControllerImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseModelEntityAPIImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseModelEntityAPIImpl.cs index 9b30be83f..b82303634 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseModelEntityAPIImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseModelEntityAPIImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseModelEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseModelEntityImpl.cs index 376753a4f..5f9714cb6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseModelEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseModelEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,131 +17,211 @@ internal partial class CBaseModelEntityImpl : CBaseEntityImpl, CBaseModelEntity public CBaseModelEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _CRenderComponentOffset = new(() => Schema.GetOffset(0x517849F7E8F59505), LazyThreadSafetyMode.None); + public CRenderComponent? CRenderComponent { get { - var ptr = _Handle.Read(Schema.GetOffset(0x517849F7E8F59505)); + var ptr = _Handle.Read(_CRenderComponentOffset.Value); return ptr.IsValidPtr() ? new CRenderComponentImpl(ptr) : null; } } + private static readonly Lazy _CHitboxComponentOffset = new(() => Schema.GetOffset(0x517849F70E786123), LazyThreadSafetyMode.None); + public CHitboxComponent CHitboxComponent { - get => new CHitboxComponentImpl(_Handle + Schema.GetOffset(0x517849F70E786123)); + get => new CHitboxComponentImpl(_Handle + _CHitboxComponentOffset.Value); } + private static readonly Lazy _DestructiblePartInitialStateDestructed0Offset = new(() => Schema.GetOffset(0x517849F747691C40), LazyThreadSafetyMode.None); + public ref HitGroup_t DestructiblePartInitialStateDestructed0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F747691C40)); + get => ref _Handle.AsRef(_DestructiblePartInitialStateDestructed0Offset.Value); } + private static readonly Lazy _DestructiblePartInitialStateDestructed1Offset = new(() => Schema.GetOffset(0x517849F748691DD3), LazyThreadSafetyMode.None); + public ref HitGroup_t DestructiblePartInitialStateDestructed1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F748691DD3)); + get => ref _Handle.AsRef(_DestructiblePartInitialStateDestructed1Offset.Value); } + private static readonly Lazy _DestructiblePartInitialStateDestructed2Offset = new(() => Schema.GetOffset(0x517849F749691F66), LazyThreadSafetyMode.None); + public ref HitGroup_t DestructiblePartInitialStateDestructed2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F749691F66)); + get => ref _Handle.AsRef(_DestructiblePartInitialStateDestructed2Offset.Value); } + private static readonly Lazy _DestructiblePartInitialStateDestructed3Offset = new(() => Schema.GetOffset(0x517849F74A6920F9), LazyThreadSafetyMode.None); + public ref HitGroup_t DestructiblePartInitialStateDestructed3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F74A6920F9)); + get => ref _Handle.AsRef(_DestructiblePartInitialStateDestructed3Offset.Value); } + private static readonly Lazy _DestructiblePartInitialStateDestructed4Offset = new(() => Schema.GetOffset(0x517849F74B69228C), LazyThreadSafetyMode.None); + public ref HitGroup_t DestructiblePartInitialStateDestructed4 { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F74B69228C)); + get => ref _Handle.AsRef(_DestructiblePartInitialStateDestructed4Offset.Value); } + private static readonly Lazy _DestructiblePartInitialStateDestructed0_PartIndexOffset = new(() => Schema.GetOffset(0x517849F7D7803958), LazyThreadSafetyMode.None); + public ref int DestructiblePartInitialStateDestructed0_PartIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F7D7803958)); + get => ref _Handle.AsRef(_DestructiblePartInitialStateDestructed0_PartIndexOffset.Value); } + private static readonly Lazy _DestructiblePartInitialStateDestructed1_PartIndexOffset = new(() => Schema.GetOffset(0x517849F7F18ACB17), LazyThreadSafetyMode.None); + public ref int DestructiblePartInitialStateDestructed1_PartIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F7F18ACB17)); + get => ref _Handle.AsRef(_DestructiblePartInitialStateDestructed1_PartIndexOffset.Value); } + private static readonly Lazy _DestructiblePartInitialStateDestructed2_PartIndexOffset = new(() => Schema.GetOffset(0x517849F75197A2DA), LazyThreadSafetyMode.None); + public ref int DestructiblePartInitialStateDestructed2_PartIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F75197A2DA)); + get => ref _Handle.AsRef(_DestructiblePartInitialStateDestructed2_PartIndexOffset.Value); } + private static readonly Lazy _DestructiblePartInitialStateDestructed3_PartIndexOffset = new(() => Schema.GetOffset(0x517849F7A59BCFC9), LazyThreadSafetyMode.None); + public ref int DestructiblePartInitialStateDestructed3_PartIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F7A59BCFC9)); + get => ref _Handle.AsRef(_DestructiblePartInitialStateDestructed3_PartIndexOffset.Value); } + private static readonly Lazy _DestructiblePartInitialStateDestructed4_PartIndexOffset = new(() => Schema.GetOffset(0x517849F76D7C6A3C), LazyThreadSafetyMode.None); + public ref int DestructiblePartInitialStateDestructed4_PartIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F76D7C6A3C)); + get => ref _Handle.AsRef(_DestructiblePartInitialStateDestructed4_PartIndexOffset.Value); } + private static readonly Lazy _DestructiblePartsSystemComponentOffset = new(() => Schema.GetOffset(0x517849F77992C14B), LazyThreadSafetyMode.None); + public CDestructiblePartsComponent? DestructiblePartsSystemComponent { get { - var ptr = _Handle.Read(Schema.GetOffset(0x517849F77992C14B)); + var ptr = _Handle.Read(_DestructiblePartsSystemComponentOffset.Value); return ptr.IsValidPtr() ? new CDestructiblePartsComponentImpl(ptr) : null; } } + private static readonly Lazy _LastHitGroupOffset = new(() => Schema.GetOffset(0x517849F7EE206371), LazyThreadSafetyMode.None); + public ref HitGroup_t LastHitGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F7EE206371)); + get => ref _Handle.AsRef(_LastHitGroupOffset.Value); } + private static readonly Lazy _LastDamageSourceNameOffset = new(() => Schema.GetOffset(0x517849F704D101A5), LazyThreadSafetyMode.None); + public ref CGlobalSymbol LastDamageSourceName { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F704D101A5)); + get => ref _Handle.AsRef(_LastDamageSourceNameOffset.Value); } + private static readonly Lazy _LastDamagePositionOffset = new(() => Schema.GetOffset(0x517849F772774B0B), LazyThreadSafetyMode.None); + public ref Vector LastDamagePosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F772774B0B)); + get => ref _Handle.AsRef(_LastDamagePositionOffset.Value); } + private static readonly Lazy _DissolveStartTimeOffset = new(() => Schema.GetOffset(0x517849F7833C5731), LazyThreadSafetyMode.None); + public GameTime_t DissolveStartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x517849F7833C5731)); + get => new GameTime_tImpl(_Handle + _DissolveStartTimeOffset.Value); } + private static readonly Lazy _OnIgniteOffset = new(() => Schema.GetOffset(0x517849F757BDA972), LazyThreadSafetyMode.None); + public CEntityIOOutput OnIgnite { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x517849F757BDA972)); + get => new CEntityIOOutputImpl(_Handle + _OnIgniteOffset.Value); } + private static readonly Lazy _RenderModeOffset = new(() => Schema.GetOffset(0x517849F7679967A6), LazyThreadSafetyMode.None); + public ref RenderMode_t RenderMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F7679967A6)); + get => ref _Handle.AsRef(_RenderModeOffset.Value); } + private static readonly Lazy _RenderFXOffset = new(() => Schema.GetOffset(0x517849F7E510717F), LazyThreadSafetyMode.None); + public ref RenderFx_t RenderFX { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F7E510717F)); + get => ref _Handle.AsRef(_RenderFXOffset.Value); } + private static readonly Lazy _AllowFadeInViewOffset = new(() => Schema.GetOffset(0x517849F7CDE3B31E), LazyThreadSafetyMode.None); + public ref bool AllowFadeInView { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F7CDE3B31E)); + get => ref _Handle.AsRef(_AllowFadeInViewOffset.Value); } + private static readonly Lazy _RenderOffset = new(() => Schema.GetOffset(0x517849F7470D2A38), LazyThreadSafetyMode.None); + public ref Color Render { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F7470D2A38)); + get => ref _Handle.AsRef(_RenderOffset.Value); } + private static readonly Lazy _RenderAttributesOffset = new(() => Schema.GetOffset(0x517849F7BF74B4AC), LazyThreadSafetyMode.None); + public ref CUtlVector RenderAttributes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x517849F7BF74B4AC)); + get => ref _Handle.AsRef>(_RenderAttributesOffset.Value); } + private static readonly Lazy _RenderToCubemapsOffset = new(() => Schema.GetOffset(0x517849F78A23364A), LazyThreadSafetyMode.None); + public ref bool RenderToCubemaps { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F78A23364A)); + get => ref _Handle.AsRef(_RenderToCubemapsOffset.Value); } + private static readonly Lazy _NoInterpolateOffset = new(() => Schema.GetOffset(0x517849F76E001CB9), LazyThreadSafetyMode.None); + public ref bool NoInterpolate { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F76E001CB9)); + get => ref _Handle.AsRef(_NoInterpolateOffset.Value); } + private static readonly Lazy _CollisionOffset = new(() => Schema.GetOffset(0x517849F7AE8E690F), LazyThreadSafetyMode.None); + public CCollisionProperty Collision { - get => new CCollisionPropertyImpl(_Handle + Schema.GetOffset(0x517849F7AE8E690F)); + get => new CCollisionPropertyImpl(_Handle + _CollisionOffset.Value); } + private static readonly Lazy _GlowOffset = new(() => Schema.GetOffset(0x517849F7A7E70C3C), LazyThreadSafetyMode.None); + public CGlowProperty Glow { - get => new CGlowPropertyImpl(_Handle + Schema.GetOffset(0x517849F7A7E70C3C)); + get => new CGlowPropertyImpl(_Handle + _GlowOffset.Value); } + private static readonly Lazy _GlowBackfaceMultOffset = new(() => Schema.GetOffset(0x517849F74F285CEE), LazyThreadSafetyMode.None); + public ref float GlowBackfaceMult { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F74F285CEE)); + get => ref _Handle.AsRef(_GlowBackfaceMultOffset.Value); } + private static readonly Lazy _FadeMinDistOffset = new(() => Schema.GetOffset(0x517849F77FBCF6A9), LazyThreadSafetyMode.None); + public ref float FadeMinDist { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F77FBCF6A9)); + get => ref _Handle.AsRef(_FadeMinDistOffset.Value); } + private static readonly Lazy _FadeMaxDistOffset = new(() => Schema.GetOffset(0x517849F70B8328FB), LazyThreadSafetyMode.None); + public ref float FadeMaxDist { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F70B8328FB)); + get => ref _Handle.AsRef(_FadeMaxDistOffset.Value); } + private static readonly Lazy _FadeScaleOffset = new(() => Schema.GetOffset(0x517849F786B56425), LazyThreadSafetyMode.None); + public ref float FadeScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F786B56425)); + get => ref _Handle.AsRef(_FadeScaleOffset.Value); } + private static readonly Lazy _ShadowStrengthOffset = new(() => Schema.GetOffset(0x517849F73F1ED282), LazyThreadSafetyMode.None); + public ref float ShadowStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F73F1ED282)); + get => ref _Handle.AsRef(_ShadowStrengthOffset.Value); } + private static readonly Lazy _ObjectCullingOffset = new(() => Schema.GetOffset(0x517849F71A0D757A), LazyThreadSafetyMode.None); + public ref byte ObjectCulling { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F71A0D757A)); + get => ref _Handle.AsRef(_ObjectCullingOffset.Value); } + private static readonly Lazy _AddDecalOffset = new(() => Schema.GetOffset(0x517849F75E07F29D), LazyThreadSafetyMode.None); + public ref int AddDecal { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F75E07F29D)); + get => ref _Handle.AsRef(_AddDecalOffset.Value); } + private static readonly Lazy _DecalPositionOffset = new(() => Schema.GetOffset(0x517849F7939EEE2D), LazyThreadSafetyMode.None); + public ref Vector DecalPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F7939EEE2D)); + get => ref _Handle.AsRef(_DecalPositionOffset.Value); } + private static readonly Lazy _DecalForwardAxisOffset = new(() => Schema.GetOffset(0x517849F78CF4767A), LazyThreadSafetyMode.None); + public ref Vector DecalForwardAxis { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F78CF4767A)); + get => ref _Handle.AsRef(_DecalForwardAxisOffset.Value); } + private static readonly Lazy _DecalModeOffset = new(() => Schema.GetOffset(0x517849F7C6AE5101), LazyThreadSafetyMode.None); + public ref DecalMode_t DecalMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F7C6AE5101)); + get => ref _Handle.AsRef(_DecalModeOffset.Value); } + private static readonly Lazy _RequiredDecalModeOffset = new(() => Schema.GetOffset(0x517849F7CBD7293E), LazyThreadSafetyMode.None); + public ref DecalMode_t RequiredDecalMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x517849F7CBD7293E)); + get => ref _Handle.AsRef(_RequiredDecalModeOffset.Value); } + private static readonly Lazy _ConfigEntitiesToPropagateMaterialDecalsToOffset = new(() => Schema.GetOffset(0x517849F75FD9715A), LazyThreadSafetyMode.None); + public ref CUtlVector> ConfigEntitiesToPropagateMaterialDecalsTo { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x517849F75FD9715A)); + get => ref _Handle.AsRef>>(_ConfigEntitiesToPropagateMaterialDecalsToOffset.Value); } + private static readonly Lazy _ViewOffsetOffset = new(() => Schema.GetOffset(0x517849F739DB834B), LazyThreadSafetyMode.None); + public CNetworkViewOffsetVector ViewOffset { - get => new CNetworkViewOffsetVectorImpl(_Handle + Schema.GetOffset(0x517849F739DB834B)); + get => new CNetworkViewOffsetVectorImpl(_Handle + _ViewOffsetOffset.Value); } public ISchemaFixedArray DisabledHitGroups { get => new SchemaFixedArray(_Handle, 0x517849F7DDB01736, 1, 4, 4); diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseMoveBehaviorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseMoveBehaviorImpl.cs index ef3a83212..04a10a2ba 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseMoveBehaviorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseMoveBehaviorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,50 +17,72 @@ internal partial class CBaseMoveBehaviorImpl : CPathKeyFrameImpl, CBaseMoveBehav public CBaseMoveBehaviorImpl(nint handle) : base(handle) { } + private static readonly Lazy _PositionInterpolatorOffset = new(() => Schema.GetOffset(0x4C94E06076D631CA), LazyThreadSafetyMode.None); + public ref int PositionInterpolator { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C94E06076D631CA)); + get => ref _Handle.AsRef(_PositionInterpolatorOffset.Value); } + private static readonly Lazy _RotationInterpolatorOffset = new(() => Schema.GetOffset(0x4C94E060D5ABDED3), LazyThreadSafetyMode.None); + public ref int RotationInterpolator { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C94E060D5ABDED3)); + get => ref _Handle.AsRef(_RotationInterpolatorOffset.Value); } + private static readonly Lazy _AnimStartTimeOffset = new(() => Schema.GetOffset(0x4C94E060C2FA1CCF), LazyThreadSafetyMode.None); + public ref float AnimStartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C94E060C2FA1CCF)); + get => ref _Handle.AsRef(_AnimStartTimeOffset.Value); } + private static readonly Lazy _AnimEndTimeOffset = new(() => Schema.GetOffset(0x4C94E06042C3E66A), LazyThreadSafetyMode.None); + public ref float AnimEndTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C94E06042C3E66A)); + get => ref _Handle.AsRef(_AnimEndTimeOffset.Value); } + private static readonly Lazy _AverageSpeedAcrossFrameOffset = new(() => Schema.GetOffset(0x4C94E0603F4A5B51), LazyThreadSafetyMode.None); + public ref float AverageSpeedAcrossFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C94E0603F4A5B51)); + get => ref _Handle.AsRef(_AverageSpeedAcrossFrameOffset.Value); } + private static readonly Lazy _CurrentKeyFrameOffset = new(() => Schema.GetOffset(0x4C94E060AF22FD24), LazyThreadSafetyMode.None); + public CPathKeyFrame? CurrentKeyFrame { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4C94E060AF22FD24)); + var ptr = _Handle.Read(_CurrentKeyFrameOffset.Value); return ptr.IsValidPtr() ? new CPathKeyFrameImpl(ptr) : null; } } + private static readonly Lazy _TargetKeyFrameOffset = new(() => Schema.GetOffset(0x4C94E0606B9E13EA), LazyThreadSafetyMode.None); + public CPathKeyFrame? TargetKeyFrame { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4C94E0606B9E13EA)); + var ptr = _Handle.Read(_TargetKeyFrameOffset.Value); return ptr.IsValidPtr() ? new CPathKeyFrameImpl(ptr) : null; } } + private static readonly Lazy _PreKeyFrameOffset = new(() => Schema.GetOffset(0x4C94E0609753526C), LazyThreadSafetyMode.None); + public CPathKeyFrame? PreKeyFrame { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4C94E0609753526C)); + var ptr = _Handle.Read(_PreKeyFrameOffset.Value); return ptr.IsValidPtr() ? new CPathKeyFrameImpl(ptr) : null; } } + private static readonly Lazy _PostKeyFrameOffset = new(() => Schema.GetOffset(0x4C94E06033EC8ED5), LazyThreadSafetyMode.None); + public CPathKeyFrame? PostKeyFrame { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4C94E06033EC8ED5)); + var ptr = _Handle.Read(_PostKeyFrameOffset.Value); return ptr.IsValidPtr() ? new CPathKeyFrameImpl(ptr) : null; } } + private static readonly Lazy _TimeIntoFrameOffset = new(() => Schema.GetOffset(0x4C94E060C6B111CD), LazyThreadSafetyMode.None); + public ref float TimeIntoFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C94E060C6B111CD)); + get => ref _Handle.AsRef(_TimeIntoFrameOffset.Value); } + private static readonly Lazy _DirectionOffset = new(() => Schema.GetOffset(0x4C94E0606BDD23E5), LazyThreadSafetyMode.None); + public ref int Direction { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C94E0606BDD23E5)); + get => ref _Handle.AsRef(_DirectionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlatTrainImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlatTrainImpl.cs index 92d868feb..f5ff14cee 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlatTrainImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlatTrainImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,28 +17,38 @@ internal partial class CBasePlatTrainImpl : CBaseToggleImpl, CBasePlatTrain { public CBasePlatTrainImpl(nint handle) : base(handle) { } + private static readonly Lazy _NoiseMovingOffset = new(() => Schema.GetOffset(0x78773ABC415AB84B), LazyThreadSafetyMode.None); + public string NoiseMoving { get { - var ptr = _Handle.Read(Schema.GetOffset(0x78773ABC415AB84B)); + var ptr = _Handle.Read(_NoiseMovingOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x78773ABC415AB84B, value); + set => Schema.SetString(_Handle, _NoiseMovingOffset.Value, value); } + private static readonly Lazy _NoiseArrivedOffset = new(() => Schema.GetOffset(0x78773ABCD2CDE47A), LazyThreadSafetyMode.None); + public string NoiseArrived { get { - var ptr = _Handle.Read(Schema.GetOffset(0x78773ABCD2CDE47A)); + var ptr = _Handle.Read(_NoiseArrivedOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x78773ABCD2CDE47A, value); + set => Schema.SetString(_Handle, _NoiseArrivedOffset.Value, value); } + private static readonly Lazy _VolumeOffset = new(() => Schema.GetOffset(0x78773ABCE3962F2F), LazyThreadSafetyMode.None); + public ref float Volume { - get => ref _Handle.AsRef(Schema.GetOffset(0x78773ABCE3962F2F)); + get => ref _Handle.AsRef(_VolumeOffset.Value); } + private static readonly Lazy _TWidthOffset = new(() => Schema.GetOffset(0x78773ABCADF5A64B), LazyThreadSafetyMode.None); + public ref float TWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0x78773ABCADF5A64B)); + get => ref _Handle.AsRef(_TWidthOffset.Value); } + private static readonly Lazy _TLengthOffset = new(() => Schema.GetOffset(0x78773ABCA72CEC99), LazyThreadSafetyMode.None); + public ref float TLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x78773ABCA72CEC99)); + get => ref _Handle.AsRef(_TLengthOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerControllerAPIImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerControllerAPIImpl.cs index 65ced4374..0496e3206 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerControllerAPIImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerControllerAPIImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerControllerImpl.cs index 30bcef33a..f7f2da1fd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,85 +17,133 @@ internal partial class CBasePlayerControllerImpl : CBaseEntityImpl, CBasePlayerC public CBasePlayerControllerImpl(nint handle) : base(handle) { } + private static readonly Lazy _InButtonsWhichAreTogglesOffset = new(() => Schema.GetOffset(0x3979FF6E84B9651F), LazyThreadSafetyMode.None); + public ref ulong InButtonsWhichAreToggles { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6E84B9651F)); + get => ref _Handle.AsRef(_InButtonsWhichAreTogglesOffset.Value); } + private static readonly Lazy _TickBaseOffset = new(() => Schema.GetOffset(0x3979FF6E09A8C76D), LazyThreadSafetyMode.None); + public ref uint TickBase { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6E09A8C76D)); + get => ref _Handle.AsRef(_TickBaseOffset.Value); } + private static readonly Lazy _PawnOffset = new(() => Schema.GetOffset(0x3979FF6E7C628C1D), LazyThreadSafetyMode.None); + public ref CHandle Pawn { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3979FF6E7C628C1D)); + get => ref _Handle.AsRef>(_PawnOffset.Value); } + private static readonly Lazy _KnownTeamMismatchOffset = new(() => Schema.GetOffset(0x3979FF6EDDCE3C49), LazyThreadSafetyMode.None); + public ref bool KnownTeamMismatch { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6EDDCE3C49)); + get => ref _Handle.AsRef(_KnownTeamMismatchOffset.Value); } + private static readonly Lazy _SplitScreenSlotOffset = new(() => Schema.GetOffset(0x3979FF6EDB96ED47), LazyThreadSafetyMode.None); + public ref uint SplitScreenSlot { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6EDB96ED47)); + get => ref _Handle.AsRef(_SplitScreenSlotOffset.Value); } + private static readonly Lazy _SplitOwnerOffset = new(() => Schema.GetOffset(0x3979FF6E7F6EFD54), LazyThreadSafetyMode.None); + public ref CHandle SplitOwner { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3979FF6E7F6EFD54)); + get => ref _Handle.AsRef>(_SplitOwnerOffset.Value); } + private static readonly Lazy _SplitScreenPlayersOffset = new(() => Schema.GetOffset(0x3979FF6E533D1C5D), LazyThreadSafetyMode.None); + public ref CUtlVector> SplitScreenPlayers { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x3979FF6E533D1C5D)); + get => ref _Handle.AsRef>>(_SplitScreenPlayersOffset.Value); } + private static readonly Lazy _IsHLTVOffset = new(() => Schema.GetOffset(0x3979FF6E5DC66E6B), LazyThreadSafetyMode.None); + public ref bool IsHLTV { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6E5DC66E6B)); + get => ref _Handle.AsRef(_IsHLTVOffset.Value); } + private static readonly Lazy _ConnectedOffset = new(() => Schema.GetOffset(0x3979FF6E97963D8B), LazyThreadSafetyMode.None); + public ref PlayerConnectedState Connected { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6E97963D8B)); + get => ref _Handle.AsRef(_ConnectedOffset.Value); } + private static readonly Lazy _PlayerNameOffset = new(() => Schema.GetOffset(0x3979FF6EDE61DD3B), LazyThreadSafetyMode.None); + public string PlayerName { get { - var ptr = _Handle + Schema.GetOffset(0x3979FF6EDE61DD3B); + var ptr = _Handle + _PlayerNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x3979FF6EDE61DD3B, value, 128); + set => Schema.SetFixedString(_Handle, _PlayerNameOffset.Value, value, 128); } + private static readonly Lazy _NetworkIDStringOffset = new(() => Schema.GetOffset(0x3979FF6E0EA4B3D6), LazyThreadSafetyMode.None); + public string NetworkIDString { get { - var ptr = _Handle.Read(Schema.GetOffset(0x3979FF6E0EA4B3D6)); + var ptr = _Handle.Read(_NetworkIDStringOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x3979FF6E0EA4B3D6, value); + set => Schema.SetString(_Handle, _NetworkIDStringOffset.Value, value); } + private static readonly Lazy _LerpTimeOffset = new(() => Schema.GetOffset(0x3979FF6E9FF4229D), LazyThreadSafetyMode.None); + public ref float LerpTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6E9FF4229D)); + get => ref _Handle.AsRef(_LerpTimeOffset.Value); } + private static readonly Lazy _LagCompensationOffset = new(() => Schema.GetOffset(0x3979FF6E648FCFD5), LazyThreadSafetyMode.None); + public ref bool LagCompensation { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6E648FCFD5)); + get => ref _Handle.AsRef(_LagCompensationOffset.Value); } + private static readonly Lazy _PredictOffset = new(() => Schema.GetOffset(0x3979FF6E21F4FE0A), LazyThreadSafetyMode.None); + public ref bool Predict { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6E21F4FE0A)); + get => ref _Handle.AsRef(_PredictOffset.Value); } + private static readonly Lazy _IsLowViolenceOffset = new(() => Schema.GetOffset(0x3979FF6E302B094C), LazyThreadSafetyMode.None); + public ref bool IsLowViolence { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6E302B094C)); + get => ref _Handle.AsRef(_IsLowViolenceOffset.Value); } + private static readonly Lazy _GamePausedOffset = new(() => Schema.GetOffset(0x3979FF6E582909A9), LazyThreadSafetyMode.None); + public ref bool GamePaused { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6E582909A9)); + get => ref _Handle.AsRef(_GamePausedOffset.Value); } + private static readonly Lazy _IgnoreGlobalChatOffset = new(() => Schema.GetOffset(0x3979FF6E926A5FDF), LazyThreadSafetyMode.None); + public ref ChatIgnoreType_t IgnoreGlobalChat { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6E926A5FDF)); + get => ref _Handle.AsRef(_IgnoreGlobalChatOffset.Value); } + private static readonly Lazy _LastPlayerTalkTimeOffset = new(() => Schema.GetOffset(0x3979FF6EE68B6D11), LazyThreadSafetyMode.None); + public ref float LastPlayerTalkTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6EE68B6D11)); + get => ref _Handle.AsRef(_LastPlayerTalkTimeOffset.Value); } + private static readonly Lazy _LastEntitySteadyStateOffset = new(() => Schema.GetOffset(0x3979FF6E884773FB), LazyThreadSafetyMode.None); + public ref float LastEntitySteadyState { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6E884773FB)); + get => ref _Handle.AsRef(_LastEntitySteadyStateOffset.Value); } + private static readonly Lazy _AvailableEntitySteadyStateOffset = new(() => Schema.GetOffset(0x3979FF6E77E35552), LazyThreadSafetyMode.None); + public ref int AvailableEntitySteadyState { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6E77E35552)); + get => ref _Handle.AsRef(_AvailableEntitySteadyStateOffset.Value); } + private static readonly Lazy _HasAnySteadyStateEntsOffset = new(() => Schema.GetOffset(0x3979FF6E039D58D0), LazyThreadSafetyMode.None); + public ref bool HasAnySteadyStateEnts { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6E039D58D0)); + get => ref _Handle.AsRef(_HasAnySteadyStateEntsOffset.Value); } + private static readonly Lazy _SteamIDOffset = new(() => Schema.GetOffset(0x3979FF6EB22F805E), LazyThreadSafetyMode.None); + public ref ulong SteamID { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6EB22F805E)); + get => ref _Handle.AsRef(_SteamIDOffset.Value); } + private static readonly Lazy _NoClipEnabledOffset = new(() => Schema.GetOffset(0x3979FF6E520E7FBD), LazyThreadSafetyMode.None); + public ref bool NoClipEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6E520E7FBD)); + get => ref _Handle.AsRef(_NoClipEnabledOffset.Value); } + private static readonly Lazy _DesiredFOVOffset = new(() => Schema.GetOffset(0x3979FF6E38022E09), LazyThreadSafetyMode.None); + public ref uint DesiredFOV { - get => ref _Handle.AsRef(Schema.GetOffset(0x3979FF6E38022E09)); + get => ref _Handle.AsRef(_DesiredFOVOffset.Value); } public void TickBaseUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerPawnImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerPawnImpl.cs index 8cc3e49af..49257310e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerPawnImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerPawnImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,110 +17,160 @@ internal partial class CBasePlayerPawnImpl : CBaseCombatCharacterImpl, CBasePlay public CBasePlayerPawnImpl(nint handle) : base(handle) { } + private static readonly Lazy _WeaponServicesOffset = new(() => Schema.GetOffset(0xCA2EED0451B23A93), LazyThreadSafetyMode.None); + public CPlayer_WeaponServices? WeaponServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0xCA2EED0451B23A93)); + var ptr = _Handle.Read(_WeaponServicesOffset.Value); return ptr.IsValidPtr() ? new CPlayer_WeaponServicesImpl(ptr) : null; } } + private static readonly Lazy _ItemServicesOffset = new(() => Schema.GetOffset(0xCA2EED04AABBB9B8), LazyThreadSafetyMode.None); + public CPlayer_ItemServices? ItemServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0xCA2EED04AABBB9B8)); + var ptr = _Handle.Read(_ItemServicesOffset.Value); return ptr.IsValidPtr() ? new CPlayer_ItemServicesImpl(ptr) : null; } } + private static readonly Lazy _AutoaimServicesOffset = new(() => Schema.GetOffset(0xCA2EED0413209115), LazyThreadSafetyMode.None); + public CPlayer_AutoaimServices? AutoaimServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0xCA2EED0413209115)); + var ptr = _Handle.Read(_AutoaimServicesOffset.Value); return ptr.IsValidPtr() ? new CPlayer_AutoaimServicesImpl(ptr) : null; } } + private static readonly Lazy _ObserverServicesOffset = new(() => Schema.GetOffset(0xCA2EED044ED1A579), LazyThreadSafetyMode.None); + public CPlayer_ObserverServices? ObserverServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0xCA2EED044ED1A579)); + var ptr = _Handle.Read(_ObserverServicesOffset.Value); return ptr.IsValidPtr() ? new CPlayer_ObserverServicesImpl(ptr) : null; } } + private static readonly Lazy _WaterServicesOffset = new(() => Schema.GetOffset(0xCA2EED04A5653452), LazyThreadSafetyMode.None); + public CPlayer_WaterServices? WaterServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0xCA2EED04A5653452)); + var ptr = _Handle.Read(_WaterServicesOffset.Value); return ptr.IsValidPtr() ? new CPlayer_WaterServicesImpl(ptr) : null; } } + private static readonly Lazy _UseServicesOffset = new(() => Schema.GetOffset(0xCA2EED04A87C910A), LazyThreadSafetyMode.None); + public CPlayer_UseServices? UseServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0xCA2EED04A87C910A)); + var ptr = _Handle.Read(_UseServicesOffset.Value); return ptr.IsValidPtr() ? new CPlayer_UseServicesImpl(ptr) : null; } } + private static readonly Lazy _FlashlightServicesOffset = new(() => Schema.GetOffset(0xCA2EED046CF76641), LazyThreadSafetyMode.None); + public CPlayer_FlashlightServices? FlashlightServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0xCA2EED046CF76641)); + var ptr = _Handle.Read(_FlashlightServicesOffset.Value); return ptr.IsValidPtr() ? new CPlayer_FlashlightServicesImpl(ptr) : null; } } + private static readonly Lazy _CameraServicesOffset = new(() => Schema.GetOffset(0xCA2EED043B7DFD20), LazyThreadSafetyMode.None); + public CPlayer_CameraServices? CameraServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0xCA2EED043B7DFD20)); + var ptr = _Handle.Read(_CameraServicesOffset.Value); return ptr.IsValidPtr() ? new CPlayer_CameraServicesImpl(ptr) : null; } } + private static readonly Lazy _MovementServicesOffset = new(() => Schema.GetOffset(0xCA2EED04CF73E28A), LazyThreadSafetyMode.None); + public CPlayer_MovementServices? MovementServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0xCA2EED04CF73E28A)); + var ptr = _Handle.Read(_MovementServicesOffset.Value); return ptr.IsValidPtr() ? new CPlayer_MovementServicesImpl(ptr) : null; } } + private static readonly Lazy _ServerViewAngleChangesOffset = new(() => Schema.GetOffset(0xCA2EED049182F3B7), LazyThreadSafetyMode.None); + public ref CUtlVector ServerViewAngleChanges { - get => ref _Handle.AsRef>(Schema.GetOffset(0xCA2EED049182F3B7)); + get => ref _Handle.AsRef>(_ServerViewAngleChangesOffset.Value); } + private static readonly Lazy _V_angleOffset = new(() => Schema.GetOffset(0xCA2EED0413C45A71), LazyThreadSafetyMode.None); + public ref QAngle V_angle { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA2EED0413C45A71)); + get => ref _Handle.AsRef(_V_angleOffset.Value); } + private static readonly Lazy _V_anglePreviousOffset = new(() => Schema.GetOffset(0xCA2EED0406B54DD4), LazyThreadSafetyMode.None); + public ref QAngle V_anglePrevious { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA2EED0406B54DD4)); + get => ref _Handle.AsRef(_V_anglePreviousOffset.Value); } + private static readonly Lazy _HideHUDOffset = new(() => Schema.GetOffset(0xCA2EED040627E4A5), LazyThreadSafetyMode.None); + public ref uint HideHUD { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA2EED040627E4A5)); + get => ref _Handle.AsRef(_HideHUDOffset.Value); } + private static readonly Lazy _Skybox3dOffset = new(() => Schema.GetOffset(0xCA2EED0451DA4DBC), LazyThreadSafetyMode.None); + public sky3dparams_t Skybox3d { - get => new sky3dparams_tImpl(_Handle + Schema.GetOffset(0xCA2EED0451DA4DBC)); + get => new sky3dparams_tImpl(_Handle + _Skybox3dOffset.Value); } + private static readonly Lazy _TimeLastHurtOffset = new(() => Schema.GetOffset(0xCA2EED048FA4AFB1), LazyThreadSafetyMode.None); + public GameTime_t TimeLastHurt { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xCA2EED048FA4AFB1)); + get => new GameTime_tImpl(_Handle + _TimeLastHurtOffset.Value); } + private static readonly Lazy _DeathTimeOffset = new(() => Schema.GetOffset(0xCA2EED0407F7A70A), LazyThreadSafetyMode.None); + public GameTime_t DeathTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xCA2EED0407F7A70A)); + get => new GameTime_tImpl(_Handle + _DeathTimeOffset.Value); } + private static readonly Lazy _NextSuicideTimeOffset = new(() => Schema.GetOffset(0xCA2EED04735FDC79), LazyThreadSafetyMode.None); + public GameTime_t NextSuicideTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xCA2EED04735FDC79)); + get => new GameTime_tImpl(_Handle + _NextSuicideTimeOffset.Value); } + private static readonly Lazy _InitHUDOffset = new(() => Schema.GetOffset(0xCA2EED04BA12A114), LazyThreadSafetyMode.None); + public ref bool InitHUD { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA2EED04BA12A114)); + get => ref _Handle.AsRef(_InitHUDOffset.Value); } + private static readonly Lazy _ExpresserOffset = new(() => Schema.GetOffset(0xCA2EED04697CAC2A), LazyThreadSafetyMode.None); + public CAI_Expresser? Expresser { get { - var ptr = _Handle.Read(Schema.GetOffset(0xCA2EED04697CAC2A)); + var ptr = _Handle.Read(_ExpresserOffset.Value); return ptr.IsValidPtr() ? new CAI_ExpresserImpl(ptr) : null; } } + private static readonly Lazy _ControllerOffset = new(() => Schema.GetOffset(0xCA2EED0429882A6B), LazyThreadSafetyMode.None); + public ref CHandle Controller { - get => ref _Handle.AsRef>(Schema.GetOffset(0xCA2EED0429882A6B)); + get => ref _Handle.AsRef>(_ControllerOffset.Value); } + private static readonly Lazy _DefaultControllerOffset = new(() => Schema.GetOffset(0xCA2EED04A623A4A8), LazyThreadSafetyMode.None); + public ref CHandle DefaultController { - get => ref _Handle.AsRef>(Schema.GetOffset(0xCA2EED04A623A4A8)); + get => ref _Handle.AsRef>(_DefaultControllerOffset.Value); } + private static readonly Lazy _HltvReplayDelayOffset = new(() => Schema.GetOffset(0xCA2EED043108CD5F), LazyThreadSafetyMode.None); + public ref float HltvReplayDelay { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA2EED043108CD5F)); + get => ref _Handle.AsRef(_HltvReplayDelayOffset.Value); } + private static readonly Lazy _HltvReplayEndOffset = new(() => Schema.GetOffset(0xCA2EED0479F16CD5), LazyThreadSafetyMode.None); + public ref float HltvReplayEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA2EED0479F16CD5)); + get => ref _Handle.AsRef(_HltvReplayEndOffset.Value); } + private static readonly Lazy _HltvReplayEntityOffset = new(() => Schema.GetOffset(0xCA2EED04ADF32E26), LazyThreadSafetyMode.None); + public ref uint HltvReplayEntity { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA2EED04ADF32E26)); + get => ref _Handle.AsRef(_HltvReplayEntityOffset.Value); } + private static readonly Lazy _SndOpvarLatchDataOffset = new(() => Schema.GetOffset(0xCA2EED046B36858E), LazyThreadSafetyMode.None); + public ref CUtlVector SndOpvarLatchData { - get => ref _Handle.AsRef>(Schema.GetOffset(0xCA2EED046B36858E)); + get => ref _Handle.AsRef>(_SndOpvarLatchDataOffset.Value); } public void WeaponServicesUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerVDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerVDataImpl.cs index 7f8b441c9..b1495711d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerVDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerVDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,47 +17,75 @@ internal partial class CBasePlayerVDataImpl : CEntitySubclassVDataBaseImpl, CBas public CBasePlayerVDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModelNameOffset = new(() => Schema.GetOffset(0x89A654F0002A227C), LazyThreadSafetyMode.None); + public SchemaUntypedField ModelName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x89A654F0002A227C)); + get => new SchemaUntypedField(_Handle + _ModelNameOffset.Value); } + private static readonly Lazy _HeadDamageMultiplierOffset = new(() => Schema.GetOffset(0x89A654F0306CEA07), LazyThreadSafetyMode.None); + public CSkillFloat HeadDamageMultiplier { - get => new CSkillFloatImpl(_Handle + Schema.GetOffset(0x89A654F0306CEA07)); + get => new CSkillFloatImpl(_Handle + _HeadDamageMultiplierOffset.Value); } + private static readonly Lazy _ChestDamageMultiplierOffset = new(() => Schema.GetOffset(0x89A654F0C82E808E), LazyThreadSafetyMode.None); + public CSkillFloat ChestDamageMultiplier { - get => new CSkillFloatImpl(_Handle + Schema.GetOffset(0x89A654F0C82E808E)); + get => new CSkillFloatImpl(_Handle + _ChestDamageMultiplierOffset.Value); } + private static readonly Lazy _StomachDamageMultiplierOffset = new(() => Schema.GetOffset(0x89A654F0F84BFAFA), LazyThreadSafetyMode.None); + public CSkillFloat StomachDamageMultiplier { - get => new CSkillFloatImpl(_Handle + Schema.GetOffset(0x89A654F0F84BFAFA)); + get => new CSkillFloatImpl(_Handle + _StomachDamageMultiplierOffset.Value); } + private static readonly Lazy _ArmDamageMultiplierOffset = new(() => Schema.GetOffset(0x89A654F071454291), LazyThreadSafetyMode.None); + public CSkillFloat ArmDamageMultiplier { - get => new CSkillFloatImpl(_Handle + Schema.GetOffset(0x89A654F071454291)); + get => new CSkillFloatImpl(_Handle + _ArmDamageMultiplierOffset.Value); } + private static readonly Lazy _LegDamageMultiplierOffset = new(() => Schema.GetOffset(0x89A654F0F2F8B1BB), LazyThreadSafetyMode.None); + public CSkillFloat LegDamageMultiplier { - get => new CSkillFloatImpl(_Handle + Schema.GetOffset(0x89A654F0F2F8B1BB)); + get => new CSkillFloatImpl(_Handle + _LegDamageMultiplierOffset.Value); } + private static readonly Lazy _HoldBreathTimeOffset = new(() => Schema.GetOffset(0x89A654F093F22051), LazyThreadSafetyMode.None); + public ref float HoldBreathTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x89A654F093F22051)); + get => ref _Handle.AsRef(_HoldBreathTimeOffset.Value); } + private static readonly Lazy _DrowningDamageIntervalOffset = new(() => Schema.GetOffset(0x89A654F05ECD13F9), LazyThreadSafetyMode.None); + public ref float DrowningDamageInterval { - get => ref _Handle.AsRef(Schema.GetOffset(0x89A654F05ECD13F9)); + get => ref _Handle.AsRef(_DrowningDamageIntervalOffset.Value); } + private static readonly Lazy _DrowningDamageInitialOffset = new(() => Schema.GetOffset(0x89A654F0155618A2), LazyThreadSafetyMode.None); + public ref int DrowningDamageInitial { - get => ref _Handle.AsRef(Schema.GetOffset(0x89A654F0155618A2)); + get => ref _Handle.AsRef(_DrowningDamageInitialOffset.Value); } + private static readonly Lazy _DrowningDamageMaxOffset = new(() => Schema.GetOffset(0x89A654F0E3FA4428), LazyThreadSafetyMode.None); + public ref int DrowningDamageMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x89A654F0E3FA4428)); + get => ref _Handle.AsRef(_DrowningDamageMaxOffset.Value); } + private static readonly Lazy _WaterSpeedOffset = new(() => Schema.GetOffset(0x89A654F0CED804D7), LazyThreadSafetyMode.None); + public ref int WaterSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x89A654F0CED804D7)); + get => ref _Handle.AsRef(_WaterSpeedOffset.Value); } + private static readonly Lazy _UseRangeOffset = new(() => Schema.GetOffset(0x89A654F03B375BF3), LazyThreadSafetyMode.None); + public ref float UseRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x89A654F03B375BF3)); + get => ref _Handle.AsRef(_UseRangeOffset.Value); } + private static readonly Lazy _UseAngleToleranceOffset = new(() => Schema.GetOffset(0x89A654F01A464300), LazyThreadSafetyMode.None); + public ref float UseAngleTolerance { - get => ref _Handle.AsRef(Schema.GetOffset(0x89A654F01A464300)); + get => ref _Handle.AsRef(_UseAngleToleranceOffset.Value); } + private static readonly Lazy _CrouchTimeOffset = new(() => Schema.GetOffset(0x89A654F01E805FB4), LazyThreadSafetyMode.None); + public ref float CrouchTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x89A654F01E805FB4)); + get => ref _Handle.AsRef(_CrouchTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerWeaponImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerWeaponImpl.cs index 42548dcbc..36a35db2b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerWeaponImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerWeaponImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,43 @@ internal partial class CBasePlayerWeaponImpl : CEconEntityImpl, CBasePlayerWeapo public CBasePlayerWeaponImpl(nint handle) : base(handle) { } + private static readonly Lazy _NextPrimaryAttackTickOffset = new(() => Schema.GetOffset(0x4174B75E11BA24E3), LazyThreadSafetyMode.None); + public GameTick_t NextPrimaryAttackTick { - get => new GameTick_tImpl(_Handle + Schema.GetOffset(0x4174B75E11BA24E3)); + get => new GameTick_tImpl(_Handle + _NextPrimaryAttackTickOffset.Value); } + private static readonly Lazy _NextPrimaryAttackTickRatioOffset = new(() => Schema.GetOffset(0x4174B75E0D9A9E18), LazyThreadSafetyMode.None); + public ref float NextPrimaryAttackTickRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0x4174B75E0D9A9E18)); + get => ref _Handle.AsRef(_NextPrimaryAttackTickRatioOffset.Value); } + private static readonly Lazy _NextSecondaryAttackTickOffset = new(() => Schema.GetOffset(0x4174B75EDE66C257), LazyThreadSafetyMode.None); + public GameTick_t NextSecondaryAttackTick { - get => new GameTick_tImpl(_Handle + Schema.GetOffset(0x4174B75EDE66C257)); + get => new GameTick_tImpl(_Handle + _NextSecondaryAttackTickOffset.Value); } + private static readonly Lazy _NextSecondaryAttackTickRatioOffset = new(() => Schema.GetOffset(0x4174B75EF3E6AF88), LazyThreadSafetyMode.None); + public ref float NextSecondaryAttackTickRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0x4174B75EF3E6AF88)); + get => ref _Handle.AsRef(_NextSecondaryAttackTickRatioOffset.Value); } + private static readonly Lazy _Clip1Offset = new(() => Schema.GetOffset(0x4174B75ED0250969), LazyThreadSafetyMode.None); + public ref int Clip1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x4174B75ED0250969)); + get => ref _Handle.AsRef(_Clip1Offset.Value); } + private static readonly Lazy _Clip2Offset = new(() => Schema.GetOffset(0x4174B75ECD2504B0), LazyThreadSafetyMode.None); + public ref int Clip2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x4174B75ECD2504B0)); + get => ref _Handle.AsRef(_Clip2Offset.Value); } public ISchemaFixedArray ReserveAmmo { get => new SchemaFixedArray(_Handle, 0x4174B75EB3FEBB0B, 2, 4, 4); } + private static readonly Lazy _OnPlayerUseOffset = new(() => Schema.GetOffset(0x4174B75E611C9A14), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPlayerUse { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x4174B75E611C9A14)); + get => new CEntityIOOutputImpl(_Handle + _OnPlayerUseOffset.Value); } public void NextPrimaryAttackTickUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerWeaponVDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerWeaponVDataImpl.cs index 0fcc82911..2877ad68c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerWeaponVDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePlayerWeaponVDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,99 +17,159 @@ internal partial class CBasePlayerWeaponVDataImpl : CEntitySubclassVDataBaseImpl public CBasePlayerWeaponVDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _WorldModelOffset = new(() => Schema.GetOffset(0x64E418A0B9041909), LazyThreadSafetyMode.None); + public SchemaUntypedField WorldModel { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x64E418A0B9041909)); + get => new SchemaUntypedField(_Handle + _WorldModelOffset.Value); } + private static readonly Lazy _ToolsOnlyOwnerModelNameOffset = new(() => Schema.GetOffset(0x64E418A06DD9DD04), LazyThreadSafetyMode.None); + public SchemaUntypedField ToolsOnlyOwnerModelName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x64E418A06DD9DD04)); + get => new SchemaUntypedField(_Handle + _ToolsOnlyOwnerModelNameOffset.Value); } + private static readonly Lazy _BuiltRightHandedOffset = new(() => Schema.GetOffset(0x64E418A08857B74F), LazyThreadSafetyMode.None); + public ref bool BuiltRightHanded { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A08857B74F)); + get => ref _Handle.AsRef(_BuiltRightHandedOffset.Value); } + private static readonly Lazy _AllowFlippingOffset = new(() => Schema.GetOffset(0x64E418A01B594D05), LazyThreadSafetyMode.None); + public ref bool AllowFlipping { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A01B594D05)); + get => ref _Handle.AsRef(_AllowFlippingOffset.Value); } + private static readonly Lazy _MuzzleAttachmentOffset = new(() => Schema.GetOffset(0x64E418A0E8A8FEA2), LazyThreadSafetyMode.None); + public SchemaUntypedField MuzzleAttachment { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x64E418A0E8A8FEA2)); + get => new SchemaUntypedField(_Handle + _MuzzleAttachmentOffset.Value); } + private static readonly Lazy _MuzzleFlashParticleOffset = new(() => Schema.GetOffset(0x64E418A0CE0726A3), LazyThreadSafetyMode.None); + public SchemaUntypedField MuzzleFlashParticle { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x64E418A0CE0726A3)); + get => new SchemaUntypedField(_Handle + _MuzzleFlashParticleOffset.Value); } + private static readonly Lazy _MuzzleFlashParticleConfigOffset = new(() => Schema.GetOffset(0x64E418A029D7C081), LazyThreadSafetyMode.None); + public string MuzzleFlashParticleConfig { get { - var ptr = _Handle.Read(Schema.GetOffset(0x64E418A029D7C081)); + var ptr = _Handle.Read(_MuzzleFlashParticleConfigOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x64E418A029D7C081, value); + set => Schema.SetString(_Handle, _MuzzleFlashParticleConfigOffset.Value, value); } + private static readonly Lazy _BarrelSmokeParticleOffset = new(() => Schema.GetOffset(0x64E418A03406364F), LazyThreadSafetyMode.None); + public SchemaUntypedField BarrelSmokeParticle { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x64E418A03406364F)); + get => new SchemaUntypedField(_Handle + _BarrelSmokeParticleOffset.Value); } + private static readonly Lazy _MuzzleSmokeShotThresholdOffset = new(() => Schema.GetOffset(0x64E418A036780024), LazyThreadSafetyMode.None); + public ref byte MuzzleSmokeShotThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A036780024)); + get => ref _Handle.AsRef(_MuzzleSmokeShotThresholdOffset.Value); } + private static readonly Lazy _MuzzleSmokeTimeoutOffset = new(() => Schema.GetOffset(0x64E418A06F626E1A), LazyThreadSafetyMode.None); + public ref float MuzzleSmokeTimeout { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A06F626E1A)); + get => ref _Handle.AsRef(_MuzzleSmokeTimeoutOffset.Value); } + private static readonly Lazy _MuzzleSmokeDecrementRateOffset = new(() => Schema.GetOffset(0x64E418A0B407F926), LazyThreadSafetyMode.None); + public ref float MuzzleSmokeDecrementRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A0B407F926)); + get => ref _Handle.AsRef(_MuzzleSmokeDecrementRateOffset.Value); } + private static readonly Lazy _LinkedCooldownsOffset = new(() => Schema.GetOffset(0x64E418A039951A46), LazyThreadSafetyMode.None); + public ref bool LinkedCooldowns { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A039951A46)); + get => ref _Handle.AsRef(_LinkedCooldownsOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x64E418A01873A1F7), LazyThreadSafetyMode.None); + public ref ItemFlagTypes_t Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A01873A1F7)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _PrimaryAmmoTypeOffset = new(() => Schema.GetOffset(0x64E418A05686E507), LazyThreadSafetyMode.None); + public AmmoIndex_t PrimaryAmmoType { - get => new AmmoIndex_tImpl(_Handle + Schema.GetOffset(0x64E418A05686E507)); + get => new AmmoIndex_tImpl(_Handle + _PrimaryAmmoTypeOffset.Value); } + private static readonly Lazy _SecondaryAmmoTypeOffset = new(() => Schema.GetOffset(0x64E418A046D1E9A7), LazyThreadSafetyMode.None); + public AmmoIndex_t SecondaryAmmoType { - get => new AmmoIndex_tImpl(_Handle + Schema.GetOffset(0x64E418A046D1E9A7)); + get => new AmmoIndex_tImpl(_Handle + _SecondaryAmmoTypeOffset.Value); } + private static readonly Lazy _MaxClip1Offset = new(() => Schema.GetOffset(0x64E418A0EF951A4F), LazyThreadSafetyMode.None); + public ref int MaxClip1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A0EF951A4F)); + get => ref _Handle.AsRef(_MaxClip1Offset.Value); } + private static readonly Lazy _MaxClip2Offset = new(() => Schema.GetOffset(0x64E418A0F0951BE2), LazyThreadSafetyMode.None); + public ref int MaxClip2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A0F0951BE2)); + get => ref _Handle.AsRef(_MaxClip2Offset.Value); } + private static readonly Lazy _DefaultClip1Offset = new(() => Schema.GetOffset(0x64E418A0999A5252), LazyThreadSafetyMode.None); + public ref int DefaultClip1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A0999A5252)); + get => ref _Handle.AsRef(_DefaultClip1Offset.Value); } + private static readonly Lazy _DefaultClip2Offset = new(() => Schema.GetOffset(0x64E418A0989A50BF), LazyThreadSafetyMode.None); + public ref int DefaultClip2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A0989A50BF)); + get => ref _Handle.AsRef(_DefaultClip2Offset.Value); } + private static readonly Lazy _ReserveAmmoAsClipsOffset = new(() => Schema.GetOffset(0x64E418A016F78884), LazyThreadSafetyMode.None); + public ref bool ReserveAmmoAsClips { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A016F78884)); + get => ref _Handle.AsRef(_ReserveAmmoAsClipsOffset.Value); } + private static readonly Lazy _TreatAsSingleClipOffset = new(() => Schema.GetOffset(0x64E418A01B25858D), LazyThreadSafetyMode.None); + public ref bool TreatAsSingleClip { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A01B25858D)); + get => ref _Handle.AsRef(_TreatAsSingleClipOffset.Value); } + private static readonly Lazy _KeepLoadedAmmoOffset = new(() => Schema.GetOffset(0x64E418A0C9C228BF), LazyThreadSafetyMode.None); + public ref bool KeepLoadedAmmo { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A0C9C228BF)); + get => ref _Handle.AsRef(_KeepLoadedAmmoOffset.Value); } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0x64E418A054A5EA14), LazyThreadSafetyMode.None); + public ref int Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A054A5EA14)); + get => ref _Handle.AsRef(_WeightOffset.Value); } + private static readonly Lazy _AutoSwitchToOffset = new(() => Schema.GetOffset(0x64E418A01E225763), LazyThreadSafetyMode.None); + public ref bool AutoSwitchTo { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A01E225763)); + get => ref _Handle.AsRef(_AutoSwitchToOffset.Value); } + private static readonly Lazy _AutoSwitchFromOffset = new(() => Schema.GetOffset(0x64E418A01E5E509A), LazyThreadSafetyMode.None); + public ref bool AutoSwitchFrom { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A01E5E509A)); + get => ref _Handle.AsRef(_AutoSwitchFromOffset.Value); } + private static readonly Lazy _RumbleEffectOffset = new(() => Schema.GetOffset(0x64E418A0C5F24460), LazyThreadSafetyMode.None); + public ref RumbleEffect_t RumbleEffect { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A0C5F24460)); + get => ref _Handle.AsRef(_RumbleEffectOffset.Value); } + private static readonly Lazy _DropSpeedOffset = new(() => Schema.GetOffset(0x64E418A005B18969), LazyThreadSafetyMode.None); + public ref float DropSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A005B18969)); + get => ref _Handle.AsRef(_DropSpeedOffset.Value); } + private static readonly Lazy _SlotOffset = new(() => Schema.GetOffset(0x64E418A0AC7A8798), LazyThreadSafetyMode.None); + public ref int Slot { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A0AC7A8798)); + get => ref _Handle.AsRef(_SlotOffset.Value); } + private static readonly Lazy _PositionOffset = new(() => Schema.GetOffset(0x64E418A00617DD77), LazyThreadSafetyMode.None); + public ref int Position { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E418A00617DD77)); + get => ref _Handle.AsRef(_PositionOffset.Value); } + private static readonly Lazy _ShootSoundsOffset = new(() => Schema.GetOffset(0x64E418A0DF14A83B), LazyThreadSafetyMode.None); + public SchemaUntypedField ShootSounds { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x64E418A0DF14A83B)); + get => new SchemaUntypedField(_Handle + _ShootSoundsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePropDoorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePropDoorImpl.cs index 35594c150..54c4ee6c2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePropDoorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePropDoorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,159 +17,235 @@ internal partial class CBasePropDoorImpl : CDynamicPropImpl, CBasePropDoor { public CBasePropDoorImpl(nint handle) : base(handle) { } + private static readonly Lazy _AutoReturnDelayOffset = new(() => Schema.GetOffset(0x140EA8BE772B0615), LazyThreadSafetyMode.None); + public ref float AutoReturnDelay { - get => ref _Handle.AsRef(Schema.GetOffset(0x140EA8BE772B0615)); + get => ref _Handle.AsRef(_AutoReturnDelayOffset.Value); } + private static readonly Lazy _DoorListOffset = new(() => Schema.GetOffset(0x140EA8BE1E34E0D7), LazyThreadSafetyMode.None); + public ref CUtlVector> DoorList { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x140EA8BE1E34E0D7)); + get => ref _Handle.AsRef>>(_DoorListOffset.Value); } + private static readonly Lazy _HardwareTypeOffset = new(() => Schema.GetOffset(0x140EA8BEAA155C65), LazyThreadSafetyMode.None); + public ref int HardwareType { - get => ref _Handle.AsRef(Schema.GetOffset(0x140EA8BEAA155C65)); + get => ref _Handle.AsRef(_HardwareTypeOffset.Value); } + private static readonly Lazy _NeedsHardwareOffset = new(() => Schema.GetOffset(0x140EA8BE4748BCCE), LazyThreadSafetyMode.None); + public ref bool NeedsHardware { - get => ref _Handle.AsRef(Schema.GetOffset(0x140EA8BE4748BCCE)); + get => ref _Handle.AsRef(_NeedsHardwareOffset.Value); } + private static readonly Lazy _DoorStateOffset = new(() => Schema.GetOffset(0x140EA8BE55D06645), LazyThreadSafetyMode.None); + public ref DoorState_t DoorState { - get => ref _Handle.AsRef(Schema.GetOffset(0x140EA8BE55D06645)); + get => ref _Handle.AsRef(_DoorStateOffset.Value); } + private static readonly Lazy _LockedOffset = new(() => Schema.GetOffset(0x140EA8BED08E97F3), LazyThreadSafetyMode.None); + public ref bool Locked { - get => ref _Handle.AsRef(Schema.GetOffset(0x140EA8BED08E97F3)); + get => ref _Handle.AsRef(_LockedOffset.Value); } + private static readonly Lazy _NoNPCsOffset = new(() => Schema.GetOffset(0x140EA8BE237405C2), LazyThreadSafetyMode.None); + public ref bool NoNPCs { - get => ref _Handle.AsRef(Schema.GetOffset(0x140EA8BE237405C2)); + get => ref _Handle.AsRef(_NoNPCsOffset.Value); } + private static readonly Lazy _ClosedPositionOffset = new(() => Schema.GetOffset(0x140EA8BEC93C638A), LazyThreadSafetyMode.None); + public ref Vector ClosedPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x140EA8BEC93C638A)); + get => ref _Handle.AsRef(_ClosedPositionOffset.Value); } + private static readonly Lazy _ClosedAnglesOffset = new(() => Schema.GetOffset(0x140EA8BE53D26DF1), LazyThreadSafetyMode.None); + public ref QAngle ClosedAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0x140EA8BE53D26DF1)); + get => ref _Handle.AsRef(_ClosedAnglesOffset.Value); } + private static readonly Lazy _BlockerOffset = new(() => Schema.GetOffset(0x140EA8BE21787A5F), LazyThreadSafetyMode.None); + public ref CHandle Blocker { - get => ref _Handle.AsRef>(Schema.GetOffset(0x140EA8BE21787A5F)); + get => ref _Handle.AsRef>(_BlockerOffset.Value); } + private static readonly Lazy _FirstBlockedOffset = new(() => Schema.GetOffset(0x140EA8BEF120E737), LazyThreadSafetyMode.None); + public ref bool FirstBlocked { - get => ref _Handle.AsRef(Schema.GetOffset(0x140EA8BEF120E737)); + get => ref _Handle.AsRef(_FirstBlockedOffset.Value); } + private static readonly Lazy _LsOffset = new(() => Schema.GetOffset(0x140EA8BED3B05E88), LazyThreadSafetyMode.None); + public locksound_t Ls { - get => new locksound_tImpl(_Handle + Schema.GetOffset(0x140EA8BED3B05E88)); + get => new locksound_tImpl(_Handle + _LsOffset.Value); } + private static readonly Lazy _ForceClosedOffset = new(() => Schema.GetOffset(0x140EA8BE397D7E34), LazyThreadSafetyMode.None); + public ref bool ForceClosed { - get => ref _Handle.AsRef(Schema.GetOffset(0x140EA8BE397D7E34)); + get => ref _Handle.AsRef(_ForceClosedOffset.Value); } + private static readonly Lazy _LatchWorldPositionOffset = new(() => Schema.GetOffset(0x140EA8BEEBC4A818), LazyThreadSafetyMode.None); + public ref Vector LatchWorldPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x140EA8BEEBC4A818)); + get => ref _Handle.AsRef(_LatchWorldPositionOffset.Value); } + private static readonly Lazy _ActivatorOffset = new(() => Schema.GetOffset(0x140EA8BEAB093BB2), LazyThreadSafetyMode.None); + public ref CHandle Activator { - get => ref _Handle.AsRef>(Schema.GetOffset(0x140EA8BEAB093BB2)); + get => ref _Handle.AsRef>(_ActivatorOffset.Value); } + private static readonly Lazy _SoundMovingOffset = new(() => Schema.GetOffset(0x140EA8BE096B0232), LazyThreadSafetyMode.None); + public string SoundMoving { get { - var ptr = _Handle.Read(Schema.GetOffset(0x140EA8BE096B0232)); + var ptr = _Handle.Read(_SoundMovingOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x140EA8BE096B0232, value); + set => Schema.SetString(_Handle, _SoundMovingOffset.Value, value); } + private static readonly Lazy _SoundOpenOffset = new(() => Schema.GetOffset(0x140EA8BE736F2FD4), LazyThreadSafetyMode.None); + public string SoundOpen { get { - var ptr = _Handle.Read(Schema.GetOffset(0x140EA8BE736F2FD4)); + var ptr = _Handle.Read(_SoundOpenOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x140EA8BE736F2FD4, value); + set => Schema.SetString(_Handle, _SoundOpenOffset.Value, value); } + private static readonly Lazy _SoundCloseOffset = new(() => Schema.GetOffset(0x140EA8BE25C06648), LazyThreadSafetyMode.None); + public string SoundClose { get { - var ptr = _Handle.Read(Schema.GetOffset(0x140EA8BE25C06648)); + var ptr = _Handle.Read(_SoundCloseOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x140EA8BE25C06648, value); + set => Schema.SetString(_Handle, _SoundCloseOffset.Value, value); } + private static readonly Lazy _SoundLockOffset = new(() => Schema.GetOffset(0x140EA8BE79ED369B), LazyThreadSafetyMode.None); + public string SoundLock { get { - var ptr = _Handle.Read(Schema.GetOffset(0x140EA8BE79ED369B)); + var ptr = _Handle.Read(_SoundLockOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x140EA8BE79ED369B, value); + set => Schema.SetString(_Handle, _SoundLockOffset.Value, value); } + private static readonly Lazy _SoundUnlockOffset = new(() => Schema.GetOffset(0x140EA8BE784A9850), LazyThreadSafetyMode.None); + public string SoundUnlock { get { - var ptr = _Handle.Read(Schema.GetOffset(0x140EA8BE784A9850)); + var ptr = _Handle.Read(_SoundUnlockOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x140EA8BE784A9850, value); + set => Schema.SetString(_Handle, _SoundUnlockOffset.Value, value); } + private static readonly Lazy _SoundLatchOffset = new(() => Schema.GetOffset(0x140EA8BE1128D286), LazyThreadSafetyMode.None); + public string SoundLatch { get { - var ptr = _Handle.Read(Schema.GetOffset(0x140EA8BE1128D286)); + var ptr = _Handle.Read(_SoundLatchOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x140EA8BE1128D286, value); + set => Schema.SetString(_Handle, _SoundLatchOffset.Value, value); } + private static readonly Lazy _SoundPoundOffset = new(() => Schema.GetOffset(0x140EA8BE100E3D8E), LazyThreadSafetyMode.None); + public string SoundPound { get { - var ptr = _Handle.Read(Schema.GetOffset(0x140EA8BE100E3D8E)); + var ptr = _Handle.Read(_SoundPoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x140EA8BE100E3D8E, value); + set => Schema.SetString(_Handle, _SoundPoundOffset.Value, value); } + private static readonly Lazy _SoundJiggleOffset = new(() => Schema.GetOffset(0x140EA8BEA6C5140C), LazyThreadSafetyMode.None); + public string SoundJiggle { get { - var ptr = _Handle.Read(Schema.GetOffset(0x140EA8BEA6C5140C)); + var ptr = _Handle.Read(_SoundJiggleOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x140EA8BEA6C5140C, value); + set => Schema.SetString(_Handle, _SoundJiggleOffset.Value, value); } + private static readonly Lazy _SoundLockedAnimOffset = new(() => Schema.GetOffset(0x140EA8BEF4D24043), LazyThreadSafetyMode.None); + public string SoundLockedAnim { get { - var ptr = _Handle.Read(Schema.GetOffset(0x140EA8BEF4D24043)); + var ptr = _Handle.Read(_SoundLockedAnimOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x140EA8BEF4D24043, value); + set => Schema.SetString(_Handle, _SoundLockedAnimOffset.Value, value); } + private static readonly Lazy _NumCloseAttemptsOffset = new(() => Schema.GetOffset(0x140EA8BEEE2FAC03), LazyThreadSafetyMode.None); + public ref int NumCloseAttempts { - get => ref _Handle.AsRef(Schema.GetOffset(0x140EA8BEEE2FAC03)); + get => ref _Handle.AsRef(_NumCloseAttemptsOffset.Value); } + private static readonly Lazy _PhysicsMaterialOffset = new(() => Schema.GetOffset(0x140EA8BEF6A7286B), LazyThreadSafetyMode.None); + public ref CUtlStringToken PhysicsMaterial { - get => ref _Handle.AsRef(Schema.GetOffset(0x140EA8BEF6A7286B)); + get => ref _Handle.AsRef(_PhysicsMaterialOffset.Value); } + private static readonly Lazy _SlaveNameOffset = new(() => Schema.GetOffset(0x140EA8BEAA484A63), LazyThreadSafetyMode.None); + public string SlaveName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x140EA8BEAA484A63)); + var ptr = _Handle.Read(_SlaveNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x140EA8BEAA484A63, value); + set => Schema.SetString(_Handle, _SlaveNameOffset.Value, value); } + private static readonly Lazy _MasterOffset = new(() => Schema.GetOffset(0x140EA8BEB8DA1B0D), LazyThreadSafetyMode.None); + public ref CHandle Master { - get => ref _Handle.AsRef>(Schema.GetOffset(0x140EA8BEB8DA1B0D)); + get => ref _Handle.AsRef>(_MasterOffset.Value); } + private static readonly Lazy _OnBlockedClosingOffset = new(() => Schema.GetOffset(0x140EA8BEEC8BC45F), LazyThreadSafetyMode.None); + public CEntityIOOutput OnBlockedClosing { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x140EA8BEEC8BC45F)); + get => new CEntityIOOutputImpl(_Handle + _OnBlockedClosingOffset.Value); } + private static readonly Lazy _OnBlockedOpeningOffset = new(() => Schema.GetOffset(0x140EA8BEF0BA7AA8), LazyThreadSafetyMode.None); + public CEntityIOOutput OnBlockedOpening { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x140EA8BEF0BA7AA8)); + get => new CEntityIOOutputImpl(_Handle + _OnBlockedOpeningOffset.Value); } + private static readonly Lazy _OnUnblockedClosingOffset = new(() => Schema.GetOffset(0x140EA8BEB150C15C), LazyThreadSafetyMode.None); + public CEntityIOOutput OnUnblockedClosing { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x140EA8BEB150C15C)); + get => new CEntityIOOutputImpl(_Handle + _OnUnblockedClosingOffset.Value); } + private static readonly Lazy _OnUnblockedOpeningOffset = new(() => Schema.GetOffset(0x140EA8BE1AC8E62F), LazyThreadSafetyMode.None); + public CEntityIOOutput OnUnblockedOpening { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x140EA8BE1AC8E62F)); + get => new CEntityIOOutputImpl(_Handle + _OnUnblockedOpeningOffset.Value); } + private static readonly Lazy _OnFullyClosedOffset = new(() => Schema.GetOffset(0x140EA8BE75470294), LazyThreadSafetyMode.None); + public CEntityIOOutput OnFullyClosed { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x140EA8BE75470294)); + get => new CEntityIOOutputImpl(_Handle + _OnFullyClosedOffset.Value); } + private static readonly Lazy _OnFullyOpenOffset = new(() => Schema.GetOffset(0x140EA8BE21733AE4), LazyThreadSafetyMode.None); + public CEntityIOOutput OnFullyOpen { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x140EA8BE21733AE4)); + get => new CEntityIOOutputImpl(_Handle + _OnFullyOpenOffset.Value); } + private static readonly Lazy _OnCloseOffset = new(() => Schema.GetOffset(0x140EA8BEBE036874), LazyThreadSafetyMode.None); + public CEntityIOOutput OnClose { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x140EA8BEBE036874)); + get => new CEntityIOOutputImpl(_Handle + _OnCloseOffset.Value); } + private static readonly Lazy _OnOpenOffset = new(() => Schema.GetOffset(0x140EA8BE109A2278), LazyThreadSafetyMode.None); + public CEntityIOOutput OnOpen { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x140EA8BE109A2278)); + get => new CEntityIOOutputImpl(_Handle + _OnOpenOffset.Value); } + private static readonly Lazy _OnLockedUseOffset = new(() => Schema.GetOffset(0x140EA8BEFD62B6A1), LazyThreadSafetyMode.None); + public CEntityIOOutput OnLockedUse { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x140EA8BEFD62B6A1)); + get => new CEntityIOOutputImpl(_Handle + _OnLockedUseOffset.Value); } + private static readonly Lazy _OnAjarOpenOffset = new(() => Schema.GetOffset(0x140EA8BE70F36224), LazyThreadSafetyMode.None); + public CEntityIOOutput OnAjarOpen { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x140EA8BE70F36224)); + get => new CEntityIOOutputImpl(_Handle + _OnAjarOpenOffset.Value); } public void DoorStateUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePropImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePropImpl.cs index 65883e937..1e810d292 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePropImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePropImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CBasePropImpl : CBaseAnimGraphImpl, CBaseProp { public CBasePropImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModelOverrodeBlockLOSOffset = new(() => Schema.GetOffset(0x14D39FA24CF7EDF1), LazyThreadSafetyMode.None); + public ref bool ModelOverrodeBlockLOS { - get => ref _Handle.AsRef(Schema.GetOffset(0x14D39FA24CF7EDF1)); + get => ref _Handle.AsRef(_ModelOverrodeBlockLOSOffset.Value); } + private static readonly Lazy _ShapeTypeOffset = new(() => Schema.GetOffset(0x14D39FA23BE42771), LazyThreadSafetyMode.None); + public ref int ShapeType { - get => ref _Handle.AsRef(Schema.GetOffset(0x14D39FA23BE42771)); + get => ref _Handle.AsRef(_ShapeTypeOffset.Value); } + private static readonly Lazy _ConformToCollisionBoundsOffset = new(() => Schema.GetOffset(0x14D39FA2A98E60A1), LazyThreadSafetyMode.None); + public ref bool ConformToCollisionBounds { - get => ref _Handle.AsRef(Schema.GetOffset(0x14D39FA2A98E60A1)); + get => ref _Handle.AsRef(_ConformToCollisionBoundsOffset.Value); } + private static readonly Lazy _MPreferredCatchTransformOffset = new(() => Schema.GetOffset(0x14D39FA2CC626070), LazyThreadSafetyMode.None); + public ref CTransform MPreferredCatchTransform { - get => ref _Handle.AsRef(Schema.GetOffset(0x14D39FA2CC626070)); + get => ref _Handle.AsRef(_MPreferredCatchTransformOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePulseGraphInstanceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePulseGraphInstanceImpl.cs index 2e14dbdaf..f9c0b25e3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePulseGraphInstanceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBasePulseGraphInstanceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseRendererSource2Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseRendererSource2Impl.cs index 077d715f1..c7148ee53 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseRendererSource2Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseRendererSource2Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,212 +17,342 @@ internal partial class CBaseRendererSource2Impl : CParticleFunctionRendererImpl, public CBaseRendererSource2Impl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0xA732A575A7A20159), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput RadiusScale { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A575A7A20159)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _RadiusScaleOffset.Value); } + private static readonly Lazy _AlphaScaleOffset = new(() => Schema.GetOffset(0xA732A575EC6D3C25), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput AlphaScale { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A575EC6D3C25)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _AlphaScaleOffset.Value); } + private static readonly Lazy _RollScaleOffset = new(() => Schema.GetOffset(0xA732A575F2113F72), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput RollScale { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A575F2113F72)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _RollScaleOffset.Value); } + private static readonly Lazy _Alpha2FieldOffset = new(() => Schema.GetOffset(0xA732A575F60EADC1), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t Alpha2Field { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xA732A575F60EADC1)); + get => new ParticleAttributeIndex_tImpl(_Handle + _Alpha2FieldOffset.Value); } + private static readonly Lazy _ColorScaleOffset = new(() => Schema.GetOffset(0xA732A5759F9BB8BA), LazyThreadSafetyMode.None); + public CParticleCollectionRendererVecInput ColorScale { - get => new CParticleCollectionRendererVecInputImpl(_Handle + Schema.GetOffset(0xA732A5759F9BB8BA)); + get => new CParticleCollectionRendererVecInputImpl(_Handle + _ColorScaleOffset.Value); } + private static readonly Lazy _ColorBlendTypeOffset = new(() => Schema.GetOffset(0xA732A575DBC6EFCF), LazyThreadSafetyMode.None); + public ref ParticleColorBlendType_t ColorBlendType { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A575DBC6EFCF)); + get => ref _Handle.AsRef(_ColorBlendTypeOffset.Value); } + private static readonly Lazy _ShaderTypeOffset = new(() => Schema.GetOffset(0xA732A57512186AAC), LazyThreadSafetyMode.None); + public ref SpriteCardShaderType_t ShaderType { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A57512186AAC)); + get => ref _Handle.AsRef(_ShaderTypeOffset.Value); } + private static readonly Lazy _StrShaderOverrideOffset = new(() => Schema.GetOffset(0xA732A575DB9D2E61), LazyThreadSafetyMode.None); + public string StrShaderOverride { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA732A575DB9D2E61)); + var ptr = _Handle.Read(_StrShaderOverrideOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA732A575DB9D2E61, value); + set => Schema.SetString(_Handle, _StrShaderOverrideOffset.Value, value); } + private static readonly Lazy _CenterXOffsetOffset = new(() => Schema.GetOffset(0xA732A5755E388DB9), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput CenterXOffset { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A5755E388DB9)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _CenterXOffsetOffset.Value); } + private static readonly Lazy _CenterYOffsetOffset = new(() => Schema.GetOffset(0xA732A575174B557E), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput CenterYOffset { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A575174B557E)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _CenterYOffsetOffset.Value); } + private static readonly Lazy _BumpStrengthOffset = new(() => Schema.GetOffset(0xA732A575CF5943B6), LazyThreadSafetyMode.None); + public ref float BumpStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A575CF5943B6)); + get => ref _Handle.AsRef(_BumpStrengthOffset.Value); } + private static readonly Lazy _CropTextureOverrideOffset = new(() => Schema.GetOffset(0xA732A575F1DF7F72), LazyThreadSafetyMode.None); + public ref ParticleSequenceCropOverride_t CropTextureOverride { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A575F1DF7F72)); + get => ref _Handle.AsRef(_CropTextureOverrideOffset.Value); } + private static readonly Lazy _TexturesInputOffset = new(() => Schema.GetOffset(0xA732A5759C246F7B), LazyThreadSafetyMode.None); + public ref CUtlLeanVector TexturesInput { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA732A5759C246F7B)); + get => ref _Handle.AsRef>(_TexturesInputOffset.Value); } + private static readonly Lazy _AnimationRateOffset = new(() => Schema.GetOffset(0xA732A575607083AD), LazyThreadSafetyMode.None); + public ref float AnimationRate { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A575607083AD)); + get => ref _Handle.AsRef(_AnimationRateOffset.Value); } + private static readonly Lazy _AnimationTypeOffset = new(() => Schema.GetOffset(0xA732A575B93FDFD1), LazyThreadSafetyMode.None); + public ref AnimationType_t AnimationType { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A575B93FDFD1)); + get => ref _Handle.AsRef(_AnimationTypeOffset.Value); } + private static readonly Lazy _AnimateInFPSOffset = new(() => Schema.GetOffset(0xA732A5757C271B16), LazyThreadSafetyMode.None); + public ref bool AnimateInFPS { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A5757C271B16)); + get => ref _Handle.AsRef(_AnimateInFPSOffset.Value); } + private static readonly Lazy _MotionVectorScaleUOffset = new(() => Schema.GetOffset(0xA732A575C6578D67), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput MotionVectorScaleU { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A575C6578D67)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _MotionVectorScaleUOffset.Value); } + private static readonly Lazy _MotionVectorScaleVOffset = new(() => Schema.GetOffset(0xA732A575C7578EFA), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput MotionVectorScaleV { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A575C7578EFA)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _MotionVectorScaleVOffset.Value); } + private static readonly Lazy _SelfIllumAmountOffset = new(() => Schema.GetOffset(0xA732A57567914AEA), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput SelfIllumAmount { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A57567914AEA)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _SelfIllumAmountOffset.Value); } + private static readonly Lazy _DiffuseAmountOffset = new(() => Schema.GetOffset(0xA732A5755D3E7ADB), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput DiffuseAmount { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A5755D3E7ADB)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _DiffuseAmountOffset.Value); } + private static readonly Lazy _DiffuseClampOffset = new(() => Schema.GetOffset(0xA732A57505150956), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput DiffuseClamp { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A57505150956)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _DiffuseClampOffset.Value); } + private static readonly Lazy _LightingControlPointOffset = new(() => Schema.GetOffset(0xA732A57575FC81F8), LazyThreadSafetyMode.None); + public ref int LightingControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A57575FC81F8)); + get => ref _Handle.AsRef(_LightingControlPointOffset.Value); } + private static readonly Lazy _SelfIllumPerParticleOffset = new(() => Schema.GetOffset(0xA732A57513479BAD), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t SelfIllumPerParticle { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xA732A57513479BAD)); + get => new ParticleAttributeIndex_tImpl(_Handle + _SelfIllumPerParticleOffset.Value); } + private static readonly Lazy _OutputBlendModeOffset = new(() => Schema.GetOffset(0xA732A575D966012C), LazyThreadSafetyMode.None); + public ref ParticleOutputBlendMode_t OutputBlendMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A575D966012C)); + get => ref _Handle.AsRef(_OutputBlendModeOffset.Value); } + private static readonly Lazy _GammaCorrectVertexColorsOffset = new(() => Schema.GetOffset(0xA732A575D7525C4E), LazyThreadSafetyMode.None); + public ref bool GammaCorrectVertexColors { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A575D7525C4E)); + get => ref _Handle.AsRef(_GammaCorrectVertexColorsOffset.Value); } + private static readonly Lazy _SaturateColorPreAlphaBlendOffset = new(() => Schema.GetOffset(0xA732A57566D1A423), LazyThreadSafetyMode.None); + public ref bool SaturateColorPreAlphaBlend { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A57566D1A423)); + get => ref _Handle.AsRef(_SaturateColorPreAlphaBlendOffset.Value); } + private static readonly Lazy _AddSelfAmountOffset = new(() => Schema.GetOffset(0xA732A575320867E0), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput AddSelfAmount { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A575320867E0)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _AddSelfAmountOffset.Value); } + private static readonly Lazy _DesaturationOffset = new(() => Schema.GetOffset(0xA732A575E9D4602C), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput Desaturation { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A575E9D4602C)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _DesaturationOffset.Value); } + private static readonly Lazy _OverbrightFactorOffset = new(() => Schema.GetOffset(0xA732A5755D81C136), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput OverbrightFactor { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A5755D81C136)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _OverbrightFactorOffset.Value); } + private static readonly Lazy _HSVShiftControlPointOffset = new(() => Schema.GetOffset(0xA732A5758848C01F), LazyThreadSafetyMode.None); + public ref int HSVShiftControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A5758848C01F)); + get => ref _Handle.AsRef(_HSVShiftControlPointOffset.Value); } + private static readonly Lazy _FogTypeOffset = new(() => Schema.GetOffset(0xA732A575381735D3), LazyThreadSafetyMode.None); + public ref ParticleFogType_t FogType { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A575381735D3)); + get => ref _Handle.AsRef(_FogTypeOffset.Value); } + private static readonly Lazy _FogAmountOffset = new(() => Schema.GetOffset(0xA732A5755F653F7D), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput FogAmount { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A5755F653F7D)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _FogAmountOffset.Value); } + private static readonly Lazy _TintByFOWOffset = new(() => Schema.GetOffset(0xA732A575B0996EB3), LazyThreadSafetyMode.None); + public ref bool TintByFOW { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A575B0996EB3)); + get => ref _Handle.AsRef(_TintByFOWOffset.Value); } + private static readonly Lazy _TintByGlobalLightOffset = new(() => Schema.GetOffset(0xA732A5750CE8D4E6), LazyThreadSafetyMode.None); + public ref bool TintByGlobalLight { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A5750CE8D4E6)); + get => ref _Handle.AsRef(_TintByGlobalLightOffset.Value); } + private static readonly Lazy _PerParticleAlphaReferenceOffset = new(() => Schema.GetOffset(0xA732A57583A25BA7), LazyThreadSafetyMode.None); + public ref SpriteCardPerParticleScale_t PerParticleAlphaReference { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A57583A25BA7)); + get => ref _Handle.AsRef(_PerParticleAlphaReferenceOffset.Value); } + private static readonly Lazy _PerParticleAlphaRefWindowOffset = new(() => Schema.GetOffset(0xA732A57504EE3223), LazyThreadSafetyMode.None); + public ref SpriteCardPerParticleScale_t PerParticleAlphaRefWindow { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A57504EE3223)); + get => ref _Handle.AsRef(_PerParticleAlphaRefWindowOffset.Value); } + private static readonly Lazy _AlphaReferenceTypeOffset = new(() => Schema.GetOffset(0xA732A57534D288AC), LazyThreadSafetyMode.None); + public ref ParticleAlphaReferenceType_t AlphaReferenceType { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A57534D288AC)); + get => ref _Handle.AsRef(_AlphaReferenceTypeOffset.Value); } + private static readonly Lazy _AlphaReferenceSoftnessOffset = new(() => Schema.GetOffset(0xA732A57511F07241), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput AlphaReferenceSoftness { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A57511F07241)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _AlphaReferenceSoftnessOffset.Value); } + private static readonly Lazy _SourceAlphaValueToMapToZeroOffset = new(() => Schema.GetOffset(0xA732A575831C1E67), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput SourceAlphaValueToMapToZero { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A575831C1E67)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _SourceAlphaValueToMapToZeroOffset.Value); } + private static readonly Lazy _SourceAlphaValueToMapToOneOffset = new(() => Schema.GetOffset(0xA732A575B40EE1B3), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput SourceAlphaValueToMapToOne { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A575B40EE1B3)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _SourceAlphaValueToMapToOneOffset.Value); } + private static readonly Lazy _RefractOffset = new(() => Schema.GetOffset(0xA732A57589DE613C), LazyThreadSafetyMode.None); + public ref bool Refract { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A57589DE613C)); + get => ref _Handle.AsRef(_RefractOffset.Value); } + private static readonly Lazy _RefractSolidOffset = new(() => Schema.GetOffset(0xA732A575136EF0D3), LazyThreadSafetyMode.None); + public ref bool RefractSolid { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A575136EF0D3)); + get => ref _Handle.AsRef(_RefractSolidOffset.Value); } + private static readonly Lazy _RefractAmountOffset = new(() => Schema.GetOffset(0xA732A575A649E3EE), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput RefractAmount { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A575A649E3EE)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _RefractAmountOffset.Value); } + private static readonly Lazy _RefractBlurRadiusOffset = new(() => Schema.GetOffset(0xA732A5750666EA9F), LazyThreadSafetyMode.None); + public ref int RefractBlurRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A5750666EA9F)); + get => ref _Handle.AsRef(_RefractBlurRadiusOffset.Value); } + private static readonly Lazy _RefractBlurTypeOffset = new(() => Schema.GetOffset(0xA732A575BD296B09), LazyThreadSafetyMode.None); + public ref BlurFilterType_t RefractBlurType { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A575BD296B09)); + get => ref _Handle.AsRef(_RefractBlurTypeOffset.Value); } + private static readonly Lazy _OnlyRenderInEffectsBloomPassOffset = new(() => Schema.GetOffset(0xA732A575D6FA0FBC), LazyThreadSafetyMode.None); + public ref bool OnlyRenderInEffectsBloomPass { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A575D6FA0FBC)); + get => ref _Handle.AsRef(_OnlyRenderInEffectsBloomPassOffset.Value); } + private static readonly Lazy _OnlyRenderInEffectsWaterPassOffset = new(() => Schema.GetOffset(0xA732A575111BB03C), LazyThreadSafetyMode.None); + public ref bool OnlyRenderInEffectsWaterPass { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A575111BB03C)); + get => ref _Handle.AsRef(_OnlyRenderInEffectsWaterPassOffset.Value); } + private static readonly Lazy _UseMixedResolutionRenderingOffset = new(() => Schema.GetOffset(0xA732A5758C2B17B7), LazyThreadSafetyMode.None); + public ref bool UseMixedResolutionRendering { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A5758C2B17B7)); + get => ref _Handle.AsRef(_UseMixedResolutionRenderingOffset.Value); } + private static readonly Lazy _OnlyRenderInEffecsGameOverlayOffset = new(() => Schema.GetOffset(0xA732A5750293C80E), LazyThreadSafetyMode.None); + public ref bool OnlyRenderInEffecsGameOverlay { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A5750293C80E)); + get => ref _Handle.AsRef(_OnlyRenderInEffecsGameOverlayOffset.Value); } + private static readonly Lazy _StencilTestIDOffset = new(() => Schema.GetOffset(0xA732A575115C996A), LazyThreadSafetyMode.None); + public string StencilTestID { get { - var ptr = _Handle + Schema.GetOffset(0xA732A575115C996A); + var ptr = _Handle + _StencilTestIDOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xA732A575115C996A, value, 128); + set => Schema.SetFixedString(_Handle, _StencilTestIDOffset.Value, value, 128); } + private static readonly Lazy _StencilTestExcludeOffset = new(() => Schema.GetOffset(0xA732A57584BFB66B), LazyThreadSafetyMode.None); + public ref bool StencilTestExclude { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A57584BFB66B)); + get => ref _Handle.AsRef(_StencilTestExcludeOffset.Value); } + private static readonly Lazy _StencilWriteIDOffset = new(() => Schema.GetOffset(0xA732A5758FB6505B), LazyThreadSafetyMode.None); + public string StencilWriteID { get { - var ptr = _Handle + Schema.GetOffset(0xA732A5758FB6505B); + var ptr = _Handle + _StencilWriteIDOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xA732A5758FB6505B, value, 128); + set => Schema.SetFixedString(_Handle, _StencilWriteIDOffset.Value, value, 128); } + private static readonly Lazy _WriteStencilOnDepthPassOffset = new(() => Schema.GetOffset(0xA732A575016CB7AF), LazyThreadSafetyMode.None); + public ref bool WriteStencilOnDepthPass { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A575016CB7AF)); + get => ref _Handle.AsRef(_WriteStencilOnDepthPassOffset.Value); } + private static readonly Lazy _WriteStencilOnDepthFailOffset = new(() => Schema.GetOffset(0xA732A575AEF0A1FE), LazyThreadSafetyMode.None); + public ref bool WriteStencilOnDepthFail { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A575AEF0A1FE)); + get => ref _Handle.AsRef(_WriteStencilOnDepthFailOffset.Value); } + private static readonly Lazy _ReverseZBufferingOffset = new(() => Schema.GetOffset(0xA732A575256F9FB5), LazyThreadSafetyMode.None); + public ref bool ReverseZBuffering { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A575256F9FB5)); + get => ref _Handle.AsRef(_ReverseZBufferingOffset.Value); } + private static readonly Lazy _DisableZBufferingOffset = new(() => Schema.GetOffset(0xA732A5754AA2BB4F), LazyThreadSafetyMode.None); + public ref bool DisableZBuffering { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A5754AA2BB4F)); + get => ref _Handle.AsRef(_DisableZBufferingOffset.Value); } + private static readonly Lazy _FeatheringModeOffset = new(() => Schema.GetOffset(0xA732A5759C2E72DF), LazyThreadSafetyMode.None); + public ref ParticleDepthFeatheringMode_t FeatheringMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A5759C2E72DF)); + get => ref _Handle.AsRef(_FeatheringModeOffset.Value); } + private static readonly Lazy _FeatheringMinDistOffset = new(() => Schema.GetOffset(0xA732A575914C2A42), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput FeatheringMinDist { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A575914C2A42)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _FeatheringMinDistOffset.Value); } + private static readonly Lazy _FeatheringMaxDistOffset = new(() => Schema.GetOffset(0xA732A575DB46DE3C), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput FeatheringMaxDist { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A575DB46DE3C)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _FeatheringMaxDistOffset.Value); } + private static readonly Lazy _FeatheringFilterOffset = new(() => Schema.GetOffset(0xA732A575E4FA3CA4), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput FeatheringFilter { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A575E4FA3CA4)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _FeatheringFilterOffset.Value); } + private static readonly Lazy _FeatheringDepthMapFilterOffset = new(() => Schema.GetOffset(0xA732A575D0940CBD), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput FeatheringDepthMapFilter { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A575D0940CBD)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _FeatheringDepthMapFilterOffset.Value); } + private static readonly Lazy _DepthBiasOffset = new(() => Schema.GetOffset(0xA732A5752E72BBFD), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput DepthBias { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xA732A5752E72BBFD)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _DepthBiasOffset.Value); } + private static readonly Lazy _SortMethodOffset = new(() => Schema.GetOffset(0xA732A5759540F498), LazyThreadSafetyMode.None); + public ref ParticleSortingChoiceList_t SortMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A5759540F498)); + get => ref _Handle.AsRef(_SortMethodOffset.Value); } + private static readonly Lazy _BlendFramesSeq0Offset = new(() => Schema.GetOffset(0xA732A57505041FEB), LazyThreadSafetyMode.None); + public ref bool BlendFramesSeq0 { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A57505041FEB)); + get => ref _Handle.AsRef(_BlendFramesSeq0Offset.Value); } + private static readonly Lazy _MaxLuminanceBlendingSequence0Offset = new(() => Schema.GetOffset(0xA732A5751E409BEF), LazyThreadSafetyMode.None); + public ref bool MaxLuminanceBlendingSequence0 { - get => ref _Handle.AsRef(Schema.GetOffset(0xA732A5751E409BEF)); + get => ref _Handle.AsRef(_MaxLuminanceBlendingSequence0Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseToggleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseToggleImpl.cs index a66b7b9a4..2c09d675d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseToggleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseToggleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,57 +17,89 @@ internal partial class CBaseToggleImpl : CBaseModelEntityImpl, CBaseToggle { public CBaseToggleImpl(nint handle) : base(handle) { } + private static readonly Lazy _Toggle_stateOffset = new(() => Schema.GetOffset(0xC466ACE3FAACDE93), LazyThreadSafetyMode.None); + public ref TOGGLE_STATE Toggle_state { - get => ref _Handle.AsRef(Schema.GetOffset(0xC466ACE3FAACDE93)); + get => ref _Handle.AsRef(_Toggle_stateOffset.Value); } + private static readonly Lazy _MoveDistanceOffset = new(() => Schema.GetOffset(0xC466ACE3C39E6D6D), LazyThreadSafetyMode.None); + public ref float MoveDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xC466ACE3C39E6D6D)); + get => ref _Handle.AsRef(_MoveDistanceOffset.Value); } + private static readonly Lazy _WaitOffset = new(() => Schema.GetOffset(0xC466ACE399A062B6), LazyThreadSafetyMode.None); + public ref float Wait { - get => ref _Handle.AsRef(Schema.GetOffset(0xC466ACE399A062B6)); + get => ref _Handle.AsRef(_WaitOffset.Value); } + private static readonly Lazy _LipOffset = new(() => Schema.GetOffset(0xC466ACE387D40000), LazyThreadSafetyMode.None); + public ref float Lip { - get => ref _Handle.AsRef(Schema.GetOffset(0xC466ACE387D40000)); + get => ref _Handle.AsRef(_LipOffset.Value); } + private static readonly Lazy _AlwaysFireBlockedOutputsOffset = new(() => Schema.GetOffset(0xC466ACE3785EA7AA), LazyThreadSafetyMode.None); + public ref bool AlwaysFireBlockedOutputs { - get => ref _Handle.AsRef(Schema.GetOffset(0xC466ACE3785EA7AA)); + get => ref _Handle.AsRef(_AlwaysFireBlockedOutputsOffset.Value); } + private static readonly Lazy _Position1Offset = new(() => Schema.GetOffset(0xC466ACE3E24D3941), LazyThreadSafetyMode.None); + public ref Vector Position1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xC466ACE3E24D3941)); + get => ref _Handle.AsRef(_Position1Offset.Value); } + private static readonly Lazy _Position2Offset = new(() => Schema.GetOffset(0xC466ACE3DF4D3488), LazyThreadSafetyMode.None); + public ref Vector Position2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xC466ACE3DF4D3488)); + get => ref _Handle.AsRef(_Position2Offset.Value); } + private static readonly Lazy _MoveAngOffset = new(() => Schema.GetOffset(0xC466ACE3BC6F7E1C), LazyThreadSafetyMode.None); + public ref QAngle MoveAng { - get => ref _Handle.AsRef(Schema.GetOffset(0xC466ACE3BC6F7E1C)); + get => ref _Handle.AsRef(_MoveAngOffset.Value); } + private static readonly Lazy _Angle1Offset = new(() => Schema.GetOffset(0xC466ACE3D44B3E6B), LazyThreadSafetyMode.None); + public ref QAngle Angle1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xC466ACE3D44B3E6B)); + get => ref _Handle.AsRef(_Angle1Offset.Value); } + private static readonly Lazy _Angle2Offset = new(() => Schema.GetOffset(0xC466ACE3D54B3FFE), LazyThreadSafetyMode.None); + public ref QAngle Angle2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xC466ACE3D54B3FFE)); + get => ref _Handle.AsRef(_Angle2Offset.Value); } + private static readonly Lazy _HeightOffset = new(() => Schema.GetOffset(0xC466ACE3EADD7FB0), LazyThreadSafetyMode.None); + public ref float Height { - get => ref _Handle.AsRef(Schema.GetOffset(0xC466ACE3EADD7FB0)); + get => ref _Handle.AsRef(_HeightOffset.Value); } + private static readonly Lazy _ActivatorOffset = new(() => Schema.GetOffset(0xC466ACE3AB093BB2), LazyThreadSafetyMode.None); + public ref CHandle Activator { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC466ACE3AB093BB2)); + get => ref _Handle.AsRef>(_ActivatorOffset.Value); } + private static readonly Lazy _FinalDestOffset = new(() => Schema.GetOffset(0xC466ACE35F250E93), LazyThreadSafetyMode.None); + public ref Vector FinalDest { - get => ref _Handle.AsRef(Schema.GetOffset(0xC466ACE35F250E93)); + get => ref _Handle.AsRef(_FinalDestOffset.Value); } + private static readonly Lazy _FinalAngleOffset = new(() => Schema.GetOffset(0xC466ACE32866F31E), LazyThreadSafetyMode.None); + public ref QAngle FinalAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0xC466ACE32866F31E)); + get => ref _Handle.AsRef(_FinalAngleOffset.Value); } + private static readonly Lazy _MovementTypeOffset = new(() => Schema.GetOffset(0xC466ACE37CE1B710), LazyThreadSafetyMode.None); + public ref int MovementType { - get => ref _Handle.AsRef(Schema.GetOffset(0xC466ACE37CE1B710)); + get => ref _Handle.AsRef(_MovementTypeOffset.Value); } + private static readonly Lazy _MasterOffset = new(() => Schema.GetOffset(0xC466ACE389DC0AE0), LazyThreadSafetyMode.None); + public string Master { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC466ACE389DC0AE0)); + var ptr = _Handle.Read(_MasterOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xC466ACE389DC0AE0, value); + set => Schema.SetString(_Handle, _MasterOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseTrailRendererImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseTrailRendererImpl.cs index 18a34b8a7..c7e1acfd9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseTrailRendererImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseTrailRendererImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CBaseTrailRendererImpl : CBaseRendererSource2Impl, CBaseT public CBaseTrailRendererImpl(nint handle) : base(handle) { } + private static readonly Lazy _OrientationTypeOffset = new(() => Schema.GetOffset(0x2FCF7FA6931FA045), LazyThreadSafetyMode.None); + public ref ParticleOrientationChoiceList_t OrientationType { - get => ref _Handle.AsRef(Schema.GetOffset(0x2FCF7FA6931FA045)); + get => ref _Handle.AsRef(_OrientationTypeOffset.Value); } + private static readonly Lazy _OrientationControlPointOffset = new(() => Schema.GetOffset(0x2FCF7FA655B5B328), LazyThreadSafetyMode.None); + public ref int OrientationControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x2FCF7FA655B5B328)); + get => ref _Handle.AsRef(_OrientationControlPointOffset.Value); } + private static readonly Lazy _MinSizeOffset = new(() => Schema.GetOffset(0x2FCF7FA6BDC3B198), LazyThreadSafetyMode.None); + public ref float MinSize { - get => ref _Handle.AsRef(Schema.GetOffset(0x2FCF7FA6BDC3B198)); + get => ref _Handle.AsRef(_MinSizeOffset.Value); } + private static readonly Lazy _MaxSizeOffset = new(() => Schema.GetOffset(0x2FCF7FA68CA4E6BE), LazyThreadSafetyMode.None); + public ref float MaxSize { - get => ref _Handle.AsRef(Schema.GetOffset(0x2FCF7FA68CA4E6BE)); + get => ref _Handle.AsRef(_MaxSizeOffset.Value); } + private static readonly Lazy _StartFadeSizeOffset = new(() => Schema.GetOffset(0x2FCF7FA6BA251D92), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput StartFadeSize { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x2FCF7FA6BA251D92)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _StartFadeSizeOffset.Value); } + private static readonly Lazy _EndFadeSizeOffset = new(() => Schema.GetOffset(0x2FCF7FA62D3FD423), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput EndFadeSize { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x2FCF7FA62D3FD423)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _EndFadeSizeOffset.Value); } + private static readonly Lazy _ClampVOffset = new(() => Schema.GetOffset(0x2FCF7FA6D02C13FE), LazyThreadSafetyMode.None); + public ref bool ClampV { - get => ref _Handle.AsRef(Schema.GetOffset(0x2FCF7FA6D02C13FE)); + get => ref _Handle.AsRef(_ClampVOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseTriggerAPIImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseTriggerAPIImpl.cs index cb9281761..81992090d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseTriggerAPIImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseTriggerAPIImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseTriggerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseTriggerImpl.cs index 777f214b5..54b6f0966 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseTriggerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBaseTriggerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,45 +17,69 @@ internal partial class CBaseTriggerImpl : CBaseToggleImpl, CBaseTrigger { public CBaseTriggerImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnStartTouchOffset = new(() => Schema.GetOffset(0x96DE10B1B4E38193), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStartTouch { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x96DE10B1B4E38193)); + get => new CEntityIOOutputImpl(_Handle + _OnStartTouchOffset.Value); } + private static readonly Lazy _OnStartTouchAllOffset = new(() => Schema.GetOffset(0x96DE10B1BE1133C6), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStartTouchAll { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x96DE10B1BE1133C6)); + get => new CEntityIOOutputImpl(_Handle + _OnStartTouchAllOffset.Value); } + private static readonly Lazy _OnEndTouchOffset = new(() => Schema.GetOffset(0x96DE10B15D181B48), LazyThreadSafetyMode.None); + public CEntityIOOutput OnEndTouch { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x96DE10B15D181B48)); + get => new CEntityIOOutputImpl(_Handle + _OnEndTouchOffset.Value); } + private static readonly Lazy _OnEndTouchAllOffset = new(() => Schema.GetOffset(0x96DE10B1A5526E0B), LazyThreadSafetyMode.None); + public CEntityIOOutput OnEndTouchAll { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x96DE10B1A5526E0B)); + get => new CEntityIOOutputImpl(_Handle + _OnEndTouchAllOffset.Value); } + private static readonly Lazy _OnTouchingOffset = new(() => Schema.GetOffset(0x96DE10B1CD69EB01), LazyThreadSafetyMode.None); + public CEntityIOOutput OnTouching { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x96DE10B1CD69EB01)); + get => new CEntityIOOutputImpl(_Handle + _OnTouchingOffset.Value); } + private static readonly Lazy _OnTouchingEachEntityOffset = new(() => Schema.GetOffset(0x96DE10B1CBC29227), LazyThreadSafetyMode.None); + public CEntityIOOutput OnTouchingEachEntity { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x96DE10B1CBC29227)); + get => new CEntityIOOutputImpl(_Handle + _OnTouchingEachEntityOffset.Value); } + private static readonly Lazy _OnNotTouchingOffset = new(() => Schema.GetOffset(0x96DE10B19603AF34), LazyThreadSafetyMode.None); + public CEntityIOOutput OnNotTouching { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x96DE10B19603AF34)); + get => new CEntityIOOutputImpl(_Handle + _OnNotTouchingOffset.Value); } + private static readonly Lazy _TouchingEntitiesOffset = new(() => Schema.GetOffset(0x96DE10B1070A5E2D), LazyThreadSafetyMode.None); + public ref CUtlVector> TouchingEntities { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x96DE10B1070A5E2D)); + get => ref _Handle.AsRef>>(_TouchingEntitiesOffset.Value); } + private static readonly Lazy _FilterNameOffset = new(() => Schema.GetOffset(0x96DE10B109C86445), LazyThreadSafetyMode.None); + public string FilterName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x96DE10B109C86445)); + var ptr = _Handle.Read(_FilterNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x96DE10B109C86445, value); + set => Schema.SetString(_Handle, _FilterNameOffset.Value, value); } + private static readonly Lazy _FilterOffset = new(() => Schema.GetOffset(0x96DE10B145D9E0B1), LazyThreadSafetyMode.None); + public ref CHandle Filter { - get => ref _Handle.AsRef>(Schema.GetOffset(0x96DE10B145D9E0B1)); + get => ref _Handle.AsRef>(_FilterOffset.Value); } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x96DE10B13A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x96DE10B13A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _UseAsyncQueriesOffset = new(() => Schema.GetOffset(0x96DE10B1DDD8EB18), LazyThreadSafetyMode.None); + public ref bool UseAsyncQueries { - get => ref _Handle.AsRef(Schema.GetOffset(0x96DE10B1DDD8EB18)); + get => ref _Handle.AsRef(_UseAsyncQueriesOffset.Value); } public void DisabledUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBeamImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBeamImpl.cs index 63098630d..b40237b4f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBeamImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBeamImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,77 +17,123 @@ internal partial class CBeamImpl : CBaseModelEntityImpl, CBeam { public CBeamImpl(nint handle) : base(handle) { } + private static readonly Lazy _FrameRateOffset = new(() => Schema.GetOffset(0x4BCF3CE574BE5A46), LazyThreadSafetyMode.None); + public ref float FrameRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BCF3CE574BE5A46)); + get => ref _Handle.AsRef(_FrameRateOffset.Value); } + private static readonly Lazy _HDRColorScaleOffset = new(() => Schema.GetOffset(0x4BCF3CE5C930B3E8), LazyThreadSafetyMode.None); + public ref float HDRColorScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BCF3CE5C930B3E8)); + get => ref _Handle.AsRef(_HDRColorScaleOffset.Value); } + private static readonly Lazy _FireTimeOffset = new(() => Schema.GetOffset(0x4BCF3CE5873CD172), LazyThreadSafetyMode.None); + public GameTime_t FireTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x4BCF3CE5873CD172)); + get => new GameTime_tImpl(_Handle + _FireTimeOffset.Value); } + private static readonly Lazy _DamageOffset = new(() => Schema.GetOffset(0x4BCF3CE5DC60E53E), LazyThreadSafetyMode.None); + public ref float Damage { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BCF3CE5DC60E53E)); + get => ref _Handle.AsRef(_DamageOffset.Value); } + private static readonly Lazy _NumBeamEntsOffset = new(() => Schema.GetOffset(0x4BCF3CE5D7D7CDFA), LazyThreadSafetyMode.None); + public ref byte NumBeamEnts { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BCF3CE5D7D7CDFA)); + get => ref _Handle.AsRef(_NumBeamEntsOffset.Value); } + private static readonly Lazy _BaseMaterialOffset = new(() => Schema.GetOffset(0x4BCF3CE55B164FBF), LazyThreadSafetyMode.None); + public ref CStrongHandle BaseMaterial { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4BCF3CE55B164FBF)); + get => ref _Handle.AsRef>(_BaseMaterialOffset.Value); } + private static readonly Lazy _HaloIndexOffset = new(() => Schema.GetOffset(0x4BCF3CE5F6B595E1), LazyThreadSafetyMode.None); + public ref CStrongHandle HaloIndex { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4BCF3CE5F6B595E1)); + get => ref _Handle.AsRef>(_HaloIndexOffset.Value); } + private static readonly Lazy _BeamTypeOffset = new(() => Schema.GetOffset(0x4BCF3CE5E65D2926), LazyThreadSafetyMode.None); + public ref BeamType_t BeamType { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BCF3CE5E65D2926)); + get => ref _Handle.AsRef(_BeamTypeOffset.Value); } + private static readonly Lazy _BeamFlagsOffset = new(() => Schema.GetOffset(0x4BCF3CE5BB875091), LazyThreadSafetyMode.None); + public ref uint BeamFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BCF3CE5BB875091)); + get => ref _Handle.AsRef(_BeamFlagsOffset.Value); } public ISchemaFixedArray> AttachEntity { get => new SchemaFixedArray>(_Handle, 0x4BCF3CE56BCDCAD1, 10, 4, 4); } + private static readonly Lazy _AttachIndexOffset = new(() => Schema.GetOffset(0x4BCF3CE5502E5BEC), LazyThreadSafetyMode.None); + public SchemaUntypedField AttachIndex { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x4BCF3CE5502E5BEC)); + get => new SchemaUntypedField(_Handle + _AttachIndexOffset.Value); } + private static readonly Lazy _WidthOffset = new(() => Schema.GetOffset(0x4BCF3CE55A6716D3), LazyThreadSafetyMode.None); + public ref float Width { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BCF3CE55A6716D3)); + get => ref _Handle.AsRef(_WidthOffset.Value); } + private static readonly Lazy _EndWidthOffset = new(() => Schema.GetOffset(0x4BCF3CE531E2A13A), LazyThreadSafetyMode.None); + public ref float EndWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BCF3CE531E2A13A)); + get => ref _Handle.AsRef(_EndWidthOffset.Value); } + private static readonly Lazy _FadeLengthOffset = new(() => Schema.GetOffset(0x4BCF3CE5BDBE91AF), LazyThreadSafetyMode.None); + public ref float FadeLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BCF3CE5BDBE91AF)); + get => ref _Handle.AsRef(_FadeLengthOffset.Value); } + private static readonly Lazy _HaloScaleOffset = new(() => Schema.GetOffset(0x4BCF3CE5E01B893B), LazyThreadSafetyMode.None); + public ref float HaloScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BCF3CE5E01B893B)); + get => ref _Handle.AsRef(_HaloScaleOffset.Value); } + private static readonly Lazy _AmplitudeOffset = new(() => Schema.GetOffset(0x4BCF3CE56B89E71E), LazyThreadSafetyMode.None); + public ref float Amplitude { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BCF3CE56B89E71E)); + get => ref _Handle.AsRef(_AmplitudeOffset.Value); } + private static readonly Lazy _StartFrameOffset = new(() => Schema.GetOffset(0x4BCF3CE5EE6DF5C0), LazyThreadSafetyMode.None); + public ref float StartFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BCF3CE5EE6DF5C0)); + get => ref _Handle.AsRef(_StartFrameOffset.Value); } + private static readonly Lazy _SpeedOffset = new(() => Schema.GetOffset(0x4BCF3CE5288671E4), LazyThreadSafetyMode.None); + public ref float Speed { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BCF3CE5288671E4)); + get => ref _Handle.AsRef(_SpeedOffset.Value); } + private static readonly Lazy _FrameOffset = new(() => Schema.GetOffset(0x4BCF3CE5F836C9F4), LazyThreadSafetyMode.None); + public ref float Frame { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BCF3CE5F836C9F4)); + get => ref _Handle.AsRef(_FrameOffset.Value); } + private static readonly Lazy _ClipStyleOffset = new(() => Schema.GetOffset(0x4BCF3CE51A311350), LazyThreadSafetyMode.None); + public ref BeamClipStyle_t ClipStyle { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BCF3CE51A311350)); + get => ref _Handle.AsRef(_ClipStyleOffset.Value); } + private static readonly Lazy _TurnedOffOffset = new(() => Schema.GetOffset(0x4BCF3CE5EC469948), LazyThreadSafetyMode.None); + public ref bool TurnedOff { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BCF3CE5EC469948)); + get => ref _Handle.AsRef(_TurnedOffOffset.Value); } + private static readonly Lazy _EndPosOffset = new(() => Schema.GetOffset(0x4BCF3CE58DD24760), LazyThreadSafetyMode.None); + public ref Vector EndPos { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BCF3CE58DD24760)); + get => ref _Handle.AsRef(_EndPosOffset.Value); } + private static readonly Lazy _EndEntityOffset = new(() => Schema.GetOffset(0x4BCF3CE561070A9F), LazyThreadSafetyMode.None); + public ref CHandle EndEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4BCF3CE561070A9F)); + get => ref _Handle.AsRef>(_EndEntityOffset.Value); } + private static readonly Lazy _DissolveTypeOffset = new(() => Schema.GetOffset(0x4BCF3CE579AB525E), LazyThreadSafetyMode.None); + public ref int DissolveType { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BCF3CE579AB525E)); + get => ref _Handle.AsRef(_DissolveTypeOffset.Value); } public void FrameRateUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBinaryUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBinaryUpdateNodeImpl.cs index 4f94ae2d8..5d6b545f5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBinaryUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBinaryUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CBinaryUpdateNodeImpl : CAnimUpdateNodeBaseImpl, CBinaryU public CBinaryUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _Child1Offset = new(() => Schema.GetOffset(0xA1CFA91E9E0C6B0A), LazyThreadSafetyMode.None); + public CAnimUpdateNodeRef Child1 { - get => new CAnimUpdateNodeRefImpl(_Handle + Schema.GetOffset(0xA1CFA91E9E0C6B0A)); + get => new CAnimUpdateNodeRefImpl(_Handle + _Child1Offset.Value); } + private static readonly Lazy _Child2Offset = new(() => Schema.GetOffset(0xA1CFA91E9D0C6977), LazyThreadSafetyMode.None); + public CAnimUpdateNodeRef Child2 { - get => new CAnimUpdateNodeRefImpl(_Handle + Schema.GetOffset(0xA1CFA91E9D0C6977)); + get => new CAnimUpdateNodeRefImpl(_Handle + _Child2Offset.Value); } + private static readonly Lazy _TimingBehaviorOffset = new(() => Schema.GetOffset(0xA1CFA91EF9A9BA01), LazyThreadSafetyMode.None); + public ref BinaryNodeTiming TimingBehavior { - get => ref _Handle.AsRef(Schema.GetOffset(0xA1CFA91EF9A9BA01)); + get => ref _Handle.AsRef(_TimingBehaviorOffset.Value); } + private static readonly Lazy _TimingBlendOffset = new(() => Schema.GetOffset(0xA1CFA91E884E1874), LazyThreadSafetyMode.None); + public ref float TimingBlend { - get => ref _Handle.AsRef(Schema.GetOffset(0xA1CFA91E884E1874)); + get => ref _Handle.AsRef(_TimingBlendOffset.Value); } + private static readonly Lazy _ResetChild1Offset = new(() => Schema.GetOffset(0xA1CFA91EC7FAEC85), LazyThreadSafetyMode.None); + public ref bool ResetChild1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xA1CFA91EC7FAEC85)); + get => ref _Handle.AsRef(_ResetChild1Offset.Value); } + private static readonly Lazy _ResetChild2Offset = new(() => Schema.GetOffset(0xA1CFA91EC4FAE7CC), LazyThreadSafetyMode.None); + public ref bool ResetChild2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xA1CFA91EC4FAE7CC)); + get => ref _Handle.AsRef(_ResetChild2Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBindPoseUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBindPoseUpdateNodeImpl.cs index 171ebabb9..ff8960fcf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBindPoseUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBindPoseUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBlend2DUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBlend2DUpdateNodeImpl.cs index 78dbd0428..8a02ed348 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBlend2DUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBlend2DUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,50 +17,80 @@ internal partial class CBlend2DUpdateNodeImpl : CAnimUpdateNodeBaseImpl, CBlend2 public CBlend2DUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _ItemsOffset = new(() => Schema.GetOffset(0xEA40B5A7A87EDAF), LazyThreadSafetyMode.None); + public ref CUtlVector Items { - get => ref _Handle.AsRef>(Schema.GetOffset(0xEA40B5A7A87EDAF)); + get => ref _Handle.AsRef>(_ItemsOffset.Value); } + private static readonly Lazy _TagsOffset = new(() => Schema.GetOffset(0xEA40B5AB46C8540), LazyThreadSafetyMode.None); + public ref CUtlVector Tags { - get => ref _Handle.AsRef>(Schema.GetOffset(0xEA40B5AB46C8540)); + get => ref _Handle.AsRef>(_TagsOffset.Value); } + private static readonly Lazy _ParamSpansOffset = new(() => Schema.GetOffset(0xEA40B5ADAC91553), LazyThreadSafetyMode.None); + public CParamSpanUpdater ParamSpans { - get => new CParamSpanUpdaterImpl(_Handle + Schema.GetOffset(0xEA40B5ADAC91553)); + get => new CParamSpanUpdaterImpl(_Handle + _ParamSpansOffset.Value); } + private static readonly Lazy _NodeItemIndicesOffset = new(() => Schema.GetOffset(0xEA40B5AE050EB13), LazyThreadSafetyMode.None); + public ref CUtlVector NodeItemIndices { - get => ref _Handle.AsRef>(Schema.GetOffset(0xEA40B5AE050EB13)); + get => ref _Handle.AsRef>(_NodeItemIndicesOffset.Value); } + private static readonly Lazy _DampingOffset = new(() => Schema.GetOffset(0xEA40B5A15440FB5), LazyThreadSafetyMode.None); + public CAnimInputDamping Damping { - get => new CAnimInputDampingImpl(_Handle + Schema.GetOffset(0xEA40B5A15440FB5)); + get => new CAnimInputDampingImpl(_Handle + _DampingOffset.Value); } + private static readonly Lazy _BlendSourceXOffset = new(() => Schema.GetOffset(0xEA40B5A6AABD08F), LazyThreadSafetyMode.None); + public ref AnimValueSource BlendSourceX { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA40B5A6AABD08F)); + get => ref _Handle.AsRef(_BlendSourceXOffset.Value); } + private static readonly Lazy _ParamXOffset = new(() => Schema.GetOffset(0xEA40B5A4D0E84BE), LazyThreadSafetyMode.None); + public CAnimParamHandle ParamX { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xEA40B5A4D0E84BE)); + get => new CAnimParamHandleImpl(_Handle + _ParamXOffset.Value); } + private static readonly Lazy _BlendSourceYOffset = new(() => Schema.GetOffset(0xEA40B5A69ABCEFC), LazyThreadSafetyMode.None); + public ref AnimValueSource BlendSourceY { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA40B5A69ABCEFC)); + get => ref _Handle.AsRef(_BlendSourceYOffset.Value); } + private static readonly Lazy _ParamYOffset = new(() => Schema.GetOffset(0xEA40B5A4E0E8651), LazyThreadSafetyMode.None); + public CAnimParamHandle ParamY { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xEA40B5A4E0E8651)); + get => new CAnimParamHandleImpl(_Handle + _ParamYOffset.Value); } + private static readonly Lazy _BlendModeOffset = new(() => Schema.GetOffset(0xEA40B5ADBED6224), LazyThreadSafetyMode.None); + public ref Blend2DMode BlendMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA40B5ADBED6224)); + get => ref _Handle.AsRef(_BlendModeOffset.Value); } + private static readonly Lazy _PlaybackSpeedOffset = new(() => Schema.GetOffset(0xEA40B5A1AFA7387), LazyThreadSafetyMode.None); + public ref float PlaybackSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA40B5A1AFA7387)); + get => ref _Handle.AsRef(_PlaybackSpeedOffset.Value); } + private static readonly Lazy _LoopOffset = new(() => Schema.GetOffset(0xEA40B5AC668A4CB), LazyThreadSafetyMode.None); + public ref bool Loop { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA40B5AC668A4CB)); + get => ref _Handle.AsRef(_LoopOffset.Value); } + private static readonly Lazy _LockBlendOnResetOffset = new(() => Schema.GetOffset(0xEA40B5A76334223), LazyThreadSafetyMode.None); + public ref bool LockBlendOnReset { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA40B5A76334223)); + get => ref _Handle.AsRef(_LockBlendOnResetOffset.Value); } + private static readonly Lazy _LockWhenWaningOffset = new(() => Schema.GetOffset(0xEA40B5AEED48004), LazyThreadSafetyMode.None); + public ref bool LockWhenWaning { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA40B5AEED48004)); + get => ref _Handle.AsRef(_LockWhenWaningOffset.Value); } + private static readonly Lazy _AnimEventsAndTagsOnMostWeightedOnlyOffset = new(() => Schema.GetOffset(0xEA40B5AB97E1262), LazyThreadSafetyMode.None); + public ref bool AnimEventsAndTagsOnMostWeightedOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA40B5AB97E1262)); + get => ref _Handle.AsRef(_AnimEventsAndTagsOnMostWeightedOnlyOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBlendCurveImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBlendCurveImpl.cs index a63f6ac95..40f4d7a60 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBlendCurveImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBlendCurveImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CBlendCurveImpl : SchemaClass, CBlendCurve { public CBlendCurveImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPoint1Offset = new(() => Schema.GetOffset(0x837A0008CD928165), LazyThreadSafetyMode.None); + public ref float ControlPoint1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x837A0008CD928165)); + get => ref _Handle.AsRef(_ControlPoint1Offset.Value); } + private static readonly Lazy _ControlPoint2Offset = new(() => Schema.GetOffset(0x837A0008CA927CAC), LazyThreadSafetyMode.None); + public ref float ControlPoint2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x837A0008CA927CAC)); + get => ref _Handle.AsRef(_ControlPoint2Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBlendUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBlendUpdateNodeImpl.cs index 112b08a62..a610706a9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBlendUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBlendUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,70 @@ internal partial class CBlendUpdateNodeImpl : CAnimUpdateNodeBaseImpl, CBlendUpd public CBlendUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildrenOffset = new(() => Schema.GetOffset(0xD72498B47415FA72), LazyThreadSafetyMode.None); + public ref CUtlVector Children { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD72498B47415FA72)); + get => ref _Handle.AsRef>(_ChildrenOffset.Value); } + private static readonly Lazy _SortedOrderOffset = new(() => Schema.GetOffset(0xD72498B47CE82340), LazyThreadSafetyMode.None); + public ref CUtlVector SortedOrder { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD72498B47CE82340)); + get => ref _Handle.AsRef>(_SortedOrderOffset.Value); } + private static readonly Lazy _TargetValuesOffset = new(() => Schema.GetOffset(0xD72498B4913AEBFE), LazyThreadSafetyMode.None); + public ref CUtlVector TargetValues { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD72498B4913AEBFE)); + get => ref _Handle.AsRef>(_TargetValuesOffset.Value); } + private static readonly Lazy _BlendValueSourceOffset = new(() => Schema.GetOffset(0xD72498B47AB7C374), LazyThreadSafetyMode.None); + public ref AnimValueSource BlendValueSource { - get => ref _Handle.AsRef(Schema.GetOffset(0xD72498B47AB7C374)); + get => ref _Handle.AsRef(_BlendValueSourceOffset.Value); } + private static readonly Lazy _LinearRootMotionBlendModeOffset = new(() => Schema.GetOffset(0xD72498B4580BA151), LazyThreadSafetyMode.None); + public ref LinearRootMotionBlendMode_t LinearRootMotionBlendMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xD72498B4580BA151)); + get => ref _Handle.AsRef(_LinearRootMotionBlendModeOffset.Value); } + private static readonly Lazy _ParamIndexOffset = new(() => Schema.GetOffset(0xD72498B461990A86), LazyThreadSafetyMode.None); + public CAnimParamHandle ParamIndex { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xD72498B461990A86)); + get => new CAnimParamHandleImpl(_Handle + _ParamIndexOffset.Value); } + private static readonly Lazy _DampingOffset = new(() => Schema.GetOffset(0xD72498B415440FB5), LazyThreadSafetyMode.None); + public CAnimInputDamping Damping { - get => new CAnimInputDampingImpl(_Handle + Schema.GetOffset(0xD72498B415440FB5)); + get => new CAnimInputDampingImpl(_Handle + _DampingOffset.Value); } + private static readonly Lazy _BlendKeyTypeOffset = new(() => Schema.GetOffset(0xD72498B4CD00B87F), LazyThreadSafetyMode.None); + public ref BlendKeyType BlendKeyType { - get => ref _Handle.AsRef(Schema.GetOffset(0xD72498B4CD00B87F)); + get => ref _Handle.AsRef(_BlendKeyTypeOffset.Value); } + private static readonly Lazy _LockBlendOnResetOffset = new(() => Schema.GetOffset(0xD72498B476334223), LazyThreadSafetyMode.None); + public ref bool LockBlendOnReset { - get => ref _Handle.AsRef(Schema.GetOffset(0xD72498B476334223)); + get => ref _Handle.AsRef(_LockBlendOnResetOffset.Value); } + private static readonly Lazy _SyncCyclesOffset = new(() => Schema.GetOffset(0xD72498B4EFFB5395), LazyThreadSafetyMode.None); + public ref bool SyncCycles { - get => ref _Handle.AsRef(Schema.GetOffset(0xD72498B4EFFB5395)); + get => ref _Handle.AsRef(_SyncCyclesOffset.Value); } + private static readonly Lazy _LoopOffset = new(() => Schema.GetOffset(0xD72498B4C668A4CB), LazyThreadSafetyMode.None); + public ref bool Loop { - get => ref _Handle.AsRef(Schema.GetOffset(0xD72498B4C668A4CB)); + get => ref _Handle.AsRef(_LoopOffset.Value); } + private static readonly Lazy _LockWhenWaningOffset = new(() => Schema.GetOffset(0xD72498B4EED48004), LazyThreadSafetyMode.None); + public ref bool LockWhenWaning { - get => ref _Handle.AsRef(Schema.GetOffset(0xD72498B4EED48004)); + get => ref _Handle.AsRef(_LockWhenWaningOffset.Value); } + private static readonly Lazy _IsAngleOffset = new(() => Schema.GetOffset(0xD72498B4DE976A88), LazyThreadSafetyMode.None); + public ref bool IsAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0xD72498B4DE976A88)); + get => ref _Handle.AsRef(_IsAngleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBlockSelectionMetricEvaluatorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBlockSelectionMetricEvaluatorImpl.cs index ceae63f32..a856763f3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBlockSelectionMetricEvaluatorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBlockSelectionMetricEvaluatorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBloodImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBloodImpl.cs index 6ac0f39ea..8aa428545 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBloodImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBloodImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CBloodImpl : CPointEntityImpl, CBlood { public CBloodImpl(nint handle) : base(handle) { } + private static readonly Lazy _SprayAnglesOffset = new(() => Schema.GetOffset(0x68CF460A2BDF444E), LazyThreadSafetyMode.None); + public ref QAngle SprayAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0x68CF460A2BDF444E)); + get => ref _Handle.AsRef(_SprayAnglesOffset.Value); } + private static readonly Lazy _SprayDirOffset = new(() => Schema.GetOffset(0x68CF460A0A8A2531), LazyThreadSafetyMode.None); + public ref Vector SprayDir { - get => ref _Handle.AsRef(Schema.GetOffset(0x68CF460A0A8A2531)); + get => ref _Handle.AsRef(_SprayDirOffset.Value); } + private static readonly Lazy _AmountOffset = new(() => Schema.GetOffset(0x68CF460A187D1B1B), LazyThreadSafetyMode.None); + public ref float Amount { - get => ref _Handle.AsRef(Schema.GetOffset(0x68CF460A187D1B1B)); + get => ref _Handle.AsRef(_AmountOffset.Value); } + private static readonly Lazy _ColorOffset = new(() => Schema.GetOffset(0x68CF460AD7D017D8), LazyThreadSafetyMode.None); + public ref BloodType Color { - get => ref _Handle.AsRef(Schema.GetOffset(0x68CF460AD7D017D8)); + get => ref _Handle.AsRef(_ColorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentBaseAnimGraphImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentBaseAnimGraphImpl.cs index 71fb20b9a..e6532548a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentBaseAnimGraphImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentBaseAnimGraphImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CBodyComponentBaseAnimGraphImpl : CBodyComponentSkeletonI public CBodyComponentBaseAnimGraphImpl(nint handle) : base(handle) { } + private static readonly Lazy _AnimationControllerOffset = new(() => Schema.GetOffset(0xD004A34F552AD749), LazyThreadSafetyMode.None); + public CBaseAnimGraphController AnimationController { - get => new CBaseAnimGraphControllerImpl(_Handle + Schema.GetOffset(0xD004A34F552AD749)); + get => new CBaseAnimGraphControllerImpl(_Handle + _AnimationControllerOffset.Value); } public void AnimationControllerUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentBaseModelEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentBaseModelEntityImpl.cs index 610d695e7..0232abed1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentBaseModelEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentBaseModelEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentImpl.cs index 1e3b62248..9b21ed5d0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,18 @@ internal partial class CBodyComponentImpl : CEntityComponentImpl, CBodyComponent public CBodyComponentImpl(nint handle) : base(handle) { } + private static readonly Lazy _SceneNodeOffset = new(() => Schema.GetOffset(0x4EF2C865D7D13495), LazyThreadSafetyMode.None); + public CGameSceneNode? SceneNode { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4EF2C865D7D13495)); + var ptr = _Handle.Read(_SceneNodeOffset.Value); return ptr.IsValidPtr() ? new CGameSceneNodeImpl(ptr) : null; } } + private static readonly Lazy ___m_pChainEntityOffset = new(() => Schema.GetOffset(0x4EF2C865F63F0E7D), LazyThreadSafetyMode.None); + public ref CNetworkVarChainer __m_pChainEntity { - get => ref _Handle.AsRef(Schema.GetOffset(0x4EF2C865F63F0E7D)); + get => ref _Handle.AsRef(___m_pChainEntityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentPointImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentPointImpl.cs index 599922836..a80612a24 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentPointImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentPointImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CBodyComponentPointImpl : CBodyComponentImpl, CBodyCompon public CBodyComponentPointImpl(nint handle) : base(handle) { } + private static readonly Lazy _SceneNodeOffset = new(() => Schema.GetOffset(0x21A4C11041577E3), LazyThreadSafetyMode.None); + public CGameSceneNode SceneNode { - get => new CGameSceneNodeImpl(_Handle + Schema.GetOffset(0x21A4C11041577E3)); + get => new CGameSceneNodeImpl(_Handle + _SceneNodeOffset.Value); } public void SceneNodeUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentSkeletonInstanceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentSkeletonInstanceImpl.cs index 4372f96c2..eb6f5dd95 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentSkeletonInstanceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyComponentSkeletonInstanceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CBodyComponentSkeletonInstanceImpl : CBodyComponentImpl, public CBodyComponentSkeletonInstanceImpl(nint handle) : base(handle) { } + private static readonly Lazy _SkeletonInstanceOffset = new(() => Schema.GetOffset(0x4581C459228537B9), LazyThreadSafetyMode.None); + public CSkeletonInstance SkeletonInstance { - get => new CSkeletonInstanceImpl(_Handle + Schema.GetOffset(0x4581C459228537B9)); + get => new CSkeletonInstanceImpl(_Handle + _SkeletonInstanceOffset.Value); } public void SkeletonInstanceUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyGroupAnimTagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyGroupAnimTagImpl.cs index 41db6603e..11cbdd7b9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyGroupAnimTagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyGroupAnimTagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CBodyGroupAnimTagImpl : CAnimTagBaseImpl, CBodyGroupAnimT public CBodyGroupAnimTagImpl(nint handle) : base(handle) { } + private static readonly Lazy _PriorityOffset = new(() => Schema.GetOffset(0x4FBB343CE7EFB335), LazyThreadSafetyMode.None); + public ref int Priority { - get => ref _Handle.AsRef(Schema.GetOffset(0x4FBB343CE7EFB335)); + get => ref _Handle.AsRef(_PriorityOffset.Value); } + private static readonly Lazy _BodyGroupSettingsOffset = new(() => Schema.GetOffset(0x4FBB343C3BE7BAE1), LazyThreadSafetyMode.None); + public ref CUtlVector BodyGroupSettings { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4FBB343C3BE7BAE1)); + get => ref _Handle.AsRef>(_BodyGroupSettingsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyGroupSettingImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyGroupSettingImpl.cs index ceee7c112..1a6f0188a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyGroupSettingImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBodyGroupSettingImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CBodyGroupSettingImpl : SchemaClass, CBodyGroupSetting { public CBodyGroupSettingImpl(nint handle) : base(handle) { } + private static readonly Lazy _BodyGroupNameOffset = new(() => Schema.GetOffset(0xC078388F0E290077), LazyThreadSafetyMode.None); + public string BodyGroupName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC078388F0E290077)); + var ptr = _Handle.Read(_BodyGroupNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xC078388F0E290077, value); + set => Schema.SetString(_Handle, _BodyGroupNameOffset.Value, value); } + private static readonly Lazy _BodyGroupOptionOffset = new(() => Schema.GetOffset(0xC078388F09FA2D31), LazyThreadSafetyMode.None); + public ref int BodyGroupOption { - get => ref _Handle.AsRef(Schema.GetOffset(0xC078388F09FA2D31)); + get => ref _Handle.AsRef(_BodyGroupOptionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBombTargetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBombTargetImpl.cs index 207bacdef..02209255c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBombTargetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBombTargetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,36 +17,54 @@ internal partial class CBombTargetImpl : CBaseTriggerImpl, CBombTarget { public CBombTargetImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnBombExplodeOffset = new(() => Schema.GetOffset(0x1FEE3C3748E87715), LazyThreadSafetyMode.None); + public CEntityIOOutput OnBombExplode { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1FEE3C3748E87715)); + get => new CEntityIOOutputImpl(_Handle + _OnBombExplodeOffset.Value); } + private static readonly Lazy _OnBombPlantedOffset = new(() => Schema.GetOffset(0x1FEE3C37B3C2496C), LazyThreadSafetyMode.None); + public CEntityIOOutput OnBombPlanted { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1FEE3C37B3C2496C)); + get => new CEntityIOOutputImpl(_Handle + _OnBombPlantedOffset.Value); } + private static readonly Lazy _OnBombDefusedOffset = new(() => Schema.GetOffset(0x1FEE3C37BCDAD16E), LazyThreadSafetyMode.None); + public CEntityIOOutput OnBombDefused { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1FEE3C37BCDAD16E)); + get => new CEntityIOOutputImpl(_Handle + _OnBombDefusedOffset.Value); } + private static readonly Lazy _IsBombSiteBOffset = new(() => Schema.GetOffset(0x1FEE3C37A00C3E68), LazyThreadSafetyMode.None); + public ref bool IsBombSiteB { - get => ref _Handle.AsRef(Schema.GetOffset(0x1FEE3C37A00C3E68)); + get => ref _Handle.AsRef(_IsBombSiteBOffset.Value); } + private static readonly Lazy _IsHeistBombTargetOffset = new(() => Schema.GetOffset(0x1FEE3C374F83FD3F), LazyThreadSafetyMode.None); + public ref bool IsHeistBombTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0x1FEE3C374F83FD3F)); + get => ref _Handle.AsRef(_IsHeistBombTargetOffset.Value); } + private static readonly Lazy _BombPlantedHereOffset = new(() => Schema.GetOffset(0x1FEE3C37E2D52CF9), LazyThreadSafetyMode.None); + public ref bool BombPlantedHere { - get => ref _Handle.AsRef(Schema.GetOffset(0x1FEE3C37E2D52CF9)); + get => ref _Handle.AsRef(_BombPlantedHereOffset.Value); } + private static readonly Lazy _MountTargetOffset = new(() => Schema.GetOffset(0x1FEE3C375F784258), LazyThreadSafetyMode.None); + public string MountTarget { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1FEE3C375F784258)); + var ptr = _Handle.Read(_MountTargetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1FEE3C375F784258, value); + set => Schema.SetString(_Handle, _MountTargetOffset.Value, value); } + private static readonly Lazy _InstructorHintOffset = new(() => Schema.GetOffset(0x1FEE3C37D6C2F245), LazyThreadSafetyMode.None); + public ref CHandle InstructorHint { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1FEE3C37D6C2F245)); + get => ref _Handle.AsRef>(_InstructorHintOffset.Value); } + private static readonly Lazy _BombSiteDesignationOffset = new(() => Schema.GetOffset(0x1FEE3C376B71EF25), LazyThreadSafetyMode.None); + public ref int BombSiteDesignation { - get => ref _Handle.AsRef(Schema.GetOffset(0x1FEE3C376B71EF25)); + get => ref _Handle.AsRef(_BombSiteDesignationOffset.Value); } public void BombPlantedHereUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintBaseImpl.cs index 0bf73c467..4dad92c4b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintDotToMorphImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintDotToMorphImpl.cs index 5e3d671f8..4730e69e5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintDotToMorphImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintDotToMorphImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,32 @@ internal partial class CBoneConstraintDotToMorphImpl : CBoneConstraintBaseImpl, public CBoneConstraintDotToMorphImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneNameOffset = new(() => Schema.GetOffset(0x75939F077559AC1F), LazyThreadSafetyMode.None); + public string BoneName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x75939F077559AC1F)); + var ptr = _Handle.Read(_BoneNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x75939F077559AC1F, value); + set => Schema.SetString(_Handle, _BoneNameOffset.Value, value); } + private static readonly Lazy _TargetBoneNameOffset = new(() => Schema.GetOffset(0x75939F07CBA1BE4A), LazyThreadSafetyMode.None); + public string TargetBoneName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x75939F07CBA1BE4A)); + var ptr = _Handle.Read(_TargetBoneNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x75939F07CBA1BE4A, value); + set => Schema.SetString(_Handle, _TargetBoneNameOffset.Value, value); } + private static readonly Lazy _MorphChannelNameOffset = new(() => Schema.GetOffset(0x75939F0777272AE4), LazyThreadSafetyMode.None); + public string MorphChannelName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x75939F0777272AE4)); + var ptr = _Handle.Read(_MorphChannelNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x75939F0777272AE4, value); + set => Schema.SetString(_Handle, _MorphChannelNameOffset.Value, value); } public ISchemaFixedArray Remap { get => new SchemaFixedArray(_Handle, 0x75939F07BE3DB1A0, 4, 4, 4); diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintPoseSpaceBoneImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintPoseSpaceBoneImpl.cs index f80bd7572..699737d21 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintPoseSpaceBoneImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintPoseSpaceBoneImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CBoneConstraintPoseSpaceBoneImpl : CBaseConstraintImpl, C public CBoneConstraintPoseSpaceBoneImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputListOffset = new(() => Schema.GetOffset(0x496EBC215EB8D83), LazyThreadSafetyMode.None); + public ref CUtlVector InputList { - get => ref _Handle.AsRef>(Schema.GetOffset(0x496EBC215EB8D83)); + get => ref _Handle.AsRef>(_InputListOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintPoseSpaceBone__Input_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintPoseSpaceBone__Input_tImpl.cs index 073965e9f..e1819b6c9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintPoseSpaceBone__Input_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintPoseSpaceBone__Input_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CBoneConstraintPoseSpaceBone__Input_tImpl : SchemaClass, public CBoneConstraintPoseSpaceBone__Input_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueOffset = new(() => Schema.GetOffset(0x4F2ED4014039DA98), LazyThreadSafetyMode.None); + public ref Vector InputValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F2ED4014039DA98)); + get => ref _Handle.AsRef(_InputValueOffset.Value); } + private static readonly Lazy _OutputTransformListOffset = new(() => Schema.GetOffset(0x4F2ED401DAEA7058), LazyThreadSafetyMode.None); + public ref CUtlVector OutputTransformList { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4F2ED401DAEA7058)); + get => ref _Handle.AsRef>(_OutputTransformListOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintPoseSpaceMorphImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintPoseSpaceMorphImpl.cs index b952dca7f..7b7ceb3cc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintPoseSpaceMorphImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintPoseSpaceMorphImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,28 +17,38 @@ internal partial class CBoneConstraintPoseSpaceMorphImpl : CBoneConstraintBaseIm public CBoneConstraintPoseSpaceMorphImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneNameOffset = new(() => Schema.GetOffset(0x6ECAD65A7559AC1F), LazyThreadSafetyMode.None); + public string BoneName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6ECAD65A7559AC1F)); + var ptr = _Handle.Read(_BoneNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6ECAD65A7559AC1F, value); + set => Schema.SetString(_Handle, _BoneNameOffset.Value, value); } + private static readonly Lazy _AttachmentNameOffset = new(() => Schema.GetOffset(0x6ECAD65A7B86DB7C), LazyThreadSafetyMode.None); + public string AttachmentName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6ECAD65A7B86DB7C)); + var ptr = _Handle.Read(_AttachmentNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6ECAD65A7B86DB7C, value); + set => Schema.SetString(_Handle, _AttachmentNameOffset.Value, value); } + private static readonly Lazy _OutputMorphOffset = new(() => Schema.GetOffset(0x6ECAD65ADC9A8262), LazyThreadSafetyMode.None); + public ref CUtlVector OutputMorph { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6ECAD65ADC9A8262)); + get => ref _Handle.AsRef>(_OutputMorphOffset.Value); } + private static readonly Lazy _InputListOffset = new(() => Schema.GetOffset(0x6ECAD65A15EB8D83), LazyThreadSafetyMode.None); + public ref CUtlVector InputList { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6ECAD65A15EB8D83)); + get => ref _Handle.AsRef>(_InputListOffset.Value); } + private static readonly Lazy _ClampOffset = new(() => Schema.GetOffset(0x6ECAD65A84C7929C), LazyThreadSafetyMode.None); + public ref bool Clamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x6ECAD65A84C7929C)); + get => ref _Handle.AsRef(_ClampOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintPoseSpaceMorph__Input_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintPoseSpaceMorph__Input_tImpl.cs index 454e2d30f..a58b86ad2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintPoseSpaceMorph__Input_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintPoseSpaceMorph__Input_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CBoneConstraintPoseSpaceMorph__Input_tImpl : SchemaClass, public CBoneConstraintPoseSpaceMorph__Input_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueOffset = new(() => Schema.GetOffset(0x2DF008994039DA98), LazyThreadSafetyMode.None); + public ref Vector InputValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x2DF008994039DA98)); + get => ref _Handle.AsRef(_InputValueOffset.Value); } + private static readonly Lazy _OutputWeightListOffset = new(() => Schema.GetOffset(0x2DF00899567B1A1C), LazyThreadSafetyMode.None); + public ref CUtlVector OutputWeightList { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2DF00899567B1A1C)); + get => ref _Handle.AsRef>(_OutputWeightListOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintRbfImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintRbfImpl.cs index 4a87111ed..621cdd979 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintRbfImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneConstraintRbfImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CBoneConstraintRbfImpl : CBoneConstraintBaseImpl, CBoneCo public CBoneConstraintRbfImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputBonesOffset = new(() => Schema.GetOffset(0x45CB33BF83336B6E), LazyThreadSafetyMode.None); + public ref CUtlVector InputBones { - get => ref _Handle.AsRef>(Schema.GetOffset(0x45CB33BF83336B6E)); + get => ref _Handle.AsRef>(_InputBonesOffset.Value); } + private static readonly Lazy _OutputBonesOffset = new(() => Schema.GetOffset(0x45CB33BF84D3A41B), LazyThreadSafetyMode.None); + public ref CUtlVector OutputBones { - get => ref _Handle.AsRef>(Schema.GetOffset(0x45CB33BF84D3A41B)); + get => ref _Handle.AsRef>(_OutputBonesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneMaskUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneMaskUpdateNodeImpl.cs index de43a8cc8..d6f38cdb9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneMaskUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneMaskUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CBoneMaskUpdateNodeImpl : CBinaryUpdateNodeImpl, CBoneMas public CBoneMaskUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _WeightListIndexOffset = new(() => Schema.GetOffset(0x213CBA4D30288377), LazyThreadSafetyMode.None); + public ref int WeightListIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x213CBA4D30288377)); + get => ref _Handle.AsRef(_WeightListIndexOffset.Value); } + private static readonly Lazy _RootMotionBlendOffset = new(() => Schema.GetOffset(0x213CBA4DAF24631C), LazyThreadSafetyMode.None); + public ref float RootMotionBlend { - get => ref _Handle.AsRef(Schema.GetOffset(0x213CBA4DAF24631C)); + get => ref _Handle.AsRef(_RootMotionBlendOffset.Value); } + private static readonly Lazy _BlendSpaceOffset = new(() => Schema.GetOffset(0x213CBA4D9DCBC41E), LazyThreadSafetyMode.None); + public ref BoneMaskBlendSpace BlendSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x213CBA4D9DCBC41E)); + get => ref _Handle.AsRef(_BlendSpaceOffset.Value); } + private static readonly Lazy _FootMotionTimingOffset = new(() => Schema.GetOffset(0x213CBA4DBB17F13D), LazyThreadSafetyMode.None); + public ref BinaryNodeChildOption FootMotionTiming { - get => ref _Handle.AsRef(Schema.GetOffset(0x213CBA4DBB17F13D)); + get => ref _Handle.AsRef(_FootMotionTimingOffset.Value); } + private static readonly Lazy _UseBlendScaleOffset = new(() => Schema.GetOffset(0x213CBA4DF5B40057), LazyThreadSafetyMode.None); + public ref bool UseBlendScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x213CBA4DF5B40057)); + get => ref _Handle.AsRef(_UseBlendScaleOffset.Value); } + private static readonly Lazy _BlendValueSourceOffset = new(() => Schema.GetOffset(0x213CBA4D7AB7C374), LazyThreadSafetyMode.None); + public ref AnimValueSource BlendValueSource { - get => ref _Handle.AsRef(Schema.GetOffset(0x213CBA4D7AB7C374)); + get => ref _Handle.AsRef(_BlendValueSourceOffset.Value); } + private static readonly Lazy _BlendParameterOffset = new(() => Schema.GetOffset(0x213CBA4D40990659), LazyThreadSafetyMode.None); + public CAnimParamHandle BlendParameter { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x213CBA4D40990659)); + get => new CAnimParamHandleImpl(_Handle + _BlendParameterOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBonePositionMetricEvaluatorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBonePositionMetricEvaluatorImpl.cs index 22384336e..c53fce25c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBonePositionMetricEvaluatorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBonePositionMetricEvaluatorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CBonePositionMetricEvaluatorImpl : CMotionMetricEvaluator public CBonePositionMetricEvaluatorImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneIndexOffset = new(() => Schema.GetOffset(0xB36923389F407B79), LazyThreadSafetyMode.None); + public ref int BoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xB36923389F407B79)); + get => ref _Handle.AsRef(_BoneIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneVelocityMetricEvaluatorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneVelocityMetricEvaluatorImpl.cs index 1531e6ec8..ecd97a614 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneVelocityMetricEvaluatorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoneVelocityMetricEvaluatorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CBoneVelocityMetricEvaluatorImpl : CMotionMetricEvaluator public CBoneVelocityMetricEvaluatorImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneIndexOffset = new(() => Schema.GetOffset(0x90D313709F407B79), LazyThreadSafetyMode.None); + public ref int BoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x90D313709F407B79)); + get => ref _Handle.AsRef(_BoneIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoolAnimParameterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoolAnimParameterImpl.cs index 585ce3441..c58cdd6af 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoolAnimParameterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBoolAnimParameterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CBoolAnimParameterImpl : CConcreteAnimParameterImpl, CBoo public CBoolAnimParameterImpl(nint handle) : base(handle) { } + private static readonly Lazy _DefaultValueOffset = new(() => Schema.GetOffset(0x3BF60C6A26126DF), LazyThreadSafetyMode.None); + public ref bool DefaultValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x3BF60C6A26126DF)); + get => ref _Handle.AsRef(_DefaultValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBotImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBotImpl.cs index 0e09ba97c..b99b6961a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBotImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBotImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,50 +17,76 @@ internal partial class CBotImpl : SchemaClass, CBot { public CBotImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControllerOffset = new(() => Schema.GetOffset(0x804AC5DB8F2DD553), LazyThreadSafetyMode.None); + public CCSPlayerController? Controller { get { - var ptr = _Handle.Read(Schema.GetOffset(0x804AC5DB8F2DD553)); + var ptr = _Handle.Read(_ControllerOffset.Value); return ptr.IsValidPtr() ? new CCSPlayerControllerImpl(ptr) : null; } } + private static readonly Lazy _PlayerOffset = new(() => Schema.GetOffset(0x804AC5DB2EC01D0E), LazyThreadSafetyMode.None); + public CCSPlayerPawn? Player { get { - var ptr = _Handle.Read(Schema.GetOffset(0x804AC5DB2EC01D0E)); + var ptr = _Handle.Read(_PlayerOffset.Value); return ptr.IsValidPtr() ? new CCSPlayerPawnImpl(ptr) : null; } } + private static readonly Lazy _HasSpawnedOffset = new(() => Schema.GetOffset(0x804AC5DBC2790687), LazyThreadSafetyMode.None); + public ref bool HasSpawned { - get => ref _Handle.AsRef(Schema.GetOffset(0x804AC5DBC2790687)); + get => ref _Handle.AsRef(_HasSpawnedOffset.Value); } + private static readonly Lazy _IdOffset = new(() => Schema.GetOffset(0x804AC5DBB4B6E980), LazyThreadSafetyMode.None); + public ref uint Id { - get => ref _Handle.AsRef(Schema.GetOffset(0x804AC5DBB4B6E980)); + get => ref _Handle.AsRef(_IdOffset.Value); } + private static readonly Lazy _IsRunningOffset = new(() => Schema.GetOffset(0x804AC5DBE59BA57C), LazyThreadSafetyMode.None); + public ref bool IsRunning { - get => ref _Handle.AsRef(Schema.GetOffset(0x804AC5DBE59BA57C)); + get => ref _Handle.AsRef(_IsRunningOffset.Value); } + private static readonly Lazy _IsCrouchingOffset = new(() => Schema.GetOffset(0x804AC5DB7C7E997D), LazyThreadSafetyMode.None); + public ref bool IsCrouching { - get => ref _Handle.AsRef(Schema.GetOffset(0x804AC5DB7C7E997D)); + get => ref _Handle.AsRef(_IsCrouchingOffset.Value); } + private static readonly Lazy _ForwardSpeedOffset = new(() => Schema.GetOffset(0x804AC5DBD8FEDBBD), LazyThreadSafetyMode.None); + public ref float ForwardSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x804AC5DBD8FEDBBD)); + get => ref _Handle.AsRef(_ForwardSpeedOffset.Value); } + private static readonly Lazy _LeftSpeedOffset = new(() => Schema.GetOffset(0x804AC5DBA7C6445B), LazyThreadSafetyMode.None); + public ref float LeftSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x804AC5DBA7C6445B)); + get => ref _Handle.AsRef(_LeftSpeedOffset.Value); } + private static readonly Lazy _VerticalSpeedOffset = new(() => Schema.GetOffset(0x804AC5DB379CEA66), LazyThreadSafetyMode.None); + public ref float VerticalSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x804AC5DB379CEA66)); + get => ref _Handle.AsRef(_VerticalSpeedOffset.Value); } + private static readonly Lazy _ButtonFlagsOffset = new(() => Schema.GetOffset(0x804AC5DB82784FE8), LazyThreadSafetyMode.None); + public ref ulong ButtonFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0x804AC5DB82784FE8)); + get => ref _Handle.AsRef(_ButtonFlagsOffset.Value); } + private static readonly Lazy _JumpTimestampOffset = new(() => Schema.GetOffset(0x804AC5DBA7C5ED0B), LazyThreadSafetyMode.None); + public ref float JumpTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x804AC5DBA7C5ED0B)); + get => ref _Handle.AsRef(_JumpTimestampOffset.Value); } + private static readonly Lazy _ViewForwardOffset = new(() => Schema.GetOffset(0x804AC5DBA852BF65), LazyThreadSafetyMode.None); + public ref Vector ViewForward { - get => ref _Handle.AsRef(Schema.GetOffset(0x804AC5DBA852BF65)); + get => ref _Handle.AsRef(_ViewForwardOffset.Value); } + private static readonly Lazy _PostureStackIndexOffset = new(() => Schema.GetOffset(0x804AC5DBCB65E443), LazyThreadSafetyMode.None); + public ref int PostureStackIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x804AC5DBCB65E443)); + get => ref _Handle.AsRef(_PostureStackIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBreakableImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBreakableImpl.cs index d25e875b6..c02ba5e93 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBreakableImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBreakableImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,58 +17,88 @@ internal partial class CBreakableImpl : CBaseModelEntityImpl, CBreakable { public CBreakableImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPropDataComponentOffset = new(() => Schema.GetOffset(0xC5CDE329ACBC1DDE), LazyThreadSafetyMode.None); + public CPropDataComponent CPropDataComponent { - get => new CPropDataComponentImpl(_Handle + Schema.GetOffset(0xC5CDE329ACBC1DDE)); + get => new CPropDataComponentImpl(_Handle + _CPropDataComponentOffset.Value); } + private static readonly Lazy _MaterialOffset = new(() => Schema.GetOffset(0xC5CDE3293BBD7CE0), LazyThreadSafetyMode.None); + public ref Materials Material { - get => ref _Handle.AsRef(Schema.GetOffset(0xC5CDE3293BBD7CE0)); + get => ref _Handle.AsRef(_MaterialOffset.Value); } + private static readonly Lazy _BreakerOffset = new(() => Schema.GetOffset(0xC5CDE329161604FD), LazyThreadSafetyMode.None); + public ref CHandle Breaker { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC5CDE329161604FD)); + get => ref _Handle.AsRef>(_BreakerOffset.Value); } + private static readonly Lazy _ExplosionOffset = new(() => Schema.GetOffset(0xC5CDE3298FD2AD60), LazyThreadSafetyMode.None); + public ref Explosions Explosion { - get => ref _Handle.AsRef(Schema.GetOffset(0xC5CDE3298FD2AD60)); + get => ref _Handle.AsRef(_ExplosionOffset.Value); } + private static readonly Lazy _SpawnObjectOffset = new(() => Schema.GetOffset(0xC5CDE329D32D7547), LazyThreadSafetyMode.None); + public string SpawnObject { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC5CDE329D32D7547)); + var ptr = _Handle.Read(_SpawnObjectOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xC5CDE329D32D7547, value); + set => Schema.SetString(_Handle, _SpawnObjectOffset.Value, value); } + private static readonly Lazy _PressureDelayOffset = new(() => Schema.GetOffset(0xC5CDE3294852270B), LazyThreadSafetyMode.None); + public ref float PressureDelay { - get => ref _Handle.AsRef(Schema.GetOffset(0xC5CDE3294852270B)); + get => ref _Handle.AsRef(_PressureDelayOffset.Value); } + private static readonly Lazy _MinHealthDmgOffset = new(() => Schema.GetOffset(0xC5CDE32991F14A4A), LazyThreadSafetyMode.None); + public ref int MinHealthDmg { - get => ref _Handle.AsRef(Schema.GetOffset(0xC5CDE32991F14A4A)); + get => ref _Handle.AsRef(_MinHealthDmgOffset.Value); } + private static readonly Lazy _PropDataOffset = new(() => Schema.GetOffset(0xC5CDE32958671088), LazyThreadSafetyMode.None); + public string PropData { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC5CDE32958671088)); + var ptr = _Handle.Read(_PropDataOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xC5CDE32958671088, value); + set => Schema.SetString(_Handle, _PropDataOffset.Value, value); } + private static readonly Lazy _ImpactEnergyScaleOffset = new(() => Schema.GetOffset(0xC5CDE329C66BAC1B), LazyThreadSafetyMode.None); + public ref float ImpactEnergyScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xC5CDE329C66BAC1B)); + get => ref _Handle.AsRef(_ImpactEnergyScaleOffset.Value); } + private static readonly Lazy _OverrideBlockLOSOffset = new(() => Schema.GetOffset(0xC5CDE329E9152440), LazyThreadSafetyMode.None); + public ref EOverrideBlockLOS_t OverrideBlockLOS { - get => ref _Handle.AsRef(Schema.GetOffset(0xC5CDE329E9152440)); + get => ref _Handle.AsRef(_OverrideBlockLOSOffset.Value); } + private static readonly Lazy _OnBreakOffset = new(() => Schema.GetOffset(0xC5CDE32946BFEC4F), LazyThreadSafetyMode.None); + public CEntityIOOutput OnBreak { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xC5CDE32946BFEC4F)); + get => new CEntityIOOutputImpl(_Handle + _OnBreakOffset.Value); } + private static readonly Lazy _OnHealthChangedOffset = new(() => Schema.GetOffset(0xC5CDE329EAC125B2), LazyThreadSafetyMode.None); + public SchemaUntypedField OnHealthChanged { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC5CDE329EAC125B2)); + get => new SchemaUntypedField(_Handle + _OnHealthChangedOffset.Value); } + private static readonly Lazy _PerformanceModeOffset = new(() => Schema.GetOffset(0xC5CDE329C12B4C52), LazyThreadSafetyMode.None); + public ref PerformanceMode_t PerformanceMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xC5CDE329C12B4C52)); + get => ref _Handle.AsRef(_PerformanceModeOffset.Value); } + private static readonly Lazy _PhysicsAttackerOffset = new(() => Schema.GetOffset(0xC5CDE3297A5EB877), LazyThreadSafetyMode.None); + public ref CHandle PhysicsAttacker { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC5CDE3297A5EB877)); + get => ref _Handle.AsRef>(_PhysicsAttackerOffset.Value); } + private static readonly Lazy _LastPhysicsInfluenceTimeOffset = new(() => Schema.GetOffset(0xC5CDE3295B5C0E32), LazyThreadSafetyMode.None); + public GameTime_t LastPhysicsInfluenceTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xC5CDE3295B5C0E32)); + get => new GameTime_tImpl(_Handle + _LastPhysicsInfluenceTimeOffset.Value); } public void CPropDataComponentUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBreakablePropImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBreakablePropImpl.cs index be3e8af72..861620555 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBreakablePropImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBreakablePropImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,129 +17,193 @@ internal partial class CBreakablePropImpl : CBasePropImpl, CBreakableProp { public CBreakablePropImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPropDataComponentOffset = new(() => Schema.GetOffset(0xD9F5AF34ACBC1DDE), LazyThreadSafetyMode.None); + public CPropDataComponent CPropDataComponent { - get => new CPropDataComponentImpl(_Handle + Schema.GetOffset(0xD9F5AF34ACBC1DDE)); + get => new CPropDataComponentImpl(_Handle + _CPropDataComponentOffset.Value); } + private static readonly Lazy _OnStartDeathOffset = new(() => Schema.GetOffset(0xD9F5AF34F3ED4C8E), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStartDeath { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xD9F5AF34F3ED4C8E)); + get => new CEntityIOOutputImpl(_Handle + _OnStartDeathOffset.Value); } + private static readonly Lazy _OnBreakOffset = new(() => Schema.GetOffset(0xD9F5AF3446BFEC4F), LazyThreadSafetyMode.None); + public CEntityIOOutput OnBreak { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xD9F5AF3446BFEC4F)); + get => new CEntityIOOutputImpl(_Handle + _OnBreakOffset.Value); } + private static readonly Lazy _OnHealthChangedOffset = new(() => Schema.GetOffset(0xD9F5AF34EAC125B2), LazyThreadSafetyMode.None); + public SchemaUntypedField OnHealthChanged { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD9F5AF34EAC125B2)); + get => new SchemaUntypedField(_Handle + _OnHealthChangedOffset.Value); } + private static readonly Lazy _OnTakeDamageOffset = new(() => Schema.GetOffset(0xD9F5AF34CC9E35D2), LazyThreadSafetyMode.None); + public CEntityIOOutput OnTakeDamage { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xD9F5AF34CC9E35D2)); + get => new CEntityIOOutputImpl(_Handle + _OnTakeDamageOffset.Value); } + private static readonly Lazy _ImpactEnergyScaleOffset = new(() => Schema.GetOffset(0xD9F5AF34C66BAC1B), LazyThreadSafetyMode.None); + public ref float ImpactEnergyScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9F5AF34C66BAC1B)); + get => ref _Handle.AsRef(_ImpactEnergyScaleOffset.Value); } + private static readonly Lazy _MinHealthDmgOffset = new(() => Schema.GetOffset(0xD9F5AF3491F14A4A), LazyThreadSafetyMode.None); + public ref int MinHealthDmg { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9F5AF3491F14A4A)); + get => ref _Handle.AsRef(_MinHealthDmgOffset.Value); } + private static readonly Lazy _PreferredCarryAnglesOffset = new(() => Schema.GetOffset(0xD9F5AF349778BEE9), LazyThreadSafetyMode.None); + public ref QAngle PreferredCarryAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9F5AF349778BEE9)); + get => ref _Handle.AsRef(_PreferredCarryAnglesOffset.Value); } + private static readonly Lazy _PressureDelayOffset = new(() => Schema.GetOffset(0xD9F5AF344852270B), LazyThreadSafetyMode.None); + public ref float PressureDelay { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9F5AF344852270B)); + get => ref _Handle.AsRef(_PressureDelayOffset.Value); } + private static readonly Lazy _DefBurstScaleOffset = new(() => Schema.GetOffset(0xD9F5AF348D3953C6), LazyThreadSafetyMode.None); + public ref float DefBurstScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9F5AF348D3953C6)); + get => ref _Handle.AsRef(_DefBurstScaleOffset.Value); } + private static readonly Lazy _DefBurstOffsetOffset = new(() => Schema.GetOffset(0xD9F5AF341E951FF1), LazyThreadSafetyMode.None); + public ref Vector DefBurstOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9F5AF341E951FF1)); + get => ref _Handle.AsRef(_DefBurstOffsetOffset.Value); } + private static readonly Lazy _BreakerOffset = new(() => Schema.GetOffset(0xD9F5AF34161604FD), LazyThreadSafetyMode.None); + public ref CHandle Breaker { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD9F5AF34161604FD)); + get => ref _Handle.AsRef>(_BreakerOffset.Value); } + private static readonly Lazy _PerformanceModeOffset = new(() => Schema.GetOffset(0xD9F5AF34C12B4C52), LazyThreadSafetyMode.None); + public ref PerformanceMode_t PerformanceMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9F5AF34C12B4C52)); + get => ref _Handle.AsRef(_PerformanceModeOffset.Value); } + private static readonly Lazy _PreventDamageBeforeTimeOffset = new(() => Schema.GetOffset(0xD9F5AF34431B46E8), LazyThreadSafetyMode.None); + public GameTime_t PreventDamageBeforeTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xD9F5AF34431B46E8)); + get => new GameTime_tImpl(_Handle + _PreventDamageBeforeTimeOffset.Value); } + private static readonly Lazy _BreakableContentsTypeOffset = new(() => Schema.GetOffset(0xD9F5AF34C332D3A2), LazyThreadSafetyMode.None); + public ref BreakableContentsType_t BreakableContentsType { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9F5AF34C332D3A2)); + get => ref _Handle.AsRef(_BreakableContentsTypeOffset.Value); } + private static readonly Lazy _StrBreakableContentsPropGroupOverrideOffset = new(() => Schema.GetOffset(0xD9F5AF34FEDC11AB), LazyThreadSafetyMode.None); + public string StrBreakableContentsPropGroupOverride { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD9F5AF34FEDC11AB)); + var ptr = _Handle.Read(_StrBreakableContentsPropGroupOverrideOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD9F5AF34FEDC11AB, value); + set => Schema.SetString(_Handle, _StrBreakableContentsPropGroupOverrideOffset.Value, value); } + private static readonly Lazy _StrBreakableContentsParticleOverrideOffset = new(() => Schema.GetOffset(0xD9F5AF3461C07367), LazyThreadSafetyMode.None); + public string StrBreakableContentsParticleOverride { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD9F5AF3461C07367)); + var ptr = _Handle.Read(_StrBreakableContentsParticleOverrideOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD9F5AF3461C07367, value); + set => Schema.SetString(_Handle, _StrBreakableContentsParticleOverrideOffset.Value, value); } + private static readonly Lazy _HasBreakPiecesOrCommandsOffset = new(() => Schema.GetOffset(0xD9F5AF348BD56C36), LazyThreadSafetyMode.None); + public ref bool HasBreakPiecesOrCommands { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9F5AF348BD56C36)); + get => ref _Handle.AsRef(_HasBreakPiecesOrCommandsOffset.Value); } + private static readonly Lazy _ExplodeDamageOffset = new(() => Schema.GetOffset(0xD9F5AF34EADCF523), LazyThreadSafetyMode.None); + public ref float ExplodeDamage { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9F5AF34EADCF523)); + get => ref _Handle.AsRef(_ExplodeDamageOffset.Value); } + private static readonly Lazy _ExplodeRadiusOffset = new(() => Schema.GetOffset(0xD9F5AF34229BEC64), LazyThreadSafetyMode.None); + public ref float ExplodeRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9F5AF34229BEC64)); + get => ref _Handle.AsRef(_ExplodeRadiusOffset.Value); } + private static readonly Lazy _ExplosionDelayOffset = new(() => Schema.GetOffset(0xD9F5AF349DB4A86F), LazyThreadSafetyMode.None); + public ref float ExplosionDelay { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9F5AF349DB4A86F)); + get => ref _Handle.AsRef(_ExplosionDelayOffset.Value); } + private static readonly Lazy _ExplosionBuildupSoundOffset = new(() => Schema.GetOffset(0xD9F5AF34835ABA6C), LazyThreadSafetyMode.None); + public string ExplosionBuildupSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD9F5AF34835ABA6C)); + var ptr = _Handle.Read(_ExplosionBuildupSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD9F5AF34835ABA6C, value); + set => Schema.SetString(_Handle, _ExplosionBuildupSoundOffset.Value, value); } + private static readonly Lazy _ExplosionCustomEffectOffset = new(() => Schema.GetOffset(0xD9F5AF34BC8BEFBE), LazyThreadSafetyMode.None); + public string ExplosionCustomEffect { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD9F5AF34BC8BEFBE)); + var ptr = _Handle.Read(_ExplosionCustomEffectOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD9F5AF34BC8BEFBE, value); + set => Schema.SetString(_Handle, _ExplosionCustomEffectOffset.Value, value); } + private static readonly Lazy _ExplosionCustomSoundOffset = new(() => Schema.GetOffset(0xD9F5AF34E729842A), LazyThreadSafetyMode.None); + public string ExplosionCustomSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD9F5AF34E729842A)); + var ptr = _Handle.Read(_ExplosionCustomSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD9F5AF34E729842A, value); + set => Schema.SetString(_Handle, _ExplosionCustomSoundOffset.Value, value); } + private static readonly Lazy _ExplosionModifierOffset = new(() => Schema.GetOffset(0xD9F5AF34531D2849), LazyThreadSafetyMode.None); + public string ExplosionModifier { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD9F5AF34531D2849)); + var ptr = _Handle.Read(_ExplosionModifierOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD9F5AF34531D2849, value); + set => Schema.SetString(_Handle, _ExplosionModifierOffset.Value, value); } + private static readonly Lazy _PhysicsAttackerOffset = new(() => Schema.GetOffset(0xD9F5AF347A5EB877), LazyThreadSafetyMode.None); + public ref CHandle PhysicsAttacker { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD9F5AF347A5EB877)); + get => ref _Handle.AsRef>(_PhysicsAttackerOffset.Value); } + private static readonly Lazy _LastPhysicsInfluenceTimeOffset = new(() => Schema.GetOffset(0xD9F5AF345B5C0E32), LazyThreadSafetyMode.None); + public GameTime_t LastPhysicsInfluenceTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xD9F5AF345B5C0E32)); + get => new GameTime_tImpl(_Handle + _LastPhysicsInfluenceTimeOffset.Value); } + private static readonly Lazy _DefaultFadeScaleOffset = new(() => Schema.GetOffset(0xD9F5AF344DA9700C), LazyThreadSafetyMode.None); + public ref float DefaultFadeScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9F5AF344DA9700C)); + get => ref _Handle.AsRef(_DefaultFadeScaleOffset.Value); } + private static readonly Lazy _LastAttackerOffset = new(() => Schema.GetOffset(0xD9F5AF3465CAEF84), LazyThreadSafetyMode.None); + public ref CHandle LastAttacker { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD9F5AF3465CAEF84)); + get => ref _Handle.AsRef>(_LastAttackerOffset.Value); } + private static readonly Lazy _PuntSoundOffset = new(() => Schema.GetOffset(0xD9F5AF34FB0FC5DB), LazyThreadSafetyMode.None); + public string PuntSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD9F5AF34FB0FC5DB)); + var ptr = _Handle.Read(_PuntSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD9F5AF34FB0FC5DB, value); + set => Schema.SetString(_Handle, _PuntSoundOffset.Value, value); } + private static readonly Lazy _UsePuntSoundOffset = new(() => Schema.GetOffset(0xD9F5AF34BA328938), LazyThreadSafetyMode.None); + public ref bool UsePuntSound { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9F5AF34BA328938)); + get => ref _Handle.AsRef(_UsePuntSoundOffset.Value); } + private static readonly Lazy _OriginalBlockLOSOffset = new(() => Schema.GetOffset(0xD9F5AF34A80D357B), LazyThreadSafetyMode.None); + public ref bool OriginalBlockLOS { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9F5AF34A80D357B)); + get => ref _Handle.AsRef(_OriginalBlockLOSOffset.Value); } public void CPropDataComponentUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBreakableStageHelperImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBreakableStageHelperImpl.cs index 290115efa..32d0e5d17 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBreakableStageHelperImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBreakableStageHelperImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CBreakableStageHelperImpl : SchemaClass, CBreakableStageH public CBreakableStageHelperImpl(nint handle) : base(handle) { } + private static readonly Lazy _CurrentStageOffset = new(() => Schema.GetOffset(0xF3B3D901E6644458), LazyThreadSafetyMode.None); + public ref int CurrentStage { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3B3D901E6644458)); + get => ref _Handle.AsRef(_CurrentStageOffset.Value); } + private static readonly Lazy _StageCountOffset = new(() => Schema.GetOffset(0xF3B3D901117B2130), LazyThreadSafetyMode.None); + public ref int StageCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3B3D901117B2130)); + get => ref _Handle.AsRef(_StageCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtActionAimImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtActionAimImpl.cs index e200e1a4c..e9e4fe9cd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtActionAimImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtActionAimImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,49 +17,73 @@ internal partial class CBtActionAimImpl : CBtNodeImpl, CBtActionAim { public CBtActionAimImpl(nint handle) : base(handle) { } + private static readonly Lazy _SensorInputKeyOffset = new(() => Schema.GetOffset(0x43587513D2B0D4C1), LazyThreadSafetyMode.None); + public string SensorInputKey { get { - var ptr = _Handle.Read(Schema.GetOffset(0x43587513D2B0D4C1)); + var ptr = _Handle.Read(_SensorInputKeyOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x43587513D2B0D4C1, value); + set => Schema.SetString(_Handle, _SensorInputKeyOffset.Value, value); } + private static readonly Lazy _AimReadyKeyOffset = new(() => Schema.GetOffset(0x435875136718A4C7), LazyThreadSafetyMode.None); + public string AimReadyKey { get { - var ptr = _Handle.Read(Schema.GetOffset(0x435875136718A4C7)); + var ptr = _Handle.Read(_AimReadyKeyOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x435875136718A4C7, value); + set => Schema.SetString(_Handle, _AimReadyKeyOffset.Value, value); } + private static readonly Lazy _ZoomCooldownTimestampOffset = new(() => Schema.GetOffset(0x43587513F2898D9F), LazyThreadSafetyMode.None); + public ref float ZoomCooldownTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x43587513F2898D9F)); + get => ref _Handle.AsRef(_ZoomCooldownTimestampOffset.Value); } + private static readonly Lazy _DoneAimingOffset = new(() => Schema.GetOffset(0x43587513F2C3ADDE), LazyThreadSafetyMode.None); + public ref bool DoneAiming { - get => ref _Handle.AsRef(Schema.GetOffset(0x43587513F2C3ADDE)); + get => ref _Handle.AsRef(_DoneAimingOffset.Value); } + private static readonly Lazy _LerpStartTimeOffset = new(() => Schema.GetOffset(0x43587513B67B575F), LazyThreadSafetyMode.None); + public ref float LerpStartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x43587513B67B575F)); + get => ref _Handle.AsRef(_LerpStartTimeOffset.Value); } + private static readonly Lazy _NextLookTargetLerpTimeOffset = new(() => Schema.GetOffset(0x43587513768D7F08), LazyThreadSafetyMode.None); + public ref float NextLookTargetLerpTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x43587513768D7F08)); + get => ref _Handle.AsRef(_NextLookTargetLerpTimeOffset.Value); } + private static readonly Lazy _PenaltyReductionRatioOffset = new(() => Schema.GetOffset(0x43587513BB3B4A10), LazyThreadSafetyMode.None); + public ref float PenaltyReductionRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0x43587513BB3B4A10)); + get => ref _Handle.AsRef(_PenaltyReductionRatioOffset.Value); } + private static readonly Lazy _NextLookTargetOffset = new(() => Schema.GetOffset(0x43587513C1D3F3CE), LazyThreadSafetyMode.None); + public ref QAngle NextLookTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0x43587513C1D3F3CE)); + get => ref _Handle.AsRef(_NextLookTargetOffset.Value); } + private static readonly Lazy _AimTimerOffset = new(() => Schema.GetOffset(0x4358751330E31F47), LazyThreadSafetyMode.None); + public CountdownTimer AimTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x4358751330E31F47)); + get => new CountdownTimerImpl(_Handle + _AimTimerOffset.Value); } + private static readonly Lazy _SniperHoldTimerOffset = new(() => Schema.GetOffset(0x43587513B206F2AC), LazyThreadSafetyMode.None); + public CountdownTimer SniperHoldTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x43587513B206F2AC)); + get => new CountdownTimerImpl(_Handle + _SniperHoldTimerOffset.Value); } + private static readonly Lazy _FocusIntervalTimerOffset = new(() => Schema.GetOffset(0x43587513267063CB), LazyThreadSafetyMode.None); + public CountdownTimer FocusIntervalTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x43587513267063CB)); + get => new CountdownTimerImpl(_Handle + _FocusIntervalTimerOffset.Value); } + private static readonly Lazy _AcquiredOffset = new(() => Schema.GetOffset(0x435875131D2FE5B5), LazyThreadSafetyMode.None); + public ref bool Acquired { - get => ref _Handle.AsRef(Schema.GetOffset(0x435875131D2FE5B5)); + get => ref _Handle.AsRef(_AcquiredOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtActionCombatPositioningImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtActionCombatPositioningImpl.cs index 409ff1c9f..f425365eb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtActionCombatPositioningImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtActionCombatPositioningImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,25 +17,33 @@ internal partial class CBtActionCombatPositioningImpl : CBtNodeImpl, CBtActionCo public CBtActionCombatPositioningImpl(nint handle) : base(handle) { } + private static readonly Lazy _SensorInputKeyOffset = new(() => Schema.GetOffset(0x3FB29123D2B0D4C1), LazyThreadSafetyMode.None); + public string SensorInputKey { get { - var ptr = _Handle.Read(Schema.GetOffset(0x3FB29123D2B0D4C1)); + var ptr = _Handle.Read(_SensorInputKeyOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x3FB29123D2B0D4C1, value); + set => Schema.SetString(_Handle, _SensorInputKeyOffset.Value, value); } + private static readonly Lazy _IsAttackingKeyOffset = new(() => Schema.GetOffset(0x3FB29123BFC6462B), LazyThreadSafetyMode.None); + public string IsAttackingKey { get { - var ptr = _Handle.Read(Schema.GetOffset(0x3FB29123BFC6462B)); + var ptr = _Handle.Read(_IsAttackingKeyOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x3FB29123BFC6462B, value); + set => Schema.SetString(_Handle, _IsAttackingKeyOffset.Value, value); } + private static readonly Lazy _ActionTimerOffset = new(() => Schema.GetOffset(0x3FB291238777F414), LazyThreadSafetyMode.None); + public CountdownTimer ActionTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x3FB291238777F414)); + get => new CountdownTimerImpl(_Handle + _ActionTimerOffset.Value); } + private static readonly Lazy _CrouchingOffset = new(() => Schema.GetOffset(0x3FB291232DA51BAD), LazyThreadSafetyMode.None); + public ref bool Crouching { - get => ref _Handle.AsRef(Schema.GetOffset(0x3FB291232DA51BAD)); + get => ref _Handle.AsRef(_CrouchingOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtActionMoveToImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtActionMoveToImpl.cs index 0dbff7a5b..f7a0339b4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtActionMoveToImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtActionMoveToImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,59 +17,87 @@ internal partial class CBtActionMoveToImpl : CBtNodeImpl, CBtActionMoveTo { public CBtActionMoveToImpl(nint handle) : base(handle) { } + private static readonly Lazy _DestinationInputKeyOffset = new(() => Schema.GetOffset(0xD3E75386EA98FEAB), LazyThreadSafetyMode.None); + public string DestinationInputKey { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD3E75386EA98FEAB)); + var ptr = _Handle.Read(_DestinationInputKeyOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD3E75386EA98FEAB, value); + set => Schema.SetString(_Handle, _DestinationInputKeyOffset.Value, value); } + private static readonly Lazy _HidingSpotInputKeyOffset = new(() => Schema.GetOffset(0xD3E75386B3449D70), LazyThreadSafetyMode.None); + public string HidingSpotInputKey { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD3E75386B3449D70)); + var ptr = _Handle.Read(_HidingSpotInputKeyOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD3E75386B3449D70, value); + set => Schema.SetString(_Handle, _HidingSpotInputKeyOffset.Value, value); } + private static readonly Lazy _ThreatInputKeyOffset = new(() => Schema.GetOffset(0xD3E75386E8FD875B), LazyThreadSafetyMode.None); + public string ThreatInputKey { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD3E75386E8FD875B)); + var ptr = _Handle.Read(_ThreatInputKeyOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD3E75386E8FD875B, value); + set => Schema.SetString(_Handle, _ThreatInputKeyOffset.Value, value); } + private static readonly Lazy _DestinationOffset = new(() => Schema.GetOffset(0xD3E753868964CB9F), LazyThreadSafetyMode.None); + public ref Vector Destination { - get => ref _Handle.AsRef(Schema.GetOffset(0xD3E753868964CB9F)); + get => ref _Handle.AsRef(_DestinationOffset.Value); } + private static readonly Lazy _AutoLookAdjustOffset = new(() => Schema.GetOffset(0xD3E75386CC24EFB6), LazyThreadSafetyMode.None); + public ref bool AutoLookAdjust { - get => ref _Handle.AsRef(Schema.GetOffset(0xD3E75386CC24EFB6)); + get => ref _Handle.AsRef(_AutoLookAdjustOffset.Value); } + private static readonly Lazy _ComputePathOffset = new(() => Schema.GetOffset(0xD3E75386E6332AE9), LazyThreadSafetyMode.None); + public ref bool ComputePath { - get => ref _Handle.AsRef(Schema.GetOffset(0xD3E75386E6332AE9)); + get => ref _Handle.AsRef(_ComputePathOffset.Value); } + private static readonly Lazy _DamagingAreasPenaltyCostOffset = new(() => Schema.GetOffset(0xD3E753868B6813F3), LazyThreadSafetyMode.None); + public ref float DamagingAreasPenaltyCost { - get => ref _Handle.AsRef(Schema.GetOffset(0xD3E753868B6813F3)); + get => ref _Handle.AsRef(_DamagingAreasPenaltyCostOffset.Value); } + private static readonly Lazy _CheckApproximateCornersTimerOffset = new(() => Schema.GetOffset(0xD3E7538689360D84), LazyThreadSafetyMode.None); + public CountdownTimer CheckApproximateCornersTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0xD3E7538689360D84)); + get => new CountdownTimerImpl(_Handle + _CheckApproximateCornersTimerOffset.Value); } + private static readonly Lazy _CheckHighPriorityItemOffset = new(() => Schema.GetOffset(0xD3E7538619EE60B4), LazyThreadSafetyMode.None); + public CountdownTimer CheckHighPriorityItem { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0xD3E7538619EE60B4)); + get => new CountdownTimerImpl(_Handle + _CheckHighPriorityItemOffset.Value); } + private static readonly Lazy _RepathTimerOffset = new(() => Schema.GetOffset(0xD3E753866BF3B99C), LazyThreadSafetyMode.None); + public CountdownTimer RepathTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0xD3E753866BF3B99C)); + get => new CountdownTimerImpl(_Handle + _RepathTimerOffset.Value); } + private static readonly Lazy _ArrivalEpsilonOffset = new(() => Schema.GetOffset(0xD3E75386193730DE), LazyThreadSafetyMode.None); + public ref float ArrivalEpsilon { - get => ref _Handle.AsRef(Schema.GetOffset(0xD3E75386193730DE)); + get => ref _Handle.AsRef(_ArrivalEpsilonOffset.Value); } + private static readonly Lazy _AdditionalArrivalEpsilon2DOffset = new(() => Schema.GetOffset(0xD3E7538601105845), LazyThreadSafetyMode.None); + public ref float AdditionalArrivalEpsilon2D { - get => ref _Handle.AsRef(Schema.GetOffset(0xD3E7538601105845)); + get => ref _Handle.AsRef(_AdditionalArrivalEpsilon2DOffset.Value); } + private static readonly Lazy _HidingSpotCheckDistanceThresholdOffset = new(() => Schema.GetOffset(0xD3E75386BA171B2E), LazyThreadSafetyMode.None); + public ref float HidingSpotCheckDistanceThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0xD3E75386BA171B2E)); + get => ref _Handle.AsRef(_HidingSpotCheckDistanceThresholdOffset.Value); } + private static readonly Lazy _NearestAreaDistanceThresholdOffset = new(() => Schema.GetOffset(0xD3E75386C5DEF260), LazyThreadSafetyMode.None); + public ref float NearestAreaDistanceThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0xD3E75386C5DEF260)); + get => ref _Handle.AsRef(_NearestAreaDistanceThresholdOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtActionParachutePositioningImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtActionParachutePositioningImpl.cs index 4bd886acb..b15724ae0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtActionParachutePositioningImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtActionParachutePositioningImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CBtActionParachutePositioningImpl : CBtNodeImpl, CBtActio public CBtActionParachutePositioningImpl(nint handle) : base(handle) { } + private static readonly Lazy _ActionTimerOffset = new(() => Schema.GetOffset(0x132D0F5E8777F414), LazyThreadSafetyMode.None); + public CountdownTimer ActionTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x132D0F5E8777F414)); + get => new CountdownTimerImpl(_Handle + _ActionTimerOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeCompositeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeCompositeImpl.cs index 026bc68a4..1a903546a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeCompositeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeCompositeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeConditionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeConditionImpl.cs index 196d3123c..1acc05ff9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeConditionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeConditionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CBtNodeConditionImpl : CBtNodeDecoratorImpl, CBtNodeCondi public CBtNodeConditionImpl(nint handle) : base(handle) { } + private static readonly Lazy _NegatedOffset = new(() => Schema.GetOffset(0xD9C2E7ED3803BF0D), LazyThreadSafetyMode.None); + public ref bool Negated { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9C2E7ED3803BF0D)); + get => ref _Handle.AsRef(_NegatedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeConditionInactiveImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeConditionInactiveImpl.cs index fd41ace33..e4e2cf689 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeConditionInactiveImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeConditionInactiveImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CBtNodeConditionInactiveImpl : CBtNodeConditionImpl, CBtN public CBtNodeConditionInactiveImpl(nint handle) : base(handle) { } + private static readonly Lazy _RoundStartThresholdSecondsOffset = new(() => Schema.GetOffset(0x1AB44FB08A52CC47), LazyThreadSafetyMode.None); + public ref float RoundStartThresholdSeconds { - get => ref _Handle.AsRef(Schema.GetOffset(0x1AB44FB08A52CC47)); + get => ref _Handle.AsRef(_RoundStartThresholdSecondsOffset.Value); } + private static readonly Lazy _SensorInactivityThresholdSecondsOffset = new(() => Schema.GetOffset(0x1AB44FB07E66A29F), LazyThreadSafetyMode.None); + public ref float SensorInactivityThresholdSeconds { - get => ref _Handle.AsRef(Schema.GetOffset(0x1AB44FB07E66A29F)); + get => ref _Handle.AsRef(_SensorInactivityThresholdSecondsOffset.Value); } + private static readonly Lazy _SensorInactivityTimerOffset = new(() => Schema.GetOffset(0x1AB44FB0D921DF72), LazyThreadSafetyMode.None); + public CountdownTimer SensorInactivityTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1AB44FB0D921DF72)); + get => new CountdownTimerImpl(_Handle + _SensorInactivityTimerOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeDecoratorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeDecoratorImpl.cs index 01899026a..180eb768f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeDecoratorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeDecoratorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeImpl.cs index 6ce9f9ba8..f9c401854 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBtNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBuoyancyHelperImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBuoyancyHelperImpl.cs index 9f0da7160..b7fb02686 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBuoyancyHelperImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBuoyancyHelperImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class CBuoyancyHelperImpl : SchemaClass, CBuoyancyHelper { public CBuoyancyHelperImpl(nint handle) : base(handle) { } + private static readonly Lazy _FluidTypeOffset = new(() => Schema.GetOffset(0x7A9E77003D45CF5F), LazyThreadSafetyMode.None); + public ref CUtlStringToken FluidType { - get => ref _Handle.AsRef(Schema.GetOffset(0x7A9E77003D45CF5F)); + get => ref _Handle.AsRef(_FluidTypeOffset.Value); } + private static readonly Lazy _FluidDensityOffset = new(() => Schema.GetOffset(0x7A9E7700DABBC5A3), LazyThreadSafetyMode.None); + public ref float FluidDensity { - get => ref _Handle.AsRef(Schema.GetOffset(0x7A9E7700DABBC5A3)); + get => ref _Handle.AsRef(_FluidDensityOffset.Value); } + private static readonly Lazy _NeutrallyBuoyantGravityOffset = new(() => Schema.GetOffset(0x7A9E77007EFB6975), LazyThreadSafetyMode.None); + public ref float NeutrallyBuoyantGravity { - get => ref _Handle.AsRef(Schema.GetOffset(0x7A9E77007EFB6975)); + get => ref _Handle.AsRef(_NeutrallyBuoyantGravityOffset.Value); } + private static readonly Lazy _NeutrallyBuoyantLinearDampingOffset = new(() => Schema.GetOffset(0x7A9E7700F2B7E456), LazyThreadSafetyMode.None); + public ref float NeutrallyBuoyantLinearDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0x7A9E7700F2B7E456)); + get => ref _Handle.AsRef(_NeutrallyBuoyantLinearDampingOffset.Value); } + private static readonly Lazy _NeutrallyBuoyantAngularDampingOffset = new(() => Schema.GetOffset(0x7A9E770013DF82F1), LazyThreadSafetyMode.None); + public ref float NeutrallyBuoyantAngularDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0x7A9E770013DF82F1)); + get => ref _Handle.AsRef(_NeutrallyBuoyantAngularDampingOffset.Value); } + private static readonly Lazy _NeutrallyBuoyantOffset = new(() => Schema.GetOffset(0x7A9E7700D0DF6ADF), LazyThreadSafetyMode.None); + public ref bool NeutrallyBuoyant { - get => ref _Handle.AsRef(Schema.GetOffset(0x7A9E7700D0DF6ADF)); + get => ref _Handle.AsRef(_NeutrallyBuoyantOffset.Value); } + private static readonly Lazy _FractionOfWheelSubmergedForWheelFrictionOffset = new(() => Schema.GetOffset(0x7A9E77009D5C3295), LazyThreadSafetyMode.None); + public ref CUtlVector FractionOfWheelSubmergedForWheelFriction { - get => ref _Handle.AsRef>(Schema.GetOffset(0x7A9E77009D5C3295)); + get => ref _Handle.AsRef>(_FractionOfWheelSubmergedForWheelFrictionOffset.Value); } + private static readonly Lazy _WheelFrictionScalesOffset = new(() => Schema.GetOffset(0x7A9E77005D5150ED), LazyThreadSafetyMode.None); + public ref CUtlVector WheelFrictionScales { - get => ref _Handle.AsRef>(Schema.GetOffset(0x7A9E77005D5150ED)); + get => ref _Handle.AsRef>(_WheelFrictionScalesOffset.Value); } + private static readonly Lazy _FractionOfWheelSubmergedForWheelDragOffset = new(() => Schema.GetOffset(0x7A9E7700E1C2C831), LazyThreadSafetyMode.None); + public ref CUtlVector FractionOfWheelSubmergedForWheelDrag { - get => ref _Handle.AsRef>(Schema.GetOffset(0x7A9E7700E1C2C831)); + get => ref _Handle.AsRef>(_FractionOfWheelSubmergedForWheelDragOffset.Value); } + private static readonly Lazy _WheelDragOffset = new(() => Schema.GetOffset(0x7A9E7700E95C5D6E), LazyThreadSafetyMode.None); + public ref CUtlVector WheelDrag { - get => ref _Handle.AsRef>(Schema.GetOffset(0x7A9E7700E95C5D6E)); + get => ref _Handle.AsRef>(_WheelDragOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBuyZoneImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBuyZoneImpl.cs index 0bcb37b63..b7d76fdc0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBuyZoneImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CBuyZoneImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CBuyZoneImpl : CBaseTriggerImpl, CBuyZone { public CBuyZoneImpl(nint handle) : base(handle) { } + private static readonly Lazy _LegacyTeamNumOffset = new(() => Schema.GetOffset(0xB8D4DAC44C92565), LazyThreadSafetyMode.None); + public ref int LegacyTeamNum { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8D4DAC44C92565)); + get => ref _Handle.AsRef(_LegacyTeamNumOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CC4Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CC4Impl.cs index 9545b2cda..2f9b75f1c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CC4Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CC4Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,58 @@ internal partial class CC4Impl : CCSWeaponBaseImpl, CC4 { public CC4Impl(nint handle) : base(handle) { } + private static readonly Lazy _LastValidPlayerHeldPositionOffset = new(() => Schema.GetOffset(0x1D49B0B580F67DBC), LazyThreadSafetyMode.None); + public ref Vector LastValidPlayerHeldPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x1D49B0B580F67DBC)); + get => ref _Handle.AsRef(_LastValidPlayerHeldPositionOffset.Value); } + private static readonly Lazy _LastValidDroppedPositionOffset = new(() => Schema.GetOffset(0x1D49B0B552BFA49A), LazyThreadSafetyMode.None); + public ref Vector LastValidDroppedPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x1D49B0B552BFA49A)); + get => ref _Handle.AsRef(_LastValidDroppedPositionOffset.Value); } + private static readonly Lazy _DoValidDroppedPositionCheckOffset = new(() => Schema.GetOffset(0x1D49B0B586C3166D), LazyThreadSafetyMode.None); + public ref bool DoValidDroppedPositionCheck { - get => ref _Handle.AsRef(Schema.GetOffset(0x1D49B0B586C3166D)); + get => ref _Handle.AsRef(_DoValidDroppedPositionCheckOffset.Value); } + private static readonly Lazy _StartedArmingOffset = new(() => Schema.GetOffset(0x1D49B0B5BE331CA8), LazyThreadSafetyMode.None); + public ref bool StartedArming { - get => ref _Handle.AsRef(Schema.GetOffset(0x1D49B0B5BE331CA8)); + get => ref _Handle.AsRef(_StartedArmingOffset.Value); } + private static readonly Lazy _ArmedTimeOffset = new(() => Schema.GetOffset(0x1D49B0B54C4C86C9), LazyThreadSafetyMode.None); + public GameTime_t ArmedTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1D49B0B54C4C86C9)); + get => new GameTime_tImpl(_Handle + _ArmedTimeOffset.Value); } + private static readonly Lazy _BombPlacedAnimationOffset = new(() => Schema.GetOffset(0x1D49B0B52F5F9F2A), LazyThreadSafetyMode.None); + public ref bool BombPlacedAnimation { - get => ref _Handle.AsRef(Schema.GetOffset(0x1D49B0B52F5F9F2A)); + get => ref _Handle.AsRef(_BombPlacedAnimationOffset.Value); } + private static readonly Lazy _IsPlantingViaUseOffset = new(() => Schema.GetOffset(0x1D49B0B566506CF1), LazyThreadSafetyMode.None); + public ref bool IsPlantingViaUse { - get => ref _Handle.AsRef(Schema.GetOffset(0x1D49B0B566506CF1)); + get => ref _Handle.AsRef(_IsPlantingViaUseOffset.Value); } + private static readonly Lazy _EntitySpottedStateOffset = new(() => Schema.GetOffset(0x1D49B0B5032B547C), LazyThreadSafetyMode.None); + public EntitySpottedState_t EntitySpottedState { - get => new EntitySpottedState_tImpl(_Handle + Schema.GetOffset(0x1D49B0B5032B547C)); + get => new EntitySpottedState_tImpl(_Handle + _EntitySpottedStateOffset.Value); } + private static readonly Lazy _SpotRulesOffset = new(() => Schema.GetOffset(0x1D49B0B5776CCE44), LazyThreadSafetyMode.None); + public ref int SpotRules { - get => ref _Handle.AsRef(Schema.GetOffset(0x1D49B0B5776CCE44)); + get => ref _Handle.AsRef(_SpotRulesOffset.Value); } public ISchemaFixedArray PlayedArmingBeeps { get => new SchemaFixedArray(_Handle, 0x1D49B0B525D5D369, 7, 1, 1); } + private static readonly Lazy _BombPlantedOffset = new(() => Schema.GetOffset(0x1D49B0B53C00B55F), LazyThreadSafetyMode.None); + public ref bool BombPlanted { - get => ref _Handle.AsRef(Schema.GetOffset(0x1D49B0B53C00B55F)); + get => ref _Handle.AsRef(_BombPlantedOffset.Value); } public void StartedArmingUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCPPScriptComponentUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCPPScriptComponentUpdaterImpl.cs index 2795e373d..dde07e37b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCPPScriptComponentUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCPPScriptComponentUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CCPPScriptComponentUpdaterImpl : CAnimComponentUpdaterImp public CCPPScriptComponentUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScriptsToRunOffset = new(() => Schema.GetOffset(0x4785DAC8378F3E0F), LazyThreadSafetyMode.None); + public ref CUtlVector ScriptsToRun { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4785DAC8378F3E0F)); + get => ref _Handle.AsRef>(_ScriptsToRunOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCS2ChickenGraphControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCS2ChickenGraphControllerImpl.cs index 6f5124560..db008a8a4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCS2ChickenGraphControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCS2ChickenGraphControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class CCS2ChickenGraphControllerImpl : CAnimGraphControllerBase public CCS2ChickenGraphControllerImpl(nint handle) : base(handle) { } + private static readonly Lazy _ActionOffset = new(() => Schema.GetOffset(0xC887F1577918619F), LazyThreadSafetyMode.None); + public SchemaUntypedField Action { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC887F1577918619F)); + get => new SchemaUntypedField(_Handle + _ActionOffset.Value); } + private static readonly Lazy _ActionSubtypeOffset = new(() => Schema.GetOffset(0xC887F157FC94FE0B), LazyThreadSafetyMode.None); + public SchemaUntypedField ActionSubtype { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC887F157FC94FE0B)); + get => new SchemaUntypedField(_Handle + _ActionSubtypeOffset.Value); } + private static readonly Lazy _ActionResetOffset = new(() => Schema.GetOffset(0xC887F157580F422E), LazyThreadSafetyMode.None); + public SchemaUntypedField ActionReset { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC887F157580F422E)); + get => new SchemaUntypedField(_Handle + _ActionResetOffset.Value); } + private static readonly Lazy _IdleVariationOffset = new(() => Schema.GetOffset(0xC887F157CF0EF118), LazyThreadSafetyMode.None); + public SchemaUntypedField IdleVariation { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC887F157CF0EF118)); + get => new SchemaUntypedField(_Handle + _IdleVariationOffset.Value); } + private static readonly Lazy _RunVariationOffset = new(() => Schema.GetOffset(0xC887F1575E32595B), LazyThreadSafetyMode.None); + public SchemaUntypedField RunVariation { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC887F1575E32595B)); + get => new SchemaUntypedField(_Handle + _RunVariationOffset.Value); } + private static readonly Lazy _PanicVariationOffset = new(() => Schema.GetOffset(0xC887F157802F1EA1), LazyThreadSafetyMode.None); + public SchemaUntypedField PanicVariation { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC887F157802F1EA1)); + get => new SchemaUntypedField(_Handle + _PanicVariationOffset.Value); } + private static readonly Lazy _SquatVariationOffset = new(() => Schema.GetOffset(0xC887F15791127162), LazyThreadSafetyMode.None); + public SchemaUntypedField SquatVariation { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC887F15791127162)); + get => new SchemaUntypedField(_Handle + _SquatVariationOffset.Value); } + private static readonly Lazy _InWaterOffset = new(() => Schema.GetOffset(0xC887F157E47F9BA9), LazyThreadSafetyMode.None); + public SchemaUntypedField InWater { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC887F157E47F9BA9)); + get => new SchemaUntypedField(_Handle + _InWaterOffset.Value); } + private static readonly Lazy _HasActionCompletedEventOffset = new(() => Schema.GetOffset(0xC887F157CD4A37EA), LazyThreadSafetyMode.None); + public ref bool HasActionCompletedEvent { - get => ref _Handle.AsRef(Schema.GetOffset(0xC887F157CD4A37EA)); + get => ref _Handle.AsRef(_HasActionCompletedEventOffset.Value); } + private static readonly Lazy _WaitingForCompletedEventOffset = new(() => Schema.GetOffset(0xC887F15754876F98), LazyThreadSafetyMode.None); + public ref bool WaitingForCompletedEvent { - get => ref _Handle.AsRef(Schema.GetOffset(0xC887F15754876F98)); + get => ref _Handle.AsRef(_WaitingForCompletedEventOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCS2WeaponGraphControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCS2WeaponGraphControllerImpl.cs index 6dc4a5081..06870aca7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCS2WeaponGraphControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCS2WeaponGraphControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,62 +17,105 @@ internal partial class CCS2WeaponGraphControllerImpl : CAnimGraphControllerBaseI public CCS2WeaponGraphControllerImpl(nint handle) : base(handle) { } + private static readonly Lazy _ActionOffset = new(() => Schema.GetOffset(0x8553337E7918619F), LazyThreadSafetyMode.None); + public SchemaUntypedField Action { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337E7918619F)); + get => new SchemaUntypedField(_Handle + _ActionOffset.Value); } + private static readonly Lazy _ActionResetOffset = new(() => Schema.GetOffset(0x8553337E580F422E), LazyThreadSafetyMode.None); + public SchemaUntypedField ActionReset { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337E580F422E)); + get => new SchemaUntypedField(_Handle + _ActionResetOffset.Value); + } + private static readonly Lazy _WeaponActionSpeedScaleOffset = new(() => Schema.GetOffset(0x8553337EC667EC52), LazyThreadSafetyMode.None); + + public SchemaUntypedField WeaponActionSpeedScale { + get => new SchemaUntypedField(_Handle + _WeaponActionSpeedScaleOffset.Value); } + private static readonly Lazy _WeaponCategoryOffset = new(() => Schema.GetOffset(0x8553337EE2B7A95D), LazyThreadSafetyMode.None); + public SchemaUntypedField WeaponCategory { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337EE2B7A95D)); + get => new SchemaUntypedField(_Handle + _WeaponCategoryOffset.Value); } + private static readonly Lazy _WeaponTypeOffset = new(() => Schema.GetOffset(0x8553337E0C0E3309), LazyThreadSafetyMode.None); + public SchemaUntypedField WeaponType { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337E0C0E3309)); + get => new SchemaUntypedField(_Handle + _WeaponTypeOffset.Value); } + private static readonly Lazy _WeaponExtraInfoOffset = new(() => Schema.GetOffset(0x8553337EF4004D3D), LazyThreadSafetyMode.None); + public SchemaUntypedField WeaponExtraInfo { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337EF4004D3D)); + get => new SchemaUntypedField(_Handle + _WeaponExtraInfoOffset.Value); } + private static readonly Lazy _WeaponAmmoOffset = new(() => Schema.GetOffset(0x8553337ED1A06C75), LazyThreadSafetyMode.None); + public SchemaUntypedField WeaponAmmo { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337ED1A06C75)); + get => new SchemaUntypedField(_Handle + _WeaponAmmoOffset.Value); } + private static readonly Lazy _WeaponAmmoMaxOffset = new(() => Schema.GetOffset(0x8553337EEE4C1969), LazyThreadSafetyMode.None); + public SchemaUntypedField WeaponAmmoMax { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337EEE4C1969)); + get => new SchemaUntypedField(_Handle + _WeaponAmmoMaxOffset.Value); } + private static readonly Lazy _WeaponAmmoReserveOffset = new(() => Schema.GetOffset(0x8553337E000AC7BB), LazyThreadSafetyMode.None); + public SchemaUntypedField WeaponAmmoReserve { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337E000AC7BB)); + get => new SchemaUntypedField(_Handle + _WeaponAmmoReserveOffset.Value); } + private static readonly Lazy _WeaponIsSilencedOffset = new(() => Schema.GetOffset(0x8553337EBF4E259C), LazyThreadSafetyMode.None); + public SchemaUntypedField WeaponIsSilenced { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337EBF4E259C)); + get => new SchemaUntypedField(_Handle + _WeaponIsSilencedOffset.Value); } + private static readonly Lazy _WeaponIronsightAmountOffset = new(() => Schema.GetOffset(0x8553337E4239F6F6), LazyThreadSafetyMode.None); + public SchemaUntypedField WeaponIronsightAmount { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337E4239F6F6)); + get => new SchemaUntypedField(_Handle + _WeaponIronsightAmountOffset.Value); } + private static readonly Lazy _IsUsingLegacyModelOffset = new(() => Schema.GetOffset(0x8553337EBA564E5D), LazyThreadSafetyMode.None); + public SchemaUntypedField IsUsingLegacyModel { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337EBA564E5D)); + get => new SchemaUntypedField(_Handle + _IsUsingLegacyModelOffset.Value); } + private static readonly Lazy _IdleVariationOffset = new(() => Schema.GetOffset(0x8553337ECF0EF118), LazyThreadSafetyMode.None); + public SchemaUntypedField IdleVariation { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337ECF0EF118)); + get => new SchemaUntypedField(_Handle + _IdleVariationOffset.Value); } + private static readonly Lazy _DeployVariationOffset = new(() => Schema.GetOffset(0x8553337E95BD68D7), LazyThreadSafetyMode.None); + public SchemaUntypedField DeployVariation { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337E95BD68D7)); + get => new SchemaUntypedField(_Handle + _DeployVariationOffset.Value); } + private static readonly Lazy _AttackTypeOffset = new(() => Schema.GetOffset(0x8553337E0CCFAC15), LazyThreadSafetyMode.None); + public SchemaUntypedField AttackType { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337E0CCFAC15)); + get => new SchemaUntypedField(_Handle + _AttackTypeOffset.Value); } + private static readonly Lazy _AttackThrowStrengthOffset = new(() => Schema.GetOffset(0x8553337EB4387222), LazyThreadSafetyMode.None); + public SchemaUntypedField AttackThrowStrength { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337EB4387222)); + get => new SchemaUntypedField(_Handle + _AttackThrowStrengthOffset.Value); } + private static readonly Lazy _AttackVariationOffset = new(() => Schema.GetOffset(0x8553337E70A63014), LazyThreadSafetyMode.None); + public SchemaUntypedField AttackVariation { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337E70A63014)); + get => new SchemaUntypedField(_Handle + _AttackVariationOffset.Value); } + private static readonly Lazy _InspectVariationOffset = new(() => Schema.GetOffset(0x8553337EBDFCECA4), LazyThreadSafetyMode.None); + public SchemaUntypedField InspectVariation { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337EBDFCECA4)); + get => new SchemaUntypedField(_Handle + _InspectVariationOffset.Value); } + private static readonly Lazy _InspectExtraInfoOffset = new(() => Schema.GetOffset(0x8553337EF50D283F), LazyThreadSafetyMode.None); + public SchemaUntypedField InspectExtraInfo { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337EF50D283F)); + get => new SchemaUntypedField(_Handle + _InspectExtraInfoOffset.Value); } + private static readonly Lazy _ReloadStageOffset = new(() => Schema.GetOffset(0x8553337E7F8E072A), LazyThreadSafetyMode.None); + public SchemaUntypedField ReloadStage { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8553337E7F8E072A)); + get => new SchemaUntypedField(_Handle + _ReloadStageOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSBotImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSBotImpl.cs index 392c23e7c..90fdaef5c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSBotImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSBotImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,433 +17,707 @@ internal partial class CCSBotImpl : CBotImpl, CCSBot { public CCSBotImpl(nint handle) : base(handle) { } + private static readonly Lazy _EyePositionOffset = new(() => Schema.GetOffset(0x1CFE165D847A3605), LazyThreadSafetyMode.None); + public ref Vector EyePosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D847A3605)); + get => ref _Handle.AsRef(_EyePositionOffset.Value); } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x1CFE165D4D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle + Schema.GetOffset(0x1CFE165D4D8F5786); + var ptr = _Handle + _NameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x1CFE165D4D8F5786, value, 64); + set => Schema.SetFixedString(_Handle, _NameOffset.Value, value, 64); } + private static readonly Lazy _CombatRangeOffset = new(() => Schema.GetOffset(0x1CFE165D7FF44CAE), LazyThreadSafetyMode.None); + public ref float CombatRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D7FF44CAE)); + get => ref _Handle.AsRef(_CombatRangeOffset.Value); } + private static readonly Lazy _IsRogueOffset = new(() => Schema.GetOffset(0x1CFE165DE8EBF51D), LazyThreadSafetyMode.None); + public ref bool IsRogue { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DE8EBF51D)); + get => ref _Handle.AsRef(_IsRogueOffset.Value); } + private static readonly Lazy _RogueTimerOffset = new(() => Schema.GetOffset(0x1CFE165D9929D03A), LazyThreadSafetyMode.None); + public CountdownTimer RogueTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D9929D03A)); + get => new CountdownTimerImpl(_Handle + _RogueTimerOffset.Value); } + private static readonly Lazy _DiedLastRoundOffset = new(() => Schema.GetOffset(0x1CFE165D7918194D), LazyThreadSafetyMode.None); + public ref bool DiedLastRound { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D7918194D)); + get => ref _Handle.AsRef(_DiedLastRoundOffset.Value); } + private static readonly Lazy _SafeTimeOffset = new(() => Schema.GetOffset(0x1CFE165DCD4F2CB1), LazyThreadSafetyMode.None); + public ref float SafeTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DCD4F2CB1)); + get => ref _Handle.AsRef(_SafeTimeOffset.Value); } + private static readonly Lazy _WasSafeOffset = new(() => Schema.GetOffset(0x1CFE165D6A526C0F), LazyThreadSafetyMode.None); + public ref bool WasSafe { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D6A526C0F)); + get => ref _Handle.AsRef(_WasSafeOffset.Value); } + private static readonly Lazy _BlindFireOffset = new(() => Schema.GetOffset(0x1CFE165D5C84B7B8), LazyThreadSafetyMode.None); + public ref bool BlindFire { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D5C84B7B8)); + get => ref _Handle.AsRef(_BlindFireOffset.Value); } + private static readonly Lazy _SurpriseTimerOffset = new(() => Schema.GetOffset(0x1CFE165DA36B5C8B), LazyThreadSafetyMode.None); + public CountdownTimer SurpriseTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165DA36B5C8B)); + get => new CountdownTimerImpl(_Handle + _SurpriseTimerOffset.Value); } + private static readonly Lazy _AllowActiveOffset = new(() => Schema.GetOffset(0x1CFE165DED9989D4), LazyThreadSafetyMode.None); + public ref bool AllowActive { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DED9989D4)); + get => ref _Handle.AsRef(_AllowActiveOffset.Value); } + private static readonly Lazy _IsFollowingOffset = new(() => Schema.GetOffset(0x1CFE165D985B15A8), LazyThreadSafetyMode.None); + public ref bool IsFollowing { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D985B15A8)); + get => ref _Handle.AsRef(_IsFollowingOffset.Value); } + private static readonly Lazy _LeaderOffset = new(() => Schema.GetOffset(0x1CFE165D658B4E84), LazyThreadSafetyMode.None); + public ref CHandle Leader { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1CFE165D658B4E84)); + get => ref _Handle.AsRef>(_LeaderOffset.Value); } + private static readonly Lazy _FollowTimestampOffset = new(() => Schema.GetOffset(0x1CFE165DDF9139C0), LazyThreadSafetyMode.None); + public ref float FollowTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DDF9139C0)); + get => ref _Handle.AsRef(_FollowTimestampOffset.Value); } + private static readonly Lazy _AllowAutoFollowTimeOffset = new(() => Schema.GetOffset(0x1CFE165DA781FC01), LazyThreadSafetyMode.None); + public ref float AllowAutoFollowTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DA781FC01)); + get => ref _Handle.AsRef(_AllowAutoFollowTimeOffset.Value); } + private static readonly Lazy _HurryTimerOffset = new(() => Schema.GetOffset(0x1CFE165DFDAD0CF6), LazyThreadSafetyMode.None); + public CountdownTimer HurryTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165DFDAD0CF6)); + get => new CountdownTimerImpl(_Handle + _HurryTimerOffset.Value); } + private static readonly Lazy _AlertTimerOffset = new(() => Schema.GetOffset(0x1CFE165DCF6A9726), LazyThreadSafetyMode.None); + public CountdownTimer AlertTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165DCF6A9726)); + get => new CountdownTimerImpl(_Handle + _AlertTimerOffset.Value); } + private static readonly Lazy _SneakTimerOffset = new(() => Schema.GetOffset(0x1CFE165D90AB3A2C), LazyThreadSafetyMode.None); + public CountdownTimer SneakTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D90AB3A2C)); + get => new CountdownTimerImpl(_Handle + _SneakTimerOffset.Value); } + private static readonly Lazy _PanicTimerOffset = new(() => Schema.GetOffset(0x1CFE165DD2FFC665), LazyThreadSafetyMode.None); + public CountdownTimer PanicTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165DD2FFC665)); + get => new CountdownTimerImpl(_Handle + _PanicTimerOffset.Value); } + private static readonly Lazy _StateTimestampOffset = new(() => Schema.GetOffset(0x1CFE165D5C65DB5E), LazyThreadSafetyMode.None); + public ref float StateTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D5C65DB5E)); + get => ref _Handle.AsRef(_StateTimestampOffset.Value); } + private static readonly Lazy _IsAttackingOffset = new(() => Schema.GetOffset(0x1CFE165D4115CA53), LazyThreadSafetyMode.None); + public ref bool IsAttacking { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D4115CA53)); + get => ref _Handle.AsRef(_IsAttackingOffset.Value); } + private static readonly Lazy _IsOpeningDoorOffset = new(() => Schema.GetOffset(0x1CFE165D75EC227F), LazyThreadSafetyMode.None); + public ref bool IsOpeningDoor { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D75EC227F)); + get => ref _Handle.AsRef(_IsOpeningDoorOffset.Value); } + private static readonly Lazy _TaskEntityOffset = new(() => Schema.GetOffset(0x1CFE165DF6C25037), LazyThreadSafetyMode.None); + public ref CHandle TaskEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1CFE165DF6C25037)); + get => ref _Handle.AsRef>(_TaskEntityOffset.Value); } + private static readonly Lazy _GoalPositionOffset = new(() => Schema.GetOffset(0x1CFE165D02ACD9A1), LazyThreadSafetyMode.None); + public ref Vector GoalPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D02ACD9A1)); + get => ref _Handle.AsRef(_GoalPositionOffset.Value); } + private static readonly Lazy _GoalEntityOffset = new(() => Schema.GetOffset(0x1CFE165D7C389945), LazyThreadSafetyMode.None); + public ref CHandle GoalEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1CFE165D7C389945)); + get => ref _Handle.AsRef>(_GoalEntityOffset.Value); } + private static readonly Lazy _AvoidOffset = new(() => Schema.GetOffset(0x1CFE165D6F622DBE), LazyThreadSafetyMode.None); + public ref CHandle Avoid { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1CFE165D6F622DBE)); + get => ref _Handle.AsRef>(_AvoidOffset.Value); } + private static readonly Lazy _AvoidTimestampOffset = new(() => Schema.GetOffset(0x1CFE165D6D375DA6), LazyThreadSafetyMode.None); + public ref float AvoidTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D6D375DA6)); + get => ref _Handle.AsRef(_AvoidTimestampOffset.Value); } + private static readonly Lazy _IsStoppingOffset = new(() => Schema.GetOffset(0x1CFE165DD9004179), LazyThreadSafetyMode.None); + public ref bool IsStopping { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DD9004179)); + get => ref _Handle.AsRef(_IsStoppingOffset.Value); } + private static readonly Lazy _HasVisitedEnemySpawnOffset = new(() => Schema.GetOffset(0x1CFE165D37ADF7A0), LazyThreadSafetyMode.None); + public ref bool HasVisitedEnemySpawn { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D37ADF7A0)); + get => ref _Handle.AsRef(_HasVisitedEnemySpawnOffset.Value); } + private static readonly Lazy _StillTimerOffset = new(() => Schema.GetOffset(0x1CFE165D2772246E), LazyThreadSafetyMode.None); + public IntervalTimer StillTimer { - get => new IntervalTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D2772246E)); + get => new IntervalTimerImpl(_Handle + _StillTimerOffset.Value); } + private static readonly Lazy _EyeAnglesUnderPathFinderControlOffset = new(() => Schema.GetOffset(0x1CFE165DA5BDDE74), LazyThreadSafetyMode.None); + public ref bool EyeAnglesUnderPathFinderControl { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DA5BDDE74)); + get => ref _Handle.AsRef(_EyeAnglesUnderPathFinderControlOffset.Value); } + private static readonly Lazy _PathIndexOffset = new(() => Schema.GetOffset(0x1CFE165D1475A65A), LazyThreadSafetyMode.None); + public ref int PathIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D1475A65A)); + get => ref _Handle.AsRef(_PathIndexOffset.Value); } + private static readonly Lazy _AreaEnteredTimestampOffset = new(() => Schema.GetOffset(0x1CFE165D024F57F1), LazyThreadSafetyMode.None); + public GameTime_t AreaEnteredTimestamp { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1CFE165D024F57F1)); + get => new GameTime_tImpl(_Handle + _AreaEnteredTimestampOffset.Value); } + private static readonly Lazy _RepathTimerOffset = new(() => Schema.GetOffset(0x1CFE165D4AEA977C), LazyThreadSafetyMode.None); + public CountdownTimer RepathTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D4AEA977C)); + get => new CountdownTimerImpl(_Handle + _RepathTimerOffset.Value); } + private static readonly Lazy _AvoidFriendTimerOffset = new(() => Schema.GetOffset(0x1CFE165D71F4289B), LazyThreadSafetyMode.None); + public CountdownTimer AvoidFriendTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D71F4289B)); + get => new CountdownTimerImpl(_Handle + _AvoidFriendTimerOffset.Value); } + private static readonly Lazy _IsFriendInTheWayOffset = new(() => Schema.GetOffset(0x1CFE165DF84E085C), LazyThreadSafetyMode.None); + public ref bool IsFriendInTheWay { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DF84E085C)); + get => ref _Handle.AsRef(_IsFriendInTheWayOffset.Value); } + private static readonly Lazy _PoliteTimerOffset = new(() => Schema.GetOffset(0x1CFE165D2C92F065), LazyThreadSafetyMode.None); + public CountdownTimer PoliteTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D2C92F065)); + get => new CountdownTimerImpl(_Handle + _PoliteTimerOffset.Value); } + private static readonly Lazy _IsWaitingBehindFriendOffset = new(() => Schema.GetOffset(0x1CFE165D8D7CD63C), LazyThreadSafetyMode.None); + public ref bool IsWaitingBehindFriend { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D8D7CD63C)); + get => ref _Handle.AsRef(_IsWaitingBehindFriendOffset.Value); } + private static readonly Lazy _PathLadderEndOffset = new(() => Schema.GetOffset(0x1CFE165D1850F03B), LazyThreadSafetyMode.None); + public ref float PathLadderEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D1850F03B)); + get => ref _Handle.AsRef(_PathLadderEndOffset.Value); } + private static readonly Lazy _MustRunTimerOffset = new(() => Schema.GetOffset(0x1CFE165D45DDFB8A), LazyThreadSafetyMode.None); + public CountdownTimer MustRunTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D45DDFB8A)); + get => new CountdownTimerImpl(_Handle + _MustRunTimerOffset.Value); } + private static readonly Lazy _WaitTimerOffset = new(() => Schema.GetOffset(0x1CFE165D65FC5371), LazyThreadSafetyMode.None); + public CountdownTimer WaitTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D65FC5371)); + get => new CountdownTimerImpl(_Handle + _WaitTimerOffset.Value); } + private static readonly Lazy _UpdateTravelDistanceTimerOffset = new(() => Schema.GetOffset(0x1CFE165D67E5EA78), LazyThreadSafetyMode.None); + public CountdownTimer UpdateTravelDistanceTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D67E5EA78)); + get => new CountdownTimerImpl(_Handle + _UpdateTravelDistanceTimerOffset.Value); } public ISchemaFixedArray PlayerTravelDistance { get => new SchemaFixedArray(_Handle, 0x1CFE165DA4B8EEEF, 64, 4, 4); } + private static readonly Lazy _TravelDistancePhaseOffset = new(() => Schema.GetOffset(0x1CFE165D1572AE9D), LazyThreadSafetyMode.None); + public ref byte TravelDistancePhase { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D1572AE9D)); + get => ref _Handle.AsRef(_TravelDistancePhaseOffset.Value); } + private static readonly Lazy _HostageEscortCountOffset = new(() => Schema.GetOffset(0x1CFE165DE7DC72ED), LazyThreadSafetyMode.None); + public ref byte HostageEscortCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DE7DC72ED)); + get => ref _Handle.AsRef(_HostageEscortCountOffset.Value); } + private static readonly Lazy _HostageEscortCountTimestampOffset = new(() => Schema.GetOffset(0x1CFE165D52FB244B), LazyThreadSafetyMode.None); + public ref float HostageEscortCountTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D52FB244B)); + get => ref _Handle.AsRef(_HostageEscortCountTimestampOffset.Value); } + private static readonly Lazy _DesiredTeamOffset = new(() => Schema.GetOffset(0x1CFE165D4C27289C), LazyThreadSafetyMode.None); + public ref int DesiredTeam { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D4C27289C)); + get => ref _Handle.AsRef(_DesiredTeamOffset.Value); } + private static readonly Lazy _HasJoinedOffset = new(() => Schema.GetOffset(0x1CFE165D267EC342), LazyThreadSafetyMode.None); + public ref bool HasJoined { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D267EC342)); + get => ref _Handle.AsRef(_HasJoinedOffset.Value); } + private static readonly Lazy _IsWaitingForHostageOffset = new(() => Schema.GetOffset(0x1CFE165D964A1230), LazyThreadSafetyMode.None); + public ref bool IsWaitingForHostage { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D964A1230)); + get => ref _Handle.AsRef(_IsWaitingForHostageOffset.Value); } + private static readonly Lazy _InhibitWaitingForHostageTimerOffset = new(() => Schema.GetOffset(0x1CFE165D12E79190), LazyThreadSafetyMode.None); + public CountdownTimer InhibitWaitingForHostageTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D12E79190)); + get => new CountdownTimerImpl(_Handle + _InhibitWaitingForHostageTimerOffset.Value); } + private static readonly Lazy _WaitForHostageTimerOffset = new(() => Schema.GetOffset(0x1CFE165D2BFAE489), LazyThreadSafetyMode.None); + public CountdownTimer WaitForHostageTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D2BFAE489)); + get => new CountdownTimerImpl(_Handle + _WaitForHostageTimerOffset.Value); } + private static readonly Lazy _NoisePositionOffset = new(() => Schema.GetOffset(0x1CFE165D95F59336), LazyThreadSafetyMode.None); + public ref Vector NoisePosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D95F59336)); + get => ref _Handle.AsRef(_NoisePositionOffset.Value); } + private static readonly Lazy _NoiseTravelDistanceOffset = new(() => Schema.GetOffset(0x1CFE165DFBC52452), LazyThreadSafetyMode.None); + public ref float NoiseTravelDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DFBC52452)); + get => ref _Handle.AsRef(_NoiseTravelDistanceOffset.Value); } + private static readonly Lazy _NoiseTimestampOffset = new(() => Schema.GetOffset(0x1CFE165D59D7AE8F), LazyThreadSafetyMode.None); + public ref float NoiseTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D59D7AE8F)); + get => ref _Handle.AsRef(_NoiseTimestampOffset.Value); } + private static readonly Lazy _NoiseSourceOffset = new(() => Schema.GetOffset(0x1CFE165D6FD60BAC), LazyThreadSafetyMode.None); + public CCSPlayerPawn? NoiseSource { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1CFE165D6FD60BAC)); + var ptr = _Handle.Read(_NoiseSourceOffset.Value); return ptr.IsValidPtr() ? new CCSPlayerPawnImpl(ptr) : null; } } + private static readonly Lazy _NoiseBendTimerOffset = new(() => Schema.GetOffset(0x1CFE165D0106074F), LazyThreadSafetyMode.None); + public CountdownTimer NoiseBendTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D0106074F)); + get => new CountdownTimerImpl(_Handle + _NoiseBendTimerOffset.Value); } + private static readonly Lazy _BentNoisePositionOffset = new(() => Schema.GetOffset(0x1CFE165DFC0A8717), LazyThreadSafetyMode.None); + public ref Vector BentNoisePosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DFC0A8717)); + get => ref _Handle.AsRef(_BentNoisePositionOffset.Value); } + private static readonly Lazy _BendNoisePositionValidOffset = new(() => Schema.GetOffset(0x1CFE165DD2E17F63), LazyThreadSafetyMode.None); + public ref bool BendNoisePositionValid { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DD2E17F63)); + get => ref _Handle.AsRef(_BendNoisePositionValidOffset.Value); } + private static readonly Lazy _LookAroundStateTimestampOffset = new(() => Schema.GetOffset(0x1CFE165DBB8E8FEC), LazyThreadSafetyMode.None); + public ref float LookAroundStateTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DBB8E8FEC)); + get => ref _Handle.AsRef(_LookAroundStateTimestampOffset.Value); } + private static readonly Lazy _LookAheadAngleOffset = new(() => Schema.GetOffset(0x1CFE165DE1B3AC72), LazyThreadSafetyMode.None); + public ref float LookAheadAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DE1B3AC72)); + get => ref _Handle.AsRef(_LookAheadAngleOffset.Value); } + private static readonly Lazy _ForwardAngleOffset = new(() => Schema.GetOffset(0x1CFE165D1EA773D9), LazyThreadSafetyMode.None); + public ref float ForwardAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D1EA773D9)); + get => ref _Handle.AsRef(_ForwardAngleOffset.Value); } + private static readonly Lazy _InhibitLookAroundTimestampOffset = new(() => Schema.GetOffset(0x1CFE165D42052B3A), LazyThreadSafetyMode.None); + public ref float InhibitLookAroundTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D42052B3A)); + get => ref _Handle.AsRef(_InhibitLookAroundTimestampOffset.Value); } + private static readonly Lazy _LookAtSpotOffset = new(() => Schema.GetOffset(0x1CFE165D979DCA7B), LazyThreadSafetyMode.None); + public ref Vector LookAtSpot { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D979DCA7B)); + get => ref _Handle.AsRef(_LookAtSpotOffset.Value); } + private static readonly Lazy _LookAtSpotDurationOffset = new(() => Schema.GetOffset(0x1CFE165D4E0E35DF), LazyThreadSafetyMode.None); + public ref float LookAtSpotDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D4E0E35DF)); + get => ref _Handle.AsRef(_LookAtSpotDurationOffset.Value); } + private static readonly Lazy _LookAtSpotTimestampOffset = new(() => Schema.GetOffset(0x1CFE165DD82BB759), LazyThreadSafetyMode.None); + public ref float LookAtSpotTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DD82BB759)); + get => ref _Handle.AsRef(_LookAtSpotTimestampOffset.Value); } + private static readonly Lazy _LookAtSpotAngleToleranceOffset = new(() => Schema.GetOffset(0x1CFE165D35DB2DF5), LazyThreadSafetyMode.None); + public ref float LookAtSpotAngleTolerance { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D35DB2DF5)); + get => ref _Handle.AsRef(_LookAtSpotAngleToleranceOffset.Value); } + private static readonly Lazy _LookAtSpotClearIfCloseOffset = new(() => Schema.GetOffset(0x1CFE165D785CD9B9), LazyThreadSafetyMode.None); + public ref bool LookAtSpotClearIfClose { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D785CD9B9)); + get => ref _Handle.AsRef(_LookAtSpotClearIfCloseOffset.Value); } + private static readonly Lazy _LookAtSpotAttackOffset = new(() => Schema.GetOffset(0x1CFE165D89782103), LazyThreadSafetyMode.None); + public ref bool LookAtSpotAttack { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D89782103)); + get => ref _Handle.AsRef(_LookAtSpotAttackOffset.Value); } + private static readonly Lazy _LookAtDescOffset = new(() => Schema.GetOffset(0x1CFE165D1BCD290E), LazyThreadSafetyMode.None); + public string LookAtDesc { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1CFE165D1BCD290E)); + var ptr = _Handle.Read(_LookAtDescOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1CFE165D1BCD290E, value); + set => Schema.SetString(_Handle, _LookAtDescOffset.Value, value); } + private static readonly Lazy _PeripheralTimestampOffset = new(() => Schema.GetOffset(0x1CFE165DEABBC23F), LazyThreadSafetyMode.None); + public ref float PeripheralTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DEABBC23F)); + get => ref _Handle.AsRef(_PeripheralTimestampOffset.Value); } + private static readonly Lazy _ApproachPointCountOffset = new(() => Schema.GetOffset(0x1CFE165DBB4E85C4), LazyThreadSafetyMode.None); + public ref byte ApproachPointCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DBB4E85C4)); + get => ref _Handle.AsRef(_ApproachPointCountOffset.Value); } + private static readonly Lazy _ApproachPointViewPositionOffset = new(() => Schema.GetOffset(0x1CFE165D0EBE87BB), LazyThreadSafetyMode.None); + public ref Vector ApproachPointViewPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D0EBE87BB)); + get => ref _Handle.AsRef(_ApproachPointViewPositionOffset.Value); } + private static readonly Lazy _ViewSteadyTimerOffset = new(() => Schema.GetOffset(0x1CFE165D634A52D7), LazyThreadSafetyMode.None); + public IntervalTimer ViewSteadyTimer { - get => new IntervalTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D634A52D7)); + get => new IntervalTimerImpl(_Handle + _ViewSteadyTimerOffset.Value); } + private static readonly Lazy _TossGrenadeTimerOffset = new(() => Schema.GetOffset(0x1CFE165DB6FBFF99), LazyThreadSafetyMode.None); + public CountdownTimer TossGrenadeTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165DB6FBFF99)); + get => new CountdownTimerImpl(_Handle + _TossGrenadeTimerOffset.Value); } + private static readonly Lazy _IsAvoidingGrenadeOffset = new(() => Schema.GetOffset(0x1CFE165D3ACC70E8), LazyThreadSafetyMode.None); + public CountdownTimer IsAvoidingGrenade { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D3ACC70E8)); + get => new CountdownTimerImpl(_Handle + _IsAvoidingGrenadeOffset.Value); } + private static readonly Lazy _SpotCheckTimestampOffset = new(() => Schema.GetOffset(0x1CFE165D2B46BE5D), LazyThreadSafetyMode.None); + public ref float SpotCheckTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D2B46BE5D)); + get => ref _Handle.AsRef(_SpotCheckTimestampOffset.Value); } + private static readonly Lazy _CheckedHidingSpotCountOffset = new(() => Schema.GetOffset(0x1CFE165D7C1B90E0), LazyThreadSafetyMode.None); + public ref int CheckedHidingSpotCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D7C1B90E0)); + get => ref _Handle.AsRef(_CheckedHidingSpotCountOffset.Value); } + private static readonly Lazy _LookPitchOffset = new(() => Schema.GetOffset(0x1CFE165D9D64CEC4), LazyThreadSafetyMode.None); + public ref float LookPitch { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D9D64CEC4)); + get => ref _Handle.AsRef(_LookPitchOffset.Value); } + private static readonly Lazy _LookPitchVelOffset = new(() => Schema.GetOffset(0x1CFE165D35CDA5BF), LazyThreadSafetyMode.None); + public ref float LookPitchVel { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D35CDA5BF)); + get => ref _Handle.AsRef(_LookPitchVelOffset.Value); } + private static readonly Lazy _LookYawOffset = new(() => Schema.GetOffset(0x1CFE165D84569319), LazyThreadSafetyMode.None); + public ref float LookYaw { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D84569319)); + get => ref _Handle.AsRef(_LookYawOffset.Value); } + private static readonly Lazy _LookYawVelOffset = new(() => Schema.GetOffset(0x1CFE165D66FBE00C), LazyThreadSafetyMode.None); + public ref float LookYawVel { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D66FBE00C)); + get => ref _Handle.AsRef(_LookYawVelOffset.Value); } + private static readonly Lazy _TargetSpotOffset = new(() => Schema.GetOffset(0x1CFE165D322B2410), LazyThreadSafetyMode.None); + public ref Vector TargetSpot { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D322B2410)); + get => ref _Handle.AsRef(_TargetSpotOffset.Value); } + private static readonly Lazy _TargetSpotVelocityOffset = new(() => Schema.GetOffset(0x1CFE165D08431D43), LazyThreadSafetyMode.None); + public ref Vector TargetSpotVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D08431D43)); + get => ref _Handle.AsRef(_TargetSpotVelocityOffset.Value); } + private static readonly Lazy _TargetSpotPredictedOffset = new(() => Schema.GetOffset(0x1CFE165D32A95D44), LazyThreadSafetyMode.None); + public ref Vector TargetSpotPredicted { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D32A95D44)); + get => ref _Handle.AsRef(_TargetSpotPredictedOffset.Value); } + private static readonly Lazy _AimErrorOffset = new(() => Schema.GetOffset(0x1CFE165DB9ECC560), LazyThreadSafetyMode.None); + public ref QAngle AimError { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DB9ECC560)); + get => ref _Handle.AsRef(_AimErrorOffset.Value); } + private static readonly Lazy _AimGoalOffset = new(() => Schema.GetOffset(0x1CFE165DB293A8E9), LazyThreadSafetyMode.None); + public ref QAngle AimGoal { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DB293A8E9)); + get => ref _Handle.AsRef(_AimGoalOffset.Value); } + private static readonly Lazy _TargetSpotTimeOffset = new(() => Schema.GetOffset(0x1CFE165DFAA023C9), LazyThreadSafetyMode.None); + public GameTime_t TargetSpotTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1CFE165DFAA023C9)); + get => new GameTime_tImpl(_Handle + _TargetSpotTimeOffset.Value); } + private static readonly Lazy _AimFocusOffset = new(() => Schema.GetOffset(0x1CFE165DE49DD71A), LazyThreadSafetyMode.None); + public ref float AimFocus { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DE49DD71A)); + get => ref _Handle.AsRef(_AimFocusOffset.Value); } + private static readonly Lazy _AimFocusIntervalOffset = new(() => Schema.GetOffset(0x1CFE165D0D347F6F), LazyThreadSafetyMode.None); + public ref float AimFocusInterval { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D0D347F6F)); + get => ref _Handle.AsRef(_AimFocusIntervalOffset.Value); } + private static readonly Lazy _AimFocusNextUpdateOffset = new(() => Schema.GetOffset(0x1CFE165D171BF4E6), LazyThreadSafetyMode.None); + public GameTime_t AimFocusNextUpdate { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1CFE165D171BF4E6)); + get => new GameTime_tImpl(_Handle + _AimFocusNextUpdateOffset.Value); } + private static readonly Lazy _IgnoreEnemiesTimerOffset = new(() => Schema.GetOffset(0x1CFE165DCFC4C322), LazyThreadSafetyMode.None); + public CountdownTimer IgnoreEnemiesTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165DCFC4C322)); + get => new CountdownTimerImpl(_Handle + _IgnoreEnemiesTimerOffset.Value); } + private static readonly Lazy _EnemyOffset = new(() => Schema.GetOffset(0x1CFE165DD63838CB), LazyThreadSafetyMode.None); + public ref CHandle Enemy { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1CFE165DD63838CB)); + get => ref _Handle.AsRef>(_EnemyOffset.Value); } + private static readonly Lazy _IsEnemyVisibleOffset = new(() => Schema.GetOffset(0x1CFE165D0457F7FF), LazyThreadSafetyMode.None); + public ref bool IsEnemyVisible { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D0457F7FF)); + get => ref _Handle.AsRef(_IsEnemyVisibleOffset.Value); } + private static readonly Lazy _VisibleEnemyPartsOffset = new(() => Schema.GetOffset(0x1CFE165DA37281F3), LazyThreadSafetyMode.None); + public ref byte VisibleEnemyParts { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DA37281F3)); + get => ref _Handle.AsRef(_VisibleEnemyPartsOffset.Value); } + private static readonly Lazy _LastEnemyPositionOffset = new(() => Schema.GetOffset(0x1CFE165DB47A1A44), LazyThreadSafetyMode.None); + public ref Vector LastEnemyPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DB47A1A44)); + get => ref _Handle.AsRef(_LastEnemyPositionOffset.Value); } + private static readonly Lazy _LastSawEnemyTimestampOffset = new(() => Schema.GetOffset(0x1CFE165D0F06E8FA), LazyThreadSafetyMode.None); + public ref float LastSawEnemyTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D0F06E8FA)); + get => ref _Handle.AsRef(_LastSawEnemyTimestampOffset.Value); } + private static readonly Lazy _FirstSawEnemyTimestampOffset = new(() => Schema.GetOffset(0x1CFE165D66361312), LazyThreadSafetyMode.None); + public ref float FirstSawEnemyTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D66361312)); + get => ref _Handle.AsRef(_FirstSawEnemyTimestampOffset.Value); } + private static readonly Lazy _CurrentEnemyAcquireTimestampOffset = new(() => Schema.GetOffset(0x1CFE165D05FE4C96), LazyThreadSafetyMode.None); + public ref float CurrentEnemyAcquireTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D05FE4C96)); + get => ref _Handle.AsRef(_CurrentEnemyAcquireTimestampOffset.Value); } + private static readonly Lazy _EnemyDeathTimestampOffset = new(() => Schema.GetOffset(0x1CFE165D49A3954D), LazyThreadSafetyMode.None); + public ref float EnemyDeathTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D49A3954D)); + get => ref _Handle.AsRef(_EnemyDeathTimestampOffset.Value); } + private static readonly Lazy _FriendDeathTimestampOffset = new(() => Schema.GetOffset(0x1CFE165DC6A37F13), LazyThreadSafetyMode.None); + public ref float FriendDeathTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DC6A37F13)); + get => ref _Handle.AsRef(_FriendDeathTimestampOffset.Value); } + private static readonly Lazy _IsLastEnemyDeadOffset = new(() => Schema.GetOffset(0x1CFE165D12BA73F1), LazyThreadSafetyMode.None); + public ref bool IsLastEnemyDead { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D12BA73F1)); + get => ref _Handle.AsRef(_IsLastEnemyDeadOffset.Value); } + private static readonly Lazy _NearbyEnemyCountOffset = new(() => Schema.GetOffset(0x1CFE165DE4C9C125), LazyThreadSafetyMode.None); + public ref int NearbyEnemyCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DE4C9C125)); + get => ref _Handle.AsRef(_NearbyEnemyCountOffset.Value); } + private static readonly Lazy _BomberOffset = new(() => Schema.GetOffset(0x1CFE165D1F24BFCA), LazyThreadSafetyMode.None); + public ref CHandle Bomber { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1CFE165D1F24BFCA)); + get => ref _Handle.AsRef>(_BomberOffset.Value); } + private static readonly Lazy _NearbyFriendCountOffset = new(() => Schema.GetOffset(0x1CFE165D268D2385), LazyThreadSafetyMode.None); + public ref int NearbyFriendCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D268D2385)); + get => ref _Handle.AsRef(_NearbyFriendCountOffset.Value); } + private static readonly Lazy _ClosestVisibleFriendOffset = new(() => Schema.GetOffset(0x1CFE165DF41BB33A), LazyThreadSafetyMode.None); + public ref CHandle ClosestVisibleFriend { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1CFE165DF41BB33A)); + get => ref _Handle.AsRef>(_ClosestVisibleFriendOffset.Value); } + private static readonly Lazy _ClosestVisibleHumanFriendOffset = new(() => Schema.GetOffset(0x1CFE165D37571CF3), LazyThreadSafetyMode.None); + public ref CHandle ClosestVisibleHumanFriend { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1CFE165D37571CF3)); + get => ref _Handle.AsRef>(_ClosestVisibleHumanFriendOffset.Value); } + private static readonly Lazy _AttentionIntervalOffset = new(() => Schema.GetOffset(0x1CFE165D90537394), LazyThreadSafetyMode.None); + public IntervalTimer AttentionInterval { - get => new IntervalTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D90537394)); + get => new IntervalTimerImpl(_Handle + _AttentionIntervalOffset.Value); } + private static readonly Lazy _AttackerOffset = new(() => Schema.GetOffset(0x1CFE165D3CB57DEE), LazyThreadSafetyMode.None); + public ref CHandle Attacker { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1CFE165D3CB57DEE)); + get => ref _Handle.AsRef>(_AttackerOffset.Value); } + private static readonly Lazy _AttackedTimestampOffset = new(() => Schema.GetOffset(0x1CFE165DC2564304), LazyThreadSafetyMode.None); + public ref float AttackedTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DC2564304)); + get => ref _Handle.AsRef(_AttackedTimestampOffset.Value); } + private static readonly Lazy _BurnedByFlamesTimerOffset = new(() => Schema.GetOffset(0x1CFE165D399D4DA9), LazyThreadSafetyMode.None); + public IntervalTimer BurnedByFlamesTimer { - get => new IntervalTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D399D4DA9)); + get => new IntervalTimerImpl(_Handle + _BurnedByFlamesTimerOffset.Value); } + private static readonly Lazy _LastVictimIDOffset = new(() => Schema.GetOffset(0x1CFE165D8033F8F4), LazyThreadSafetyMode.None); + public ref int LastVictimID { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D8033F8F4)); + get => ref _Handle.AsRef(_LastVictimIDOffset.Value); } + private static readonly Lazy _IsAimingAtEnemyOffset = new(() => Schema.GetOffset(0x1CFE165D0D99047D), LazyThreadSafetyMode.None); + public ref bool IsAimingAtEnemy { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D0D99047D)); + get => ref _Handle.AsRef(_IsAimingAtEnemyOffset.Value); } + private static readonly Lazy _IsRapidFiringOffset = new(() => Schema.GetOffset(0x1CFE165DDE4888E6), LazyThreadSafetyMode.None); + public ref bool IsRapidFiring { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DDE4888E6)); + get => ref _Handle.AsRef(_IsRapidFiringOffset.Value); } + private static readonly Lazy _EquipTimerOffset = new(() => Schema.GetOffset(0x1CFE165D1E504868), LazyThreadSafetyMode.None); + public IntervalTimer EquipTimer { - get => new IntervalTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D1E504868)); + get => new IntervalTimerImpl(_Handle + _EquipTimerOffset.Value); } + private static readonly Lazy _ZoomTimerOffset = new(() => Schema.GetOffset(0x1CFE165D690C50D3), LazyThreadSafetyMode.None); + public CountdownTimer ZoomTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D690C50D3)); + get => new CountdownTimerImpl(_Handle + _ZoomTimerOffset.Value); } + private static readonly Lazy _FireWeaponTimestampOffset = new(() => Schema.GetOffset(0x1CFE165D458E6273), LazyThreadSafetyMode.None); + public GameTime_t FireWeaponTimestamp { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1CFE165D458E6273)); + get => new GameTime_tImpl(_Handle + _FireWeaponTimestampOffset.Value); } + private static readonly Lazy _LookForWeaponsOnGroundTimerOffset = new(() => Schema.GetOffset(0x1CFE165D1A0D7A39), LazyThreadSafetyMode.None); + public CountdownTimer LookForWeaponsOnGroundTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D1A0D7A39)); + get => new CountdownTimerImpl(_Handle + _LookForWeaponsOnGroundTimerOffset.Value); } + private static readonly Lazy _IsSleepingOffset = new(() => Schema.GetOffset(0x1CFE165D360BFBD0), LazyThreadSafetyMode.None); + public ref bool IsSleeping { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D360BFBD0)); + get => ref _Handle.AsRef(_IsSleepingOffset.Value); } + private static readonly Lazy _IsEnemySniperVisibleOffset = new(() => Schema.GetOffset(0x1CFE165DC7EE90F2), LazyThreadSafetyMode.None); + public ref bool IsEnemySniperVisible { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DC7EE90F2)); + get => ref _Handle.AsRef(_IsEnemySniperVisibleOffset.Value); } + private static readonly Lazy _SawEnemySniperTimerOffset = new(() => Schema.GetOffset(0x1CFE165DBB2E748A), LazyThreadSafetyMode.None); + public CountdownTimer SawEnemySniperTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165DBB2E748A)); + get => new CountdownTimerImpl(_Handle + _SawEnemySniperTimerOffset.Value); } + private static readonly Lazy _EnemyQueueIndexOffset = new(() => Schema.GetOffset(0x1CFE165D9D0C9CAE), LazyThreadSafetyMode.None); + public ref byte EnemyQueueIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D9D0C9CAE)); + get => ref _Handle.AsRef(_EnemyQueueIndexOffset.Value); } + private static readonly Lazy _EnemyQueueCountOffset = new(() => Schema.GetOffset(0x1CFE165D8187FF91), LazyThreadSafetyMode.None); + public ref byte EnemyQueueCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D8187FF91)); + get => ref _Handle.AsRef(_EnemyQueueCountOffset.Value); } + private static readonly Lazy _EnemyQueueAttendIndexOffset = new(() => Schema.GetOffset(0x1CFE165D0E18846A), LazyThreadSafetyMode.None); + public ref byte EnemyQueueAttendIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D0E18846A)); + get => ref _Handle.AsRef(_EnemyQueueAttendIndexOffset.Value); } + private static readonly Lazy _IsStuckOffset = new(() => Schema.GetOffset(0x1CFE165D24C49E9B), LazyThreadSafetyMode.None); + public ref bool IsStuck { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D24C49E9B)); + get => ref _Handle.AsRef(_IsStuckOffset.Value); } + private static readonly Lazy _StuckTimestampOffset = new(() => Schema.GetOffset(0x1CFE165D1B5BADA9), LazyThreadSafetyMode.None); + public GameTime_t StuckTimestamp { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1CFE165D1B5BADA9)); + get => new GameTime_tImpl(_Handle + _StuckTimestampOffset.Value); } + private static readonly Lazy _StuckSpotOffset = new(() => Schema.GetOffset(0x1CFE165D0E386143), LazyThreadSafetyMode.None); + public ref Vector StuckSpot { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D0E386143)); + get => ref _Handle.AsRef(_StuckSpotOffset.Value); } + private static readonly Lazy _WiggleTimerOffset = new(() => Schema.GetOffset(0x1CFE165DEDBA9421), LazyThreadSafetyMode.None); + public CountdownTimer WiggleTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165DEDBA9421)); + get => new CountdownTimerImpl(_Handle + _WiggleTimerOffset.Value); } + private static readonly Lazy _StuckJumpTimerOffset = new(() => Schema.GetOffset(0x1CFE165D1C8E034C), LazyThreadSafetyMode.None); + public CountdownTimer StuckJumpTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1CFE165D1C8E034C)); + get => new CountdownTimerImpl(_Handle + _StuckJumpTimerOffset.Value); } + private static readonly Lazy _NextCleanupCheckTimestampOffset = new(() => Schema.GetOffset(0x1CFE165DB61EB6BC), LazyThreadSafetyMode.None); + public GameTime_t NextCleanupCheckTimestamp { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1CFE165DB61EB6BC)); + get => new GameTime_tImpl(_Handle + _NextCleanupCheckTimestampOffset.Value); } public ISchemaFixedArray AvgVel { get => new SchemaFixedArray(_Handle, 0x1CFE165D99077BFE, 10, 4, 4); } + private static readonly Lazy _AvgVelIndexOffset = new(() => Schema.GetOffset(0x1CFE165D17587BC2), LazyThreadSafetyMode.None); + public ref int AvgVelIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D17587BC2)); + get => ref _Handle.AsRef(_AvgVelIndexOffset.Value); } + private static readonly Lazy _AvgVelCountOffset = new(() => Schema.GetOffset(0x1CFE165DF4550CBD), LazyThreadSafetyMode.None); + public ref int AvgVelCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DF4550CBD)); + get => ref _Handle.AsRef(_AvgVelCountOffset.Value); } + private static readonly Lazy _LastOriginOffset = new(() => Schema.GetOffset(0x1CFE165D61FB608B), LazyThreadSafetyMode.None); + public ref Vector LastOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D61FB608B)); + get => ref _Handle.AsRef(_LastOriginOffset.Value); } + private static readonly Lazy _LastRadioRecievedTimestampOffset = new(() => Schema.GetOffset(0x1CFE165D382B6DA1), LazyThreadSafetyMode.None); + public ref float LastRadioRecievedTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D382B6DA1)); + get => ref _Handle.AsRef(_LastRadioRecievedTimestampOffset.Value); } + private static readonly Lazy _LastRadioSentTimestampOffset = new(() => Schema.GetOffset(0x1CFE165D7F5D6086), LazyThreadSafetyMode.None); + public ref float LastRadioSentTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D7F5D6086)); + get => ref _Handle.AsRef(_LastRadioSentTimestampOffset.Value); } + private static readonly Lazy _RadioSubjectOffset = new(() => Schema.GetOffset(0x1CFE165DF4F682DC), LazyThreadSafetyMode.None); + public ref CHandle RadioSubject { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1CFE165DF4F682DC)); + get => ref _Handle.AsRef>(_RadioSubjectOffset.Value); } + private static readonly Lazy _RadioPositionOffset = new(() => Schema.GetOffset(0x1CFE165D08071A87), LazyThreadSafetyMode.None); + public ref Vector RadioPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D08071A87)); + get => ref _Handle.AsRef(_RadioPositionOffset.Value); } + private static readonly Lazy _VoiceEndTimestampOffset = new(() => Schema.GetOffset(0x1CFE165D0035D346), LazyThreadSafetyMode.None); + public ref float VoiceEndTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165D0035D346)); + get => ref _Handle.AsRef(_VoiceEndTimestampOffset.Value); } + private static readonly Lazy _LastValidReactionQueueFrameOffset = new(() => Schema.GetOffset(0x1CFE165DA506BCCE), LazyThreadSafetyMode.None); + public ref int LastValidReactionQueueFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE165DA506BCCE)); + get => ref _Handle.AsRef(_LastValidReactionQueueFrameOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGOPlayerAnimGraphStateImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGOPlayerAnimGraphStateImpl.cs index c23c8a1cb..887825115 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGOPlayerAnimGraphStateImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGOPlayerAnimGraphStateImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamIntroCharacterPositionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamIntroCharacterPositionImpl.cs index 4a2c1dbf1..0786b0074 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamIntroCharacterPositionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamIntroCharacterPositionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamIntroCounterTerroristPositionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamIntroCounterTerroristPositionImpl.cs index 1459b3089..79ed9d997 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamIntroCounterTerroristPositionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamIntroCounterTerroristPositionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamIntroTerroristPositionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamIntroTerroristPositionImpl.cs index 236214875..f44520916 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamIntroTerroristPositionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamIntroTerroristPositionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamPreviewCharacterPositionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamPreviewCharacterPositionImpl.cs index 5a3ea8aa0..135e49459 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamPreviewCharacterPositionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamPreviewCharacterPositionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,33 +17,49 @@ internal partial class CCSGO_TeamPreviewCharacterPositionImpl : CBaseEntityImpl, public CCSGO_TeamPreviewCharacterPositionImpl(nint handle) : base(handle) { } + private static readonly Lazy _VariantOffset = new(() => Schema.GetOffset(0x58B5CA36B2DB2B42), LazyThreadSafetyMode.None); + public ref int Variant { - get => ref _Handle.AsRef(Schema.GetOffset(0x58B5CA36B2DB2B42)); + get => ref _Handle.AsRef(_VariantOffset.Value); } + private static readonly Lazy _RandomOffset = new(() => Schema.GetOffset(0x58B5CA36850EF8CE), LazyThreadSafetyMode.None); + public ref int Random { - get => ref _Handle.AsRef(Schema.GetOffset(0x58B5CA36850EF8CE)); + get => ref _Handle.AsRef(_RandomOffset.Value); } + private static readonly Lazy _OrdinalOffset = new(() => Schema.GetOffset(0x58B5CA364ABADF96), LazyThreadSafetyMode.None); + public ref int Ordinal { - get => ref _Handle.AsRef(Schema.GetOffset(0x58B5CA364ABADF96)); + get => ref _Handle.AsRef(_OrdinalOffset.Value); } + private static readonly Lazy _WeaponNameOffset = new(() => Schema.GetOffset(0x58B5CA3652FE8889), LazyThreadSafetyMode.None); + public string WeaponName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x58B5CA3652FE8889)); + var ptr = _Handle.Read(_WeaponNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x58B5CA3652FE8889, value); + set => Schema.SetString(_Handle, _WeaponNameOffset.Value, value); } + private static readonly Lazy _XuidOffset = new(() => Schema.GetOffset(0x58B5CA36C61EB42B), LazyThreadSafetyMode.None); + public ref ulong Xuid { - get => ref _Handle.AsRef(Schema.GetOffset(0x58B5CA36C61EB42B)); + get => ref _Handle.AsRef(_XuidOffset.Value); } + private static readonly Lazy _AgentItemOffset = new(() => Schema.GetOffset(0x58B5CA366B625605), LazyThreadSafetyMode.None); + public CEconItemView AgentItem { - get => new CEconItemViewImpl(_Handle + Schema.GetOffset(0x58B5CA366B625605)); + get => new CEconItemViewImpl(_Handle + _AgentItemOffset.Value); } + private static readonly Lazy _GlovesItemOffset = new(() => Schema.GetOffset(0x58B5CA3692931DD0), LazyThreadSafetyMode.None); + public CEconItemView GlovesItem { - get => new CEconItemViewImpl(_Handle + Schema.GetOffset(0x58B5CA3692931DD0)); + get => new CEconItemViewImpl(_Handle + _GlovesItemOffset.Value); } + private static readonly Lazy _WeaponItemOffset = new(() => Schema.GetOffset(0x58B5CA3689437C5A), LazyThreadSafetyMode.None); + public CEconItemView WeaponItem { - get => new CEconItemViewImpl(_Handle + Schema.GetOffset(0x58B5CA3689437C5A)); + get => new CEconItemViewImpl(_Handle + _WeaponItemOffset.Value); } public void VariantUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamSelectCharacterPositionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamSelectCharacterPositionImpl.cs index ba47da503..e15247561 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamSelectCharacterPositionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamSelectCharacterPositionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamSelectCounterTerroristPositionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamSelectCounterTerroristPositionImpl.cs index 88ba122ce..33b719726 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamSelectCounterTerroristPositionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamSelectCounterTerroristPositionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamSelectTerroristPositionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamSelectTerroristPositionImpl.cs index f672ab8f4..7aba75913 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamSelectTerroristPositionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_TeamSelectTerroristPositionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_WingmanIntroCharacterPositionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_WingmanIntroCharacterPositionImpl.cs index 00f83741a..e04bd9d75 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_WingmanIntroCharacterPositionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_WingmanIntroCharacterPositionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_WingmanIntroCounterTerroristPositionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_WingmanIntroCounterTerroristPositionImpl.cs index 340fc88e1..d123305e9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_WingmanIntroCounterTerroristPositionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_WingmanIntroCounterTerroristPositionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_WingmanIntroTerroristPositionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_WingmanIntroTerroristPositionImpl.cs index 925172cd4..831f09007 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_WingmanIntroTerroristPositionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGO_WingmanIntroTerroristPositionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameModeRulesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameModeRulesImpl.cs index 59624ec35..ff6662a65 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameModeRulesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameModeRulesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CCSGameModeRulesImpl : SchemaClass, CCSGameModeRules { public CCSGameModeRulesImpl(nint handle) : base(handle) { } + private static readonly Lazy ___m_pChainEntityOffset = new(() => Schema.GetOffset(0x5093D6A4F63F0E7D), LazyThreadSafetyMode.None); + public ref CNetworkVarChainer __m_pChainEntity { - get => ref _Handle.AsRef(Schema.GetOffset(0x5093D6A4F63F0E7D)); + get => ref _Handle.AsRef(___m_pChainEntityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameModeRules_ArmsRaceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameModeRules_ArmsRaceImpl.cs index 39a83b8cc..3a446cddf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameModeRules_ArmsRaceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameModeRules_ArmsRaceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CCSGameModeRules_ArmsRaceImpl : CCSGameModeRulesImpl, CCS public CCSGameModeRules_ArmsRaceImpl(nint handle) : base(handle) { } + private static readonly Lazy _WeaponSequenceOffset = new(() => Schema.GetOffset(0xDFFFC2FB1426444C), LazyThreadSafetyMode.None); + public ref CUtlVector WeaponSequence { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDFFFC2FB1426444C)); + get => ref _Handle.AsRef>(_WeaponSequenceOffset.Value); } public void WeaponSequenceUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameModeRules_DeathmatchImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameModeRules_DeathmatchImpl.cs index 27bb427ef..7417eb572 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameModeRules_DeathmatchImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameModeRules_DeathmatchImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class CCSGameModeRules_DeathmatchImpl : CCSGameModeRulesImpl, C public CCSGameModeRules_DeathmatchImpl(nint handle) : base(handle) { } + private static readonly Lazy _DMBonusStartTimeOffset = new(() => Schema.GetOffset(0x77BC0D42870B2CD0), LazyThreadSafetyMode.None); + public GameTime_t DMBonusStartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x77BC0D42870B2CD0)); + get => new GameTime_tImpl(_Handle + _DMBonusStartTimeOffset.Value); } + private static readonly Lazy _DMBonusTimeLengthOffset = new(() => Schema.GetOffset(0x77BC0D42C4F13CC6), LazyThreadSafetyMode.None); + public ref float DMBonusTimeLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x77BC0D42C4F13CC6)); + get => ref _Handle.AsRef(_DMBonusTimeLengthOffset.Value); } + private static readonly Lazy _DMBonusWeaponOffset = new(() => Schema.GetOffset(0x77BC0D42A33FC260), LazyThreadSafetyMode.None); + public string DMBonusWeapon { get { - var ptr = _Handle.Read(Schema.GetOffset(0x77BC0D42A33FC260)); + var ptr = _Handle.Read(_DMBonusWeaponOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x77BC0D42A33FC260, value); + set => Schema.SetString(_Handle, _DMBonusWeaponOffset.Value, value); } public void DMBonusStartTimeUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameModeRules_NoopImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameModeRules_NoopImpl.cs index 66c85ae11..bc8b9257d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameModeRules_NoopImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameModeRules_NoopImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameRulesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameRulesImpl.cs index 3980fdf1e..fe0403948 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameRulesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameRulesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,165 +17,261 @@ internal partial class CCSGameRulesImpl : CTeamplayRulesImpl, CCSGameRules { public CCSGameRulesImpl(nint handle) : base(handle) { } + private static readonly Lazy _FreezePeriodOffset = new(() => Schema.GetOffset(0x6295CF650DE408E3), LazyThreadSafetyMode.None); + public ref bool FreezePeriod { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF650DE408E3)); + get => ref _Handle.AsRef(_FreezePeriodOffset.Value); } + private static readonly Lazy _WarmupPeriodOffset = new(() => Schema.GetOffset(0x6295CF6569684C44), LazyThreadSafetyMode.None); + public ref bool WarmupPeriod { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6569684C44)); + get => ref _Handle.AsRef(_WarmupPeriodOffset.Value); } + private static readonly Lazy _WarmupPeriodEndOffset = new(() => Schema.GetOffset(0x6295CF65BD3AFF1D), LazyThreadSafetyMode.None); + public GameTime_t WarmupPeriodEnd { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x6295CF65BD3AFF1D)); + get => new GameTime_tImpl(_Handle + _WarmupPeriodEndOffset.Value); } + private static readonly Lazy _WarmupPeriodStartOffset = new(() => Schema.GetOffset(0x6295CF6541805884), LazyThreadSafetyMode.None); + public GameTime_t WarmupPeriodStart { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x6295CF6541805884)); + get => new GameTime_tImpl(_Handle + _WarmupPeriodStartOffset.Value); } + private static readonly Lazy _TerroristTimeOutActiveOffset = new(() => Schema.GetOffset(0x6295CF654A7D1ECE), LazyThreadSafetyMode.None); + public ref bool TerroristTimeOutActive { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF654A7D1ECE)); + get => ref _Handle.AsRef(_TerroristTimeOutActiveOffset.Value); } + private static readonly Lazy _CTTimeOutActiveOffset = new(() => Schema.GetOffset(0x6295CF65E0DDAFEF), LazyThreadSafetyMode.None); + public ref bool CTTimeOutActive { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65E0DDAFEF)); + get => ref _Handle.AsRef(_CTTimeOutActiveOffset.Value); } + private static readonly Lazy _TerroristTimeOutRemainingOffset = new(() => Schema.GetOffset(0x6295CF652F2C703E), LazyThreadSafetyMode.None); + public ref float TerroristTimeOutRemaining { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF652F2C703E)); + get => ref _Handle.AsRef(_TerroristTimeOutRemainingOffset.Value); } + private static readonly Lazy _CTTimeOutRemainingOffset = new(() => Schema.GetOffset(0x6295CF655CCA1E5D), LazyThreadSafetyMode.None); + public ref float CTTimeOutRemaining { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF655CCA1E5D)); + get => ref _Handle.AsRef(_CTTimeOutRemainingOffset.Value); } + private static readonly Lazy _TerroristTimeOutsOffset = new(() => Schema.GetOffset(0x6295CF65D622E821), LazyThreadSafetyMode.None); + public ref int TerroristTimeOuts { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65D622E821)); + get => ref _Handle.AsRef(_TerroristTimeOutsOffset.Value); } + private static readonly Lazy _CTTimeOutsOffset = new(() => Schema.GetOffset(0x6295CF659A215FA6), LazyThreadSafetyMode.None); + public ref int CTTimeOuts { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF659A215FA6)); + get => ref _Handle.AsRef(_CTTimeOutsOffset.Value); } + private static readonly Lazy _TechnicalTimeOutOffset = new(() => Schema.GetOffset(0x6295CF656F9E16DB), LazyThreadSafetyMode.None); + public ref bool TechnicalTimeOut { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF656F9E16DB)); + get => ref _Handle.AsRef(_TechnicalTimeOutOffset.Value); } + private static readonly Lazy _MatchWaitingForResumeOffset = new(() => Schema.GetOffset(0x6295CF6597B2188B), LazyThreadSafetyMode.None); + public ref bool MatchWaitingForResume { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6597B2188B)); + get => ref _Handle.AsRef(_MatchWaitingForResumeOffset.Value); } + private static readonly Lazy _FreezeTimeOffset = new(() => Schema.GetOffset(0x6295CF6525D5D12E), LazyThreadSafetyMode.None); + public ref int FreezeTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6525D5D12E)); + get => ref _Handle.AsRef(_FreezeTimeOffset.Value); } + private static readonly Lazy _RoundTimeOffset = new(() => Schema.GetOffset(0x6295CF659A5A5155), LazyThreadSafetyMode.None); + public ref int RoundTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF659A5A5155)); + get => ref _Handle.AsRef(_RoundTimeOffset.Value); } + private static readonly Lazy _MatchStartTimeOffset = new(() => Schema.GetOffset(0x6295CF65386C0C9B), LazyThreadSafetyMode.None); + public ref float MatchStartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65386C0C9B)); + get => ref _Handle.AsRef(_MatchStartTimeOffset.Value); } + private static readonly Lazy _RoundStartTimeOffset = new(() => Schema.GetOffset(0x6295CF65C262EE3C), LazyThreadSafetyMode.None); + public GameTime_t RoundStartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x6295CF65C262EE3C)); + get => new GameTime_tImpl(_Handle + _RoundStartTimeOffset.Value); } + private static readonly Lazy _RestartRoundTimeOffset = new(() => Schema.GetOffset(0x6295CF65F8CD3077), LazyThreadSafetyMode.None); + public GameTime_t RestartRoundTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x6295CF65F8CD3077)); + get => new GameTime_tImpl(_Handle + _RestartRoundTimeOffset.Value); } + private static readonly Lazy _GameRestartOffset = new(() => Schema.GetOffset(0x6295CF6532CBD44E), LazyThreadSafetyMode.None); + public ref bool GameRestart { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6532CBD44E)); + get => ref _Handle.AsRef(_GameRestartOffset.Value); } + private static readonly Lazy _GameStartTimeOffset = new(() => Schema.GetOffset(0x6295CF6504E0446E), LazyThreadSafetyMode.None); + public ref float GameStartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6504E0446E)); + get => ref _Handle.AsRef(_GameStartTimeOffset.Value); } + private static readonly Lazy _TimeUntilNextPhaseStartsOffset = new(() => Schema.GetOffset(0x6295CF65B603E0DD), LazyThreadSafetyMode.None); + public ref float TimeUntilNextPhaseStarts { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65B603E0DD)); + get => ref _Handle.AsRef(_TimeUntilNextPhaseStartsOffset.Value); } + private static readonly Lazy _GamePhaseOffset = new(() => Schema.GetOffset(0x6295CF65CEC62EE2), LazyThreadSafetyMode.None); + public ref int GamePhase { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65CEC62EE2)); + get => ref _Handle.AsRef(_GamePhaseOffset.Value); } + private static readonly Lazy _TotalRoundsPlayedOffset = new(() => Schema.GetOffset(0x6295CF6556632103), LazyThreadSafetyMode.None); + public ref int TotalRoundsPlayed { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6556632103)); + get => ref _Handle.AsRef(_TotalRoundsPlayedOffset.Value); } + private static readonly Lazy _RoundsPlayedThisPhaseOffset = new(() => Schema.GetOffset(0x6295CF65B48D294A), LazyThreadSafetyMode.None); + public ref int RoundsPlayedThisPhase { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65B48D294A)); + get => ref _Handle.AsRef(_RoundsPlayedThisPhaseOffset.Value); } + private static readonly Lazy _OvertimePlayingOffset = new(() => Schema.GetOffset(0x6295CF6528CE7C44), LazyThreadSafetyMode.None); + public ref int OvertimePlaying { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6528CE7C44)); + get => ref _Handle.AsRef(_OvertimePlayingOffset.Value); } + private static readonly Lazy _HostagesRemainingOffset = new(() => Schema.GetOffset(0x6295CF653EA141EE), LazyThreadSafetyMode.None); + public ref int HostagesRemaining { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF653EA141EE)); + get => ref _Handle.AsRef(_HostagesRemainingOffset.Value); } + private static readonly Lazy _AnyHostageReachedOffset = new(() => Schema.GetOffset(0x6295CF652B1C585C), LazyThreadSafetyMode.None); + public ref bool AnyHostageReached { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF652B1C585C)); + get => ref _Handle.AsRef(_AnyHostageReachedOffset.Value); } + private static readonly Lazy _MapHasBombTargetOffset = new(() => Schema.GetOffset(0x6295CF654D11B002), LazyThreadSafetyMode.None); + public ref bool MapHasBombTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF654D11B002)); + get => ref _Handle.AsRef(_MapHasBombTargetOffset.Value); } + private static readonly Lazy _MapHasRescueZoneOffset = new(() => Schema.GetOffset(0x6295CF659173C714), LazyThreadSafetyMode.None); + public ref bool MapHasRescueZone { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF659173C714)); + get => ref _Handle.AsRef(_MapHasRescueZoneOffset.Value); } + private static readonly Lazy _MapHasBuyZoneOffset = new(() => Schema.GetOffset(0x6295CF654E29CC07), LazyThreadSafetyMode.None); + public ref bool MapHasBuyZone { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF654E29CC07)); + get => ref _Handle.AsRef(_MapHasBuyZoneOffset.Value); } + private static readonly Lazy _IsQueuedMatchmakingOffset = new(() => Schema.GetOffset(0x6295CF659312AC70), LazyThreadSafetyMode.None); + public ref bool IsQueuedMatchmaking { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF659312AC70)); + get => ref _Handle.AsRef(_IsQueuedMatchmakingOffset.Value); } + private static readonly Lazy _QueuedMatchmakingModeOffset = new(() => Schema.GetOffset(0x6295CF65B864CCF7), LazyThreadSafetyMode.None); + public ref int QueuedMatchmakingMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65B864CCF7)); + get => ref _Handle.AsRef(_QueuedMatchmakingModeOffset.Value); } + private static readonly Lazy _IsValveDSOffset = new(() => Schema.GetOffset(0x6295CF65B14BF634), LazyThreadSafetyMode.None); + public ref bool IsValveDS { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65B14BF634)); + get => ref _Handle.AsRef(_IsValveDSOffset.Value); } + private static readonly Lazy _LogoMapOffset = new(() => Schema.GetOffset(0x6295CF65B7FCD584), LazyThreadSafetyMode.None); + public ref bool LogoMap { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65B7FCD584)); + get => ref _Handle.AsRef(_LogoMapOffset.Value); } + private static readonly Lazy _PlayAllStepSoundsOnServerOffset = new(() => Schema.GetOffset(0x6295CF652A99CD66), LazyThreadSafetyMode.None); + public ref bool PlayAllStepSoundsOnServer { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF652A99CD66)); + get => ref _Handle.AsRef(_PlayAllStepSoundsOnServerOffset.Value); } + private static readonly Lazy _SpectatorSlotCountOffset = new(() => Schema.GetOffset(0x6295CF65EAB6814C), LazyThreadSafetyMode.None); + public ref int SpectatorSlotCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65EAB6814C)); + get => ref _Handle.AsRef(_SpectatorSlotCountOffset.Value); } + private static readonly Lazy _MatchDeviceOffset = new(() => Schema.GetOffset(0x6295CF65A68647C8), LazyThreadSafetyMode.None); + public ref int MatchDevice { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65A68647C8)); + get => ref _Handle.AsRef(_MatchDeviceOffset.Value); } + private static readonly Lazy _HasMatchStartedOffset = new(() => Schema.GetOffset(0x6295CF65366EB219), LazyThreadSafetyMode.None); + public ref bool HasMatchStarted { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65366EB219)); + get => ref _Handle.AsRef(_HasMatchStartedOffset.Value); } + private static readonly Lazy _NextMapInMapgroupOffset = new(() => Schema.GetOffset(0x6295CF65C6613F50), LazyThreadSafetyMode.None); + public ref int NextMapInMapgroup { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65C6613F50)); + get => ref _Handle.AsRef(_NextMapInMapgroupOffset.Value); } + private static readonly Lazy _TournamentEventNameOffset = new(() => Schema.GetOffset(0x6295CF65D2FCF8C2), LazyThreadSafetyMode.None); + public string TournamentEventName { get { - var ptr = _Handle + Schema.GetOffset(0x6295CF65D2FCF8C2); + var ptr = _Handle + _TournamentEventNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x6295CF65D2FCF8C2, value, 512); + set => Schema.SetFixedString(_Handle, _TournamentEventNameOffset.Value, value, 512); } + private static readonly Lazy _TournamentEventStageOffset = new(() => Schema.GetOffset(0x6295CF658177EF71), LazyThreadSafetyMode.None); + public string TournamentEventStage { get { - var ptr = _Handle + Schema.GetOffset(0x6295CF658177EF71); + var ptr = _Handle + _TournamentEventStageOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x6295CF658177EF71, value, 512); + set => Schema.SetFixedString(_Handle, _TournamentEventStageOffset.Value, value, 512); } + private static readonly Lazy _MatchStatTxtOffset = new(() => Schema.GetOffset(0x6295CF65D6472911), LazyThreadSafetyMode.None); + public string MatchStatTxt { get { - var ptr = _Handle + Schema.GetOffset(0x6295CF65D6472911); + var ptr = _Handle + _MatchStatTxtOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x6295CF65D6472911, value, 512); + set => Schema.SetFixedString(_Handle, _MatchStatTxtOffset.Value, value, 512); } + private static readonly Lazy _TournamentPredictionsTxtOffset = new(() => Schema.GetOffset(0x6295CF65A974A2B9), LazyThreadSafetyMode.None); + public string TournamentPredictionsTxt { get { - var ptr = _Handle + Schema.GetOffset(0x6295CF65A974A2B9); + var ptr = _Handle + _TournamentPredictionsTxtOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x6295CF65A974A2B9, value, 512); + set => Schema.SetFixedString(_Handle, _TournamentPredictionsTxtOffset.Value, value, 512); } + private static readonly Lazy _TournamentPredictionsPctOffset = new(() => Schema.GetOffset(0x6295CF658E233B97), LazyThreadSafetyMode.None); + public ref int TournamentPredictionsPct { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF658E233B97)); + get => ref _Handle.AsRef(_TournamentPredictionsPctOffset.Value); } + private static readonly Lazy _CMMItemDropRevealStartTimeOffset = new(() => Schema.GetOffset(0x6295CF659669E4BE), LazyThreadSafetyMode.None); + public GameTime_t CMMItemDropRevealStartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x6295CF659669E4BE)); + get => new GameTime_tImpl(_Handle + _CMMItemDropRevealStartTimeOffset.Value); } + private static readonly Lazy _CMMItemDropRevealEndTimeOffset = new(() => Schema.GetOffset(0x6295CF65DDD1C05B), LazyThreadSafetyMode.None); + public GameTime_t CMMItemDropRevealEndTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x6295CF65DDD1C05B)); + get => new GameTime_tImpl(_Handle + _CMMItemDropRevealEndTimeOffset.Value); } + private static readonly Lazy _IsDroppingItemsOffset = new(() => Schema.GetOffset(0x6295CF65A3EB7908), LazyThreadSafetyMode.None); + public ref bool IsDroppingItems { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65A3EB7908)); + get => ref _Handle.AsRef(_IsDroppingItemsOffset.Value); } + private static readonly Lazy _IsQuestEligibleOffset = new(() => Schema.GetOffset(0x6295CF65814483B8), LazyThreadSafetyMode.None); + public ref bool IsQuestEligible { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65814483B8)); + get => ref _Handle.AsRef(_IsQuestEligibleOffset.Value); } + private static readonly Lazy _IsHltvActiveOffset = new(() => Schema.GetOffset(0x6295CF657F4E0DA5), LazyThreadSafetyMode.None); + public ref bool IsHltvActive { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF657F4E0DA5)); + get => ref _Handle.AsRef(_IsHltvActiveOffset.Value); } public ISchemaFixedArray ProhibitedItemIndices { get => new SchemaFixedArray(_Handle, 0x6295CF65BFE8D026, 100, 2, 2); @@ -181,29 +279,45 @@ public ISchemaFixedArray ProhibitedItemIndices { public ISchemaFixedArray TournamentActiveCasterAccounts { get => new SchemaFixedArray(_Handle, 0x6295CF6525481301, 4, 4, 4); } + private static readonly Lazy _NumBestOfMapsOffset = new(() => Schema.GetOffset(0x6295CF6581B0F2D7), LazyThreadSafetyMode.None); + public ref int NumBestOfMaps { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6581B0F2D7)); + get => ref _Handle.AsRef(_NumBestOfMapsOffset.Value); } + private static readonly Lazy _HalloweenMaskListSeedOffset = new(() => Schema.GetOffset(0x6295CF65EDB3E1E1), LazyThreadSafetyMode.None); + public ref int HalloweenMaskListSeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65EDB3E1E1)); + get => ref _Handle.AsRef(_HalloweenMaskListSeedOffset.Value); } + private static readonly Lazy _BombDroppedOffset = new(() => Schema.GetOffset(0x6295CF65D690B299), LazyThreadSafetyMode.None); + public ref bool BombDropped { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65D690B299)); + get => ref _Handle.AsRef(_BombDroppedOffset.Value); } + private static readonly Lazy _BombPlantedOffset = new(() => Schema.GetOffset(0x6295CF653C00B55F), LazyThreadSafetyMode.None); + public ref bool BombPlanted { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF653C00B55F)); + get => ref _Handle.AsRef(_BombPlantedOffset.Value); } + private static readonly Lazy _RoundWinStatusOffset = new(() => Schema.GetOffset(0x6295CF6538E1FC04), LazyThreadSafetyMode.None); + public ref int RoundWinStatus { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6538E1FC04)); + get => ref _Handle.AsRef(_RoundWinStatusOffset.Value); } + private static readonly Lazy _RoundWinReasonOffset = new(() => Schema.GetOffset(0x6295CF65879CEBD2), LazyThreadSafetyMode.None); + public ref int RoundWinReason { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65879CEBD2)); + get => ref _Handle.AsRef(_RoundWinReasonOffset.Value); } + private static readonly Lazy _TCantBuyOffset = new(() => Schema.GetOffset(0x6295CF65E60964EF), LazyThreadSafetyMode.None); + public ref bool TCantBuy { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65E60964EF)); + get => ref _Handle.AsRef(_TCantBuyOffset.Value); } + private static readonly Lazy _CTCantBuyOffset = new(() => Schema.GetOffset(0x6295CF655A190494), LazyThreadSafetyMode.None); + public ref bool CTCantBuy { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF655A190494)); + get => ref _Handle.AsRef(_CTCantBuyOffset.Value); } public ISchemaFixedArray MatchStats_RoundResults { get => new SchemaFixedArray(_Handle, 0x6295CF652BF6608F, 30, 4, 4); @@ -217,20 +331,28 @@ public ISchemaFixedArray MatchStats_PlayersAlive_T { public ISchemaFixedArray TeamRespawnWaveTimes { get => new SchemaFixedArray(_Handle, 0x6295CF65A15A30B1, 32, 4, 4); } + private static readonly Lazy _NextRespawnWaveOffset = new(() => Schema.GetOffset(0x6295CF65F28FB62F), LazyThreadSafetyMode.None); + public SchemaUntypedField NextRespawnWave { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x6295CF65F28FB62F)); + get => new SchemaUntypedField(_Handle + _NextRespawnWaveOffset.Value); } + private static readonly Lazy _MinimapMinsOffset = new(() => Schema.GetOffset(0x6295CF6589AD2CA5), LazyThreadSafetyMode.None); + public ref Vector MinimapMins { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6589AD2CA5)); + get => ref _Handle.AsRef(_MinimapMinsOffset.Value); } + private static readonly Lazy _MinimapMaxsOffset = new(() => Schema.GetOffset(0x6295CF65F2B86C5F), LazyThreadSafetyMode.None); + public ref Vector MinimapMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65F2B86C5F)); + get => ref _Handle.AsRef(_MinimapMaxsOffset.Value); } public ISchemaFixedArray MinimapVerticalSectionHeights { get => new SchemaFixedArray(_Handle, 0x6295CF6537ADB2EF, 8, 4, 4); } + private static readonly Lazy _UllLocalMatchIDOffset = new(() => Schema.GetOffset(0x6295CF657D14A239), LazyThreadSafetyMode.None); + public ref ulong UllLocalMatchID { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF657D14A239)); + get => ref _Handle.AsRef(_UllLocalMatchIDOffset.Value); } public ISchemaFixedArray EndMatchMapGroupVoteTypes { get => new SchemaFixedArray(_Handle, 0x6295CF65B4DAF10B, 10, 4, 4); @@ -238,297 +360,487 @@ public ISchemaFixedArray EndMatchMapGroupVoteTypes { public ISchemaFixedArray EndMatchMapGroupVoteOptions { get => new SchemaFixedArray(_Handle, 0x6295CF65BCAA50F4, 10, 4, 4); } + private static readonly Lazy _EndMatchMapVoteWinnerOffset = new(() => Schema.GetOffset(0x6295CF65F340D3E0), LazyThreadSafetyMode.None); + public ref int EndMatchMapVoteWinner { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65F340D3E0)); + get => ref _Handle.AsRef(_EndMatchMapVoteWinnerOffset.Value); } + private static readonly Lazy _NumConsecutiveCTLosesOffset = new(() => Schema.GetOffset(0x6295CF6548E3E309), LazyThreadSafetyMode.None); + public ref int NumConsecutiveCTLoses { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6548E3E309)); + get => ref _Handle.AsRef(_NumConsecutiveCTLosesOffset.Value); } + private static readonly Lazy _NumConsecutiveTerroristLosesOffset = new(() => Schema.GetOffset(0x6295CF652335F53E), LazyThreadSafetyMode.None); + public ref int NumConsecutiveTerroristLoses { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF652335F53E)); + get => ref _Handle.AsRef(_NumConsecutiveTerroristLosesOffset.Value); } + private static readonly Lazy _HasHostageBeenTouchedOffset = new(() => Schema.GetOffset(0x6295CF6577F64274), LazyThreadSafetyMode.None); + public ref bool HasHostageBeenTouched { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6577F64274)); + get => ref _Handle.AsRef(_HasHostageBeenTouchedOffset.Value); } + private static readonly Lazy _IntermissionStartTimeOffset = new(() => Schema.GetOffset(0x6295CF65AAE918DC), LazyThreadSafetyMode.None); + public GameTime_t IntermissionStartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x6295CF65AAE918DC)); + get => new GameTime_tImpl(_Handle + _IntermissionStartTimeOffset.Value); } + private static readonly Lazy _IntermissionEndTimeOffset = new(() => Schema.GetOffset(0x6295CF652001CDA5), LazyThreadSafetyMode.None); + public GameTime_t IntermissionEndTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x6295CF652001CDA5)); + get => new GameTime_tImpl(_Handle + _IntermissionEndTimeOffset.Value); } + private static readonly Lazy _LevelInitializedOffset = new(() => Schema.GetOffset(0x6295CF6578E1A1F5), LazyThreadSafetyMode.None); + public ref bool LevelInitialized { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6578E1A1F5)); + get => ref _Handle.AsRef(_LevelInitializedOffset.Value); } + private static readonly Lazy _TotalRoundsPlayed1Offset = new(() => Schema.GetOffset(0x6295CF65CE8C6A6C), LazyThreadSafetyMode.None); + public ref int TotalRoundsPlayed1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65CE8C6A6C)); + get => ref _Handle.AsRef(_TotalRoundsPlayed1Offset.Value); } + private static readonly Lazy _UnBalancedRoundsOffset = new(() => Schema.GetOffset(0x6295CF65CA0B6F6E), LazyThreadSafetyMode.None); + public ref int UnBalancedRounds { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65CA0B6F6E)); + get => ref _Handle.AsRef(_UnBalancedRoundsOffset.Value); } + private static readonly Lazy _EndMatchOnRoundResetOffset = new(() => Schema.GetOffset(0x6295CF65D38350A1), LazyThreadSafetyMode.None); + public ref bool EndMatchOnRoundReset { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65D38350A1)); + get => ref _Handle.AsRef(_EndMatchOnRoundResetOffset.Value); } + private static readonly Lazy _EndMatchOnThinkOffset = new(() => Schema.GetOffset(0x6295CF650888575A), LazyThreadSafetyMode.None); + public ref bool EndMatchOnThink { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF650888575A)); + get => ref _Handle.AsRef(_EndMatchOnThinkOffset.Value); } + private static readonly Lazy _NumTerroristOffset = new(() => Schema.GetOffset(0x6295CF65E58F0B9A), LazyThreadSafetyMode.None); + public ref int NumTerrorist { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65E58F0B9A)); + get => ref _Handle.AsRef(_NumTerroristOffset.Value); } + private static readonly Lazy _NumCTOffset = new(() => Schema.GetOffset(0x6295CF659668BCF3), LazyThreadSafetyMode.None); + public ref int NumCT { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF659668BCF3)); + get => ref _Handle.AsRef(_NumCTOffset.Value); } + private static readonly Lazy _NumSpawnableTerroristOffset = new(() => Schema.GetOffset(0x6295CF65EBC4398B), LazyThreadSafetyMode.None); + public ref int NumSpawnableTerrorist { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65EBC4398B)); + get => ref _Handle.AsRef(_NumSpawnableTerroristOffset.Value); } + private static readonly Lazy _NumSpawnableCTOffset = new(() => Schema.GetOffset(0x6295CF65A0723378), LazyThreadSafetyMode.None); + public ref int NumSpawnableCT { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65A0723378)); + get => ref _Handle.AsRef(_NumSpawnableCTOffset.Value); } + private static readonly Lazy _SelectedHostageSpawnIndicesOffset = new(() => Schema.GetOffset(0x6295CF65A24826BE), LazyThreadSafetyMode.None); + public ref CUtlVector SelectedHostageSpawnIndices { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6295CF65A24826BE)); + get => ref _Handle.AsRef>(_SelectedHostageSpawnIndicesOffset.Value); } + private static readonly Lazy _SpawnPointsRandomSeedOffset = new(() => Schema.GetOffset(0x6295CF65EBBE08D1), LazyThreadSafetyMode.None); + public ref int SpawnPointsRandomSeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65EBBE08D1)); + get => ref _Handle.AsRef(_SpawnPointsRandomSeedOffset.Value); } + private static readonly Lazy _FirstConnectedOffset = new(() => Schema.GetOffset(0x6295CF6579971CBC), LazyThreadSafetyMode.None); + public ref bool FirstConnected { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6579971CBC)); + get => ref _Handle.AsRef(_FirstConnectedOffset.Value); } + private static readonly Lazy _CompleteResetOffset = new(() => Schema.GetOffset(0x6295CF65BE966675), LazyThreadSafetyMode.None); + public ref bool CompleteReset { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65BE966675)); + get => ref _Handle.AsRef(_CompleteResetOffset.Value); } + private static readonly Lazy _PickNewTeamsOnResetOffset = new(() => Schema.GetOffset(0x6295CF65CFEB1018), LazyThreadSafetyMode.None); + public ref bool PickNewTeamsOnReset { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65CFEB1018)); + get => ref _Handle.AsRef(_PickNewTeamsOnResetOffset.Value); } + private static readonly Lazy _ScrambleTeamsOnRestartOffset = new(() => Schema.GetOffset(0x6295CF65170E54FC), LazyThreadSafetyMode.None); + public ref bool ScrambleTeamsOnRestart { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65170E54FC)); + get => ref _Handle.AsRef(_ScrambleTeamsOnRestartOffset.Value); } + private static readonly Lazy _SwapTeamsOnRestartOffset = new(() => Schema.GetOffset(0x6295CF65AC86A5EC), LazyThreadSafetyMode.None); + public ref bool SwapTeamsOnRestart { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65AC86A5EC)); + get => ref _Handle.AsRef(_SwapTeamsOnRestartOffset.Value); } + private static readonly Lazy _EndMatchTiedVotesOffset = new(() => Schema.GetOffset(0x6295CF65FF26054E), LazyThreadSafetyMode.None); + public ref CUtlVector EndMatchTiedVotes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6295CF65FF26054E)); + get => ref _Handle.AsRef>(_EndMatchTiedVotesOffset.Value); } + private static readonly Lazy _NeedToAskPlayersForContinueVoteOffset = new(() => Schema.GetOffset(0x6295CF65515BA5BD), LazyThreadSafetyMode.None); + public ref bool NeedToAskPlayersForContinueVote { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65515BA5BD)); + get => ref _Handle.AsRef(_NeedToAskPlayersForContinueVoteOffset.Value); } + private static readonly Lazy _NumQueuedMatchmakingAccountsOffset = new(() => Schema.GetOffset(0x6295CF65A76A455A), LazyThreadSafetyMode.None); + public ref uint NumQueuedMatchmakingAccounts { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65A76A455A)); + get => ref _Handle.AsRef(_NumQueuedMatchmakingAccountsOffset.Value); } + private static readonly Lazy _AvgPlayerRankOffset = new(() => Schema.GetOffset(0x6295CF6549B0B220), LazyThreadSafetyMode.None); + public ref float AvgPlayerRank { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6549B0B220)); + get => ref _Handle.AsRef(_AvgPlayerRankOffset.Value); } + private static readonly Lazy _QueuedMatchmakingReservationStringOffset = new(() => Schema.GetOffset(0x6295CF6559B26DA9), LazyThreadSafetyMode.None); + public string QueuedMatchmakingReservationString { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6295CF6559B26DA9)); + var ptr = _Handle.Read(_QueuedMatchmakingReservationStringOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6295CF6559B26DA9, value); + set => Schema.SetString(_Handle, _QueuedMatchmakingReservationStringOffset.Value, value); } + private static readonly Lazy _NumTotalTournamentDropsOffset = new(() => Schema.GetOffset(0x6295CF65076A6E9A), LazyThreadSafetyMode.None); + public ref uint NumTotalTournamentDrops { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65076A6E9A)); + get => ref _Handle.AsRef(_NumTotalTournamentDropsOffset.Value); } + private static readonly Lazy _NumSpectatorsCountMaxOffset = new(() => Schema.GetOffset(0x6295CF65F56B5802), LazyThreadSafetyMode.None); + public ref uint NumSpectatorsCountMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65F56B5802)); + get => ref _Handle.AsRef(_NumSpectatorsCountMaxOffset.Value); } + private static readonly Lazy _NumSpectatorsCountMaxTVOffset = new(() => Schema.GetOffset(0x6295CF6517CBEEDC), LazyThreadSafetyMode.None); + public ref uint NumSpectatorsCountMaxTV { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6517CBEEDC)); + get => ref _Handle.AsRef(_NumSpectatorsCountMaxTVOffset.Value); } + private static readonly Lazy _NumSpectatorsCountMaxLnkOffset = new(() => Schema.GetOffset(0x6295CF65A5E767C5), LazyThreadSafetyMode.None); + public ref uint NumSpectatorsCountMaxLnk { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65A5E767C5)); + get => ref _Handle.AsRef(_NumSpectatorsCountMaxLnkOffset.Value); } + private static readonly Lazy _CTsAliveAtFreezetimeEndOffset = new(() => Schema.GetOffset(0x6295CF6538E98EA0), LazyThreadSafetyMode.None); + public ref int CTsAliveAtFreezetimeEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6538E98EA0)); + get => ref _Handle.AsRef(_CTsAliveAtFreezetimeEndOffset.Value); } + private static readonly Lazy _TerroristsAliveAtFreezetimeEndOffset = new(() => Schema.GetOffset(0x6295CF65F0B1C429), LazyThreadSafetyMode.None); + public ref int TerroristsAliveAtFreezetimeEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65F0B1C429)); + get => ref _Handle.AsRef(_TerroristsAliveAtFreezetimeEndOffset.Value); } + private static readonly Lazy _ForceTeamChangeSilentOffset = new(() => Schema.GetOffset(0x6295CF651F43946C), LazyThreadSafetyMode.None); + public ref bool ForceTeamChangeSilent { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF651F43946C)); + get => ref _Handle.AsRef(_ForceTeamChangeSilentOffset.Value); } + private static readonly Lazy _LoadingRoundBackupDataOffset = new(() => Schema.GetOffset(0x6295CF656F470127), LazyThreadSafetyMode.None); + public ref bool LoadingRoundBackupData { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF656F470127)); + get => ref _Handle.AsRef(_LoadingRoundBackupDataOffset.Value); } + private static readonly Lazy _MatchInfoShowTypeOffset = new(() => Schema.GetOffset(0x6295CF6507378C3F), LazyThreadSafetyMode.None); + public ref int MatchInfoShowType { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6507378C3F)); + get => ref _Handle.AsRef(_MatchInfoShowTypeOffset.Value); } + private static readonly Lazy _MatchInfoDecidedTimeOffset = new(() => Schema.GetOffset(0x6295CF656BDD2C29), LazyThreadSafetyMode.None); + public ref float MatchInfoDecidedTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF656BDD2C29)); + get => ref _Handle.AsRef(_MatchInfoDecidedTimeOffset.Value); } + private static readonly Lazy _MTeamDMLastWinningTeamNumberOffset = new(() => Schema.GetOffset(0x6295CF6542E24ADA), LazyThreadSafetyMode.None); + public ref int MTeamDMLastWinningTeamNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6542E24ADA)); + get => ref _Handle.AsRef(_MTeamDMLastWinningTeamNumberOffset.Value); } + private static readonly Lazy _MTeamDMLastThinkTimeOffset = new(() => Schema.GetOffset(0x6295CF65A25AB0DF), LazyThreadSafetyMode.None); + public ref float MTeamDMLastThinkTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65A25AB0DF)); + get => ref _Handle.AsRef(_MTeamDMLastThinkTimeOffset.Value); } + private static readonly Lazy _TeamDMLastAnnouncementTimeOffset = new(() => Schema.GetOffset(0x6295CF653FA12D43), LazyThreadSafetyMode.None); + public ref float TeamDMLastAnnouncementTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF653FA12D43)); + get => ref _Handle.AsRef(_TeamDMLastAnnouncementTimeOffset.Value); } + private static readonly Lazy _AccountTerroristOffset = new(() => Schema.GetOffset(0x6295CF6521CAD297), LazyThreadSafetyMode.None); + public ref int AccountTerrorist { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6521CAD297)); + get => ref _Handle.AsRef(_AccountTerroristOffset.Value); } + private static readonly Lazy _AccountCTOffset = new(() => Schema.GetOffset(0x6295CF65A26CBB64), LazyThreadSafetyMode.None); + public ref int AccountCT { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65A26CBB64)); + get => ref _Handle.AsRef(_AccountCTOffset.Value); } + private static readonly Lazy _SpawnPointCount_TerroristOffset = new(() => Schema.GetOffset(0x6295CF658D0E3AFB), LazyThreadSafetyMode.None); + public ref int SpawnPointCount_Terrorist { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF658D0E3AFB)); + get => ref _Handle.AsRef(_SpawnPointCount_TerroristOffset.Value); } + private static readonly Lazy _SpawnPointCount_CTOffset = new(() => Schema.GetOffset(0x6295CF65015F15A8), LazyThreadSafetyMode.None); + public ref int SpawnPointCount_CT { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65015F15A8)); + get => ref _Handle.AsRef(_SpawnPointCount_CTOffset.Value); } + private static readonly Lazy _MaxNumTerroristsOffset = new(() => Schema.GetOffset(0x6295CF65A1A2CFF9), LazyThreadSafetyMode.None); + public ref int MaxNumTerrorists { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65A1A2CFF9)); + get => ref _Handle.AsRef(_MaxNumTerroristsOffset.Value); } + private static readonly Lazy _MaxNumCTsOffset = new(() => Schema.GetOffset(0x6295CF65FD61C7CA), LazyThreadSafetyMode.None); + public ref int MaxNumCTs { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65FD61C7CA)); + get => ref _Handle.AsRef(_MaxNumCTsOffset.Value); } + private static readonly Lazy _LoserBonusMostRecentTeamOffset = new(() => Schema.GetOffset(0x6295CF657213B991), LazyThreadSafetyMode.None); + public ref int LoserBonusMostRecentTeam { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF657213B991)); + get => ref _Handle.AsRef(_LoserBonusMostRecentTeamOffset.Value); } + private static readonly Lazy _TmNextPeriodicThinkOffset = new(() => Schema.GetOffset(0x6295CF65A086B6B6), LazyThreadSafetyMode.None); + public ref float TmNextPeriodicThink { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65A086B6B6)); + get => ref _Handle.AsRef(_TmNextPeriodicThinkOffset.Value); } + private static readonly Lazy _VoiceWonMatchBragFiredOffset = new(() => Schema.GetOffset(0x6295CF65D9ADDBEC), LazyThreadSafetyMode.None); + public ref bool VoiceWonMatchBragFired { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65D9ADDBEC)); + get => ref _Handle.AsRef(_VoiceWonMatchBragFiredOffset.Value); } + private static readonly Lazy _WarmupNextChatNoticeTimeOffset = new(() => Schema.GetOffset(0x6295CF65F187B14B), LazyThreadSafetyMode.None); + public ref float WarmupNextChatNoticeTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65F187B14B)); + get => ref _Handle.AsRef(_WarmupNextChatNoticeTimeOffset.Value); } + private static readonly Lazy _HostagesRescuedOffset = new(() => Schema.GetOffset(0x6295CF652486FAA5), LazyThreadSafetyMode.None); + public ref int HostagesRescued { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF652486FAA5)); + get => ref _Handle.AsRef(_HostagesRescuedOffset.Value); } + private static readonly Lazy _HostagesTouchedOffset = new(() => Schema.GetOffset(0x6295CF65321A1F08), LazyThreadSafetyMode.None); + public ref int HostagesTouched { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65321A1F08)); + get => ref _Handle.AsRef(_HostagesTouchedOffset.Value); } + private static readonly Lazy _NextHostageAnnouncementOffset = new(() => Schema.GetOffset(0x6295CF65DEE66A30), LazyThreadSafetyMode.None); + public ref float NextHostageAnnouncement { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65DEE66A30)); + get => ref _Handle.AsRef(_NextHostageAnnouncementOffset.Value); } + private static readonly Lazy _NoTerroristsKilledOffset = new(() => Schema.GetOffset(0x6295CF6555F64934), LazyThreadSafetyMode.None); + public ref bool NoTerroristsKilled { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6555F64934)); + get => ref _Handle.AsRef(_NoTerroristsKilledOffset.Value); } + private static readonly Lazy _NoCTsKilledOffset = new(() => Schema.GetOffset(0x6295CF6592A7F5BF), LazyThreadSafetyMode.None); + public ref bool NoCTsKilled { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6592A7F5BF)); + get => ref _Handle.AsRef(_NoCTsKilledOffset.Value); } + private static readonly Lazy _NoEnemiesKilledOffset = new(() => Schema.GetOffset(0x6295CF658FA47D23), LazyThreadSafetyMode.None); + public ref bool NoEnemiesKilled { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF658FA47D23)); + get => ref _Handle.AsRef(_NoEnemiesKilledOffset.Value); } + private static readonly Lazy _CanDonateWeaponsOffset = new(() => Schema.GetOffset(0x6295CF6591A6B97B), LazyThreadSafetyMode.None); + public ref bool CanDonateWeapons { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6591A6B97B)); + get => ref _Handle.AsRef(_CanDonateWeaponsOffset.Value); } + private static readonly Lazy _FirstKillTimeOffset = new(() => Schema.GetOffset(0x6295CF6501D98E54), LazyThreadSafetyMode.None); + public ref float FirstKillTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6501D98E54)); + get => ref _Handle.AsRef(_FirstKillTimeOffset.Value); } + private static readonly Lazy _FirstBloodTimeOffset = new(() => Schema.GetOffset(0x6295CF65A6A092F2), LazyThreadSafetyMode.None); + public ref float FirstBloodTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65A6A092F2)); + get => ref _Handle.AsRef(_FirstBloodTimeOffset.Value); } + private static readonly Lazy _HostageWasInjuredOffset = new(() => Schema.GetOffset(0x6295CF65AAB4D014), LazyThreadSafetyMode.None); + public ref bool HostageWasInjured { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65AAB4D014)); + get => ref _Handle.AsRef(_HostageWasInjuredOffset.Value); } + private static readonly Lazy _HostageWasKilledOffset = new(() => Schema.GetOffset(0x6295CF65578A226E), LazyThreadSafetyMode.None); + public ref bool HostageWasKilled { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65578A226E)); + get => ref _Handle.AsRef(_HostageWasKilledOffset.Value); } + private static readonly Lazy _VoteCalledOffset = new(() => Schema.GetOffset(0x6295CF657DE14E10), LazyThreadSafetyMode.None); + public ref bool VoteCalled { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF657DE14E10)); + get => ref _Handle.AsRef(_VoteCalledOffset.Value); } + private static readonly Lazy _ServerVoteOnResetOffset = new(() => Schema.GetOffset(0x6295CF659AE52F3E), LazyThreadSafetyMode.None); + public ref bool ServerVoteOnReset { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF659AE52F3E)); + get => ref _Handle.AsRef(_ServerVoteOnResetOffset.Value); } + private static readonly Lazy _VoteCheckThrottleOffset = new(() => Schema.GetOffset(0x6295CF656F57ACF1), LazyThreadSafetyMode.None); + public ref float VoteCheckThrottle { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF656F57ACF1)); + get => ref _Handle.AsRef(_VoteCheckThrottleOffset.Value); } + private static readonly Lazy _BuyTimeEndedOffset = new(() => Schema.GetOffset(0x6295CF65092EBA8E), LazyThreadSafetyMode.None); + public ref bool BuyTimeEnded { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65092EBA8E)); + get => ref _Handle.AsRef(_BuyTimeEndedOffset.Value); } + private static readonly Lazy _LastFreezeEndBeepOffset = new(() => Schema.GetOffset(0x6295CF65296880DB), LazyThreadSafetyMode.None); + public ref int LastFreezeEndBeep { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65296880DB)); + get => ref _Handle.AsRef(_LastFreezeEndBeepOffset.Value); } + private static readonly Lazy _TargetBombedOffset = new(() => Schema.GetOffset(0x6295CF653A83E0F9), LazyThreadSafetyMode.None); + public ref bool TargetBombed { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF653A83E0F9)); + get => ref _Handle.AsRef(_TargetBombedOffset.Value); } + private static readonly Lazy _BombDefusedOffset = new(() => Schema.GetOffset(0x6295CF65CA9F868D), LazyThreadSafetyMode.None); + public ref bool BombDefused { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65CA9F868D)); + get => ref _Handle.AsRef(_BombDefusedOffset.Value); } + private static readonly Lazy _MapHasBombZoneOffset = new(() => Schema.GetOffset(0x6295CF65D3F4FD4D), LazyThreadSafetyMode.None); + public ref bool MapHasBombZone { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65D3F4FD4D)); + get => ref _Handle.AsRef(_MapHasBombZoneOffset.Value); } + private static readonly Lazy _MainCTSpawnPosOffset = new(() => Schema.GetOffset(0x6295CF65F44AF710), LazyThreadSafetyMode.None); + public ref Vector MainCTSpawnPos { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65F44AF710)); + get => ref _Handle.AsRef(_MainCTSpawnPosOffset.Value); } + private static readonly Lazy _CTSpawnPointsMasterListOffset = new(() => Schema.GetOffset(0x6295CF6582901578), LazyThreadSafetyMode.None); + public ref CUtlVector> CTSpawnPointsMasterList { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x6295CF6582901578)); + get => ref _Handle.AsRef>>(_CTSpawnPointsMasterListOffset.Value); } + private static readonly Lazy _TerroristSpawnPointsMasterListOffset = new(() => Schema.GetOffset(0x6295CF65EC3D3B5D), LazyThreadSafetyMode.None); + public ref CUtlVector> TerroristSpawnPointsMasterList { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x6295CF65EC3D3B5D)); + get => ref _Handle.AsRef>>(_TerroristSpawnPointsMasterListOffset.Value); } + private static readonly Lazy _RespawningAllRespawnablePlayersOffset = new(() => Schema.GetOffset(0x6295CF65F400C2A6), LazyThreadSafetyMode.None); + public ref bool RespawningAllRespawnablePlayers { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65F400C2A6)); + get => ref _Handle.AsRef(_RespawningAllRespawnablePlayersOffset.Value); } + private static readonly Lazy _NextCTSpawnPointOffset = new(() => Schema.GetOffset(0x6295CF65932F53AD), LazyThreadSafetyMode.None); + public ref int NextCTSpawnPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65932F53AD)); + get => ref _Handle.AsRef(_NextCTSpawnPointOffset.Value); } + private static readonly Lazy _CTSpawnPointUsedTimeOffset = new(() => Schema.GetOffset(0x6295CF65D6E09027), LazyThreadSafetyMode.None); + public ref float CTSpawnPointUsedTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65D6E09027)); + get => ref _Handle.AsRef(_CTSpawnPointUsedTimeOffset.Value); } + private static readonly Lazy _NextTerroristSpawnPointOffset = new(() => Schema.GetOffset(0x6295CF65516AD03A), LazyThreadSafetyMode.None); + public ref int NextTerroristSpawnPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65516AD03A)); + get => ref _Handle.AsRef(_NextTerroristSpawnPointOffset.Value); } + private static readonly Lazy _TerroristSpawnPointUsedTimeOffset = new(() => Schema.GetOffset(0x6295CF653A8AC4CC), LazyThreadSafetyMode.None); + public ref float TerroristSpawnPointUsedTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF653A8AC4CC)); + get => ref _Handle.AsRef(_TerroristSpawnPointUsedTimeOffset.Value); } + private static readonly Lazy _CTSpawnPointsOffset = new(() => Schema.GetOffset(0x6295CF6537BA1FB2), LazyThreadSafetyMode.None); + public ref CUtlVector> CTSpawnPoints { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x6295CF6537BA1FB2)); + get => ref _Handle.AsRef>>(_CTSpawnPointsOffset.Value); } + private static readonly Lazy _TerroristSpawnPointsOffset = new(() => Schema.GetOffset(0x6295CF6506BE8E93), LazyThreadSafetyMode.None); + public ref CUtlVector> TerroristSpawnPoints { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x6295CF6506BE8E93)); + get => ref _Handle.AsRef>>(_TerroristSpawnPointsOffset.Value); } + private static readonly Lazy _IsUnreservedGameServerOffset = new(() => Schema.GetOffset(0x6295CF65C691B4FF), LazyThreadSafetyMode.None); + public ref bool IsUnreservedGameServer { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65C691B4FF)); + get => ref _Handle.AsRef(_IsUnreservedGameServerOffset.Value); } + private static readonly Lazy _AutobalanceDisplayTimeOffset = new(() => Schema.GetOffset(0x6295CF65E23EE205), LazyThreadSafetyMode.None); + public ref float AutobalanceDisplayTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65E23EE205)); + get => ref _Handle.AsRef(_AutobalanceDisplayTimeOffset.Value); } + private static readonly Lazy _AllowWeaponSwitchOffset = new(() => Schema.GetOffset(0x6295CF65390E309A), LazyThreadSafetyMode.None); + public ref bool AllowWeaponSwitch { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65390E309A)); + get => ref _Handle.AsRef(_AllowWeaponSwitchOffset.Value); } + private static readonly Lazy _RoundTimeWarningTriggeredOffset = new(() => Schema.GetOffset(0x6295CF650F402BE7), LazyThreadSafetyMode.None); + public ref bool RoundTimeWarningTriggered { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF650F402BE7)); + get => ref _Handle.AsRef(_RoundTimeWarningTriggeredOffset.Value); } + private static readonly Lazy _PhaseChangeAnnouncementTimeOffset = new(() => Schema.GetOffset(0x6295CF65C4D59336), LazyThreadSafetyMode.None); + public GameTime_t PhaseChangeAnnouncementTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x6295CF65C4D59336)); + get => new GameTime_tImpl(_Handle + _PhaseChangeAnnouncementTimeOffset.Value); } + private static readonly Lazy _NextUpdateTeamClanNamesTimeOffset = new(() => Schema.GetOffset(0x6295CF659127E011), LazyThreadSafetyMode.None); + public ref float NextUpdateTeamClanNamesTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF659127E011)); + get => ref _Handle.AsRef(_NextUpdateTeamClanNamesTimeOffset.Value); } + private static readonly Lazy _LastThinkTimeOffset = new(() => Schema.GetOffset(0x6295CF65D901F6A0), LazyThreadSafetyMode.None); + public GameTime_t LastThinkTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x6295CF65D901F6A0)); + get => new GameTime_tImpl(_Handle + _LastThinkTimeOffset.Value); } + private static readonly Lazy _AccumulatedRoundOffDamageOffset = new(() => Schema.GetOffset(0x6295CF658FEFA145), LazyThreadSafetyMode.None); + public ref float AccumulatedRoundOffDamage { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF658FEFA145)); + get => ref _Handle.AsRef(_AccumulatedRoundOffDamageOffset.Value); } + private static readonly Lazy _ShorthandedBonusLastEvalRoundOffset = new(() => Schema.GetOffset(0x6295CF65AFC72D22), LazyThreadSafetyMode.None); + public ref int ShorthandedBonusLastEvalRound { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65AFC72D22)); + get => ref _Handle.AsRef(_ShorthandedBonusLastEvalRoundOffset.Value); } + private static readonly Lazy _MatchAbortedEarlyReasonOffset = new(() => Schema.GetOffset(0x6295CF658B4CFCE8), LazyThreadSafetyMode.None); + public ref int MatchAbortedEarlyReason { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF658B4CFCE8)); + get => ref _Handle.AsRef(_MatchAbortedEarlyReasonOffset.Value); } + private static readonly Lazy _HasTriggeredRoundStartMusicOffset = new(() => Schema.GetOffset(0x6295CF65E34D873B), LazyThreadSafetyMode.None); + public ref bool HasTriggeredRoundStartMusic { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65E34D873B)); + get => ref _Handle.AsRef(_HasTriggeredRoundStartMusicOffset.Value); } + private static readonly Lazy _SwitchingTeamsAtRoundResetOffset = new(() => Schema.GetOffset(0x6295CF65AE3AF0A5), LazyThreadSafetyMode.None); + public ref bool SwitchingTeamsAtRoundReset { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65AE3AF0A5)); + get => ref _Handle.AsRef(_SwitchingTeamsAtRoundResetOffset.Value); } + private static readonly Lazy _GameModeRulesOffset = new(() => Schema.GetOffset(0x6295CF650B12F105), LazyThreadSafetyMode.None); + public CCSGameModeRules? GameModeRules { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6295CF650B12F105)); + var ptr = _Handle.Read(_GameModeRulesOffset.Value); return ptr.IsValidPtr() ? new CCSGameModeRulesImpl(ptr) : null; } } + private static readonly Lazy _BtGlobalBlackboardOffset = new(() => Schema.GetOffset(0x6295CF654E62FE91), LazyThreadSafetyMode.None); + public SchemaUntypedField BtGlobalBlackboard { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x6295CF654E62FE91)); + get => new SchemaUntypedField(_Handle + _BtGlobalBlackboardOffset.Value); } + private static readonly Lazy _PlayerResourceOffset = new(() => Schema.GetOffset(0x6295CF6553F9E5AE), LazyThreadSafetyMode.None); + public ref CHandle PlayerResource { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6295CF6553F9E5AE)); + get => ref _Handle.AsRef>(_PlayerResourceOffset.Value); } + private static readonly Lazy _RetakeRulesOffset = new(() => Schema.GetOffset(0x6295CF65DB6D258A), LazyThreadSafetyMode.None); + public CRetakeGameRules RetakeRules { - get => new CRetakeGameRulesImpl(_Handle + Schema.GetOffset(0x6295CF65DB6D258A)); + get => new CRetakeGameRulesImpl(_Handle + _RetakeRulesOffset.Value); } public ISchemaFixedArray> TeamUniqueKillWeaponsMatch { get => new SchemaFixedArray>(_Handle, 0x6295CF65EB474B78, 4, 24, 8); @@ -536,82 +848,128 @@ public ISchemaFixedArray> TeamUniqueKillWeaponsMatch { public ISchemaFixedArray TeamLastKillUsedUniqueWeaponMatch { get => new SchemaFixedArray(_Handle, 0x6295CF65BCB471EB, 4, 1, 1); } + private static readonly Lazy _MatchEndCountOffset = new(() => Schema.GetOffset(0x6295CF65FCD08D2E), LazyThreadSafetyMode.None); + public ref byte MatchEndCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65FCD08D2E)); + get => ref _Handle.AsRef(_MatchEndCountOffset.Value); } + private static readonly Lazy _TTeamIntroVariantOffset = new(() => Schema.GetOffset(0x6295CF652843B819), LazyThreadSafetyMode.None); + public ref int TTeamIntroVariant { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF652843B819)); + get => ref _Handle.AsRef(_TTeamIntroVariantOffset.Value); } + private static readonly Lazy _CTTeamIntroVariantOffset = new(() => Schema.GetOffset(0x6295CF65A4E902BC), LazyThreadSafetyMode.None); + public ref int CTTeamIntroVariant { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65A4E902BC)); + get => ref _Handle.AsRef(_CTTeamIntroVariantOffset.Value); } + private static readonly Lazy _TeamIntroPeriodOffset = new(() => Schema.GetOffset(0x6295CF6550FCE177), LazyThreadSafetyMode.None); + public ref bool TeamIntroPeriod { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6550FCE177)); + get => ref _Handle.AsRef(_TeamIntroPeriodOffset.Value); } + private static readonly Lazy _TeamIntroPeriodEndOffset = new(() => Schema.GetOffset(0x6295CF65E9D7AE78), LazyThreadSafetyMode.None); + public GameTime_t TeamIntroPeriodEnd { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x6295CF65E9D7AE78)); + get => new GameTime_tImpl(_Handle + _TeamIntroPeriodEndOffset.Value); } + private static readonly Lazy _PlayedTeamIntroVOOffset = new(() => Schema.GetOffset(0x6295CF6520AF50EC), LazyThreadSafetyMode.None); + public ref bool PlayedTeamIntroVO { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6520AF50EC)); + get => ref _Handle.AsRef(_PlayedTeamIntroVOOffset.Value); } + private static readonly Lazy _RoundEndWinnerTeamOffset = new(() => Schema.GetOffset(0x6295CF6556870D0B), LazyThreadSafetyMode.None); + public ref int RoundEndWinnerTeam { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6556870D0B)); + get => ref _Handle.AsRef(_RoundEndWinnerTeamOffset.Value); } + private static readonly Lazy _RoundEndReasonOffset = new(() => Schema.GetOffset(0x6295CF6507672B11), LazyThreadSafetyMode.None); + public ref int RoundEndReason { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6507672B11)); + get => ref _Handle.AsRef(_RoundEndReasonOffset.Value); } + private static readonly Lazy _RoundEndShowTimerDefendOffset = new(() => Schema.GetOffset(0x6295CF6594C342DA), LazyThreadSafetyMode.None); + public ref bool RoundEndShowTimerDefend { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6594C342DA)); + get => ref _Handle.AsRef(_RoundEndShowTimerDefendOffset.Value); } + private static readonly Lazy _RoundEndTimerTimeOffset = new(() => Schema.GetOffset(0x6295CF65ED1EF5CF), LazyThreadSafetyMode.None); + public ref int RoundEndTimerTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65ED1EF5CF)); + get => ref _Handle.AsRef(_RoundEndTimerTimeOffset.Value); } + private static readonly Lazy _RoundEndFunFactTokenOffset = new(() => Schema.GetOffset(0x6295CF653C86499F), LazyThreadSafetyMode.None); + public string RoundEndFunFactToken { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6295CF653C86499F)); + var ptr = _Handle.Read(_RoundEndFunFactTokenOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6295CF653C86499F, value); + set => Schema.SetString(_Handle, _RoundEndFunFactTokenOffset.Value, value); } + private static readonly Lazy _RoundEndFunFactPlayerSlotOffset = new(() => Schema.GetOffset(0x6295CF65FA215C79), LazyThreadSafetyMode.None); + public ref uint RoundEndFunFactPlayerSlot { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65FA215C79)); + get => ref _Handle.AsRef(_RoundEndFunFactPlayerSlotOffset.Value); } + private static readonly Lazy _RoundEndFunFactData1Offset = new(() => Schema.GetOffset(0x6295CF657F5515C3), LazyThreadSafetyMode.None); + public ref int RoundEndFunFactData1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF657F5515C3)); + get => ref _Handle.AsRef(_RoundEndFunFactData1Offset.Value); } + private static readonly Lazy _RoundEndFunFactData2Offset = new(() => Schema.GetOffset(0x6295CF6580551756), LazyThreadSafetyMode.None); + public ref int RoundEndFunFactData2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF6580551756)); + get => ref _Handle.AsRef(_RoundEndFunFactData2Offset.Value); } + private static readonly Lazy _RoundEndFunFactData3Offset = new(() => Schema.GetOffset(0x6295CF65815518E9), LazyThreadSafetyMode.None); + public ref int RoundEndFunFactData3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65815518E9)); + get => ref _Handle.AsRef(_RoundEndFunFactData3Offset.Value); } + private static readonly Lazy _RoundEndMessageOffset = new(() => Schema.GetOffset(0x6295CF65CE64850E), LazyThreadSafetyMode.None); + public string RoundEndMessage { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6295CF65CE64850E)); + var ptr = _Handle.Read(_RoundEndMessageOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6295CF65CE64850E, value); + set => Schema.SetString(_Handle, _RoundEndMessageOffset.Value, value); } + private static readonly Lazy _RoundEndPlayerCountOffset = new(() => Schema.GetOffset(0x6295CF65C873652B), LazyThreadSafetyMode.None); + public ref int RoundEndPlayerCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65C873652B)); + get => ref _Handle.AsRef(_RoundEndPlayerCountOffset.Value); } + private static readonly Lazy _RoundEndNoMusicOffset = new(() => Schema.GetOffset(0x6295CF65E76CDBDA), LazyThreadSafetyMode.None); + public ref bool RoundEndNoMusic { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65E76CDBDA)); + get => ref _Handle.AsRef(_RoundEndNoMusicOffset.Value); } + private static readonly Lazy _RoundEndLegacyOffset = new(() => Schema.GetOffset(0x6295CF658DA31C1A), LazyThreadSafetyMode.None); + public ref int RoundEndLegacy { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF658DA31C1A)); + get => ref _Handle.AsRef(_RoundEndLegacyOffset.Value); } + private static readonly Lazy _RoundEndCountOffset = new(() => Schema.GetOffset(0x6295CF650FBD0053), LazyThreadSafetyMode.None); + public ref byte RoundEndCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF650FBD0053)); + get => ref _Handle.AsRef(_RoundEndCountOffset.Value); } + private static readonly Lazy _RoundStartRoundNumberOffset = new(() => Schema.GetOffset(0x6295CF65F4340311), LazyThreadSafetyMode.None); + public ref int RoundStartRoundNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65F4340311)); + get => ref _Handle.AsRef(_RoundStartRoundNumberOffset.Value); } + private static readonly Lazy _RoundStartCountOffset = new(() => Schema.GetOffset(0x6295CF65B018A784), LazyThreadSafetyMode.None); + public ref byte RoundStartCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF65B018A784)); + get => ref _Handle.AsRef(_RoundStartCountOffset.Value); } + private static readonly Lazy _LastPerfSampleTimeOffset = new(() => Schema.GetOffset(0x6295CF650AB327AB), LazyThreadSafetyMode.None); + public ref double LastPerfSampleTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6295CF650AB327AB)); + get => ref _Handle.AsRef(_LastPerfSampleTimeOffset.Value); } public void FreezePeriodUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameRulesProxyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameRulesProxyImpl.cs index 786323550..7c050d353 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameRulesProxyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSGameRulesProxyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,9 +17,11 @@ internal partial class CCSGameRulesProxyImpl : CGameRulesProxyImpl, CCSGameRules public CCSGameRulesProxyImpl(nint handle) : base(handle) { } + private static readonly Lazy _GameRulesOffset = new(() => Schema.GetOffset(0x242D3ADB925C1F40), LazyThreadSafetyMode.None); + public CCSGameRules? GameRules { get { - var ptr = _Handle.Read(Schema.GetOffset(0x242D3ADB925C1F40)); + var ptr = _Handle.Read(_GameRulesOffset.Value); return ptr.IsValidPtr() ? new CCSGameRulesImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSMinimapBoundaryImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSMinimapBoundaryImpl.cs index ac9242e95..93e124fa3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSMinimapBoundaryImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSMinimapBoundaryImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserverPawnImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserverPawnImpl.cs index 84a6a53b0..1309f98c4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserverPawnImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserverPawnImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserver_CameraServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserver_CameraServicesImpl.cs index 1ffde84be..fcba1fb1b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserver_CameraServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserver_CameraServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserver_MovementServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserver_MovementServicesImpl.cs index 2929a88e0..e68656551 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserver_MovementServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserver_MovementServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserver_ObserverServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserver_ObserverServicesImpl.cs index 1f06f183c..37cf5a05c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserver_ObserverServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserver_ObserverServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserver_UseServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserver_UseServicesImpl.cs index 95c99fe11..fc9550601 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserver_UseServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSObserver_UseServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPetPlacementImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPetPlacementImpl.cs index be2760a00..df55feeb1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPetPlacementImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPetPlacementImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlaceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlaceImpl.cs index 055fdaff0..a2e9a0c73 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlaceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlaceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CCSPlaceImpl : CServerOnlyModelEntityImpl, CCSPlace { public CCSPlaceImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x7AF35BE34D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7AF35BE34D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7AF35BE34D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerBase_CameraServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerBase_CameraServicesImpl.cs index c1fe4f04b..f30b7527a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerBase_CameraServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerBase_CameraServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CCSPlayerBase_CameraServicesImpl : CPlayer_CameraServices public CCSPlayerBase_CameraServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _FOVOffset = new(() => Schema.GetOffset(0x5B25D9023C965687), LazyThreadSafetyMode.None); + public ref uint FOV { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B25D9023C965687)); + get => ref _Handle.AsRef(_FOVOffset.Value); } + private static readonly Lazy _FOVStartOffset = new(() => Schema.GetOffset(0x5B25D902612A684D), LazyThreadSafetyMode.None); + public ref uint FOVStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B25D902612A684D)); + get => ref _Handle.AsRef(_FOVStartOffset.Value); } + private static readonly Lazy _FOVTimeOffset = new(() => Schema.GetOffset(0x5B25D9024B291C67), LazyThreadSafetyMode.None); + public GameTime_t FOVTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x5B25D9024B291C67)); + get => new GameTime_tImpl(_Handle + _FOVTimeOffset.Value); } + private static readonly Lazy _FOVRateOffset = new(() => Schema.GetOffset(0x5B25D902A334F8AC), LazyThreadSafetyMode.None); + public ref float FOVRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B25D902A334F8AC)); + get => ref _Handle.AsRef(_FOVRateOffset.Value); } + private static readonly Lazy _ZoomOwnerOffset = new(() => Schema.GetOffset(0x5B25D902CA6018CF), LazyThreadSafetyMode.None); + public ref CHandle ZoomOwner { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5B25D902CA6018CF)); + get => ref _Handle.AsRef>(_ZoomOwnerOffset.Value); } + private static readonly Lazy _TriggerFogListOffset = new(() => Schema.GetOffset(0x5B25D902AAF6ED5B), LazyThreadSafetyMode.None); + public ref CUtlVector> TriggerFogList { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x5B25D902AAF6ED5B)); + get => ref _Handle.AsRef>>(_TriggerFogListOffset.Value); } + private static readonly Lazy _LastFogTriggerOffset = new(() => Schema.GetOffset(0x5B25D90218A86E0F), LazyThreadSafetyMode.None); + public ref CHandle LastFogTrigger { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5B25D90218A86E0F)); + get => ref _Handle.AsRef>(_LastFogTriggerOffset.Value); } public void FOVUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerControllerImpl.cs index 4187d5b6a..386bba4d7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,301 +17,483 @@ internal partial class CCSPlayerControllerImpl : CBasePlayerControllerImpl, CCSP public CCSPlayerControllerImpl(nint handle) : base(handle) { } + private static readonly Lazy _InGameMoneyServicesOffset = new(() => Schema.GetOffset(0x28ECD7A184B7AA82), LazyThreadSafetyMode.None); + public CCSPlayerController_InGameMoneyServices? InGameMoneyServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0x28ECD7A184B7AA82)); + var ptr = _Handle.Read(_InGameMoneyServicesOffset.Value); return ptr.IsValidPtr() ? new CCSPlayerController_InGameMoneyServicesImpl(ptr) : null; } } + private static readonly Lazy _InventoryServicesOffset = new(() => Schema.GetOffset(0x28ECD7A1E5A0A8C9), LazyThreadSafetyMode.None); + public CCSPlayerController_InventoryServices? InventoryServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0x28ECD7A1E5A0A8C9)); + var ptr = _Handle.Read(_InventoryServicesOffset.Value); return ptr.IsValidPtr() ? new CCSPlayerController_InventoryServicesImpl(ptr) : null; } } + private static readonly Lazy _ActionTrackingServicesOffset = new(() => Schema.GetOffset(0x28ECD7A1B8174144), LazyThreadSafetyMode.None); + public CCSPlayerController_ActionTrackingServices? ActionTrackingServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0x28ECD7A1B8174144)); + var ptr = _Handle.Read(_ActionTrackingServicesOffset.Value); return ptr.IsValidPtr() ? new CCSPlayerController_ActionTrackingServicesImpl(ptr) : null; } } + private static readonly Lazy _DamageServicesOffset = new(() => Schema.GetOffset(0x28ECD7A1A2CE0372), LazyThreadSafetyMode.None); + public CCSPlayerController_DamageServices? DamageServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0x28ECD7A1A2CE0372)); + var ptr = _Handle.Read(_DamageServicesOffset.Value); return ptr.IsValidPtr() ? new CCSPlayerController_DamageServicesImpl(ptr) : null; } } + private static readonly Lazy _PingOffset = new(() => Schema.GetOffset(0x28ECD7A15FA2671C), LazyThreadSafetyMode.None); + public ref uint Ping { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A15FA2671C)); + get => ref _Handle.AsRef(_PingOffset.Value); } + private static readonly Lazy _HasCommunicationAbuseMuteOffset = new(() => Schema.GetOffset(0x28ECD7A189BEC204), LazyThreadSafetyMode.None); + public ref bool HasCommunicationAbuseMute { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A189BEC204)); + get => ref _Handle.AsRef(_HasCommunicationAbuseMuteOffset.Value); } + private static readonly Lazy _UiCommunicationMuteFlagsOffset = new(() => Schema.GetOffset(0x28ECD7A1DD210AC7), LazyThreadSafetyMode.None); + public ref uint UiCommunicationMuteFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1DD210AC7)); + get => ref _Handle.AsRef(_UiCommunicationMuteFlagsOffset.Value); } + private static readonly Lazy _CrosshairCodesOffset = new(() => Schema.GetOffset(0x28ECD7A10FF7211E), LazyThreadSafetyMode.None); + public string CrosshairCodes { get { - var ptr = _Handle.Read(Schema.GetOffset(0x28ECD7A10FF7211E)); + var ptr = _Handle.Read(_CrosshairCodesOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x28ECD7A10FF7211E, value); + set => Schema.SetString(_Handle, _CrosshairCodesOffset.Value, value); } + private static readonly Lazy _PendingTeamNumOffset = new(() => Schema.GetOffset(0x28ECD7A1F6CB4D26), LazyThreadSafetyMode.None); + public ref byte PendingTeamNum { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1F6CB4D26)); + get => ref _Handle.AsRef(_PendingTeamNumOffset.Value); } + private static readonly Lazy _ForceTeamTimeOffset = new(() => Schema.GetOffset(0x28ECD7A143249332), LazyThreadSafetyMode.None); + public GameTime_t ForceTeamTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x28ECD7A143249332)); + get => new GameTime_tImpl(_Handle + _ForceTeamTimeOffset.Value); } + private static readonly Lazy _CompTeammateColorOffset = new(() => Schema.GetOffset(0x28ECD7A1F22ED09E), LazyThreadSafetyMode.None); + public ref int CompTeammateColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1F22ED09E)); + get => ref _Handle.AsRef(_CompTeammateColorOffset.Value); } + private static readonly Lazy _EverPlayedOnTeamOffset = new(() => Schema.GetOffset(0x28ECD7A16A63A242), LazyThreadSafetyMode.None); + public ref bool EverPlayedOnTeam { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A16A63A242)); + get => ref _Handle.AsRef(_EverPlayedOnTeamOffset.Value); } + private static readonly Lazy _AttemptedToGetColorOffset = new(() => Schema.GetOffset(0x28ECD7A1590EFE29), LazyThreadSafetyMode.None); + public ref bool AttemptedToGetColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1590EFE29)); + get => ref _Handle.AsRef(_AttemptedToGetColorOffset.Value); } + private static readonly Lazy _TeammatePreferredColorOffset = new(() => Schema.GetOffset(0x28ECD7A1E2798140), LazyThreadSafetyMode.None); + public ref int TeammatePreferredColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1E2798140)); + get => ref _Handle.AsRef(_TeammatePreferredColorOffset.Value); } + private static readonly Lazy _TeamChangedOffset = new(() => Schema.GetOffset(0x28ECD7A1A2481D48), LazyThreadSafetyMode.None); + public ref bool TeamChanged { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1A2481D48)); + get => ref _Handle.AsRef(_TeamChangedOffset.Value); } + private static readonly Lazy _InSwitchTeamOffset = new(() => Schema.GetOffset(0x28ECD7A13009D36F), LazyThreadSafetyMode.None); + public ref bool InSwitchTeam { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A13009D36F)); + get => ref _Handle.AsRef(_InSwitchTeamOffset.Value); } + private static readonly Lazy _HasSeenJoinGameOffset = new(() => Schema.GetOffset(0x28ECD7A181EE59E2), LazyThreadSafetyMode.None); + public ref bool HasSeenJoinGame { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A181EE59E2)); + get => ref _Handle.AsRef(_HasSeenJoinGameOffset.Value); } + private static readonly Lazy _JustBecameSpectatorOffset = new(() => Schema.GetOffset(0x28ECD7A190F9514D), LazyThreadSafetyMode.None); + public ref bool JustBecameSpectator { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A190F9514D)); + get => ref _Handle.AsRef(_JustBecameSpectatorOffset.Value); } + private static readonly Lazy _SwitchTeamsOnNextRoundResetOffset = new(() => Schema.GetOffset(0x28ECD7A1B1B483A2), LazyThreadSafetyMode.None); + public ref bool SwitchTeamsOnNextRoundReset { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1B1B483A2)); + get => ref _Handle.AsRef(_SwitchTeamsOnNextRoundResetOffset.Value); } + private static readonly Lazy _RemoveAllItemsOnNextRoundResetOffset = new(() => Schema.GetOffset(0x28ECD7A140A604B3), LazyThreadSafetyMode.None); + public ref bool RemoveAllItemsOnNextRoundReset { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A140A604B3)); + get => ref _Handle.AsRef(_RemoveAllItemsOnNextRoundResetOffset.Value); } + private static readonly Lazy _LastJoinTeamTimeOffset = new(() => Schema.GetOffset(0x28ECD7A1B2DAFB07), LazyThreadSafetyMode.None); + public GameTime_t LastJoinTeamTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x28ECD7A1B2DAFB07)); + get => new GameTime_tImpl(_Handle + _LastJoinTeamTimeOffset.Value); } + private static readonly Lazy _ClanOffset = new(() => Schema.GetOffset(0x28ECD7A10A2F1774), LazyThreadSafetyMode.None); + public string Clan { get { - var ptr = _Handle.Read(Schema.GetOffset(0x28ECD7A10A2F1774)); + var ptr = _Handle.Read(_ClanOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x28ECD7A10A2F1774, value); + set => Schema.SetString(_Handle, _ClanOffset.Value, value); } + private static readonly Lazy _CoachingTeamOffset = new(() => Schema.GetOffset(0x28ECD7A1B80B18EB), LazyThreadSafetyMode.None); + public ref int CoachingTeam { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1B80B18EB)); + get => ref _Handle.AsRef(_CoachingTeamOffset.Value); } + private static readonly Lazy _PlayerDominatedOffset = new(() => Schema.GetOffset(0x28ECD7A1B882C893), LazyThreadSafetyMode.None); + public ref ulong PlayerDominated { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1B882C893)); + get => ref _Handle.AsRef(_PlayerDominatedOffset.Value); } + private static readonly Lazy _PlayerDominatingMeOffset = new(() => Schema.GetOffset(0x28ECD7A17C8F55E4), LazyThreadSafetyMode.None); + public ref ulong PlayerDominatingMe { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A17C8F55E4)); + get => ref _Handle.AsRef(_PlayerDominatingMeOffset.Value); } + private static readonly Lazy _CompetitiveRankingOffset = new(() => Schema.GetOffset(0x28ECD7A1D82CC087), LazyThreadSafetyMode.None); + public ref int CompetitiveRanking { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1D82CC087)); + get => ref _Handle.AsRef(_CompetitiveRankingOffset.Value); } + private static readonly Lazy _CompetitiveWinsOffset = new(() => Schema.GetOffset(0x28ECD7A192776C10), LazyThreadSafetyMode.None); + public ref int CompetitiveWins { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A192776C10)); + get => ref _Handle.AsRef(_CompetitiveWinsOffset.Value); } + private static readonly Lazy _CompetitiveRankTypeOffset = new(() => Schema.GetOffset(0x28ECD7A15803DF71), LazyThreadSafetyMode.None); + public ref byte CompetitiveRankType { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A15803DF71)); + get => ref _Handle.AsRef(_CompetitiveRankTypeOffset.Value); } + private static readonly Lazy _CompetitiveRankingPredicted_WinOffset = new(() => Schema.GetOffset(0x28ECD7A1C32AD2BC), LazyThreadSafetyMode.None); + public ref int CompetitiveRankingPredicted_Win { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1C32AD2BC)); + get => ref _Handle.AsRef(_CompetitiveRankingPredicted_WinOffset.Value); } + private static readonly Lazy _CompetitiveRankingPredicted_LossOffset = new(() => Schema.GetOffset(0x28ECD7A1BDCCE5ED), LazyThreadSafetyMode.None); + public ref int CompetitiveRankingPredicted_Loss { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1BDCCE5ED)); + get => ref _Handle.AsRef(_CompetitiveRankingPredicted_LossOffset.Value); } + private static readonly Lazy _CompetitiveRankingPredicted_TieOffset = new(() => Schema.GetOffset(0x28ECD7A138CA4C74), LazyThreadSafetyMode.None); + public ref int CompetitiveRankingPredicted_Tie { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A138CA4C74)); + get => ref _Handle.AsRef(_CompetitiveRankingPredicted_TieOffset.Value); } + private static readonly Lazy _EndMatchNextMapVoteOffset = new(() => Schema.GetOffset(0x28ECD7A17AB3943C), LazyThreadSafetyMode.None); + public ref int EndMatchNextMapVote { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A17AB3943C)); + get => ref _Handle.AsRef(_EndMatchNextMapVoteOffset.Value); } + private static readonly Lazy _ActiveQuestIdOffset = new(() => Schema.GetOffset(0x28ECD7A1003CF113), LazyThreadSafetyMode.None); + public ref ushort ActiveQuestId { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1003CF113)); + get => ref _Handle.AsRef(_ActiveQuestIdOffset.Value); } + private static readonly Lazy _RtActiveMissionPeriodOffset = new(() => Schema.GetOffset(0x28ECD7A1E463EDC8), LazyThreadSafetyMode.None); + public ref uint RtActiveMissionPeriod { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1E463EDC8)); + get => ref _Handle.AsRef(_RtActiveMissionPeriodOffset.Value); } + private static readonly Lazy _QuestProgressReasonOffset = new(() => Schema.GetOffset(0x28ECD7A1BFFEC946), LazyThreadSafetyMode.None); + public ref QuestProgress__Reason QuestProgressReason { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1BFFEC946)); + get => ref _Handle.AsRef(_QuestProgressReasonOffset.Value); } + private static readonly Lazy _PlayerTvControlFlagsOffset = new(() => Schema.GetOffset(0x28ECD7A138E01A7D), LazyThreadSafetyMode.None); + public ref uint PlayerTvControlFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A138E01A7D)); + get => ref _Handle.AsRef(_PlayerTvControlFlagsOffset.Value); } + private static readonly Lazy _DraftIndexOffset = new(() => Schema.GetOffset(0x28ECD7A1EA3A0EAD), LazyThreadSafetyMode.None); + public ref int DraftIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1EA3A0EAD)); + get => ref _Handle.AsRef(_DraftIndexOffset.Value); } + private static readonly Lazy _MsQueuedModeDisconnectionTimestampOffset = new(() => Schema.GetOffset(0x28ECD7A1E91830DF), LazyThreadSafetyMode.None); + public ref uint MsQueuedModeDisconnectionTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1E91830DF)); + get => ref _Handle.AsRef(_MsQueuedModeDisconnectionTimestampOffset.Value); } + private static readonly Lazy _UiAbandonRecordedReasonOffset = new(() => Schema.GetOffset(0x28ECD7A1C9DD33D0), LazyThreadSafetyMode.None); + public ref uint UiAbandonRecordedReason { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1C9DD33D0)); + get => ref _Handle.AsRef(_UiAbandonRecordedReasonOffset.Value); } + private static readonly Lazy _NetworkDisconnectionReasonOffset = new(() => Schema.GetOffset(0x28ECD7A157EEC70A), LazyThreadSafetyMode.None); + public ref uint NetworkDisconnectionReason { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A157EEC70A)); + get => ref _Handle.AsRef(_NetworkDisconnectionReasonOffset.Value); } + private static readonly Lazy _CannotBeKickedOffset = new(() => Schema.GetOffset(0x28ECD7A135B7EA3C), LazyThreadSafetyMode.None); + public ref bool CannotBeKicked { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A135B7EA3C)); + get => ref _Handle.AsRef(_CannotBeKickedOffset.Value); } + private static readonly Lazy _EverFullyConnectedOffset = new(() => Schema.GetOffset(0x28ECD7A1F301AB32), LazyThreadSafetyMode.None); + public ref bool EverFullyConnected { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1F301AB32)); + get => ref _Handle.AsRef(_EverFullyConnectedOffset.Value); } + private static readonly Lazy _AbandonAllowsSurrenderOffset = new(() => Schema.GetOffset(0x28ECD7A14318A3BE), LazyThreadSafetyMode.None); + public ref bool AbandonAllowsSurrender { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A14318A3BE)); + get => ref _Handle.AsRef(_AbandonAllowsSurrenderOffset.Value); } + private static readonly Lazy _AbandonOffersInstantSurrenderOffset = new(() => Schema.GetOffset(0x28ECD7A1A31D03BC), LazyThreadSafetyMode.None); + public ref bool AbandonOffersInstantSurrender { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1A31D03BC)); + get => ref _Handle.AsRef(_AbandonOffersInstantSurrenderOffset.Value); } + private static readonly Lazy _Disconnection1MinWarningPrintedOffset = new(() => Schema.GetOffset(0x28ECD7A1D121B50C), LazyThreadSafetyMode.None); + public ref bool Disconnection1MinWarningPrinted { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1D121B50C)); + get => ref _Handle.AsRef(_Disconnection1MinWarningPrintedOffset.Value); } + private static readonly Lazy _ScoreReportedOffset = new(() => Schema.GetOffset(0x28ECD7A128229D7A), LazyThreadSafetyMode.None); + public ref bool ScoreReported { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A128229D7A)); + get => ref _Handle.AsRef(_ScoreReportedOffset.Value); } + private static readonly Lazy _DisconnectionTickOffset = new(() => Schema.GetOffset(0x28ECD7A1B813FC7A), LazyThreadSafetyMode.None); + public ref int DisconnectionTick { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1B813FC7A)); + get => ref _Handle.AsRef(_DisconnectionTickOffset.Value); } + private static readonly Lazy _ControllingBotOffset = new(() => Schema.GetOffset(0x28ECD7A118EA3C63), LazyThreadSafetyMode.None); + public ref bool ControllingBot { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A118EA3C63)); + get => ref _Handle.AsRef(_ControllingBotOffset.Value); } + private static readonly Lazy _HasControlledBotThisRoundOffset = new(() => Schema.GetOffset(0x28ECD7A18003721A), LazyThreadSafetyMode.None); + public ref bool HasControlledBotThisRound { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A18003721A)); + get => ref _Handle.AsRef(_HasControlledBotThisRoundOffset.Value); } + private static readonly Lazy _HasBeenControlledByPlayerThisRoundOffset = new(() => Schema.GetOffset(0x28ECD7A1FCA2F525), LazyThreadSafetyMode.None); + public ref bool HasBeenControlledByPlayerThisRound { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1FCA2F525)); + get => ref _Handle.AsRef(_HasBeenControlledByPlayerThisRoundOffset.Value); } + private static readonly Lazy _BotsControlledThisRoundOffset = new(() => Schema.GetOffset(0x28ECD7A1059DDC83), LazyThreadSafetyMode.None); + public ref int BotsControlledThisRound { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1059DDC83)); + get => ref _Handle.AsRef(_BotsControlledThisRoundOffset.Value); } + private static readonly Lazy _CanControlObservedBotOffset = new(() => Schema.GetOffset(0x28ECD7A1F6712E5B), LazyThreadSafetyMode.None); + public ref bool CanControlObservedBot { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1F6712E5B)); + get => ref _Handle.AsRef(_CanControlObservedBotOffset.Value); } + private static readonly Lazy _PlayerPawnOffset = new(() => Schema.GetOffset(0x28ECD7A1D6C93E7C), LazyThreadSafetyMode.None); + public ref CHandle PlayerPawn { - get => ref _Handle.AsRef>(Schema.GetOffset(0x28ECD7A1D6C93E7C)); + get => ref _Handle.AsRef>(_PlayerPawnOffset.Value); } + private static readonly Lazy _ObserverPawnOffset = new(() => Schema.GetOffset(0x28ECD7A154DF971F), LazyThreadSafetyMode.None); + public ref CHandle ObserverPawn { - get => ref _Handle.AsRef>(Schema.GetOffset(0x28ECD7A154DF971F)); + get => ref _Handle.AsRef>(_ObserverPawnOffset.Value); } + private static readonly Lazy _DesiredObserverModeOffset = new(() => Schema.GetOffset(0x28ECD7A17704B120), LazyThreadSafetyMode.None); + public ref int DesiredObserverMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A17704B120)); + get => ref _Handle.AsRef(_DesiredObserverModeOffset.Value); } + private static readonly Lazy _DesiredObserverTargetOffset = new(() => Schema.GetOffset(0x28ECD7A161F130C8), LazyThreadSafetyMode.None); + public ref CHandle DesiredObserverTarget { - get => ref _Handle.AsRef>(Schema.GetOffset(0x28ECD7A161F130C8)); + get => ref _Handle.AsRef>(_DesiredObserverTargetOffset.Value); } + private static readonly Lazy _PawnIsAliveOffset = new(() => Schema.GetOffset(0x28ECD7A13DB3C8D0), LazyThreadSafetyMode.None); + public ref bool PawnIsAlive { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A13DB3C8D0)); + get => ref _Handle.AsRef(_PawnIsAliveOffset.Value); } + private static readonly Lazy _PawnHealthOffset = new(() => Schema.GetOffset(0x28ECD7A196CA4790), LazyThreadSafetyMode.None); + public ref uint PawnHealth { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A196CA4790)); + get => ref _Handle.AsRef(_PawnHealthOffset.Value); } + private static readonly Lazy _PawnArmorOffset = new(() => Schema.GetOffset(0x28ECD7A1C59D2751), LazyThreadSafetyMode.None); + public ref int PawnArmor { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1C59D2751)); + get => ref _Handle.AsRef(_PawnArmorOffset.Value); } + private static readonly Lazy _PawnHasDefuserOffset = new(() => Schema.GetOffset(0x28ECD7A1D8AE243B), LazyThreadSafetyMode.None); + public ref bool PawnHasDefuser { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1D8AE243B)); + get => ref _Handle.AsRef(_PawnHasDefuserOffset.Value); } + private static readonly Lazy _PawnHasHelmetOffset = new(() => Schema.GetOffset(0x28ECD7A130AB7684), LazyThreadSafetyMode.None); + public ref bool PawnHasHelmet { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A130AB7684)); + get => ref _Handle.AsRef(_PawnHasHelmetOffset.Value); } + private static readonly Lazy _PawnCharacterDefIndexOffset = new(() => Schema.GetOffset(0x28ECD7A10A67310B), LazyThreadSafetyMode.None); + public ref ushort PawnCharacterDefIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A10A67310B)); + get => ref _Handle.AsRef(_PawnCharacterDefIndexOffset.Value); } + private static readonly Lazy _PawnLifetimeStartOffset = new(() => Schema.GetOffset(0x28ECD7A1574766CB), LazyThreadSafetyMode.None); + public ref int PawnLifetimeStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1574766CB)); + get => ref _Handle.AsRef(_PawnLifetimeStartOffset.Value); } + private static readonly Lazy _PawnLifetimeEndOffset = new(() => Schema.GetOffset(0x28ECD7A1A8D1608E), LazyThreadSafetyMode.None); + public ref int PawnLifetimeEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1A8D1608E)); + get => ref _Handle.AsRef(_PawnLifetimeEndOffset.Value); } + private static readonly Lazy _PawnBotDifficultyOffset = new(() => Schema.GetOffset(0x28ECD7A10C90C802), LazyThreadSafetyMode.None); + public ref int PawnBotDifficulty { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A10C90C802)); + get => ref _Handle.AsRef(_PawnBotDifficultyOffset.Value); } + private static readonly Lazy _OriginalControllerOfCurrentPawnOffset = new(() => Schema.GetOffset(0x28ECD7A168975EB8), LazyThreadSafetyMode.None); + public ref CHandle OriginalControllerOfCurrentPawn { - get => ref _Handle.AsRef>(Schema.GetOffset(0x28ECD7A168975EB8)); + get => ref _Handle.AsRef>(_OriginalControllerOfCurrentPawnOffset.Value); } + private static readonly Lazy _ScoreOffset = new(() => Schema.GetOffset(0x28ECD7A139E7DEAE), LazyThreadSafetyMode.None); + public ref int Score { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A139E7DEAE)); + get => ref _Handle.AsRef(_ScoreOffset.Value); } + private static readonly Lazy _RoundScoreOffset = new(() => Schema.GetOffset(0x28ECD7A1AA870DFE), LazyThreadSafetyMode.None); + public ref int RoundScore { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1AA870DFE)); + get => ref _Handle.AsRef(_RoundScoreOffset.Value); } + private static readonly Lazy _RoundsWonOffset = new(() => Schema.GetOffset(0x28ECD7A1866D1FEF), LazyThreadSafetyMode.None); + public ref int RoundsWon { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1866D1FEF)); + get => ref _Handle.AsRef(_RoundsWonOffset.Value); } public ISchemaFixedArray RecentKillQueue { get => new SchemaFixedArray(_Handle, 0x28ECD7A12540EEA5, 8, 1, 1); } + private static readonly Lazy _FirstKillOffset = new(() => Schema.GetOffset(0x28ECD7A1FEF75779), LazyThreadSafetyMode.None); + public ref byte FirstKill { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1FEF75779)); + get => ref _Handle.AsRef(_FirstKillOffset.Value); } + private static readonly Lazy _KillCountOffset = new(() => Schema.GetOffset(0x28ECD7A15CC907F4), LazyThreadSafetyMode.None); + public ref byte KillCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A15CC907F4)); + get => ref _Handle.AsRef(_KillCountOffset.Value); } + private static readonly Lazy _MvpNoMusicOffset = new(() => Schema.GetOffset(0x28ECD7A131EB0C5C), LazyThreadSafetyMode.None); + public ref bool MvpNoMusic { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A131EB0C5C)); + get => ref _Handle.AsRef(_MvpNoMusicOffset.Value); } + private static readonly Lazy _MvpReasonOffset = new(() => Schema.GetOffset(0x28ECD7A1F13150E5), LazyThreadSafetyMode.None); + public ref int MvpReason { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1F13150E5)); + get => ref _Handle.AsRef(_MvpReasonOffset.Value); } + private static readonly Lazy _MusicKitIDOffset = new(() => Schema.GetOffset(0x28ECD7A185940554), LazyThreadSafetyMode.None); + public ref int MusicKitID { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A185940554)); + get => ref _Handle.AsRef(_MusicKitIDOffset.Value); } + private static readonly Lazy _MusicKitMVPsOffset = new(() => Schema.GetOffset(0x28ECD7A188B9FF33), LazyThreadSafetyMode.None); + public ref int MusicKitMVPs { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A188B9FF33)); + get => ref _Handle.AsRef(_MusicKitMVPsOffset.Value); } + private static readonly Lazy _MVPsOffset = new(() => Schema.GetOffset(0x28ECD7A1CD5FFC12), LazyThreadSafetyMode.None); + public ref int MVPs { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1CD5FFC12)); + get => ref _Handle.AsRef(_MVPsOffset.Value); } + private static readonly Lazy _UpdateCounterOffset = new(() => Schema.GetOffset(0x28ECD7A15D476034), LazyThreadSafetyMode.None); + public ref int UpdateCounter { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A15D476034)); + get => ref _Handle.AsRef(_UpdateCounterOffset.Value); } + private static readonly Lazy _SmoothedPingOffset = new(() => Schema.GetOffset(0x28ECD7A1BB8724DC), LazyThreadSafetyMode.None); + public ref float SmoothedPing { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1BB8724DC)); + get => ref _Handle.AsRef(_SmoothedPingOffset.Value); } + private static readonly Lazy _LastHeldVoteTimerOffset = new(() => Schema.GetOffset(0x28ECD7A1CBB0044F), LazyThreadSafetyMode.None); + public IntervalTimer LastHeldVoteTimer { - get => new IntervalTimerImpl(_Handle + Schema.GetOffset(0x28ECD7A1CBB0044F)); + get => new IntervalTimerImpl(_Handle + _LastHeldVoteTimerOffset.Value); } + private static readonly Lazy _ShowHintsOffset = new(() => Schema.GetOffset(0x28ECD7A181BEA642), LazyThreadSafetyMode.None); + public ref bool ShowHints { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A181BEA642)); + get => ref _Handle.AsRef(_ShowHintsOffset.Value); } + private static readonly Lazy _NextTimeCheckOffset = new(() => Schema.GetOffset(0x28ECD7A17E63BC34), LazyThreadSafetyMode.None); + public ref int NextTimeCheck { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A17E63BC34)); + get => ref _Handle.AsRef(_NextTimeCheckOffset.Value); } + private static readonly Lazy _JustDidTeamKillOffset = new(() => Schema.GetOffset(0x28ECD7A124328709), LazyThreadSafetyMode.None); + public ref bool JustDidTeamKill { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A124328709)); + get => ref _Handle.AsRef(_JustDidTeamKillOffset.Value); } + private static readonly Lazy _PunishForTeamKillOffset = new(() => Schema.GetOffset(0x28ECD7A1181B7CB2), LazyThreadSafetyMode.None); + public ref bool PunishForTeamKill { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1181B7CB2)); + get => ref _Handle.AsRef(_PunishForTeamKillOffset.Value); } + private static readonly Lazy _GaveTeamDamageWarningOffset = new(() => Schema.GetOffset(0x28ECD7A1A129DCAC), LazyThreadSafetyMode.None); + public ref bool GaveTeamDamageWarning { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1A129DCAC)); + get => ref _Handle.AsRef(_GaveTeamDamageWarningOffset.Value); } + private static readonly Lazy _GaveTeamDamageWarningThisRoundOffset = new(() => Schema.GetOffset(0x28ECD7A1AEBE6F90), LazyThreadSafetyMode.None); + public ref bool GaveTeamDamageWarningThisRound { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1AEBE6F90)); + get => ref _Handle.AsRef(_GaveTeamDamageWarningThisRoundOffset.Value); } + private static readonly Lazy _DblLastReceivedPacketPlatFloatTimeOffset = new(() => Schema.GetOffset(0x28ECD7A1D8EB630A), LazyThreadSafetyMode.None); + public ref double DblLastReceivedPacketPlatFloatTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1D8EB630A)); + get => ref _Handle.AsRef(_DblLastReceivedPacketPlatFloatTimeOffset.Value); } + private static readonly Lazy _LastTeamDamageWarningTimeOffset = new(() => Schema.GetOffset(0x28ECD7A1570CFFD2), LazyThreadSafetyMode.None); + public GameTime_t LastTeamDamageWarningTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x28ECD7A1570CFFD2)); + get => new GameTime_tImpl(_Handle + _LastTeamDamageWarningTimeOffset.Value); } + private static readonly Lazy _LastTimePlayerWasDisconnectedForPawnsRemoveOffset = new(() => Schema.GetOffset(0x28ECD7A196817413), LazyThreadSafetyMode.None); + public GameTime_t LastTimePlayerWasDisconnectedForPawnsRemove { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x28ECD7A196817413)); + get => new GameTime_tImpl(_Handle + _LastTimePlayerWasDisconnectedForPawnsRemoveOffset.Value); } + private static readonly Lazy _SuspiciousHitCountOffset = new(() => Schema.GetOffset(0x28ECD7A102ECB89E), LazyThreadSafetyMode.None); + public ref uint SuspiciousHitCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A102ECB89E)); + get => ref _Handle.AsRef(_SuspiciousHitCountOffset.Value); } + private static readonly Lazy _NonSuspiciousHitStreakOffset = new(() => Schema.GetOffset(0x28ECD7A1D29AD1EE), LazyThreadSafetyMode.None); + public ref uint NonSuspiciousHitStreak { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1D29AD1EE)); + get => ref _Handle.AsRef(_NonSuspiciousHitStreakOffset.Value); } + private static readonly Lazy _FireBulletsSeedSynchronizedOffset = new(() => Schema.GetOffset(0x28ECD7A1FB25C915), LazyThreadSafetyMode.None); + public ref bool FireBulletsSeedSynchronized { - get => ref _Handle.AsRef(Schema.GetOffset(0x28ECD7A1FB25C915)); + get => ref _Handle.AsRef(_FireBulletsSeedSynchronizedOffset.Value); } public void InGameMoneyServicesUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_ActionTrackingServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_ActionTrackingServicesImpl.cs index c8b14a55e..a4d2e4353 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_ActionTrackingServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_ActionTrackingServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CCSPlayerController_ActionTrackingServicesImpl : CPlayerC public CCSPlayerController_ActionTrackingServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _PerRoundStatsOffset = new(() => Schema.GetOffset(0x96DF63C17C8AAE9F), LazyThreadSafetyMode.None); + public ref CUtlVector PerRoundStats { - get => ref _Handle.AsRef>(Schema.GetOffset(0x96DF63C17C8AAE9F)); + get => ref _Handle.AsRef>(_PerRoundStatsOffset.Value); } + private static readonly Lazy _MatchStatsOffset = new(() => Schema.GetOffset(0x96DF63C11729A24D), LazyThreadSafetyMode.None); + public CSMatchStats_t MatchStats { - get => new CSMatchStats_tImpl(_Handle + Schema.GetOffset(0x96DF63C11729A24D)); + get => new CSMatchStats_tImpl(_Handle + _MatchStatsOffset.Value); } + private static readonly Lazy _NumRoundKillsOffset = new(() => Schema.GetOffset(0x96DF63C1C6B90825), LazyThreadSafetyMode.None); + public ref int NumRoundKills { - get => ref _Handle.AsRef(Schema.GetOffset(0x96DF63C1C6B90825)); + get => ref _Handle.AsRef(_NumRoundKillsOffset.Value); } + private static readonly Lazy _NumRoundKillsHeadshotsOffset = new(() => Schema.GetOffset(0x96DF63C196C53F70), LazyThreadSafetyMode.None); + public ref int NumRoundKillsHeadshots { - get => ref _Handle.AsRef(Schema.GetOffset(0x96DF63C196C53F70)); + get => ref _Handle.AsRef(_NumRoundKillsHeadshotsOffset.Value); } + private static readonly Lazy _TotalRoundDamageDealtOffset = new(() => Schema.GetOffset(0x96DF63C19CF13FA6), LazyThreadSafetyMode.None); + public ref float TotalRoundDamageDealt { - get => ref _Handle.AsRef(Schema.GetOffset(0x96DF63C19CF13FA6)); + get => ref _Handle.AsRef(_TotalRoundDamageDealtOffset.Value); } public void PerRoundStatsUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_DamageServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_DamageServicesImpl.cs index 33e3e4c12..e78610046 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_DamageServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_DamageServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CCSPlayerController_DamageServicesImpl : CPlayerControlle public CCSPlayerController_DamageServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _SendUpdateOffset = new(() => Schema.GetOffset(0xC354634BBB7D4BC2), LazyThreadSafetyMode.None); + public ref int SendUpdate { - get => ref _Handle.AsRef(Schema.GetOffset(0xC354634BBB7D4BC2)); + get => ref _Handle.AsRef(_SendUpdateOffset.Value); } + private static readonly Lazy _DamageListOffset = new(() => Schema.GetOffset(0xC354634B48D4B628), LazyThreadSafetyMode.None); + public ref CUtlVector DamageList { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC354634B48D4B628)); + get => ref _Handle.AsRef>(_DamageListOffset.Value); } public void SendUpdateUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_InGameMoneyServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_InGameMoneyServicesImpl.cs index 5937d33c8..afe229581 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_InGameMoneyServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_InGameMoneyServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CCSPlayerController_InGameMoneyServicesImpl : CPlayerCont public CCSPlayerController_InGameMoneyServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _ReceivesMoneyNextRoundOffset = new(() => Schema.GetOffset(0x6C87CBFDB54DB07C), LazyThreadSafetyMode.None); + public ref bool ReceivesMoneyNextRound { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C87CBFDB54DB07C)); + get => ref _Handle.AsRef(_ReceivesMoneyNextRoundOffset.Value); } + private static readonly Lazy _MoneyEarnedForNextRoundOffset = new(() => Schema.GetOffset(0x6C87CBFDAB17AAC1), LazyThreadSafetyMode.None); + public ref int MoneyEarnedForNextRound { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C87CBFDAB17AAC1)); + get => ref _Handle.AsRef(_MoneyEarnedForNextRoundOffset.Value); } + private static readonly Lazy _AccountOffset = new(() => Schema.GetOffset(0x6C87CBFDF7F4E98B), LazyThreadSafetyMode.None); + public ref int Account { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C87CBFDF7F4E98B)); + get => ref _Handle.AsRef(_AccountOffset.Value); } + private static readonly Lazy _StartAccountOffset = new(() => Schema.GetOffset(0x6C87CBFD6433FAB7), LazyThreadSafetyMode.None); + public ref int StartAccount { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C87CBFD6433FAB7)); + get => ref _Handle.AsRef(_StartAccountOffset.Value); } + private static readonly Lazy _TotalCashSpentOffset = new(() => Schema.GetOffset(0x6C87CBFDD4977327), LazyThreadSafetyMode.None); + public ref int TotalCashSpent { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C87CBFDD4977327)); + get => ref _Handle.AsRef(_TotalCashSpentOffset.Value); } + private static readonly Lazy _CashSpentThisRoundOffset = new(() => Schema.GetOffset(0x6C87CBFDFB4284AB), LazyThreadSafetyMode.None); + public ref int CashSpentThisRound { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C87CBFDFB4284AB)); + get => ref _Handle.AsRef(_CashSpentThisRoundOffset.Value); } public void AccountUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_InventoryServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_InventoryServicesImpl.cs index 983872926..43551f6fe 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_InventoryServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_InventoryServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,51 @@ internal partial class CCSPlayerController_InventoryServicesImpl : CPlayerContro public CCSPlayerController_InventoryServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _MusicIDOffset = new(() => Schema.GetOffset(0xC1D0078289F71A5C), LazyThreadSafetyMode.None); + public ref ushort MusicID { - get => ref _Handle.AsRef(Schema.GetOffset(0xC1D0078289F71A5C)); + get => ref _Handle.AsRef(_MusicIDOffset.Value); } public ISchemaFixedArray Rank { get => new SchemaFixedArray(_Handle, 0xC1D007826A7861C7, 6, 4, 4); } + private static readonly Lazy _PersonaDataPublicLevelOffset = new(() => Schema.GetOffset(0xC1D00782BE2880D0), LazyThreadSafetyMode.None); + public ref int PersonaDataPublicLevel { - get => ref _Handle.AsRef(Schema.GetOffset(0xC1D00782BE2880D0)); + get => ref _Handle.AsRef(_PersonaDataPublicLevelOffset.Value); } + private static readonly Lazy _PersonaDataPublicCommendsLeaderOffset = new(() => Schema.GetOffset(0xC1D00782671B0B25), LazyThreadSafetyMode.None); + public ref int PersonaDataPublicCommendsLeader { - get => ref _Handle.AsRef(Schema.GetOffset(0xC1D00782671B0B25)); + get => ref _Handle.AsRef(_PersonaDataPublicCommendsLeaderOffset.Value); } + private static readonly Lazy _PersonaDataPublicCommendsTeacherOffset = new(() => Schema.GetOffset(0xC1D00782610CA282), LazyThreadSafetyMode.None); + public ref int PersonaDataPublicCommendsTeacher { - get => ref _Handle.AsRef(Schema.GetOffset(0xC1D00782610CA282)); + get => ref _Handle.AsRef(_PersonaDataPublicCommendsTeacherOffset.Value); } + private static readonly Lazy _PersonaDataPublicCommendsFriendlyOffset = new(() => Schema.GetOffset(0xC1D00782B3DA495B), LazyThreadSafetyMode.None); + public ref int PersonaDataPublicCommendsFriendly { - get => ref _Handle.AsRef(Schema.GetOffset(0xC1D00782B3DA495B)); + get => ref _Handle.AsRef(_PersonaDataPublicCommendsFriendlyOffset.Value); } + private static readonly Lazy _PersonaDataXpTrailLevelOffset = new(() => Schema.GetOffset(0xC1D0078228192B7D), LazyThreadSafetyMode.None); + public ref int PersonaDataXpTrailLevel { - get => ref _Handle.AsRef(Schema.GetOffset(0xC1D0078228192B7D)); + get => ref _Handle.AsRef(_PersonaDataXpTrailLevelOffset.Value); } public ISchemaFixedArray EquippedPlayerSprayIDs { get => new SchemaFixedArray(_Handle, 0xC1D00782CE970C93, 1, 4, 4); } + private static readonly Lazy _CurrentLoadoutHashOffset = new(() => Schema.GetOffset(0xC1D007824F832E99), LazyThreadSafetyMode.None); + public ref ulong CurrentLoadoutHash { - get => ref _Handle.AsRef(Schema.GetOffset(0xC1D007824F832E99)); + get => ref _Handle.AsRef(_CurrentLoadoutHashOffset.Value); } + private static readonly Lazy _ServerAuthoritativeWeaponSlotsOffset = new(() => Schema.GetOffset(0xC1D007826EED2FF6), LazyThreadSafetyMode.None); + public ref CUtlVector ServerAuthoritativeWeaponSlots { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC1D007826EED2FF6)); + get => ref _Handle.AsRef>(_ServerAuthoritativeWeaponSlotsOffset.Value); } public void MusicIDUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_InventoryServices__NetworkedLoadoutSlot_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_InventoryServices__NetworkedLoadoutSlot_tImpl.cs index 19a04e5b9..aff9ae193 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_InventoryServices__NetworkedLoadoutSlot_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerController_InventoryServices__NetworkedLoadoutSlot_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,23 @@ internal partial class CCSPlayerController_InventoryServices__NetworkedLoadoutSl public CCSPlayerController_InventoryServices__NetworkedLoadoutSlot_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ItemOffset = new(() => Schema.GetOffset(0x16C4EAAC5C1539E8), LazyThreadSafetyMode.None); + public CEconItemView? Item { get { - var ptr = _Handle.Read(Schema.GetOffset(0x16C4EAAC5C1539E8)); + var ptr = _Handle.Read(_ItemOffset.Value); return ptr.IsValidPtr() ? new CEconItemViewImpl(ptr) : null; } } + private static readonly Lazy _TeamOffset = new(() => Schema.GetOffset(0x16C4EAACA2FD7D0C), LazyThreadSafetyMode.None); + public ref ushort Team { - get => ref _Handle.AsRef(Schema.GetOffset(0x16C4EAACA2FD7D0C)); + get => ref _Handle.AsRef(_TeamOffset.Value); } + private static readonly Lazy _SlotOffset = new(() => Schema.GetOffset(0x16C4EAAC70954771), LazyThreadSafetyMode.None); + public ref ushort Slot { - get => ref _Handle.AsRef(Schema.GetOffset(0x16C4EAAC70954771)); + get => ref _Handle.AsRef(_SlotOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerPawnBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerPawnBaseImpl.cs index 8de2088b2..706cf64c3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerPawnBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerPawnBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,53 +17,83 @@ internal partial class CCSPlayerPawnBaseImpl : CBasePlayerPawnImpl, CCSPlayerPaw public CCSPlayerPawnBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _CTouchExpansionComponentOffset = new(() => Schema.GetOffset(0xD8F889768A159531), LazyThreadSafetyMode.None); + public CTouchExpansionComponent CTouchExpansionComponent { - get => new CTouchExpansionComponentImpl(_Handle + Schema.GetOffset(0xD8F889768A159531)); + get => new CTouchExpansionComponentImpl(_Handle + _CTouchExpansionComponentOffset.Value); } + private static readonly Lazy _PingServicesOffset = new(() => Schema.GetOffset(0xD8F889767A1487DF), LazyThreadSafetyMode.None); + public CCSPlayer_PingServices? PingServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD8F889767A1487DF)); + var ptr = _Handle.Read(_PingServicesOffset.Value); return ptr.IsValidPtr() ? new CCSPlayer_PingServicesImpl(ptr) : null; } } + private static readonly Lazy _BlindUntilTimeOffset = new(() => Schema.GetOffset(0xD8F889765869ECC5), LazyThreadSafetyMode.None); + public GameTime_t BlindUntilTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xD8F889765869ECC5)); + get => new GameTime_tImpl(_Handle + _BlindUntilTimeOffset.Value); } + private static readonly Lazy _BlindStartTimeOffset = new(() => Schema.GetOffset(0xD8F88976540D0351), LazyThreadSafetyMode.None); + public GameTime_t BlindStartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xD8F88976540D0351)); + get => new GameTime_tImpl(_Handle + _BlindStartTimeOffset.Value); } + private static readonly Lazy _PlayerStateOffset = new(() => Schema.GetOffset(0xD8F889769F641BBA), LazyThreadSafetyMode.None); + public ref CSPlayerState PlayerState { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8F889769F641BBA)); + get => ref _Handle.AsRef(_PlayerStateOffset.Value); } + private static readonly Lazy _RespawningOffset = new(() => Schema.GetOffset(0xD8F889769E9D7B99), LazyThreadSafetyMode.None); + public ref bool Respawning { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8F889769E9D7B99)); + get => ref _Handle.AsRef(_RespawningOffset.Value); } + private static readonly Lazy _HasMovedSinceSpawnOffset = new(() => Schema.GetOffset(0xD8F889763D3B1C13), LazyThreadSafetyMode.None); + public ref bool HasMovedSinceSpawn { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8F889763D3B1C13)); + get => ref _Handle.AsRef(_HasMovedSinceSpawnOffset.Value); } + private static readonly Lazy _NumSpawnsOffset = new(() => Schema.GetOffset(0xD8F8897605DCE1E8), LazyThreadSafetyMode.None); + public ref int NumSpawns { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8F8897605DCE1E8)); + get => ref _Handle.AsRef(_NumSpawnsOffset.Value); } + private static readonly Lazy _IdleTimeSinceLastActionOffset = new(() => Schema.GetOffset(0xD8F8897672DE4B20), LazyThreadSafetyMode.None); + public ref float IdleTimeSinceLastAction { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8F8897672DE4B20)); + get => ref _Handle.AsRef(_IdleTimeSinceLastActionOffset.Value); } + private static readonly Lazy _NextRadarUpdateTimeOffset = new(() => Schema.GetOffset(0xD8F889760D6C11B8), LazyThreadSafetyMode.None); + public ref float NextRadarUpdateTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8F889760D6C11B8)); + get => ref _Handle.AsRef(_NextRadarUpdateTimeOffset.Value); } + private static readonly Lazy _FlashDurationOffset = new(() => Schema.GetOffset(0xD8F88976E5A995FB), LazyThreadSafetyMode.None); + public ref float FlashDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8F88976E5A995FB)); + get => ref _Handle.AsRef(_FlashDurationOffset.Value); } + private static readonly Lazy _FlashMaxAlphaOffset = new(() => Schema.GetOffset(0xD8F889763DCF0D29), LazyThreadSafetyMode.None); + public ref float FlashMaxAlpha { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8F889763DCF0D29)); + get => ref _Handle.AsRef(_FlashMaxAlphaOffset.Value); } + private static readonly Lazy _ProgressBarStartTimeOffset = new(() => Schema.GetOffset(0xD8F889768148DE8E), LazyThreadSafetyMode.None); + public ref float ProgressBarStartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8F889768148DE8E)); + get => ref _Handle.AsRef(_ProgressBarStartTimeOffset.Value); } + private static readonly Lazy _ProgressBarDurationOffset = new(() => Schema.GetOffset(0xD8F88976BCF340B0), LazyThreadSafetyMode.None); + public ref int ProgressBarDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8F88976BCF340B0)); + get => ref _Handle.AsRef(_ProgressBarDurationOffset.Value); } + private static readonly Lazy _OriginalControllerOffset = new(() => Schema.GetOffset(0xD8F88976511FAE4C), LazyThreadSafetyMode.None); + public ref CHandle OriginalController { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD8F88976511FAE4C)); + get => ref _Handle.AsRef>(_OriginalControllerOffset.Value); } public void CTouchExpansionComponentUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerPawnImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerPawnImpl.cs index 280b22555..228c95b9d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerPawnImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerPawnImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,368 +17,586 @@ internal partial class CCSPlayerPawnImpl : CCSPlayerPawnBaseImpl, CCSPlayerPawn public CCSPlayerPawnImpl(nint handle) : base(handle) { } + private static readonly Lazy _BulletServicesOffset = new(() => Schema.GetOffset(0xC7614AAB8E2741BB), LazyThreadSafetyMode.None); + public CCSPlayer_BulletServices? BulletServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC7614AAB8E2741BB)); + var ptr = _Handle.Read(_BulletServicesOffset.Value); return ptr.IsValidPtr() ? new CCSPlayer_BulletServicesImpl(ptr) : null; } } + private static readonly Lazy _HostageServicesOffset = new(() => Schema.GetOffset(0xC7614AAB63EBD1D8), LazyThreadSafetyMode.None); + public CCSPlayer_HostageServices? HostageServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC7614AAB63EBD1D8)); + var ptr = _Handle.Read(_HostageServicesOffset.Value); return ptr.IsValidPtr() ? new CCSPlayer_HostageServicesImpl(ptr) : null; } } + private static readonly Lazy _BuyServicesOffset = new(() => Schema.GetOffset(0xC7614AAB807A410D), LazyThreadSafetyMode.None); + public CCSPlayer_BuyServices? BuyServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC7614AAB807A410D)); + var ptr = _Handle.Read(_BuyServicesOffset.Value); return ptr.IsValidPtr() ? new CCSPlayer_BuyServicesImpl(ptr) : null; } } + private static readonly Lazy _ActionTrackingServicesOffset = new(() => Schema.GetOffset(0xC7614AABB8174144), LazyThreadSafetyMode.None); + public CCSPlayer_ActionTrackingServices? ActionTrackingServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC7614AABB8174144)); + var ptr = _Handle.Read(_ActionTrackingServicesOffset.Value); return ptr.IsValidPtr() ? new CCSPlayer_ActionTrackingServicesImpl(ptr) : null; } } + private static readonly Lazy _RadioServicesOffset = new(() => Schema.GetOffset(0xC7614AAB6C70C036), LazyThreadSafetyMode.None); + public CCSPlayer_RadioServices? RadioServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC7614AAB6C70C036)); + var ptr = _Handle.Read(_RadioServicesOffset.Value); return ptr.IsValidPtr() ? new CCSPlayer_RadioServicesImpl(ptr) : null; } } + private static readonly Lazy _DamageReactServicesOffset = new(() => Schema.GetOffset(0xC7614AABF4CD61D9), LazyThreadSafetyMode.None); + public CCSPlayer_DamageReactServices? DamageReactServices { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC7614AABF4CD61D9)); + var ptr = _Handle.Read(_DamageReactServicesOffset.Value); return ptr.IsValidPtr() ? new CCSPlayer_DamageReactServicesImpl(ptr) : null; } } + private static readonly Lazy _CharacterDefIndexOffset = new(() => Schema.GetOffset(0xC7614AABA96BAF31), LazyThreadSafetyMode.None); + public ref ushort CharacterDefIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABA96BAF31)); + get => ref _Handle.AsRef(_CharacterDefIndexOffset.Value); } + private static readonly Lazy _HasFemaleVoiceOffset = new(() => Schema.GetOffset(0xC7614AAB7E7752FF), LazyThreadSafetyMode.None); + public ref bool HasFemaleVoice { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB7E7752FF)); + get => ref _Handle.AsRef(_HasFemaleVoiceOffset.Value); } + private static readonly Lazy _StrVOPrefixOffset = new(() => Schema.GetOffset(0xC7614AAB86FA355B), LazyThreadSafetyMode.None); + public string StrVOPrefix { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC7614AAB86FA355B)); + var ptr = _Handle.Read(_StrVOPrefixOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xC7614AAB86FA355B, value); + set => Schema.SetString(_Handle, _StrVOPrefixOffset.Value, value); } + private static readonly Lazy _LastPlaceNameOffset = new(() => Schema.GetOffset(0xC7614AAB4C28E3A0), LazyThreadSafetyMode.None); + public string LastPlaceName { get { - var ptr = _Handle + Schema.GetOffset(0xC7614AAB4C28E3A0); + var ptr = _Handle + _LastPlaceNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xC7614AAB4C28E3A0, value, 18); + set => Schema.SetFixedString(_Handle, _LastPlaceNameOffset.Value, value, 18); } + private static readonly Lazy _InHostageResetZoneOffset = new(() => Schema.GetOffset(0xC7614AAB5C3C71CC), LazyThreadSafetyMode.None); + public ref bool InHostageResetZone { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB5C3C71CC)); + get => ref _Handle.AsRef(_InHostageResetZoneOffset.Value); } + private static readonly Lazy _InBuyZoneOffset = new(() => Schema.GetOffset(0xC7614AAB3AC1BD10), LazyThreadSafetyMode.None); + public ref bool InBuyZone { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB3AC1BD10)); + get => ref _Handle.AsRef(_InBuyZoneOffset.Value); } + private static readonly Lazy _TouchingBuyZonesOffset = new(() => Schema.GetOffset(0xC7614AABD244D3EF), LazyThreadSafetyMode.None); + public ref CUtlVector> TouchingBuyZones { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xC7614AABD244D3EF)); + get => ref _Handle.AsRef>>(_TouchingBuyZonesOffset.Value); } + private static readonly Lazy _WasInBuyZoneOffset = new(() => Schema.GetOffset(0xC7614AABDE7A51C9), LazyThreadSafetyMode.None); + public ref bool WasInBuyZone { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABDE7A51C9)); + get => ref _Handle.AsRef(_WasInBuyZoneOffset.Value); } + private static readonly Lazy _InHostageRescueZoneOffset = new(() => Schema.GetOffset(0xC7614AABBFE04B90), LazyThreadSafetyMode.None); + public ref bool InHostageRescueZone { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABBFE04B90)); + get => ref _Handle.AsRef(_InHostageRescueZoneOffset.Value); } + private static readonly Lazy _InBombZoneOffset = new(() => Schema.GetOffset(0xC7614AABCB89478C), LazyThreadSafetyMode.None); + public ref bool InBombZone { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABCB89478C)); + get => ref _Handle.AsRef(_InBombZoneOffset.Value); } + private static readonly Lazy _WasInHostageRescueZoneOffset = new(() => Schema.GetOffset(0xC7614AAB008C8EF9), LazyThreadSafetyMode.None); + public ref bool WasInHostageRescueZone { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB008C8EF9)); + get => ref _Handle.AsRef(_WasInHostageRescueZoneOffset.Value); } + private static readonly Lazy _RetakesOfferingOffset = new(() => Schema.GetOffset(0xC7614AABD729481D), LazyThreadSafetyMode.None); + public ref int RetakesOffering { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABD729481D)); + get => ref _Handle.AsRef(_RetakesOfferingOffset.Value); } + private static readonly Lazy _RetakesOfferingCardOffset = new(() => Schema.GetOffset(0xC7614AAB3C338797), LazyThreadSafetyMode.None); + public ref int RetakesOfferingCard { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB3C338797)); + get => ref _Handle.AsRef(_RetakesOfferingCardOffset.Value); } + private static readonly Lazy _RetakesHasDefuseKitOffset = new(() => Schema.GetOffset(0xC7614AABEFC4B30A), LazyThreadSafetyMode.None); + public ref bool RetakesHasDefuseKit { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABEFC4B30A)); + get => ref _Handle.AsRef(_RetakesHasDefuseKitOffset.Value); } + private static readonly Lazy _RetakesMVPLastRoundOffset = new(() => Schema.GetOffset(0xC7614AABC87BFEF3), LazyThreadSafetyMode.None); + public ref bool RetakesMVPLastRound { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABC87BFEF3)); + get => ref _Handle.AsRef(_RetakesMVPLastRoundOffset.Value); } + private static readonly Lazy _RetakesMVPBoostItemOffset = new(() => Schema.GetOffset(0xC7614AABEC8D220C), LazyThreadSafetyMode.None); + public ref int RetakesMVPBoostItem { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABEC8D220C)); + get => ref _Handle.AsRef(_RetakesMVPBoostItemOffset.Value); } + private static readonly Lazy _RetakesMVPBoostExtraUtilityOffset = new(() => Schema.GetOffset(0xC7614AABADA37062), LazyThreadSafetyMode.None); + public ref loadout_slot_t RetakesMVPBoostExtraUtility { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABADA37062)); + get => ref _Handle.AsRef(_RetakesMVPBoostExtraUtilityOffset.Value); } + private static readonly Lazy _HealthShotBoostExpirationTimeOffset = new(() => Schema.GetOffset(0xC7614AABEC487ACC), LazyThreadSafetyMode.None); + public GameTime_t HealthShotBoostExpirationTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xC7614AABEC487ACC)); + get => new GameTime_tImpl(_Handle + _HealthShotBoostExpirationTimeOffset.Value); } + private static readonly Lazy _LandingTimeSecondsOffset = new(() => Schema.GetOffset(0xC7614AAB7D39AEE4), LazyThreadSafetyMode.None); + public ref float LandingTimeSeconds { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB7D39AEE4)); + get => ref _Handle.AsRef(_LandingTimeSecondsOffset.Value); } + private static readonly Lazy _AimPunchAngleOffset = new(() => Schema.GetOffset(0xC7614AAB1E948CB9), LazyThreadSafetyMode.None); + public ref QAngle AimPunchAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB1E948CB9)); + get => ref _Handle.AsRef(_AimPunchAngleOffset.Value); } + private static readonly Lazy _AimPunchAngleVelOffset = new(() => Schema.GetOffset(0xC7614AABB30DE0EC), LazyThreadSafetyMode.None); + public ref QAngle AimPunchAngleVel { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABB30DE0EC)); + get => ref _Handle.AsRef(_AimPunchAngleVelOffset.Value); } + private static readonly Lazy _AimPunchTickBaseOffset = new(() => Schema.GetOffset(0xC7614AABB9C874A2), LazyThreadSafetyMode.None); + public GameTick_t AimPunchTickBase { - get => new GameTick_tImpl(_Handle + Schema.GetOffset(0xC7614AABB9C874A2)); + get => new GameTick_tImpl(_Handle + _AimPunchTickBaseOffset.Value); } + private static readonly Lazy _AimPunchTickFractionOffset = new(() => Schema.GetOffset(0xC7614AAB90BE3E69), LazyThreadSafetyMode.None); + public ref float AimPunchTickFraction { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB90BE3E69)); + get => ref _Handle.AsRef(_AimPunchTickFractionOffset.Value); } + private static readonly Lazy _AimPunchCacheOffset = new(() => Schema.GetOffset(0xC7614AAB824312D8), LazyThreadSafetyMode.None); + public ref CUtlVector AimPunchCache { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC7614AAB824312D8)); + get => ref _Handle.AsRef>(_AimPunchCacheOffset.Value); } + private static readonly Lazy _IsBuyMenuOpenOffset = new(() => Schema.GetOffset(0xC7614AABFBCDD8EC), LazyThreadSafetyMode.None); + public ref bool IsBuyMenuOpen { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABFBCDD8EC)); + get => ref _Handle.AsRef(_IsBuyMenuOpenOffset.Value); } + private static readonly Lazy _LastLandTimeOffset = new(() => Schema.GetOffset(0xC7614AAB21F4A3D1), LazyThreadSafetyMode.None); + public GameTime_t LastLandTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xC7614AAB21F4A3D1)); + get => new GameTime_tImpl(_Handle + _LastLandTimeOffset.Value); } + private static readonly Lazy _OnGroundLastTickOffset = new(() => Schema.GetOffset(0xC7614AABF09CFC72), LazyThreadSafetyMode.None); + public ref bool OnGroundLastTick { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABF09CFC72)); + get => ref _Handle.AsRef(_OnGroundLastTickOffset.Value); } + private static readonly Lazy _PlayerLockedOffset = new(() => Schema.GetOffset(0xC7614AABAE9A0717), LazyThreadSafetyMode.None); + public ref int PlayerLocked { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABAE9A0717)); + get => ref _Handle.AsRef(_PlayerLockedOffset.Value); } + private static readonly Lazy _TimeOfLastInjuryOffset = new(() => Schema.GetOffset(0xC7614AABD7B4663C), LazyThreadSafetyMode.None); + public GameTime_t TimeOfLastInjury { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xC7614AABD7B4663C)); + get => new GameTime_tImpl(_Handle + _TimeOfLastInjuryOffset.Value); } + private static readonly Lazy _NextSprayDecalTimeOffset = new(() => Schema.GetOffset(0xC7614AAB53790011), LazyThreadSafetyMode.None); + public GameTime_t NextSprayDecalTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xC7614AAB53790011)); + get => new GameTime_tImpl(_Handle + _NextSprayDecalTimeOffset.Value); } + private static readonly Lazy _NextSprayDecalTimeExpeditedOffset = new(() => Schema.GetOffset(0xC7614AAB8C1B26CB), LazyThreadSafetyMode.None); + public ref bool NextSprayDecalTimeExpedited { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB8C1B26CB)); + get => ref _Handle.AsRef(_NextSprayDecalTimeExpeditedOffset.Value); } + private static readonly Lazy _RagdollDamageBoneOffset = new(() => Schema.GetOffset(0xC7614AAB31F4732F), LazyThreadSafetyMode.None); + public ref int RagdollDamageBone { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB31F4732F)); + get => ref _Handle.AsRef(_RagdollDamageBoneOffset.Value); } + private static readonly Lazy _RagdollDamageForceOffset = new(() => Schema.GetOffset(0xC7614AAB7FBF68CC), LazyThreadSafetyMode.None); + public ref Vector RagdollDamageForce { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB7FBF68CC)); + get => ref _Handle.AsRef(_RagdollDamageForceOffset.Value); } + private static readonly Lazy _RagdollDamagePositionOffset = new(() => Schema.GetOffset(0xC7614AAB29671362), LazyThreadSafetyMode.None); + public ref Vector RagdollDamagePosition { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB29671362)); + get => ref _Handle.AsRef(_RagdollDamagePositionOffset.Value); } + private static readonly Lazy _RagdollDamageWeaponNameOffset = new(() => Schema.GetOffset(0xC7614AABDAAFA519), LazyThreadSafetyMode.None); + public string RagdollDamageWeaponName { get { - var ptr = _Handle + Schema.GetOffset(0xC7614AABDAAFA519); + var ptr = _Handle + _RagdollDamageWeaponNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xC7614AABDAAFA519, value, 64); + set => Schema.SetFixedString(_Handle, _RagdollDamageWeaponNameOffset.Value, value, 64); } + private static readonly Lazy _RagdollDamageHeadshotOffset = new(() => Schema.GetOffset(0xC7614AAB324979E7), LazyThreadSafetyMode.None); + public ref bool RagdollDamageHeadshot { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB324979E7)); + get => ref _Handle.AsRef(_RagdollDamageHeadshotOffset.Value); } + private static readonly Lazy _RagdollServerOriginOffset = new(() => Schema.GetOffset(0xC7614AAB24991D61), LazyThreadSafetyMode.None); + public ref Vector RagdollServerOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB24991D61)); + get => ref _Handle.AsRef(_RagdollServerOriginOffset.Value); } + private static readonly Lazy _EconGlovesOffset = new(() => Schema.GetOffset(0xC7614AAB58DEE8E2), LazyThreadSafetyMode.None); + public CEconItemView EconGloves { - get => new CEconItemViewImpl(_Handle + Schema.GetOffset(0xC7614AAB58DEE8E2)); + get => new CEconItemViewImpl(_Handle + _EconGlovesOffset.Value); } + private static readonly Lazy _EconGlovesChangedOffset = new(() => Schema.GetOffset(0xC7614AAB617F6ACA), LazyThreadSafetyMode.None); + public ref byte EconGlovesChanged { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB617F6ACA)); + get => ref _Handle.AsRef(_EconGlovesChangedOffset.Value); } + private static readonly Lazy _DeathEyeAnglesOffset = new(() => Schema.GetOffset(0xC7614AAB6F21BE57), LazyThreadSafetyMode.None); + public ref QAngle DeathEyeAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB6F21BE57)); + get => ref _Handle.AsRef(_DeathEyeAnglesOffset.Value); } + private static readonly Lazy _SkipOneHeadConstraintUpdateOffset = new(() => Schema.GetOffset(0xC7614AAB98DC3AB2), LazyThreadSafetyMode.None); + public ref bool SkipOneHeadConstraintUpdate { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB98DC3AB2)); + get => ref _Handle.AsRef(_SkipOneHeadConstraintUpdateOffset.Value); } + private static readonly Lazy _LeftHandedOffset = new(() => Schema.GetOffset(0xC7614AAB63906F18), LazyThreadSafetyMode.None); + public ref bool LeftHanded { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB63906F18)); + get => ref _Handle.AsRef(_LeftHandedOffset.Value); } + private static readonly Lazy _SwitchedHandednessTimeOffset = new(() => Schema.GetOffset(0xC7614AAB40B8D9FE), LazyThreadSafetyMode.None); + public GameTime_t SwitchedHandednessTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xC7614AAB40B8D9FE)); + get => new GameTime_tImpl(_Handle + _SwitchedHandednessTimeOffset.Value); } + private static readonly Lazy _ViewmodelOffsetXOffset = new(() => Schema.GetOffset(0xC7614AAB6890E2BC), LazyThreadSafetyMode.None); + public ref float ViewmodelOffsetX { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB6890E2BC)); + get => ref _Handle.AsRef(_ViewmodelOffsetXOffset.Value); } + private static readonly Lazy _ViewmodelOffsetYOffset = new(() => Schema.GetOffset(0xC7614AAB6990E44F), LazyThreadSafetyMode.None); + public ref float ViewmodelOffsetY { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB6990E44F)); + get => ref _Handle.AsRef(_ViewmodelOffsetYOffset.Value); } + private static readonly Lazy _ViewmodelOffsetZOffset = new(() => Schema.GetOffset(0xC7614AAB6A90E5E2), LazyThreadSafetyMode.None); + public ref float ViewmodelOffsetZ { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB6A90E5E2)); + get => ref _Handle.AsRef(_ViewmodelOffsetZOffset.Value); } + private static readonly Lazy _ViewmodelFOVOffset = new(() => Schema.GetOffset(0xC7614AAB08EEBF76), LazyThreadSafetyMode.None); + public ref float ViewmodelFOV { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB08EEBF76)); + get => ref _Handle.AsRef(_ViewmodelFOVOffset.Value); } + private static readonly Lazy _IsWalkingOffset = new(() => Schema.GetOffset(0xC7614AAB9441C788), LazyThreadSafetyMode.None); + public ref bool IsWalking { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB9441C788)); + get => ref _Handle.AsRef(_IsWalkingOffset.Value); } + private static readonly Lazy _LastGivenDefuserTimeOffset = new(() => Schema.GetOffset(0xC7614AABDF220E63), LazyThreadSafetyMode.None); + public ref float LastGivenDefuserTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABDF220E63)); + get => ref _Handle.AsRef(_LastGivenDefuserTimeOffset.Value); } + private static readonly Lazy _LastGivenBombTimeOffset = new(() => Schema.GetOffset(0xC7614AAB99769553), LazyThreadSafetyMode.None); + public ref float LastGivenBombTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB99769553)); + get => ref _Handle.AsRef(_LastGivenBombTimeOffset.Value); } + private static readonly Lazy _DealtDamageToEnemyMostRecentTimestampOffset = new(() => Schema.GetOffset(0xC7614AABAF8A5253), LazyThreadSafetyMode.None); + public ref float DealtDamageToEnemyMostRecentTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABAF8A5253)); + get => ref _Handle.AsRef(_DealtDamageToEnemyMostRecentTimestampOffset.Value); } + private static readonly Lazy _DisplayHistoryBitsOffset = new(() => Schema.GetOffset(0xC7614AAB76E75E62), LazyThreadSafetyMode.None); + public ref uint DisplayHistoryBits { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB76E75E62)); + get => ref _Handle.AsRef(_DisplayHistoryBitsOffset.Value); } + private static readonly Lazy _LastAttackedTeammateOffset = new(() => Schema.GetOffset(0xC7614AABC0E777B2), LazyThreadSafetyMode.None); + public ref float LastAttackedTeammate { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABC0E777B2)); + get => ref _Handle.AsRef(_LastAttackedTeammateOffset.Value); } + private static readonly Lazy _AllowAutoFollowTimeOffset = new(() => Schema.GetOffset(0xC7614AABA781FC01), LazyThreadSafetyMode.None); + public GameTime_t AllowAutoFollowTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xC7614AABA781FC01)); + get => new GameTime_tImpl(_Handle + _AllowAutoFollowTimeOffset.Value); } + private static readonly Lazy _ResetArmorNextSpawnOffset = new(() => Schema.GetOffset(0xC7614AAB6B761085), LazyThreadSafetyMode.None); + public ref bool ResetArmorNextSpawn { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB6B761085)); + get => ref _Handle.AsRef(_ResetArmorNextSpawnOffset.Value); } + private static readonly Lazy _LastKillerIndexOffset = new(() => Schema.GetOffset(0xC7614AABA4700326), LazyThreadSafetyMode.None); + public ref uint LastKillerIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABA4700326)); + get => ref _Handle.AsRef(_LastKillerIndexOffset.Value); } + private static readonly Lazy _EntitySpottedStateOffset = new(() => Schema.GetOffset(0xC7614AAB032B547C), LazyThreadSafetyMode.None); + public EntitySpottedState_t EntitySpottedState { - get => new EntitySpottedState_tImpl(_Handle + Schema.GetOffset(0xC7614AAB032B547C)); + get => new EntitySpottedState_tImpl(_Handle + _EntitySpottedStateOffset.Value); } + private static readonly Lazy _SpotRulesOffset = new(() => Schema.GetOffset(0xC7614AAB776CCE44), LazyThreadSafetyMode.None); + public ref int SpotRules { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB776CCE44)); + get => ref _Handle.AsRef(_SpotRulesOffset.Value); } + private static readonly Lazy _IsScopedOffset = new(() => Schema.GetOffset(0xC7614AABF3E9A9ED), LazyThreadSafetyMode.None); + public ref bool IsScoped { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABF3E9A9ED)); + get => ref _Handle.AsRef(_IsScopedOffset.Value); } + private static readonly Lazy _ResumeZoomOffset = new(() => Schema.GetOffset(0xC7614AABB4707FB1), LazyThreadSafetyMode.None); + public ref bool ResumeZoom { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABB4707FB1)); + get => ref _Handle.AsRef(_ResumeZoomOffset.Value); } + private static readonly Lazy _IsDefusingOffset = new(() => Schema.GetOffset(0xC7614AAB5BDAECC0), LazyThreadSafetyMode.None); + public ref bool IsDefusing { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB5BDAECC0)); + get => ref _Handle.AsRef(_IsDefusingOffset.Value); } + private static readonly Lazy _IsGrabbingHostageOffset = new(() => Schema.GetOffset(0xC7614AAB43AC7BEA), LazyThreadSafetyMode.None); + public ref bool IsGrabbingHostage { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB43AC7BEA)); + get => ref _Handle.AsRef(_IsGrabbingHostageOffset.Value); } + private static readonly Lazy _BlockingUseActionInProgressOffset = new(() => Schema.GetOffset(0xC7614AAB6B0B2AC0), LazyThreadSafetyMode.None); + public ref CSPlayerBlockingUseAction_t BlockingUseActionInProgress { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB6B0B2AC0)); + get => ref _Handle.AsRef(_BlockingUseActionInProgressOffset.Value); } + private static readonly Lazy _EmitSoundTimeOffset = new(() => Schema.GetOffset(0xC7614AABC6FA84FA), LazyThreadSafetyMode.None); + public GameTime_t EmitSoundTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xC7614AABC6FA84FA)); + get => new GameTime_tImpl(_Handle + _EmitSoundTimeOffset.Value); } + private static readonly Lazy _InNoDefuseAreaOffset = new(() => Schema.GetOffset(0xC7614AAB10C6FF02), LazyThreadSafetyMode.None); + public ref bool InNoDefuseArea { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB10C6FF02)); + get => ref _Handle.AsRef(_InNoDefuseAreaOffset.Value); } + private static readonly Lazy _BombSiteIndexOffset = new(() => Schema.GetOffset(0xC7614AAB14DD85B5), LazyThreadSafetyMode.None); + public ref uint BombSiteIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB14DD85B5)); + get => ref _Handle.AsRef(_BombSiteIndexOffset.Value); } + private static readonly Lazy _WhichBombZoneOffset = new(() => Schema.GetOffset(0xC7614AAB0D69FABC), LazyThreadSafetyMode.None); + public ref int WhichBombZone { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB0D69FABC)); + get => ref _Handle.AsRef(_WhichBombZoneOffset.Value); } + private static readonly Lazy _InBombZoneTriggerOffset = new(() => Schema.GetOffset(0xC7614AAB73871310), LazyThreadSafetyMode.None); + public ref bool InBombZoneTrigger { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB73871310)); + get => ref _Handle.AsRef(_InBombZoneTriggerOffset.Value); } + private static readonly Lazy _WasInBombZoneTriggerOffset = new(() => Schema.GetOffset(0xC7614AAB2660272D), LazyThreadSafetyMode.None); + public ref bool WasInBombZoneTrigger { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB2660272D)); + get => ref _Handle.AsRef(_WasInBombZoneTriggerOffset.Value); } + private static readonly Lazy _ShotsFiredOffset = new(() => Schema.GetOffset(0xC7614AABFE518C17), LazyThreadSafetyMode.None); + public ref int ShotsFired { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABFE518C17)); + get => ref _Handle.AsRef(_ShotsFiredOffset.Value); } + private static readonly Lazy _FlinchStackOffset = new(() => Schema.GetOffset(0xC7614AAB36439B97), LazyThreadSafetyMode.None); + public ref float FlinchStack { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB36439B97)); + get => ref _Handle.AsRef(_FlinchStackOffset.Value); } + private static readonly Lazy _VelocityModifierOffset = new(() => Schema.GetOffset(0xC7614AAB7AC97631), LazyThreadSafetyMode.None); + public ref float VelocityModifier { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB7AC97631)); + get => ref _Handle.AsRef(_VelocityModifierOffset.Value); } + private static readonly Lazy _HitHeadingOffset = new(() => Schema.GetOffset(0xC7614AAB09713C4E), LazyThreadSafetyMode.None); + public ref float HitHeading { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB09713C4E)); + get => ref _Handle.AsRef(_HitHeadingOffset.Value); } + private static readonly Lazy _HitBodyPartOffset = new(() => Schema.GetOffset(0xC7614AAB0CA9863B), LazyThreadSafetyMode.None); + public ref int HitBodyPart { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB0CA9863B)); + get => ref _Handle.AsRef(_HitBodyPartOffset.Value); } + private static readonly Lazy _TotalBulletForceOffset = new(() => Schema.GetOffset(0xC7614AAB1BA998B0), LazyThreadSafetyMode.None); + public ref Vector TotalBulletForce { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB1BA998B0)); + get => ref _Handle.AsRef(_TotalBulletForceOffset.Value); } + private static readonly Lazy _WaitForNoAttackOffset = new(() => Schema.GetOffset(0xC7614AABC3DEC2A0), LazyThreadSafetyMode.None); + public ref bool WaitForNoAttack { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABC3DEC2A0)); + get => ref _Handle.AsRef(_WaitForNoAttackOffset.Value); } + private static readonly Lazy _IgnoreLadderJumpTimeOffset = new(() => Schema.GetOffset(0xC7614AABC0824DB6), LazyThreadSafetyMode.None); + public ref float IgnoreLadderJumpTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABC0824DB6)); + get => ref _Handle.AsRef(_IgnoreLadderJumpTimeOffset.Value); } + private static readonly Lazy _KilledByHeadshotOffset = new(() => Schema.GetOffset(0xC7614AABEF3D732B), LazyThreadSafetyMode.None); + public ref bool KilledByHeadshot { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABEF3D732B)); + get => ref _Handle.AsRef(_KilledByHeadshotOffset.Value); } + private static readonly Lazy _LastHitBoxOffset = new(() => Schema.GetOffset(0xC7614AAB9B4C64DB), LazyThreadSafetyMode.None); + public ref int LastHitBox { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB9B4C64DB)); + get => ref _Handle.AsRef(_LastHitBoxOffset.Value); } + private static readonly Lazy _BotOffset = new(() => Schema.GetOffset(0xC7614AAB172AF0B4), LazyThreadSafetyMode.None); + public CCSBot? Bot { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC7614AAB172AF0B4)); + var ptr = _Handle.Read(_BotOffset.Value); return ptr.IsValidPtr() ? new CCSBotImpl(ptr) : null; } } + private static readonly Lazy _BotAllowActiveOffset = new(() => Schema.GetOffset(0xC7614AAB673BB7CD), LazyThreadSafetyMode.None); + public ref bool BotAllowActive { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB673BB7CD)); + get => ref _Handle.AsRef(_BotAllowActiveOffset.Value); } + private static readonly Lazy _ThirdPersonHeadingOffset = new(() => Schema.GetOffset(0xC7614AABCE47A2A7), LazyThreadSafetyMode.None); + public ref QAngle ThirdPersonHeading { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABCE47A2A7)); + get => ref _Handle.AsRef(_ThirdPersonHeadingOffset.Value); } + private static readonly Lazy _SlopeDropOffsetOffset = new(() => Schema.GetOffset(0xC7614AABFC6CDBF0), LazyThreadSafetyMode.None); + public ref float SlopeDropOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABFC6CDBF0)); + get => ref _Handle.AsRef(_SlopeDropOffsetOffset.Value); } + private static readonly Lazy _SlopeDropHeightOffset = new(() => Schema.GetOffset(0xC7614AABD77D930C), LazyThreadSafetyMode.None); + public ref float SlopeDropHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABD77D930C)); + get => ref _Handle.AsRef(_SlopeDropHeightOffset.Value); } + private static readonly Lazy _HeadConstraintOffsetOffset = new(() => Schema.GetOffset(0xC7614AABADDDE147), LazyThreadSafetyMode.None); + public ref Vector HeadConstraintOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABADDDE147)); + get => ref _Handle.AsRef(_HeadConstraintOffsetOffset.Value); } + private static readonly Lazy _LastPickupPriorityOffset = new(() => Schema.GetOffset(0xC7614AAB9D89E5E9), LazyThreadSafetyMode.None); + public ref int LastPickupPriority { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB9D89E5E9)); + get => ref _Handle.AsRef(_LastPickupPriorityOffset.Value); } + private static readonly Lazy _LastPickupPriorityTimeOffset = new(() => Schema.GetOffset(0xC7614AABF154FBF6), LazyThreadSafetyMode.None); + public ref float LastPickupPriorityTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABF154FBF6)); + get => ref _Handle.AsRef(_LastPickupPriorityTimeOffset.Value); } + private static readonly Lazy _ArmorValueOffset = new(() => Schema.GetOffset(0xC7614AAB8937152D), LazyThreadSafetyMode.None); + public ref int ArmorValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB8937152D)); + get => ref _Handle.AsRef(_ArmorValueOffset.Value); } + private static readonly Lazy _CurrentEquipmentValueOffset = new(() => Schema.GetOffset(0xC7614AABECE8502A), LazyThreadSafetyMode.None); + public ref ushort CurrentEquipmentValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABECE8502A)); + get => ref _Handle.AsRef(_CurrentEquipmentValueOffset.Value); } + private static readonly Lazy _RoundStartEquipmentValueOffset = new(() => Schema.GetOffset(0xC7614AAB498A2F2B), LazyThreadSafetyMode.None); + public ref ushort RoundStartEquipmentValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB498A2F2B)); + get => ref _Handle.AsRef(_RoundStartEquipmentValueOffset.Value); } + private static readonly Lazy _FreezetimeEndEquipmentValueOffset = new(() => Schema.GetOffset(0xC7614AAB84CBC7A4), LazyThreadSafetyMode.None); + public ref ushort FreezetimeEndEquipmentValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB84CBC7A4)); + get => ref _Handle.AsRef(_FreezetimeEndEquipmentValueOffset.Value); } + private static readonly Lazy _LastWeaponFireUsercmdOffset = new(() => Schema.GetOffset(0xC7614AABBCBC952D), LazyThreadSafetyMode.None); + public ref int LastWeaponFireUsercmd { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABBCBC952D)); + get => ref _Handle.AsRef(_LastWeaponFireUsercmdOffset.Value); } + private static readonly Lazy _IsSpawningOffset = new(() => Schema.GetOffset(0xC7614AAB8686DDE0), LazyThreadSafetyMode.None); + public ref bool IsSpawning { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB8686DDE0)); + get => ref _Handle.AsRef(_IsSpawningOffset.Value); } + private static readonly Lazy _DeathFlagsOffset = new(() => Schema.GetOffset(0xC7614AAB5C202E41), LazyThreadSafetyMode.None); + public ref int DeathFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB5C202E41)); + get => ref _Handle.AsRef(_DeathFlagsOffset.Value); } + private static readonly Lazy _HasDeathInfoOffset = new(() => Schema.GetOffset(0xC7614AAB71E17F33), LazyThreadSafetyMode.None); + public ref bool HasDeathInfo { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB71E17F33)); + get => ref _Handle.AsRef(_HasDeathInfoOffset.Value); } + private static readonly Lazy _DeathInfoTimeOffset = new(() => Schema.GetOffset(0xC7614AAB794C7D56), LazyThreadSafetyMode.None); + public ref float DeathInfoTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB794C7D56)); + get => ref _Handle.AsRef(_DeathInfoTimeOffset.Value); } + private static readonly Lazy _DeathInfoOriginOffset = new(() => Schema.GetOffset(0xC7614AAB05B549A7), LazyThreadSafetyMode.None); + public ref Vector DeathInfoOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB05B549A7)); + get => ref _Handle.AsRef(_DeathInfoOriginOffset.Value); } public ISchemaFixedArray PlayerPatchEconIndices { get => new SchemaFixedArray(_Handle, 0xC7614AABECA447BC, 5, 4, 4); } + private static readonly Lazy _GunGameImmunityColorOffset = new(() => Schema.GetOffset(0xC7614AAB5C81D4A0), LazyThreadSafetyMode.None); + public ref Color GunGameImmunityColor { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB5C81D4A0)); + get => ref _Handle.AsRef(_GunGameImmunityColorOffset.Value); } + private static readonly Lazy _GrenadeParameterStashTimeOffset = new(() => Schema.GetOffset(0xC7614AAB86725FE0), LazyThreadSafetyMode.None); + public GameTime_t GrenadeParameterStashTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xC7614AAB86725FE0)); + get => new GameTime_tImpl(_Handle + _GrenadeParameterStashTimeOffset.Value); } + private static readonly Lazy _GrenadeParametersStashedOffset = new(() => Schema.GetOffset(0xC7614AAB0DC90C1F), LazyThreadSafetyMode.None); + public ref bool GrenadeParametersStashed { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB0DC90C1F)); + get => ref _Handle.AsRef(_GrenadeParametersStashedOffset.Value); } + private static readonly Lazy _StashedShootAnglesOffset = new(() => Schema.GetOffset(0xC7614AABBD5D41B8), LazyThreadSafetyMode.None); + public ref QAngle StashedShootAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABBD5D41B8)); + get => ref _Handle.AsRef(_StashedShootAnglesOffset.Value); } + private static readonly Lazy _StashedGrenadeThrowPositionOffset = new(() => Schema.GetOffset(0xC7614AABCC07E25A), LazyThreadSafetyMode.None); + public ref Vector StashedGrenadeThrowPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABCC07E25A)); + get => ref _Handle.AsRef(_StashedGrenadeThrowPositionOffset.Value); } + private static readonly Lazy _StashedVelocityOffset = new(() => Schema.GetOffset(0xC7614AAB577972A4), LazyThreadSafetyMode.None); + public ref Vector StashedVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB577972A4)); + get => ref _Handle.AsRef(_StashedVelocityOffset.Value); } public ISchemaFixedArray ShootAngleHistory { get => new SchemaFixedArray(_Handle, 0xC7614AABE9EFCFCF, 2, 12, 4); @@ -387,29 +607,45 @@ public ISchemaFixedArray ThrowPositionHistory { public ISchemaFixedArray VelocityHistory { get => new SchemaFixedArray(_Handle, 0xC7614AAB24AFD9B2, 2, 12, 4); } + private static readonly Lazy _PredictedDamageTagsOffset = new(() => Schema.GetOffset(0xC7614AAB2CCF5943), LazyThreadSafetyMode.None); + public ref CUtlVector PredictedDamageTags { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC7614AAB2CCF5943)); + get => ref _Handle.AsRef>(_PredictedDamageTagsOffset.Value); } + private static readonly Lazy _HighestAppliedDamageTagTickOffset = new(() => Schema.GetOffset(0xC7614AAB1703141A), LazyThreadSafetyMode.None); + public ref int HighestAppliedDamageTagTick { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB1703141A)); + get => ref _Handle.AsRef(_HighestAppliedDamageTagTickOffset.Value); } + private static readonly Lazy _CommittingSuicideOnTeamChangeOffset = new(() => Schema.GetOffset(0xC7614AAB353E5ADC), LazyThreadSafetyMode.None); + public ref bool CommittingSuicideOnTeamChange { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB353E5ADC)); + get => ref _Handle.AsRef(_CommittingSuicideOnTeamChangeOffset.Value); } + private static readonly Lazy _WasNotKilledNaturallyOffset = new(() => Schema.GetOffset(0xC7614AAB538DBAE4), LazyThreadSafetyMode.None); + public ref bool WasNotKilledNaturally { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB538DBAE4)); + get => ref _Handle.AsRef(_WasNotKilledNaturallyOffset.Value); } + private static readonly Lazy _ImmuneToGunGameDamageTimeOffset = new(() => Schema.GetOffset(0xC7614AAB8305FCCB), LazyThreadSafetyMode.None); + public GameTime_t ImmuneToGunGameDamageTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xC7614AAB8305FCCB)); + get => new GameTime_tImpl(_Handle + _ImmuneToGunGameDamageTimeOffset.Value); } + private static readonly Lazy _GunGameImmunityOffset = new(() => Schema.GetOffset(0xC7614AAB9C15080D), LazyThreadSafetyMode.None); + public ref bool GunGameImmunity { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB9C15080D)); + get => ref _Handle.AsRef(_GunGameImmunityOffset.Value); } + private static readonly Lazy _MolotovDamageTimeOffset = new(() => Schema.GetOffset(0xC7614AABD2CDBE21), LazyThreadSafetyMode.None); + public ref float MolotovDamageTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AABD2CDBE21)); + get => ref _Handle.AsRef(_MolotovDamageTimeOffset.Value); } + private static readonly Lazy _EyeAnglesOffset = new(() => Schema.GetOffset(0xC7614AAB4EE662AC), LazyThreadSafetyMode.None); + public ref QAngle EyeAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7614AAB4EE662AC)); + get => ref _Handle.AsRef(_EyeAnglesOffset.Value); } public void BulletServicesUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerResourceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerResourceImpl.cs index 1499d5f06..534126ca8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerResourceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayerResourceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -24,11 +26,15 @@ public ISchemaFixedArray IsHostageFollowingSomeone { public ISchemaFixedArray HostageEntityIDs { get => new SchemaFixedArray(_Handle, 0xBEE9B9150EEFA350, 12, 4, 4); } + private static readonly Lazy _BombsiteCenterAOffset = new(() => Schema.GetOffset(0xBEE9B915A11A73BA), LazyThreadSafetyMode.None); + public ref Vector BombsiteCenterA { - get => ref _Handle.AsRef(Schema.GetOffset(0xBEE9B915A11A73BA)); + get => ref _Handle.AsRef(_BombsiteCenterAOffset.Value); } + private static readonly Lazy _BombsiteCenterBOffset = new(() => Schema.GetOffset(0xBEE9B915A01A7227), LazyThreadSafetyMode.None); + public ref Vector BombsiteCenterB { - get => ref _Handle.AsRef(Schema.GetOffset(0xBEE9B915A01A7227)); + get => ref _Handle.AsRef(_BombsiteCenterBOffset.Value); } public ISchemaFixedArray HostageRescueX { get => new SchemaFixedArray(_Handle, 0xBEE9B91584FE2109, 4, 4, 4); @@ -39,11 +45,15 @@ public ISchemaFixedArray HostageRescueY { public ISchemaFixedArray HostageRescueZ { get => new SchemaFixedArray(_Handle, 0xBEE9B91582FE1DE3, 4, 4, 4); } + private static readonly Lazy _EndMatchNextMapAllVotedOffset = new(() => Schema.GetOffset(0xBEE9B915E1946791), LazyThreadSafetyMode.None); + public ref bool EndMatchNextMapAllVoted { - get => ref _Handle.AsRef(Schema.GetOffset(0xBEE9B915E1946791)); + get => ref _Handle.AsRef(_EndMatchNextMapAllVotedOffset.Value); } + private static readonly Lazy _FoundGoalPositionsOffset = new(() => Schema.GetOffset(0xBEE9B915A90F0670), LazyThreadSafetyMode.None); + public ref bool FoundGoalPositions { - get => ref _Handle.AsRef(Schema.GetOffset(0xBEE9B915A90F0670)); + get => ref _Handle.AsRef(_FoundGoalPositionsOffset.Value); } public void HostageAliveUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_ActionTrackingServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_ActionTrackingServicesImpl.cs index 3b4ff00ea..06a5bd38c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_ActionTrackingServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_ActionTrackingServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CCSPlayer_ActionTrackingServicesImpl : CPlayerPawnCompone public CCSPlayer_ActionTrackingServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _LastWeaponBeforeC4AutoSwitchOffset = new(() => Schema.GetOffset(0xC890019D6687BAC0), LazyThreadSafetyMode.None); + public ref CHandle LastWeaponBeforeC4AutoSwitch { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC890019D6687BAC0)); + get => ref _Handle.AsRef>(_LastWeaponBeforeC4AutoSwitchOffset.Value); } + private static readonly Lazy _IsRescuingOffset = new(() => Schema.GetOffset(0xC890019D225BDB2F), LazyThreadSafetyMode.None); + public ref bool IsRescuing { - get => ref _Handle.AsRef(Schema.GetOffset(0xC890019D225BDB2F)); + get => ref _Handle.AsRef(_IsRescuingOffset.Value); } + private static readonly Lazy _WeaponPurchasesThisMatchOffset = new(() => Schema.GetOffset(0xC890019D43F68EE0), LazyThreadSafetyMode.None); + public WeaponPurchaseTracker_t WeaponPurchasesThisMatch { - get => new WeaponPurchaseTracker_tImpl(_Handle + Schema.GetOffset(0xC890019D43F68EE0)); + get => new WeaponPurchaseTracker_tImpl(_Handle + _WeaponPurchasesThisMatchOffset.Value); } + private static readonly Lazy _WeaponPurchasesThisRoundOffset = new(() => Schema.GetOffset(0xC890019D7C64F835), LazyThreadSafetyMode.None); + public WeaponPurchaseTracker_t WeaponPurchasesThisRound { - get => new WeaponPurchaseTracker_tImpl(_Handle + Schema.GetOffset(0xC890019D7C64F835)); + get => new WeaponPurchaseTracker_tImpl(_Handle + _WeaponPurchasesThisRoundOffset.Value); } public void IsRescuingUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_BulletServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_BulletServicesImpl.cs index 862a59ec8..d8a424baf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_BulletServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_BulletServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CCSPlayer_BulletServicesImpl : CPlayerPawnComponentImpl, public CCSPlayer_BulletServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _TotalHitsOnServerOffset = new(() => Schema.GetOffset(0x39B0E99E8006CF29), LazyThreadSafetyMode.None); + public ref int TotalHitsOnServer { - get => ref _Handle.AsRef(Schema.GetOffset(0x39B0E99E8006CF29)); + get => ref _Handle.AsRef(_TotalHitsOnServerOffset.Value); } public void TotalHitsOnServerUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_BuyServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_BuyServicesImpl.cs index 05f0f456e..8a9fea239 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_BuyServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_BuyServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CCSPlayer_BuyServicesImpl : CPlayerPawnComponentImpl, CCS public CCSPlayer_BuyServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _SellbackPurchaseEntriesOffset = new(() => Schema.GetOffset(0xF0C2C12231D8CF7F), LazyThreadSafetyMode.None); + public ref CUtlVector SellbackPurchaseEntries { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF0C2C12231D8CF7F)); + get => ref _Handle.AsRef>(_SellbackPurchaseEntriesOffset.Value); } public void SellbackPurchaseEntriesUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_CameraServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_CameraServicesImpl.cs index 8e2cd8bb9..c03ee592a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_CameraServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_CameraServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_DamageReactServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_DamageReactServicesImpl.cs index 8aeae8a22..75e0d397b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_DamageReactServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_DamageReactServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_HostageServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_HostageServicesImpl.cs index b5ad3793b..c4b9c0763 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_HostageServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_HostageServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CCSPlayer_HostageServicesImpl : CPlayerPawnComponentImpl, public CCSPlayer_HostageServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _CarriedHostageOffset = new(() => Schema.GetOffset(0x1742920F695FDF3C), LazyThreadSafetyMode.None); + public ref CHandle CarriedHostage { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1742920F695FDF3C)); + get => ref _Handle.AsRef>(_CarriedHostageOffset.Value); } + private static readonly Lazy _CarriedHostagePropOffset = new(() => Schema.GetOffset(0x1742920F7270EB65), LazyThreadSafetyMode.None); + public ref CHandle CarriedHostageProp { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1742920F7270EB65)); + get => ref _Handle.AsRef>(_CarriedHostagePropOffset.Value); } public void CarriedHostageUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_ItemServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_ItemServicesImpl.cs index 280de12e9..60137971d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_ItemServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_ItemServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CCSPlayer_ItemServicesImpl : CPlayer_ItemServicesImpl, CC public CCSPlayer_ItemServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _HasDefuserOffset = new(() => Schema.GetOffset(0x6BB85EAD5AF87AF5), LazyThreadSafetyMode.None); + public ref bool HasDefuser { - get => ref _Handle.AsRef(Schema.GetOffset(0x6BB85EAD5AF87AF5)); + get => ref _Handle.AsRef(_HasDefuserOffset.Value); } + private static readonly Lazy _HasHelmetOffset = new(() => Schema.GetOffset(0x6BB85EAD4240B6F6), LazyThreadSafetyMode.None); + public ref bool HasHelmet { - get => ref _Handle.AsRef(Schema.GetOffset(0x6BB85EAD4240B6F6)); + get => ref _Handle.AsRef(_HasHelmetOffset.Value); } public void HasDefuserUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_MovementServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_MovementServicesImpl.cs index 12eedb773..b88d69e51 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_MovementServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_MovementServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,131 +17,215 @@ internal partial class CCSPlayer_MovementServicesImpl : CPlayer_MovementServices public CCSPlayer_MovementServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _LadderNormalOffset = new(() => Schema.GetOffset(0xD20D9A0308F3CAF6), LazyThreadSafetyMode.None); + public ref Vector LadderNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A0308F3CAF6)); + get => ref _Handle.AsRef(_LadderNormalOffset.Value); } + private static readonly Lazy _LadderSurfacePropIndexOffset = new(() => Schema.GetOffset(0xD20D9A03149CA20B), LazyThreadSafetyMode.None); + public ref int LadderSurfacePropIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03149CA20B)); + get => ref _Handle.AsRef(_LadderSurfacePropIndexOffset.Value); } + private static readonly Lazy _DuckAmountOffset = new(() => Schema.GetOffset(0xD20D9A03E4F7740E), LazyThreadSafetyMode.None); + public ref float DuckAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03E4F7740E)); + get => ref _Handle.AsRef(_DuckAmountOffset.Value); } + private static readonly Lazy _DuckSpeedOffset = new(() => Schema.GetOffset(0xD20D9A03A8A12375), LazyThreadSafetyMode.None); + public ref float DuckSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03A8A12375)); + get => ref _Handle.AsRef(_DuckSpeedOffset.Value); } + private static readonly Lazy _DuckOverrideOffset = new(() => Schema.GetOffset(0xD20D9A03BD1EB2E8), LazyThreadSafetyMode.None); + public ref bool DuckOverride { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03BD1EB2E8)); + get => ref _Handle.AsRef(_DuckOverrideOffset.Value); } + private static readonly Lazy _DesiresDuckOffset = new(() => Schema.GetOffset(0xD20D9A03A4034739), LazyThreadSafetyMode.None); + public ref bool DesiresDuck { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03A4034739)); + get => ref _Handle.AsRef(_DesiresDuckOffset.Value); } + private static readonly Lazy _DuckOffsetOffset = new(() => Schema.GetOffset(0xD20D9A031A34E0A5), LazyThreadSafetyMode.None); + public ref float DuckOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A031A34E0A5)); + get => ref _Handle.AsRef(_DuckOffsetOffset.Value); } + private static readonly Lazy _DuckTimeMsecsOffset = new(() => Schema.GetOffset(0xD20D9A0311815EAA), LazyThreadSafetyMode.None); + public ref uint DuckTimeMsecs { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A0311815EAA)); + get => ref _Handle.AsRef(_DuckTimeMsecsOffset.Value); } + private static readonly Lazy _DuckJumpTimeMsecsOffset = new(() => Schema.GetOffset(0xD20D9A038342B0C6), LazyThreadSafetyMode.None); + public ref uint DuckJumpTimeMsecs { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A038342B0C6)); + get => ref _Handle.AsRef(_DuckJumpTimeMsecsOffset.Value); } + private static readonly Lazy _JumpTimeMsecsOffset = new(() => Schema.GetOffset(0xD20D9A03D5CB15F1), LazyThreadSafetyMode.None); + public ref uint JumpTimeMsecs { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03D5CB15F1)); + get => ref _Handle.AsRef(_JumpTimeMsecsOffset.Value); } + private static readonly Lazy _LastDuckTimeOffset = new(() => Schema.GetOffset(0xD20D9A038F382A43), LazyThreadSafetyMode.None); + public ref float LastDuckTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A038F382A43)); + get => ref _Handle.AsRef(_LastDuckTimeOffset.Value); } + private static readonly Lazy _LastPositionAtFullCrouchSpeedOffset = new(() => Schema.GetOffset(0xD20D9A039A4D02D7), LazyThreadSafetyMode.None); + public ref Vector2D LastPositionAtFullCrouchSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A039A4D02D7)); + get => ref _Handle.AsRef(_LastPositionAtFullCrouchSpeedOffset.Value); } + private static readonly Lazy _DuckUntilOnGroundOffset = new(() => Schema.GetOffset(0xD20D9A03E36DF24A), LazyThreadSafetyMode.None); + public ref bool DuckUntilOnGround { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03E36DF24A)); + get => ref _Handle.AsRef(_DuckUntilOnGroundOffset.Value); } + private static readonly Lazy _HasWalkMovedSinceLastJumpOffset = new(() => Schema.GetOffset(0xD20D9A03D7D69D61), LazyThreadSafetyMode.None); + public ref bool HasWalkMovedSinceLastJump { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03D7D69D61)); + get => ref _Handle.AsRef(_HasWalkMovedSinceLastJumpOffset.Value); } + private static readonly Lazy _InStuckTestOffset = new(() => Schema.GetOffset(0xD20D9A03FD08796A), LazyThreadSafetyMode.None); + public ref bool InStuckTest { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03FD08796A)); + get => ref _Handle.AsRef(_InStuckTestOffset.Value); } + private static readonly Lazy _TraceCountOffset = new(() => Schema.GetOffset(0xD20D9A0350BCDC69), LazyThreadSafetyMode.None); + public ref int TraceCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A0350BCDC69)); + get => ref _Handle.AsRef(_TraceCountOffset.Value); } + private static readonly Lazy _StuckLastOffset = new(() => Schema.GetOffset(0xD20D9A03D68B88FB), LazyThreadSafetyMode.None); + public ref int StuckLast { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03D68B88FB)); + get => ref _Handle.AsRef(_StuckLastOffset.Value); } + private static readonly Lazy _SpeedCroppedOffset = new(() => Schema.GetOffset(0xD20D9A03E1DFE49B), LazyThreadSafetyMode.None); + public ref bool SpeedCropped { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03E1DFE49B)); + get => ref _Handle.AsRef(_SpeedCroppedOffset.Value); } + private static readonly Lazy _OldWaterLevelOffset = new(() => Schema.GetOffset(0xD20D9A03B1357405), LazyThreadSafetyMode.None); + public ref int OldWaterLevel { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03B1357405)); + get => ref _Handle.AsRef(_OldWaterLevelOffset.Value); } + private static readonly Lazy _WaterEntryTimeOffset = new(() => Schema.GetOffset(0xD20D9A03513244FF), LazyThreadSafetyMode.None); + public ref float WaterEntryTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03513244FF)); + get => ref _Handle.AsRef(_WaterEntryTimeOffset.Value); } + private static readonly Lazy _ForwardOffset = new(() => Schema.GetOffset(0xD20D9A035C40A2FA), LazyThreadSafetyMode.None); + public ref Vector Forward { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A035C40A2FA)); + get => ref _Handle.AsRef(_ForwardOffset.Value); } + private static readonly Lazy _LeftOffset = new(() => Schema.GetOffset(0xD20D9A03C965C1D0), LazyThreadSafetyMode.None); + public ref Vector Left { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03C965C1D0)); + get => ref _Handle.AsRef(_LeftOffset.Value); } + private static readonly Lazy _UpOffset = new(() => Schema.GetOffset(0xD20D9A03988DA280), LazyThreadSafetyMode.None); + public ref Vector Up { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03988DA280)); + get => ref _Handle.AsRef(_UpOffset.Value); } + private static readonly Lazy _GameCodeHasMovedPlayerAfterCommandOffset = new(() => Schema.GetOffset(0xD20D9A032045380F), LazyThreadSafetyMode.None); + public ref int GameCodeHasMovedPlayerAfterCommand { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A032045380F)); + get => ref _Handle.AsRef(_GameCodeHasMovedPlayerAfterCommandOffset.Value); } + private static readonly Lazy _MadeFootstepNoiseOffset = new(() => Schema.GetOffset(0xD20D9A03AB117268), LazyThreadSafetyMode.None); + public ref bool MadeFootstepNoise { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03AB117268)); + get => ref _Handle.AsRef(_MadeFootstepNoiseOffset.Value); } + private static readonly Lazy _FootstepsOffset = new(() => Schema.GetOffset(0xD20D9A031262251B), LazyThreadSafetyMode.None); + public ref int Footsteps { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A031262251B)); + get => ref _Handle.AsRef(_FootstepsOffset.Value); } + private static readonly Lazy _OldJumpPressedOffset = new(() => Schema.GetOffset(0xD20D9A03030FC474), LazyThreadSafetyMode.None); + public ref bool OldJumpPressed { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03030FC474)); + get => ref _Handle.AsRef(_OldJumpPressedOffset.Value); } + private static readonly Lazy _JumpPressedTimeOffset = new(() => Schema.GetOffset(0xD20D9A0321A2A38A), LazyThreadSafetyMode.None); + public ref float JumpPressedTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A0321A2A38A)); + get => ref _Handle.AsRef(_JumpPressedTimeOffset.Value); } + private static readonly Lazy _StashGrenadeParameterWhenOffset = new(() => Schema.GetOffset(0xD20D9A03FCB5208F), LazyThreadSafetyMode.None); + public GameTime_t StashGrenadeParameterWhen { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xD20D9A03FCB5208F)); + get => new GameTime_tImpl(_Handle + _StashGrenadeParameterWhenOffset.Value); } + private static readonly Lazy _ButtonDownMaskPrevOffset = new(() => Schema.GetOffset(0xD20D9A03FA4E9DC4), LazyThreadSafetyMode.None); + public ref ulong ButtonDownMaskPrev { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03FA4E9DC4)); + get => ref _Handle.AsRef(_ButtonDownMaskPrevOffset.Value); } + private static readonly Lazy _OffsetTickCompleteTimeOffset = new(() => Schema.GetOffset(0xD20D9A034CAE24AF), LazyThreadSafetyMode.None); + public ref float OffsetTickCompleteTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A034CAE24AF)); + get => ref _Handle.AsRef(_OffsetTickCompleteTimeOffset.Value); } + private static readonly Lazy _OffsetTickStashedSpeedOffset = new(() => Schema.GetOffset(0xD20D9A03FA676BF2), LazyThreadSafetyMode.None); + public ref float OffsetTickStashedSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03FA676BF2)); + get => ref _Handle.AsRef(_OffsetTickStashedSpeedOffset.Value); } + private static readonly Lazy _StaminaOffset = new(() => Schema.GetOffset(0xD20D9A03EE725C8C), LazyThreadSafetyMode.None); + public ref float Stamina { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03EE725C8C)); + get => ref _Handle.AsRef(_StaminaOffset.Value); } + private static readonly Lazy _HeightAtJumpStartOffset = new(() => Schema.GetOffset(0xD20D9A03DDECB4A7), LazyThreadSafetyMode.None); + public ref float HeightAtJumpStart { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03DDECB4A7)); + get => ref _Handle.AsRef(_HeightAtJumpStartOffset.Value); } + private static readonly Lazy _MaxJumpHeightThisJumpOffset = new(() => Schema.GetOffset(0xD20D9A03C5568E64), LazyThreadSafetyMode.None); + public ref float MaxJumpHeightThisJump { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03C5568E64)); + get => ref _Handle.AsRef(_MaxJumpHeightThisJumpOffset.Value); } + private static readonly Lazy _MaxJumpHeightLastJumpOffset = new(() => Schema.GetOffset(0xD20D9A0388EBCFD8), LazyThreadSafetyMode.None); + public ref float MaxJumpHeightLastJump { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A0388EBCFD8)); + get => ref _Handle.AsRef(_MaxJumpHeightLastJumpOffset.Value); } + private static readonly Lazy _StaminaAtJumpStartOffset = new(() => Schema.GetOffset(0xD20D9A03C3FDC1E3), LazyThreadSafetyMode.None); + public ref float StaminaAtJumpStart { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03C3FDC1E3)); + get => ref _Handle.AsRef(_StaminaAtJumpStartOffset.Value); } + private static readonly Lazy _AccumulatedJumpErrorOffset = new(() => Schema.GetOffset(0xD20D9A032700AC7F), LazyThreadSafetyMode.None); + public ref float AccumulatedJumpError { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A032700AC7F)); + get => ref _Handle.AsRef(_AccumulatedJumpErrorOffset.Value); } + private static readonly Lazy _TicksSinceLastSurfingDetectedOffset = new(() => Schema.GetOffset(0xD20D9A0332924D1F), LazyThreadSafetyMode.None); + public ref float TicksSinceLastSurfingDetected { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A0332924D1F)); + get => ref _Handle.AsRef(_TicksSinceLastSurfingDetectedOffset.Value); } + private static readonly Lazy _WasSurfingOffset = new(() => Schema.GetOffset(0xD20D9A03C30201EE), LazyThreadSafetyMode.None); + public ref bool WasSurfing { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03C30201EE)); + get => ref _Handle.AsRef(_WasSurfingOffset.Value); } + private static readonly Lazy _InputRotatedOffset = new(() => Schema.GetOffset(0xD20D9A03853EE154), LazyThreadSafetyMode.None); + public ref Vector InputRotated { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03853EE154)); + get => ref _Handle.AsRef(_InputRotatedOffset.Value); } + private static readonly Lazy _JumpApexPendingOffset = new(() => Schema.GetOffset(0xD20D9A03B2669F50), LazyThreadSafetyMode.None); + public ref bool JumpApexPending { - get => ref _Handle.AsRef(Schema.GetOffset(0xD20D9A03B2669F50)); + get => ref _Handle.AsRef(_JumpApexPendingOffset.Value); } public void LadderNormalUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_PingServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_PingServicesImpl.cs index 6ce34e888..ac37caa4e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_PingServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_PingServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CCSPlayer_PingServicesImpl : CPlayerPawnComponentImpl, CC public CCSPlayer_PingServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _PlayerPingTokensOffset = new(() => Schema.GetOffset(0xC78D79CA55696280), LazyThreadSafetyMode.None); + public SchemaUntypedField PlayerPingTokens { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC78D79CA55696280)); + get => new SchemaUntypedField(_Handle + _PlayerPingTokensOffset.Value); } + private static readonly Lazy _PlayerPingOffset = new(() => Schema.GetOffset(0xC78D79CA464EEA6E), LazyThreadSafetyMode.None); + public ref CHandle PlayerPing { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC78D79CA464EEA6E)); + get => ref _Handle.AsRef>(_PlayerPingOffset.Value); } public void PlayerPingUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_RadioServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_RadioServicesImpl.cs index 8df490341..4fdef1c41 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_RadioServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_RadioServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CCSPlayer_RadioServicesImpl : CPlayerPawnComponentImpl, C public CCSPlayer_RadioServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _GotHostageTalkTimerOffset = new(() => Schema.GetOffset(0x8E7F7B35729FE1A3), LazyThreadSafetyMode.None); + public GameTime_t GotHostageTalkTimer { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8E7F7B35729FE1A3)); + get => new GameTime_tImpl(_Handle + _GotHostageTalkTimerOffset.Value); } + private static readonly Lazy _DefusingTalkTimerOffset = new(() => Schema.GetOffset(0x8E7F7B355AF7F835), LazyThreadSafetyMode.None); + public GameTime_t DefusingTalkTimer { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8E7F7B355AF7F835)); + get => new GameTime_tImpl(_Handle + _DefusingTalkTimerOffset.Value); } + private static readonly Lazy _C4PlantTalkTimerOffset = new(() => Schema.GetOffset(0x8E7F7B35CE58ABD4), LazyThreadSafetyMode.None); + public GameTime_t C4PlantTalkTimer { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8E7F7B35CE58ABD4)); + get => new GameTime_tImpl(_Handle + _C4PlantTalkTimerOffset.Value); } + private static readonly Lazy _RadioTokenSlotsOffset = new(() => Schema.GetOffset(0x8E7F7B356FB722D0), LazyThreadSafetyMode.None); + public SchemaUntypedField RadioTokenSlots { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8E7F7B356FB722D0)); + get => new SchemaUntypedField(_Handle + _RadioTokenSlotsOffset.Value); } + private static readonly Lazy _IgnoreRadioOffset = new(() => Schema.GetOffset(0x8E7F7B3562FA7576), LazyThreadSafetyMode.None); + public ref bool IgnoreRadio { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E7F7B3562FA7576)); + get => ref _Handle.AsRef(_IgnoreRadioOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_UseServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_UseServicesImpl.cs index 6bf09942d..0a9a388f9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_UseServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_UseServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CCSPlayer_UseServicesImpl : CPlayer_UseServicesImpl, CCSP public CCSPlayer_UseServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _LastKnownUseEntityOffset = new(() => Schema.GetOffset(0xE5F718912806F946), LazyThreadSafetyMode.None); + public ref CHandle LastKnownUseEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE5F718912806F946)); + get => ref _Handle.AsRef>(_LastKnownUseEntityOffset.Value); } + private static readonly Lazy _LastUseTimeStampOffset = new(() => Schema.GetOffset(0xE5F7189104BF376E), LazyThreadSafetyMode.None); + public GameTime_t LastUseTimeStamp { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xE5F7189104BF376E)); + get => new GameTime_tImpl(_Handle + _LastUseTimeStampOffset.Value); } + private static readonly Lazy _TimeLastUsedWindowOffset = new(() => Schema.GetOffset(0xE5F7189165762AEB), LazyThreadSafetyMode.None); + public GameTime_t TimeLastUsedWindow { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xE5F7189165762AEB)); + get => new GameTime_tImpl(_Handle + _TimeLastUsedWindowOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_WaterServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_WaterServicesImpl.cs index 490ea2a31..3ed330d65 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_WaterServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_WaterServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CCSPlayer_WaterServicesImpl : CPlayer_WaterServicesImpl, public CCSPlayer_WaterServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _NextDrownDamageTimeOffset = new(() => Schema.GetOffset(0x81EE3221161B7836), LazyThreadSafetyMode.None); + public GameTime_t NextDrownDamageTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x81EE3221161B7836)); + get => new GameTime_tImpl(_Handle + _NextDrownDamageTimeOffset.Value); } + private static readonly Lazy _DrownDmgRateOffset = new(() => Schema.GetOffset(0x81EE3221DB1DC111), LazyThreadSafetyMode.None); + public ref int DrownDmgRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x81EE3221DB1DC111)); + get => ref _Handle.AsRef(_DrownDmgRateOffset.Value); } + private static readonly Lazy _AirFinishedTimeOffset = new(() => Schema.GetOffset(0x81EE3221F32CD208), LazyThreadSafetyMode.None); + public GameTime_t AirFinishedTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x81EE3221F32CD208)); + get => new GameTime_tImpl(_Handle + _AirFinishedTimeOffset.Value); } + private static readonly Lazy _WaterJumpTimeOffset = new(() => Schema.GetOffset(0x81EE3221E7A7489F), LazyThreadSafetyMode.None); + public ref float WaterJumpTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x81EE3221E7A7489F)); + get => ref _Handle.AsRef(_WaterJumpTimeOffset.Value); } + private static readonly Lazy _WaterJumpVelOffset = new(() => Schema.GetOffset(0x81EE3221B3333137), LazyThreadSafetyMode.None); + public ref Vector WaterJumpVel { - get => ref _Handle.AsRef(Schema.GetOffset(0x81EE3221B3333137)); + get => ref _Handle.AsRef(_WaterJumpVelOffset.Value); } + private static readonly Lazy _SwimSoundTimeOffset = new(() => Schema.GetOffset(0x81EE32218B6E62D7), LazyThreadSafetyMode.None); + public ref float SwimSoundTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x81EE32218B6E62D7)); + get => ref _Handle.AsRef(_SwimSoundTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_WeaponServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_WeaponServicesImpl.cs index 2f0be92e8..2272ce22f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_WeaponServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPlayer_WeaponServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,50 +17,80 @@ internal partial class CCSPlayer_WeaponServicesImpl : CPlayer_WeaponServicesImpl public CCSPlayer_WeaponServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _NextAttackOffset = new(() => Schema.GetOffset(0x13067CB23DFDCDEA), LazyThreadSafetyMode.None); + public GameTime_t NextAttack { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x13067CB23DFDCDEA)); + get => new GameTime_tImpl(_Handle + _NextAttackOffset.Value); } + private static readonly Lazy _IsLookingAtWeaponOffset = new(() => Schema.GetOffset(0x13067CB223393CBF), LazyThreadSafetyMode.None); + public ref bool IsLookingAtWeapon { - get => ref _Handle.AsRef(Schema.GetOffset(0x13067CB223393CBF)); + get => ref _Handle.AsRef(_IsLookingAtWeaponOffset.Value); } + private static readonly Lazy _IsHoldingLookAtWeaponOffset = new(() => Schema.GetOffset(0x13067CB2AF0F7486), LazyThreadSafetyMode.None); + public ref bool IsHoldingLookAtWeapon { - get => ref _Handle.AsRef(Schema.GetOffset(0x13067CB2AF0F7486)); + get => ref _Handle.AsRef(_IsHoldingLookAtWeaponOffset.Value); } + private static readonly Lazy _SavedWeaponOffset = new(() => Schema.GetOffset(0x13067CB248BC7512), LazyThreadSafetyMode.None); + public ref CHandle SavedWeapon { - get => ref _Handle.AsRef>(Schema.GetOffset(0x13067CB248BC7512)); + get => ref _Handle.AsRef>(_SavedWeaponOffset.Value); } + private static readonly Lazy _TimeToMeleeOffset = new(() => Schema.GetOffset(0x13067CB2B21B94A7), LazyThreadSafetyMode.None); + public ref int TimeToMelee { - get => ref _Handle.AsRef(Schema.GetOffset(0x13067CB2B21B94A7)); + get => ref _Handle.AsRef(_TimeToMeleeOffset.Value); } + private static readonly Lazy _TimeToSecondaryOffset = new(() => Schema.GetOffset(0x13067CB2CA0FD845), LazyThreadSafetyMode.None); + public ref int TimeToSecondary { - get => ref _Handle.AsRef(Schema.GetOffset(0x13067CB2CA0FD845)); + get => ref _Handle.AsRef(_TimeToSecondaryOffset.Value); } + private static readonly Lazy _TimeToPrimaryOffset = new(() => Schema.GetOffset(0x13067CB2B1AFDA45), LazyThreadSafetyMode.None); + public ref int TimeToPrimary { - get => ref _Handle.AsRef(Schema.GetOffset(0x13067CB2B1AFDA45)); + get => ref _Handle.AsRef(_TimeToPrimaryOffset.Value); } + private static readonly Lazy _TimeToSniperRifleOffset = new(() => Schema.GetOffset(0x13067CB2A9FF6B8C), LazyThreadSafetyMode.None); + public ref int TimeToSniperRifle { - get => ref _Handle.AsRef(Schema.GetOffset(0x13067CB2A9FF6B8C)); + get => ref _Handle.AsRef(_TimeToSniperRifleOffset.Value); } + private static readonly Lazy _IsBeingGivenItemOffset = new(() => Schema.GetOffset(0x13067CB2D16DF82E), LazyThreadSafetyMode.None); + public ref bool IsBeingGivenItem { - get => ref _Handle.AsRef(Schema.GetOffset(0x13067CB2D16DF82E)); + get => ref _Handle.AsRef(_IsBeingGivenItemOffset.Value); } + private static readonly Lazy _IsPickingUpItemWithUseOffset = new(() => Schema.GetOffset(0x13067CB2833CCD8D), LazyThreadSafetyMode.None); + public ref bool IsPickingUpItemWithUse { - get => ref _Handle.AsRef(Schema.GetOffset(0x13067CB2833CCD8D)); + get => ref _Handle.AsRef(_IsPickingUpItemWithUseOffset.Value); } + private static readonly Lazy _PickedUpWeaponOffset = new(() => Schema.GetOffset(0x13067CB21EEE10C0), LazyThreadSafetyMode.None); + public ref bool PickedUpWeapon { - get => ref _Handle.AsRef(Schema.GetOffset(0x13067CB21EEE10C0)); + get => ref _Handle.AsRef(_PickedUpWeaponOffset.Value); } + private static readonly Lazy _DisableAutoDeployOffset = new(() => Schema.GetOffset(0x13067CB2B208C90B), LazyThreadSafetyMode.None); + public ref bool DisableAutoDeploy { - get => ref _Handle.AsRef(Schema.GetOffset(0x13067CB2B208C90B)); + get => ref _Handle.AsRef(_DisableAutoDeployOffset.Value); } + private static readonly Lazy _IsPickingUpGroundWeaponOffset = new(() => Schema.GetOffset(0x13067CB2CA423D76), LazyThreadSafetyMode.None); + public ref bool IsPickingUpGroundWeapon { - get => ref _Handle.AsRef(Schema.GetOffset(0x13067CB2CA423D76)); + get => ref _Handle.AsRef(_IsPickingUpGroundWeaponOffset.Value); } + private static readonly Lazy _NetworkAnimTimingOffset = new(() => Schema.GetOffset(0x13067CB253AFB9FA), LazyThreadSafetyMode.None); + public ref CUtlVector NetworkAnimTiming { - get => ref _Handle.AsRef>(Schema.GetOffset(0x13067CB253AFB9FA)); + get => ref _Handle.AsRef>(_NetworkAnimTimingOffset.Value); } + private static readonly Lazy _BlockInspectUntilNextGraphUpdateOffset = new(() => Schema.GetOffset(0x13067CB2029ABB28), LazyThreadSafetyMode.None); + public ref bool BlockInspectUntilNextGraphUpdate { - get => ref _Handle.AsRef(Schema.GetOffset(0x13067CB2029ABB28)); + get => ref _Handle.AsRef(_BlockInspectUntilNextGraphUpdateOffset.Value); } public void NextAttackUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPointPulseAPIImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPointPulseAPIImpl.cs index 6d6c580dc..13579445e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPointPulseAPIImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPointPulseAPIImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPointScriptEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPointScriptEntityImpl.cs index daebf7a00..affc0aeca 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPointScriptEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSPointScriptEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSSpriteImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSSpriteImpl.cs index 92a40c5c2..f9e131b54 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSSpriteImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSSpriteImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSTeamImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSTeamImpl.cs index 0f9b9092a..cbc8d665f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSTeamImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSTeamImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,63 +17,91 @@ internal partial class CCSTeamImpl : CTeamImpl, CCSTeam { public CCSTeamImpl(nint handle) : base(handle) { } + private static readonly Lazy _LastRecievedShorthandedRoundBonusOffset = new(() => Schema.GetOffset(0x1CE326C97862C8DB), LazyThreadSafetyMode.None); + public ref int LastRecievedShorthandedRoundBonus { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CE326C97862C8DB)); + get => ref _Handle.AsRef(_LastRecievedShorthandedRoundBonusOffset.Value); } + private static readonly Lazy _ShorthandedRoundBonusStartRoundOffset = new(() => Schema.GetOffset(0x1CE326C99B1C0796), LazyThreadSafetyMode.None); + public ref int ShorthandedRoundBonusStartRound { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CE326C99B1C0796)); + get => ref _Handle.AsRef(_ShorthandedRoundBonusStartRoundOffset.Value); } + private static readonly Lazy _SurrenderedOffset = new(() => Schema.GetOffset(0x1CE326C9CFFCED54), LazyThreadSafetyMode.None); + public ref bool Surrendered { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CE326C9CFFCED54)); + get => ref _Handle.AsRef(_SurrenderedOffset.Value); } + private static readonly Lazy _TeamMatchStatOffset = new(() => Schema.GetOffset(0x1CE326C9D2C89DC0), LazyThreadSafetyMode.None); + public string TeamMatchStat { get { - var ptr = _Handle + Schema.GetOffset(0x1CE326C9D2C89DC0); + var ptr = _Handle + _TeamMatchStatOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x1CE326C9D2C89DC0, value, 512); + set => Schema.SetFixedString(_Handle, _TeamMatchStatOffset.Value, value, 512); } + private static readonly Lazy _NumMapVictoriesOffset = new(() => Schema.GetOffset(0x1CE326C92BC4DE0F), LazyThreadSafetyMode.None); + public ref int NumMapVictories { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CE326C92BC4DE0F)); + get => ref _Handle.AsRef(_NumMapVictoriesOffset.Value); } + private static readonly Lazy _ScoreFirstHalfOffset = new(() => Schema.GetOffset(0x1CE326C9E497F5A0), LazyThreadSafetyMode.None); + public ref int ScoreFirstHalf { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CE326C9E497F5A0)); + get => ref _Handle.AsRef(_ScoreFirstHalfOffset.Value); } + private static readonly Lazy _ScoreSecondHalfOffset = new(() => Schema.GetOffset(0x1CE326C9A75CAE2C), LazyThreadSafetyMode.None); + public ref int ScoreSecondHalf { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CE326C9A75CAE2C)); + get => ref _Handle.AsRef(_ScoreSecondHalfOffset.Value); } + private static readonly Lazy _ScoreOvertimeOffset = new(() => Schema.GetOffset(0x1CE326C9A22D3CEE), LazyThreadSafetyMode.None); + public ref int ScoreOvertime { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CE326C9A22D3CEE)); + get => ref _Handle.AsRef(_ScoreOvertimeOffset.Value); } + private static readonly Lazy _ClanTeamnameOffset = new(() => Schema.GetOffset(0x1CE326C946453F76), LazyThreadSafetyMode.None); + public string ClanTeamname { get { - var ptr = _Handle + Schema.GetOffset(0x1CE326C946453F76); + var ptr = _Handle + _ClanTeamnameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x1CE326C946453F76, value, 129); + set => Schema.SetFixedString(_Handle, _ClanTeamnameOffset.Value, value, 129); } + private static readonly Lazy _ClanIDOffset = new(() => Schema.GetOffset(0x1CE326C90A807BAD), LazyThreadSafetyMode.None); + public ref uint ClanID { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CE326C90A807BAD)); + get => ref _Handle.AsRef(_ClanIDOffset.Value); } + private static readonly Lazy _TeamFlagImageOffset = new(() => Schema.GetOffset(0x1CE326C9F7FF31D0), LazyThreadSafetyMode.None); + public string TeamFlagImage { get { - var ptr = _Handle + Schema.GetOffset(0x1CE326C9F7FF31D0); + var ptr = _Handle + _TeamFlagImageOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x1CE326C9F7FF31D0, value, 8); + set => Schema.SetFixedString(_Handle, _TeamFlagImageOffset.Value, value, 8); } + private static readonly Lazy _TeamLogoImageOffset = new(() => Schema.GetOffset(0x1CE326C981DF092B), LazyThreadSafetyMode.None); + public string TeamLogoImage { get { - var ptr = _Handle + Schema.GetOffset(0x1CE326C981DF092B); + var ptr = _Handle + _TeamLogoImageOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x1CE326C981DF092B, value, 8); + set => Schema.SetFixedString(_Handle, _TeamLogoImageOffset.Value, value, 8); } + private static readonly Lazy _NextResourceTimeOffset = new(() => Schema.GetOffset(0x1CE326C97E7CA6AF), LazyThreadSafetyMode.None); + public ref float NextResourceTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CE326C97E7CA6AF)); + get => ref _Handle.AsRef(_NextResourceTimeOffset.Value); } + private static readonly Lazy _LastUpdateSentAtOffset = new(() => Schema.GetOffset(0x1CE326C937FCAA0A), LazyThreadSafetyMode.None); + public ref int LastUpdateSentAt { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CE326C937FCAA0A)); + get => ref _Handle.AsRef(_LastUpdateSentAtOffset.Value); } public void SurrenderedUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSWeaponBaseGunImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSWeaponBaseGunImpl.cs index 99f8bd18a..462ac94a6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSWeaponBaseGunImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSWeaponBaseGunImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class CCSWeaponBaseGunImpl : CCSWeaponBaseImpl, CCSWeaponBaseGu public CCSWeaponBaseGunImpl(nint handle) : base(handle) { } + private static readonly Lazy _ZoomLevelOffset = new(() => Schema.GetOffset(0xBC30B081444E63A0), LazyThreadSafetyMode.None); + public ref int ZoomLevel { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC30B081444E63A0)); + get => ref _Handle.AsRef(_ZoomLevelOffset.Value); } + private static readonly Lazy _BurstShotsRemainingOffset = new(() => Schema.GetOffset(0xBC30B081F53841A5), LazyThreadSafetyMode.None); + public ref int BurstShotsRemaining { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC30B081F53841A5)); + get => ref _Handle.AsRef(_BurstShotsRemainingOffset.Value); } + private static readonly Lazy _SilencedModelIndexOffset = new(() => Schema.GetOffset(0xBC30B08178E5CAAB), LazyThreadSafetyMode.None); + public ref int SilencedModelIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC30B08178E5CAAB)); + get => ref _Handle.AsRef(_SilencedModelIndexOffset.Value); } + private static readonly Lazy _InPrecacheOffset = new(() => Schema.GetOffset(0xBC30B081495003CB), LazyThreadSafetyMode.None); + public ref bool InPrecache { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC30B081495003CB)); + get => ref _Handle.AsRef(_InPrecacheOffset.Value); } + private static readonly Lazy _NeedsBoltActionOffset = new(() => Schema.GetOffset(0xBC30B0813632E797), LazyThreadSafetyMode.None); + public ref bool NeedsBoltAction { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC30B0813632E797)); + get => ref _Handle.AsRef(_NeedsBoltActionOffset.Value); } + private static readonly Lazy _RevolverCylinderIdxOffset = new(() => Schema.GetOffset(0xBC30B08119D0E90B), LazyThreadSafetyMode.None); + public ref int RevolverCylinderIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC30B08119D0E90B)); + get => ref _Handle.AsRef(_RevolverCylinderIdxOffset.Value); } + private static readonly Lazy _SkillReloadAvailableOffset = new(() => Schema.GetOffset(0xBC30B081C7961BE2), LazyThreadSafetyMode.None); + public ref bool SkillReloadAvailable { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC30B081C7961BE2)); + get => ref _Handle.AsRef(_SkillReloadAvailableOffset.Value); } + private static readonly Lazy _SkillReloadLiftedReloadKeyOffset = new(() => Schema.GetOffset(0xBC30B0819C3A15B5), LazyThreadSafetyMode.None); + public ref bool SkillReloadLiftedReloadKey { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC30B0819C3A15B5)); + get => ref _Handle.AsRef(_SkillReloadLiftedReloadKeyOffset.Value); } + private static readonly Lazy _SkillBoltInterruptAvailableOffset = new(() => Schema.GetOffset(0xBC30B0816FE62EEF), LazyThreadSafetyMode.None); + public ref bool SkillBoltInterruptAvailable { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC30B0816FE62EEF)); + get => ref _Handle.AsRef(_SkillBoltInterruptAvailableOffset.Value); } + private static readonly Lazy _SkillBoltLiftedFireKeyOffset = new(() => Schema.GetOffset(0xBC30B081AB7AEB7C), LazyThreadSafetyMode.None); + public ref bool SkillBoltLiftedFireKey { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC30B081AB7AEB7C)); + get => ref _Handle.AsRef(_SkillBoltLiftedFireKeyOffset.Value); } public void ZoomLevelUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSWeaponBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSWeaponBaseImpl.cs index 2b8aec891..020874c3c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSWeaponBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSWeaponBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,155 +17,255 @@ internal partial class CCSWeaponBaseImpl : CBasePlayerWeaponImpl, CCSWeaponBase public CCSWeaponBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _RemoveableOffset = new(() => Schema.GetOffset(0x8102BA512A9A0EFD), LazyThreadSafetyMode.None); + public ref bool Removeable { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA512A9A0EFD)); + get => ref _Handle.AsRef(_RemoveableOffset.Value); } + private static readonly Lazy _PlayerAmmoStockOnPickupOffset = new(() => Schema.GetOffset(0x8102BA51D64BCF69), LazyThreadSafetyMode.None); + public ref bool PlayerAmmoStockOnPickup { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA51D64BCF69)); + get => ref _Handle.AsRef(_PlayerAmmoStockOnPickupOffset.Value); } + private static readonly Lazy _RequireUseToTouchOffset = new(() => Schema.GetOffset(0x8102BA51E52ED88D), LazyThreadSafetyMode.None); + public ref bool RequireUseToTouch { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA51E52ED88D)); + get => ref _Handle.AsRef(_RequireUseToTouchOffset.Value); } + private static readonly Lazy _WeaponGameplayAnimStateOffset = new(() => Schema.GetOffset(0x8102BA514CFB8FEA), LazyThreadSafetyMode.None); + public ref WeaponGameplayAnimState WeaponGameplayAnimState { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA514CFB8FEA)); + get => ref _Handle.AsRef(_WeaponGameplayAnimStateOffset.Value); } + private static readonly Lazy _WeaponGameplayAnimStateTimestampOffset = new(() => Schema.GetOffset(0x8102BA51180F65AD), LazyThreadSafetyMode.None); + public GameTime_t WeaponGameplayAnimStateTimestamp { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8102BA51180F65AD)); + get => new GameTime_tImpl(_Handle + _WeaponGameplayAnimStateTimestampOffset.Value); } + private static readonly Lazy _InspectCancelCompleteTimeOffset = new(() => Schema.GetOffset(0x8102BA51A9C029E5), LazyThreadSafetyMode.None); + public GameTime_t InspectCancelCompleteTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8102BA51A9C029E5)); + get => new GameTime_tImpl(_Handle + _InspectCancelCompleteTimeOffset.Value); } + private static readonly Lazy _InspectPendingOffset = new(() => Schema.GetOffset(0x8102BA51793FE8B6), LazyThreadSafetyMode.None); + public ref bool InspectPending { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA51793FE8B6)); + get => ref _Handle.AsRef(_InspectPendingOffset.Value); } + private static readonly Lazy _InspectShouldLoopOffset = new(() => Schema.GetOffset(0x8102BA51CB0DE08A), LazyThreadSafetyMode.None); + public ref bool InspectShouldLoop { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA51CB0DE08A)); + get => ref _Handle.AsRef(_InspectShouldLoopOffset.Value); } + private static readonly Lazy _LastEmptySoundCmdNumOffset = new(() => Schema.GetOffset(0x8102BA513E7E6941), LazyThreadSafetyMode.None); + public ref int LastEmptySoundCmdNum { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA513E7E6941)); + get => ref _Handle.AsRef(_LastEmptySoundCmdNumOffset.Value); } + private static readonly Lazy _FireOnEmptyOffset = new(() => Schema.GetOffset(0x8102BA5172D822E5), LazyThreadSafetyMode.None); + public ref bool FireOnEmpty { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA5172D822E5)); + get => ref _Handle.AsRef(_FireOnEmptyOffset.Value); } + private static readonly Lazy _OnPlayerPickupOffset = new(() => Schema.GetOffset(0x8102BA51DE81BF25), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPlayerPickup { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x8102BA51DE81BF25)); + get => new CEntityIOOutputImpl(_Handle + _OnPlayerPickupOffset.Value); } + private static readonly Lazy _WeaponModeOffset = new(() => Schema.GetOffset(0x8102BA51AA0E449E), LazyThreadSafetyMode.None); + public ref CSWeaponMode WeaponMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA51AA0E449E)); + get => ref _Handle.AsRef(_WeaponModeOffset.Value); } + private static readonly Lazy _TurningInaccuracyDeltaOffset = new(() => Schema.GetOffset(0x8102BA51C32CA614), LazyThreadSafetyMode.None); + public ref float TurningInaccuracyDelta { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA51C32CA614)); + get => ref _Handle.AsRef(_TurningInaccuracyDeltaOffset.Value); } + private static readonly Lazy _TurningInaccuracyEyeDirLastOffset = new(() => Schema.GetOffset(0x8102BA51294B9004), LazyThreadSafetyMode.None); + public ref Vector TurningInaccuracyEyeDirLast { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA51294B9004)); + get => ref _Handle.AsRef(_TurningInaccuracyEyeDirLastOffset.Value); } + private static readonly Lazy _TurningInaccuracyOffset = new(() => Schema.GetOffset(0x8102BA51533B6902), LazyThreadSafetyMode.None); + public ref float TurningInaccuracy { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA51533B6902)); + get => ref _Handle.AsRef(_TurningInaccuracyOffset.Value); } + private static readonly Lazy _AccuracyPenaltyOffset = new(() => Schema.GetOffset(0x8102BA517FB6DE25), LazyThreadSafetyMode.None); + public ref float AccuracyPenalty { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA517FB6DE25)); + get => ref _Handle.AsRef(_AccuracyPenaltyOffset.Value); } + private static readonly Lazy _LastAccuracyUpdateTimeOffset = new(() => Schema.GetOffset(0x8102BA514B746ABE), LazyThreadSafetyMode.None); + public GameTime_t LastAccuracyUpdateTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8102BA514B746ABE)); + get => new GameTime_tImpl(_Handle + _LastAccuracyUpdateTimeOffset.Value); } + private static readonly Lazy _AccuracySmoothedForZoomOffset = new(() => Schema.GetOffset(0x8102BA519B72CD81), LazyThreadSafetyMode.None); + public ref float AccuracySmoothedForZoom { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA519B72CD81)); + get => ref _Handle.AsRef(_AccuracySmoothedForZoomOffset.Value); } + private static readonly Lazy _RecoilIndexOffset = new(() => Schema.GetOffset(0x8102BA5191B65146), LazyThreadSafetyMode.None); + public ref int RecoilIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA5191B65146)); + get => ref _Handle.AsRef(_RecoilIndexOffset.Value); } + private static readonly Lazy _RecoilIndex1Offset = new(() => Schema.GetOffset(0x8102BA51D779E87B), LazyThreadSafetyMode.None); + public ref float RecoilIndex1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA51D779E87B)); + get => ref _Handle.AsRef(_RecoilIndex1Offset.Value); } + private static readonly Lazy _BurstModeOffset = new(() => Schema.GetOffset(0x8102BA513016BB7E), LazyThreadSafetyMode.None); + public ref bool BurstMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA513016BB7E)); + get => ref _Handle.AsRef(_BurstModeOffset.Value); } + private static readonly Lazy _PostponeFireReadyTicksOffset = new(() => Schema.GetOffset(0x8102BA51EF9494E8), LazyThreadSafetyMode.None); + public GameTick_t PostponeFireReadyTicks { - get => new GameTick_tImpl(_Handle + Schema.GetOffset(0x8102BA51EF9494E8)); + get => new GameTick_tImpl(_Handle + _PostponeFireReadyTicksOffset.Value); } + private static readonly Lazy _PostponeFireReadyFracOffset = new(() => Schema.GetOffset(0x8102BA51DC2054DC), LazyThreadSafetyMode.None); + public ref float PostponeFireReadyFrac { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA51DC2054DC)); + get => ref _Handle.AsRef(_PostponeFireReadyFracOffset.Value); } + private static readonly Lazy _InReloadOffset = new(() => Schema.GetOffset(0x8102BA51184F0553), LazyThreadSafetyMode.None); + public ref bool InReload { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA51184F0553)); + get => ref _Handle.AsRef(_InReloadOffset.Value); } + private static readonly Lazy _DroppedAtTimeOffset = new(() => Schema.GetOffset(0x8102BA51C3A8936F), LazyThreadSafetyMode.None); + public GameTime_t DroppedAtTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8102BA51C3A8936F)); + get => new GameTime_tImpl(_Handle + _DroppedAtTimeOffset.Value); } + private static readonly Lazy _IsHauledBackOffset = new(() => Schema.GetOffset(0x8102BA51D8C240B9), LazyThreadSafetyMode.None); + public ref bool IsHauledBack { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA51D8C240B9)); + get => ref _Handle.AsRef(_IsHauledBackOffset.Value); } + private static readonly Lazy _SilencerOnOffset = new(() => Schema.GetOffset(0x8102BA5168D3A353), LazyThreadSafetyMode.None); + public ref bool SilencerOn { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA5168D3A353)); + get => ref _Handle.AsRef(_SilencerOnOffset.Value); } + private static readonly Lazy _TimeSilencerSwitchCompleteOffset = new(() => Schema.GetOffset(0x8102BA51DCB190FA), LazyThreadSafetyMode.None); + public GameTime_t TimeSilencerSwitchComplete { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8102BA51DCB190FA)); + get => new GameTime_tImpl(_Handle + _TimeSilencerSwitchCompleteOffset.Value); } + private static readonly Lazy _OriginalTeamNumberOffset = new(() => Schema.GetOffset(0x8102BA515DB51597), LazyThreadSafetyMode.None); + public ref int OriginalTeamNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA515DB51597)); + get => ref _Handle.AsRef(_OriginalTeamNumberOffset.Value); } + private static readonly Lazy _MostRecentTeamNumberOffset = new(() => Schema.GetOffset(0x8102BA51D818821C), LazyThreadSafetyMode.None); + public ref int MostRecentTeamNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA51D818821C)); + get => ref _Handle.AsRef(_MostRecentTeamNumberOffset.Value); } + private static readonly Lazy _DroppedNearBuyZoneOffset = new(() => Schema.GetOffset(0x8102BA511DC5989F), LazyThreadSafetyMode.None); + public ref bool DroppedNearBuyZone { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA511DC5989F)); + get => ref _Handle.AsRef(_DroppedNearBuyZoneOffset.Value); } + private static readonly Lazy _NextAttackRenderTimeOffsetOffset = new(() => Schema.GetOffset(0x8102BA518D5552CC), LazyThreadSafetyMode.None); + public ref float NextAttackRenderTimeOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA518D5552CC)); + get => ref _Handle.AsRef(_NextAttackRenderTimeOffsetOffset.Value); } + private static readonly Lazy _CanBePickedUpOffset = new(() => Schema.GetOffset(0x8102BA51BC5DCE9D), LazyThreadSafetyMode.None); + public ref bool CanBePickedUp { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA51BC5DCE9D)); + get => ref _Handle.AsRef(_CanBePickedUpOffset.Value); } + private static readonly Lazy _UseCanOverrideNextOwnerTouchTimeOffset = new(() => Schema.GetOffset(0x8102BA515AD674E8), LazyThreadSafetyMode.None); + public ref bool UseCanOverrideNextOwnerTouchTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA515AD674E8)); + get => ref _Handle.AsRef(_UseCanOverrideNextOwnerTouchTimeOffset.Value); } + private static readonly Lazy _NextOwnerTouchTimeOffset = new(() => Schema.GetOffset(0x8102BA51FECB784F), LazyThreadSafetyMode.None); + public GameTime_t NextOwnerTouchTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8102BA51FECB784F)); + get => new GameTime_tImpl(_Handle + _NextOwnerTouchTimeOffset.Value); } + private static readonly Lazy _NextPrevOwnerTouchTimeOffset = new(() => Schema.GetOffset(0x8102BA515C688482), LazyThreadSafetyMode.None); + public GameTime_t NextPrevOwnerTouchTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8102BA515C688482)); + get => new GameTime_tImpl(_Handle + _NextPrevOwnerTouchTimeOffset.Value); } + private static readonly Lazy _NextPrevOwnerUseTimeOffset = new(() => Schema.GetOffset(0x8102BA51C84F06AE), LazyThreadSafetyMode.None); + public GameTime_t NextPrevOwnerUseTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8102BA51C84F06AE)); + get => new GameTime_tImpl(_Handle + _NextPrevOwnerUseTimeOffset.Value); } + private static readonly Lazy _PrevOwnerOffset = new(() => Schema.GetOffset(0x8102BA5133F3C84D), LazyThreadSafetyMode.None); + public ref CHandle PrevOwner { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8102BA5133F3C84D)); + get => ref _Handle.AsRef>(_PrevOwnerOffset.Value); } + private static readonly Lazy _DropTickOffset = new(() => Schema.GetOffset(0x8102BA51B2FC22F5), LazyThreadSafetyMode.None); + public GameTick_t DropTick { - get => new GameTick_tImpl(_Handle + Schema.GetOffset(0x8102BA51B2FC22F5)); + get => new GameTick_tImpl(_Handle + _DropTickOffset.Value); } + private static readonly Lazy _WasActiveWeaponWhenDroppedOffset = new(() => Schema.GetOffset(0x8102BA51E6BC2F96), LazyThreadSafetyMode.None); + public ref bool WasActiveWeaponWhenDropped { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA51E6BC2F96)); + get => ref _Handle.AsRef(_WasActiveWeaponWhenDroppedOffset.Value); } + private static readonly Lazy _DonatedOffset = new(() => Schema.GetOffset(0x8102BA516864DC4A), LazyThreadSafetyMode.None); + public ref bool Donated { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA516864DC4A)); + get => ref _Handle.AsRef(_DonatedOffset.Value); } + private static readonly Lazy _LastShotTimeOffset = new(() => Schema.GetOffset(0x8102BA517A37978C), LazyThreadSafetyMode.None); + public GameTime_t LastShotTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8102BA517A37978C)); + get => new GameTime_tImpl(_Handle + _LastShotTimeOffset.Value); } + private static readonly Lazy _WasOwnedByCTOffset = new(() => Schema.GetOffset(0x8102BA5102E58E01), LazyThreadSafetyMode.None); + public ref bool WasOwnedByCT { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA5102E58E01)); + get => ref _Handle.AsRef(_WasOwnedByCTOffset.Value); } + private static readonly Lazy _WasOwnedByTerroristOffset = new(() => Schema.GetOffset(0x8102BA517A3CE544), LazyThreadSafetyMode.None); + public ref bool WasOwnedByTerrorist { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA517A3CE544)); + get => ref _Handle.AsRef(_WasOwnedByTerroristOffset.Value); } + private static readonly Lazy _NumRemoveUnownedWeaponThinkOffset = new(() => Schema.GetOffset(0x8102BA51F8C16A23), LazyThreadSafetyMode.None); + public ref int NumRemoveUnownedWeaponThink { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA51F8C16A23)); + get => ref _Handle.AsRef(_NumRemoveUnownedWeaponThinkOffset.Value); } + private static readonly Lazy _IronSightControllerOffset = new(() => Schema.GetOffset(0x8102BA5189739F40), LazyThreadSafetyMode.None); + public CIronSightController IronSightController { - get => new CIronSightControllerImpl(_Handle + Schema.GetOffset(0x8102BA5189739F40)); + get => new CIronSightControllerImpl(_Handle + _IronSightControllerOffset.Value); } + private static readonly Lazy _IronSightModeOffset = new(() => Schema.GetOffset(0x8102BA51AAF66648), LazyThreadSafetyMode.None); + public ref int IronSightMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA51AAF66648)); + get => ref _Handle.AsRef(_IronSightModeOffset.Value); } + private static readonly Lazy _LastLOSTraceFailureTimeOffset = new(() => Schema.GetOffset(0x8102BA51EFA6E48B), LazyThreadSafetyMode.None); + public GameTime_t LastLOSTraceFailureTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8102BA51EFA6E48B)); + get => new GameTime_tImpl(_Handle + _LastLOSTraceFailureTimeOffset.Value); } + private static readonly Lazy _WatTickOffsetOffset = new(() => Schema.GetOffset(0x8102BA519F5B6237), LazyThreadSafetyMode.None); + public ref float WatTickOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x8102BA519F5B6237)); + get => ref _Handle.AsRef(_WatTickOffsetOffset.Value); } + private static readonly Lazy _LastShakeTimeOffset = new(() => Schema.GetOffset(0x8102BA517BD64C62), LazyThreadSafetyMode.None); + public GameTime_t LastShakeTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8102BA517BD64C62)); + get => new GameTime_tImpl(_Handle + _LastShakeTimeOffset.Value); } public void WeaponGameplayAnimStateUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSWeaponBaseShotgunImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSWeaponBaseShotgunImpl.cs index 0c83ea179..8395a12e2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSWeaponBaseShotgunImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSWeaponBaseShotgunImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSWeaponBaseVDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSWeaponBaseVDataImpl.cs index 9f6df5fcd..ff3525315 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSWeaponBaseVDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCSWeaponBaseVDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,258 +17,424 @@ internal partial class CCSWeaponBaseVDataImpl : CBasePlayerWeaponVDataImpl, CCSW public CCSWeaponBaseVDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _WeaponTypeOffset = new(() => Schema.GetOffset(0x62FB7705B2A4B729), LazyThreadSafetyMode.None); + public ref CSWeaponType WeaponType { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705B2A4B729)); + get => ref _Handle.AsRef(_WeaponTypeOffset.Value); } + private static readonly Lazy _WeaponCategoryOffset = new(() => Schema.GetOffset(0x62FB7705D801BE7D), LazyThreadSafetyMode.None); + public ref CSWeaponCategory WeaponCategory { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705D801BE7D)); + get => ref _Handle.AsRef(_WeaponCategoryOffset.Value); } + private static readonly Lazy _Model_AG2Offset = new(() => Schema.GetOffset(0x62FB77057CDF7624), LazyThreadSafetyMode.None); + public SchemaUntypedField Model_AG2 { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x62FB77057CDF7624)); + get => new SchemaUntypedField(_Handle + _Model_AG2Offset.Value); } + private static readonly Lazy _AnimSkeletonOffset = new(() => Schema.GetOffset(0x62FB770599001426), LazyThreadSafetyMode.None); + public SchemaUntypedField AnimSkeleton { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x62FB770599001426)); + get => new SchemaUntypedField(_Handle + _AnimSkeletonOffset.Value); } + private static readonly Lazy _MuzzlePos0Offset = new(() => Schema.GetOffset(0x62FB7705F1464952), LazyThreadSafetyMode.None); + public ref Vector MuzzlePos0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705F1464952)); + get => ref _Handle.AsRef(_MuzzlePos0Offset.Value); } + private static readonly Lazy _MuzzlePos1Offset = new(() => Schema.GetOffset(0x62FB7705F2464AE5), LazyThreadSafetyMode.None); + public ref Vector MuzzlePos1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705F2464AE5)); + get => ref _Handle.AsRef(_MuzzlePos1Offset.Value); } + private static readonly Lazy _TracerParticleOffset = new(() => Schema.GetOffset(0x62FB77052069597B), LazyThreadSafetyMode.None); + public SchemaUntypedField TracerParticle { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x62FB77052069597B)); + get => new SchemaUntypedField(_Handle + _TracerParticleOffset.Value); } + private static readonly Lazy _GearSlotOffset = new(() => Schema.GetOffset(0x62FB7705A7DEA50A), LazyThreadSafetyMode.None); + public ref gear_slot_t GearSlot { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705A7DEA50A)); + get => ref _Handle.AsRef(_GearSlotOffset.Value); } + private static readonly Lazy _GearSlotPositionOffset = new(() => Schema.GetOffset(0x62FB770566E58B75), LazyThreadSafetyMode.None); + public ref int GearSlotPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB770566E58B75)); + get => ref _Handle.AsRef(_GearSlotPositionOffset.Value); } + private static readonly Lazy _DefaultLoadoutSlotOffset = new(() => Schema.GetOffset(0x62FB77050659E286), LazyThreadSafetyMode.None); + public ref loadout_slot_t DefaultLoadoutSlot { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77050659E286)); + get => ref _Handle.AsRef(_DefaultLoadoutSlotOffset.Value); } + private static readonly Lazy _PriceOffset = new(() => Schema.GetOffset(0x62FB770566452996), LazyThreadSafetyMode.None); + public ref int Price { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB770566452996)); + get => ref _Handle.AsRef(_PriceOffset.Value); } + private static readonly Lazy _KillAwardOffset = new(() => Schema.GetOffset(0x62FB7705FD38ACB6), LazyThreadSafetyMode.None); + public ref int KillAward { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705FD38ACB6)); + get => ref _Handle.AsRef(_KillAwardOffset.Value); } + private static readonly Lazy _PrimaryReserveAmmoMaxOffset = new(() => Schema.GetOffset(0x62FB7705B5E3D05D), LazyThreadSafetyMode.None); + public ref int PrimaryReserveAmmoMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705B5E3D05D)); + get => ref _Handle.AsRef(_PrimaryReserveAmmoMaxOffset.Value); } + private static readonly Lazy _SecondaryReserveAmmoMaxOffset = new(() => Schema.GetOffset(0x62FB77054889583D), LazyThreadSafetyMode.None); + public ref int SecondaryReserveAmmoMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77054889583D)); + get => ref _Handle.AsRef(_SecondaryReserveAmmoMaxOffset.Value); } + private static readonly Lazy _MeleeWeaponOffset = new(() => Schema.GetOffset(0x62FB770503896E6B), LazyThreadSafetyMode.None); + public ref bool MeleeWeapon { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB770503896E6B)); + get => ref _Handle.AsRef(_MeleeWeaponOffset.Value); } + private static readonly Lazy _HasBurstModeOffset = new(() => Schema.GetOffset(0x62FB7705AAB8D5A0), LazyThreadSafetyMode.None); + public ref bool HasBurstMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705AAB8D5A0)); + get => ref _Handle.AsRef(_HasBurstModeOffset.Value); } + private static readonly Lazy _IsRevolverOffset = new(() => Schema.GetOffset(0x62FB770532BFE326), LazyThreadSafetyMode.None); + public ref bool IsRevolver { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB770532BFE326)); + get => ref _Handle.AsRef(_IsRevolverOffset.Value); } + private static readonly Lazy _CannotShootUnderwaterOffset = new(() => Schema.GetOffset(0x62FB770562CE8EA4), LazyThreadSafetyMode.None); + public ref bool CannotShootUnderwater { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB770562CE8EA4)); + get => ref _Handle.AsRef(_CannotShootUnderwaterOffset.Value); } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x62FB77056750BACB), LazyThreadSafetyMode.None); + public ref CGlobalSymbol Name { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77056750BACB)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _SilencerTypeOffset = new(() => Schema.GetOffset(0x62FB77055893CF83), LazyThreadSafetyMode.None); + public ref CSWeaponSilencerType SilencerType { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77055893CF83)); + get => ref _Handle.AsRef(_SilencerTypeOffset.Value); } + private static readonly Lazy _CrosshairMinDistanceOffset = new(() => Schema.GetOffset(0x62FB7705643AF856), LazyThreadSafetyMode.None); + public ref int CrosshairMinDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705643AF856)); + get => ref _Handle.AsRef(_CrosshairMinDistanceOffset.Value); } + private static readonly Lazy _CrosshairDeltaDistanceOffset = new(() => Schema.GetOffset(0x62FB77056185F940), LazyThreadSafetyMode.None); + public ref int CrosshairDeltaDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77056185F940)); + get => ref _Handle.AsRef(_CrosshairDeltaDistanceOffset.Value); } + private static readonly Lazy _IsFullAutoOffset = new(() => Schema.GetOffset(0x62FB7705C13B5F1B), LazyThreadSafetyMode.None); + public ref bool IsFullAuto { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705C13B5F1B)); + get => ref _Handle.AsRef(_IsFullAutoOffset.Value); } + private static readonly Lazy _NumBulletsOffset = new(() => Schema.GetOffset(0x62FB7705A23E232C), LazyThreadSafetyMode.None); + public ref int NumBullets { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705A23E232C)); + get => ref _Handle.AsRef(_NumBulletsOffset.Value); } + private static readonly Lazy _ReloadsSingleShellsOffset = new(() => Schema.GetOffset(0x62FB7705E894329A), LazyThreadSafetyMode.None); + public ref bool ReloadsSingleShells { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705E894329A)); + get => ref _Handle.AsRef(_ReloadsSingleShellsOffset.Value); } + private static readonly Lazy _CycleTimeOffset = new(() => Schema.GetOffset(0x62FB77059EE036CE), LazyThreadSafetyMode.None); + public CFiringModeFloat CycleTime { - get => new CFiringModeFloatImpl(_Handle + Schema.GetOffset(0x62FB77059EE036CE)); + get => new CFiringModeFloatImpl(_Handle + _CycleTimeOffset.Value); } + private static readonly Lazy _MaxSpeedOffset = new(() => Schema.GetOffset(0x62FB7705EC4C9592), LazyThreadSafetyMode.None); + public CFiringModeFloat MaxSpeed { - get => new CFiringModeFloatImpl(_Handle + Schema.GetOffset(0x62FB7705EC4C9592)); + get => new CFiringModeFloatImpl(_Handle + _MaxSpeedOffset.Value); } + private static readonly Lazy _SpreadOffset = new(() => Schema.GetOffset(0x62FB77059AE479A0), LazyThreadSafetyMode.None); + public CFiringModeFloat Spread { - get => new CFiringModeFloatImpl(_Handle + Schema.GetOffset(0x62FB77059AE479A0)); + get => new CFiringModeFloatImpl(_Handle + _SpreadOffset.Value); } + private static readonly Lazy _InaccuracyCrouchOffset = new(() => Schema.GetOffset(0x62FB77058292DF17), LazyThreadSafetyMode.None); + public CFiringModeFloat InaccuracyCrouch { - get => new CFiringModeFloatImpl(_Handle + Schema.GetOffset(0x62FB77058292DF17)); + get => new CFiringModeFloatImpl(_Handle + _InaccuracyCrouchOffset.Value); } + private static readonly Lazy _InaccuracyStandOffset = new(() => Schema.GetOffset(0x62FB77054F7B5FDF), LazyThreadSafetyMode.None); + public CFiringModeFloat InaccuracyStand { - get => new CFiringModeFloatImpl(_Handle + Schema.GetOffset(0x62FB77054F7B5FDF)); + get => new CFiringModeFloatImpl(_Handle + _InaccuracyStandOffset.Value); } + private static readonly Lazy _InaccuracyJumpOffset = new(() => Schema.GetOffset(0x62FB7705C43E18E9), LazyThreadSafetyMode.None); + public CFiringModeFloat InaccuracyJump { - get => new CFiringModeFloatImpl(_Handle + Schema.GetOffset(0x62FB7705C43E18E9)); + get => new CFiringModeFloatImpl(_Handle + _InaccuracyJumpOffset.Value); } + private static readonly Lazy _InaccuracyLandOffset = new(() => Schema.GetOffset(0x62FB77058A797810), LazyThreadSafetyMode.None); + public CFiringModeFloat InaccuracyLand { - get => new CFiringModeFloatImpl(_Handle + Schema.GetOffset(0x62FB77058A797810)); + get => new CFiringModeFloatImpl(_Handle + _InaccuracyLandOffset.Value); } + private static readonly Lazy _InaccuracyLadderOffset = new(() => Schema.GetOffset(0x62FB7705EAC7C4C5), LazyThreadSafetyMode.None); + public CFiringModeFloat InaccuracyLadder { - get => new CFiringModeFloatImpl(_Handle + Schema.GetOffset(0x62FB7705EAC7C4C5)); + get => new CFiringModeFloatImpl(_Handle + _InaccuracyLadderOffset.Value); } + private static readonly Lazy _InaccuracyFireOffset = new(() => Schema.GetOffset(0x62FB770598CB9215), LazyThreadSafetyMode.None); + public CFiringModeFloat InaccuracyFire { - get => new CFiringModeFloatImpl(_Handle + Schema.GetOffset(0x62FB770598CB9215)); + get => new CFiringModeFloatImpl(_Handle + _InaccuracyFireOffset.Value); } + private static readonly Lazy _InaccuracyMoveOffset = new(() => Schema.GetOffset(0x62FB7705724CFCB0), LazyThreadSafetyMode.None); + public CFiringModeFloat InaccuracyMove { - get => new CFiringModeFloatImpl(_Handle + Schema.GetOffset(0x62FB7705724CFCB0)); + get => new CFiringModeFloatImpl(_Handle + _InaccuracyMoveOffset.Value); } + private static readonly Lazy _RecoilAngleOffset = new(() => Schema.GetOffset(0x62FB7705D60D8F48), LazyThreadSafetyMode.None); + public CFiringModeFloat RecoilAngle { - get => new CFiringModeFloatImpl(_Handle + Schema.GetOffset(0x62FB7705D60D8F48)); + get => new CFiringModeFloatImpl(_Handle + _RecoilAngleOffset.Value); } + private static readonly Lazy _RecoilAngleVarianceOffset = new(() => Schema.GetOffset(0x62FB77059780CA6B), LazyThreadSafetyMode.None); + public CFiringModeFloat RecoilAngleVariance { - get => new CFiringModeFloatImpl(_Handle + Schema.GetOffset(0x62FB77059780CA6B)); + get => new CFiringModeFloatImpl(_Handle + _RecoilAngleVarianceOffset.Value); } + private static readonly Lazy _RecoilMagnitudeOffset = new(() => Schema.GetOffset(0x62FB77051FEEF3A5), LazyThreadSafetyMode.None); + public CFiringModeFloat RecoilMagnitude { - get => new CFiringModeFloatImpl(_Handle + Schema.GetOffset(0x62FB77051FEEF3A5)); + get => new CFiringModeFloatImpl(_Handle + _RecoilMagnitudeOffset.Value); } + private static readonly Lazy _RecoilMagnitudeVarianceOffset = new(() => Schema.GetOffset(0x62FB77058FED537E), LazyThreadSafetyMode.None); + public CFiringModeFloat RecoilMagnitudeVariance { - get => new CFiringModeFloatImpl(_Handle + Schema.GetOffset(0x62FB77058FED537E)); + get => new CFiringModeFloatImpl(_Handle + _RecoilMagnitudeVarianceOffset.Value); } + private static readonly Lazy _TracerFrequencyOffset = new(() => Schema.GetOffset(0x62FB7705E42D0FCE), LazyThreadSafetyMode.None); + public CFiringModeInt TracerFrequency { - get => new CFiringModeIntImpl(_Handle + Schema.GetOffset(0x62FB7705E42D0FCE)); + get => new CFiringModeIntImpl(_Handle + _TracerFrequencyOffset.Value); } + private static readonly Lazy _InaccuracyJumpInitialOffset = new(() => Schema.GetOffset(0x62FB7705CA4877B7), LazyThreadSafetyMode.None); + public ref float InaccuracyJumpInitial { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705CA4877B7)); + get => ref _Handle.AsRef(_InaccuracyJumpInitialOffset.Value); } + private static readonly Lazy _InaccuracyJumpApexOffset = new(() => Schema.GetOffset(0x62FB77057F1CC92D), LazyThreadSafetyMode.None); + public ref float InaccuracyJumpApex { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77057F1CC92D)); + get => ref _Handle.AsRef(_InaccuracyJumpApexOffset.Value); } + private static readonly Lazy _InaccuracyReloadOffset = new(() => Schema.GetOffset(0x62FB77053901E0D8), LazyThreadSafetyMode.None); + public ref float InaccuracyReload { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77053901E0D8)); + get => ref _Handle.AsRef(_InaccuracyReloadOffset.Value); } + private static readonly Lazy _DeployDurationOffset = new(() => Schema.GetOffset(0x62FB7705D1FD08AC), LazyThreadSafetyMode.None); + public ref float DeployDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705D1FD08AC)); + get => ref _Handle.AsRef(_DeployDurationOffset.Value); } + private static readonly Lazy _DisallowAttackAfterReloadStartDurationOffset = new(() => Schema.GetOffset(0x62FB770588E73223), LazyThreadSafetyMode.None); + public ref float DisallowAttackAfterReloadStartDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB770588E73223)); + get => ref _Handle.AsRef(_DisallowAttackAfterReloadStartDurationOffset.Value); } + private static readonly Lazy _BurstShotCountOffset = new(() => Schema.GetOffset(0x62FB770508DDF2C4), LazyThreadSafetyMode.None); + public ref int BurstShotCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB770508DDF2C4)); + get => ref _Handle.AsRef(_BurstShotCountOffset.Value); } + private static readonly Lazy _AllowBurstHolsterOffset = new(() => Schema.GetOffset(0x62FB770587F9A99B), LazyThreadSafetyMode.None); + public ref bool AllowBurstHolster { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB770587F9A99B)); + get => ref _Handle.AsRef(_AllowBurstHolsterOffset.Value); } + private static readonly Lazy _RecoilSeedOffset = new(() => Schema.GetOffset(0x62FB77055E857C76), LazyThreadSafetyMode.None); + public ref int RecoilSeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77055E857C76)); + get => ref _Handle.AsRef(_RecoilSeedOffset.Value); } + private static readonly Lazy _SpreadSeedOffset = new(() => Schema.GetOffset(0x62FB77056564C76B), LazyThreadSafetyMode.None); + public ref int SpreadSeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77056564C76B)); + get => ref _Handle.AsRef(_SpreadSeedOffset.Value); } + private static readonly Lazy _AttackMovespeedFactorOffset = new(() => Schema.GetOffset(0x62FB7705D3F6F2BA), LazyThreadSafetyMode.None); + public ref float AttackMovespeedFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705D3F6F2BA)); + get => ref _Handle.AsRef(_AttackMovespeedFactorOffset.Value); } + private static readonly Lazy _InaccuracyPitchShiftOffset = new(() => Schema.GetOffset(0x62FB7705C964ED1F), LazyThreadSafetyMode.None); + public ref float InaccuracyPitchShift { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705C964ED1F)); + get => ref _Handle.AsRef(_InaccuracyPitchShiftOffset.Value); } + private static readonly Lazy _InaccuracyAltSoundThresholdOffset = new(() => Schema.GetOffset(0x62FB7705973D88CA), LazyThreadSafetyMode.None); + public ref float InaccuracyAltSoundThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705973D88CA)); + get => ref _Handle.AsRef(_InaccuracyAltSoundThresholdOffset.Value); } + private static readonly Lazy _UseRadioSubtitleOffset = new(() => Schema.GetOffset(0x62FB77052060E88A), LazyThreadSafetyMode.None); + public string UseRadioSubtitle { get { - var ptr = _Handle.Read(Schema.GetOffset(0x62FB77052060E88A)); + var ptr = _Handle.Read(_UseRadioSubtitleOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x62FB77052060E88A, value); + set => Schema.SetString(_Handle, _UseRadioSubtitleOffset.Value, value); } + private static readonly Lazy _UnzoomsAfterShotOffset = new(() => Schema.GetOffset(0x62FB770525A040FC), LazyThreadSafetyMode.None); + public ref bool UnzoomsAfterShot { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB770525A040FC)); + get => ref _Handle.AsRef(_UnzoomsAfterShotOffset.Value); } + private static readonly Lazy _HideViewModelWhenZoomedOffset = new(() => Schema.GetOffset(0x62FB7705B28E6FC7), LazyThreadSafetyMode.None); + public ref bool HideViewModelWhenZoomed { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705B28E6FC7)); + get => ref _Handle.AsRef(_HideViewModelWhenZoomedOffset.Value); } + private static readonly Lazy _ZoomLevelsOffset = new(() => Schema.GetOffset(0x62FB7705F3DFB3E5), LazyThreadSafetyMode.None); + public ref int ZoomLevels { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705F3DFB3E5)); + get => ref _Handle.AsRef(_ZoomLevelsOffset.Value); } + private static readonly Lazy _ZoomFOV1Offset = new(() => Schema.GetOffset(0x62FB7705FD77D500), LazyThreadSafetyMode.None); + public ref int ZoomFOV1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705FD77D500)); + get => ref _Handle.AsRef(_ZoomFOV1Offset.Value); } + private static readonly Lazy _ZoomFOV2Offset = new(() => Schema.GetOffset(0x62FB77050077D9B9), LazyThreadSafetyMode.None); + public ref int ZoomFOV2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77050077D9B9)); + get => ref _Handle.AsRef(_ZoomFOV2Offset.Value); } + private static readonly Lazy _ZoomTime0Offset = new(() => Schema.GetOffset(0x62FB7705BD15007B), LazyThreadSafetyMode.None); + public ref float ZoomTime0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705BD15007B)); + get => ref _Handle.AsRef(_ZoomTime0Offset.Value); } + private static readonly Lazy _ZoomTime1Offset = new(() => Schema.GetOffset(0x62FB7705BC14FEE8), LazyThreadSafetyMode.None); + public ref float ZoomTime1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705BC14FEE8)); + get => ref _Handle.AsRef(_ZoomTime1Offset.Value); } + private static readonly Lazy _ZoomTime2Offset = new(() => Schema.GetOffset(0x62FB7705BF1503A1), LazyThreadSafetyMode.None); + public ref float ZoomTime2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705BF1503A1)); + get => ref _Handle.AsRef(_ZoomTime2Offset.Value); } + private static readonly Lazy _IronSightPullUpSpeedOffset = new(() => Schema.GetOffset(0x62FB7705B268B33F), LazyThreadSafetyMode.None); + public ref float IronSightPullUpSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705B268B33F)); + get => ref _Handle.AsRef(_IronSightPullUpSpeedOffset.Value); } + private static readonly Lazy _IronSightPutDownSpeedOffset = new(() => Schema.GetOffset(0x62FB7705A7511AB6), LazyThreadSafetyMode.None); + public ref float IronSightPutDownSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705A7511AB6)); + get => ref _Handle.AsRef(_IronSightPutDownSpeedOffset.Value); } + private static readonly Lazy _IronSightFOVOffset = new(() => Schema.GetOffset(0x62FB770571453BB5), LazyThreadSafetyMode.None); + public ref float IronSightFOV { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB770571453BB5)); + get => ref _Handle.AsRef(_IronSightFOVOffset.Value); } + private static readonly Lazy _IronSightPivotForwardOffset = new(() => Schema.GetOffset(0x62FB7705DF9C0E9F), LazyThreadSafetyMode.None); + public ref float IronSightPivotForward { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705DF9C0E9F)); + get => ref _Handle.AsRef(_IronSightPivotForwardOffset.Value); } + private static readonly Lazy _IronSightLoosenessOffset = new(() => Schema.GetOffset(0x62FB77057D4B5557), LazyThreadSafetyMode.None); + public ref float IronSightLooseness { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77057D4B5557)); + get => ref _Handle.AsRef(_IronSightLoosenessOffset.Value); } + private static readonly Lazy _DamageOffset = new(() => Schema.GetOffset(0x62FB77051C56D69C), LazyThreadSafetyMode.None); + public ref int Damage { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77051C56D69C)); + get => ref _Handle.AsRef(_DamageOffset.Value); } + private static readonly Lazy _HeadshotMultiplierOffset = new(() => Schema.GetOffset(0x62FB7705B47FF686), LazyThreadSafetyMode.None); + public ref float HeadshotMultiplier { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705B47FF686)); + get => ref _Handle.AsRef(_HeadshotMultiplierOffset.Value); } + private static readonly Lazy _ArmorRatioOffset = new(() => Schema.GetOffset(0x62FB77050C023CFD), LazyThreadSafetyMode.None); + public ref float ArmorRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77050C023CFD)); + get => ref _Handle.AsRef(_ArmorRatioOffset.Value); } + private static readonly Lazy _PenetrationOffset = new(() => Schema.GetOffset(0x62FB7705C4163F78), LazyThreadSafetyMode.None); + public ref float Penetration { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705C4163F78)); + get => ref _Handle.AsRef(_PenetrationOffset.Value); } + private static readonly Lazy _RangeOffset = new(() => Schema.GetOffset(0x62FB77053FC92844), LazyThreadSafetyMode.None); + public ref float Range { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77053FC92844)); + get => ref _Handle.AsRef(_RangeOffset.Value); } + private static readonly Lazy _RangeModifierOffset = new(() => Schema.GetOffset(0x62FB7705556FEA15), LazyThreadSafetyMode.None); + public ref float RangeModifier { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705556FEA15)); + get => ref _Handle.AsRef(_RangeModifierOffset.Value); } + private static readonly Lazy _FlinchVelocityModifierLargeOffset = new(() => Schema.GetOffset(0x62FB77053B6EE2A2), LazyThreadSafetyMode.None); + public ref float FlinchVelocityModifierLarge { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77053B6EE2A2)); + get => ref _Handle.AsRef(_FlinchVelocityModifierLargeOffset.Value); } + private static readonly Lazy _FlinchVelocityModifierSmallOffset = new(() => Schema.GetOffset(0x62FB7705D1377236), LazyThreadSafetyMode.None); + public ref float FlinchVelocityModifierSmall { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705D1377236)); + get => ref _Handle.AsRef(_FlinchVelocityModifierSmallOffset.Value); } + private static readonly Lazy _RecoveryTimeCrouchOffset = new(() => Schema.GetOffset(0x62FB7705E1AE27FB), LazyThreadSafetyMode.None); + public ref float RecoveryTimeCrouch { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705E1AE27FB)); + get => ref _Handle.AsRef(_RecoveryTimeCrouchOffset.Value); } + private static readonly Lazy _RecoveryTimeStandOffset = new(() => Schema.GetOffset(0x62FB7705EF962E33), LazyThreadSafetyMode.None); + public ref float RecoveryTimeStand { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705EF962E33)); + get => ref _Handle.AsRef(_RecoveryTimeStandOffset.Value); } + private static readonly Lazy _RecoveryTimeCrouchFinalOffset = new(() => Schema.GetOffset(0x62FB77053F2544A1), LazyThreadSafetyMode.None); + public ref float RecoveryTimeCrouchFinal { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77053F2544A1)); + get => ref _Handle.AsRef(_RecoveryTimeCrouchFinalOffset.Value); } + private static readonly Lazy _RecoveryTimeStandFinalOffset = new(() => Schema.GetOffset(0x62FB7705F2206E39), LazyThreadSafetyMode.None); + public ref float RecoveryTimeStandFinal { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705F2206E39)); + get => ref _Handle.AsRef(_RecoveryTimeStandFinalOffset.Value); } + private static readonly Lazy _RecoveryTransitionStartBulletOffset = new(() => Schema.GetOffset(0x62FB7705096DC2B3), LazyThreadSafetyMode.None); + public ref int RecoveryTransitionStartBullet { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB7705096DC2B3)); + get => ref _Handle.AsRef(_RecoveryTransitionStartBulletOffset.Value); } + private static readonly Lazy _RecoveryTransitionEndBulletOffset = new(() => Schema.GetOffset(0x62FB77054CBD7B0A), LazyThreadSafetyMode.None); + public ref int RecoveryTransitionEndBullet { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77054CBD7B0A)); + get => ref _Handle.AsRef(_RecoveryTransitionEndBulletOffset.Value); } + private static readonly Lazy _ThrowVelocityOffset = new(() => Schema.GetOffset(0x62FB770522C82B26), LazyThreadSafetyMode.None); + public ref float ThrowVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB770522C82B26)); + get => ref _Handle.AsRef(_ThrowVelocityOffset.Value); } + private static readonly Lazy _SmokeColorOffset = new(() => Schema.GetOffset(0x62FB77057808EA9D), LazyThreadSafetyMode.None); + public ref Vector SmokeColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77057808EA9D)); + get => ref _Handle.AsRef(_SmokeColorOffset.Value); } + private static readonly Lazy _AnimClassOffset = new(() => Schema.GetOffset(0x62FB77054B23C797), LazyThreadSafetyMode.None); + public ref CGlobalSymbol AnimClass { - get => ref _Handle.AsRef(Schema.GetOffset(0x62FB77054B23C797)); + get => ref _Handle.AsRef(_AnimClassOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCachedPoseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCachedPoseImpl.cs index 7b2607d8e..de5b6fcc6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCachedPoseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCachedPoseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CCachedPoseImpl : SchemaClass, CCachedPose { public CCachedPoseImpl(nint handle) : base(handle) { } + private static readonly Lazy _TransformsOffset = new(() => Schema.GetOffset(0x4B6C235988C82C58), LazyThreadSafetyMode.None); + public ref CUtlVector Transforms { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4B6C235988C82C58)); + get => ref _Handle.AsRef>(_TransformsOffset.Value); } + private static readonly Lazy _MorphWeightsOffset = new(() => Schema.GetOffset(0x4B6C23596B6689BE), LazyThreadSafetyMode.None); + public ref CUtlVector MorphWeights { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4B6C23596B6689BE)); + get => ref _Handle.AsRef>(_MorphWeightsOffset.Value); } + private static readonly Lazy _SequenceOffset = new(() => Schema.GetOffset(0x4B6C2359E0A0598E), LazyThreadSafetyMode.None); + public HSequence Sequence { - get => new HSequenceImpl(_Handle + Schema.GetOffset(0x4B6C2359E0A0598E)); + get => new HSequenceImpl(_Handle + _SequenceOffset.Value); } + private static readonly Lazy _CycleOffset = new(() => Schema.GetOffset(0x4B6C23590C77829F), LazyThreadSafetyMode.None); + public ref float Cycle { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B6C23590C77829F)); + get => ref _Handle.AsRef(_CycleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CChangeLevelImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CChangeLevelImpl.cs index a7e522f53..1c27b10e0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CChangeLevelImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CChangeLevelImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,34 +17,48 @@ internal partial class CChangeLevelImpl : CBaseTriggerImpl, CChangeLevel { public CChangeLevelImpl(nint handle) : base(handle) { } + private static readonly Lazy _MapNameOffset = new(() => Schema.GetOffset(0x52008134CE11EF47), LazyThreadSafetyMode.None); + public string MapName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x52008134CE11EF47)); + var ptr = _Handle.Read(_MapNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x52008134CE11EF47, value); + set => Schema.SetString(_Handle, _MapNameOffset.Value, value); } + private static readonly Lazy _LandmarkNameOffset = new(() => Schema.GetOffset(0x520081342DEE941D), LazyThreadSafetyMode.None); + public string LandmarkName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x520081342DEE941D)); + var ptr = _Handle.Read(_LandmarkNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x520081342DEE941D, value); + set => Schema.SetString(_Handle, _LandmarkNameOffset.Value, value); } + private static readonly Lazy _OnChangeLevelOffset = new(() => Schema.GetOffset(0x52008134EED57EDE), LazyThreadSafetyMode.None); + public CEntityIOOutput OnChangeLevel { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x52008134EED57EDE)); + get => new CEntityIOOutputImpl(_Handle + _OnChangeLevelOffset.Value); } + private static readonly Lazy _TouchedOffset = new(() => Schema.GetOffset(0x520081342BF07839), LazyThreadSafetyMode.None); + public ref bool Touched { - get => ref _Handle.AsRef(Schema.GetOffset(0x520081342BF07839)); + get => ref _Handle.AsRef(_TouchedOffset.Value); } + private static readonly Lazy _NoTouchOffset = new(() => Schema.GetOffset(0x520081343004899D), LazyThreadSafetyMode.None); + public ref bool NoTouch { - get => ref _Handle.AsRef(Schema.GetOffset(0x520081343004899D)); + get => ref _Handle.AsRef(_NoTouchOffset.Value); } + private static readonly Lazy _NewChapterOffset = new(() => Schema.GetOffset(0x520081342D184126), LazyThreadSafetyMode.None); + public ref bool NewChapter { - get => ref _Handle.AsRef(Schema.GetOffset(0x520081342D184126)); + get => ref _Handle.AsRef(_NewChapterOffset.Value); } + private static readonly Lazy _OnChangeLevelFiredOffset = new(() => Schema.GetOffset(0x520081341173C672), LazyThreadSafetyMode.None); + public ref bool OnChangeLevelFired { - get => ref _Handle.AsRef(Schema.GetOffset(0x520081341173C672)); + get => ref _Handle.AsRef(_OnChangeLevelFiredOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CChickenImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CChickenImpl.cs index e944b33f1..fa4221eb4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CChickenImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CChickenImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,89 +17,145 @@ internal partial class CChickenImpl : CDynamicPropImpl, CChicken { public CChickenImpl(nint handle) : base(handle) { } + private static readonly Lazy _AttributeManagerOffset = new(() => Schema.GetOffset(0x66D7920D537B0586), LazyThreadSafetyMode.None); + public CAttributeContainer AttributeManager { - get => new CAttributeContainerImpl(_Handle + Schema.GetOffset(0x66D7920D537B0586)); + get => new CAttributeContainerImpl(_Handle + _AttributeManagerOffset.Value); } + private static readonly Lazy _UpdateTimerOffset = new(() => Schema.GetOffset(0x66D7920DE92599E5), LazyThreadSafetyMode.None); + public CountdownTimer UpdateTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x66D7920DE92599E5)); + get => new CountdownTimerImpl(_Handle + _UpdateTimerOffset.Value); } + private static readonly Lazy _StuckAnchorOffset = new(() => Schema.GetOffset(0x66D7920D7FBA1852), LazyThreadSafetyMode.None); + public ref Vector StuckAnchor { - get => ref _Handle.AsRef(Schema.GetOffset(0x66D7920D7FBA1852)); + get => ref _Handle.AsRef(_StuckAnchorOffset.Value); } + private static readonly Lazy _StuckTimerOffset = new(() => Schema.GetOffset(0x66D7920D22E8E3F0), LazyThreadSafetyMode.None); + public CountdownTimer StuckTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x66D7920D22E8E3F0)); + get => new CountdownTimerImpl(_Handle + _StuckTimerOffset.Value); } + private static readonly Lazy _CollisionStuckTimerOffset = new(() => Schema.GetOffset(0x66D7920DDA840C2A), LazyThreadSafetyMode.None); + public CountdownTimer CollisionStuckTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x66D7920DDA840C2A)); + get => new CountdownTimerImpl(_Handle + _CollisionStuckTimerOffset.Value); } + private static readonly Lazy _IsOnGroundOffset = new(() => Schema.GetOffset(0x66D7920D66E85E9B), LazyThreadSafetyMode.None); + public ref bool IsOnGround { - get => ref _Handle.AsRef(Schema.GetOffset(0x66D7920D66E85E9B)); + get => ref _Handle.AsRef(_IsOnGroundOffset.Value); } + private static readonly Lazy _FallVelocityOffset = new(() => Schema.GetOffset(0x66D7920DE845FA27), LazyThreadSafetyMode.None); + public ref Vector FallVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0x66D7920DE845FA27)); + get => ref _Handle.AsRef(_FallVelocityOffset.Value); } + private static readonly Lazy _DesiredActivityOffset = new(() => Schema.GetOffset(0x66D7920D0BDF74DC), LazyThreadSafetyMode.None); + public ref ChickenActivity DesiredActivity { - get => ref _Handle.AsRef(Schema.GetOffset(0x66D7920D0BDF74DC)); + get => ref _Handle.AsRef(_DesiredActivityOffset.Value); } + private static readonly Lazy _CurrentActivityOffset = new(() => Schema.GetOffset(0x66D7920DBF339767), LazyThreadSafetyMode.None); + public ref ChickenActivity CurrentActivity { - get => ref _Handle.AsRef(Schema.GetOffset(0x66D7920DBF339767)); + get => ref _Handle.AsRef(_CurrentActivityOffset.Value); } + private static readonly Lazy _ActivityTimerOffset = new(() => Schema.GetOffset(0x66D7920D80BFBDAD), LazyThreadSafetyMode.None); + public CountdownTimer ActivityTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x66D7920D80BFBDAD)); + get => new CountdownTimerImpl(_Handle + _ActivityTimerOffset.Value); } + private static readonly Lazy _TurnRateOffset = new(() => Schema.GetOffset(0x66D7920D76FF88A8), LazyThreadSafetyMode.None); + public ref float TurnRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x66D7920D76FF88A8)); + get => ref _Handle.AsRef(_TurnRateOffset.Value); } + private static readonly Lazy _FleeFromOffset = new(() => Schema.GetOffset(0x66D7920D24941539), LazyThreadSafetyMode.None); + public ref CHandle FleeFrom { - get => ref _Handle.AsRef>(Schema.GetOffset(0x66D7920D24941539)); + get => ref _Handle.AsRef>(_FleeFromOffset.Value); } + private static readonly Lazy _MoveRateThrottleTimerOffset = new(() => Schema.GetOffset(0x66D7920D7F3A963B), LazyThreadSafetyMode.None); + public CountdownTimer MoveRateThrottleTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x66D7920D7F3A963B)); + get => new CountdownTimerImpl(_Handle + _MoveRateThrottleTimerOffset.Value); } + private static readonly Lazy _StartleTimerOffset = new(() => Schema.GetOffset(0x66D7920D5F30C195), LazyThreadSafetyMode.None); + public CountdownTimer StartleTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x66D7920D5F30C195)); + get => new CountdownTimerImpl(_Handle + _StartleTimerOffset.Value); } + private static readonly Lazy _VocalizeTimerOffset = new(() => Schema.GetOffset(0x66D7920D8A04CBE9), LazyThreadSafetyMode.None); + public CountdownTimer VocalizeTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x66D7920D8A04CBE9)); + get => new CountdownTimerImpl(_Handle + _VocalizeTimerOffset.Value); } + private static readonly Lazy _WhenZombifiedOffset = new(() => Schema.GetOffset(0x66D7920DEC63D622), LazyThreadSafetyMode.None); + public GameTime_t WhenZombified { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x66D7920DEC63D622)); + get => new GameTime_tImpl(_Handle + _WhenZombifiedOffset.Value); } + private static readonly Lazy _JumpedThisFrameOffset = new(() => Schema.GetOffset(0x66D7920D6BF897BD), LazyThreadSafetyMode.None); + public ref bool JumpedThisFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x66D7920D6BF897BD)); + get => ref _Handle.AsRef(_JumpedThisFrameOffset.Value); } + private static readonly Lazy _LeaderOffset = new(() => Schema.GetOffset(0x66D7920D658B4E84), LazyThreadSafetyMode.None); + public ref CHandle Leader { - get => ref _Handle.AsRef>(Schema.GetOffset(0x66D7920D658B4E84)); + get => ref _Handle.AsRef>(_LeaderOffset.Value); } + private static readonly Lazy _ReuseTimerOffset = new(() => Schema.GetOffset(0x66D7920D6D7BFBA8), LazyThreadSafetyMode.None); + public CountdownTimer ReuseTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x66D7920D6D7BFBA8)); + get => new CountdownTimerImpl(_Handle + _ReuseTimerOffset.Value); } + private static readonly Lazy _HasBeenUsedOffset = new(() => Schema.GetOffset(0x66D7920D4B85A934), LazyThreadSafetyMode.None); + public ref bool HasBeenUsed { - get => ref _Handle.AsRef(Schema.GetOffset(0x66D7920D4B85A934)); + get => ref _Handle.AsRef(_HasBeenUsedOffset.Value); } + private static readonly Lazy _JumpTimerOffset = new(() => Schema.GetOffset(0x66D7920D6CBF3C9A), LazyThreadSafetyMode.None); + public CountdownTimer JumpTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x66D7920D6CBF3C9A)); + get => new CountdownTimerImpl(_Handle + _JumpTimerOffset.Value); } + private static readonly Lazy _LastJumpTimeOffset = new(() => Schema.GetOffset(0x66D7920DAB061352), LazyThreadSafetyMode.None); + public ref float LastJumpTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x66D7920DAB061352)); + get => ref _Handle.AsRef(_LastJumpTimeOffset.Value); } + private static readonly Lazy _InJumpOffset = new(() => Schema.GetOffset(0x66D7920DD74EE446), LazyThreadSafetyMode.None); + public ref bool InJump { - get => ref _Handle.AsRef(Schema.GetOffset(0x66D7920DD74EE446)); + get => ref _Handle.AsRef(_InJumpOffset.Value); } + private static readonly Lazy _RepathTimerOffset = new(() => Schema.GetOffset(0x66D7920D4AEA977C), LazyThreadSafetyMode.None); + public CountdownTimer RepathTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x66D7920D4AEA977C)); + get => new CountdownTimerImpl(_Handle + _RepathTimerOffset.Value); } + private static readonly Lazy _PathGoalOffset = new(() => Schema.GetOffset(0x66D7920DEF360269), LazyThreadSafetyMode.None); + public ref Vector PathGoal { - get => ref _Handle.AsRef(Schema.GetOffset(0x66D7920DEF360269)); + get => ref _Handle.AsRef(_PathGoalOffset.Value); } + private static readonly Lazy _ActiveFollowStartTimeOffset = new(() => Schema.GetOffset(0x66D7920D204FDDA9), LazyThreadSafetyMode.None); + public GameTime_t ActiveFollowStartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x66D7920D204FDDA9)); + get => new GameTime_tImpl(_Handle + _ActiveFollowStartTimeOffset.Value); } + private static readonly Lazy _FollowMinuteTimerOffset = new(() => Schema.GetOffset(0x66D7920DCDBFCCA9), LazyThreadSafetyMode.None); + public CountdownTimer FollowMinuteTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x66D7920DCDBFCCA9)); + get => new CountdownTimerImpl(_Handle + _FollowMinuteTimerOffset.Value); } + private static readonly Lazy _BlockDirectionTimerOffset = new(() => Schema.GetOffset(0x66D7920D579BB6BC), LazyThreadSafetyMode.None); + public CountdownTimer BlockDirectionTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x66D7920D579BB6BC)); + get => new CountdownTimerImpl(_Handle + _BlockDirectionTimerOffset.Value); } public void AttributeManagerUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CChoiceUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CChoiceUpdateNodeImpl.cs index dbbea9bc0..24de2057f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CChoiceUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CChoiceUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class CChoiceUpdateNodeImpl : CAnimUpdateNodeBaseImpl, CChoiceU public CChoiceUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildrenOffset = new(() => Schema.GetOffset(0x1CF0A6AC7415FA72), LazyThreadSafetyMode.None); + public ref CUtlVector Children { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1CF0A6AC7415FA72)); + get => ref _Handle.AsRef>(_ChildrenOffset.Value); } + private static readonly Lazy _WeightsOffset = new(() => Schema.GetOffset(0x1CF0A6AC77B2F91E), LazyThreadSafetyMode.None); + public ref CUtlVector Weights { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1CF0A6AC77B2F91E)); + get => ref _Handle.AsRef>(_WeightsOffset.Value); } + private static readonly Lazy _BlendTimesOffset = new(() => Schema.GetOffset(0x1CF0A6AC12AD0366), LazyThreadSafetyMode.None); + public ref CUtlVector BlendTimes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1CF0A6AC12AD0366)); + get => ref _Handle.AsRef>(_BlendTimesOffset.Value); } + private static readonly Lazy _ChoiceMethodOffset = new(() => Schema.GetOffset(0x1CF0A6AC4E106F5B), LazyThreadSafetyMode.None); + public ref ChoiceMethod ChoiceMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CF0A6AC4E106F5B)); + get => ref _Handle.AsRef(_ChoiceMethodOffset.Value); } + private static readonly Lazy _ChoiceChangeMethodOffset = new(() => Schema.GetOffset(0x1CF0A6AC265F1E7F), LazyThreadSafetyMode.None); + public ref ChoiceChangeMethod ChoiceChangeMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CF0A6AC265F1E7F)); + get => ref _Handle.AsRef(_ChoiceChangeMethodOffset.Value); } + private static readonly Lazy _BlendMethodOffset = new(() => Schema.GetOffset(0x1CF0A6ACFF929529), LazyThreadSafetyMode.None); + public ref ChoiceBlendMethod BlendMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CF0A6ACFF929529)); + get => ref _Handle.AsRef(_BlendMethodOffset.Value); } + private static readonly Lazy _BlendTimeOffset = new(() => Schema.GetOffset(0x1CF0A6AC73D026B1), LazyThreadSafetyMode.None); + public ref float BlendTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CF0A6AC73D026B1)); + get => ref _Handle.AsRef(_BlendTimeOffset.Value); } + private static readonly Lazy _CrossFadeOffset = new(() => Schema.GetOffset(0x1CF0A6AC64BEC665), LazyThreadSafetyMode.None); + public ref bool CrossFade { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CF0A6AC64BEC665)); + get => ref _Handle.AsRef(_CrossFadeOffset.Value); } + private static readonly Lazy _ResetChosenOffset = new(() => Schema.GetOffset(0x1CF0A6AC2FFC43FA), LazyThreadSafetyMode.None); + public ref bool ResetChosen { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CF0A6AC2FFC43FA)); + get => ref _Handle.AsRef(_ResetChosenOffset.Value); } + private static readonly Lazy _DontResetSameSelectionOffset = new(() => Schema.GetOffset(0x1CF0A6ACB9EC0773), LazyThreadSafetyMode.None); + public ref bool DontResetSameSelection { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CF0A6ACB9EC0773)); + get => ref _Handle.AsRef(_DontResetSameSelectionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CChoreoUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CChoreoUpdateNodeImpl.cs index 85af361c1..d05ca356f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CChoreoUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CChoreoUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCitadelSoundOpvarSetOBBImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCitadelSoundOpvarSetOBBImpl.cs index e25e256ea..1c04111a6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCitadelSoundOpvarSetOBBImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCitadelSoundOpvarSetOBBImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,57 @@ internal partial class CCitadelSoundOpvarSetOBBImpl : CBaseEntityImpl, CCitadelS public CCitadelSoundOpvarSetOBBImpl(nint handle) : base(handle) { } + private static readonly Lazy _StackNameOffset = new(() => Schema.GetOffset(0xD3F8645E3B3E9CD4), LazyThreadSafetyMode.None); + public string StackName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD3F8645E3B3E9CD4)); + var ptr = _Handle.Read(_StackNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD3F8645E3B3E9CD4, value); + set => Schema.SetString(_Handle, _StackNameOffset.Value, value); } + private static readonly Lazy _OperatorNameOffset = new(() => Schema.GetOffset(0xD3F8645EF6140996), LazyThreadSafetyMode.None); + public string OperatorName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD3F8645EF6140996)); + var ptr = _Handle.Read(_OperatorNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD3F8645EF6140996, value); + set => Schema.SetString(_Handle, _OperatorNameOffset.Value, value); } + private static readonly Lazy _OpvarNameOffset = new(() => Schema.GetOffset(0xD3F8645E2CAEFF3C), LazyThreadSafetyMode.None); + public string OpvarName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD3F8645E2CAEFF3C)); + var ptr = _Handle.Read(_OpvarNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD3F8645E2CAEFF3C, value); + set => Schema.SetString(_Handle, _OpvarNameOffset.Value, value); } + private static readonly Lazy _DistanceInnerMinsOffset = new(() => Schema.GetOffset(0xD3F8645EC7540883), LazyThreadSafetyMode.None); + public ref Vector DistanceInnerMins { - get => ref _Handle.AsRef(Schema.GetOffset(0xD3F8645EC7540883)); + get => ref _Handle.AsRef(_DistanceInnerMinsOffset.Value); } + private static readonly Lazy _DistanceInnerMaxsOffset = new(() => Schema.GetOffset(0xD3F8645E705E7E61), LazyThreadSafetyMode.None); + public ref Vector DistanceInnerMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0xD3F8645E705E7E61)); + get => ref _Handle.AsRef(_DistanceInnerMaxsOffset.Value); } + private static readonly Lazy _DistanceOuterMinsOffset = new(() => Schema.GetOffset(0xD3F8645E185EC6F4), LazyThreadSafetyMode.None); + public ref Vector DistanceOuterMins { - get => ref _Handle.AsRef(Schema.GetOffset(0xD3F8645E185EC6F4)); + get => ref _Handle.AsRef(_DistanceOuterMinsOffset.Value); } + private static readonly Lazy _DistanceOuterMaxsOffset = new(() => Schema.GetOffset(0xD3F8645E99738B36), LazyThreadSafetyMode.None); + public ref Vector DistanceOuterMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0xD3F8645E99738B36)); + get => ref _Handle.AsRef(_DistanceOuterMaxsOffset.Value); } + private static readonly Lazy _AABBDirectionOffset = new(() => Schema.GetOffset(0xD3F8645EE8CF552C), LazyThreadSafetyMode.None); + public ref int AABBDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0xD3F8645EE8CF552C)); + get => ref _Handle.AsRef(_AABBDirectionOffset.Value); } public void StackNameUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CClothSettingsAnimTagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CClothSettingsAnimTagImpl.cs index 3fbf8aad6..f9b3242dd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CClothSettingsAnimTagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CClothSettingsAnimTagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class CClothSettingsAnimTagImpl : CAnimTagBaseImpl, CClothSetti public CClothSettingsAnimTagImpl(nint handle) : base(handle) { } + private static readonly Lazy _StiffnessOffset = new(() => Schema.GetOffset(0xF6B586864344C684), LazyThreadSafetyMode.None); + public ref float Stiffness { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6B586864344C684)); + get => ref _Handle.AsRef(_StiffnessOffset.Value); } + private static readonly Lazy _EaseInOffset = new(() => Schema.GetOffset(0xF6B586864514C026), LazyThreadSafetyMode.None); + public ref float EaseIn { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6B586864514C026)); + get => ref _Handle.AsRef(_EaseInOffset.Value); } + private static readonly Lazy _EaseOutOffset = new(() => Schema.GetOffset(0xF6B5868646B49C07), LazyThreadSafetyMode.None); + public ref float EaseOut { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6B5868646B49C07)); + get => ref _Handle.AsRef(_EaseOutOffset.Value); } + private static readonly Lazy _VertexSetOffset = new(() => Schema.GetOffset(0xF6B586863EE1A571), LazyThreadSafetyMode.None); + public string VertexSet { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF6B586863EE1A571)); + var ptr = _Handle.Read(_VertexSetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF6B586863EE1A571, value); + set => Schema.SetString(_Handle, _VertexSetOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCollisionPropertyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCollisionPropertyImpl.cs index e9f671133..3d27ddb61 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCollisionPropertyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCollisionPropertyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,56 +17,90 @@ internal partial class CCollisionPropertyImpl : SchemaClass, CCollisionProperty public CCollisionPropertyImpl(nint handle) : base(handle) { } + private static readonly Lazy _CollisionAttributeOffset = new(() => Schema.GetOffset(0x794D87F77E1AEF05), LazyThreadSafetyMode.None); + public VPhysicsCollisionAttribute_t CollisionAttribute { - get => new VPhysicsCollisionAttribute_tImpl(_Handle + Schema.GetOffset(0x794D87F77E1AEF05)); + get => new VPhysicsCollisionAttribute_tImpl(_Handle + _CollisionAttributeOffset.Value); } + private static readonly Lazy _MinsOffset = new(() => Schema.GetOffset(0x794D87F70E57F80C), LazyThreadSafetyMode.None); + public ref Vector Mins { - get => ref _Handle.AsRef(Schema.GetOffset(0x794D87F70E57F80C)); + get => ref _Handle.AsRef(_MinsOffset.Value); } + private static readonly Lazy _MaxsOffset = new(() => Schema.GetOffset(0x794D87F77D388D3E), LazyThreadSafetyMode.None); + public ref Vector Maxs { - get => ref _Handle.AsRef(Schema.GetOffset(0x794D87F77D388D3E)); + get => ref _Handle.AsRef(_MaxsOffset.Value); } + private static readonly Lazy _SolidFlagsOffset = new(() => Schema.GetOffset(0x794D87F7B21D0CFB), LazyThreadSafetyMode.None); + public ref byte SolidFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0x794D87F7B21D0CFB)); + get => ref _Handle.AsRef(_SolidFlagsOffset.Value); } + private static readonly Lazy _SolidTypeOffset = new(() => Schema.GetOffset(0x794D87F7BE0FC0E8), LazyThreadSafetyMode.None); + public ref SolidType_t SolidType { - get => ref _Handle.AsRef(Schema.GetOffset(0x794D87F7BE0FC0E8)); + get => ref _Handle.AsRef(_SolidTypeOffset.Value); } + private static readonly Lazy _TriggerBloatOffset = new(() => Schema.GetOffset(0x794D87F789A6F5C3), LazyThreadSafetyMode.None); + public ref byte TriggerBloat { - get => ref _Handle.AsRef(Schema.GetOffset(0x794D87F789A6F5C3)); + get => ref _Handle.AsRef(_TriggerBloatOffset.Value); } + private static readonly Lazy _SurroundTypeOffset = new(() => Schema.GetOffset(0x794D87F725FA3137), LazyThreadSafetyMode.None); + public ref SurroundingBoundsType_t SurroundType { - get => ref _Handle.AsRef(Schema.GetOffset(0x794D87F725FA3137)); + get => ref _Handle.AsRef(_SurroundTypeOffset.Value); } + private static readonly Lazy _CollisionGroupOffset = new(() => Schema.GetOffset(0x794D87F791BF7016), LazyThreadSafetyMode.None); + public ref byte CollisionGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0x794D87F791BF7016)); + get => ref _Handle.AsRef(_CollisionGroupOffset.Value); } + private static readonly Lazy _EnablePhysicsOffset = new(() => Schema.GetOffset(0x794D87F7BCD6B6BB), LazyThreadSafetyMode.None); + public ref byte EnablePhysics { - get => ref _Handle.AsRef(Schema.GetOffset(0x794D87F7BCD6B6BB)); + get => ref _Handle.AsRef(_EnablePhysicsOffset.Value); } + private static readonly Lazy _BoundingRadiusOffset = new(() => Schema.GetOffset(0x794D87F74C638611), LazyThreadSafetyMode.None); + public ref float BoundingRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x794D87F74C638611)); + get => ref _Handle.AsRef(_BoundingRadiusOffset.Value); } + private static readonly Lazy _SpecifiedSurroundingMinsOffset = new(() => Schema.GetOffset(0x794D87F71406E000), LazyThreadSafetyMode.None); + public ref Vector SpecifiedSurroundingMins { - get => ref _Handle.AsRef(Schema.GetOffset(0x794D87F71406E000)); + get => ref _Handle.AsRef(_SpecifiedSurroundingMinsOffset.Value); } + private static readonly Lazy _SpecifiedSurroundingMaxsOffset = new(() => Schema.GetOffset(0x794D87F792FCA91A), LazyThreadSafetyMode.None); + public ref Vector SpecifiedSurroundingMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0x794D87F792FCA91A)); + get => ref _Handle.AsRef(_SpecifiedSurroundingMaxsOffset.Value); } + private static readonly Lazy _SurroundingMaxsOffset = new(() => Schema.GetOffset(0x794D87F7F5AED3D6), LazyThreadSafetyMode.None); + public ref Vector SurroundingMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0x794D87F7F5AED3D6)); + get => ref _Handle.AsRef(_SurroundingMaxsOffset.Value); } + private static readonly Lazy _SurroundingMinsOffset = new(() => Schema.GetOffset(0x794D87F7749A0F94), LazyThreadSafetyMode.None); + public ref Vector SurroundingMins { - get => ref _Handle.AsRef(Schema.GetOffset(0x794D87F7749A0F94)); + get => ref _Handle.AsRef(_SurroundingMinsOffset.Value); } + private static readonly Lazy _CapsuleCenter1Offset = new(() => Schema.GetOffset(0x794D87F7A5E81978), LazyThreadSafetyMode.None); + public ref Vector CapsuleCenter1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x794D87F7A5E81978)); + get => ref _Handle.AsRef(_CapsuleCenter1Offset.Value); } + private static readonly Lazy _CapsuleCenter2Offset = new(() => Schema.GetOffset(0x794D87F7A8E81E31), LazyThreadSafetyMode.None); + public ref Vector CapsuleCenter2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x794D87F7A8E81E31)); + get => ref _Handle.AsRef(_CapsuleCenter2Offset.Value); } + private static readonly Lazy _CapsuleRadiusOffset = new(() => Schema.GetOffset(0x794D87F7A1A593D0), LazyThreadSafetyMode.None); + public ref float CapsuleRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x794D87F7A1A593D0)); + get => ref _Handle.AsRef(_CapsuleRadiusOffset.Value); } public void CollisionAttributeUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CColorCorrectionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CColorCorrectionImpl.cs index 724cde58e..cdf61cdd3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CColorCorrectionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CColorCorrectionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,64 +17,98 @@ internal partial class CColorCorrectionImpl : CBaseEntityImpl, CColorCorrection public CColorCorrectionImpl(nint handle) : base(handle) { } + private static readonly Lazy _FadeInDurationOffset = new(() => Schema.GetOffset(0x86645E1101B5EB8E), LazyThreadSafetyMode.None); + public ref float FadeInDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x86645E1101B5EB8E)); + get => ref _Handle.AsRef(_FadeInDurationOffset.Value); } + private static readonly Lazy _FadeOutDurationOffset = new(() => Schema.GetOffset(0x86645E11543512CF), LazyThreadSafetyMode.None); + public ref float FadeOutDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x86645E11543512CF)); + get => ref _Handle.AsRef(_FadeOutDurationOffset.Value); } + private static readonly Lazy _StartFadeInWeightOffset = new(() => Schema.GetOffset(0x86645E11E12AF000), LazyThreadSafetyMode.None); + public ref float StartFadeInWeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x86645E11E12AF000)); + get => ref _Handle.AsRef(_StartFadeInWeightOffset.Value); } + private static readonly Lazy _StartFadeOutWeightOffset = new(() => Schema.GetOffset(0x86645E118757D4F9), LazyThreadSafetyMode.None); + public ref float StartFadeOutWeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x86645E118757D4F9)); + get => ref _Handle.AsRef(_StartFadeOutWeightOffset.Value); } + private static readonly Lazy _TimeStartFadeInOffset = new(() => Schema.GetOffset(0x86645E1175A6B4B7), LazyThreadSafetyMode.None); + public GameTime_t TimeStartFadeIn { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x86645E1175A6B4B7)); + get => new GameTime_tImpl(_Handle + _TimeStartFadeInOffset.Value); } + private static readonly Lazy _TimeStartFadeOutOffset = new(() => Schema.GetOffset(0x86645E118028C93C), LazyThreadSafetyMode.None); + public GameTime_t TimeStartFadeOut { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x86645E118028C93C)); + get => new GameTime_tImpl(_Handle + _TimeStartFadeOutOffset.Value); } + private static readonly Lazy _MaxWeightOffset = new(() => Schema.GetOffset(0x86645E1155F00F23), LazyThreadSafetyMode.None); + public ref float MaxWeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x86645E1155F00F23)); + get => ref _Handle.AsRef(_MaxWeightOffset.Value); } + private static readonly Lazy _StartDisabledOffset = new(() => Schema.GetOffset(0x86645E1161ED0C4F), LazyThreadSafetyMode.None); + public ref bool StartDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x86645E1161ED0C4F)); + get => ref _Handle.AsRef(_StartDisabledOffset.Value); } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0x86645E116154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x86645E116154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } + private static readonly Lazy _MasterOffset = new(() => Schema.GetOffset(0x86645E115AFF9193), LazyThreadSafetyMode.None); + public ref bool Master { - get => ref _Handle.AsRef(Schema.GetOffset(0x86645E115AFF9193)); + get => ref _Handle.AsRef(_MasterOffset.Value); } + private static readonly Lazy _ClientSideOffset = new(() => Schema.GetOffset(0x86645E116B28362D), LazyThreadSafetyMode.None); + public ref bool ClientSide { - get => ref _Handle.AsRef(Schema.GetOffset(0x86645E116B28362D)); + get => ref _Handle.AsRef(_ClientSideOffset.Value); } + private static readonly Lazy _ExclusiveOffset = new(() => Schema.GetOffset(0x86645E11D84BE6BB), LazyThreadSafetyMode.None); + public ref bool Exclusive { - get => ref _Handle.AsRef(Schema.GetOffset(0x86645E11D84BE6BB)); + get => ref _Handle.AsRef(_ExclusiveOffset.Value); } + private static readonly Lazy _MinFalloffOffset = new(() => Schema.GetOffset(0x86645E116628F1F3), LazyThreadSafetyMode.None); + public ref float MinFalloff { - get => ref _Handle.AsRef(Schema.GetOffset(0x86645E116628F1F3)); + get => ref _Handle.AsRef(_MinFalloffOffset.Value); } + private static readonly Lazy _MaxFalloffOffset = new(() => Schema.GetOffset(0x86645E118837D7E1), LazyThreadSafetyMode.None); + public ref float MaxFalloff { - get => ref _Handle.AsRef(Schema.GetOffset(0x86645E118837D7E1)); + get => ref _Handle.AsRef(_MaxFalloffOffset.Value); } + private static readonly Lazy _CurWeightOffset = new(() => Schema.GetOffset(0x86645E112EA7ED7F), LazyThreadSafetyMode.None); + public ref float CurWeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x86645E112EA7ED7F)); + get => ref _Handle.AsRef(_CurWeightOffset.Value); } + private static readonly Lazy _NetlookupFilenameOffset = new(() => Schema.GetOffset(0x86645E11543AB1EB), LazyThreadSafetyMode.None); + public string NetlookupFilename { get { - var ptr = _Handle + Schema.GetOffset(0x86645E11543AB1EB); + var ptr = _Handle + _NetlookupFilenameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x86645E11543AB1EB, value, 512); + set => Schema.SetFixedString(_Handle, _NetlookupFilenameOffset.Value, value, 512); } + private static readonly Lazy _LookupFilenameOffset = new(() => Schema.GetOffset(0x86645E112611A2C6), LazyThreadSafetyMode.None); + public string LookupFilename { get { - var ptr = _Handle.Read(Schema.GetOffset(0x86645E112611A2C6)); + var ptr = _Handle.Read(_LookupFilenameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x86645E112611A2C6, value); + set => Schema.SetString(_Handle, _LookupFilenameOffset.Value, value); } public void FadeInDurationUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CColorCorrectionVolumeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CColorCorrectionVolumeImpl.cs index 8bc365549..774aa76c4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CColorCorrectionVolumeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CColorCorrectionVolumeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,33 +17,49 @@ internal partial class CColorCorrectionVolumeImpl : CBaseTriggerImpl, CColorCorr public CColorCorrectionVolumeImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaxWeightOffset = new(() => Schema.GetOffset(0x78A9E01BEE8A2F2D), LazyThreadSafetyMode.None); + public ref float MaxWeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x78A9E01BEE8A2F2D)); + get => ref _Handle.AsRef(_MaxWeightOffset.Value); } + private static readonly Lazy _FadeDurationOffset = new(() => Schema.GetOffset(0x78A9E01B46550027), LazyThreadSafetyMode.None); + public ref float FadeDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x78A9E01B46550027)); + get => ref _Handle.AsRef(_FadeDurationOffset.Value); } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0x78A9E01BBF415739), LazyThreadSafetyMode.None); + public ref float Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0x78A9E01BBF415739)); + get => ref _Handle.AsRef(_WeightOffset.Value); } + private static readonly Lazy _LookupFilenameOffset = new(() => Schema.GetOffset(0x78A9E01B2611A2C6), LazyThreadSafetyMode.None); + public string LookupFilename { get { - var ptr = _Handle + Schema.GetOffset(0x78A9E01B2611A2C6); + var ptr = _Handle + _LookupFilenameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x78A9E01B2611A2C6, value, 512); + set => Schema.SetFixedString(_Handle, _LookupFilenameOffset.Value, value, 512); } + private static readonly Lazy _LastEnterWeightOffset = new(() => Schema.GetOffset(0x78A9E01B2F53D64D), LazyThreadSafetyMode.None); + public ref float LastEnterWeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x78A9E01B2F53D64D)); + get => ref _Handle.AsRef(_LastEnterWeightOffset.Value); } + private static readonly Lazy _LastEnterTimeOffset = new(() => Schema.GetOffset(0x78A9E01B01977F10), LazyThreadSafetyMode.None); + public GameTime_t LastEnterTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x78A9E01B01977F10)); + get => new GameTime_tImpl(_Handle + _LastEnterTimeOffset.Value); } + private static readonly Lazy _LastExitWeightOffset = new(() => Schema.GetOffset(0x78A9E01B59C9642D), LazyThreadSafetyMode.None); + public ref float LastExitWeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x78A9E01B59C9642D)); + get => ref _Handle.AsRef(_LastExitWeightOffset.Value); } + private static readonly Lazy _LastExitTimeOffset = new(() => Schema.GetOffset(0x78A9E01B183C8DF0), LazyThreadSafetyMode.None); + public GameTime_t LastExitTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x78A9E01B183C8DF0)); + get => new GameTime_tImpl(_Handle + _LastExitTimeOffset.Value); } public void MaxWeightUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCommentaryAutoImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCommentaryAutoImpl.cs index 7327e2c36..33fe8d467 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCommentaryAutoImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCommentaryAutoImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CCommentaryAutoImpl : CBaseEntityImpl, CCommentaryAuto { public CCommentaryAutoImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnCommentaryNewGameOffset = new(() => Schema.GetOffset(0x5BB39498C3245D97), LazyThreadSafetyMode.None); + public CEntityIOOutput OnCommentaryNewGame { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x5BB39498C3245D97)); + get => new CEntityIOOutputImpl(_Handle + _OnCommentaryNewGameOffset.Value); } + private static readonly Lazy _OnCommentaryMidGameOffset = new(() => Schema.GetOffset(0x5BB39498A1777FCB), LazyThreadSafetyMode.None); + public CEntityIOOutput OnCommentaryMidGame { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x5BB39498A1777FCB)); + get => new CEntityIOOutputImpl(_Handle + _OnCommentaryMidGameOffset.Value); } + private static readonly Lazy _OnCommentaryMultiplayerSpawnOffset = new(() => Schema.GetOffset(0x5BB3949819FDEEB2), LazyThreadSafetyMode.None); + public CEntityIOOutput OnCommentaryMultiplayerSpawn { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x5BB3949819FDEEB2)); + get => new CEntityIOOutputImpl(_Handle + _OnCommentaryMultiplayerSpawnOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCommentarySystemImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCommentarySystemImpl.cs index a60780a70..0141abac0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCommentarySystemImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCommentarySystemImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class CCommentarySystemImpl : SchemaClass, CCommentarySystem { public CCommentarySystemImpl(nint handle) : base(handle) { } + private static readonly Lazy _CommentaryConvarsChangingOffset = new(() => Schema.GetOffset(0x87CBBE6A7FB57A2D), LazyThreadSafetyMode.None); + public ref bool CommentaryConvarsChanging { - get => ref _Handle.AsRef(Schema.GetOffset(0x87CBBE6A7FB57A2D)); + get => ref _Handle.AsRef(_CommentaryConvarsChangingOffset.Value); } + private static readonly Lazy _CommentaryEnabledMidGameOffset = new(() => Schema.GetOffset(0x87CBBE6A45558B4F), LazyThreadSafetyMode.None); + public ref bool CommentaryEnabledMidGame { - get => ref _Handle.AsRef(Schema.GetOffset(0x87CBBE6A45558B4F)); + get => ref _Handle.AsRef(_CommentaryEnabledMidGameOffset.Value); } + private static readonly Lazy _NextTeleportTimeOffset = new(() => Schema.GetOffset(0x87CBBE6A92701808), LazyThreadSafetyMode.None); + public GameTime_t NextTeleportTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x87CBBE6A92701808)); + get => new GameTime_tImpl(_Handle + _NextTeleportTimeOffset.Value); } + private static readonly Lazy _TeleportStageOffset = new(() => Schema.GetOffset(0x87CBBE6A75C25D8B), LazyThreadSafetyMode.None); + public ref int TeleportStage { - get => ref _Handle.AsRef(Schema.GetOffset(0x87CBBE6A75C25D8B)); + get => ref _Handle.AsRef(_TeleportStageOffset.Value); } + private static readonly Lazy _CheatStateOffset = new(() => Schema.GetOffset(0x87CBBE6AA9DE3831), LazyThreadSafetyMode.None); + public ref bool CheatState { - get => ref _Handle.AsRef(Schema.GetOffset(0x87CBBE6AA9DE3831)); + get => ref _Handle.AsRef(_CheatStateOffset.Value); } + private static readonly Lazy _IsFirstSpawnGroupToLoadOffset = new(() => Schema.GetOffset(0x87CBBE6A1BDE1032), LazyThreadSafetyMode.None); + public ref bool IsFirstSpawnGroupToLoad { - get => ref _Handle.AsRef(Schema.GetOffset(0x87CBBE6A1BDE1032)); + get => ref _Handle.AsRef(_IsFirstSpawnGroupToLoadOffset.Value); } + private static readonly Lazy _CurrentNodeOffset = new(() => Schema.GetOffset(0x87CBBE6A5C1029D4), LazyThreadSafetyMode.None); + public ref CHandle CurrentNode { - get => ref _Handle.AsRef>(Schema.GetOffset(0x87CBBE6A5C1029D4)); + get => ref _Handle.AsRef>(_CurrentNodeOffset.Value); } + private static readonly Lazy _ActiveCommentaryNodeOffset = new(() => Schema.GetOffset(0x87CBBE6AEA08BE3C), LazyThreadSafetyMode.None); + public ref CHandle ActiveCommentaryNode { - get => ref _Handle.AsRef>(Schema.GetOffset(0x87CBBE6AEA08BE3C)); + get => ref _Handle.AsRef>(_ActiveCommentaryNodeOffset.Value); } + private static readonly Lazy _LastCommentaryNodeOffset = new(() => Schema.GetOffset(0x87CBBE6A33A2318A), LazyThreadSafetyMode.None); + public ref CHandle LastCommentaryNode { - get => ref _Handle.AsRef>(Schema.GetOffset(0x87CBBE6A33A2318A)); + get => ref _Handle.AsRef>(_LastCommentaryNodeOffset.Value); } + private static readonly Lazy _NodesOffset = new(() => Schema.GetOffset(0x87CBBE6A5CCA593A), LazyThreadSafetyMode.None); + public ref CUtlVector> Nodes { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x87CBBE6A5CCA593A)); + get => ref _Handle.AsRef>>(_NodesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCommentaryViewPositionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCommentaryViewPositionImpl.cs index bf8085ac4..c1d444d67 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCommentaryViewPositionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCommentaryViewPositionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCompressorGroupImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCompressorGroupImpl.cs index 10c91c6ee..f7372c0aa 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCompressorGroupImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCompressorGroupImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,56 +17,90 @@ internal partial class CCompressorGroupImpl : SchemaClass, CCompressorGroup { public CCompressorGroupImpl(nint handle) : base(handle) { } + private static readonly Lazy _TotalElementCountOffset = new(() => Schema.GetOffset(0x8D9A46F69E4F56A2), LazyThreadSafetyMode.None); + public ref int TotalElementCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x8D9A46F69E4F56A2)); + get => ref _Handle.AsRef(_TotalElementCountOffset.Value); } + private static readonly Lazy _ChannelClassOffset = new(() => Schema.GetOffset(0x8D9A46F68F5E9AD5), LazyThreadSafetyMode.None); + public ref CUtlVector ChannelClass { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8D9A46F68F5E9AD5)); + get => ref _Handle.AsRef>(_ChannelClassOffset.Value); } + private static readonly Lazy _VariableNameOffset = new(() => Schema.GetOffset(0x8D9A46F6369599AB), LazyThreadSafetyMode.None); + public ref CUtlVector VariableName { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8D9A46F6369599AB)); + get => ref _Handle.AsRef>(_VariableNameOffset.Value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x8D9A46F618853D59), LazyThreadSafetyMode.None); + public ref CUtlVector Type { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8D9A46F618853D59)); + get => ref _Handle.AsRef>(_TypeOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x8D9A46F6CE6E9C28), LazyThreadSafetyMode.None); + public ref CUtlVector Flags { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8D9A46F6CE6E9C28)); + get => ref _Handle.AsRef>(_FlagsOffset.Value); } + private static readonly Lazy _GroupingOffset = new(() => Schema.GetOffset(0x8D9A46F64308F10D), LazyThreadSafetyMode.None); + public ref CUtlVector Grouping { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8D9A46F64308F10D)); + get => ref _Handle.AsRef>(_GroupingOffset.Value); } + private static readonly Lazy _CompressorIndexOffset = new(() => Schema.GetOffset(0x8D9A46F67B4BF604), LazyThreadSafetyMode.None); + public ref CUtlVector CompressorIndex { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8D9A46F67B4BF604)); + get => ref _Handle.AsRef>(_CompressorIndexOffset.Value); } + private static readonly Lazy _ElementNamesOffset = new(() => Schema.GetOffset(0x8D9A46F6D5BFAA00), LazyThreadSafetyMode.None); + public ref CUtlVector> ElementNames { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x8D9A46F6D5BFAA00)); + get => ref _Handle.AsRef>>(_ElementNamesOffset.Value); } + private static readonly Lazy _ElementUniqueIDOffset = new(() => Schema.GetOffset(0x8D9A46F64C95C12D), LazyThreadSafetyMode.None); + public ref CUtlVector> ElementUniqueID { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x8D9A46F64C95C12D)); + get => ref _Handle.AsRef>>(_ElementUniqueIDOffset.Value); } + private static readonly Lazy _ElementMaskOffset = new(() => Schema.GetOffset(0x8D9A46F67BBE1B07), LazyThreadSafetyMode.None); + public ref CUtlVector ElementMask { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8D9A46F67BBE1B07)); + get => ref _Handle.AsRef>(_ElementMaskOffset.Value); } + private static readonly Lazy _VectorCompressorOffset = new(() => Schema.GetOffset(0x8D9A46F61A8B6EBF), LazyThreadSafetyMode.None); + public ref CUtlVector> VectorCompressor { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x8D9A46F61A8B6EBF)); + get => ref _Handle.AsRef>>(_VectorCompressorOffset.Value); } + private static readonly Lazy _QuaternionCompressorOffset = new(() => Schema.GetOffset(0x8D9A46F6D4D751D4), LazyThreadSafetyMode.None); + public ref CUtlVector> QuaternionCompressor { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x8D9A46F6D4D751D4)); + get => ref _Handle.AsRef>>(_QuaternionCompressorOffset.Value); } + private static readonly Lazy _IntCompressorOffset = new(() => Schema.GetOffset(0x8D9A46F654D409FB), LazyThreadSafetyMode.None); + public ref CUtlVector> IntCompressor { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x8D9A46F654D409FB)); + get => ref _Handle.AsRef>>(_IntCompressorOffset.Value); } + private static readonly Lazy _BoolCompressorOffset = new(() => Schema.GetOffset(0x8D9A46F6359E7C24), LazyThreadSafetyMode.None); + public ref CUtlVector> BoolCompressor { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x8D9A46F6359E7C24)); + get => ref _Handle.AsRef>>(_BoolCompressorOffset.Value); } + private static readonly Lazy _ColorCompressorOffset = new(() => Schema.GetOffset(0x8D9A46F6088C2B29), LazyThreadSafetyMode.None); + public ref CUtlVector> ColorCompressor { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x8D9A46F6088C2B29)); + get => ref _Handle.AsRef>>(_ColorCompressorOffset.Value); } + private static readonly Lazy _Vector2DCompressorOffset = new(() => Schema.GetOffset(0x8D9A46F633C3F00D), LazyThreadSafetyMode.None); + public ref CUtlVector> Vector2DCompressor { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x8D9A46F633C3F00D)); + get => ref _Handle.AsRef>>(_Vector2DCompressorOffset.Value); } + private static readonly Lazy _Vector4DCompressorOffset = new(() => Schema.GetOffset(0x8D9A46F6E178618F), LazyThreadSafetyMode.None); + public ref CUtlVector> Vector4DCompressor { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x8D9A46F6E178618F)); + get => ref _Handle.AsRef>>(_Vector4DCompressorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConcreteAnimParameterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConcreteAnimParameterImpl.cs index 64c71a75f..8bd3d5f55 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConcreteAnimParameterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConcreteAnimParameterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CConcreteAnimParameterImpl : CAnimParameterBaseImpl, CCon public CConcreteAnimParameterImpl(nint handle) : base(handle) { } + private static readonly Lazy _PreviewButtonOffset = new(() => Schema.GetOffset(0xFB67B7E37D0352C7), LazyThreadSafetyMode.None); + public ref AnimParamButton_t PreviewButton { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB67B7E37D0352C7)); + get => ref _Handle.AsRef(_PreviewButtonOffset.Value); } + private static readonly Lazy _NetworkSettingOffset = new(() => Schema.GetOffset(0xFB67B7E3EEBF9DD2), LazyThreadSafetyMode.None); + public ref AnimParamNetworkSetting NetworkSetting { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB67B7E3EEBF9DD2)); + get => ref _Handle.AsRef(_NetworkSettingOffset.Value); } + private static readonly Lazy _UseMostRecentValueOffset = new(() => Schema.GetOffset(0xFB67B7E37693B669), LazyThreadSafetyMode.None); + public ref bool UseMostRecentValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB67B7E37693B669)); + get => ref _Handle.AsRef(_UseMostRecentValueOffset.Value); } + private static readonly Lazy _AutoResetOffset = new(() => Schema.GetOffset(0xFB67B7E3EBC32499), LazyThreadSafetyMode.None); + public ref bool AutoReset { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB67B7E3EBC32499)); + get => ref _Handle.AsRef(_AutoResetOffset.Value); } + private static readonly Lazy _GameWritableOffset = new(() => Schema.GetOffset(0xFB67B7E3FB2CA7F7), LazyThreadSafetyMode.None); + public ref bool GameWritable { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB67B7E3FB2CA7F7)); + get => ref _Handle.AsRef(_GameWritableOffset.Value); } + private static readonly Lazy _GraphWritableOffset = new(() => Schema.GetOffset(0xFB67B7E30633E7B7), LazyThreadSafetyMode.None); + public ref bool GraphWritable { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB67B7E30633E7B7)); + get => ref _Handle.AsRef(_GraphWritableOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConstantForceControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConstantForceControllerImpl.cs index f87493707..469250327 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConstantForceControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConstantForceControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CConstantForceControllerImpl : SchemaClass, CConstantForc public CConstantForceControllerImpl(nint handle) : base(handle) { } + private static readonly Lazy _LinearOffset = new(() => Schema.GetOffset(0x37030A8D6B6D1260), LazyThreadSafetyMode.None); + public ref Vector Linear { - get => ref _Handle.AsRef(Schema.GetOffset(0x37030A8D6B6D1260)); + get => ref _Handle.AsRef(_LinearOffset.Value); } + private static readonly Lazy _AngularOffset = new(() => Schema.GetOffset(0x37030A8D74E0EB09), LazyThreadSafetyMode.None); + public SchemaUntypedField Angular { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x37030A8D74E0EB09)); + get => new SchemaUntypedField(_Handle + _AngularOffset.Value); } + private static readonly Lazy _LinearSaveOffset = new(() => Schema.GetOffset(0x37030A8D96B9953D), LazyThreadSafetyMode.None); + public ref Vector LinearSave { - get => ref _Handle.AsRef(Schema.GetOffset(0x37030A8D96B9953D)); + get => ref _Handle.AsRef(_LinearSaveOffset.Value); } + private static readonly Lazy _AngularSaveOffset = new(() => Schema.GetOffset(0x37030A8D8294323C), LazyThreadSafetyMode.None); + public SchemaUntypedField AngularSave { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x37030A8D8294323C)); + get => new SchemaUntypedField(_Handle + _AngularSaveOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConstraintAnchorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConstraintAnchorImpl.cs index 9a456e59f..2d5b6a726 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConstraintAnchorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConstraintAnchorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CConstraintAnchorImpl : CBaseAnimGraphImpl, CConstraintAn public CConstraintAnchorImpl(nint handle) : base(handle) { } + private static readonly Lazy _MassScaleOffset = new(() => Schema.GetOffset(0xD8ABF41001B9E905), LazyThreadSafetyMode.None); + public ref float MassScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8ABF41001B9E905)); + get => ref _Handle.AsRef(_MassScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConstraintSlaveImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConstraintSlaveImpl.cs index 6b9974d3d..20c84ec93 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConstraintSlaveImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConstraintSlaveImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class CConstraintSlaveImpl : SchemaClass, CConstraintSlave { public CConstraintSlaveImpl(nint handle) : base(handle) { } + private static readonly Lazy _BaseOrientationOffset = new(() => Schema.GetOffset(0xE0E093BC46E6EA75), LazyThreadSafetyMode.None); + public ref Quaternion BaseOrientation { - get => ref _Handle.AsRef(Schema.GetOffset(0xE0E093BC46E6EA75)); + get => ref _Handle.AsRef(_BaseOrientationOffset.Value); } + private static readonly Lazy _BasePositionOffset = new(() => Schema.GetOffset(0xE0E093BCC510D587), LazyThreadSafetyMode.None); + public ref Vector BasePosition { - get => ref _Handle.AsRef(Schema.GetOffset(0xE0E093BCC510D587)); + get => ref _Handle.AsRef(_BasePositionOffset.Value); } + private static readonly Lazy _BoneHashOffset = new(() => Schema.GetOffset(0xE0E093BCD4010F03), LazyThreadSafetyMode.None); + public ref uint BoneHash { - get => ref _Handle.AsRef(Schema.GetOffset(0xE0E093BCD4010F03)); + get => ref _Handle.AsRef(_BoneHashOffset.Value); } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0xE0E093BC7B81E7AB), LazyThreadSafetyMode.None); + public ref float Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0xE0E093BC7B81E7AB)); + get => ref _Handle.AsRef(_WeightOffset.Value); } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xE0E093BC63D22D49), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE0E093BC63D22D49)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xE0E093BC63D22D49, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConstraintTargetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConstraintTargetImpl.cs index 7666a93f5..94b001c83 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConstraintTargetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CConstraintTargetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,27 +17,39 @@ internal partial class CConstraintTargetImpl : SchemaClass, CConstraintTarget { public CConstraintTargetImpl(nint handle) : base(handle) { } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0x8A562794DB445327), LazyThreadSafetyMode.None); + public ref Quaternion Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A562794DB445327)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _Offset1Offset = new(() => Schema.GetOffset(0x8A562794FE159136), LazyThreadSafetyMode.None); + public ref Vector Offset1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A562794FE159136)); + get => ref _Handle.AsRef(_Offset1Offset.Value); } + private static readonly Lazy _BoneHashOffset = new(() => Schema.GetOffset(0x8A562794D4010F03), LazyThreadSafetyMode.None); + public ref uint BoneHash { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A562794D4010F03)); + get => ref _Handle.AsRef(_BoneHashOffset.Value); } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x8A56279463D22D49), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x8A56279463D22D49)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x8A56279463D22D49, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0x8A5627947B81E7AB), LazyThreadSafetyMode.None); + public ref float Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A5627947B81E7AB)); + get => ref _Handle.AsRef(_WeightOffset.Value); } + private static readonly Lazy _IsAttachmentOffset = new(() => Schema.GetOffset(0x8A562794794BF658), LazyThreadSafetyMode.None); + public ref bool IsAttachment { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A562794794BF658)); + get => ref _Handle.AsRef(_IsAttachmentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCopyRecipientFilterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCopyRecipientFilterImpl.cs index 711dc4383..2f5912776 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCopyRecipientFilterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCopyRecipientFilterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CCopyRecipientFilterImpl : SchemaClass, CCopyRecipientFil public CCopyRecipientFilterImpl(nint handle) : base(handle) { } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0xB27F546C36B92FAC), LazyThreadSafetyMode.None); + public ref int Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0xB27F546C36B92FAC)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _RecipientsOffset = new(() => Schema.GetOffset(0xB27F546CDF6522D1), LazyThreadSafetyMode.None); + public ref CUtlVector Recipients { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB27F546CDF6522D1)); + get => ref _Handle.AsRef>(_RecipientsOffset.Value); } + private static readonly Lazy _SlotPlayerExcludedDueToPredictionOffset = new(() => Schema.GetOffset(0xB27F546CA4F2B69C), LazyThreadSafetyMode.None); + public ref uint SlotPlayerExcludedDueToPrediction { - get => ref _Handle.AsRef(Schema.GetOffset(0xB27F546CA4F2B69C)); + get => ref _Handle.AsRef(_SlotPlayerExcludedDueToPredictionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCreditsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCreditsImpl.cs index 149d9c0ea..01851e96e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCreditsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCreditsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CCreditsImpl : CPointEntityImpl, CCredits { public CCreditsImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnCreditsDoneOffset = new(() => Schema.GetOffset(0xF1224C0488A2DA7A), LazyThreadSafetyMode.None); + public CEntityIOOutput OnCreditsDone { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xF1224C0488A2DA7A)); + get => new CEntityIOOutputImpl(_Handle + _OnCreditsDoneOffset.Value); } + private static readonly Lazy _RolledOutroCreditsOffset = new(() => Schema.GetOffset(0xF1224C048E1511D4), LazyThreadSafetyMode.None); + public ref bool RolledOutroCredits { - get => ref _Handle.AsRef(Schema.GetOffset(0xF1224C048E1511D4)); + get => ref _Handle.AsRef(_RolledOutroCreditsOffset.Value); } + private static readonly Lazy _LogoLengthOffset = new(() => Schema.GetOffset(0xF1224C04D283492C), LazyThreadSafetyMode.None); + public ref float LogoLength { - get => ref _Handle.AsRef(Schema.GetOffset(0xF1224C04D283492C)); + get => ref _Handle.AsRef(_LogoLengthOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCurrentRotationVelocityMetricEvaluatorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCurrentRotationVelocityMetricEvaluatorImpl.cs index 9ca611901..b1804ce8e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCurrentRotationVelocityMetricEvaluatorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCurrentRotationVelocityMetricEvaluatorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCurrentVelocityMetricEvaluatorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCurrentVelocityMetricEvaluatorImpl.cs index c4f15b3d8..67683ba9c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCurrentVelocityMetricEvaluatorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCurrentVelocityMetricEvaluatorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCycleBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCycleBaseImpl.cs index d9225aca3..523f9e4fd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCycleBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCycleBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CCycleBaseImpl : SchemaClass, CCycleBase { public CCycleBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _CycleOffset = new(() => Schema.GetOffset(0x8FBE16990C77829F), LazyThreadSafetyMode.None); + public ref float Cycle { - get => ref _Handle.AsRef(Schema.GetOffset(0x8FBE16990C77829F)); + get => ref _Handle.AsRef(_CycleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCycleControlClipUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCycleControlClipUpdateNodeImpl.cs index b57b1bfcb..f7b614306 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCycleControlClipUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCycleControlClipUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CCycleControlClipUpdateNodeImpl : CLeafUpdateNodeImpl, CC public CCycleControlClipUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _TagsOffset = new(() => Schema.GetOffset(0x57FEB5AAB46C8540), LazyThreadSafetyMode.None); + public ref CUtlVector Tags { - get => ref _Handle.AsRef>(Schema.GetOffset(0x57FEB5AAB46C8540)); + get => ref _Handle.AsRef>(_TagsOffset.Value); } + private static readonly Lazy _SequenceOffset = new(() => Schema.GetOffset(0x57FEB5AAE0A0598E), LazyThreadSafetyMode.None); + public HSequence Sequence { - get => new HSequenceImpl(_Handle + Schema.GetOffset(0x57FEB5AAE0A0598E)); + get => new HSequenceImpl(_Handle + _SequenceOffset.Value); } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0x57FEB5AA3D9FF5AD), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0x57FEB5AA3D9FF5AD)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _ValueSourceOffset = new(() => Schema.GetOffset(0x57FEB5AAD4D5B6B7), LazyThreadSafetyMode.None); + public ref AnimValueSource ValueSource { - get => ref _Handle.AsRef(Schema.GetOffset(0x57FEB5AAD4D5B6B7)); + get => ref _Handle.AsRef(_ValueSourceOffset.Value); } + private static readonly Lazy _ParamIndexOffset = new(() => Schema.GetOffset(0x57FEB5AA61990A86), LazyThreadSafetyMode.None); + public CAnimParamHandle ParamIndex { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x57FEB5AA61990A86)); + get => new CAnimParamHandleImpl(_Handle + _ParamIndexOffset.Value); } + private static readonly Lazy _LockWhenWaningOffset = new(() => Schema.GetOffset(0x57FEB5AAEED48004), LazyThreadSafetyMode.None); + public ref bool LockWhenWaning { - get => ref _Handle.AsRef(Schema.GetOffset(0x57FEB5AAEED48004)); + get => ref _Handle.AsRef(_LockWhenWaningOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCycleControlUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCycleControlUpdateNodeImpl.cs index 673dd7160..255c8a7be 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCycleControlUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CCycleControlUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CCycleControlUpdateNodeImpl : CUnaryUpdateNodeImpl, CCycl public CCycleControlUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueSourceOffset = new(() => Schema.GetOffset(0xB811C15CD4D5B6B7), LazyThreadSafetyMode.None); + public ref AnimValueSource ValueSource { - get => ref _Handle.AsRef(Schema.GetOffset(0xB811C15CD4D5B6B7)); + get => ref _Handle.AsRef(_ValueSourceOffset.Value); } + private static readonly Lazy _ParamIndexOffset = new(() => Schema.GetOffset(0xB811C15C61990A86), LazyThreadSafetyMode.None); + public CAnimParamHandle ParamIndex { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xB811C15C61990A86)); + get => new CAnimParamHandleImpl(_Handle + _ParamIndexOffset.Value); } + private static readonly Lazy _LockWhenWaningOffset = new(() => Schema.GetOffset(0xB811C15CEED48004), LazyThreadSafetyMode.None); + public ref bool LockWhenWaning { - get => ref _Handle.AsRef(Schema.GetOffset(0xB811C15CEED48004)); + get => ref _Handle.AsRef(_LockWhenWaningOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDEagleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDEagleImpl.cs index 02b047389..7a4f4bae3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDEagleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDEagleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDSPMixgroupModifierImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDSPMixgroupModifierImpl.cs index 045ac41f5..50358bd1b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDSPMixgroupModifierImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDSPMixgroupModifierImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,27 +17,39 @@ internal partial class CDSPMixgroupModifierImpl : SchemaClass, CDSPMixgroupModif public CDSPMixgroupModifierImpl(nint handle) : base(handle) { } + private static readonly Lazy _MixgroupOffset = new(() => Schema.GetOffset(0xDF83C91D89577218), LazyThreadSafetyMode.None); + public string Mixgroup { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDF83C91D89577218)); + var ptr = _Handle.Read(_MixgroupOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDF83C91D89577218, value); + set => Schema.SetString(_Handle, _MixgroupOffset.Value, value); } + private static readonly Lazy _ModifierOffset = new(() => Schema.GetOffset(0xDF83C91D55620FB6), LazyThreadSafetyMode.None); + public ref float Modifier { - get => ref _Handle.AsRef(Schema.GetOffset(0xDF83C91D55620FB6)); + get => ref _Handle.AsRef(_ModifierOffset.Value); } + private static readonly Lazy _ModifierMinOffset = new(() => Schema.GetOffset(0xDF83C91D62C9A002), LazyThreadSafetyMode.None); + public ref float ModifierMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xDF83C91D62C9A002)); + get => ref _Handle.AsRef(_ModifierMinOffset.Value); } + private static readonly Lazy _SourceModifierOffset = new(() => Schema.GetOffset(0xDF83C91D64BF2A67), LazyThreadSafetyMode.None); + public ref float SourceModifier { - get => ref _Handle.AsRef(Schema.GetOffset(0xDF83C91D64BF2A67)); + get => ref _Handle.AsRef(_SourceModifierOffset.Value); } + private static readonly Lazy _SourceModifierMinOffset = new(() => Schema.GetOffset(0xDF83C91D59151DE1), LazyThreadSafetyMode.None); + public ref float SourceModifierMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xDF83C91D59151DE1)); + get => ref _Handle.AsRef(_SourceModifierMinOffset.Value); } + private static readonly Lazy _ListenerReverbModifierWhenSourceReverbIsActiveOffset = new(() => Schema.GetOffset(0xDF83C91DC98A5029), LazyThreadSafetyMode.None); + public ref float ListenerReverbModifierWhenSourceReverbIsActive { - get => ref _Handle.AsRef(Schema.GetOffset(0xDF83C91DC98A5029)); + get => ref _Handle.AsRef(_ListenerReverbModifierWhenSourceReverbIsActiveOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDSPPresetMixgroupModifierTableImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDSPPresetMixgroupModifierTableImpl.cs index 20b872f27..b4a0fa191 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDSPPresetMixgroupModifierTableImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDSPPresetMixgroupModifierTableImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CDSPPresetMixgroupModifierTableImpl : SchemaClass, CDSPPr public CDSPPresetMixgroupModifierTableImpl(nint handle) : base(handle) { } + private static readonly Lazy _TableOffset = new(() => Schema.GetOffset(0xB4266D22715EA0FF), LazyThreadSafetyMode.None); + public ref CUtlVector Table { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB4266D22715EA0FF)); + get => ref _Handle.AsRef>(_TableOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDamageRecordImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDamageRecordImpl.cs index 222dfe25a..6061d9d0e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDamageRecordImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDamageRecordImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,58 +17,88 @@ internal partial class CDamageRecordImpl : SchemaClass, CDamageRecord { public CDamageRecordImpl(nint handle) : base(handle) { } + private static readonly Lazy _PlayerDamagerOffset = new(() => Schema.GetOffset(0x149283162F5812D9), LazyThreadSafetyMode.None); + public ref CHandle PlayerDamager { - get => ref _Handle.AsRef>(Schema.GetOffset(0x149283162F5812D9)); + get => ref _Handle.AsRef>(_PlayerDamagerOffset.Value); } + private static readonly Lazy _PlayerRecipientOffset = new(() => Schema.GetOffset(0x14928316EB48351F), LazyThreadSafetyMode.None); + public ref CHandle PlayerRecipient { - get => ref _Handle.AsRef>(Schema.GetOffset(0x14928316EB48351F)); + get => ref _Handle.AsRef>(_PlayerRecipientOffset.Value); } + private static readonly Lazy _PlayerControllerDamagerOffset = new(() => Schema.GetOffset(0x14928316285F9023), LazyThreadSafetyMode.None); + public ref CHandle PlayerControllerDamager { - get => ref _Handle.AsRef>(Schema.GetOffset(0x14928316285F9023)); + get => ref _Handle.AsRef>(_PlayerControllerDamagerOffset.Value); } + private static readonly Lazy _PlayerControllerRecipientOffset = new(() => Schema.GetOffset(0x14928316033B0B25), LazyThreadSafetyMode.None); + public ref CHandle PlayerControllerRecipient { - get => ref _Handle.AsRef>(Schema.GetOffset(0x14928316033B0B25)); + get => ref _Handle.AsRef>(_PlayerControllerRecipientOffset.Value); } + private static readonly Lazy _PlayerDamagerNameOffset = new(() => Schema.GetOffset(0x149283165AB278AD), LazyThreadSafetyMode.None); + public string PlayerDamagerName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x149283165AB278AD)); + var ptr = _Handle.Read(_PlayerDamagerNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x149283165AB278AD, value); + set => Schema.SetString(_Handle, _PlayerDamagerNameOffset.Value, value); } + private static readonly Lazy _PlayerRecipientNameOffset = new(() => Schema.GetOffset(0x14928316E6015313), LazyThreadSafetyMode.None); + public string PlayerRecipientName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x14928316E6015313)); + var ptr = _Handle.Read(_PlayerRecipientNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x14928316E6015313, value); + set => Schema.SetString(_Handle, _PlayerRecipientNameOffset.Value, value); } + private static readonly Lazy _DamagerXuidOffset = new(() => Schema.GetOffset(0x14928316DAD4D818), LazyThreadSafetyMode.None); + public ref ulong DamagerXuid { - get => ref _Handle.AsRef(Schema.GetOffset(0x14928316DAD4D818)); + get => ref _Handle.AsRef(_DamagerXuidOffset.Value); } + private static readonly Lazy _RecipientXuidOffset = new(() => Schema.GetOffset(0x1492831684A232C2), LazyThreadSafetyMode.None); + public ref ulong RecipientXuid { - get => ref _Handle.AsRef(Schema.GetOffset(0x1492831684A232C2)); + get => ref _Handle.AsRef(_RecipientXuidOffset.Value); } + private static readonly Lazy _BulletsDamageOffset = new(() => Schema.GetOffset(0x149283163641E11D), LazyThreadSafetyMode.None); + public ref float BulletsDamage { - get => ref _Handle.AsRef(Schema.GetOffset(0x149283163641E11D)); + get => ref _Handle.AsRef(_BulletsDamageOffset.Value); } + private static readonly Lazy _DamageOffset = new(() => Schema.GetOffset(0x14928316DC60E53E), LazyThreadSafetyMode.None); + public ref float Damage { - get => ref _Handle.AsRef(Schema.GetOffset(0x14928316DC60E53E)); + get => ref _Handle.AsRef(_DamageOffset.Value); } + private static readonly Lazy _ActualHealthRemovedOffset = new(() => Schema.GetOffset(0x14928316F8DC2935), LazyThreadSafetyMode.None); + public ref float ActualHealthRemoved { - get => ref _Handle.AsRef(Schema.GetOffset(0x14928316F8DC2935)); + get => ref _Handle.AsRef(_ActualHealthRemovedOffset.Value); } + private static readonly Lazy _NumHitsOffset = new(() => Schema.GetOffset(0x149283162EC9980E), LazyThreadSafetyMode.None); + public ref int NumHits { - get => ref _Handle.AsRef(Schema.GetOffset(0x149283162EC9980E)); + get => ref _Handle.AsRef(_NumHitsOffset.Value); } + private static readonly Lazy _LastBulletUpdateOffset = new(() => Schema.GetOffset(0x14928316D5ABC11D), LazyThreadSafetyMode.None); + public ref int LastBulletUpdate { - get => ref _Handle.AsRef(Schema.GetOffset(0x14928316D5ABC11D)); + get => ref _Handle.AsRef(_LastBulletUpdateOffset.Value); } + private static readonly Lazy _IsOtherEnemyOffset = new(() => Schema.GetOffset(0x149283164F1F40EB), LazyThreadSafetyMode.None); + public ref bool IsOtherEnemy { - get => ref _Handle.AsRef(Schema.GetOffset(0x149283164F1F40EB)); + get => ref _Handle.AsRef(_IsOtherEnemyOffset.Value); } + private static readonly Lazy _KillTypeOffset = new(() => Schema.GetOffset(0x14928316C2ADBB11), LazyThreadSafetyMode.None); + public ref EKillTypes_t KillType { - get => ref _Handle.AsRef(Schema.GetOffset(0x14928316C2ADBB11)); + get => ref _Handle.AsRef(_KillTypeOffset.Value); } public void PlayerDamagerUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDampedPathAnimMotorUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDampedPathAnimMotorUpdaterImpl.cs index a725f18fa..70b2b4c87 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDampedPathAnimMotorUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDampedPathAnimMotorUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CDampedPathAnimMotorUpdaterImpl : CPathAnimMotorUpdaterBa public CDampedPathAnimMotorUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _AnticipationTimeOffset = new(() => Schema.GetOffset(0x1519DE4D43C5CA9B), LazyThreadSafetyMode.None); + public ref float AnticipationTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x1519DE4D43C5CA9B)); + get => ref _Handle.AsRef(_AnticipationTimeOffset.Value); } + private static readonly Lazy _MinSpeedScaleOffset = new(() => Schema.GetOffset(0x1519DE4DED3B5DEE), LazyThreadSafetyMode.None); + public ref float MinSpeedScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x1519DE4DED3B5DEE)); + get => ref _Handle.AsRef(_MinSpeedScaleOffset.Value); } + private static readonly Lazy _AnticipationPosParamOffset = new(() => Schema.GetOffset(0x1519DE4D86389829), LazyThreadSafetyMode.None); + public CAnimParamHandle AnticipationPosParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x1519DE4D86389829)); + get => new CAnimParamHandleImpl(_Handle + _AnticipationPosParamOffset.Value); } + private static readonly Lazy _AnticipationHeadingParamOffset = new(() => Schema.GetOffset(0x1519DE4D095DAB6D), LazyThreadSafetyMode.None); + public CAnimParamHandle AnticipationHeadingParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x1519DE4D095DAB6D)); + get => new CAnimParamHandleImpl(_Handle + _AnticipationHeadingParamOffset.Value); } + private static readonly Lazy _SpringConstantOffset = new(() => Schema.GetOffset(0x1519DE4DCE2260BE), LazyThreadSafetyMode.None); + public ref float SpringConstant { - get => ref _Handle.AsRef(Schema.GetOffset(0x1519DE4DCE2260BE)); + get => ref _Handle.AsRef(_SpringConstantOffset.Value); } + private static readonly Lazy _MinSpringTensionOffset = new(() => Schema.GetOffset(0x1519DE4DEEE56032), LazyThreadSafetyMode.None); + public ref float MinSpringTension { - get => ref _Handle.AsRef(Schema.GetOffset(0x1519DE4DEEE56032)); + get => ref _Handle.AsRef(_MinSpringTensionOffset.Value); } + private static readonly Lazy _MaxSpringTensionOffset = new(() => Schema.GetOffset(0x1519DE4DD4910BE4), LazyThreadSafetyMode.None); + public ref float MaxSpringTension { - get => ref _Handle.AsRef(Schema.GetOffset(0x1519DE4DD4910BE4)); + get => ref _Handle.AsRef(_MaxSpringTensionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDampedValueComponentUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDampedValueComponentUpdaterImpl.cs index f3703f6c4..e73963726 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDampedValueComponentUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDampedValueComponentUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CDampedValueComponentUpdaterImpl : CAnimComponentUpdaterI public CDampedValueComponentUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _ItemsOffset = new(() => Schema.GetOffset(0x9FFDDC9E7A87EDAF), LazyThreadSafetyMode.None); + public ref CUtlVector Items { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9FFDDC9E7A87EDAF)); + get => ref _Handle.AsRef>(_ItemsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDampedValueUpdateItemImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDampedValueUpdateItemImpl.cs index c79fda212..5e4ba124c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDampedValueUpdateItemImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDampedValueUpdateItemImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CDampedValueUpdateItemImpl : SchemaClass, CDampedValueUpd public CDampedValueUpdateItemImpl(nint handle) : base(handle) { } + private static readonly Lazy _DampingOffset = new(() => Schema.GetOffset(0x4B11725415440FB5), LazyThreadSafetyMode.None); + public CAnimInputDamping Damping { - get => new CAnimInputDampingImpl(_Handle + Schema.GetOffset(0x4B11725415440FB5)); + get => new CAnimInputDampingImpl(_Handle + _DampingOffset.Value); } + private static readonly Lazy _ParamInOffset = new(() => Schema.GetOffset(0x4B117254ED40E37B), LazyThreadSafetyMode.None); + public CAnimParamHandle ParamIn { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x4B117254ED40E37B)); + get => new CAnimParamHandleImpl(_Handle + _ParamInOffset.Value); } + private static readonly Lazy _ParamOutOffset = new(() => Schema.GetOffset(0x4B117254AA5799A8), LazyThreadSafetyMode.None); + public CAnimParamHandle ParamOut { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x4B117254AA5799A8)); + get => new CAnimParamHandleImpl(_Handle + _ParamOutOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDebugHistoryImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDebugHistoryImpl.cs index 2388ac2f0..add8b4ab4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDebugHistoryImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDebugHistoryImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CDebugHistoryImpl : CBaseEntityImpl, CDebugHistory { public CDebugHistoryImpl(nint handle) : base(handle) { } + private static readonly Lazy _NpcEventsOffset = new(() => Schema.GetOffset(0xD14757AF8F70D3F5), LazyThreadSafetyMode.None); + public ref int NpcEvents { - get => ref _Handle.AsRef(Schema.GetOffset(0xD14757AF8F70D3F5)); + get => ref _Handle.AsRef(_NpcEventsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDecalGroupVDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDecalGroupVDataImpl.cs index 70f22a818..33b9d5737 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDecalGroupVDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDecalGroupVDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CDecalGroupVDataImpl : SchemaClass, CDecalGroupVData { public CDecalGroupVDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _OptionsOffset = new(() => Schema.GetOffset(0x56FC0D98C5C14E85), LazyThreadSafetyMode.None); + public ref CUtlVector Options { - get => ref _Handle.AsRef>(Schema.GetOffset(0x56FC0D98C5C14E85)); + get => ref _Handle.AsRef>(_OptionsOffset.Value); } + private static readonly Lazy _TotalProbabilityOffset = new(() => Schema.GetOffset(0x56FC0D98154D3742), LazyThreadSafetyMode.None); + public ref float TotalProbability { - get => ref _Handle.AsRef(Schema.GetOffset(0x56FC0D98154D3742)); + get => ref _Handle.AsRef(_TotalProbabilityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDecalInstanceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDecalInstanceImpl.cs index e752f50fe..02cfae288 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDecalInstanceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDecalInstanceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,77 +17,130 @@ internal partial class CDecalInstanceImpl : SchemaClass, CDecalInstance { public CDecalInstanceImpl(nint handle) : base(handle) { } + private static readonly Lazy _DecalGroupOffset = new(() => Schema.GetOffset(0x88CA447CCEBD4836), LazyThreadSafetyMode.None); + public ref CGlobalSymbol DecalGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447CCEBD4836)); + get => ref _Handle.AsRef(_DecalGroupOffset.Value); } + private static readonly Lazy _MaterialOffset = new(() => Schema.GetOffset(0x88CA447C888CE42E), LazyThreadSafetyMode.None); + public ref CStrongHandle Material { - get => ref _Handle.AsRef>(Schema.GetOffset(0x88CA447C888CE42E)); + get => ref _Handle.AsRef>(_MaterialOffset.Value); } + private static readonly Lazy _SequenceNameOffset = new(() => Schema.GetOffset(0x88CA447C7462AF30), LazyThreadSafetyMode.None); + public ref CUtlStringToken SequenceName { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447C7462AF30)); + get => ref _Handle.AsRef(_SequenceNameOffset.Value); } + private static readonly Lazy _EntityOffset = new(() => Schema.GetOffset(0x88CA447C6EBADCB0), LazyThreadSafetyMode.None); + public ref CHandle Entity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x88CA447C6EBADCB0)); + get => ref _Handle.AsRef>(_EntityOffset.Value); } + private static readonly Lazy _BoneIndexOffset = new(() => Schema.GetOffset(0x88CA447C9F407B79), LazyThreadSafetyMode.None); + public ref int BoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447C9F407B79)); + get => ref _Handle.AsRef(_BoneIndexOffset.Value); } + private static readonly Lazy _TriangleIndexOffset = new(() => Schema.GetOffset(0x88CA447C4465462F), LazyThreadSafetyMode.None); + public ref int TriangleIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447C4465462F)); + get => ref _Handle.AsRef(_TriangleIndexOffset.Value); } + private static readonly Lazy _PositionLSOffset = new(() => Schema.GetOffset(0x88CA447C9D27001F), LazyThreadSafetyMode.None); + public ref Vector PositionLS { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447C9D27001F)); + get => ref _Handle.AsRef(_PositionLSOffset.Value); } + private static readonly Lazy _NormalLSOffset = new(() => Schema.GetOffset(0x88CA447C1C20D7C7), LazyThreadSafetyMode.None); + public ref Vector NormalLS { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447C1C20D7C7)); + get => ref _Handle.AsRef(_NormalLSOffset.Value); } + private static readonly Lazy _SAxisLSOffset = new(() => Schema.GetOffset(0x88CA447C95DE878A), LazyThreadSafetyMode.None); + public ref Vector SAxisLS { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447C95DE878A)); + get => ref _Handle.AsRef(_SAxisLSOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x88CA447CCE6E9C28), LazyThreadSafetyMode.None); + public ref DecalFlags_t Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447CCE6E9C28)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _ColorOffset = new(() => Schema.GetOffset(0x88CA447CD7D017D8), LazyThreadSafetyMode.None); + public ref Color Color { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447CD7D017D8)); + get => ref _Handle.AsRef(_ColorOffset.Value); } + private static readonly Lazy _WidthOffset = new(() => Schema.GetOffset(0x88CA447CB91935E1), LazyThreadSafetyMode.None); + public ref float Width { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447CB91935E1)); + get => ref _Handle.AsRef(_WidthOffset.Value); } + private static readonly Lazy _HeightOffset = new(() => Schema.GetOffset(0x88CA447CEADD7FB0), LazyThreadSafetyMode.None); + public ref float Height { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447CEADD7FB0)); + get => ref _Handle.AsRef(_HeightOffset.Value); } + private static readonly Lazy _DepthOffset = new(() => Schema.GetOffset(0x88CA447CD3AD54E8), LazyThreadSafetyMode.None); + public ref float Depth { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447CD3AD54E8)); + get => ref _Handle.AsRef(_DepthOffset.Value); } + private static readonly Lazy _AnimationScaleOffset = new(() => Schema.GetOffset(0x88CA447CE03B2F87), LazyThreadSafetyMode.None); + public ref float AnimationScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447CE03B2F87)); + get => ref _Handle.AsRef(_AnimationScaleOffset.Value); + } + private static readonly Lazy _AnimationStartTimeOffset = new(() => Schema.GetOffset(0x88CA447CDC58A88C), LazyThreadSafetyMode.None); + + public ref float AnimationStartTime { + get => ref _Handle.AsRef(_AnimationStartTimeOffset.Value); } + private static readonly Lazy _PlaceTimeOffset = new(() => Schema.GetOffset(0x88CA447C1103AE77), LazyThreadSafetyMode.None); + public GameTime_t PlaceTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x88CA447C1103AE77)); + get => new GameTime_tImpl(_Handle + _PlaceTimeOffset.Value); } + private static readonly Lazy _FadeStartTimeOffset = new(() => Schema.GetOffset(0x88CA447C86B28BFA), LazyThreadSafetyMode.None); + public ref float FadeStartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447C86B28BFA)); + get => ref _Handle.AsRef(_FadeStartTimeOffset.Value); } + private static readonly Lazy _FadeDurationOffset = new(() => Schema.GetOffset(0x88CA447CC4E6DEE1), LazyThreadSafetyMode.None); + public ref float FadeDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447CC4E6DEE1)); + get => ref _Handle.AsRef(_FadeDurationOffset.Value); } + private static readonly Lazy _LightingOriginOffsetOffset = new(() => Schema.GetOffset(0x88CA447CBB88AF36), LazyThreadSafetyMode.None); + public ref float LightingOriginOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447CBB88AF36)); + get => ref _Handle.AsRef(_LightingOriginOffsetOffset.Value); } + private static readonly Lazy _BoundingRadiusSqrOffset = new(() => Schema.GetOffset(0x88CA447CEA90D145), LazyThreadSafetyMode.None); + public ref float BoundingRadiusSqr { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447CEA90D145)); + get => ref _Handle.AsRef(_BoundingRadiusSqrOffset.Value); } + private static readonly Lazy _SequenceIndexOffset = new(() => Schema.GetOffset(0x88CA447CF87A9C78), LazyThreadSafetyMode.None); + public ref short SequenceIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447CF87A9C78)); + get => ref _Handle.AsRef(_SequenceIndexOffset.Value); } + private static readonly Lazy _IsAdjacentOffset = new(() => Schema.GetOffset(0x88CA447C87EAB10F), LazyThreadSafetyMode.None); + public ref bool IsAdjacent { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447C87EAB10F)); + get => ref _Handle.AsRef(_IsAdjacentOffset.Value); } + private static readonly Lazy _DoDecalLightmappingOffset = new(() => Schema.GetOffset(0x88CA447C8A2CC817), LazyThreadSafetyMode.None); + public ref bool DoDecalLightmapping { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447C8A2CC817)); + get => ref _Handle.AsRef(_DoDecalLightmappingOffset.Value); } + private static readonly Lazy _SkinnedModelModeOffset = new(() => Schema.GetOffset(0x88CA447CFB03C3D7), LazyThreadSafetyMode.None); + public ref DecalMode_t SkinnedModelMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x88CA447CFB03C3D7)); + get => ref _Handle.AsRef(_SkinnedModelModeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDecoyGrenadeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDecoyGrenadeImpl.cs index abd2eca23..315f7f11e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDecoyGrenadeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDecoyGrenadeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDecoyProjectileImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDecoyProjectileImpl.cs index 77951f358..885027bb5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDecoyProjectileImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDecoyProjectileImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CDecoyProjectileImpl : CBaseCSGrenadeProjectileImpl, CDec public CDecoyProjectileImpl(nint handle) : base(handle) { } + private static readonly Lazy _DecoyShotTickOffset = new(() => Schema.GetOffset(0x69629121C4EFED0A), LazyThreadSafetyMode.None); + public ref int DecoyShotTick { - get => ref _Handle.AsRef(Schema.GetOffset(0x69629121C4EFED0A)); + get => ref _Handle.AsRef(_DecoyShotTickOffset.Value); } + private static readonly Lazy _ShotsRemainingOffset = new(() => Schema.GetOffset(0x6962912188CAE2A2), LazyThreadSafetyMode.None); + public ref int ShotsRemaining { - get => ref _Handle.AsRef(Schema.GetOffset(0x6962912188CAE2A2)); + get => ref _Handle.AsRef(_ShotsRemainingOffset.Value); } + private static readonly Lazy _ExpireTimeOffset = new(() => Schema.GetOffset(0x696291216D61853F), LazyThreadSafetyMode.None); + public GameTime_t ExpireTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x696291216D61853F)); + get => new GameTime_tImpl(_Handle + _ExpireTimeOffset.Value); } + private static readonly Lazy _DecoyWeaponDefIndexOffset = new(() => Schema.GetOffset(0x69629121A9377E6A), LazyThreadSafetyMode.None); + public ref ushort DecoyWeaponDefIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x69629121A9377E6A)); + get => ref _Handle.AsRef(_DecoyWeaponDefIndexOffset.Value); } public void DecoyShotTickUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDemoSettingsComponentUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDemoSettingsComponentUpdaterImpl.cs index ffe798672..c04ef9ab4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDemoSettingsComponentUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDemoSettingsComponentUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CDemoSettingsComponentUpdaterImpl : CAnimComponentUpdater public CDemoSettingsComponentUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _SettingsOffset = new(() => Schema.GetOffset(0xD4FC646CB3DE33A8), LazyThreadSafetyMode.None); + public CAnimDemoCaptureSettings Settings { - get => new CAnimDemoCaptureSettingsImpl(_Handle + Schema.GetOffset(0xD4FC646CB3DE33A8)); + get => new CAnimDemoCaptureSettingsImpl(_Handle + _SettingsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDestructiblePartImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDestructiblePartImpl.cs index 5009d5088..8177d0107 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDestructiblePartImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDestructiblePartImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CDestructiblePartImpl : SchemaClass, CDestructiblePart { public CDestructiblePartImpl(nint handle) : base(handle) { } + private static readonly Lazy _DebugNameOffset = new(() => Schema.GetOffset(0xD9E4C935CAC1909B), LazyThreadSafetyMode.None); + public ref CGlobalSymbol DebugName { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9E4C935CAC1909B)); + get => ref _Handle.AsRef(_DebugNameOffset.Value); } + private static readonly Lazy _HitGroupOffset = new(() => Schema.GetOffset(0xD9E4C9359C854D19), LazyThreadSafetyMode.None); + public ref HitGroup_t HitGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9E4C9359C854D19)); + get => ref _Handle.AsRef(_HitGroupOffset.Value); } + private static readonly Lazy _DisableHitGroupWhenDestroyedOffset = new(() => Schema.GetOffset(0xD9E4C935AA847E82), LazyThreadSafetyMode.None); + public ref bool DisableHitGroupWhenDestroyed { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9E4C935AA847E82)); + get => ref _Handle.AsRef(_DisableHitGroupWhenDestroyedOffset.Value); } + private static readonly Lazy _OtherHitgroupsToDestroyWhenFullyDestructedOffset = new(() => Schema.GetOffset(0xD9E4C9352ECFEA5A), LazyThreadSafetyMode.None); + public ref CUtlVector OtherHitgroupsToDestroyWhenFullyDestructed { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD9E4C9352ECFEA5A)); + get => ref _Handle.AsRef>(_OtherHitgroupsToDestroyWhenFullyDestructedOffset.Value); } + private static readonly Lazy _OnlyDestroyWhenGibbingOffset = new(() => Schema.GetOffset(0xD9E4C9350F77EEC1), LazyThreadSafetyMode.None); + public ref bool OnlyDestroyWhenGibbing { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9E4C9350F77EEC1)); + get => ref _Handle.AsRef(_OnlyDestroyWhenGibbingOffset.Value); } + private static readonly Lazy _BodyGroupNameOffset = new(() => Schema.GetOffset(0xD9E4C935FFA38852), LazyThreadSafetyMode.None); + public ref CGlobalSymbol BodyGroupName { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9E4C935FFA38852)); + get => ref _Handle.AsRef(_BodyGroupNameOffset.Value); } + private static readonly Lazy _DamageLevelsOffset = new(() => Schema.GetOffset(0xD9E4C9353B88DC4F), LazyThreadSafetyMode.None); + public ref CUtlVector DamageLevels { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD9E4C9353B88DC4F)); + get => ref _Handle.AsRef>(_DamageLevelsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDestructiblePart_DamageLevelImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDestructiblePart_DamageLevelImpl.cs index f9e509530..f9fde7f31 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDestructiblePart_DamageLevelImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDestructiblePart_DamageLevelImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,39 +17,59 @@ internal partial class CDestructiblePart_DamageLevelImpl : SchemaClass, CDestruc public CDestructiblePart_DamageLevelImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xF69D69CB63D22D49), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF69D69CB63D22D49)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF69D69CB63D22D49, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _BreakablePieceNameOffset = new(() => Schema.GetOffset(0xF69D69CB88329BEA), LazyThreadSafetyMode.None); + public ref CGlobalSymbol BreakablePieceName { - get => ref _Handle.AsRef(Schema.GetOffset(0xF69D69CB88329BEA)); + get => ref _Handle.AsRef(_BreakablePieceNameOffset.Value); } + private static readonly Lazy _BodyGroupValueOffset = new(() => Schema.GetOffset(0xF69D69CB90FF4BE9), LazyThreadSafetyMode.None); + public ref int BodyGroupValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xF69D69CB90FF4BE9)); + get => ref _Handle.AsRef(_BodyGroupValueOffset.Value); } + private static readonly Lazy _HealthOffset = new(() => Schema.GetOffset(0xF69D69CB6E9C4CC3), LazyThreadSafetyMode.None); + public CSkillInt Health { - get => new CSkillIntImpl(_Handle + Schema.GetOffset(0xF69D69CB6E9C4CC3)); + get => new CSkillIntImpl(_Handle + _HealthOffset.Value); } + private static readonly Lazy _CriticalDamagePercentOffset = new(() => Schema.GetOffset(0xF69D69CB4488F688), LazyThreadSafetyMode.None); + public ref float CriticalDamagePercent { - get => ref _Handle.AsRef(Schema.GetOffset(0xF69D69CB4488F688)); + get => ref _Handle.AsRef(_CriticalDamagePercentOffset.Value); } + private static readonly Lazy _DamagePassthroughTypeOffset = new(() => Schema.GetOffset(0xF69D69CB3D01100A), LazyThreadSafetyMode.None); + public ref EDestructiblePartDamagePassThroughType DamagePassthroughType { - get => ref _Handle.AsRef(Schema.GetOffset(0xF69D69CB3D01100A)); + get => ref _Handle.AsRef(_DamagePassthroughTypeOffset.Value); } + private static readonly Lazy _DestructionDeathBehaviorOffset = new(() => Schema.GetOffset(0xF69D69CB41778385), LazyThreadSafetyMode.None); + public ref DestructiblePartDestructionDeathBehavior_t DestructionDeathBehavior { - get => ref _Handle.AsRef(Schema.GetOffset(0xF69D69CB41778385)); + get => ref _Handle.AsRef(_DestructionDeathBehaviorOffset.Value); } + private static readonly Lazy _CustomDeathHandshakeOffset = new(() => Schema.GetOffset(0xF69D69CBF17A0D42), LazyThreadSafetyMode.None); + public ref CGlobalSymbol CustomDeathHandshake { - get => ref _Handle.AsRef(Schema.GetOffset(0xF69D69CBF17A0D42)); + get => ref _Handle.AsRef(_CustomDeathHandshakeOffset.Value); } + private static readonly Lazy _ShouldDestroyOnDeathOffset = new(() => Schema.GetOffset(0xF69D69CBC63DDDD5), LazyThreadSafetyMode.None); + public ref bool ShouldDestroyOnDeath { - get => ref _Handle.AsRef(Schema.GetOffset(0xF69D69CBC63DDDD5)); + get => ref _Handle.AsRef(_ShouldDestroyOnDeathOffset.Value); } + private static readonly Lazy _DeathDestroyTimeOffset = new(() => Schema.GetOffset(0xF69D69CB29D83EA2), LazyThreadSafetyMode.None); + public CRangeFloat DeathDestroyTime { - get => new CRangeFloatImpl(_Handle + Schema.GetOffset(0xF69D69CB29D83EA2)); + get => new CRangeFloatImpl(_Handle + _DeathDestroyTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDestructiblePartsComponentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDestructiblePartsComponentImpl.cs index 94543eccc..2d3773dd5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDestructiblePartsComponentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDestructiblePartsComponentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CDestructiblePartsComponentImpl : SchemaClass, CDestructi public CDestructiblePartsComponentImpl(nint handle) : base(handle) { } + private static readonly Lazy ___m_pChainEntityOffset = new(() => Schema.GetOffset(0xE69A9E51F63F0E7D), LazyThreadSafetyMode.None); + public ref CNetworkVarChainer __m_pChainEntity { - get => ref _Handle.AsRef(Schema.GetOffset(0xE69A9E51F63F0E7D)); + get => ref _Handle.AsRef(___m_pChainEntityOffset.Value); } + private static readonly Lazy _DamageTakenByHitGroupOffset = new(() => Schema.GetOffset(0xE69A9E51F137427A), LazyThreadSafetyMode.None); + public ref CUtlVector DamageTakenByHitGroup { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE69A9E51F137427A)); + get => ref _Handle.AsRef>(_DamageTakenByHitGroupOffset.Value); } + private static readonly Lazy _OwnerOffset = new(() => Schema.GetOffset(0xE69A9E51F6D89572), LazyThreadSafetyMode.None); + public ref CHandle Owner { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE69A9E51F6D89572)); + get => ref _Handle.AsRef>(_OwnerOffset.Value); } + private static readonly Lazy _LastHitDamageLevelOffset = new(() => Schema.GetOffset(0xE69A9E51042B0657), LazyThreadSafetyMode.None); + public ref int LastHitDamageLevel { - get => ref _Handle.AsRef(Schema.GetOffset(0xE69A9E51042B0657)); + get => ref _Handle.AsRef(_LastHitDamageLevelOffset.Value); } public void OwnerUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDestructiblePartsSystemDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDestructiblePartsSystemDataImpl.cs index 418fb81de..25ae51846 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDestructiblePartsSystemDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDestructiblePartsSystemDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CDestructiblePartsSystemDataImpl : SchemaClass, CDestruct public CDestructiblePartsSystemDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _PartsDataByHitGroupOffset = new(() => Schema.GetOffset(0xABDCB98361E96220), LazyThreadSafetyMode.None); + public SchemaUntypedField PartsDataByHitGroup { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xABDCB98361E96220)); + get => new SchemaUntypedField(_Handle + _PartsDataByHitGroupOffset.Value); } + private static readonly Lazy _MinMaxNumberHitGroupsToDestroyWhenGibbingOffset = new(() => Schema.GetOffset(0xABDCB9834CA810D8), LazyThreadSafetyMode.None); + public CRangeInt MinMaxNumberHitGroupsToDestroyWhenGibbing { - get => new CRangeIntImpl(_Handle + Schema.GetOffset(0xABDCB9834CA810D8)); + get => new CRangeIntImpl(_Handle + _MinMaxNumberHitGroupsToDestroyWhenGibbingOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDirectPlaybackTagDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDirectPlaybackTagDataImpl.cs index 52662a4ae..64345e0db 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDirectPlaybackTagDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDirectPlaybackTagDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CDirectPlaybackTagDataImpl : SchemaClass, CDirectPlayback public CDirectPlaybackTagDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _SequenceNameOffset = new(() => Schema.GetOffset(0xAADCE162B4A24CB), LazyThreadSafetyMode.None); + public string SequenceName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xAADCE162B4A24CB)); + var ptr = _Handle.Read(_SequenceNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xAADCE162B4A24CB, value); + set => Schema.SetString(_Handle, _SequenceNameOffset.Value, value); } + private static readonly Lazy _TagsOffset = new(() => Schema.GetOffset(0xAADCE16B46C8540), LazyThreadSafetyMode.None); + public ref CUtlVector Tags { - get => ref _Handle.AsRef>(Schema.GetOffset(0xAADCE16B46C8540)); + get => ref _Handle.AsRef>(_TagsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDirectPlaybackUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDirectPlaybackUpdateNodeImpl.cs index 23db235b6..1face0786 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDirectPlaybackUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDirectPlaybackUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CDirectPlaybackUpdateNodeImpl : CUnaryUpdateNodeImpl, CDi public CDirectPlaybackUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _FinishEarlyOffset = new(() => Schema.GetOffset(0x4E1CBFEFC2E75991), LazyThreadSafetyMode.None); + public ref bool FinishEarly { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E1CBFEFC2E75991)); + get => ref _Handle.AsRef(_FinishEarlyOffset.Value); } + private static readonly Lazy _ResetOnFinishOffset = new(() => Schema.GetOffset(0x4E1CBFEFD5293C96), LazyThreadSafetyMode.None); + public ref bool ResetOnFinish { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E1CBFEFD5293C96)); + get => ref _Handle.AsRef(_ResetOnFinishOffset.Value); } + private static readonly Lazy _AllTagsOffset = new(() => Schema.GetOffset(0x4E1CBFEF7A57C5AD), LazyThreadSafetyMode.None); + public ref CUtlVector AllTags { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4E1CBFEF7A57C5AD)); + get => ref _Handle.AsRef>(_AllTagsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDirectionalBlendUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDirectionalBlendUpdateNodeImpl.cs index ac4840945..82866d426 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDirectionalBlendUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDirectionalBlendUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CDirectionalBlendUpdateNodeImpl : CLeafUpdateNodeImpl, CD public CDirectionalBlendUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _SequencesOffset = new(() => Schema.GetOffset(0xD7E03CEC996DA947), LazyThreadSafetyMode.None); + public SchemaUntypedField Sequences { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD7E03CEC996DA947)); + get => new SchemaUntypedField(_Handle + _SequencesOffset.Value); } + private static readonly Lazy _DampingOffset = new(() => Schema.GetOffset(0xD7E03CEC15440FB5), LazyThreadSafetyMode.None); + public CAnimInputDamping Damping { - get => new CAnimInputDampingImpl(_Handle + Schema.GetOffset(0xD7E03CEC15440FB5)); + get => new CAnimInputDampingImpl(_Handle + _DampingOffset.Value); } + private static readonly Lazy _BlendValueSourceOffset = new(() => Schema.GetOffset(0xD7E03CEC7AB7C374), LazyThreadSafetyMode.None); + public ref AnimValueSource BlendValueSource { - get => ref _Handle.AsRef(Schema.GetOffset(0xD7E03CEC7AB7C374)); + get => ref _Handle.AsRef(_BlendValueSourceOffset.Value); } + private static readonly Lazy _ParamIndexOffset = new(() => Schema.GetOffset(0xD7E03CEC61990A86), LazyThreadSafetyMode.None); + public CAnimParamHandle ParamIndex { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xD7E03CEC61990A86)); + get => new CAnimParamHandleImpl(_Handle + _ParamIndexOffset.Value); } + private static readonly Lazy _PlaybackSpeedOffset = new(() => Schema.GetOffset(0xD7E03CEC1AFA7387), LazyThreadSafetyMode.None); + public ref float PlaybackSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xD7E03CEC1AFA7387)); + get => ref _Handle.AsRef(_PlaybackSpeedOffset.Value); } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0xD7E03CEC3D9FF5AD), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0xD7E03CEC3D9FF5AD)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _LoopOffset = new(() => Schema.GetOffset(0xD7E03CECC668A4CB), LazyThreadSafetyMode.None); + public ref bool Loop { - get => ref _Handle.AsRef(Schema.GetOffset(0xD7E03CECC668A4CB)); + get => ref _Handle.AsRef(_LoopOffset.Value); } + private static readonly Lazy _LockBlendOnResetOffset = new(() => Schema.GetOffset(0xD7E03CEC76334223), LazyThreadSafetyMode.None); + public ref bool LockBlendOnReset { - get => ref _Handle.AsRef(Schema.GetOffset(0xD7E03CEC76334223)); + get => ref _Handle.AsRef(_LockBlendOnResetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDistanceRemainingMetricEvaluatorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDistanceRemainingMetricEvaluatorImpl.cs index b39de4b12..5e8c589ae 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDistanceRemainingMetricEvaluatorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDistanceRemainingMetricEvaluatorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CDistanceRemainingMetricEvaluatorImpl : CMotionMetricEval public CDistanceRemainingMetricEvaluatorImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaxDistanceOffset = new(() => Schema.GetOffset(0xEF12BCC898893360), LazyThreadSafetyMode.None); + public ref float MaxDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xEF12BCC898893360)); + get => ref _Handle.AsRef(_MaxDistanceOffset.Value); } + private static readonly Lazy _MinDistanceOffset = new(() => Schema.GetOffset(0xEF12BCC892BCAD06), LazyThreadSafetyMode.None); + public ref float MinDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xEF12BCC892BCAD06)); + get => ref _Handle.AsRef(_MinDistanceOffset.Value); } + private static readonly Lazy _StartGoalFilterDistanceOffset = new(() => Schema.GetOffset(0xEF12BCC8531B6E2B), LazyThreadSafetyMode.None); + public ref float StartGoalFilterDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xEF12BCC8531B6E2B)); + get => ref _Handle.AsRef(_StartGoalFilterDistanceOffset.Value); } + private static readonly Lazy _MaxGoalOvershootScaleOffset = new(() => Schema.GetOffset(0xEF12BCC8D2E0A335), LazyThreadSafetyMode.None); + public ref float MaxGoalOvershootScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xEF12BCC8D2E0A335)); + get => ref _Handle.AsRef(_MaxGoalOvershootScaleOffset.Value); } + private static readonly Lazy _FilterFixedMinDistanceOffset = new(() => Schema.GetOffset(0xEF12BCC85AD937B2), LazyThreadSafetyMode.None); + public ref bool FilterFixedMinDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xEF12BCC85AD937B2)); + get => ref _Handle.AsRef(_FilterFixedMinDistanceOffset.Value); } + private static readonly Lazy _FilterGoalDistanceOffset = new(() => Schema.GetOffset(0xEF12BCC8A9641DB3), LazyThreadSafetyMode.None); + public ref bool FilterGoalDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xEF12BCC8A9641DB3)); + get => ref _Handle.AsRef(_FilterGoalDistanceOffset.Value); } + private static readonly Lazy _FilterGoalOvershootOffset = new(() => Schema.GetOffset(0xEF12BCC89A875DD1), LazyThreadSafetyMode.None); + public ref bool FilterGoalOvershoot { - get => ref _Handle.AsRef(Schema.GetOffset(0xEF12BCC89A875DD1)); + get => ref _Handle.AsRef(_FilterGoalOvershootOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDrawCullingDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDrawCullingDataImpl.cs index 443a16433..f13b491f8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDrawCullingDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDrawCullingDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,8 +20,10 @@ public CDrawCullingDataImpl(nint handle) : base(handle) { public ISchemaFixedArray ConeAxis { get => new SchemaFixedArray(_Handle, 0x80665970C59E234F, 3, 1, 1); } + private static readonly Lazy _ConeCutoffOffset = new(() => Schema.GetOffset(0x80665970CAE61D67), LazyThreadSafetyMode.None); + public ref byte ConeCutoff { - get => ref _Handle.AsRef(Schema.GetOffset(0x80665970CAE61D67)); + get => ref _Handle.AsRef(_ConeCutoffOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDspPresetModifierListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDspPresetModifierListImpl.cs index 595bdfe76..31a8e078d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDspPresetModifierListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDspPresetModifierListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CDspPresetModifierListImpl : SchemaClass, CDspPresetModif public CDspPresetModifierListImpl(nint handle) : base(handle) { } + private static readonly Lazy _DspNameOffset = new(() => Schema.GetOffset(0x68EE16FD7E9A0D3), LazyThreadSafetyMode.None); + public string DspName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x68EE16FD7E9A0D3)); + var ptr = _Handle.Read(_DspNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x68EE16FD7E9A0D3, value); + set => Schema.SetString(_Handle, _DspNameOffset.Value, value); } + private static readonly Lazy _ModifiersOffset = new(() => Schema.GetOffset(0x68EE16F541F1439), LazyThreadSafetyMode.None); + public ref CUtlVector Modifiers { - get => ref _Handle.AsRef>(Schema.GetOffset(0x68EE16F541F1439)); + get => ref _Handle.AsRef>(_ModifiersOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicLightImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicLightImpl.cs index 3ce4ed684..c99797de3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicLightImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicLightImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class CDynamicLightImpl : CBaseModelEntityImpl, CDynamicLight { public CDynamicLightImpl(nint handle) : base(handle) { } + private static readonly Lazy _ActualFlagsOffset = new(() => Schema.GetOffset(0x5256F8E9E685EDEE), LazyThreadSafetyMode.None); + public ref byte ActualFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0x5256F8E9E685EDEE)); + get => ref _Handle.AsRef(_ActualFlagsOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x5256F8E936B92FAC), LazyThreadSafetyMode.None); + public ref byte Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x5256F8E936B92FAC)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _LightStyleOffset = new(() => Schema.GetOffset(0x5256F8E965232F30), LazyThreadSafetyMode.None); + public ref byte LightStyle { - get => ref _Handle.AsRef(Schema.GetOffset(0x5256F8E965232F30)); + get => ref _Handle.AsRef(_LightStyleOffset.Value); } + private static readonly Lazy _OnOffset = new(() => Schema.GetOffset(0x5256F8E9DF026050), LazyThreadSafetyMode.None); + public ref bool On { - get => ref _Handle.AsRef(Schema.GetOffset(0x5256F8E9DF026050)); + get => ref _Handle.AsRef(_OnOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x5256F8E97C5B0533), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x5256F8E97C5B0533)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _ExponentOffset = new(() => Schema.GetOffset(0x5256F8E99BCA80C6), LazyThreadSafetyMode.None); + public ref int Exponent { - get => ref _Handle.AsRef(Schema.GetOffset(0x5256F8E99BCA80C6)); + get => ref _Handle.AsRef(_ExponentOffset.Value); } + private static readonly Lazy _InnerAngleOffset = new(() => Schema.GetOffset(0x5256F8E91D12DC0E), LazyThreadSafetyMode.None); + public ref float InnerAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0x5256F8E91D12DC0E)); + get => ref _Handle.AsRef(_InnerAngleOffset.Value); } + private static readonly Lazy _OuterAngleOffset = new(() => Schema.GetOffset(0x5256F8E9328680EF), LazyThreadSafetyMode.None); + public ref float OuterAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0x5256F8E9328680EF)); + get => ref _Handle.AsRef(_OuterAngleOffset.Value); } + private static readonly Lazy _SpotRadiusOffset = new(() => Schema.GetOffset(0x5256F8E993FBE5BB), LazyThreadSafetyMode.None); + public ref float SpotRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x5256F8E993FBE5BB)); + get => ref _Handle.AsRef(_SpotRadiusOffset.Value); } public void FlagsUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicNavConnectionsVolumeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicNavConnectionsVolumeImpl.cs index 20f8453a3..eb295a8cf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicNavConnectionsVolumeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicNavConnectionsVolumeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,30 +17,44 @@ internal partial class CDynamicNavConnectionsVolumeImpl : CTriggerMultipleImpl, public CDynamicNavConnectionsVolumeImpl(nint handle) : base(handle) { } + private static readonly Lazy _ConnectionTargetOffset = new(() => Schema.GetOffset(0xA03D49DB1120FFE4), LazyThreadSafetyMode.None); + public string ConnectionTarget { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA03D49DB1120FFE4)); + var ptr = _Handle.Read(_ConnectionTargetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA03D49DB1120FFE4, value); + set => Schema.SetString(_Handle, _ConnectionTargetOffset.Value, value); } + private static readonly Lazy _ConnectionsOffset = new(() => Schema.GetOffset(0xA03D49DB11986B7E), LazyThreadSafetyMode.None); + public ref CUtlVector Connections { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA03D49DB11986B7E)); + get => ref _Handle.AsRef>(_ConnectionsOffset.Value); } + private static readonly Lazy _TransitionTypeOffset = new(() => Schema.GetOffset(0xA03D49DB68D65FB9), LazyThreadSafetyMode.None); + public ref CGlobalSymbol TransitionType { - get => ref _Handle.AsRef(Schema.GetOffset(0xA03D49DB68D65FB9)); + get => ref _Handle.AsRef(_TransitionTypeOffset.Value); } + private static readonly Lazy _ConnectionsEnabledOffset = new(() => Schema.GetOffset(0xA03D49DB4C10BC9B), LazyThreadSafetyMode.None); + public ref bool ConnectionsEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xA03D49DB4C10BC9B)); + get => ref _Handle.AsRef(_ConnectionsEnabledOffset.Value); } + private static readonly Lazy _TargetAreaSearchRadiusOffset = new(() => Schema.GetOffset(0xA03D49DBACD0EEE5), LazyThreadSafetyMode.None); + public ref float TargetAreaSearchRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xA03D49DBACD0EEE5)); + get => ref _Handle.AsRef(_TargetAreaSearchRadiusOffset.Value); } + private static readonly Lazy _UpdateDistanceOffset = new(() => Schema.GetOffset(0xA03D49DB46AB2045), LazyThreadSafetyMode.None); + public ref float UpdateDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xA03D49DB46AB2045)); + get => ref _Handle.AsRef(_UpdateDistanceOffset.Value); } + private static readonly Lazy _MaxConnectionDistanceOffset = new(() => Schema.GetOffset(0xA03D49DB7590E3B8), LazyThreadSafetyMode.None); + public ref float MaxConnectionDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xA03D49DB7590E3B8)); + get => ref _Handle.AsRef(_MaxConnectionDistanceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicPropAlias_cable_dynamicImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicPropAlias_cable_dynamicImpl.cs index 2fcb3f476..30dd08a7a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicPropAlias_cable_dynamicImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicPropAlias_cable_dynamicImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicPropAlias_dynamic_propImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicPropAlias_dynamic_propImpl.cs index 1d5f157e4..e5f761216 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicPropAlias_dynamic_propImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicPropAlias_dynamic_propImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicPropAlias_prop_dynamic_overrideImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicPropAlias_prop_dynamic_overrideImpl.cs index d713eb93f..35f3327d2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicPropAlias_prop_dynamic_overrideImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicPropAlias_prop_dynamic_overrideImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicPropImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicPropImpl.cs index ecb29ad29..15fc0e9ae 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicPropImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CDynamicPropImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,75 +17,119 @@ internal partial class CDynamicPropImpl : CBreakablePropImpl, CDynamicProp { public CDynamicPropImpl(nint handle) : base(handle) { } + private static readonly Lazy _CreateNavObstacleOffset = new(() => Schema.GetOffset(0x6A5171A21849970B), LazyThreadSafetyMode.None); + public ref bool CreateNavObstacle { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A5171A21849970B)); + get => ref _Handle.AsRef(_CreateNavObstacleOffset.Value); } + private static readonly Lazy _NavObstacleUpdatesOverriddenOffset = new(() => Schema.GetOffset(0x6A5171A2B1954B9B), LazyThreadSafetyMode.None); + public ref bool NavObstacleUpdatesOverridden { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A5171A2B1954B9B)); + get => ref _Handle.AsRef(_NavObstacleUpdatesOverriddenOffset.Value); } + private static readonly Lazy _UseHitboxesForRenderBoxOffset = new(() => Schema.GetOffset(0x6A5171A2F0B849FA), LazyThreadSafetyMode.None); + public ref bool UseHitboxesForRenderBox { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A5171A2F0B849FA)); + get => ref _Handle.AsRef(_UseHitboxesForRenderBoxOffset.Value); } + private static readonly Lazy _UseAnimGraphOffset = new(() => Schema.GetOffset(0x6A5171A208993DDB), LazyThreadSafetyMode.None); + public ref bool UseAnimGraph { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A5171A208993DDB)); + get => ref _Handle.AsRef(_UseAnimGraphOffset.Value); } + private static readonly Lazy _OutputAnimBegunOffset = new(() => Schema.GetOffset(0x6A5171A28FAC5E08), LazyThreadSafetyMode.None); + public CEntityIOOutput OutputAnimBegun { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x6A5171A28FAC5E08)); + get => new CEntityIOOutputImpl(_Handle + _OutputAnimBegunOffset.Value); } + private static readonly Lazy _OutputAnimOverOffset = new(() => Schema.GetOffset(0x6A5171A2EA12DDC9), LazyThreadSafetyMode.None); + public CEntityIOOutput OutputAnimOver { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x6A5171A2EA12DDC9)); + get => new CEntityIOOutputImpl(_Handle + _OutputAnimOverOffset.Value); } + private static readonly Lazy _OutputAnimLoopCycleOverOffset = new(() => Schema.GetOffset(0x6A5171A2333A0537), LazyThreadSafetyMode.None); + public CEntityIOOutput OutputAnimLoopCycleOver { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x6A5171A2333A0537)); + get => new CEntityIOOutputImpl(_Handle + _OutputAnimLoopCycleOverOffset.Value); } + private static readonly Lazy _OnAnimReachedStartOffset = new(() => Schema.GetOffset(0x6A5171A22545BE4B), LazyThreadSafetyMode.None); + public CEntityIOOutput OnAnimReachedStart { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x6A5171A22545BE4B)); + get => new CEntityIOOutputImpl(_Handle + _OnAnimReachedStartOffset.Value); } + private static readonly Lazy _OnAnimReachedEndOffset = new(() => Schema.GetOffset(0x6A5171A2E4470C0E), LazyThreadSafetyMode.None); + public CEntityIOOutput OnAnimReachedEnd { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x6A5171A2E4470C0E)); + get => new CEntityIOOutputImpl(_Handle + _OnAnimReachedEndOffset.Value); } + private static readonly Lazy _IdleAnimOffset = new(() => Schema.GetOffset(0x6A5171A22885C0E2), LazyThreadSafetyMode.None); + public string IdleAnim { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6A5171A22885C0E2)); + var ptr = _Handle.Read(_IdleAnimOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6A5171A22885C0E2, value); + set => Schema.SetString(_Handle, _IdleAnimOffset.Value, value); } + private static readonly Lazy _IdleAnimLoopModeOffset = new(() => Schema.GetOffset(0x6A5171A2D07822E7), LazyThreadSafetyMode.None); + public ref AnimLoopMode_t IdleAnimLoopMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A5171A2D07822E7)); + get => ref _Handle.AsRef(_IdleAnimLoopModeOffset.Value); } + private static readonly Lazy _RandomizeCycleOffset = new(() => Schema.GetOffset(0x6A5171A247A89442), LazyThreadSafetyMode.None); + public ref bool RandomizeCycle { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A5171A247A89442)); + get => ref _Handle.AsRef(_RandomizeCycleOffset.Value); } + private static readonly Lazy _StartDisabledOffset = new(() => Schema.GetOffset(0x6A5171A261ED0C4F), LazyThreadSafetyMode.None); + public ref bool StartDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A5171A261ED0C4F)); + get => ref _Handle.AsRef(_StartDisabledOffset.Value); } + private static readonly Lazy _FiredStartEndOutputOffset = new(() => Schema.GetOffset(0x6A5171A2B8178D13), LazyThreadSafetyMode.None); + public ref bool FiredStartEndOutput { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A5171A2B8178D13)); + get => ref _Handle.AsRef(_FiredStartEndOutputOffset.Value); } + private static readonly Lazy _ForceNpcExcludeOffset = new(() => Schema.GetOffset(0x6A5171A24194963F), LazyThreadSafetyMode.None); + public ref bool ForceNpcExclude { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A5171A24194963F)); + get => ref _Handle.AsRef(_ForceNpcExcludeOffset.Value); } + private static readonly Lazy _CreateNonSolidOffset = new(() => Schema.GetOffset(0x6A5171A25FFEA7EB), LazyThreadSafetyMode.None); + public ref bool CreateNonSolid { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A5171A25FFEA7EB)); + get => ref _Handle.AsRef(_CreateNonSolidOffset.Value); } + private static readonly Lazy _IsOverridePropOffset = new(() => Schema.GetOffset(0x6A5171A243F03A10), LazyThreadSafetyMode.None); + public ref bool IsOverrideProp { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A5171A243F03A10)); + get => ref _Handle.AsRef(_IsOverridePropOffset.Value); } + private static readonly Lazy _InitialGlowStateOffset = new(() => Schema.GetOffset(0x6A5171A25260376A), LazyThreadSafetyMode.None); + public ref int InitialGlowState { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A5171A25260376A)); + get => ref _Handle.AsRef(_InitialGlowStateOffset.Value); } + private static readonly Lazy _GlowRangeOffset = new(() => Schema.GetOffset(0x6A5171A2D03F97ED), LazyThreadSafetyMode.None); + public ref int GlowRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A5171A2D03F97ED)); + get => ref _Handle.AsRef(_GlowRangeOffset.Value); } + private static readonly Lazy _GlowRangeMinOffset = new(() => Schema.GetOffset(0x6A5171A2A28EDB1F), LazyThreadSafetyMode.None); + public ref int GlowRangeMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A5171A2A28EDB1F)); + get => ref _Handle.AsRef(_GlowRangeMinOffset.Value); } + private static readonly Lazy _GlowColorOffset = new(() => Schema.GetOffset(0x6A5171A274A5EE03), LazyThreadSafetyMode.None); + public ref Color GlowColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A5171A274A5EE03)); + get => ref _Handle.AsRef(_GlowColorOffset.Value); } + private static readonly Lazy _GlowTeamOffset = new(() => Schema.GetOffset(0x6A5171A2E7C1E481), LazyThreadSafetyMode.None); + public ref int GlowTeam { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A5171A2E7C1E481)); + get => ref _Handle.AsRef(_GlowTeamOffset.Value); } public void UseHitboxesForRenderBoxUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEconEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEconEntityImpl.cs index f13611164..757ed4d7e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEconEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEconEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class CEconEntityImpl : CBaseFlexImpl, CEconEntity { public CEconEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _AttributeManagerOffset = new(() => Schema.GetOffset(0xCD91F684537B0586), LazyThreadSafetyMode.None); + public CAttributeContainer AttributeManager { - get => new CAttributeContainerImpl(_Handle + Schema.GetOffset(0xCD91F684537B0586)); + get => new CAttributeContainerImpl(_Handle + _AttributeManagerOffset.Value); } + private static readonly Lazy _OriginalOwnerXuidLowOffset = new(() => Schema.GetOffset(0xCD91F6843C990CE3), LazyThreadSafetyMode.None); + public ref uint OriginalOwnerXuidLow { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD91F6843C990CE3)); + get => ref _Handle.AsRef(_OriginalOwnerXuidLowOffset.Value); } + private static readonly Lazy _OriginalOwnerXuidHighOffset = new(() => Schema.GetOffset(0xCD91F6842628947F), LazyThreadSafetyMode.None); + public ref uint OriginalOwnerXuidHigh { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD91F6842628947F)); + get => ref _Handle.AsRef(_OriginalOwnerXuidHighOffset.Value); } + private static readonly Lazy _FallbackPaintKitOffset = new(() => Schema.GetOffset(0xCD91F6840A12D48F), LazyThreadSafetyMode.None); + public ref int FallbackPaintKit { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD91F6840A12D48F)); + get => ref _Handle.AsRef(_FallbackPaintKitOffset.Value); } + private static readonly Lazy _FallbackSeedOffset = new(() => Schema.GetOffset(0xCD91F684A1B165B2), LazyThreadSafetyMode.None); + public ref int FallbackSeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD91F684A1B165B2)); + get => ref _Handle.AsRef(_FallbackSeedOffset.Value); } + private static readonly Lazy _FallbackWearOffset = new(() => Schema.GetOffset(0xCD91F68486253266), LazyThreadSafetyMode.None); + public ref float FallbackWear { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD91F68486253266)); + get => ref _Handle.AsRef(_FallbackWearOffset.Value); } + private static readonly Lazy _FallbackStatTrakOffset = new(() => Schema.GetOffset(0xCD91F68467ECC1E7), LazyThreadSafetyMode.None); + public ref int FallbackStatTrak { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD91F68467ECC1E7)); + get => ref _Handle.AsRef(_FallbackStatTrakOffset.Value); } + private static readonly Lazy _OldProvideeOffset = new(() => Schema.GetOffset(0xCD91F684289C89E0), LazyThreadSafetyMode.None); + public ref CHandle OldProvidee { - get => ref _Handle.AsRef>(Schema.GetOffset(0xCD91F684289C89E0)); + get => ref _Handle.AsRef>(_OldProvideeOffset.Value); } + private static readonly Lazy _OldOwnerClassOffset = new(() => Schema.GetOffset(0xCD91F684D62FABE8), LazyThreadSafetyMode.None); + public ref int OldOwnerClass { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD91F684D62FABE8)); + get => ref _Handle.AsRef(_OldOwnerClassOffset.Value); } public void AttributeManagerUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEconItemAttributeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEconItemAttributeImpl.cs index e8ec3f50d..c5e2e349c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEconItemAttributeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEconItemAttributeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CEconItemAttributeImpl : SchemaClass, CEconItemAttribute public CEconItemAttributeImpl(nint handle) : base(handle) { } + private static readonly Lazy _AttributeDefinitionIndexOffset = new(() => Schema.GetOffset(0xBB0F80FC8DAFCD73), LazyThreadSafetyMode.None); + public ref ushort AttributeDefinitionIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0F80FC8DAFCD73)); + get => ref _Handle.AsRef(_AttributeDefinitionIndexOffset.Value); } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xBB0F80FC8DFCB984), LazyThreadSafetyMode.None); + public ref float Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0F80FC8DFCB984)); + get => ref _Handle.AsRef(_ValueOffset.Value); } + private static readonly Lazy _InitialValueOffset = new(() => Schema.GetOffset(0xBB0F80FCE2DBFFF2), LazyThreadSafetyMode.None); + public ref float InitialValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0F80FCE2DBFFF2)); + get => ref _Handle.AsRef(_InitialValueOffset.Value); } + private static readonly Lazy _RefundableCurrencyOffset = new(() => Schema.GetOffset(0xBB0F80FC1021E694), LazyThreadSafetyMode.None); + public ref int RefundableCurrency { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0F80FC1021E694)); + get => ref _Handle.AsRef(_RefundableCurrencyOffset.Value); } + private static readonly Lazy _SetBonusOffset = new(() => Schema.GetOffset(0xBB0F80FCA5E9EA96), LazyThreadSafetyMode.None); + public ref bool SetBonus { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0F80FCA5E9EA96)); + get => ref _Handle.AsRef(_SetBonusOffset.Value); } public void AttributeDefinitionIndexUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEconItemViewImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEconItemViewImpl.cs index 9c1ad0a19..e73e039cd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEconItemViewImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEconItemViewImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,52 +17,78 @@ internal partial class CEconItemViewImpl : IEconItemInterfaceImpl, CEconItemView public CEconItemViewImpl(nint handle) : base(handle) { } + private static readonly Lazy _ItemDefinitionIndexOffset = new(() => Schema.GetOffset(0xE1A93F25A2CCB41A), LazyThreadSafetyMode.None); + public ref ushort ItemDefinitionIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1A93F25A2CCB41A)); + get => ref _Handle.AsRef(_ItemDefinitionIndexOffset.Value); } + private static readonly Lazy _EntityQualityOffset = new(() => Schema.GetOffset(0xE1A93F256A67D4C4), LazyThreadSafetyMode.None); + public ref int EntityQuality { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1A93F256A67D4C4)); + get => ref _Handle.AsRef(_EntityQualityOffset.Value); } + private static readonly Lazy _EntityLevelOffset = new(() => Schema.GetOffset(0xE1A93F2555EF3B5F), LazyThreadSafetyMode.None); + public ref uint EntityLevel { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1A93F2555EF3B5F)); + get => ref _Handle.AsRef(_EntityLevelOffset.Value); } + private static readonly Lazy _ItemIDOffset = new(() => Schema.GetOffset(0xE1A93F2534B55816), LazyThreadSafetyMode.None); + public ref ulong ItemID { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1A93F2534B55816)); + get => ref _Handle.AsRef(_ItemIDOffset.Value); } + private static readonly Lazy _ItemIDHighOffset = new(() => Schema.GetOffset(0xE1A93F25373EE446), LazyThreadSafetyMode.None); + public ref uint ItemIDHigh { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1A93F25373EE446)); + get => ref _Handle.AsRef(_ItemIDHighOffset.Value); } + private static readonly Lazy _ItemIDLowOffset = new(() => Schema.GetOffset(0xE1A93F250DF29C2C), LazyThreadSafetyMode.None); + public ref uint ItemIDLow { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1A93F250DF29C2C)); + get => ref _Handle.AsRef(_ItemIDLowOffset.Value); } + private static readonly Lazy _AccountIDOffset = new(() => Schema.GetOffset(0xE1A93F25C65DE986), LazyThreadSafetyMode.None); + public ref uint AccountID { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1A93F25C65DE986)); + get => ref _Handle.AsRef(_AccountIDOffset.Value); } + private static readonly Lazy _InventoryPositionOffset = new(() => Schema.GetOffset(0xE1A93F2592F42873), LazyThreadSafetyMode.None); + public ref uint InventoryPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1A93F2592F42873)); + get => ref _Handle.AsRef(_InventoryPositionOffset.Value); } + private static readonly Lazy _InitializedOffset = new(() => Schema.GetOffset(0xE1A93F250710ABDD), LazyThreadSafetyMode.None); + public ref bool Initialized { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1A93F250710ABDD)); + get => ref _Handle.AsRef(_InitializedOffset.Value); } + private static readonly Lazy _AttributeListOffset = new(() => Schema.GetOffset(0xE1A93F25EF065D97), LazyThreadSafetyMode.None); + public CAttributeList AttributeList { - get => new CAttributeListImpl(_Handle + Schema.GetOffset(0xE1A93F25EF065D97)); + get => new CAttributeListImpl(_Handle + _AttributeListOffset.Value); } + private static readonly Lazy _NetworkedDynamicAttributesOffset = new(() => Schema.GetOffset(0xE1A93F25B576449C), LazyThreadSafetyMode.None); + public CAttributeList NetworkedDynamicAttributes { - get => new CAttributeListImpl(_Handle + Schema.GetOffset(0xE1A93F25B576449C)); + get => new CAttributeListImpl(_Handle + _NetworkedDynamicAttributesOffset.Value); } + private static readonly Lazy _CustomNameOffset = new(() => Schema.GetOffset(0xE1A93F25AFD12EE8), LazyThreadSafetyMode.None); + public string CustomName { get { - var ptr = _Handle + Schema.GetOffset(0xE1A93F25AFD12EE8); + var ptr = _Handle + _CustomNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xE1A93F25AFD12EE8, value, 161); + set => Schema.SetFixedString(_Handle, _CustomNameOffset.Value, value, 161); } + private static readonly Lazy _CustomNameOverrideOffset = new(() => Schema.GetOffset(0xE1A93F25A74A6ED8), LazyThreadSafetyMode.None); + public string CustomNameOverride { get { - var ptr = _Handle + Schema.GetOffset(0xE1A93F25A74A6ED8); + var ptr = _Handle + _CustomNameOverrideOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xE1A93F25A74A6ED8, value, 161); + set => Schema.SetFixedString(_Handle, _CustomNameOverrideOffset.Value, value, 161); } public void ItemDefinitionIndexUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEconWearableImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEconWearableImpl.cs index 9134fce5a..0ef569b27 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEconWearableImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEconWearableImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CEconWearableImpl : CEconEntityImpl, CEconWearable { public CEconWearableImpl(nint handle) : base(handle) { } + private static readonly Lazy _ForceSkinOffset = new(() => Schema.GetOffset(0x491C03F4E5817B39), LazyThreadSafetyMode.None); + public ref int ForceSkin { - get => ref _Handle.AsRef(Schema.GetOffset(0x491C03F4E5817B39)); + get => ref _Handle.AsRef(_ForceSkinOffset.Value); } + private static readonly Lazy _AlwaysAllowOffset = new(() => Schema.GetOffset(0x491C03F4AD06B805), LazyThreadSafetyMode.None); + public ref bool AlwaysAllow { - get => ref _Handle.AsRef(Schema.GetOffset(0x491C03F4AD06B805)); + get => ref _Handle.AsRef(_AlwaysAllowOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEditableMotionGraphImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEditableMotionGraphImpl.cs index 00bc9f634..6702a15b7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEditableMotionGraphImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEditableMotionGraphImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEffectDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEffectDataImpl.cs index b3c1b4f25..d148a6dd1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEffectDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEffectDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,68 +17,110 @@ internal partial class CEffectDataImpl : SchemaClass, CEffectData { public CEffectDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _OriginOffset = new(() => Schema.GetOffset(0x15CC7C67F26E589B), LazyThreadSafetyMode.None); + public ref Vector Origin { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CC7C67F26E589B)); + get => ref _Handle.AsRef(_OriginOffset.Value); } + private static readonly Lazy _StartOffset = new(() => Schema.GetOffset(0x15CC7C67C222DFCB), LazyThreadSafetyMode.None); + public ref Vector Start { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CC7C67C222DFCB)); + get => ref _Handle.AsRef(_StartOffset.Value); } + private static readonly Lazy _NormalOffset = new(() => Schema.GetOffset(0x15CC7C67AFB36E96), LazyThreadSafetyMode.None); + public ref Vector Normal { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CC7C67AFB36E96)); + get => ref _Handle.AsRef(_NormalOffset.Value); } + private static readonly Lazy _AnglesOffset = new(() => Schema.GetOffset(0x15CC7C675658D555), LazyThreadSafetyMode.None); + public ref QAngle Angles { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CC7C675658D555)); + get => ref _Handle.AsRef(_AnglesOffset.Value); } + private static readonly Lazy _EntityOffset = new(() => Schema.GetOffset(0x15CC7C676EBADCB0), LazyThreadSafetyMode.None); + public ref CHandle Entity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x15CC7C676EBADCB0)); + get => ref _Handle.AsRef>(_EntityOffset.Value); } + private static readonly Lazy _OtherEntityOffset = new(() => Schema.GetOffset(0x15CC7C671E22FE7C), LazyThreadSafetyMode.None); + public ref CHandle OtherEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x15CC7C671E22FE7C)); + get => ref _Handle.AsRef>(_OtherEntityOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x15CC7C67B731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CC7C67B731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _MagnitudeOffset = new(() => Schema.GetOffset(0x15CC7C67ED0A1D8B), LazyThreadSafetyMode.None); + public ref float Magnitude { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CC7C67ED0A1D8B)); + get => ref _Handle.AsRef(_MagnitudeOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x15CC7C675ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CC7C675ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _SurfacePropOffset = new(() => Schema.GetOffset(0x15CC7C6765676439), LazyThreadSafetyMode.None); + public ref CUtlStringToken SurfaceProp { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CC7C6765676439)); + get => ref _Handle.AsRef(_SurfacePropOffset.Value); } + private static readonly Lazy _EffectIndexOffset = new(() => Schema.GetOffset(0x15CC7C678EBB71E4), LazyThreadSafetyMode.None); + public SchemaUntypedField EffectIndex { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x15CC7C678EBB71E4)); + get => new SchemaUntypedField(_Handle + _EffectIndexOffset.Value); } + private static readonly Lazy _DamageTypeOffset = new(() => Schema.GetOffset(0x15CC7C67A9599F54), LazyThreadSafetyMode.None); + public ref uint DamageType { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CC7C67A9599F54)); + get => ref _Handle.AsRef(_DamageTypeOffset.Value); } + private static readonly Lazy _PenetrateOffset = new(() => Schema.GetOffset(0x15CC7C673A561927), LazyThreadSafetyMode.None); + public ref byte Penetrate { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CC7C673A561927)); + get => ref _Handle.AsRef(_PenetrateOffset.Value); } + private static readonly Lazy _MaterialOffset = new(() => Schema.GetOffset(0x15CC7C67F766BC9C), LazyThreadSafetyMode.None); + public ref ushort Material { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CC7C67F766BC9C)); + get => ref _Handle.AsRef(_MaterialOffset.Value); } + private static readonly Lazy _HitBoxOffset = new(() => Schema.GetOffset(0x15CC7C670B0E1E13), LazyThreadSafetyMode.None); + public ref short HitBox { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CC7C670B0E1E13)); + get => ref _Handle.AsRef(_HitBoxOffset.Value); } + private static readonly Lazy _ColorOffset = new(() => Schema.GetOffset(0x15CC7C6756C9DB94), LazyThreadSafetyMode.None); + public ref byte Color { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CC7C6756C9DB94)); + get => ref _Handle.AsRef(_ColorOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x15CC7C67A4A37590), LazyThreadSafetyMode.None); + public ref byte Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CC7C67A4A37590)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _AttachmentIndexOffset = new(() => Schema.GetOffset(0x15CC7C677A529580), LazyThreadSafetyMode.None); + public AttachmentHandle_t AttachmentIndex { - get => new AttachmentHandle_tImpl(_Handle + Schema.GetOffset(0x15CC7C677A529580)); + get => new AttachmentHandle_tImpl(_Handle + _AttachmentIndexOffset.Value); } + private static readonly Lazy _AttachmentNameOffset = new(() => Schema.GetOffset(0x15CC7C677C04923F), LazyThreadSafetyMode.None); + public ref CUtlStringToken AttachmentName { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CC7C677C04923F)); + get => ref _Handle.AsRef(_AttachmentNameOffset.Value); } + private static readonly Lazy _EffectNameOffset = new(() => Schema.GetOffset(0x15CC7C67B614AEAE), LazyThreadSafetyMode.None); + public ref ushort EffectName { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CC7C67B614AEAE)); + get => ref _Handle.AsRef(_EffectNameOffset.Value); } + private static readonly Lazy _ExplosionTypeOffset = new(() => Schema.GetOffset(0x15CC7C67D39F3394), LazyThreadSafetyMode.None); + public ref byte ExplosionType { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CC7C67D39F3394)); + get => ref _Handle.AsRef(_ExplosionTypeOffset.Value); } public void OriginUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEmitTagActionUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEmitTagActionUpdaterImpl.cs index ece0fecb3..e85d18da3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEmitTagActionUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEmitTagActionUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CEmitTagActionUpdaterImpl : CAnimActionUpdaterImpl, CEmit public CEmitTagActionUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _TagIndexOffset = new(() => Schema.GetOffset(0x13C6F616C2026AAD), LazyThreadSafetyMode.None); + public ref int TagIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x13C6F616C2026AAD)); + get => ref _Handle.AsRef(_TagIndexOffset.Value); } + private static readonly Lazy _IsZeroDurationOffset = new(() => Schema.GetOffset(0x13C6F61604008747), LazyThreadSafetyMode.None); + public ref bool IsZeroDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x13C6F61604008747)); + get => ref _Handle.AsRef(_IsZeroDurationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEmptyEntityInstanceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEmptyEntityInstanceImpl.cs index ab92a60f2..3164116f8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEmptyEntityInstanceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEmptyEntityInstanceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnableMotionFixupImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnableMotionFixupImpl.cs index 6dd38f69e..43a749e8d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnableMotionFixupImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnableMotionFixupImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityBlockerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityBlockerImpl.cs index 97fa124c5..6c6cbdd01 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityBlockerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityBlockerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityComponentHelperImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityComponentHelperImpl.cs index 44c2bbede..02b4ec5b6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityComponentHelperImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityComponentHelperImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class CEntityComponentHelperImpl : SchemaClass, CEntityComponen public CEntityComponentHelperImpl(nint handle) : base(handle) { } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x714DB384DC74A14C), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x714DB384DC74A14C)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _InfoOffset = new(() => Schema.GetOffset(0x714DB3840F0BFD1B), LazyThreadSafetyMode.None); + public EntComponentInfo_t? Info { get { - var ptr = _Handle.Read(Schema.GetOffset(0x714DB3840F0BFD1B)); + var ptr = _Handle.Read(_InfoOffset.Value); return ptr.IsValidPtr() ? new EntComponentInfo_tImpl(ptr) : null; } } + private static readonly Lazy _PriorityOffset = new(() => Schema.GetOffset(0x714DB384E7EFB335), LazyThreadSafetyMode.None); + public ref int Priority { - get => ref _Handle.AsRef(Schema.GetOffset(0x714DB384E7EFB335)); + get => ref _Handle.AsRef(_PriorityOffset.Value); } + private static readonly Lazy _NextOffset = new(() => Schema.GetOffset(0x714DB38432B11E0E), LazyThreadSafetyMode.None); + public CEntityComponentHelper? Next { get { - var ptr = _Handle.Read(Schema.GetOffset(0x714DB38432B11E0E)); + var ptr = _Handle.Read(_NextOffset.Value); return ptr.IsValidPtr() ? new CEntityComponentHelperImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityComponentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityComponentImpl.cs index 8e03157d5..eb525c616 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityComponentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityComponentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityDissolveImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityDissolveImpl.cs index 35b2954c8..03af633ef 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityDissolveImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityDissolveImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class CEntityDissolveImpl : CBaseModelEntityImpl, CEntityDissol public CEntityDissolveImpl(nint handle) : base(handle) { } + private static readonly Lazy _FadeInStartOffset = new(() => Schema.GetOffset(0x443F205EF5AD2D6A), LazyThreadSafetyMode.None); + public ref float FadeInStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x443F205EF5AD2D6A)); + get => ref _Handle.AsRef(_FadeInStartOffset.Value); } + private static readonly Lazy _FadeInLengthOffset = new(() => Schema.GetOffset(0x443F205E74538EE6), LazyThreadSafetyMode.None); + public ref float FadeInLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x443F205E74538EE6)); + get => ref _Handle.AsRef(_FadeInLengthOffset.Value); } + private static readonly Lazy _FadeOutModelStartOffset = new(() => Schema.GetOffset(0x443F205E9C8AC6F4), LazyThreadSafetyMode.None); + public ref float FadeOutModelStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x443F205E9C8AC6F4)); + get => ref _Handle.AsRef(_FadeOutModelStartOffset.Value); } + private static readonly Lazy _FadeOutModelLengthOffset = new(() => Schema.GetOffset(0x443F205E6FC0EC34), LazyThreadSafetyMode.None); + public ref float FadeOutModelLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x443F205E6FC0EC34)); + get => ref _Handle.AsRef(_FadeOutModelLengthOffset.Value); } + private static readonly Lazy _FadeOutStartOffset = new(() => Schema.GetOffset(0x443F205E3F5B2209), LazyThreadSafetyMode.None); + public ref float FadeOutStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x443F205E3F5B2209)); + get => ref _Handle.AsRef(_FadeOutStartOffset.Value); } + private static readonly Lazy _FadeOutLengthOffset = new(() => Schema.GetOffset(0x443F205E9D0749A3), LazyThreadSafetyMode.None); + public ref float FadeOutLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x443F205E9D0749A3)); + get => ref _Handle.AsRef(_FadeOutLengthOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0x443F205E67FE9DC4), LazyThreadSafetyMode.None); + public GameTime_t StartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x443F205E67FE9DC4)); + get => new GameTime_tImpl(_Handle + _StartTimeOffset.Value); } + private static readonly Lazy _DissolveTypeOffset = new(() => Schema.GetOffset(0x443F205E79AB525E), LazyThreadSafetyMode.None); + public ref EntityDisolveType_t DissolveType { - get => ref _Handle.AsRef(Schema.GetOffset(0x443F205E79AB525E)); + get => ref _Handle.AsRef(_DissolveTypeOffset.Value); } + private static readonly Lazy _DissolverOriginOffset = new(() => Schema.GetOffset(0x443F205E34A16EE6), LazyThreadSafetyMode.None); + public ref Vector DissolverOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0x443F205E34A16EE6)); + get => ref _Handle.AsRef(_DissolverOriginOffset.Value); } + private static readonly Lazy _MagnitudeOffset = new(() => Schema.GetOffset(0x443F205E0C71BDF1), LazyThreadSafetyMode.None); + public ref uint Magnitude { - get => ref _Handle.AsRef(Schema.GetOffset(0x443F205E0C71BDF1)); + get => ref _Handle.AsRef(_MagnitudeOffset.Value); } public void FadeInStartUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityFlameImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityFlameImpl.cs index 4f0a1b39a..851e47931 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityFlameImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityFlameImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class CEntityFlameImpl : CBaseEntityImpl, CEntityFlame { public CEntityFlameImpl(nint handle) : base(handle) { } + private static readonly Lazy _EntAttachedOffset = new(() => Schema.GetOffset(0x386F199409F89DF0), LazyThreadSafetyMode.None); + public ref CHandle EntAttached { - get => ref _Handle.AsRef>(Schema.GetOffset(0x386F199409F89DF0)); + get => ref _Handle.AsRef>(_EntAttachedOffset.Value); } + private static readonly Lazy _CheapEffectOffset = new(() => Schema.GetOffset(0x386F1994DF421B51), LazyThreadSafetyMode.None); + public ref bool CheapEffect { - get => ref _Handle.AsRef(Schema.GetOffset(0x386F1994DF421B51)); + get => ref _Handle.AsRef(_CheapEffectOffset.Value); } + private static readonly Lazy _SizeOffset = new(() => Schema.GetOffset(0x386F19944CF0EBC6), LazyThreadSafetyMode.None); + public ref float Size { - get => ref _Handle.AsRef(Schema.GetOffset(0x386F19944CF0EBC6)); + get => ref _Handle.AsRef(_SizeOffset.Value); } + private static readonly Lazy _UseHitboxesOffset = new(() => Schema.GetOffset(0x386F19948C5BFEBE), LazyThreadSafetyMode.None); + public ref bool UseHitboxes { - get => ref _Handle.AsRef(Schema.GetOffset(0x386F19948C5BFEBE)); + get => ref _Handle.AsRef(_UseHitboxesOffset.Value); } + private static readonly Lazy _NumHitboxFiresOffset = new(() => Schema.GetOffset(0x386F199457E3580B), LazyThreadSafetyMode.None); + public ref int NumHitboxFires { - get => ref _Handle.AsRef(Schema.GetOffset(0x386F199457E3580B)); + get => ref _Handle.AsRef(_NumHitboxFiresOffset.Value); } + private static readonly Lazy _HitboxFireScaleOffset = new(() => Schema.GetOffset(0x386F19942AD17519), LazyThreadSafetyMode.None); + public ref float HitboxFireScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x386F19942AD17519)); + get => ref _Handle.AsRef(_HitboxFireScaleOffset.Value); } + private static readonly Lazy _LifetimeOffset = new(() => Schema.GetOffset(0x386F199439B35564), LazyThreadSafetyMode.None); + public GameTime_t Lifetime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x386F199439B35564)); + get => new GameTime_tImpl(_Handle + _LifetimeOffset.Value); } + private static readonly Lazy _AttackerOffset = new(() => Schema.GetOffset(0x386F199468573D54), LazyThreadSafetyMode.None); + public ref CHandle Attacker { - get => ref _Handle.AsRef>(Schema.GetOffset(0x386F199468573D54)); + get => ref _Handle.AsRef>(_AttackerOffset.Value); } + private static readonly Lazy _DirectDamagePerSecondOffset = new(() => Schema.GetOffset(0x386F199482A435AE), LazyThreadSafetyMode.None); + public ref float DirectDamagePerSecond { - get => ref _Handle.AsRef(Schema.GetOffset(0x386F199482A435AE)); + get => ref _Handle.AsRef(_DirectDamagePerSecondOffset.Value); } + private static readonly Lazy _CustomDamageTypeOffset = new(() => Schema.GetOffset(0x386F1994E0A58F6E), LazyThreadSafetyMode.None); + public ref int CustomDamageType { - get => ref _Handle.AsRef(Schema.GetOffset(0x386F1994E0A58F6E)); + get => ref _Handle.AsRef(_CustomDamageTypeOffset.Value); } public void EntAttachedUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityIOOutputImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityIOOutputImpl.cs index 789124e53..013dbabc5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityIOOutputImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityIOOutputImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CEntityIOOutputImpl : SchemaClass, CEntityIOOutput { public CEntityIOOutputImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xCD5B084DCB0894A), LazyThreadSafetyMode.None); + public SchemaUntypedField Value { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xCD5B084DCB0894A)); + get => new SchemaUntypedField(_Handle + _ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityIdentityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityIdentityImpl.cs index 682bb9b9d..005614820 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityIdentityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityIdentityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,56 +17,78 @@ internal partial class CEntityIdentityImpl : SchemaClass, CEntityIdentity { public CEntityIdentityImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameStringableIndexOffset = new(() => Schema.GetOffset(0xAE42345F9A4938C9), LazyThreadSafetyMode.None); + public ref int NameStringableIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xAE42345F9A4938C9)); + get => ref _Handle.AsRef(_NameStringableIndexOffset.Value); } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xAE42345F4D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xAE42345F4D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xAE42345F4D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _DesignerNameOffset = new(() => Schema.GetOffset(0xAE42345FBFC1F33F), LazyThreadSafetyMode.None); + public string DesignerName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xAE42345FBFC1F33F)); + var ptr = _Handle.Read(_DesignerNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xAE42345FBFC1F33F, value); + set => Schema.SetString(_Handle, _DesignerNameOffset.Value, value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0xAE42345FDC74A14C), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0xAE42345FDC74A14C)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _WorldGroupIdOffset = new(() => Schema.GetOffset(0xAE42345F0BECFAC7), LazyThreadSafetyMode.None); + public ref uint WorldGroupId { - get => ref _Handle.AsRef(Schema.GetOffset(0xAE42345F0BECFAC7)); + get => ref _Handle.AsRef(_WorldGroupIdOffset.Value); } + private static readonly Lazy _DataObjectTypesOffset = new(() => Schema.GetOffset(0xAE42345F6C7E475F), LazyThreadSafetyMode.None); + public ref uint DataObjectTypes { - get => ref _Handle.AsRef(Schema.GetOffset(0xAE42345F6C7E475F)); + get => ref _Handle.AsRef(_DataObjectTypesOffset.Value); } + private static readonly Lazy _PathIndexOffset = new(() => Schema.GetOffset(0xAE42345F2DA3F47A), LazyThreadSafetyMode.None); + public ref ChangeAccessorFieldPathIndex_t PathIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xAE42345F2DA3F47A)); + get => ref _Handle.AsRef(_PathIndexOffset.Value); } + private static readonly Lazy _PrevOffset = new(() => Schema.GetOffset(0xAE42345FD49AD9AA), LazyThreadSafetyMode.None); + public CEntityIdentity? Prev { get { - var ptr = _Handle.Read(Schema.GetOffset(0xAE42345FD49AD9AA)); + var ptr = _Handle.Read(_PrevOffset.Value); return ptr.IsValidPtr() ? new CEntityIdentityImpl(ptr) : null; } } + private static readonly Lazy _NextOffset = new(() => Schema.GetOffset(0xAE42345F32B11E0E), LazyThreadSafetyMode.None); + public CEntityIdentity? Next { get { - var ptr = _Handle.Read(Schema.GetOffset(0xAE42345F32B11E0E)); + var ptr = _Handle.Read(_NextOffset.Value); return ptr.IsValidPtr() ? new CEntityIdentityImpl(ptr) : null; } } + private static readonly Lazy _PrevByClassOffset = new(() => Schema.GetOffset(0xAE42345F1F46E9A5), LazyThreadSafetyMode.None); + public CEntityIdentity? PrevByClass { get { - var ptr = _Handle.Read(Schema.GetOffset(0xAE42345F1F46E9A5)); + var ptr = _Handle.Read(_PrevByClassOffset.Value); return ptr.IsValidPtr() ? new CEntityIdentityImpl(ptr) : null; } } + private static readonly Lazy _NextByClassOffset = new(() => Schema.GetOffset(0xAE42345F908D6209), LazyThreadSafetyMode.None); + public CEntityIdentity? NextByClass { get { - var ptr = _Handle.Read(Schema.GetOffset(0xAE42345F908D6209)); + var ptr = _Handle.Read(_NextByClassOffset.Value); return ptr.IsValidPtr() ? new CEntityIdentityImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityInstanceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityInstanceImpl.cs index 02d2a61af..91aa188b8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityInstanceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntityInstanceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,22 +17,28 @@ internal partial class CEntityInstanceImpl : SchemaClass, CEntityInstance { public CEntityInstanceImpl(nint handle) : base(handle) { } + private static readonly Lazy _PrivateVScriptsOffset = new(() => Schema.GetOffset(0xB6DD442EB087F3B2), LazyThreadSafetyMode.None); + public string PrivateVScripts { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB6DD442EB087F3B2)); + var ptr = _Handle.Read(_PrivateVScriptsOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB6DD442EB087F3B2, value); + set => Schema.SetString(_Handle, _PrivateVScriptsOffset.Value, value); } + private static readonly Lazy _EntityOffset = new(() => Schema.GetOffset(0xB6DD442EA8A45978), LazyThreadSafetyMode.None); + public CEntityIdentity? Entity { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB6DD442EA8A45978)); + var ptr = _Handle.Read(_EntityOffset.Value); return ptr.IsValidPtr() ? new CEntityIdentityImpl(ptr) : null; } } + private static readonly Lazy _CScriptComponentOffset = new(() => Schema.GetOffset(0xB6DD442E3F4202B4), LazyThreadSafetyMode.None); + public CScriptComponent? CScriptComponent { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB6DD442E3F4202B4)); + var ptr = _Handle.Read(_CScriptComponentOffset.Value); return ptr.IsValidPtr() ? new CScriptComponentImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntitySubclassVDataBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntitySubclassVDataBaseImpl.cs index dc7acb4de..5a12d59ed 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntitySubclassVDataBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEntitySubclassVDataBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnumAnimParameterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnumAnimParameterImpl.cs index a420ef631..3429246f7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnumAnimParameterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnumAnimParameterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CEnumAnimParameterImpl : CConcreteAnimParameterImpl, CEnu public CEnumAnimParameterImpl(nint handle) : base(handle) { } + private static readonly Lazy _DefaultValueOffset = new(() => Schema.GetOffset(0xCCD4BF1DBBE0341F), LazyThreadSafetyMode.None); + public ref byte DefaultValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xCCD4BF1DBBE0341F)); + get => ref _Handle.AsRef(_DefaultValueOffset.Value); } + private static readonly Lazy _EnumOptionsOffset = new(() => Schema.GetOffset(0xCCD4BF1D5A08D71E), LazyThreadSafetyMode.None); + public ref CUtlVector EnumOptions { - get => ref _Handle.AsRef>(Schema.GetOffset(0xCCD4BF1D5A08D71E)); + get => ref _Handle.AsRef>(_EnumOptionsOffset.Value); } + private static readonly Lazy _EnumReferencedOffset = new(() => Schema.GetOffset(0xCCD4BF1D5C66779B), LazyThreadSafetyMode.None); + public ref CUtlVector EnumReferenced { - get => ref _Handle.AsRef>(Schema.GetOffset(0xCCD4BF1D5C66779B)); + get => ref _Handle.AsRef>(_EnumReferencedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvBeamImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvBeamImpl.cs index 4ab06fcc4..4e2f93cd6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvBeamImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvBeamImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,82 +17,120 @@ internal partial class CEnvBeamImpl : CBeamImpl, CEnvBeam { public CEnvBeamImpl(nint handle) : base(handle) { } + private static readonly Lazy _ActiveOffset = new(() => Schema.GetOffset(0x84C6714A8E29CBCF), LazyThreadSafetyMode.None); + public ref int Active { - get => ref _Handle.AsRef(Schema.GetOffset(0x84C6714A8E29CBCF)); + get => ref _Handle.AsRef(_ActiveOffset.Value); } + private static readonly Lazy _SpriteTextureOffset = new(() => Schema.GetOffset(0x84C6714A095DE4B7), LazyThreadSafetyMode.None); + public ref CStrongHandle SpriteTexture { - get => ref _Handle.AsRef>(Schema.GetOffset(0x84C6714A095DE4B7)); + get => ref _Handle.AsRef>(_SpriteTextureOffset.Value); } + private static readonly Lazy _StartEntityOffset = new(() => Schema.GetOffset(0x84C6714AA162CA40), LazyThreadSafetyMode.None); + public string StartEntity { get { - var ptr = _Handle.Read(Schema.GetOffset(0x84C6714AA162CA40)); + var ptr = _Handle.Read(_StartEntityOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x84C6714AA162CA40, value); + set => Schema.SetString(_Handle, _StartEntityOffset.Value, value); } + private static readonly Lazy _EndEntityOffset = new(() => Schema.GetOffset(0x84C6714A636BA021), LazyThreadSafetyMode.None); + public string EndEntity { get { - var ptr = _Handle.Read(Schema.GetOffset(0x84C6714A636BA021)); + var ptr = _Handle.Read(_EndEntityOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x84C6714A636BA021, value); + set => Schema.SetString(_Handle, _EndEntityOffset.Value, value); } + private static readonly Lazy _LifeOffset = new(() => Schema.GetOffset(0x84C6714AA5A4067F), LazyThreadSafetyMode.None); + public ref float Life { - get => ref _Handle.AsRef(Schema.GetOffset(0x84C6714AA5A4067F)); + get => ref _Handle.AsRef(_LifeOffset.Value); } + private static readonly Lazy _BoltWidthOffset = new(() => Schema.GetOffset(0x84C6714A165169F2), LazyThreadSafetyMode.None); + public ref float BoltWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0x84C6714A165169F2)); + get => ref _Handle.AsRef(_BoltWidthOffset.Value); } + private static readonly Lazy _NoiseAmplitudeOffset = new(() => Schema.GetOffset(0x84C6714A414FFA76), LazyThreadSafetyMode.None); + public ref float NoiseAmplitude { - get => ref _Handle.AsRef(Schema.GetOffset(0x84C6714A414FFA76)); + get => ref _Handle.AsRef(_NoiseAmplitudeOffset.Value); } + private static readonly Lazy _SpeedOffset = new(() => Schema.GetOffset(0x84C6714AA4BD35A0), LazyThreadSafetyMode.None); + public ref int Speed { - get => ref _Handle.AsRef(Schema.GetOffset(0x84C6714AA4BD35A0)); + get => ref _Handle.AsRef(_SpeedOffset.Value); } + private static readonly Lazy _RestrikeOffset = new(() => Schema.GetOffset(0x84C6714A4647E3AA), LazyThreadSafetyMode.None); + public ref float Restrike { - get => ref _Handle.AsRef(Schema.GetOffset(0x84C6714A4647E3AA)); + get => ref _Handle.AsRef(_RestrikeOffset.Value); } + private static readonly Lazy _SpriteNameOffset = new(() => Schema.GetOffset(0x84C6714A096530FF), LazyThreadSafetyMode.None); + public string SpriteName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x84C6714A096530FF)); + var ptr = _Handle.Read(_SpriteNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x84C6714A096530FF, value); + set => Schema.SetString(_Handle, _SpriteNameOffset.Value, value); } + private static readonly Lazy _FrameStartOffset = new(() => Schema.GetOffset(0x84C6714ABA4C58E6), LazyThreadSafetyMode.None); + public ref int FrameStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x84C6714ABA4C58E6)); + get => ref _Handle.AsRef(_FrameStartOffset.Value); } + private static readonly Lazy _EndPointWorldOffset = new(() => Schema.GetOffset(0x84C6714ADCC233A4), LazyThreadSafetyMode.None); + public ref Vector EndPointWorld { - get => ref _Handle.AsRef(Schema.GetOffset(0x84C6714ADCC233A4)); + get => ref _Handle.AsRef(_EndPointWorldOffset.Value); } + private static readonly Lazy _EndPointRelativeOffset = new(() => Schema.GetOffset(0x84C6714AA25C0E48), LazyThreadSafetyMode.None); + public ref Vector EndPointRelative { - get => ref _Handle.AsRef(Schema.GetOffset(0x84C6714AA25C0E48)); + get => ref _Handle.AsRef(_EndPointRelativeOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x84C6714AA921CA53), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x84C6714AA921CA53)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _TouchTypeOffset = new(() => Schema.GetOffset(0x84C6714A159DBEB0), LazyThreadSafetyMode.None); + public ref Touch_t TouchType { - get => ref _Handle.AsRef(Schema.GetOffset(0x84C6714A159DBEB0)); + get => ref _Handle.AsRef(_TouchTypeOffset.Value); } + private static readonly Lazy _FilterNameOffset = new(() => Schema.GetOffset(0x84C6714A09C86445), LazyThreadSafetyMode.None); + public string FilterName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x84C6714A09C86445)); + var ptr = _Handle.Read(_FilterNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x84C6714A09C86445, value); + set => Schema.SetString(_Handle, _FilterNameOffset.Value, value); } + private static readonly Lazy _FilterOffset = new(() => Schema.GetOffset(0x84C6714A45D9E0B1), LazyThreadSafetyMode.None); + public ref CHandle Filter { - get => ref _Handle.AsRef>(Schema.GetOffset(0x84C6714A45D9E0B1)); + get => ref _Handle.AsRef>(_FilterOffset.Value); } + private static readonly Lazy _DecalOffset = new(() => Schema.GetOffset(0x84C6714AC8536FA6), LazyThreadSafetyMode.None); + public string Decal { get { - var ptr = _Handle.Read(Schema.GetOffset(0x84C6714AC8536FA6)); + var ptr = _Handle.Read(_DecalOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x84C6714AC8536FA6, value); + set => Schema.SetString(_Handle, _DecalOffset.Value, value); } + private static readonly Lazy _OnTouchedByEntityOffset = new(() => Schema.GetOffset(0x84C6714ACB930C48), LazyThreadSafetyMode.None); + public CEntityIOOutput OnTouchedByEntity { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x84C6714ACB930C48)); + get => new CEntityIOOutputImpl(_Handle + _OnTouchedByEntityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvBeverageImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvBeverageImpl.cs index 4cf7e3f90..bfed13d6c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvBeverageImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvBeverageImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CEnvBeverageImpl : CBaseEntityImpl, CEnvBeverage { public CEnvBeverageImpl(nint handle) : base(handle) { } + private static readonly Lazy _CanInDispenserOffset = new(() => Schema.GetOffset(0x205E38FCDFB6F3B5), LazyThreadSafetyMode.None); + public ref bool CanInDispenser { - get => ref _Handle.AsRef(Schema.GetOffset(0x205E38FCDFB6F3B5)); + get => ref _Handle.AsRef(_CanInDispenserOffset.Value); } + private static readonly Lazy _BeverageTypeOffset = new(() => Schema.GetOffset(0x205E38FC694E74C8), LazyThreadSafetyMode.None); + public ref int BeverageType { - get => ref _Handle.AsRef(Schema.GetOffset(0x205E38FC694E74C8)); + get => ref _Handle.AsRef(_BeverageTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCombinedLightProbeVolumeAlias_func_combined_light_probe_volumeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCombinedLightProbeVolumeAlias_func_combined_light_probe_volumeImpl.cs index 6cbe35c2a..83347093e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCombinedLightProbeVolumeAlias_func_combined_light_probe_volumeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCombinedLightProbeVolumeAlias_func_combined_light_probe_volumeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCombinedLightProbeVolumeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCombinedLightProbeVolumeImpl.cs index 17f7f8c25..5c1f2f950 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCombinedLightProbeVolumeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCombinedLightProbeVolumeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,92 +17,150 @@ internal partial class CEnvCombinedLightProbeVolumeImpl : CBaseEntityImpl, CEnvC public CEnvCombinedLightProbeVolumeImpl(nint handle) : base(handle) { } + private static readonly Lazy _Entity_ColorOffset = new(() => Schema.GetOffset(0xA73B1B927B17F98E), LazyThreadSafetyMode.None); + public ref Color Entity_Color { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B927B17F98E)); + get => ref _Handle.AsRef(_Entity_ColorOffset.Value); } + private static readonly Lazy _Entity_flBrightnessOffset = new(() => Schema.GetOffset(0xA73B1B92917416BA), LazyThreadSafetyMode.None); + public ref float Entity_flBrightness { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B92917416BA)); + get => ref _Handle.AsRef(_Entity_flBrightnessOffset.Value); } + private static readonly Lazy _Entity_hCubemapTextureOffset = new(() => Schema.GetOffset(0xA73B1B924906C709), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hCubemapTexture { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA73B1B924906C709)); + get => ref _Handle.AsRef>(_Entity_hCubemapTextureOffset.Value); } + private static readonly Lazy _Entity_bCustomCubemapTextureOffset = new(() => Schema.GetOffset(0xA73B1B921E6DC6A4), LazyThreadSafetyMode.None); + public ref bool Entity_bCustomCubemapTexture { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B921E6DC6A4)); + get => ref _Handle.AsRef(_Entity_bCustomCubemapTextureOffset.Value); } + private static readonly Lazy _Entity_hLightProbeTexture_AmbientCubeOffset = new(() => Schema.GetOffset(0xA73B1B92148FA944), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hLightProbeTexture_AmbientCube { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA73B1B92148FA944)); + get => ref _Handle.AsRef>(_Entity_hLightProbeTexture_AmbientCubeOffset.Value); } + private static readonly Lazy _Entity_hLightProbeTexture_SDFOffset = new(() => Schema.GetOffset(0xA73B1B92B0D8BE62), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hLightProbeTexture_SDF { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA73B1B92B0D8BE62)); + get => ref _Handle.AsRef>(_Entity_hLightProbeTexture_SDFOffset.Value); } + private static readonly Lazy _Entity_hLightProbeTexture_SH2_DCOffset = new(() => Schema.GetOffset(0xA73B1B92C9357F5E), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hLightProbeTexture_SH2_DC { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA73B1B92C9357F5E)); + get => ref _Handle.AsRef>(_Entity_hLightProbeTexture_SH2_DCOffset.Value); } + private static readonly Lazy _Entity_hLightProbeTexture_SH2_ROffset = new(() => Schema.GetOffset(0xA73B1B920E80FF9F), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hLightProbeTexture_SH2_R { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA73B1B920E80FF9F)); + get => ref _Handle.AsRef>(_Entity_hLightProbeTexture_SH2_ROffset.Value); } + private static readonly Lazy _Entity_hLightProbeTexture_SH2_GOffset = new(() => Schema.GetOffset(0xA73B1B92198110F0), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hLightProbeTexture_SH2_G { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA73B1B92198110F0)); + get => ref _Handle.AsRef>(_Entity_hLightProbeTexture_SH2_GOffset.Value); } + private static readonly Lazy _Entity_hLightProbeTexture_SH2_BOffset = new(() => Schema.GetOffset(0xA73B1B921E8118CF), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hLightProbeTexture_SH2_B { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA73B1B921E8118CF)); + get => ref _Handle.AsRef>(_Entity_hLightProbeTexture_SH2_BOffset.Value); } + private static readonly Lazy _Entity_hLightProbeDirectLightIndicesTextureOffset = new(() => Schema.GetOffset(0xA73B1B922251ACF2), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hLightProbeDirectLightIndicesTexture { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA73B1B922251ACF2)); + get => ref _Handle.AsRef>(_Entity_hLightProbeDirectLightIndicesTextureOffset.Value); } + private static readonly Lazy _Entity_hLightProbeDirectLightScalarsTextureOffset = new(() => Schema.GetOffset(0xA73B1B92A463880E), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hLightProbeDirectLightScalarsTexture { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA73B1B92A463880E)); + get => ref _Handle.AsRef>(_Entity_hLightProbeDirectLightScalarsTextureOffset.Value); } + private static readonly Lazy _Entity_hLightProbeDirectLightShadowsTextureOffset = new(() => Schema.GetOffset(0xA73B1B9294B00D56), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hLightProbeDirectLightShadowsTexture { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA73B1B9294B00D56)); + get => ref _Handle.AsRef>(_Entity_hLightProbeDirectLightShadowsTextureOffset.Value); } + private static readonly Lazy _Entity_vBoxMinsOffset = new(() => Schema.GetOffset(0xA73B1B92D35AD599), LazyThreadSafetyMode.None); + public ref Vector Entity_vBoxMins { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B92D35AD599)); + get => ref _Handle.AsRef(_Entity_vBoxMinsOffset.Value); } + private static readonly Lazy _Entity_vBoxMaxsOffset = new(() => Schema.GetOffset(0xA73B1B927C83608B), LazyThreadSafetyMode.None); + public ref Vector Entity_vBoxMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B927C83608B)); + get => ref _Handle.AsRef(_Entity_vBoxMaxsOffset.Value); } + private static readonly Lazy _Entity_bMoveableOffset = new(() => Schema.GetOffset(0xA73B1B9254059592), LazyThreadSafetyMode.None); + public ref bool Entity_bMoveable { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B9254059592)); + get => ref _Handle.AsRef(_Entity_bMoveableOffset.Value); } + private static readonly Lazy _Entity_nHandshakeOffset = new(() => Schema.GetOffset(0xA73B1B92069A2774), LazyThreadSafetyMode.None); + public ref int Entity_nHandshake { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B92069A2774)); + get => ref _Handle.AsRef(_Entity_nHandshakeOffset.Value); } + private static readonly Lazy _Entity_nEnvCubeMapArrayIndexOffset = new(() => Schema.GetOffset(0xA73B1B9221687DA4), LazyThreadSafetyMode.None); + public ref int Entity_nEnvCubeMapArrayIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B9221687DA4)); + get => ref _Handle.AsRef(_Entity_nEnvCubeMapArrayIndexOffset.Value); } + private static readonly Lazy _Entity_nPriorityOffset = new(() => Schema.GetOffset(0xA73B1B92BAACBFAB), LazyThreadSafetyMode.None); + public ref int Entity_nPriority { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B92BAACBFAB)); + get => ref _Handle.AsRef(_Entity_nPriorityOffset.Value); } + private static readonly Lazy _Entity_bStartDisabledOffset = new(() => Schema.GetOffset(0xA73B1B92D04F520D), LazyThreadSafetyMode.None); + public ref bool Entity_bStartDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B92D04F520D)); + get => ref _Handle.AsRef(_Entity_bStartDisabledOffset.Value); } + private static readonly Lazy _Entity_flEdgeFadeDistOffset = new(() => Schema.GetOffset(0xA73B1B92B6CBA4FE), LazyThreadSafetyMode.None); + public ref float Entity_flEdgeFadeDist { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B92B6CBA4FE)); + get => ref _Handle.AsRef(_Entity_flEdgeFadeDistOffset.Value); } + private static readonly Lazy _Entity_vEdgeFadeDistsOffset = new(() => Schema.GetOffset(0xA73B1B92B07D9139), LazyThreadSafetyMode.None); + public ref Vector Entity_vEdgeFadeDists { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B92B07D9139)); + get => ref _Handle.AsRef(_Entity_vEdgeFadeDistsOffset.Value); } + private static readonly Lazy _Entity_nLightProbeSizeXOffset = new(() => Schema.GetOffset(0xA73B1B929A840E10), LazyThreadSafetyMode.None); + public ref int Entity_nLightProbeSizeX { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B929A840E10)); + get => ref _Handle.AsRef(_Entity_nLightProbeSizeXOffset.Value); } + private static readonly Lazy _Entity_nLightProbeSizeYOffset = new(() => Schema.GetOffset(0xA73B1B929B840FA3), LazyThreadSafetyMode.None); + public ref int Entity_nLightProbeSizeY { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B929B840FA3)); + get => ref _Handle.AsRef(_Entity_nLightProbeSizeYOffset.Value); } + private static readonly Lazy _Entity_nLightProbeSizeZOffset = new(() => Schema.GetOffset(0xA73B1B929C841136), LazyThreadSafetyMode.None); + public ref int Entity_nLightProbeSizeZ { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B929C841136)); + get => ref _Handle.AsRef(_Entity_nLightProbeSizeZOffset.Value); } + private static readonly Lazy _Entity_nLightProbeAtlasXOffset = new(() => Schema.GetOffset(0xA73B1B9253C9E610), LazyThreadSafetyMode.None); + public ref int Entity_nLightProbeAtlasX { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B9253C9E610)); + get => ref _Handle.AsRef(_Entity_nLightProbeAtlasXOffset.Value); } + private static readonly Lazy _Entity_nLightProbeAtlasYOffset = new(() => Schema.GetOffset(0xA73B1B9254C9E7A3), LazyThreadSafetyMode.None); + public ref int Entity_nLightProbeAtlasY { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B9254C9E7A3)); + get => ref _Handle.AsRef(_Entity_nLightProbeAtlasYOffset.Value); } + private static readonly Lazy _Entity_nLightProbeAtlasZOffset = new(() => Schema.GetOffset(0xA73B1B9255C9E936), LazyThreadSafetyMode.None); + public ref int Entity_nLightProbeAtlasZ { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B9255C9E936)); + get => ref _Handle.AsRef(_Entity_nLightProbeAtlasZOffset.Value); } + private static readonly Lazy _Entity_bEnabledOffset = new(() => Schema.GetOffset(0xA73B1B92453FD9DC), LazyThreadSafetyMode.None); + public ref bool Entity_bEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73B1B92453FD9DC)); + get => ref _Handle.AsRef(_Entity_bEnabledOffset.Value); } public void Entity_ColorUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCubemapBoxImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCubemapBoxImpl.cs index 4aacc2b57..c733ce4c5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCubemapBoxImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCubemapBoxImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCubemapFogImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCubemapFogImpl.cs index b507ccbcd..caf363575 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCubemapFogImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCubemapFogImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,63 +17,99 @@ internal partial class CEnvCubemapFogImpl : CBaseEntityImpl, CEnvCubemapFog { public CEnvCubemapFogImpl(nint handle) : base(handle) { } + private static readonly Lazy _EndDistanceOffset = new(() => Schema.GetOffset(0x38A7692EB825C247), LazyThreadSafetyMode.None); + public ref float EndDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A7692EB825C247)); + get => ref _Handle.AsRef(_EndDistanceOffset.Value); } + private static readonly Lazy _StartDistanceOffset = new(() => Schema.GetOffset(0x38A7692E796C8142), LazyThreadSafetyMode.None); + public ref float StartDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A7692E796C8142)); + get => ref _Handle.AsRef(_StartDistanceOffset.Value); } + private static readonly Lazy _FogFalloffExponentOffset = new(() => Schema.GetOffset(0x38A7692E2068A39A), LazyThreadSafetyMode.None); + public ref float FogFalloffExponent { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A7692E2068A39A)); + get => ref _Handle.AsRef(_FogFalloffExponentOffset.Value); } + private static readonly Lazy _HeightFogEnabledOffset = new(() => Schema.GetOffset(0x38A7692EFB7ED9F7), LazyThreadSafetyMode.None); + public ref bool HeightFogEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A7692EFB7ED9F7)); + get => ref _Handle.AsRef(_HeightFogEnabledOffset.Value); } + private static readonly Lazy _FogHeightWidthOffset = new(() => Schema.GetOffset(0x38A7692E07936DE2), LazyThreadSafetyMode.None); + public ref float FogHeightWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A7692E07936DE2)); + get => ref _Handle.AsRef(_FogHeightWidthOffset.Value); } + private static readonly Lazy _FogHeightEndOffset = new(() => Schema.GetOffset(0x38A7692E16176853), LazyThreadSafetyMode.None); + public ref float FogHeightEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A7692E16176853)); + get => ref _Handle.AsRef(_FogHeightEndOffset.Value); } + private static readonly Lazy _FogHeightStartOffset = new(() => Schema.GetOffset(0x38A7692ED4580CB6), LazyThreadSafetyMode.None); + public ref float FogHeightStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A7692ED4580CB6)); + get => ref _Handle.AsRef(_FogHeightStartOffset.Value); } + private static readonly Lazy _FogHeightExponentOffset = new(() => Schema.GetOffset(0x38A7692E0864DD39), LazyThreadSafetyMode.None); + public ref float FogHeightExponent { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A7692E0864DD39)); + get => ref _Handle.AsRef(_FogHeightExponentOffset.Value); } + private static readonly Lazy _LODBiasOffset = new(() => Schema.GetOffset(0x38A7692E6917C8A7), LazyThreadSafetyMode.None); + public ref float LODBias { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A7692E6917C8A7)); + get => ref _Handle.AsRef(_LODBiasOffset.Value); } + private static readonly Lazy _ActiveOffset = new(() => Schema.GetOffset(0x38A7692E8334208F), LazyThreadSafetyMode.None); + public ref bool Active { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A7692E8334208F)); + get => ref _Handle.AsRef(_ActiveOffset.Value); } + private static readonly Lazy _StartDisabledOffset = new(() => Schema.GetOffset(0x38A7692E61ED0C4F), LazyThreadSafetyMode.None); + public ref bool StartDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A7692E61ED0C4F)); + get => ref _Handle.AsRef(_StartDisabledOffset.Value); } + private static readonly Lazy _FogMaxOpacityOffset = new(() => Schema.GetOffset(0x38A7692E7BF7FD56), LazyThreadSafetyMode.None); + public ref float FogMaxOpacity { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A7692E7BF7FD56)); + get => ref _Handle.AsRef(_FogMaxOpacityOffset.Value); } + private static readonly Lazy _CubemapSourceTypeOffset = new(() => Schema.GetOffset(0x38A7692E30B17317), LazyThreadSafetyMode.None); + public ref int CubemapSourceType { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A7692E30B17317)); + get => ref _Handle.AsRef(_CubemapSourceTypeOffset.Value); } + private static readonly Lazy _SkyMaterialOffset = new(() => Schema.GetOffset(0x38A7692EC887319D), LazyThreadSafetyMode.None); + public ref CStrongHandle SkyMaterial { - get => ref _Handle.AsRef>(Schema.GetOffset(0x38A7692EC887319D)); + get => ref _Handle.AsRef>(_SkyMaterialOffset.Value); } + private static readonly Lazy _SkyEntityOffset = new(() => Schema.GetOffset(0x38A7692E2BD44B1D), LazyThreadSafetyMode.None); + public string SkyEntity { get { - var ptr = _Handle.Read(Schema.GetOffset(0x38A7692E2BD44B1D)); + var ptr = _Handle.Read(_SkyEntityOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x38A7692E2BD44B1D, value); + set => Schema.SetString(_Handle, _SkyEntityOffset.Value, value); } + private static readonly Lazy _FogCubemapTextureOffset = new(() => Schema.GetOffset(0x38A7692E3470DA4D), LazyThreadSafetyMode.None); + public ref CStrongHandle FogCubemapTexture { - get => ref _Handle.AsRef>(Schema.GetOffset(0x38A7692E3470DA4D)); + get => ref _Handle.AsRef>(_FogCubemapTextureOffset.Value); } + private static readonly Lazy _HasHeightFogEndOffset = new(() => Schema.GetOffset(0x38A7692E3484C961), LazyThreadSafetyMode.None); + public ref bool HasHeightFogEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A7692E3484C961)); + get => ref _Handle.AsRef(_HasHeightFogEndOffset.Value); } + private static readonly Lazy _FirstTimeOffset = new(() => Schema.GetOffset(0x38A7692ED23C3138), LazyThreadSafetyMode.None); + public ref bool FirstTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A7692ED23C3138)); + get => ref _Handle.AsRef(_FirstTimeOffset.Value); } public void EndDistanceUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCubemapImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCubemapImpl.cs index 3e126da2b..d88289608 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCubemapImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvCubemapImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,59 +17,95 @@ internal partial class CEnvCubemapImpl : CBaseEntityImpl, CEnvCubemap { public CEnvCubemapImpl(nint handle) : base(handle) { } + private static readonly Lazy _Entity_hCubemapTextureOffset = new(() => Schema.GetOffset(0xD6FB78464906C709), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hCubemapTexture { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD6FB78464906C709)); + get => ref _Handle.AsRef>(_Entity_hCubemapTextureOffset.Value); } + private static readonly Lazy _Entity_bCustomCubemapTextureOffset = new(() => Schema.GetOffset(0xD6FB78461E6DC6A4), LazyThreadSafetyMode.None); + public ref bool Entity_bCustomCubemapTexture { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6FB78461E6DC6A4)); + get => ref _Handle.AsRef(_Entity_bCustomCubemapTextureOffset.Value); } + private static readonly Lazy _Entity_flInfluenceRadiusOffset = new(() => Schema.GetOffset(0xD6FB7846C7454EDE), LazyThreadSafetyMode.None); + public ref float Entity_flInfluenceRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6FB7846C7454EDE)); + get => ref _Handle.AsRef(_Entity_flInfluenceRadiusOffset.Value); } + private static readonly Lazy _Entity_vBoxProjectMinsOffset = new(() => Schema.GetOffset(0xD6FB7846DFB51948), LazyThreadSafetyMode.None); + public ref Vector Entity_vBoxProjectMins { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6FB7846DFB51948)); + get => ref _Handle.AsRef(_Entity_vBoxProjectMinsOffset.Value); } + private static readonly Lazy _Entity_vBoxProjectMaxsOffset = new(() => Schema.GetOffset(0xD6FB7846712D3052), LazyThreadSafetyMode.None); + public ref Vector Entity_vBoxProjectMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6FB7846712D3052)); + get => ref _Handle.AsRef(_Entity_vBoxProjectMaxsOffset.Value); } + private static readonly Lazy _Entity_bMoveableOffset = new(() => Schema.GetOffset(0xD6FB784654059592), LazyThreadSafetyMode.None); + public ref bool Entity_bMoveable { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6FB784654059592)); + get => ref _Handle.AsRef(_Entity_bMoveableOffset.Value); } + private static readonly Lazy _Entity_nHandshakeOffset = new(() => Schema.GetOffset(0xD6FB7846069A2774), LazyThreadSafetyMode.None); + public ref int Entity_nHandshake { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6FB7846069A2774)); + get => ref _Handle.AsRef(_Entity_nHandshakeOffset.Value); } + private static readonly Lazy _Entity_nEnvCubeMapArrayIndexOffset = new(() => Schema.GetOffset(0xD6FB784621687DA4), LazyThreadSafetyMode.None); + public ref int Entity_nEnvCubeMapArrayIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6FB784621687DA4)); + get => ref _Handle.AsRef(_Entity_nEnvCubeMapArrayIndexOffset.Value); } + private static readonly Lazy _Entity_nPriorityOffset = new(() => Schema.GetOffset(0xD6FB7846BAACBFAB), LazyThreadSafetyMode.None); + public ref int Entity_nPriority { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6FB7846BAACBFAB)); + get => ref _Handle.AsRef(_Entity_nPriorityOffset.Value); } + private static readonly Lazy _Entity_flEdgeFadeDistOffset = new(() => Schema.GetOffset(0xD6FB7846B6CBA4FE), LazyThreadSafetyMode.None); + public ref float Entity_flEdgeFadeDist { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6FB7846B6CBA4FE)); + get => ref _Handle.AsRef(_Entity_flEdgeFadeDistOffset.Value); } + private static readonly Lazy _Entity_vEdgeFadeDistsOffset = new(() => Schema.GetOffset(0xD6FB7846B07D9139), LazyThreadSafetyMode.None); + public ref Vector Entity_vEdgeFadeDists { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6FB7846B07D9139)); + get => ref _Handle.AsRef(_Entity_vEdgeFadeDistsOffset.Value); } + private static readonly Lazy _Entity_flDiffuseScaleOffset = new(() => Schema.GetOffset(0xD6FB7846A14F91F9), LazyThreadSafetyMode.None); + public ref float Entity_flDiffuseScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6FB7846A14F91F9)); + get => ref _Handle.AsRef(_Entity_flDiffuseScaleOffset.Value); } + private static readonly Lazy _Entity_bStartDisabledOffset = new(() => Schema.GetOffset(0xD6FB7846D04F520D), LazyThreadSafetyMode.None); + public ref bool Entity_bStartDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6FB7846D04F520D)); + get => ref _Handle.AsRef(_Entity_bStartDisabledOffset.Value); } + private static readonly Lazy _Entity_bDefaultEnvMapOffset = new(() => Schema.GetOffset(0xD6FB784626B7497F), LazyThreadSafetyMode.None); + public ref bool Entity_bDefaultEnvMap { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6FB784626B7497F)); + get => ref _Handle.AsRef(_Entity_bDefaultEnvMapOffset.Value); } + private static readonly Lazy _Entity_bDefaultSpecEnvMapOffset = new(() => Schema.GetOffset(0xD6FB7846D2CEAC08), LazyThreadSafetyMode.None); + public ref bool Entity_bDefaultSpecEnvMap { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6FB7846D2CEAC08)); + get => ref _Handle.AsRef(_Entity_bDefaultSpecEnvMapOffset.Value); } + private static readonly Lazy _Entity_bIndoorCubeMapOffset = new(() => Schema.GetOffset(0xD6FB7846F5F722D5), LazyThreadSafetyMode.None); + public ref bool Entity_bIndoorCubeMap { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6FB7846F5F722D5)); + get => ref _Handle.AsRef(_Entity_bIndoorCubeMapOffset.Value); } + private static readonly Lazy _Entity_bCopyDiffuseFromDefaultCubemapOffset = new(() => Schema.GetOffset(0xD6FB7846DF047EA2), LazyThreadSafetyMode.None); + public ref bool Entity_bCopyDiffuseFromDefaultCubemap { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6FB7846DF047EA2)); + get => ref _Handle.AsRef(_Entity_bCopyDiffuseFromDefaultCubemapOffset.Value); } + private static readonly Lazy _Entity_bEnabledOffset = new(() => Schema.GetOffset(0xD6FB7846453FD9DC), LazyThreadSafetyMode.None); + public ref bool Entity_bEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6FB7846453FD9DC)); + get => ref _Handle.AsRef(_Entity_bEnabledOffset.Value); } public void Entity_hCubemapTextureUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvDecalImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvDecalImpl.cs index f09839560..648a3b0a0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvDecalImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvDecalImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class CEnvDecalImpl : CBaseModelEntityImpl, CEnvDecal { public CEnvDecalImpl(nint handle) : base(handle) { } + private static readonly Lazy _DecalMaterialOffset = new(() => Schema.GetOffset(0xF52AFA9ED892BA39), LazyThreadSafetyMode.None); + public ref CStrongHandle DecalMaterial { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF52AFA9ED892BA39)); + get => ref _Handle.AsRef>(_DecalMaterialOffset.Value); } + private static readonly Lazy _WidthOffset = new(() => Schema.GetOffset(0xF52AFA9EB91935E1), LazyThreadSafetyMode.None); + public ref float Width { - get => ref _Handle.AsRef(Schema.GetOffset(0xF52AFA9EB91935E1)); + get => ref _Handle.AsRef(_WidthOffset.Value); } + private static readonly Lazy _HeightOffset = new(() => Schema.GetOffset(0xF52AFA9EEADD7FB0), LazyThreadSafetyMode.None); + public ref float Height { - get => ref _Handle.AsRef(Schema.GetOffset(0xF52AFA9EEADD7FB0)); + get => ref _Handle.AsRef(_HeightOffset.Value); } + private static readonly Lazy _DepthOffset = new(() => Schema.GetOffset(0xF52AFA9ED3AD54E8), LazyThreadSafetyMode.None); + public ref float Depth { - get => ref _Handle.AsRef(Schema.GetOffset(0xF52AFA9ED3AD54E8)); + get => ref _Handle.AsRef(_DepthOffset.Value); } + private static readonly Lazy _RenderOrderOffset = new(() => Schema.GetOffset(0xF52AFA9E554E763B), LazyThreadSafetyMode.None); + public ref uint RenderOrder { - get => ref _Handle.AsRef(Schema.GetOffset(0xF52AFA9E554E763B)); + get => ref _Handle.AsRef(_RenderOrderOffset.Value); } + private static readonly Lazy _ProjectOnWorldOffset = new(() => Schema.GetOffset(0xF52AFA9E213B0285), LazyThreadSafetyMode.None); + public ref bool ProjectOnWorld { - get => ref _Handle.AsRef(Schema.GetOffset(0xF52AFA9E213B0285)); + get => ref _Handle.AsRef(_ProjectOnWorldOffset.Value); } + private static readonly Lazy _ProjectOnCharactersOffset = new(() => Schema.GetOffset(0xF52AFA9EE0371FB7), LazyThreadSafetyMode.None); + public ref bool ProjectOnCharacters { - get => ref _Handle.AsRef(Schema.GetOffset(0xF52AFA9EE0371FB7)); + get => ref _Handle.AsRef(_ProjectOnCharactersOffset.Value); } + private static readonly Lazy _ProjectOnWaterOffset = new(() => Schema.GetOffset(0xF52AFA9ED4AF2E96), LazyThreadSafetyMode.None); + public ref bool ProjectOnWater { - get => ref _Handle.AsRef(Schema.GetOffset(0xF52AFA9ED4AF2E96)); + get => ref _Handle.AsRef(_ProjectOnWaterOffset.Value); } + private static readonly Lazy _DepthSortBiasOffset = new(() => Schema.GetOffset(0xF52AFA9ED8EE79D9), LazyThreadSafetyMode.None); + public ref float DepthSortBias { - get => ref _Handle.AsRef(Schema.GetOffset(0xF52AFA9ED8EE79D9)); + get => ref _Handle.AsRef(_DepthSortBiasOffset.Value); } public void DecalMaterialUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvDetailControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvDetailControllerImpl.cs index bf1b50f62..ebbf73a49 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvDetailControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvDetailControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CEnvDetailControllerImpl : CBaseEntityImpl, CEnvDetailCon public CEnvDetailControllerImpl(nint handle) : base(handle) { } + private static readonly Lazy _FadeStartDistOffset = new(() => Schema.GetOffset(0x585A7964FBFACAF3), LazyThreadSafetyMode.None); + public ref float FadeStartDist { - get => ref _Handle.AsRef(Schema.GetOffset(0x585A7964FBFACAF3)); + get => ref _Handle.AsRef(_FadeStartDistOffset.Value); } + private static readonly Lazy _FadeEndDistOffset = new(() => Schema.GetOffset(0x585A79646DD6252A), LazyThreadSafetyMode.None); + public ref float FadeEndDist { - get => ref _Handle.AsRef(Schema.GetOffset(0x585A79646DD6252A)); + get => ref _Handle.AsRef(_FadeEndDistOffset.Value); } public void FadeStartDistUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvEntityIgniterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvEntityIgniterImpl.cs index 294dbaf3b..efafdd36e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvEntityIgniterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvEntityIgniterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CEnvEntityIgniterImpl : CBaseEntityImpl, CEnvEntityIgnite public CEnvEntityIgniterImpl(nint handle) : base(handle) { } + private static readonly Lazy _LifetimeOffset = new(() => Schema.GetOffset(0xF8FFE95A39B35564), LazyThreadSafetyMode.None); + public ref float Lifetime { - get => ref _Handle.AsRef(Schema.GetOffset(0xF8FFE95A39B35564)); + get => ref _Handle.AsRef(_LifetimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvEntityMakerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvEntityMakerImpl.cs index a6258fb7d..d439ddabe 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvEntityMakerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvEntityMakerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,45 +17,69 @@ internal partial class CEnvEntityMakerImpl : CPointEntityImpl, CEnvEntityMaker { public CEnvEntityMakerImpl(nint handle) : base(handle) { } + private static readonly Lazy _EntityMinsOffset = new(() => Schema.GetOffset(0x5EC16696C39F1E27), LazyThreadSafetyMode.None); + public ref Vector EntityMins { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EC16696C39F1E27)); + get => ref _Handle.AsRef(_EntityMinsOffset.Value); } + private static readonly Lazy _EntityMaxsOffset = new(() => Schema.GetOffset(0x5EC166965CBE958D), LazyThreadSafetyMode.None); + public ref Vector EntityMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EC166965CBE958D)); + get => ref _Handle.AsRef(_EntityMaxsOffset.Value); } + private static readonly Lazy _CurrentInstanceOffset = new(() => Schema.GetOffset(0x5EC166969C4BA153), LazyThreadSafetyMode.None); + public ref CHandle CurrentInstance { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5EC166969C4BA153)); + get => ref _Handle.AsRef>(_CurrentInstanceOffset.Value); } + private static readonly Lazy _CurrentBlockerOffset = new(() => Schema.GetOffset(0x5EC1669684284A72), LazyThreadSafetyMode.None); + public ref CHandle CurrentBlocker { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5EC1669684284A72)); + get => ref _Handle.AsRef>(_CurrentBlockerOffset.Value); } + private static readonly Lazy _BlockerOriginOffset = new(() => Schema.GetOffset(0x5EC16696987D753F), LazyThreadSafetyMode.None); + public ref Vector BlockerOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EC16696987D753F)); + get => ref _Handle.AsRef(_BlockerOriginOffset.Value); } + private static readonly Lazy _PostSpawnDirectionOffset = new(() => Schema.GetOffset(0x5EC16696226D1B99), LazyThreadSafetyMode.None); + public ref QAngle PostSpawnDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EC16696226D1B99)); + get => ref _Handle.AsRef(_PostSpawnDirectionOffset.Value); } + private static readonly Lazy _PostSpawnDirectionVarianceOffset = new(() => Schema.GetOffset(0x5EC166965FA89D66), LazyThreadSafetyMode.None); + public ref float PostSpawnDirectionVariance { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EC166965FA89D66)); + get => ref _Handle.AsRef(_PostSpawnDirectionVarianceOffset.Value); } + private static readonly Lazy _PostSpawnSpeedOffset = new(() => Schema.GetOffset(0x5EC16696C4D43237), LazyThreadSafetyMode.None); + public ref float PostSpawnSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EC16696C4D43237)); + get => ref _Handle.AsRef(_PostSpawnSpeedOffset.Value); } + private static readonly Lazy _PostSpawnUseAnglesOffset = new(() => Schema.GetOffset(0x5EC1669689448F21), LazyThreadSafetyMode.None); + public ref bool PostSpawnUseAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EC1669689448F21)); + get => ref _Handle.AsRef(_PostSpawnUseAnglesOffset.Value); } + private static readonly Lazy _TemplateOffset = new(() => Schema.GetOffset(0x5EC16696F24EC223), LazyThreadSafetyMode.None); + public string Template { get { - var ptr = _Handle.Read(Schema.GetOffset(0x5EC16696F24EC223)); + var ptr = _Handle.Read(_TemplateOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x5EC16696F24EC223, value); + set => Schema.SetString(_Handle, _TemplateOffset.Value, value); } + private static readonly Lazy _OutputOnSpawnedOffset = new(() => Schema.GetOffset(0x5EC1669629B86CFF), LazyThreadSafetyMode.None); + public CEntityIOOutput OutputOnSpawned { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x5EC1669629B86CFF)); + get => new CEntityIOOutputImpl(_Handle + _OutputOnSpawnedOffset.Value); } + private static readonly Lazy _OutputOnFailedSpawnOffset = new(() => Schema.GetOffset(0x5EC16696EBDC0A35), LazyThreadSafetyMode.None); + public CEntityIOOutput OutputOnFailedSpawn { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x5EC16696EBDC0A35)); + get => new CEntityIOOutputImpl(_Handle + _OutputOnFailedSpawnOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvExplosionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvExplosionImpl.cs index 5a5434e88..b04916014 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvExplosionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvExplosionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,62 +17,92 @@ internal partial class CEnvExplosionImpl : CModelPointEntityImpl, CEnvExplosion public CEnvExplosionImpl(nint handle) : base(handle) { } + private static readonly Lazy _MagnitudeOffset = new(() => Schema.GetOffset(0x27411F012CBE4C2), LazyThreadSafetyMode.None); + public ref int Magnitude { - get => ref _Handle.AsRef(Schema.GetOffset(0x27411F012CBE4C2)); + get => ref _Handle.AsRef(_MagnitudeOffset.Value); } + private static readonly Lazy _PlayerDamageOffset = new(() => Schema.GetOffset(0x27411F08C95143B), LazyThreadSafetyMode.None); + public ref float PlayerDamage { - get => ref _Handle.AsRef(Schema.GetOffset(0x27411F08C95143B)); + get => ref _Handle.AsRef(_PlayerDamageOffset.Value); } + private static readonly Lazy _RadiusOverrideOffset = new(() => Schema.GetOffset(0x27411F0CD5417B2), LazyThreadSafetyMode.None); + public ref int RadiusOverride { - get => ref _Handle.AsRef(Schema.GetOffset(0x27411F0CD5417B2)); + get => ref _Handle.AsRef(_RadiusOverrideOffset.Value); } + private static readonly Lazy _InnerRadiusOffset = new(() => Schema.GetOffset(0x27411F032121407), LazyThreadSafetyMode.None); + public ref float InnerRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x27411F032121407)); + get => ref _Handle.AsRef(_InnerRadiusOffset.Value); } + private static readonly Lazy _DamageForceOffset = new(() => Schema.GetOffset(0x27411F0AB66D0A5), LazyThreadSafetyMode.None); + public ref float DamageForce { - get => ref _Handle.AsRef(Schema.GetOffset(0x27411F0AB66D0A5)); + get => ref _Handle.AsRef(_DamageForceOffset.Value); } + private static readonly Lazy _InflictorOffset = new(() => Schema.GetOffset(0x27411F04D7B4137), LazyThreadSafetyMode.None); + public ref CHandle Inflictor { - get => ref _Handle.AsRef>(Schema.GetOffset(0x27411F04D7B4137)); + get => ref _Handle.AsRef>(_InflictorOffset.Value); } + private static readonly Lazy _CustomDamageTypeOffset = new(() => Schema.GetOffset(0x27411F0E0A58F6E), LazyThreadSafetyMode.None); + public ref DamageTypes_t CustomDamageType { - get => ref _Handle.AsRef(Schema.GetOffset(0x27411F0E0A58F6E)); + get => ref _Handle.AsRef(_CustomDamageTypeOffset.Value); } + private static readonly Lazy _CreateDebrisOffset = new(() => Schema.GetOffset(0x27411F08F0AE362), LazyThreadSafetyMode.None); + public ref bool CreateDebris { - get => ref _Handle.AsRef(Schema.GetOffset(0x27411F08F0AE362)); + get => ref _Handle.AsRef(_CreateDebrisOffset.Value); } + private static readonly Lazy _CustomEffectNameOffset = new(() => Schema.GetOffset(0x27411F0455090C0), LazyThreadSafetyMode.None); + public string CustomEffectName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x27411F0455090C0)); + var ptr = _Handle.Read(_CustomEffectNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x27411F0455090C0, value); + set => Schema.SetString(_Handle, _CustomEffectNameOffset.Value, value); } + private static readonly Lazy _CustomSoundNameOffset = new(() => Schema.GetOffset(0x27411F0876FC976), LazyThreadSafetyMode.None); + public string CustomSoundName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x27411F0876FC976)); + var ptr = _Handle.Read(_CustomSoundNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x27411F0876FC976, value); + set => Schema.SetString(_Handle, _CustomSoundNameOffset.Value, value); } + private static readonly Lazy _SuppressParticleImpulseOffset = new(() => Schema.GetOffset(0x27411F02C7847BB), LazyThreadSafetyMode.None); + public ref bool SuppressParticleImpulse { - get => ref _Handle.AsRef(Schema.GetOffset(0x27411F02C7847BB)); + get => ref _Handle.AsRef(_SuppressParticleImpulseOffset.Value); } + private static readonly Lazy _ClassIgnoreOffset = new(() => Schema.GetOffset(0x27411F0A0290EDE), LazyThreadSafetyMode.None); + public ref Class_T ClassIgnore { - get => ref _Handle.AsRef(Schema.GetOffset(0x27411F0A0290EDE)); + get => ref _Handle.AsRef(_ClassIgnoreOffset.Value); } + private static readonly Lazy _ClassIgnore2Offset = new(() => Schema.GetOffset(0x27411F00CA27D84), LazyThreadSafetyMode.None); + public ref Class_T ClassIgnore2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x27411F00CA27D84)); + get => ref _Handle.AsRef(_ClassIgnore2Offset.Value); } + private static readonly Lazy _EntityIgnoreNameOffset = new(() => Schema.GetOffset(0x27411F0A786C06F), LazyThreadSafetyMode.None); + public string EntityIgnoreName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x27411F0A786C06F)); + var ptr = _Handle.Read(_EntityIgnoreNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x27411F0A786C06F, value); + set => Schema.SetString(_Handle, _EntityIgnoreNameOffset.Value, value); } + private static readonly Lazy _EntityIgnoreOffset = new(() => Schema.GetOffset(0x27411F08F1E5202), LazyThreadSafetyMode.None); + public ref CHandle EntityIgnore { - get => ref _Handle.AsRef>(Schema.GetOffset(0x27411F08F1E5202)); + get => ref _Handle.AsRef>(_EntityIgnoreOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvFadeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvFadeImpl.cs index 0b9fb705f..dba2c8cb5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvFadeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvFadeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CEnvFadeImpl : CLogicalEntityImpl, CEnvFade { public CEnvFadeImpl(nint handle) : base(handle) { } + private static readonly Lazy _FadeColorOffset = new(() => Schema.GetOffset(0xEFBFC063C1517BF2), LazyThreadSafetyMode.None); + public ref Color FadeColor { - get => ref _Handle.AsRef(Schema.GetOffset(0xEFBFC063C1517BF2)); + get => ref _Handle.AsRef(_FadeColorOffset.Value); } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0xEFBFC0639879A98D), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0xEFBFC0639879A98D)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _HoldDurationOffset = new(() => Schema.GetOffset(0xEFBFC0631D577A68), LazyThreadSafetyMode.None); + public ref float HoldDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0xEFBFC0631D577A68)); + get => ref _Handle.AsRef(_HoldDurationOffset.Value); } + private static readonly Lazy _OnBeginFadeOffset = new(() => Schema.GetOffset(0xEFBFC0633308BA63), LazyThreadSafetyMode.None); + public CEntityIOOutput OnBeginFade { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xEFBFC0633308BA63)); + get => new CEntityIOOutputImpl(_Handle + _OnBeginFadeOffset.Value); } public void FadeColorUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvGlobalImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvGlobalImpl.cs index 79d7d8123..2863ca6d8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvGlobalImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvGlobalImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class CEnvGlobalImpl : CLogicalEntityImpl, CEnvGlobal { public CEnvGlobalImpl(nint handle) : base(handle) { } + private static readonly Lazy _OutCounterOffset = new(() => Schema.GetOffset(0xC5E41E3E69415251), LazyThreadSafetyMode.None); + public SchemaUntypedField OutCounter { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC5E41E3E69415251)); + get => new SchemaUntypedField(_Handle + _OutCounterOffset.Value); } + private static readonly Lazy _GlobalstateOffset = new(() => Schema.GetOffset(0xC5E41E3E77A86653), LazyThreadSafetyMode.None); + public string Globalstate { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC5E41E3E77A86653)); + var ptr = _Handle.Read(_GlobalstateOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xC5E41E3E77A86653, value); + set => Schema.SetString(_Handle, _GlobalstateOffset.Value, value); } + private static readonly Lazy _TriggermodeOffset = new(() => Schema.GetOffset(0xC5E41E3E845DF22C), LazyThreadSafetyMode.None); + public ref int Triggermode { - get => ref _Handle.AsRef(Schema.GetOffset(0xC5E41E3E845DF22C)); + get => ref _Handle.AsRef(_TriggermodeOffset.Value); } + private static readonly Lazy _InitialstateOffset = new(() => Schema.GetOffset(0xC5E41E3E1E997294), LazyThreadSafetyMode.None); + public ref int Initialstate { - get => ref _Handle.AsRef(Schema.GetOffset(0xC5E41E3E1E997294)); + get => ref _Handle.AsRef(_InitialstateOffset.Value); } + private static readonly Lazy _CounterOffset = new(() => Schema.GetOffset(0xC5E41E3EA311A543), LazyThreadSafetyMode.None); + public ref int Counter { - get => ref _Handle.AsRef(Schema.GetOffset(0xC5E41E3EA311A543)); + get => ref _Handle.AsRef(_CounterOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvHudHintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvHudHintImpl.cs index 31d523ab4..c3b525347 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvHudHintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvHudHintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CEnvHudHintImpl : CPointEntityImpl, CEnvHudHint { public CEnvHudHintImpl(nint handle) : base(handle) { } + private static readonly Lazy _MessageOffset = new(() => Schema.GetOffset(0xD3D49C23CC5243DC), LazyThreadSafetyMode.None); + public string Message { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD3D49C23CC5243DC)); + var ptr = _Handle.Read(_MessageOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD3D49C23CC5243DC, value); + set => Schema.SetString(_Handle, _MessageOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvInstructorHintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvInstructorHintImpl.cs index 9da2a033e..42cdaece2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvInstructorHintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvInstructorHintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,109 +17,157 @@ internal partial class CEnvInstructorHintImpl : CPointEntityImpl, CEnvInstructor public CEnvInstructorHintImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x9C18AB2774FF65FE), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9C18AB2774FF65FE)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9C18AB2774FF65FE, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _Replace_KeyOffset = new(() => Schema.GetOffset(0x9C18AB27CAC8205B), LazyThreadSafetyMode.None); + public string Replace_Key { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9C18AB27CAC8205B)); + var ptr = _Handle.Read(_Replace_KeyOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9C18AB27CAC8205B, value); + set => Schema.SetString(_Handle, _Replace_KeyOffset.Value, value); } + private static readonly Lazy _HintTargetEntityOffset = new(() => Schema.GetOffset(0x9C18AB270024C1BE), LazyThreadSafetyMode.None); + public string HintTargetEntity { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9C18AB270024C1BE)); + var ptr = _Handle.Read(_HintTargetEntityOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9C18AB270024C1BE, value); + set => Schema.SetString(_Handle, _HintTargetEntityOffset.Value, value); } + private static readonly Lazy _TimeoutOffset = new(() => Schema.GetOffset(0x9C18AB272EC6CDDF), LazyThreadSafetyMode.None); + public ref int Timeout { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C18AB272EC6CDDF)); + get => ref _Handle.AsRef(_TimeoutOffset.Value); } + private static readonly Lazy _DisplayLimitOffset = new(() => Schema.GetOffset(0x9C18AB27271D9139), LazyThreadSafetyMode.None); + public ref int DisplayLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C18AB27271D9139)); + get => ref _Handle.AsRef(_DisplayLimitOffset.Value); } + private static readonly Lazy _Icon_OnscreenOffset = new(() => Schema.GetOffset(0x9C18AB27548D6DF4), LazyThreadSafetyMode.None); + public string Icon_Onscreen { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9C18AB27548D6DF4)); + var ptr = _Handle.Read(_Icon_OnscreenOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9C18AB27548D6DF4, value); + set => Schema.SetString(_Handle, _Icon_OnscreenOffset.Value, value); } + private static readonly Lazy _Icon_OffscreenOffset = new(() => Schema.GetOffset(0x9C18AB274628C556), LazyThreadSafetyMode.None); + public string Icon_Offscreen { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9C18AB274628C556)); + var ptr = _Handle.Read(_Icon_OffscreenOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9C18AB274628C556, value); + set => Schema.SetString(_Handle, _Icon_OffscreenOffset.Value, value); } + private static readonly Lazy _CaptionOffset = new(() => Schema.GetOffset(0x9C18AB27BE8E34DD), LazyThreadSafetyMode.None); + public string Caption { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9C18AB27BE8E34DD)); + var ptr = _Handle.Read(_CaptionOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9C18AB27BE8E34DD, value); + set => Schema.SetString(_Handle, _CaptionOffset.Value, value); } + private static readonly Lazy _ActivatorCaptionOffset = new(() => Schema.GetOffset(0x9C18AB271D0AA53E), LazyThreadSafetyMode.None); + public string ActivatorCaption { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9C18AB271D0AA53E)); + var ptr = _Handle.Read(_ActivatorCaptionOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9C18AB271D0AA53E, value); + set => Schema.SetString(_Handle, _ActivatorCaptionOffset.Value, value); } + private static readonly Lazy _ColorOffset = new(() => Schema.GetOffset(0x9C18AB27D7D017D8), LazyThreadSafetyMode.None); + public ref Color Color { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C18AB27D7D017D8)); + get => ref _Handle.AsRef(_ColorOffset.Value); } + private static readonly Lazy _IconOffsetOffset = new(() => Schema.GetOffset(0x9C18AB273AAB3E4F), LazyThreadSafetyMode.None); + public ref float IconOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C18AB273AAB3E4F)); + get => ref _Handle.AsRef(_IconOffsetOffset.Value); } + private static readonly Lazy _RangeOffset = new(() => Schema.GetOffset(0x9C18AB27E5645A66), LazyThreadSafetyMode.None); + public ref float Range { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C18AB27E5645A66)); + get => ref _Handle.AsRef(_RangeOffset.Value); } + private static readonly Lazy _PulseOptionOffset = new(() => Schema.GetOffset(0x9C18AB279E936B74), LazyThreadSafetyMode.None); + public ref byte PulseOption { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C18AB279E936B74)); + get => ref _Handle.AsRef(_PulseOptionOffset.Value); } + private static readonly Lazy _AlphaOptionOffset = new(() => Schema.GetOffset(0x9C18AB2788681071), LazyThreadSafetyMode.None); + public ref byte AlphaOption { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C18AB2788681071)); + get => ref _Handle.AsRef(_AlphaOptionOffset.Value); } + private static readonly Lazy _ShakeOptionOffset = new(() => Schema.GetOffset(0x9C18AB277869770F), LazyThreadSafetyMode.None); + public ref byte ShakeOption { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C18AB277869770F)); + get => ref _Handle.AsRef(_ShakeOptionOffset.Value); } + private static readonly Lazy _StaticOffset = new(() => Schema.GetOffset(0x9C18AB27D28EB09B), LazyThreadSafetyMode.None); + public ref bool Static { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C18AB27D28EB09B)); + get => ref _Handle.AsRef(_StaticOffset.Value); } + private static readonly Lazy _NoOffscreenOffset = new(() => Schema.GetOffset(0x9C18AB271F602A3B), LazyThreadSafetyMode.None); + public ref bool NoOffscreen { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C18AB271F602A3B)); + get => ref _Handle.AsRef(_NoOffscreenOffset.Value); } + private static readonly Lazy _ForceCaptionOffset = new(() => Schema.GetOffset(0x9C18AB272E745F66), LazyThreadSafetyMode.None); + public ref bool ForceCaption { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C18AB272E745F66)); + get => ref _Handle.AsRef(_ForceCaptionOffset.Value); } + private static readonly Lazy _InstanceTypeOffset = new(() => Schema.GetOffset(0x9C18AB270B1E1D07), LazyThreadSafetyMode.None); + public ref int InstanceType { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C18AB270B1E1D07)); + get => ref _Handle.AsRef(_InstanceTypeOffset.Value); } + private static readonly Lazy _SuppressRestOffset = new(() => Schema.GetOffset(0x9C18AB27A146CD34), LazyThreadSafetyMode.None); + public ref bool SuppressRest { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C18AB27A146CD34)); + get => ref _Handle.AsRef(_SuppressRestOffset.Value); } + private static readonly Lazy _BindingOffset = new(() => Schema.GetOffset(0x9C18AB2705585C6A), LazyThreadSafetyMode.None); + public string Binding { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9C18AB2705585C6A)); + var ptr = _Handle.Read(_BindingOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9C18AB2705585C6A, value); + set => Schema.SetString(_Handle, _BindingOffset.Value, value); } + private static readonly Lazy _AllowNoDrawTargetOffset = new(() => Schema.GetOffset(0x9C18AB275B687C32), LazyThreadSafetyMode.None); + public ref bool AllowNoDrawTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C18AB275B687C32)); + get => ref _Handle.AsRef(_AllowNoDrawTargetOffset.Value); } + private static readonly Lazy _AutoStartOffset = new(() => Schema.GetOffset(0x9C18AB2769B4CC76), LazyThreadSafetyMode.None); + public ref bool AutoStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C18AB2769B4CC76)); + get => ref _Handle.AsRef(_AutoStartOffset.Value); } + private static readonly Lazy _LocalPlayerOnlyOffset = new(() => Schema.GetOffset(0x9C18AB2751ED238F), LazyThreadSafetyMode.None); + public ref bool LocalPlayerOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C18AB2751ED238F)); + get => ref _Handle.AsRef(_LocalPlayerOnlyOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvInstructorVRHintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvInstructorVRHintImpl.cs index 1599ec9b7..65044b70c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvInstructorVRHintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvInstructorVRHintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,52 +17,70 @@ internal partial class CEnvInstructorVRHintImpl : CPointEntityImpl, CEnvInstruct public CEnvInstructorVRHintImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x75F3B61F74FF65FE), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x75F3B61F74FF65FE)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x75F3B61F74FF65FE, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _HintTargetEntityOffset = new(() => Schema.GetOffset(0x75F3B61F0024C1BE), LazyThreadSafetyMode.None); + public string HintTargetEntity { get { - var ptr = _Handle.Read(Schema.GetOffset(0x75F3B61F0024C1BE)); + var ptr = _Handle.Read(_HintTargetEntityOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x75F3B61F0024C1BE, value); + set => Schema.SetString(_Handle, _HintTargetEntityOffset.Value, value); } + private static readonly Lazy _TimeoutOffset = new(() => Schema.GetOffset(0x75F3B61F2EC6CDDF), LazyThreadSafetyMode.None); + public ref int Timeout { - get => ref _Handle.AsRef(Schema.GetOffset(0x75F3B61F2EC6CDDF)); + get => ref _Handle.AsRef(_TimeoutOffset.Value); } + private static readonly Lazy _CaptionOffset = new(() => Schema.GetOffset(0x75F3B61FBE8E34DD), LazyThreadSafetyMode.None); + public string Caption { get { - var ptr = _Handle.Read(Schema.GetOffset(0x75F3B61FBE8E34DD)); + var ptr = _Handle.Read(_CaptionOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x75F3B61FBE8E34DD, value); + set => Schema.SetString(_Handle, _CaptionOffset.Value, value); } + private static readonly Lazy _StartSoundOffset = new(() => Schema.GetOffset(0x75F3B61FF9B2297E), LazyThreadSafetyMode.None); + public string StartSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0x75F3B61FF9B2297E)); + var ptr = _Handle.Read(_StartSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x75F3B61FF9B2297E, value); + set => Schema.SetString(_Handle, _StartSoundOffset.Value, value); } + private static readonly Lazy _LayoutFileTypeOffset = new(() => Schema.GetOffset(0x75F3B61FAB45B364), LazyThreadSafetyMode.None); + public ref int LayoutFileType { - get => ref _Handle.AsRef(Schema.GetOffset(0x75F3B61FAB45B364)); + get => ref _Handle.AsRef(_LayoutFileTypeOffset.Value); } + private static readonly Lazy _CustomLayoutFileOffset = new(() => Schema.GetOffset(0x75F3B61F60A92CB6), LazyThreadSafetyMode.None); + public string CustomLayoutFile { get { - var ptr = _Handle.Read(Schema.GetOffset(0x75F3B61F60A92CB6)); + var ptr = _Handle.Read(_CustomLayoutFileOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x75F3B61F60A92CB6, value); + set => Schema.SetString(_Handle, _CustomLayoutFileOffset.Value, value); } + private static readonly Lazy _AttachTypeOffset = new(() => Schema.GetOffset(0x75F3B61F432E8381), LazyThreadSafetyMode.None); + public ref int AttachType { - get => ref _Handle.AsRef(Schema.GetOffset(0x75F3B61F432E8381)); + get => ref _Handle.AsRef(_AttachTypeOffset.Value); } + private static readonly Lazy _HeightOffsetOffset = new(() => Schema.GetOffset(0x75F3B61F2D0C5BF3), LazyThreadSafetyMode.None); + public ref float HeightOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x75F3B61F2D0C5BF3)); + get => ref _Handle.AsRef(_HeightOffsetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvLaserImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvLaserImpl.cs index b2ff735d9..0130a3c38 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvLaserImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvLaserImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,31 +17,41 @@ internal partial class CEnvLaserImpl : CBeamImpl, CEnvLaser { public CEnvLaserImpl(nint handle) : base(handle) { } + private static readonly Lazy _LaserTargetOffset = new(() => Schema.GetOffset(0x83A2D3C8C257F4D), LazyThreadSafetyMode.None); + public string LaserTarget { get { - var ptr = _Handle.Read(Schema.GetOffset(0x83A2D3C8C257F4D)); + var ptr = _Handle.Read(_LaserTargetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x83A2D3C8C257F4D, value); + set => Schema.SetString(_Handle, _LaserTargetOffset.Value, value); } + private static readonly Lazy _SpriteOffset = new(() => Schema.GetOffset(0x83A2D3CEFBFA166), LazyThreadSafetyMode.None); + public CSprite? Sprite { get { - var ptr = _Handle.Read(Schema.GetOffset(0x83A2D3CEFBFA166)); + var ptr = _Handle.Read(_SpriteOffset.Value); return ptr.IsValidPtr() ? new CSpriteImpl(ptr) : null; } } + private static readonly Lazy _SpriteNameOffset = new(() => Schema.GetOffset(0x83A2D3C096530FF), LazyThreadSafetyMode.None); + public string SpriteName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x83A2D3C096530FF)); + var ptr = _Handle.Read(_SpriteNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x83A2D3C096530FF, value); + set => Schema.SetString(_Handle, _SpriteNameOffset.Value, value); } + private static readonly Lazy _FirePositionOffset = new(() => Schema.GetOffset(0x83A2D3C2A7C404E), LazyThreadSafetyMode.None); + public ref Vector FirePosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x83A2D3C2A7C404E)); + get => ref _Handle.AsRef(_FirePositionOffset.Value); } + private static readonly Lazy _StartFrameOffset = new(() => Schema.GetOffset(0x83A2D3CB534B906), LazyThreadSafetyMode.None); + public ref float StartFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x83A2D3CB534B906)); + get => ref _Handle.AsRef(_StartFrameOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvLightProbeVolumeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvLightProbeVolumeImpl.cs index 10b43da40..5edf4ff9d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvLightProbeVolumeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvLightProbeVolumeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,71 +17,115 @@ internal partial class CEnvLightProbeVolumeImpl : CBaseEntityImpl, CEnvLightProb public CEnvLightProbeVolumeImpl(nint handle) : base(handle) { } + private static readonly Lazy _Entity_hLightProbeTexture_AmbientCubeOffset = new(() => Schema.GetOffset(0xA8F87EA5148FA944), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hLightProbeTexture_AmbientCube { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F87EA5148FA944)); + get => ref _Handle.AsRef>(_Entity_hLightProbeTexture_AmbientCubeOffset.Value); } + private static readonly Lazy _Entity_hLightProbeTexture_SDFOffset = new(() => Schema.GetOffset(0xA8F87EA5B0D8BE62), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hLightProbeTexture_SDF { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F87EA5B0D8BE62)); + get => ref _Handle.AsRef>(_Entity_hLightProbeTexture_SDFOffset.Value); } + private static readonly Lazy _Entity_hLightProbeTexture_SH2_DCOffset = new(() => Schema.GetOffset(0xA8F87EA5C9357F5E), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hLightProbeTexture_SH2_DC { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F87EA5C9357F5E)); + get => ref _Handle.AsRef>(_Entity_hLightProbeTexture_SH2_DCOffset.Value); } + private static readonly Lazy _Entity_hLightProbeTexture_SH2_ROffset = new(() => Schema.GetOffset(0xA8F87EA50E80FF9F), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hLightProbeTexture_SH2_R { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F87EA50E80FF9F)); + get => ref _Handle.AsRef>(_Entity_hLightProbeTexture_SH2_ROffset.Value); } + private static readonly Lazy _Entity_hLightProbeTexture_SH2_GOffset = new(() => Schema.GetOffset(0xA8F87EA5198110F0), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hLightProbeTexture_SH2_G { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F87EA5198110F0)); + get => ref _Handle.AsRef>(_Entity_hLightProbeTexture_SH2_GOffset.Value); } + private static readonly Lazy _Entity_hLightProbeTexture_SH2_BOffset = new(() => Schema.GetOffset(0xA8F87EA51E8118CF), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hLightProbeTexture_SH2_B { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F87EA51E8118CF)); + get => ref _Handle.AsRef>(_Entity_hLightProbeTexture_SH2_BOffset.Value); } + private static readonly Lazy _Entity_hLightProbeDirectLightIndicesTextureOffset = new(() => Schema.GetOffset(0xA8F87EA52251ACF2), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hLightProbeDirectLightIndicesTexture { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F87EA52251ACF2)); + get => ref _Handle.AsRef>(_Entity_hLightProbeDirectLightIndicesTextureOffset.Value); } + private static readonly Lazy _Entity_hLightProbeDirectLightScalarsTextureOffset = new(() => Schema.GetOffset(0xA8F87EA5A463880E), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hLightProbeDirectLightScalarsTexture { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F87EA5A463880E)); + get => ref _Handle.AsRef>(_Entity_hLightProbeDirectLightScalarsTextureOffset.Value); } + private static readonly Lazy _Entity_hLightProbeDirectLightShadowsTextureOffset = new(() => Schema.GetOffset(0xA8F87EA594B00D56), LazyThreadSafetyMode.None); + public ref CStrongHandle Entity_hLightProbeDirectLightShadowsTexture { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F87EA594B00D56)); + get => ref _Handle.AsRef>(_Entity_hLightProbeDirectLightShadowsTextureOffset.Value); } + private static readonly Lazy _Entity_vBoxMinsOffset = new(() => Schema.GetOffset(0xA8F87EA5D35AD599), LazyThreadSafetyMode.None); + public ref Vector Entity_vBoxMins { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F87EA5D35AD599)); + get => ref _Handle.AsRef(_Entity_vBoxMinsOffset.Value); } + private static readonly Lazy _Entity_vBoxMaxsOffset = new(() => Schema.GetOffset(0xA8F87EA57C83608B), LazyThreadSafetyMode.None); + public ref Vector Entity_vBoxMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F87EA57C83608B)); + get => ref _Handle.AsRef(_Entity_vBoxMaxsOffset.Value); } + private static readonly Lazy _Entity_bMoveableOffset = new(() => Schema.GetOffset(0xA8F87EA554059592), LazyThreadSafetyMode.None); + public ref bool Entity_bMoveable { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F87EA554059592)); + get => ref _Handle.AsRef(_Entity_bMoveableOffset.Value); } + private static readonly Lazy _Entity_nHandshakeOffset = new(() => Schema.GetOffset(0xA8F87EA5069A2774), LazyThreadSafetyMode.None); + public ref int Entity_nHandshake { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F87EA5069A2774)); + get => ref _Handle.AsRef(_Entity_nHandshakeOffset.Value); } + private static readonly Lazy _Entity_nPriorityOffset = new(() => Schema.GetOffset(0xA8F87EA5BAACBFAB), LazyThreadSafetyMode.None); + public ref int Entity_nPriority { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F87EA5BAACBFAB)); + get => ref _Handle.AsRef(_Entity_nPriorityOffset.Value); } + private static readonly Lazy _Entity_bStartDisabledOffset = new(() => Schema.GetOffset(0xA8F87EA5D04F520D), LazyThreadSafetyMode.None); + public ref bool Entity_bStartDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F87EA5D04F520D)); + get => ref _Handle.AsRef(_Entity_bStartDisabledOffset.Value); } + private static readonly Lazy _Entity_nLightProbeSizeXOffset = new(() => Schema.GetOffset(0xA8F87EA59A840E10), LazyThreadSafetyMode.None); + public ref int Entity_nLightProbeSizeX { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F87EA59A840E10)); + get => ref _Handle.AsRef(_Entity_nLightProbeSizeXOffset.Value); } + private static readonly Lazy _Entity_nLightProbeSizeYOffset = new(() => Schema.GetOffset(0xA8F87EA59B840FA3), LazyThreadSafetyMode.None); + public ref int Entity_nLightProbeSizeY { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F87EA59B840FA3)); + get => ref _Handle.AsRef(_Entity_nLightProbeSizeYOffset.Value); } + private static readonly Lazy _Entity_nLightProbeSizeZOffset = new(() => Schema.GetOffset(0xA8F87EA59C841136), LazyThreadSafetyMode.None); + public ref int Entity_nLightProbeSizeZ { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F87EA59C841136)); + get => ref _Handle.AsRef(_Entity_nLightProbeSizeZOffset.Value); } + private static readonly Lazy _Entity_nLightProbeAtlasXOffset = new(() => Schema.GetOffset(0xA8F87EA553C9E610), LazyThreadSafetyMode.None); + public ref int Entity_nLightProbeAtlasX { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F87EA553C9E610)); + get => ref _Handle.AsRef(_Entity_nLightProbeAtlasXOffset.Value); } + private static readonly Lazy _Entity_nLightProbeAtlasYOffset = new(() => Schema.GetOffset(0xA8F87EA554C9E7A3), LazyThreadSafetyMode.None); + public ref int Entity_nLightProbeAtlasY { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F87EA554C9E7A3)); + get => ref _Handle.AsRef(_Entity_nLightProbeAtlasYOffset.Value); } + private static readonly Lazy _Entity_nLightProbeAtlasZOffset = new(() => Schema.GetOffset(0xA8F87EA555C9E936), LazyThreadSafetyMode.None); + public ref int Entity_nLightProbeAtlasZ { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F87EA555C9E936)); + get => ref _Handle.AsRef(_Entity_nLightProbeAtlasZOffset.Value); } + private static readonly Lazy _Entity_bEnabledOffset = new(() => Schema.GetOffset(0xA8F87EA5453FD9DC), LazyThreadSafetyMode.None); + public ref bool Entity_bEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F87EA5453FD9DC)); + get => ref _Handle.AsRef(_Entity_bEnabledOffset.Value); } public void Entity_hLightProbeTexture_AmbientCubeUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvMuzzleFlashImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvMuzzleFlashImpl.cs index 66da6cb02..4e66c0818 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvMuzzleFlashImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvMuzzleFlashImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CEnvMuzzleFlashImpl : CPointEntityImpl, CEnvMuzzleFlash { public CEnvMuzzleFlashImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x2EBDF9DEB731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0x2EBDF9DEB731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _ParentAttachmentOffset = new(() => Schema.GetOffset(0x2EBDF9DE0061F288), LazyThreadSafetyMode.None); + public string ParentAttachment { get { - var ptr = _Handle.Read(Schema.GetOffset(0x2EBDF9DE0061F288)); + var ptr = _Handle.Read(_ParentAttachmentOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x2EBDF9DE0061F288, value); + set => Schema.SetString(_Handle, _ParentAttachmentOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvParticleGlowImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvParticleGlowImpl.cs index 464979738..47d4debc5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvParticleGlowImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvParticleGlowImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CEnvParticleGlowImpl : CParticleSystemImpl, CEnvParticleG public CEnvParticleGlowImpl(nint handle) : base(handle) { } + private static readonly Lazy _AlphaScaleOffset = new(() => Schema.GetOffset(0x38100F3AEC6D3C25), LazyThreadSafetyMode.None); + public ref float AlphaScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x38100F3AEC6D3C25)); + get => ref _Handle.AsRef(_AlphaScaleOffset.Value); } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0x38100F3AA7A20159), LazyThreadSafetyMode.None); + public ref float RadiusScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x38100F3AA7A20159)); + get => ref _Handle.AsRef(_RadiusScaleOffset.Value); } + private static readonly Lazy _SelfIllumScaleOffset = new(() => Schema.GetOffset(0x38100F3A0478CE14), LazyThreadSafetyMode.None); + public ref float SelfIllumScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x38100F3A0478CE14)); + get => ref _Handle.AsRef(_SelfIllumScaleOffset.Value); } + private static readonly Lazy _ColorTintOffset = new(() => Schema.GetOffset(0x38100F3AD55CDDFD), LazyThreadSafetyMode.None); + public ref Color ColorTint { - get => ref _Handle.AsRef(Schema.GetOffset(0x38100F3AD55CDDFD)); + get => ref _Handle.AsRef(_ColorTintOffset.Value); } + private static readonly Lazy _TextureOverrideOffset = new(() => Schema.GetOffset(0x38100F3AEC1F5A56), LazyThreadSafetyMode.None); + public ref CStrongHandle TextureOverride { - get => ref _Handle.AsRef>(Schema.GetOffset(0x38100F3AEC1F5A56)); + get => ref _Handle.AsRef>(_TextureOverrideOffset.Value); } public void AlphaScaleUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvShakeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvShakeImpl.cs index 3f38b65e1..4257fc332 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvShakeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvShakeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,39 +17,59 @@ internal partial class CEnvShakeImpl : CPointEntityImpl, CEnvShake { public CEnvShakeImpl(nint handle) : base(handle) { } + private static readonly Lazy _LimitToEntityOffset = new(() => Schema.GetOffset(0x10FEA945E1C029E2), LazyThreadSafetyMode.None); + public string LimitToEntity { get { - var ptr = _Handle.Read(Schema.GetOffset(0x10FEA945E1C029E2)); + var ptr = _Handle.Read(_LimitToEntityOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x10FEA945E1C029E2, value); + set => Schema.SetString(_Handle, _LimitToEntityOffset.Value, value); } + private static readonly Lazy _AmplitudeOffset = new(() => Schema.GetOffset(0x10FEA945A38BF822), LazyThreadSafetyMode.None); + public ref float Amplitude { - get => ref _Handle.AsRef(Schema.GetOffset(0x10FEA945A38BF822)); + get => ref _Handle.AsRef(_AmplitudeOffset.Value); } + private static readonly Lazy _FrequencyOffset = new(() => Schema.GetOffset(0x10FEA945BCCAA981), LazyThreadSafetyMode.None); + public ref float Frequency { - get => ref _Handle.AsRef(Schema.GetOffset(0x10FEA945BCCAA981)); + get => ref _Handle.AsRef(_FrequencyOffset.Value); } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0x10FEA9459879A98D), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0x10FEA9459879A98D)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x10FEA9457C5B0533), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x10FEA9457C5B0533)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _StopTimeOffset = new(() => Schema.GetOffset(0x10FEA9456BFFEDC4), LazyThreadSafetyMode.None); + public GameTime_t StopTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x10FEA9456BFFEDC4)); + get => new GameTime_tImpl(_Handle + _StopTimeOffset.Value); } + private static readonly Lazy _NextShakeOffset = new(() => Schema.GetOffset(0x10FEA94563E0833E), LazyThreadSafetyMode.None); + public GameTime_t NextShake { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x10FEA94563E0833E)); + get => new GameTime_tImpl(_Handle + _NextShakeOffset.Value); } + private static readonly Lazy _CurrentAmpOffset = new(() => Schema.GetOffset(0x10FEA94504EE10FC), LazyThreadSafetyMode.None); + public ref float CurrentAmp { - get => ref _Handle.AsRef(Schema.GetOffset(0x10FEA94504EE10FC)); + get => ref _Handle.AsRef(_CurrentAmpOffset.Value); } + private static readonly Lazy _MaxForceOffset = new(() => Schema.GetOffset(0x10FEA945FA9D37B8), LazyThreadSafetyMode.None); + public ref Vector MaxForce { - get => ref _Handle.AsRef(Schema.GetOffset(0x10FEA945FA9D37B8)); + get => ref _Handle.AsRef(_MaxForceOffset.Value); } + private static readonly Lazy _ShakeCallbackOffset = new(() => Schema.GetOffset(0x10FEA945C4E1E076), LazyThreadSafetyMode.None); + public CPhysicsShake ShakeCallback { - get => new CPhysicsShakeImpl(_Handle + Schema.GetOffset(0x10FEA945C4E1E076)); + get => new CPhysicsShakeImpl(_Handle + _ShakeCallbackOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSkyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSkyImpl.cs index 9b7f10f90..0419f1cd6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSkyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSkyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,65 @@ internal partial class CEnvSkyImpl : CBaseModelEntityImpl, CEnvSky { public CEnvSkyImpl(nint handle) : base(handle) { } + private static readonly Lazy _SkyMaterialOffset = new(() => Schema.GetOffset(0x34E51BE6C887319D), LazyThreadSafetyMode.None); + public ref CStrongHandle SkyMaterial { - get => ref _Handle.AsRef>(Schema.GetOffset(0x34E51BE6C887319D)); + get => ref _Handle.AsRef>(_SkyMaterialOffset.Value); } + private static readonly Lazy _SkyMaterialLightingOnlyOffset = new(() => Schema.GetOffset(0x34E51BE6E01C512B), LazyThreadSafetyMode.None); + public ref CStrongHandle SkyMaterialLightingOnly { - get => ref _Handle.AsRef>(Schema.GetOffset(0x34E51BE6E01C512B)); + get => ref _Handle.AsRef>(_SkyMaterialLightingOnlyOffset.Value); } + private static readonly Lazy _StartDisabledOffset = new(() => Schema.GetOffset(0x34E51BE661ED0C4F), LazyThreadSafetyMode.None); + public ref bool StartDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x34E51BE661ED0C4F)); + get => ref _Handle.AsRef(_StartDisabledOffset.Value); } + private static readonly Lazy _TintColorOffset = new(() => Schema.GetOffset(0x34E51BE650AFF21F), LazyThreadSafetyMode.None); + public ref Color TintColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x34E51BE650AFF21F)); + get => ref _Handle.AsRef(_TintColorOffset.Value); } + private static readonly Lazy _TintColorLightingOnlyOffset = new(() => Schema.GetOffset(0x34E51BE6D8D1D8C9), LazyThreadSafetyMode.None); + public ref Color TintColorLightingOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0x34E51BE6D8D1D8C9)); + get => ref _Handle.AsRef(_TintColorLightingOnlyOffset.Value); } + private static readonly Lazy _BrightnessScaleOffset = new(() => Schema.GetOffset(0x34E51BE65EFC3AAE), LazyThreadSafetyMode.None); + public ref float BrightnessScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x34E51BE65EFC3AAE)); + get => ref _Handle.AsRef(_BrightnessScaleOffset.Value); } + private static readonly Lazy _FogTypeOffset = new(() => Schema.GetOffset(0x34E51BE6381735D3), LazyThreadSafetyMode.None); + public ref int FogType { - get => ref _Handle.AsRef(Schema.GetOffset(0x34E51BE6381735D3)); + get => ref _Handle.AsRef(_FogTypeOffset.Value); } + private static readonly Lazy _FogMinStartOffset = new(() => Schema.GetOffset(0x34E51BE62D8BACA9), LazyThreadSafetyMode.None); + public ref float FogMinStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x34E51BE62D8BACA9)); + get => ref _Handle.AsRef(_FogMinStartOffset.Value); } + private static readonly Lazy _FogMinEndOffset = new(() => Schema.GetOffset(0x34E51BE69BF661F8), LazyThreadSafetyMode.None); + public ref float FogMinEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x34E51BE69BF661F8)); + get => ref _Handle.AsRef(_FogMinEndOffset.Value); } + private static readonly Lazy _FogMaxStartOffset = new(() => Schema.GetOffset(0x34E51BE6DACCD72F), LazyThreadSafetyMode.None); + public ref float FogMaxStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x34E51BE6DACCD72F)); + get => ref _Handle.AsRef(_FogMaxStartOffset.Value); } + private static readonly Lazy _FogMaxEndOffset = new(() => Schema.GetOffset(0x34E51BE61D0E34BA), LazyThreadSafetyMode.None); + public ref float FogMaxEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x34E51BE61D0E34BA)); + get => ref _Handle.AsRef(_FogMaxEndOffset.Value); } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0x34E51BE66154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x34E51BE66154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } public void SkyMaterialUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeAlias_snd_soundscapeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeAlias_snd_soundscapeImpl.cs index e4bf0abcb..bd5323e9c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeAlias_snd_soundscapeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeAlias_snd_soundscapeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeImpl.cs index 802d0a32d..e122c4e1c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,50 +17,72 @@ internal partial class CEnvSoundscapeImpl : CBaseEntityImpl, CEnvSoundscape { public CEnvSoundscapeImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnPlayOffset = new(() => Schema.GetOffset(0x4C8F896A5C0BA6F2), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPlay { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x4C8F896A5C0BA6F2)); + get => new CEntityIOOutputImpl(_Handle + _OnPlayOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x4C8F896A5ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C8F896A5ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _SoundEventNameOffset = new(() => Schema.GetOffset(0x4C8F896AABB0F687), LazyThreadSafetyMode.None); + public string SoundEventName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4C8F896AABB0F687)); + var ptr = _Handle.Read(_SoundEventNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x4C8F896AABB0F687, value); + set => Schema.SetString(_Handle, _SoundEventNameOffset.Value, value); } + private static readonly Lazy _OverrideWithEventOffset = new(() => Schema.GetOffset(0x4C8F896A3DF1E5DB), LazyThreadSafetyMode.None); + public ref bool OverrideWithEvent { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C8F896A3DF1E5DB)); + get => ref _Handle.AsRef(_OverrideWithEventOffset.Value); } + private static readonly Lazy _SoundscapeIndexOffset = new(() => Schema.GetOffset(0x4C8F896A08B091CE), LazyThreadSafetyMode.None); + public ref int SoundscapeIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C8F896A08B091CE)); + get => ref _Handle.AsRef(_SoundscapeIndexOffset.Value); } + private static readonly Lazy _SoundscapeEntityListIdOffset = new(() => Schema.GetOffset(0x4C8F896A4F4663F0), LazyThreadSafetyMode.None); + public ref int SoundscapeEntityListId { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C8F896A4F4663F0)); + get => ref _Handle.AsRef(_SoundscapeEntityListIdOffset.Value); } + private static readonly Lazy _PositionNamesOffset = new(() => Schema.GetOffset(0x4C8F896A53DB5F86), LazyThreadSafetyMode.None); + public string PositionNames { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4C8F896A53DB5F86)); + var ptr = _Handle.Read(_PositionNamesOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x4C8F896A53DB5F86, value); + set => Schema.SetString(_Handle, _PositionNamesOffset.Value, value); } + private static readonly Lazy _ProxySoundscapeOffset = new(() => Schema.GetOffset(0x4C8F896ABC23786E), LazyThreadSafetyMode.None); + public ref CHandle ProxySoundscape { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4C8F896ABC23786E)); + get => ref _Handle.AsRef>(_ProxySoundscapeOffset.Value); } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x4C8F896A3A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C8F896A3A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _SoundscapeNameOffset = new(() => Schema.GetOffset(0x4C8F896ABBF7AD61), LazyThreadSafetyMode.None); + public string SoundscapeName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4C8F896ABBF7AD61)); + var ptr = _Handle.Read(_SoundscapeNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x4C8F896ABBF7AD61, value); + set => Schema.SetString(_Handle, _SoundscapeNameOffset.Value, value); } + private static readonly Lazy _SoundEventHashOffset = new(() => Schema.GetOffset(0x4C8F896AC126D1EC), LazyThreadSafetyMode.None); + public ref uint SoundEventHash { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C8F896AC126D1EC)); + get => ref _Handle.AsRef(_SoundEventHashOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeProxyAlias_snd_soundscape_proxyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeProxyAlias_snd_soundscape_proxyImpl.cs index 139daecb0..1d530b8c4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeProxyAlias_snd_soundscape_proxyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeProxyAlias_snd_soundscape_proxyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeProxyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeProxyImpl.cs index 44c5ee90c..6cd142a4c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeProxyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeProxyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CEnvSoundscapeProxyImpl : CEnvSoundscapeImpl, CEnvSoundsc public CEnvSoundscapeProxyImpl(nint handle) : base(handle) { } + private static readonly Lazy _MainSoundscapeNameOffset = new(() => Schema.GetOffset(0x58127BA672404420), LazyThreadSafetyMode.None); + public string MainSoundscapeName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x58127BA672404420)); + var ptr = _Handle.Read(_MainSoundscapeNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x58127BA672404420, value); + set => Schema.SetString(_Handle, _MainSoundscapeNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeTriggerableAlias_snd_soundscape_triggerableImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeTriggerableAlias_snd_soundscape_triggerableImpl.cs index 092e5bcd2..8863c71f3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeTriggerableAlias_snd_soundscape_triggerableImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeTriggerableAlias_snd_soundscape_triggerableImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeTriggerableImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeTriggerableImpl.cs index 2178de466..d11578cf4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeTriggerableImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSoundscapeTriggerableImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSparkImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSparkImpl.cs index 2cdf2d66e..dbcf01a51 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSparkImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSparkImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CEnvSparkImpl : CPointEntityImpl, CEnvSpark { public CEnvSparkImpl(nint handle) : base(handle) { } + private static readonly Lazy _DelayOffset = new(() => Schema.GetOffset(0x3BACCABA7D68FD6E), LazyThreadSafetyMode.None); + public ref float Delay { - get => ref _Handle.AsRef(Schema.GetOffset(0x3BACCABA7D68FD6E)); + get => ref _Handle.AsRef(_DelayOffset.Value); } + private static readonly Lazy _MagnitudeOffset = new(() => Schema.GetOffset(0x3BACCABA0C71BDF1), LazyThreadSafetyMode.None); + public ref int Magnitude { - get => ref _Handle.AsRef(Schema.GetOffset(0x3BACCABA0C71BDF1)); + get => ref _Handle.AsRef(_MagnitudeOffset.Value); } + private static readonly Lazy _TrailLengthOffset = new(() => Schema.GetOffset(0x3BACCABA65AAB1A7), LazyThreadSafetyMode.None); + public ref int TrailLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x3BACCABA65AAB1A7)); + get => ref _Handle.AsRef(_TrailLengthOffset.Value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x3BACCABA18853D59), LazyThreadSafetyMode.None); + public ref int Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x3BACCABA18853D59)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _OnSparkOffset = new(() => Schema.GetOffset(0x3BACCABA67E1EE5D), LazyThreadSafetyMode.None); + public CEntityIOOutput OnSpark { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x3BACCABA67E1EE5D)); + get => new CEntityIOOutputImpl(_Handle + _OnSparkOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSplashImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSplashImpl.cs index f3d5ec14e..6d375906a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSplashImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvSplashImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CEnvSplashImpl : CPointEntityImpl, CEnvSplash { public CEnvSplashImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x7DD98956B731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0x7DD98956B731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvTiltImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvTiltImpl.cs index 2a27a10cd..14dd2dbf6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvTiltImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvTiltImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CEnvTiltImpl : CPointEntityImpl, CEnvTilt { public CEnvTiltImpl(nint handle) : base(handle) { } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0xF90425169879A98D), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0xF90425169879A98D)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0xF90425167C5B0533), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0xF90425167C5B0533)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _TiltTimeOffset = new(() => Schema.GetOffset(0xF9042516B3956BFF), LazyThreadSafetyMode.None); + public ref float TiltTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xF9042516B3956BFF)); + get => ref _Handle.AsRef(_TiltTimeOffset.Value); } + private static readonly Lazy _StopTimeOffset = new(() => Schema.GetOffset(0xF90425166BFFEDC4), LazyThreadSafetyMode.None); + public GameTime_t StopTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xF90425166BFFEDC4)); + get => new GameTime_tImpl(_Handle + _StopTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvViewPunchImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvViewPunchImpl.cs index 0577cc9a7..a3f62898d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvViewPunchImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvViewPunchImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CEnvViewPunchImpl : CPointEntityImpl, CEnvViewPunch { public CEnvViewPunchImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0xB707E1B05ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0xB707E1B05ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _ViewPunchOffset = new(() => Schema.GetOffset(0xB707E1B0061B7CBA), LazyThreadSafetyMode.None); + public ref QAngle ViewPunch { - get => ref _Handle.AsRef(Schema.GetOffset(0xB707E1B0061B7CBA)); + get => ref _Handle.AsRef(_ViewPunchOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvVolumetricFogControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvVolumetricFogControllerImpl.cs index fcf078a55..5e09b048a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvVolumetricFogControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvVolumetricFogControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,113 +17,185 @@ internal partial class CEnvVolumetricFogControllerImpl : CBaseEntityImpl, CEnvVo public CEnvVolumetricFogControllerImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScatteringOffset = new(() => Schema.GetOffset(0x2A8A520FE243F9E5), LazyThreadSafetyMode.None); + public ref float Scattering { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520FE243F9E5)); + get => ref _Handle.AsRef(_ScatteringOffset.Value); } + private static readonly Lazy _TintColorOffset = new(() => Schema.GetOffset(0x2A8A520FAF2613F3), LazyThreadSafetyMode.None); + public ref Color TintColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520FAF2613F3)); + get => ref _Handle.AsRef(_TintColorOffset.Value); } + private static readonly Lazy _AnisotropyOffset = new(() => Schema.GetOffset(0x2A8A520FE7F1A723), LazyThreadSafetyMode.None); + public ref float Anisotropy { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520FE7F1A723)); + get => ref _Handle.AsRef(_AnisotropyOffset.Value); } + private static readonly Lazy _FadeSpeedOffset = new(() => Schema.GetOffset(0x2A8A520FC041A38C), LazyThreadSafetyMode.None); + public ref float FadeSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520FC041A38C)); + get => ref _Handle.AsRef(_FadeSpeedOffset.Value); } + private static readonly Lazy _DrawDistanceOffset = new(() => Schema.GetOffset(0x2A8A520F57522D4A), LazyThreadSafetyMode.None); + public ref float DrawDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520F57522D4A)); + get => ref _Handle.AsRef(_DrawDistanceOffset.Value); } + private static readonly Lazy _FadeInStartOffset = new(() => Schema.GetOffset(0x2A8A520FF5AD2D6A), LazyThreadSafetyMode.None); + public ref float FadeInStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520FF5AD2D6A)); + get => ref _Handle.AsRef(_FadeInStartOffset.Value); } + private static readonly Lazy _FadeInEndOffset = new(() => Schema.GetOffset(0x2A8A520FE2C847BF), LazyThreadSafetyMode.None); + public ref float FadeInEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520FE2C847BF)); + get => ref _Handle.AsRef(_FadeInEndOffset.Value); } + private static readonly Lazy _IndirectStrengthOffset = new(() => Schema.GetOffset(0x2A8A520F559AA198), LazyThreadSafetyMode.None); + public ref float IndirectStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520F559AA198)); + get => ref _Handle.AsRef(_IndirectStrengthOffset.Value); } + private static readonly Lazy _VolumeDepthOffset = new(() => Schema.GetOffset(0x2A8A520F2276C184), LazyThreadSafetyMode.None); + public ref int VolumeDepth { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520F2276C184)); + get => ref _Handle.AsRef(_VolumeDepthOffset.Value); } + private static readonly Lazy _FirstVolumeSliceThicknessOffset = new(() => Schema.GetOffset(0x2A8A520FCB8BF49F), LazyThreadSafetyMode.None); + public ref float FirstVolumeSliceThickness { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520FCB8BF49F)); + get => ref _Handle.AsRef(_FirstVolumeSliceThicknessOffset.Value); } + private static readonly Lazy _IndirectTextureDimXOffset = new(() => Schema.GetOffset(0x2A8A520F885076D4), LazyThreadSafetyMode.None); + public ref int IndirectTextureDimX { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520F885076D4)); + get => ref _Handle.AsRef(_IndirectTextureDimXOffset.Value); } + private static readonly Lazy _IndirectTextureDimYOffset = new(() => Schema.GetOffset(0x2A8A520F89507867), LazyThreadSafetyMode.None); + public ref int IndirectTextureDimY { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520F89507867)); + get => ref _Handle.AsRef(_IndirectTextureDimYOffset.Value); } + private static readonly Lazy _IndirectTextureDimZOffset = new(() => Schema.GetOffset(0x2A8A520F8A5079FA), LazyThreadSafetyMode.None); + public ref int IndirectTextureDimZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520F8A5079FA)); + get => ref _Handle.AsRef(_IndirectTextureDimZOffset.Value); } + private static readonly Lazy _BoxMinsOffset = new(() => Schema.GetOffset(0x2A8A520FD8201373), LazyThreadSafetyMode.None); + public ref Vector BoxMins { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520FD8201373)); + get => ref _Handle.AsRef(_BoxMinsOffset.Value); } + private static readonly Lazy _BoxMaxsOffset = new(() => Schema.GetOffset(0x2A8A520F817A3B31), LazyThreadSafetyMode.None); + public ref Vector BoxMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520F817A3B31)); + get => ref _Handle.AsRef(_BoxMaxsOffset.Value); } + private static readonly Lazy _ActiveOffset = new(() => Schema.GetOffset(0x2A8A520F8334208F), LazyThreadSafetyMode.None); + public ref bool Active { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520F8334208F)); + get => ref _Handle.AsRef(_ActiveOffset.Value); } + private static readonly Lazy _StartAnisoTimeOffset = new(() => Schema.GetOffset(0x2A8A520F84853AEE), LazyThreadSafetyMode.None); + public GameTime_t StartAnisoTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x2A8A520F84853AEE)); + get => new GameTime_tImpl(_Handle + _StartAnisoTimeOffset.Value); } + private static readonly Lazy _StartScatterTimeOffset = new(() => Schema.GetOffset(0x2A8A520F550791B8), LazyThreadSafetyMode.None); + public GameTime_t StartScatterTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x2A8A520F550791B8)); + get => new GameTime_tImpl(_Handle + _StartScatterTimeOffset.Value); } + private static readonly Lazy _StartDrawDistanceTimeOffset = new(() => Schema.GetOffset(0x2A8A520F0108704D), LazyThreadSafetyMode.None); + public GameTime_t StartDrawDistanceTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x2A8A520F0108704D)); + get => new GameTime_tImpl(_Handle + _StartDrawDistanceTimeOffset.Value); } + private static readonly Lazy _StartAnisotropyOffset = new(() => Schema.GetOffset(0x2A8A520FCFF4A7DD), LazyThreadSafetyMode.None); + public ref float StartAnisotropy { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520FCFF4A7DD)); + get => ref _Handle.AsRef(_StartAnisotropyOffset.Value); } + private static readonly Lazy _StartScatteringOffset = new(() => Schema.GetOffset(0x2A8A520F134FA97F), LazyThreadSafetyMode.None); + public ref float StartScattering { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520F134FA97F)); + get => ref _Handle.AsRef(_StartScatteringOffset.Value); } + private static readonly Lazy _StartDrawDistanceOffset = new(() => Schema.GetOffset(0x2A8A520FCF179D0C), LazyThreadSafetyMode.None); + public ref float StartDrawDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520FCF179D0C)); + get => ref _Handle.AsRef(_StartDrawDistanceOffset.Value); } + private static readonly Lazy _DefaultAnisotropyOffset = new(() => Schema.GetOffset(0x2A8A520FB9484338), LazyThreadSafetyMode.None); + public ref float DefaultAnisotropy { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520FB9484338)); + get => ref _Handle.AsRef(_DefaultAnisotropyOffset.Value); } + private static readonly Lazy _DefaultScatteringOffset = new(() => Schema.GetOffset(0x2A8A520F3F2D053A), LazyThreadSafetyMode.None); + public ref float DefaultScattering { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520F3F2D053A)); + get => ref _Handle.AsRef(_DefaultScatteringOffset.Value); } + private static readonly Lazy _DefaultDrawDistanceOffset = new(() => Schema.GetOffset(0x2A8A520FCCADC381), LazyThreadSafetyMode.None); + public ref float DefaultDrawDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520FCCADC381)); + get => ref _Handle.AsRef(_DefaultDrawDistanceOffset.Value); } + private static readonly Lazy _StartDisabledOffset = new(() => Schema.GetOffset(0x2A8A520F61ED0C4F), LazyThreadSafetyMode.None); + public ref bool StartDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520F61ED0C4F)); + get => ref _Handle.AsRef(_StartDisabledOffset.Value); } + private static readonly Lazy _EnableIndirectOffset = new(() => Schema.GetOffset(0x2A8A520FD9682660), LazyThreadSafetyMode.None); + public ref bool EnableIndirect { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520FD9682660)); + get => ref _Handle.AsRef(_EnableIndirectOffset.Value); } + private static readonly Lazy _IsMasterOffset = new(() => Schema.GetOffset(0x2A8A520FDE5719A3), LazyThreadSafetyMode.None); + public ref bool IsMaster { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520FDE5719A3)); + get => ref _Handle.AsRef(_IsMasterOffset.Value); } + private static readonly Lazy _FogIndirectTextureOffset = new(() => Schema.GetOffset(0x2A8A520FD42D635A), LazyThreadSafetyMode.None); + public ref CStrongHandle FogIndirectTexture { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2A8A520FD42D635A)); + get => ref _Handle.AsRef>(_FogIndirectTextureOffset.Value); } + private static readonly Lazy _ForceRefreshCountOffset = new(() => Schema.GetOffset(0x2A8A520F77E98C4A), LazyThreadSafetyMode.None); + public ref int ForceRefreshCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520F77E98C4A)); + get => ref _Handle.AsRef(_ForceRefreshCountOffset.Value); } + private static readonly Lazy _NoiseSpeedOffset = new(() => Schema.GetOffset(0x2A8A520F5C5BB620), LazyThreadSafetyMode.None); + public ref float NoiseSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520F5C5BB620)); + get => ref _Handle.AsRef(_NoiseSpeedOffset.Value); } + private static readonly Lazy _NoiseStrengthOffset = new(() => Schema.GetOffset(0x2A8A520F556ED5D0), LazyThreadSafetyMode.None); + public ref float NoiseStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520F556ED5D0)); + get => ref _Handle.AsRef(_NoiseStrengthOffset.Value); } + private static readonly Lazy _NoiseScaleOffset = new(() => Schema.GetOffset(0x2A8A520F420F9B01), LazyThreadSafetyMode.None); + public ref Vector NoiseScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520F420F9B01)); + get => ref _Handle.AsRef(_NoiseScaleOffset.Value); } + private static readonly Lazy _WindSpeedOffset = new(() => Schema.GetOffset(0x2A8A520F37AADB3E), LazyThreadSafetyMode.None); + public ref float WindSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520F37AADB3E)); + get => ref _Handle.AsRef(_WindSpeedOffset.Value); } + private static readonly Lazy _WindDirectionOffset = new(() => Schema.GetOffset(0x2A8A520FED0F7D3C), LazyThreadSafetyMode.None); + public ref Vector WindDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520FED0F7D3C)); + get => ref _Handle.AsRef(_WindDirectionOffset.Value); } + private static readonly Lazy _FirstTimeOffset = new(() => Schema.GetOffset(0x2A8A520FD23C3138), LazyThreadSafetyMode.None); + public ref bool FirstTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A8A520FD23C3138)); + get => ref _Handle.AsRef(_FirstTimeOffset.Value); } public void ScatteringUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvVolumetricFogVolumeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvVolumetricFogVolumeImpl.cs index d13ab4f42..3fe08a04f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvVolumetricFogVolumeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvVolumetricFogVolumeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,59 +17,95 @@ internal partial class CEnvVolumetricFogVolumeImpl : CBaseEntityImpl, CEnvVolume public CEnvVolumetricFogVolumeImpl(nint handle) : base(handle) { } + private static readonly Lazy _ActiveOffset = new(() => Schema.GetOffset(0x5EDE5CBD8334208F), LazyThreadSafetyMode.None); + public ref bool Active { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EDE5CBD8334208F)); + get => ref _Handle.AsRef(_ActiveOffset.Value); } + private static readonly Lazy _BoxMinsOffset = new(() => Schema.GetOffset(0x5EDE5CBDD8201373), LazyThreadSafetyMode.None); + public ref Vector BoxMins { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EDE5CBDD8201373)); + get => ref _Handle.AsRef(_BoxMinsOffset.Value); } + private static readonly Lazy _BoxMaxsOffset = new(() => Schema.GetOffset(0x5EDE5CBD817A3B31), LazyThreadSafetyMode.None); + public ref Vector BoxMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EDE5CBD817A3B31)); + get => ref _Handle.AsRef(_BoxMaxsOffset.Value); } + private static readonly Lazy _StartDisabledOffset = new(() => Schema.GetOffset(0x5EDE5CBD61ED0C4F), LazyThreadSafetyMode.None); + public ref bool StartDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EDE5CBD61ED0C4F)); + get => ref _Handle.AsRef(_StartDisabledOffset.Value); } + private static readonly Lazy _IndirectUseLPVsOffset = new(() => Schema.GetOffset(0x5EDE5CBDF6508E3D), LazyThreadSafetyMode.None); + public ref bool IndirectUseLPVs { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EDE5CBDF6508E3D)); + get => ref _Handle.AsRef(_IndirectUseLPVsOffset.Value); } + private static readonly Lazy _StrengthOffset = new(() => Schema.GetOffset(0x5EDE5CBD8F67AF1A), LazyThreadSafetyMode.None); + public ref float Strength { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EDE5CBD8F67AF1A)); + get => ref _Handle.AsRef(_StrengthOffset.Value); } + private static readonly Lazy _FalloffShapeOffset = new(() => Schema.GetOffset(0x5EDE5CBD413F21CA), LazyThreadSafetyMode.None); + public ref int FalloffShape { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EDE5CBD413F21CA)); + get => ref _Handle.AsRef(_FalloffShapeOffset.Value); } + private static readonly Lazy _FalloffExponentOffset = new(() => Schema.GetOffset(0x5EDE5CBDE4B7D948), LazyThreadSafetyMode.None); + public ref float FalloffExponent { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EDE5CBDE4B7D948)); + get => ref _Handle.AsRef(_FalloffExponentOffset.Value); } + private static readonly Lazy _HeightFogDepthOffset = new(() => Schema.GetOffset(0x5EDE5CBDE7A4BA15), LazyThreadSafetyMode.None); + public ref float HeightFogDepth { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EDE5CBDE7A4BA15)); + get => ref _Handle.AsRef(_HeightFogDepthOffset.Value); } + private static readonly Lazy _HeightFogEdgeWidthOffset = new(() => Schema.GetOffset(0x5EDE5CBD4605AE81), LazyThreadSafetyMode.None); + public ref float HeightFogEdgeWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EDE5CBD4605AE81)); + get => ref _Handle.AsRef(_HeightFogEdgeWidthOffset.Value); } + private static readonly Lazy _IndirectLightStrengthOffset = new(() => Schema.GetOffset(0x5EDE5CBD1CE20160), LazyThreadSafetyMode.None); + public ref float IndirectLightStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EDE5CBD1CE20160)); + get => ref _Handle.AsRef(_IndirectLightStrengthOffset.Value); } + private static readonly Lazy _SunLightStrengthOffset = new(() => Schema.GetOffset(0x5EDE5CBDDE47D3A2), LazyThreadSafetyMode.None); + public ref float SunLightStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EDE5CBDDE47D3A2)); + get => ref _Handle.AsRef(_SunLightStrengthOffset.Value); } + private static readonly Lazy _NoiseStrengthOffset = new(() => Schema.GetOffset(0x5EDE5CBD556ED5D0), LazyThreadSafetyMode.None); + public ref float NoiseStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EDE5CBD556ED5D0)); + get => ref _Handle.AsRef(_NoiseStrengthOffset.Value); } + private static readonly Lazy _TintColorOffset = new(() => Schema.GetOffset(0x5EDE5CBDAF2613F3), LazyThreadSafetyMode.None); + public ref Color TintColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EDE5CBDAF2613F3)); + get => ref _Handle.AsRef(_TintColorOffset.Value); } + private static readonly Lazy _OverrideTintColorOffset = new(() => Schema.GetOffset(0x5EDE5CBDF384934B), LazyThreadSafetyMode.None); + public ref bool OverrideTintColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EDE5CBDF384934B)); + get => ref _Handle.AsRef(_OverrideTintColorOffset.Value); } + private static readonly Lazy _OverrideIndirectLightStrengthOffset = new(() => Schema.GetOffset(0x5EDE5CBD9AA2A58C), LazyThreadSafetyMode.None); + public ref bool OverrideIndirectLightStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EDE5CBD9AA2A58C)); + get => ref _Handle.AsRef(_OverrideIndirectLightStrengthOffset.Value); } + private static readonly Lazy _OverrideSunLightStrengthOffset = new(() => Schema.GetOffset(0x5EDE5CBD892B7A46), LazyThreadSafetyMode.None); + public ref bool OverrideSunLightStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EDE5CBD892B7A46)); + get => ref _Handle.AsRef(_OverrideSunLightStrengthOffset.Value); } + private static readonly Lazy _OverrideNoiseStrengthOffset = new(() => Schema.GetOffset(0x5EDE5CBD47655E8C), LazyThreadSafetyMode.None); + public ref bool OverrideNoiseStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EDE5CBD47655E8C)); + get => ref _Handle.AsRef(_OverrideNoiseStrengthOffset.Value); } public void ActiveUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvWindControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvWindControllerImpl.cs index e14d401e5..80d45b0a0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvWindControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvWindControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class CEnvWindControllerImpl : CBaseEntityImpl, CEnvWindControl public CEnvWindControllerImpl(nint handle) : base(handle) { } + private static readonly Lazy _EnvWindSharedOffset = new(() => Schema.GetOffset(0x85B1A0AB75DDCB0F), LazyThreadSafetyMode.None); + public CEnvWindShared EnvWindShared { - get => new CEnvWindSharedImpl(_Handle + Schema.GetOffset(0x85B1A0AB75DDCB0F)); + get => new CEnvWindSharedImpl(_Handle + _EnvWindSharedOffset.Value); } + private static readonly Lazy _DirectionVariationOffset = new(() => Schema.GetOffset(0x85B1A0AB72560E57), LazyThreadSafetyMode.None); + public ref float DirectionVariation { - get => ref _Handle.AsRef(Schema.GetOffset(0x85B1A0AB72560E57)); + get => ref _Handle.AsRef(_DirectionVariationOffset.Value); } + private static readonly Lazy _SpeedVariationOffset = new(() => Schema.GetOffset(0x85B1A0AB19844531), LazyThreadSafetyMode.None); + public ref float SpeedVariation { - get => ref _Handle.AsRef(Schema.GetOffset(0x85B1A0AB19844531)); + get => ref _Handle.AsRef(_SpeedVariationOffset.Value); } + private static readonly Lazy _TurbulenceOffset = new(() => Schema.GetOffset(0x85B1A0AB8E2CE730), LazyThreadSafetyMode.None); + public ref float Turbulence { - get => ref _Handle.AsRef(Schema.GetOffset(0x85B1A0AB8E2CE730)); + get => ref _Handle.AsRef(_TurbulenceOffset.Value); } + private static readonly Lazy _VolumeHalfExtentXYOffset = new(() => Schema.GetOffset(0x85B1A0AB2445F06D), LazyThreadSafetyMode.None); + public ref float VolumeHalfExtentXY { - get => ref _Handle.AsRef(Schema.GetOffset(0x85B1A0AB2445F06D)); + get => ref _Handle.AsRef(_VolumeHalfExtentXYOffset.Value); } + private static readonly Lazy _VolumeHalfExtentZOffset = new(() => Schema.GetOffset(0x85B1A0AB9BA18280), LazyThreadSafetyMode.None); + public ref float VolumeHalfExtentZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x85B1A0AB9BA18280)); + get => ref _Handle.AsRef(_VolumeHalfExtentZOffset.Value); } + private static readonly Lazy _VolumeResolutionXYOffset = new(() => Schema.GetOffset(0x85B1A0AB97B5AB36), LazyThreadSafetyMode.None); + public ref int VolumeResolutionXY { - get => ref _Handle.AsRef(Schema.GetOffset(0x85B1A0AB97B5AB36)); + get => ref _Handle.AsRef(_VolumeResolutionXYOffset.Value); } + private static readonly Lazy _VolumeResolutionZOffset = new(() => Schema.GetOffset(0x85B1A0ABA1610511), LazyThreadSafetyMode.None); + public ref int VolumeResolutionZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x85B1A0ABA1610511)); + get => ref _Handle.AsRef(_VolumeResolutionZOffset.Value); } + private static readonly Lazy _ClipmapLevelsOffset = new(() => Schema.GetOffset(0x85B1A0AB5B9AA8D4), LazyThreadSafetyMode.None); + public ref int ClipmapLevels { - get => ref _Handle.AsRef(Schema.GetOffset(0x85B1A0AB5B9AA8D4)); + get => ref _Handle.AsRef(_ClipmapLevelsOffset.Value); } + private static readonly Lazy _IsMasterOffset = new(() => Schema.GetOffset(0x85B1A0ABDE5719A3), LazyThreadSafetyMode.None); + public ref bool IsMaster { - get => ref _Handle.AsRef(Schema.GetOffset(0x85B1A0ABDE5719A3)); + get => ref _Handle.AsRef(_IsMasterOffset.Value); } + private static readonly Lazy _FirstTimeOffset = new(() => Schema.GetOffset(0x85B1A0ABD23C3138), LazyThreadSafetyMode.None); + public ref bool FirstTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x85B1A0ABD23C3138)); + get => ref _Handle.AsRef(_FirstTimeOffset.Value); } public void EnvWindSharedUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvWindImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvWindImpl.cs index cc113961d..d4903ac5c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvWindImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvWindImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CEnvWindImpl : CBaseEntityImpl, CEnvWind { public CEnvWindImpl(nint handle) : base(handle) { } + private static readonly Lazy _EnvWindSharedOffset = new(() => Schema.GetOffset(0x39465FB775DDCB0F), LazyThreadSafetyMode.None); + public CEnvWindShared EnvWindShared { - get => new CEnvWindSharedImpl(_Handle + Schema.GetOffset(0x39465FB775DDCB0F)); + get => new CEnvWindSharedImpl(_Handle + _EnvWindSharedOffset.Value); } public void EnvWindSharedUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvWindSharedImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvWindSharedImpl.cs index 0192233fb..7d63fd3c6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvWindSharedImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvWindSharedImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,56 +17,90 @@ internal partial class CEnvWindSharedImpl : SchemaClass, CEnvWindShared { public CEnvWindSharedImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0x4E8F86FE67FE9DC4), LazyThreadSafetyMode.None); + public GameTime_t StartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x4E8F86FE67FE9DC4)); + get => new GameTime_tImpl(_Handle + _StartTimeOffset.Value); } + private static readonly Lazy _WindSeedOffset = new(() => Schema.GetOffset(0x4E8F86FE2F7E304B), LazyThreadSafetyMode.None); + public ref uint WindSeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E8F86FE2F7E304B)); + get => ref _Handle.AsRef(_WindSeedOffset.Value); } + private static readonly Lazy _MinWindOffset = new(() => Schema.GetOffset(0x4E8F86FE19B7F0B6), LazyThreadSafetyMode.None); + public ref ushort MinWind { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E8F86FE19B7F0B6)); + get => ref _Handle.AsRef(_MinWindOffset.Value); } + private static readonly Lazy _MaxWindOffset = new(() => Schema.GetOffset(0x4E8F86FE427465A0), LazyThreadSafetyMode.None); + public ref ushort MaxWind { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E8F86FE427465A0)); + get => ref _Handle.AsRef(_MaxWindOffset.Value); } + private static readonly Lazy _WindRadiusOffset = new(() => Schema.GetOffset(0x4E8F86FED57577F5), LazyThreadSafetyMode.None); + public ref int WindRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E8F86FED57577F5)); + get => ref _Handle.AsRef(_WindRadiusOffset.Value); } + private static readonly Lazy _MinGustOffset = new(() => Schema.GetOffset(0x4E8F86FEA1FFC04F), LazyThreadSafetyMode.None); + public ref ushort MinGust { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E8F86FEA1FFC04F)); + get => ref _Handle.AsRef(_MinGustOffset.Value); } + private static readonly Lazy _MaxGustOffset = new(() => Schema.GetOffset(0x4E8F86FEF0A3B1C9), LazyThreadSafetyMode.None); + public ref ushort MaxGust { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E8F86FEF0A3B1C9)); + get => ref _Handle.AsRef(_MaxGustOffset.Value); } + private static readonly Lazy _MinGustDelayOffset = new(() => Schema.GetOffset(0x4E8F86FE2A8BCB2D), LazyThreadSafetyMode.None); + public ref float MinGustDelay { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E8F86FE2A8BCB2D)); + get => ref _Handle.AsRef(_MinGustDelayOffset.Value); } + private static readonly Lazy _MaxGustDelayOffset = new(() => Schema.GetOffset(0x4E8F86FE53D781CF), LazyThreadSafetyMode.None); + public ref float MaxGustDelay { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E8F86FE53D781CF)); + get => ref _Handle.AsRef(_MaxGustDelayOffset.Value); } + private static readonly Lazy _GustDurationOffset = new(() => Schema.GetOffset(0x4E8F86FE1FD88D18), LazyThreadSafetyMode.None); + public ref float GustDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E8F86FE1FD88D18)); + get => ref _Handle.AsRef(_GustDurationOffset.Value); } + private static readonly Lazy _GustDirChangeOffset = new(() => Schema.GetOffset(0x4E8F86FE945BF5C6), LazyThreadSafetyMode.None); + public ref ushort GustDirChange { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E8F86FE945BF5C6)); + get => ref _Handle.AsRef(_GustDirChangeOffset.Value); } + private static readonly Lazy _InitialWindDirOffset = new(() => Schema.GetOffset(0x4E8F86FE84BFDBBD), LazyThreadSafetyMode.None); + public ref ushort InitialWindDir { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E8F86FE84BFDBBD)); + get => ref _Handle.AsRef(_InitialWindDirOffset.Value); } + private static readonly Lazy _InitialWindSpeedOffset = new(() => Schema.GetOffset(0x4E8F86FE1670F5CA), LazyThreadSafetyMode.None); + public ref float InitialWindSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E8F86FE1670F5CA)); + get => ref _Handle.AsRef(_InitialWindSpeedOffset.Value); } + private static readonly Lazy _LocationOffset = new(() => Schema.GetOffset(0x4E8F86FEC4993A46), LazyThreadSafetyMode.None); + public ref Vector Location { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E8F86FEC4993A46)); + get => ref _Handle.AsRef(_LocationOffset.Value); } + private static readonly Lazy _OnGustStartOffset = new(() => Schema.GetOffset(0x4E8F86FE2832424D), LazyThreadSafetyMode.None); + public CEntityIOOutput OnGustStart { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x4E8F86FE2832424D)); + get => new CEntityIOOutputImpl(_Handle + _OnGustStartOffset.Value); } + private static readonly Lazy _OnGustEndOffset = new(() => Schema.GetOffset(0x4E8F86FE82E285B4), LazyThreadSafetyMode.None); + public CEntityIOOutput OnGustEnd { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x4E8F86FE82E285B4)); + get => new CEntityIOOutputImpl(_Handle + _OnGustEndOffset.Value); } + private static readonly Lazy _EntOwnerOffset = new(() => Schema.GetOffset(0x4E8F86FED837CB33), LazyThreadSafetyMode.None); + public ref CHandle EntOwner { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4E8F86FED837CB33)); + get => ref _Handle.AsRef>(_EntOwnerOffset.Value); } public void StartTimeUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvWindVolumeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvWindVolumeImpl.cs index 507145b7a..94e016097 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvWindVolumeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CEnvWindVolumeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class CEnvWindVolumeImpl : CBaseEntityImpl, CEnvWindVolume { public CEnvWindVolumeImpl(nint handle) : base(handle) { } + private static readonly Lazy _ActiveOffset = new(() => Schema.GetOffset(0xCD7AC5418334208F), LazyThreadSafetyMode.None); + public ref bool Active { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD7AC5418334208F)); + get => ref _Handle.AsRef(_ActiveOffset.Value); } + private static readonly Lazy _BoxMinsOffset = new(() => Schema.GetOffset(0xCD7AC541D8201373), LazyThreadSafetyMode.None); + public ref Vector BoxMins { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD7AC541D8201373)); + get => ref _Handle.AsRef(_BoxMinsOffset.Value); } + private static readonly Lazy _BoxMaxsOffset = new(() => Schema.GetOffset(0xCD7AC541817A3B31), LazyThreadSafetyMode.None); + public ref Vector BoxMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD7AC541817A3B31)); + get => ref _Handle.AsRef(_BoxMaxsOffset.Value); } + private static readonly Lazy _StartDisabledOffset = new(() => Schema.GetOffset(0xCD7AC54161ED0C4F), LazyThreadSafetyMode.None); + public ref bool StartDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD7AC54161ED0C4F)); + get => ref _Handle.AsRef(_StartDisabledOffset.Value); } + private static readonly Lazy _ShapeOffset = new(() => Schema.GetOffset(0xCD7AC54121208A02), LazyThreadSafetyMode.None); + public ref int Shape { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD7AC54121208A02)); + get => ref _Handle.AsRef(_ShapeOffset.Value); } + private static readonly Lazy _WindSpeedMultiplierOffset = new(() => Schema.GetOffset(0xCD7AC541A22A3F81), LazyThreadSafetyMode.None); + public ref float WindSpeedMultiplier { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD7AC541A22A3F81)); + get => ref _Handle.AsRef(_WindSpeedMultiplierOffset.Value); } + private static readonly Lazy _WindTurbulenceMultiplierOffset = new(() => Schema.GetOffset(0xCD7AC54120DA30CD), LazyThreadSafetyMode.None); + public ref float WindTurbulenceMultiplier { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD7AC54120DA30CD)); + get => ref _Handle.AsRef(_WindTurbulenceMultiplierOffset.Value); } + private static readonly Lazy _WindSpeedVariationMultiplierOffset = new(() => Schema.GetOffset(0xCD7AC5416B9AC20C), LazyThreadSafetyMode.None); + public ref float WindSpeedVariationMultiplier { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD7AC5416B9AC20C)); + get => ref _Handle.AsRef(_WindSpeedVariationMultiplierOffset.Value); } + private static readonly Lazy _WindDirectionVariationMultiplierOffset = new(() => Schema.GetOffset(0xCD7AC5417F3AB3AA), LazyThreadSafetyMode.None); + public ref float WindDirectionVariationMultiplier { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD7AC5417F3AB3AA)); + get => ref _Handle.AsRef(_WindDirectionVariationMultiplierOffset.Value); } public void ActiveUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExampleSchemaVData_MonomorphicImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExampleSchemaVData_MonomorphicImpl.cs index b25f011d1..285d5522c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExampleSchemaVData_MonomorphicImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExampleSchemaVData_MonomorphicImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CExampleSchemaVData_MonomorphicImpl : SchemaClass, CExamp public CExampleSchemaVData_MonomorphicImpl(nint handle) : base(handle) { } + private static readonly Lazy _Example1Offset = new(() => Schema.GetOffset(0x43DB481BF8CF69BC), LazyThreadSafetyMode.None); + public ref int Example1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x43DB481BF8CF69BC)); + get => ref _Handle.AsRef(_Example1Offset.Value); } + private static readonly Lazy _Example2Offset = new(() => Schema.GetOffset(0x43DB481BFBCF6E75), LazyThreadSafetyMode.None); + public ref int Example2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x43DB481BFBCF6E75)); + get => ref _Handle.AsRef(_Example2Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExampleSchemaVData_PolymorphicBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExampleSchemaVData_PolymorphicBaseImpl.cs index 55376ed4e..5f1431ee4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExampleSchemaVData_PolymorphicBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExampleSchemaVData_PolymorphicBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CExampleSchemaVData_PolymorphicBaseImpl : SchemaClass, CE public CExampleSchemaVData_PolymorphicBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _BaseOffset = new(() => Schema.GetOffset(0x2CEB124160282B7C), LazyThreadSafetyMode.None); + public ref int Base { - get => ref _Handle.AsRef(Schema.GetOffset(0x2CEB124160282B7C)); + get => ref _Handle.AsRef(_BaseOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExampleSchemaVData_PolymorphicDerivedAImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExampleSchemaVData_PolymorphicDerivedAImpl.cs index 86b076dea..207b5224b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExampleSchemaVData_PolymorphicDerivedAImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExampleSchemaVData_PolymorphicDerivedAImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CExampleSchemaVData_PolymorphicDerivedAImpl : CExampleSch public CExampleSchemaVData_PolymorphicDerivedAImpl(nint handle) : base(handle) { } + private static readonly Lazy _DerivedAOffset = new(() => Schema.GetOffset(0x275BE0CCB76A6609), LazyThreadSafetyMode.None); + public ref int DerivedA { - get => ref _Handle.AsRef(Schema.GetOffset(0x275BE0CCB76A6609)); + get => ref _Handle.AsRef(_DerivedAOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExampleSchemaVData_PolymorphicDerivedBImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExampleSchemaVData_PolymorphicDerivedBImpl.cs index c27ed96dc..b79601dd5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExampleSchemaVData_PolymorphicDerivedBImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExampleSchemaVData_PolymorphicDerivedBImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CExampleSchemaVData_PolymorphicDerivedBImpl : CExampleSch public CExampleSchemaVData_PolymorphicDerivedBImpl(nint handle) : base(handle) { } + private static readonly Lazy _DerivedBOffset = new(() => Schema.GetOffset(0x2A5BE585B46A6150), LazyThreadSafetyMode.None); + public ref int DerivedB { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A5BE585B46A6150)); + get => ref _Handle.AsRef(_DerivedBOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExpressionActionUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExpressionActionUpdaterImpl.cs index 4fbdc3146..09a4a97f2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExpressionActionUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CExpressionActionUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CExpressionActionUpdaterImpl : CAnimActionUpdaterImpl, CE public CExpressionActionUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParamOffset = new(() => Schema.GetOffset(0x3B8502F3679286A4), LazyThreadSafetyMode.None); + public CAnimParamHandle Param { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x3B8502F3679286A4)); + get => new CAnimParamHandleImpl(_Handle + _ParamOffset.Value); } + private static readonly Lazy _ParamTypeOffset = new(() => Schema.GetOffset(0x3B8502F3F05DFDD9), LazyThreadSafetyMode.None); + public ref AnimParamType_t ParamType { - get => ref _Handle.AsRef(Schema.GetOffset(0x3B8502F3F05DFDD9)); + get => ref _Handle.AsRef(_ParamTypeOffset.Value); } + private static readonly Lazy _ScriptOffset = new(() => Schema.GetOffset(0x3B8502F329D70FB0), LazyThreadSafetyMode.None); + public AnimScriptHandle Script { - get => new AnimScriptHandleImpl(_Handle + Schema.GetOffset(0x3B8502F329D70FB0)); + get => new AnimScriptHandleImpl(_Handle + _ScriptOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeIndexedJiggleBoneImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeIndexedJiggleBoneImpl.cs index 3b44aaac9..2de8d8f04 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeIndexedJiggleBoneImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeIndexedJiggleBoneImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CFeIndexedJiggleBoneImpl : SchemaClass, CFeIndexedJiggleB public CFeIndexedJiggleBoneImpl(nint handle) : base(handle) { } + private static readonly Lazy _NodeOffset = new(() => Schema.GetOffset(0x1DD153AEF6FB9B19), LazyThreadSafetyMode.None); + public ref uint Node { - get => ref _Handle.AsRef(Schema.GetOffset(0x1DD153AEF6FB9B19)); + get => ref _Handle.AsRef(_NodeOffset.Value); } + private static readonly Lazy _JiggleParentOffset = new(() => Schema.GetOffset(0x1DD153AE8AABF3B9), LazyThreadSafetyMode.None); + public ref uint JiggleParent { - get => ref _Handle.AsRef(Schema.GetOffset(0x1DD153AE8AABF3B9)); + get => ref _Handle.AsRef(_JiggleParentOffset.Value); } + private static readonly Lazy _JiggleBoneOffset = new(() => Schema.GetOffset(0x1DD153AE6038C557), LazyThreadSafetyMode.None); + public CFeJiggleBone JiggleBone { - get => new CFeJiggleBoneImpl(_Handle + Schema.GetOffset(0x1DD153AE6038C557)); + get => new CFeJiggleBoneImpl(_Handle + _JiggleBoneOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeJiggleBoneImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeJiggleBoneImpl.cs index 10d31c4bf..d643dde53 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeJiggleBoneImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeJiggleBoneImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,110 +17,180 @@ internal partial class CFeJiggleBoneImpl : SchemaClass, CFeJiggleBone { public CFeJiggleBoneImpl(nint handle) : base(handle) { } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0xC064D4BDCE6E9C28), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BDCE6E9C28)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _LengthOffset = new(() => Schema.GetOffset(0xC064D4BDFF9776DF), LazyThreadSafetyMode.None); + public ref float Length { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BDFF9776DF)); + get => ref _Handle.AsRef(_LengthOffset.Value); } + private static readonly Lazy _TipMassOffset = new(() => Schema.GetOffset(0xC064D4BDEB1310B8), LazyThreadSafetyMode.None); + public ref float TipMass { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BDEB1310B8)); + get => ref _Handle.AsRef(_TipMassOffset.Value); } + private static readonly Lazy _YawStiffnessOffset = new(() => Schema.GetOffset(0xC064D4BDDBF83D43), LazyThreadSafetyMode.None); + public ref float YawStiffness { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BDDBF83D43)); + get => ref _Handle.AsRef(_YawStiffnessOffset.Value); } + private static readonly Lazy _YawDampingOffset = new(() => Schema.GetOffset(0xC064D4BD2F1091CC), LazyThreadSafetyMode.None); + public ref float YawDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BD2F1091CC)); + get => ref _Handle.AsRef(_YawDampingOffset.Value); } + private static readonly Lazy _PitchStiffnessOffset = new(() => Schema.GetOffset(0xC064D4BD3553FEE0), LazyThreadSafetyMode.None); + public ref float PitchStiffness { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BD3553FEE0)); + get => ref _Handle.AsRef(_PitchStiffnessOffset.Value); } + private static readonly Lazy _PitchDampingOffset = new(() => Schema.GetOffset(0xC064D4BDDE2FCEFF), LazyThreadSafetyMode.None); + public ref float PitchDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BDDE2FCEFF)); + get => ref _Handle.AsRef(_PitchDampingOffset.Value); } + private static readonly Lazy _AlongStiffnessOffset = new(() => Schema.GetOffset(0xC064D4BD677C6B51), LazyThreadSafetyMode.None); + public ref float AlongStiffness { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BD677C6B51)); + get => ref _Handle.AsRef(_AlongStiffnessOffset.Value); } + private static readonly Lazy _AlongDampingOffset = new(() => Schema.GetOffset(0xC064D4BDE7D22252), LazyThreadSafetyMode.None); + public ref float AlongDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BDE7D22252)); + get => ref _Handle.AsRef(_AlongDampingOffset.Value); } + private static readonly Lazy _AngleLimitOffset = new(() => Schema.GetOffset(0xC064D4BD2A410905), LazyThreadSafetyMode.None); + public ref float AngleLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BD2A410905)); + get => ref _Handle.AsRef(_AngleLimitOffset.Value); } + private static readonly Lazy _MinYawOffset = new(() => Schema.GetOffset(0xC064D4BD4496E01C), LazyThreadSafetyMode.None); + public ref float MinYaw { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BD4496E01C)); + get => ref _Handle.AsRef(_MinYawOffset.Value); } + private static readonly Lazy _MaxYawOffset = new(() => Schema.GetOffset(0xC064D4BD19C4AE42), LazyThreadSafetyMode.None); + public ref float MaxYaw { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BD19C4AE42)); + get => ref _Handle.AsRef(_MaxYawOffset.Value); } + private static readonly Lazy _YawFrictionOffset = new(() => Schema.GetOffset(0xC064D4BD07FAF648), LazyThreadSafetyMode.None); + public ref float YawFriction { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BD07FAF648)); + get => ref _Handle.AsRef(_YawFrictionOffset.Value); } + private static readonly Lazy _YawBounceOffset = new(() => Schema.GetOffset(0xC064D4BD156E2E2A), LazyThreadSafetyMode.None); + public ref float YawBounce { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BD156E2E2A)); + get => ref _Handle.AsRef(_YawBounceOffset.Value); } + private static readonly Lazy _MinPitchOffset = new(() => Schema.GetOffset(0xC064D4BDE0093115), LazyThreadSafetyMode.None); + public ref float MinPitch { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BDE0093115)); + get => ref _Handle.AsRef(_MinPitchOffset.Value); } + private static readonly Lazy _MaxPitchOffset = new(() => Schema.GetOffset(0xC064D4BD1F14D2C3), LazyThreadSafetyMode.None); + public ref float MaxPitch { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BD1F14D2C3)); + get => ref _Handle.AsRef(_MaxPitchOffset.Value); } + private static readonly Lazy _PitchFrictionOffset = new(() => Schema.GetOffset(0xC064D4BDB31D7A5D), LazyThreadSafetyMode.None); + public ref float PitchFriction { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BDB31D7A5D)); + get => ref _Handle.AsRef(_PitchFrictionOffset.Value); } + private static readonly Lazy _PitchBounceOffset = new(() => Schema.GetOffset(0xC064D4BDAC140AE3), LazyThreadSafetyMode.None); + public ref float PitchBounce { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BDAC140AE3)); + get => ref _Handle.AsRef(_PitchBounceOffset.Value); } + private static readonly Lazy _BaseMassOffset = new(() => Schema.GetOffset(0xC064D4BDC56419D2), LazyThreadSafetyMode.None); + public ref float BaseMass { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BDC56419D2)); + get => ref _Handle.AsRef(_BaseMassOffset.Value); } + private static readonly Lazy _BaseStiffnessOffset = new(() => Schema.GetOffset(0xC064D4BD32834B1B), LazyThreadSafetyMode.None); + public ref float BaseStiffness { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BD32834B1B)); + get => ref _Handle.AsRef(_BaseStiffnessOffset.Value); } + private static readonly Lazy _BaseDampingOffset = new(() => Schema.GetOffset(0xC064D4BDB3E982B4), LazyThreadSafetyMode.None); + public ref float BaseDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BDB3E982B4)); + get => ref _Handle.AsRef(_BaseDampingOffset.Value); } + private static readonly Lazy _BaseMinLeftOffset = new(() => Schema.GetOffset(0xC064D4BD796C25E3), LazyThreadSafetyMode.None); + public ref float BaseMinLeft { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BD796C25E3)); + get => ref _Handle.AsRef(_BaseMinLeftOffset.Value); } + private static readonly Lazy _BaseMaxLeftOffset = new(() => Schema.GetOffset(0xC064D4BDB9338D95), LazyThreadSafetyMode.None); + public ref float BaseMaxLeft { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BDB9338D95)); + get => ref _Handle.AsRef(_BaseMaxLeftOffset.Value); } + private static readonly Lazy _BaseLeftFrictionOffset = new(() => Schema.GetOffset(0xC064D4BD591435B1), LazyThreadSafetyMode.None); + public ref float BaseLeftFriction { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BD591435B1)); + get => ref _Handle.AsRef(_BaseLeftFrictionOffset.Value); } + private static readonly Lazy _BaseMinUpOffset = new(() => Schema.GetOffset(0xC064D4BD993DE07B), LazyThreadSafetyMode.None); + public ref float BaseMinUp { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BD993DE07B)); + get => ref _Handle.AsRef(_BaseMinUpOffset.Value); } + private static readonly Lazy _BaseMaxUpOffset = new(() => Schema.GetOffset(0xC064D4BD81FA3CF9), LazyThreadSafetyMode.None); + public ref float BaseMaxUp { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BD81FA3CF9)); + get => ref _Handle.AsRef(_BaseMaxUpOffset.Value); } + private static readonly Lazy _BaseUpFrictionOffset = new(() => Schema.GetOffset(0xC064D4BD657E3D81), LazyThreadSafetyMode.None); + public ref float BaseUpFriction { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BD657E3D81)); + get => ref _Handle.AsRef(_BaseUpFrictionOffset.Value); } + private static readonly Lazy _BaseMinForwardOffset = new(() => Schema.GetOffset(0xC064D4BDF05F062B), LazyThreadSafetyMode.None); + public ref float BaseMinForward { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BDF05F062B)); + get => ref _Handle.AsRef(_BaseMinForwardOffset.Value); } + private static readonly Lazy _BaseMaxForwardOffset = new(() => Schema.GetOffset(0xC064D4BDB071FCD9), LazyThreadSafetyMode.None); + public ref float BaseMaxForward { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BDB071FCD9)); + get => ref _Handle.AsRef(_BaseMaxForwardOffset.Value); } + private static readonly Lazy _BaseForwardFrictionOffset = new(() => Schema.GetOffset(0xC064D4BD1DC9EF21), LazyThreadSafetyMode.None); + public ref float BaseForwardFriction { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BD1DC9EF21)); + get => ref _Handle.AsRef(_BaseForwardFrictionOffset.Value); } + private static readonly Lazy _Radius0Offset = new(() => Schema.GetOffset(0xC064D4BDB20C6987), LazyThreadSafetyMode.None); + public ref float Radius0 { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BDB20C6987)); + get => ref _Handle.AsRef(_Radius0Offset.Value); } + private static readonly Lazy _Radius1Offset = new(() => Schema.GetOffset(0xC064D4BDB10C67F4), LazyThreadSafetyMode.None); + public ref float Radius1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BDB10C67F4)); + get => ref _Handle.AsRef(_Radius1Offset.Value); } + private static readonly Lazy _Point0Offset = new(() => Schema.GetOffset(0xC064D4BDF88AE06F), LazyThreadSafetyMode.None); + public ref Vector Point0 { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BDF88AE06F)); + get => ref _Handle.AsRef(_Point0Offset.Value); } + private static readonly Lazy _Point1Offset = new(() => Schema.GetOffset(0xC064D4BDF78ADEDC), LazyThreadSafetyMode.None); + public ref Vector Point1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BDF78ADEDC)); + get => ref _Handle.AsRef(_Point1Offset.Value); } + private static readonly Lazy _CollisionMaskOffset = new(() => Schema.GetOffset(0xC064D4BD0CCF1BEF), LazyThreadSafetyMode.None); + public ref ushort CollisionMask { - get => ref _Handle.AsRef(Schema.GetOffset(0xC064D4BD0CCF1BEF)); + get => ref _Handle.AsRef(_CollisionMaskOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeMorphLayerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeMorphLayerImpl.cs index 397ad7f75..114353ee5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeMorphLayerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeMorphLayerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,30 +17,44 @@ internal partial class CFeMorphLayerImpl : SchemaClass, CFeMorphLayer { public CFeMorphLayerImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xB30F1160CAE8A266), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB30F1160CAE8A266)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB30F1160CAE8A266, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _NameHashOffset = new(() => Schema.GetOffset(0xB30F1160DE15EEFE), LazyThreadSafetyMode.None); + public ref uint NameHash { - get => ref _Handle.AsRef(Schema.GetOffset(0xB30F1160DE15EEFE)); + get => ref _Handle.AsRef(_NameHashOffset.Value); } + private static readonly Lazy _NodesOffset = new(() => Schema.GetOffset(0xB30F1160EBA045DA), LazyThreadSafetyMode.None); + public ref CUtlVector Nodes { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB30F1160EBA045DA)); + get => ref _Handle.AsRef>(_NodesOffset.Value); } + private static readonly Lazy _InitPosOffset = new(() => Schema.GetOffset(0xB30F11608D152323), LazyThreadSafetyMode.None); + public ref CUtlVector InitPos { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB30F11608D152323)); + get => ref _Handle.AsRef>(_InitPosOffset.Value); } + private static readonly Lazy _GravityOffset = new(() => Schema.GetOffset(0xB30F1160790C70C5), LazyThreadSafetyMode.None); + public ref CUtlVector Gravity { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB30F1160790C70C5)); + get => ref _Handle.AsRef>(_GravityOffset.Value); } + private static readonly Lazy _GoalStrengthOffset = new(() => Schema.GetOffset(0xB30F1160686343FF), LazyThreadSafetyMode.None); + public ref CUtlVector GoalStrength { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB30F1160686343FF)); + get => ref _Handle.AsRef>(_GoalStrengthOffset.Value); } + private static readonly Lazy _GoalDampingOffset = new(() => Schema.GetOffset(0xB30F11600F3CA820), LazyThreadSafetyMode.None); + public ref CUtlVector GoalDamping { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB30F11600F3CA820)); + get => ref _Handle.AsRef>(_GoalDampingOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeNamedJiggleBoneImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeNamedJiggleBoneImpl.cs index 15da88747..ee56c92e0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeNamedJiggleBoneImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeNamedJiggleBoneImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class CFeNamedJiggleBoneImpl : SchemaClass, CFeNamedJiggleBone public CFeNamedJiggleBoneImpl(nint handle) : base(handle) { } + private static readonly Lazy _StrParentBoneOffset = new(() => Schema.GetOffset(0x51055B3A22DD827E), LazyThreadSafetyMode.None); + public string StrParentBone { get { - var ptr = _Handle.Read(Schema.GetOffset(0x51055B3A22DD827E)); + var ptr = _Handle.Read(_StrParentBoneOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x51055B3A22DD827E, value); + set => Schema.SetString(_Handle, _StrParentBoneOffset.Value, value); } + private static readonly Lazy _TransformOffset = new(() => Schema.GetOffset(0x51055B3A3A9A393B), LazyThreadSafetyMode.None); + public ref CTransform Transform { - get => ref _Handle.AsRef(Schema.GetOffset(0x51055B3A3A9A393B)); + get => ref _Handle.AsRef(_TransformOffset.Value); } + private static readonly Lazy _JiggleParentOffset = new(() => Schema.GetOffset(0x51055B3A8AABF3B9), LazyThreadSafetyMode.None); + public ref uint JiggleParent { - get => ref _Handle.AsRef(Schema.GetOffset(0x51055B3A8AABF3B9)); + get => ref _Handle.AsRef(_JiggleParentOffset.Value); } + private static readonly Lazy _JiggleBoneOffset = new(() => Schema.GetOffset(0x51055B3A6038C557), LazyThreadSafetyMode.None); + public CFeJiggleBone JiggleBone { - get => new CFeJiggleBoneImpl(_Handle + Schema.GetOffset(0x51055B3A6038C557)); + get => new CFeJiggleBoneImpl(_Handle + _JiggleBoneOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeVertexMapBuildArrayImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeVertexMapBuildArrayImpl.cs index 25d417bcb..8b0b9dc37 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeVertexMapBuildArrayImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFeVertexMapBuildArrayImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CFeVertexMapBuildArrayImpl : SchemaClass, CFeVertexMapBui public CFeVertexMapBuildArrayImpl(nint handle) : base(handle) { } + private static readonly Lazy _ArrayOffset = new(() => Schema.GetOffset(0x7F8ABE7424AA62A6), LazyThreadSafetyMode.None); + public ref CUtlVector> Array { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x7F8ABE7424AA62A6)); + get => ref _Handle.AsRef>>(_ArrayOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterAttributeIntImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterAttributeIntImpl.cs index 4fdfe8bb6..80c57d3c1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterAttributeIntImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterAttributeIntImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CFilterAttributeIntImpl : CBaseFilterImpl, CFilterAttribu public CFilterAttributeIntImpl(nint handle) : base(handle) { } + private static readonly Lazy _AttributeNameOffset = new(() => Schema.GetOffset(0x7CC26955E63BC84D), LazyThreadSafetyMode.None); + public string AttributeName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7CC26955E63BC84D)); + var ptr = _Handle.Read(_AttributeNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7CC26955E63BC84D, value); + set => Schema.SetString(_Handle, _AttributeNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterClassImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterClassImpl.cs index db5a8fcb6..fc72b33cd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterClassImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterClassImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CFilterClassImpl : CBaseFilterImpl, CFilterClass { public CFilterClassImpl(nint handle) : base(handle) { } + private static readonly Lazy _FilterClassOffset = new(() => Schema.GetOffset(0x31025D487FECB06), LazyThreadSafetyMode.None); + public string FilterClass { get { - var ptr = _Handle.Read(Schema.GetOffset(0x31025D487FECB06)); + var ptr = _Handle.Read(_FilterClassOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x31025D487FECB06, value); + set => Schema.SetString(_Handle, _FilterClassOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterContextImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterContextImpl.cs index beedec8d1..0dabce03c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterContextImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterContextImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CFilterContextImpl : CBaseFilterImpl, CFilterContext { public CFilterContextImpl(nint handle) : base(handle) { } + private static readonly Lazy _FilterContextOffset = new(() => Schema.GetOffset(0xA9DA7EEFF90438D1), LazyThreadSafetyMode.None); + public string FilterContext { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA9DA7EEFF90438D1)); + var ptr = _Handle.Read(_FilterContextOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA9DA7EEFF90438D1, value); + set => Schema.SetString(_Handle, _FilterContextOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterEnemyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterEnemyImpl.cs index fa208b1e6..529d2d6ac 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterEnemyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterEnemyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,28 +17,38 @@ internal partial class CFilterEnemyImpl : CBaseFilterImpl, CFilterEnemy { public CFilterEnemyImpl(nint handle) : base(handle) { } + private static readonly Lazy _EnemyNameOffset = new(() => Schema.GetOffset(0x23F92540C9E922A8), LazyThreadSafetyMode.None); + public string EnemyName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x23F92540C9E922A8)); + var ptr = _Handle.Read(_EnemyNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x23F92540C9E922A8, value); + set => Schema.SetString(_Handle, _EnemyNameOffset.Value, value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x23F925405ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x23F925405ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _OuterRadiusOffset = new(() => Schema.GetOffset(0x23F925407B66A818), LazyThreadSafetyMode.None); + public ref float OuterRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x23F925407B66A818)); + get => ref _Handle.AsRef(_OuterRadiusOffset.Value); } + private static readonly Lazy _MaxSquadmatesPerEnemyOffset = new(() => Schema.GetOffset(0x23F925407AA226A0), LazyThreadSafetyMode.None); + public ref int MaxSquadmatesPerEnemy { - get => ref _Handle.AsRef(Schema.GetOffset(0x23F925407AA226A0)); + get => ref _Handle.AsRef(_MaxSquadmatesPerEnemyOffset.Value); } + private static readonly Lazy _PlayerNameOffset = new(() => Schema.GetOffset(0x23F92540DE61DD3B), LazyThreadSafetyMode.None); + public string PlayerName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x23F92540DE61DD3B)); + var ptr = _Handle.Read(_PlayerNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x23F92540DE61DD3B, value); + set => Schema.SetString(_Handle, _PlayerNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterLOSImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterLOSImpl.cs index a76012cb1..7070280d2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterLOSImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterLOSImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterMassGreaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterMassGreaterImpl.cs index 72848f24c..179c2e4a2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterMassGreaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterMassGreaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CFilterMassGreaterImpl : CBaseFilterImpl, CFilterMassGrea public CFilterMassGreaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _FilterMassOffset = new(() => Schema.GetOffset(0xBF74FA22FF3F08E7), LazyThreadSafetyMode.None); + public ref float FilterMass { - get => ref _Handle.AsRef(Schema.GetOffset(0xBF74FA22FF3F08E7)); + get => ref _Handle.AsRef(_FilterMassOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterModelImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterModelImpl.cs index cb7df755e..27a39c961 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterModelImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterModelImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CFilterModelImpl : CBaseFilterImpl, CFilterModel { public CFilterModelImpl(nint handle) : base(handle) { } + private static readonly Lazy _FilterModelOffset = new(() => Schema.GetOffset(0x59DA03B921E36753), LazyThreadSafetyMode.None); + public string FilterModel { get { - var ptr = _Handle.Read(Schema.GetOffset(0x59DA03B921E36753)); + var ptr = _Handle.Read(_FilterModelOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x59DA03B921E36753, value); + set => Schema.SetString(_Handle, _FilterModelOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterMultipleAPIImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterMultipleAPIImpl.cs index 5c0d8fd52..7fade9f8d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterMultipleAPIImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterMultipleAPIImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterMultipleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterMultipleImpl.cs index 1d8e56e55..abec467cc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterMultipleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterMultipleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CFilterMultipleImpl : CBaseFilterImpl, CFilterMultiple { public CFilterMultipleImpl(nint handle) : base(handle) { } + private static readonly Lazy _FilterTypeOffset = new(() => Schema.GetOffset(0x6EA0578071861EDB), LazyThreadSafetyMode.None); + public ref filter_t FilterType { - get => ref _Handle.AsRef(Schema.GetOffset(0x6EA0578071861EDB)); + get => ref _Handle.AsRef(_FilterTypeOffset.Value); } + private static readonly Lazy _FilterNameOffset = new(() => Schema.GetOffset(0x6EA0578009C86445), LazyThreadSafetyMode.None); + public string FilterName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6EA0578009C86445)); + var ptr = _Handle.Read(_FilterNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6EA0578009C86445, value); + set => Schema.SetString(_Handle, _FilterNameOffset.Value, value); } public ISchemaFixedArray> Filter { get => new SchemaFixedArray>(_Handle, 0x6EA0578045D9E0B1, 10, 4, 4); diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterNameImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterNameImpl.cs index 43f1cb9eb..e97f2782a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterNameImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterNameImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CFilterNameImpl : CBaseFilterImpl, CFilterName { public CFilterNameImpl(nint handle) : base(handle) { } + private static readonly Lazy _FilterNameOffset = new(() => Schema.GetOffset(0xF129410709C86445), LazyThreadSafetyMode.None); + public string FilterName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF129410709C86445)); + var ptr = _Handle.Read(_FilterNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF129410709C86445, value); + set => Schema.SetString(_Handle, _FilterNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterProximityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterProximityImpl.cs index a01113ea9..3bf514c1f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterProximityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterProximityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CFilterProximityImpl : CBaseFilterImpl, CFilterProximity public CFilterProximityImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0xE1C36A555ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1C36A555ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterTeamImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterTeamImpl.cs index 10569b12e..916e0c1c7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterTeamImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFilterTeamImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CFilterTeamImpl : CBaseFilterImpl, CFilterTeam { public CFilterTeamImpl(nint handle) : base(handle) { } + private static readonly Lazy _FilterTeamOffset = new(() => Schema.GetOffset(0x46DA651D4D36160F), LazyThreadSafetyMode.None); + public ref int FilterTeam { - get => ref _Handle.AsRef(Schema.GetOffset(0x46DA651D4D36160F)); + get => ref _Handle.AsRef(_FilterTeamOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFireCrackerBlastImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFireCrackerBlastImpl.cs index 8e87b12bf..76d3fb790 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFireCrackerBlastImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFireCrackerBlastImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFiringModeFloatImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFiringModeFloatImpl.cs index 1bd30279b..39d9cdc56 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFiringModeFloatImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFiringModeFloatImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFiringModeIntImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFiringModeIntImpl.cs index 2b88f97d7..9bd1d7fb7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFiringModeIntImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFiringModeIntImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFishImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFishImpl.cs index 8755173e5..c96783aed 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFishImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFishImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,77 +17,125 @@ internal partial class CFishImpl : CBaseAnimGraphImpl, CFish { public CFishImpl(nint handle) : base(handle) { } + private static readonly Lazy _PoolOffset = new(() => Schema.GetOffset(0xC43C8434366BF523), LazyThreadSafetyMode.None); + public ref CHandle Pool { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC43C8434366BF523)); + get => ref _Handle.AsRef>(_PoolOffset.Value); } + private static readonly Lazy _IdOffset = new(() => Schema.GetOffset(0xC43C8434B4B6E980), LazyThreadSafetyMode.None); + public ref uint Id { - get => ref _Handle.AsRef(Schema.GetOffset(0xC43C8434B4B6E980)); + get => ref _Handle.AsRef(_IdOffset.Value); } + private static readonly Lazy _XOffset = new(() => Schema.GetOffset(0xC43C8434DBC57BA7), LazyThreadSafetyMode.None); + public ref float X { - get => ref _Handle.AsRef(Schema.GetOffset(0xC43C8434DBC57BA7)); + get => ref _Handle.AsRef(_XOffset.Value); } + private static readonly Lazy _YOffset = new(() => Schema.GetOffset(0xC43C8434DAC57A14), LazyThreadSafetyMode.None); + public ref float Y { - get => ref _Handle.AsRef(Schema.GetOffset(0xC43C8434DAC57A14)); + get => ref _Handle.AsRef(_YOffset.Value); } + private static readonly Lazy _ZOffset = new(() => Schema.GetOffset(0xC43C8434DDC57ECD), LazyThreadSafetyMode.None); + public ref float Z { - get => ref _Handle.AsRef(Schema.GetOffset(0xC43C8434DDC57ECD)); + get => ref _Handle.AsRef(_ZOffset.Value); } + private static readonly Lazy _AngleOffset = new(() => Schema.GetOffset(0xC43C8434D4164938), LazyThreadSafetyMode.None); + public ref float Angle { - get => ref _Handle.AsRef(Schema.GetOffset(0xC43C8434D4164938)); + get => ref _Handle.AsRef(_AngleOffset.Value); } + private static readonly Lazy _AngleChangeOffset = new(() => Schema.GetOffset(0xC43C84343E25ADF0), LazyThreadSafetyMode.None); + public ref float AngleChange { - get => ref _Handle.AsRef(Schema.GetOffset(0xC43C84343E25ADF0)); + get => ref _Handle.AsRef(_AngleChangeOffset.Value); } + private static readonly Lazy _ForwardOffset = new(() => Schema.GetOffset(0xC43C84348C0AF53A), LazyThreadSafetyMode.None); + public ref Vector Forward { - get => ref _Handle.AsRef(Schema.GetOffset(0xC43C84348C0AF53A)); + get => ref _Handle.AsRef(_ForwardOffset.Value); } + private static readonly Lazy _PerpOffset = new(() => Schema.GetOffset(0xC43C8434607EC05C), LazyThreadSafetyMode.None); + public ref Vector Perp { - get => ref _Handle.AsRef(Schema.GetOffset(0xC43C8434607EC05C)); + get => ref _Handle.AsRef(_PerpOffset.Value); } + private static readonly Lazy _PoolOriginOffset = new(() => Schema.GetOffset(0xC43C843442AD682D), LazyThreadSafetyMode.None); + public ref Vector PoolOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0xC43C843442AD682D)); + get => ref _Handle.AsRef(_PoolOriginOffset.Value); } + private static readonly Lazy _WaterLevelOffset = new(() => Schema.GetOffset(0xC43C8434E63A21D6), LazyThreadSafetyMode.None); + public ref float WaterLevel { - get => ref _Handle.AsRef(Schema.GetOffset(0xC43C8434E63A21D6)); + get => ref _Handle.AsRef(_WaterLevelOffset.Value); } + private static readonly Lazy _SpeedOffset = new(() => Schema.GetOffset(0xC43C8434A4BD35A0), LazyThreadSafetyMode.None); + public ref float Speed { - get => ref _Handle.AsRef(Schema.GetOffset(0xC43C8434A4BD35A0)); + get => ref _Handle.AsRef(_SpeedOffset.Value); } + private static readonly Lazy _DesiredSpeedOffset = new(() => Schema.GetOffset(0xC43C843492BBF450), LazyThreadSafetyMode.None); + public ref float DesiredSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xC43C843492BBF450)); + get => ref _Handle.AsRef(_DesiredSpeedOffset.Value); } + private static readonly Lazy _CalmSpeedOffset = new(() => Schema.GetOffset(0xC43C84340BF88DE9), LazyThreadSafetyMode.None); + public ref float CalmSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xC43C84340BF88DE9)); + get => ref _Handle.AsRef(_CalmSpeedOffset.Value); } + private static readonly Lazy _PanicSpeedOffset = new(() => Schema.GetOffset(0xC43C8434270FACBF), LazyThreadSafetyMode.None); + public ref float PanicSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xC43C8434270FACBF)); + get => ref _Handle.AsRef(_PanicSpeedOffset.Value); } + private static readonly Lazy _AvoidRangeOffset = new(() => Schema.GetOffset(0xC43C84346BCFA4EB), LazyThreadSafetyMode.None); + public ref float AvoidRange { - get => ref _Handle.AsRef(Schema.GetOffset(0xC43C84346BCFA4EB)); + get => ref _Handle.AsRef(_AvoidRangeOffset.Value); } + private static readonly Lazy _TurnTimerOffset = new(() => Schema.GetOffset(0xC43C8434700B062B), LazyThreadSafetyMode.None); + public CountdownTimer TurnTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0xC43C8434700B062B)); + get => new CountdownTimerImpl(_Handle + _TurnTimerOffset.Value); } + private static readonly Lazy _TurnClockwiseOffset = new(() => Schema.GetOffset(0xC43C8434C5ECCED4), LazyThreadSafetyMode.None); + public ref bool TurnClockwise { - get => ref _Handle.AsRef(Schema.GetOffset(0xC43C8434C5ECCED4)); + get => ref _Handle.AsRef(_TurnClockwiseOffset.Value); } + private static readonly Lazy _GoTimerOffset = new(() => Schema.GetOffset(0xC43C84348CBF9730), LazyThreadSafetyMode.None); + public CountdownTimer GoTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0xC43C84348CBF9730)); + get => new CountdownTimerImpl(_Handle + _GoTimerOffset.Value); } + private static readonly Lazy _MoveTimerOffset = new(() => Schema.GetOffset(0xC43C8434254C6AC5), LazyThreadSafetyMode.None); + public CountdownTimer MoveTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0xC43C8434254C6AC5)); + get => new CountdownTimerImpl(_Handle + _MoveTimerOffset.Value); } + private static readonly Lazy _PanicTimerOffset = new(() => Schema.GetOffset(0xC43C8434D2FFC665), LazyThreadSafetyMode.None); + public CountdownTimer PanicTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0xC43C8434D2FFC665)); + get => new CountdownTimerImpl(_Handle + _PanicTimerOffset.Value); } + private static readonly Lazy _DisperseTimerOffset = new(() => Schema.GetOffset(0xC43C8434C8E05E9F), LazyThreadSafetyMode.None); + public CountdownTimer DisperseTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0xC43C8434C8E05E9F)); + get => new CountdownTimerImpl(_Handle + _DisperseTimerOffset.Value); } + private static readonly Lazy _ProximityTimerOffset = new(() => Schema.GetOffset(0xC43C8434ABE32A63), LazyThreadSafetyMode.None); + public CountdownTimer ProximityTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0xC43C8434ABE32A63)); + get => new CountdownTimerImpl(_Handle + _ProximityTimerOffset.Value); } + private static readonly Lazy _VisibleOffset = new(() => Schema.GetOffset(0xC43C8434002CBAC1), LazyThreadSafetyMode.None); + public ref CUtlVector> Visible { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xC43C8434002CBAC1)); + get => ref _Handle.AsRef>>(_VisibleOffset.Value); } public void XUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFishPoolImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFishPoolImpl.cs index 5f0311e67..625956398 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFishPoolImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFishPoolImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CFishPoolImpl : CBaseEntityImpl, CFishPool { public CFishPoolImpl(nint handle) : base(handle) { } + private static readonly Lazy _FishCountOffset = new(() => Schema.GetOffset(0x1B71368A31165D02), LazyThreadSafetyMode.None); + public ref int FishCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x1B71368A31165D02)); + get => ref _Handle.AsRef(_FishCountOffset.Value); } + private static readonly Lazy _MaxRangeOffset = new(() => Schema.GetOffset(0x1B71368A560879E6), LazyThreadSafetyMode.None); + public ref float MaxRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x1B71368A560879E6)); + get => ref _Handle.AsRef(_MaxRangeOffset.Value); } + private static readonly Lazy _SwimDepthOffset = new(() => Schema.GetOffset(0x1B71368AA94321F2), LazyThreadSafetyMode.None); + public ref float SwimDepth { - get => ref _Handle.AsRef(Schema.GetOffset(0x1B71368AA94321F2)); + get => ref _Handle.AsRef(_SwimDepthOffset.Value); } + private static readonly Lazy _WaterLevelOffset = new(() => Schema.GetOffset(0x1B71368AE63A21D6), LazyThreadSafetyMode.None); + public ref float WaterLevel { - get => ref _Handle.AsRef(Schema.GetOffset(0x1B71368AE63A21D6)); + get => ref _Handle.AsRef(_WaterLevelOffset.Value); } + private static readonly Lazy _IsDormantOffset = new(() => Schema.GetOffset(0x1B71368A1D7D906E), LazyThreadSafetyMode.None); + public ref bool IsDormant { - get => ref _Handle.AsRef(Schema.GetOffset(0x1B71368A1D7D906E)); + get => ref _Handle.AsRef(_IsDormantOffset.Value); } + private static readonly Lazy _FishesOffset = new(() => Schema.GetOffset(0x1B71368AFDB58C33), LazyThreadSafetyMode.None); + public ref CUtlVector> Fishes { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x1B71368AFDB58C33)); + get => ref _Handle.AsRef>>(_FishesOffset.Value); } + private static readonly Lazy _VisTimerOffset = new(() => Schema.GetOffset(0x1B71368AC8E45FB6), LazyThreadSafetyMode.None); + public CountdownTimer VisTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1B71368AC8E45FB6)); + get => new CountdownTimerImpl(_Handle + _VisTimerOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlashbangImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlashbangImpl.cs index 98fff2653..946bbbede 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlashbangImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlashbangImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlashbangProjectileImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlashbangProjectileImpl.cs index 8e2896369..8dabdd04a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlashbangProjectileImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlashbangProjectileImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CFlashbangProjectileImpl : CBaseCSGrenadeProjectileImpl, public CFlashbangProjectileImpl(nint handle) : base(handle) { } + private static readonly Lazy _TimeToDetonateOffset = new(() => Schema.GetOffset(0x9F4F2EA190E2E597), LazyThreadSafetyMode.None); + public ref float TimeToDetonate { - get => ref _Handle.AsRef(Schema.GetOffset(0x9F4F2EA190E2E597)); + get => ref _Handle.AsRef(_TimeToDetonateOffset.Value); } + private static readonly Lazy _NumOpponentsHitOffset = new(() => Schema.GetOffset(0x9F4F2EA1CA7913A4), LazyThreadSafetyMode.None); + public ref byte NumOpponentsHit { - get => ref _Handle.AsRef(Schema.GetOffset(0x9F4F2EA1CA7913A4)); + get => ref _Handle.AsRef(_NumOpponentsHitOffset.Value); } + private static readonly Lazy _NumTeammatesHitOffset = new(() => Schema.GetOffset(0x9F4F2EA1BC5B8F41), LazyThreadSafetyMode.None); + public ref byte NumTeammatesHit { - get => ref _Handle.AsRef(Schema.GetOffset(0x9F4F2EA1BC5B8F41)); + get => ref _Handle.AsRef(_NumTeammatesHitOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlexControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlexControllerImpl.cs index fa6dc9396..2ceef793f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlexControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlexControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,25 +17,33 @@ internal partial class CFlexControllerImpl : SchemaClass, CFlexController { public CFlexControllerImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x5265FDF16750BACB), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x5265FDF16750BACB)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x5265FDF16750BACB, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x5265FDF1B580AB00), LazyThreadSafetyMode.None); + public string Type { get { - var ptr = _Handle.Read(Schema.GetOffset(0x5265FDF1B580AB00)); + var ptr = _Handle.Read(_TypeOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x5265FDF1B580AB00, value); + set => Schema.SetString(_Handle, _TypeOffset.Value, value); } + private static readonly Lazy _MinOffset = new(() => Schema.GetOffset(0x5265FDF1C98F4557), LazyThreadSafetyMode.None); + public ref float Min { - get => ref _Handle.AsRef(Schema.GetOffset(0x5265FDF1C98F4557)); + get => ref _Handle.AsRef(_MinOffset.Value); } + private static readonly Lazy _MaxOffset = new(() => Schema.GetOffset(0x5265FDF1D7A2E319), LazyThreadSafetyMode.None); + public ref float Max { - get => ref _Handle.AsRef(Schema.GetOffset(0x5265FDF1D7A2E319)); + get => ref _Handle.AsRef(_MaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlexDescImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlexDescImpl.cs index a825b1c35..6d836b632 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlexDescImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlexDescImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CFlexDescImpl : SchemaClass, CFlexDesc { public CFlexDescImpl(nint handle) : base(handle) { } + private static readonly Lazy _FacsOffset = new(() => Schema.GetOffset(0xF8B9C4900514A8FF), LazyThreadSafetyMode.None); + public string Facs { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF8B9C4900514A8FF)); + var ptr = _Handle.Read(_FacsOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF8B9C4900514A8FF, value); + set => Schema.SetString(_Handle, _FacsOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlexOpImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlexOpImpl.cs index 01cf632ef..dedd1d2e8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlexOpImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlexOpImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CFlexOpImpl : SchemaClass, CFlexOp { public CFlexOpImpl(nint handle) : base(handle) { } + private static readonly Lazy _OpCodeOffset = new(() => Schema.GetOffset(0xC684CC9A9850F387), LazyThreadSafetyMode.None); + public ref FlexOpCode_t OpCode { - get => ref _Handle.AsRef(Schema.GetOffset(0xC684CC9A9850F387)); + get => ref _Handle.AsRef(_OpCodeOffset.Value); } + private static readonly Lazy _DataOffset = new(() => Schema.GetOffset(0xC684CC9A1621C725), LazyThreadSafetyMode.None); + public ref int Data { - get => ref _Handle.AsRef(Schema.GetOffset(0xC684CC9A1621C725)); + get => ref _Handle.AsRef(_DataOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlexRuleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlexRuleImpl.cs index 0361eeddc..c50772c77 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlexRuleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFlexRuleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CFlexRuleImpl : SchemaClass, CFlexRule { public CFlexRuleImpl(nint handle) : base(handle) { } + private static readonly Lazy _FlexOffset = new(() => Schema.GetOffset(0xA92320A3D3DC2E86), LazyThreadSafetyMode.None); + public ref int Flex { - get => ref _Handle.AsRef(Schema.GetOffset(0xA92320A3D3DC2E86)); + get => ref _Handle.AsRef(_FlexOffset.Value); } + private static readonly Lazy _FlexOpsOffset = new(() => Schema.GetOffset(0xA92320A3F3F4D8D2), LazyThreadSafetyMode.None); + public ref CUtlVector FlexOps { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA92320A3F3F4D8D2)); + get => ref _Handle.AsRef>(_FlexOpsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFloatAnimParameterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFloatAnimParameterImpl.cs index 56d1d7a4b..264500de0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFloatAnimParameterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFloatAnimParameterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CFloatAnimParameterImpl : CConcreteAnimParameterImpl, CFl public CFloatAnimParameterImpl(nint handle) : base(handle) { } + private static readonly Lazy _DefaultValueOffset = new(() => Schema.GetOffset(0x6CE7934089D370B3), LazyThreadSafetyMode.None); + public ref float DefaultValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x6CE7934089D370B3)); + get => ref _Handle.AsRef(_DefaultValueOffset.Value); } + private static readonly Lazy _MinValueOffset = new(() => Schema.GetOffset(0x6CE79340AD86BD50), LazyThreadSafetyMode.None); + public ref float MinValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x6CE79340AD86BD50)); + get => ref _Handle.AsRef(_MinValueOffset.Value); } + private static readonly Lazy _MaxValueOffset = new(() => Schema.GetOffset(0x6CE79340DB7358B2), LazyThreadSafetyMode.None); + public ref float MaxValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x6CE79340DB7358B2)); + get => ref _Handle.AsRef(_MaxValueOffset.Value); } + private static readonly Lazy _InterpolateOffset = new(() => Schema.GetOffset(0x6CE79340F6607650), LazyThreadSafetyMode.None); + public ref bool Interpolate { - get => ref _Handle.AsRef(Schema.GetOffset(0x6CE79340F6607650)); + get => ref _Handle.AsRef(_InterpolateOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFloatExponentialMovingAverageImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFloatExponentialMovingAverageImpl.cs index 4e4d9e8f1..2c4668af8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFloatExponentialMovingAverageImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFloatExponentialMovingAverageImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFloatMovingAverageImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFloatMovingAverageImpl.cs index bc2e4d766..43f6dc90b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFloatMovingAverageImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFloatMovingAverageImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFogControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFogControllerImpl.cs index 3f916b970..21fe94a6e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFogControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFogControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CFogControllerImpl : CBaseEntityImpl, CFogController { public CFogControllerImpl(nint handle) : base(handle) { } + private static readonly Lazy _FogOffset = new(() => Schema.GetOffset(0x719804B29014635F), LazyThreadSafetyMode.None); + public fogparams_t Fog { - get => new fogparams_tImpl(_Handle + Schema.GetOffset(0x719804B29014635F)); + get => new fogparams_tImpl(_Handle + _FogOffset.Value); } + private static readonly Lazy _UseAnglesOffset = new(() => Schema.GetOffset(0x719804B2434C3DB4), LazyThreadSafetyMode.None); + public ref bool UseAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0x719804B2434C3DB4)); + get => ref _Handle.AsRef(_UseAnglesOffset.Value); } + private static readonly Lazy _ChangedVariablesOffset = new(() => Schema.GetOffset(0x719804B2BC173F39), LazyThreadSafetyMode.None); + public ref int ChangedVariables { - get => ref _Handle.AsRef(Schema.GetOffset(0x719804B2BC173F39)); + get => ref _Handle.AsRef(_ChangedVariablesOffset.Value); } public void FogUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFogTriggerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFogTriggerImpl.cs index 428cd4c12..dc810cd6e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFogTriggerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFogTriggerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CFogTriggerImpl : CBaseTriggerImpl, CFogTrigger { public CFogTriggerImpl(nint handle) : base(handle) { } + private static readonly Lazy _FogOffset = new(() => Schema.GetOffset(0x18A9AE6A9014635F), LazyThreadSafetyMode.None); + public fogparams_t Fog { - get => new fogparams_tImpl(_Handle + Schema.GetOffset(0x18A9AE6A9014635F)); + get => new fogparams_tImpl(_Handle + _FogOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFogVolumeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFogVolumeImpl.cs index b8323451d..889df90e9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFogVolumeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFogVolumeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,42 @@ internal partial class CFogVolumeImpl : CServerOnlyModelEntityImpl, CFogVolume { public CFogVolumeImpl(nint handle) : base(handle) { } + private static readonly Lazy _FogNameOffset = new(() => Schema.GetOffset(0x670FE9BC72E45F7C), LazyThreadSafetyMode.None); + public string FogName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x670FE9BC72E45F7C)); + var ptr = _Handle.Read(_FogNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x670FE9BC72E45F7C, value); + set => Schema.SetString(_Handle, _FogNameOffset.Value, value); } + private static readonly Lazy _PostProcessNameOffset = new(() => Schema.GetOffset(0x670FE9BCAA94630F), LazyThreadSafetyMode.None); + public string PostProcessName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x670FE9BCAA94630F)); + var ptr = _Handle.Read(_PostProcessNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x670FE9BCAA94630F, value); + set => Schema.SetString(_Handle, _PostProcessNameOffset.Value, value); } + private static readonly Lazy _ColorCorrectionNameOffset = new(() => Schema.GetOffset(0x670FE9BC0E26708B), LazyThreadSafetyMode.None); + public string ColorCorrectionName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x670FE9BC0E26708B)); + var ptr = _Handle.Read(_ColorCorrectionNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x670FE9BC0E26708B, value); + set => Schema.SetString(_Handle, _ColorCorrectionNameOffset.Value, value); } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x670FE9BC3A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x670FE9BC3A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _InFogVolumesListOffset = new(() => Schema.GetOffset(0x670FE9BC8D7209DD), LazyThreadSafetyMode.None); + public ref bool InFogVolumesList { - get => ref _Handle.AsRef(Schema.GetOffset(0x670FE9BC8D7209DD)); + get => ref _Handle.AsRef(_InFogVolumesListOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFollowAttachmentUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFollowAttachmentUpdateNodeImpl.cs index 444c1e857..18d87265c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFollowAttachmentUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFollowAttachmentUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CFollowAttachmentUpdateNodeImpl : CUnaryUpdateNodeImpl, C public CFollowAttachmentUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _OpFixedDataOffset = new(() => Schema.GetOffset(0x8E705AE36960AF8C), LazyThreadSafetyMode.None); + public FollowAttachmentSettings_t OpFixedData { - get => new FollowAttachmentSettings_tImpl(_Handle + Schema.GetOffset(0x8E705AE36960AF8C)); + get => new FollowAttachmentSettings_tImpl(_Handle + _OpFixedDataOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFollowPathUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFollowPathUpdateNodeImpl.cs index fa77dbbce..c3bc326d2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFollowPathUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFollowPathUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,70 @@ internal partial class CFollowPathUpdateNodeImpl : CUnaryUpdateNodeImpl, CFollow public CFollowPathUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _BlendOutTimeOffset = new(() => Schema.GetOffset(0x20514621EAA5AD2B), LazyThreadSafetyMode.None); + public ref float BlendOutTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x20514621EAA5AD2B)); + get => ref _Handle.AsRef(_BlendOutTimeOffset.Value); } + private static readonly Lazy _BlockNonPathMovementOffset = new(() => Schema.GetOffset(0x20514621C6CE607F), LazyThreadSafetyMode.None); + public ref bool BlockNonPathMovement { - get => ref _Handle.AsRef(Schema.GetOffset(0x20514621C6CE607F)); + get => ref _Handle.AsRef(_BlockNonPathMovementOffset.Value); } + private static readonly Lazy _StopFeetAtGoalOffset = new(() => Schema.GetOffset(0x20514621D5900E4B), LazyThreadSafetyMode.None); + public ref bool StopFeetAtGoal { - get => ref _Handle.AsRef(Schema.GetOffset(0x20514621D5900E4B)); + get => ref _Handle.AsRef(_StopFeetAtGoalOffset.Value); } + private static readonly Lazy _ScaleSpeedOffset = new(() => Schema.GetOffset(0x205146212776330C), LazyThreadSafetyMode.None); + public ref bool ScaleSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x205146212776330C)); + get => ref _Handle.AsRef(_ScaleSpeedOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x20514621B731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0x20514621B731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _MinAngleOffset = new(() => Schema.GetOffset(0x205146210D726024), LazyThreadSafetyMode.None); + public ref float MinAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0x205146210D726024)); + get => ref _Handle.AsRef(_MinAngleOffset.Value); } + private static readonly Lazy _MaxAngleOffset = new(() => Schema.GetOffset(0x20514621A4B3D8AE), LazyThreadSafetyMode.None); + public ref float MaxAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0x20514621A4B3D8AE)); + get => ref _Handle.AsRef(_MaxAngleOffset.Value); } + private static readonly Lazy _SpeedScaleBlendingOffset = new(() => Schema.GetOffset(0x205146216C96A1BD), LazyThreadSafetyMode.None); + public ref float SpeedScaleBlending { - get => ref _Handle.AsRef(Schema.GetOffset(0x205146216C96A1BD)); + get => ref _Handle.AsRef(_SpeedScaleBlendingOffset.Value); } + private static readonly Lazy _TurnDampingOffset = new(() => Schema.GetOffset(0x20514621822D585C), LazyThreadSafetyMode.None); + public CAnimInputDamping TurnDamping { - get => new CAnimInputDampingImpl(_Handle + Schema.GetOffset(0x20514621822D585C)); + get => new CAnimInputDampingImpl(_Handle + _TurnDampingOffset.Value); } + private static readonly Lazy _FacingTargetOffset = new(() => Schema.GetOffset(0x20514621ED73C452), LazyThreadSafetyMode.None); + public ref AnimValueSource FacingTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0x20514621ED73C452)); + get => ref _Handle.AsRef(_FacingTargetOffset.Value); } + private static readonly Lazy _ParamOffset = new(() => Schema.GetOffset(0x20514621679286A4), LazyThreadSafetyMode.None); + public CAnimParamHandle Param { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x20514621679286A4)); + get => new CAnimParamHandleImpl(_Handle + _ParamOffset.Value); } + private static readonly Lazy _TurnToFaceOffsetOffset = new(() => Schema.GetOffset(0x20514621359F1A87), LazyThreadSafetyMode.None); + public ref float TurnToFaceOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x20514621359F1A87)); + get => ref _Handle.AsRef(_TurnToFaceOffsetOffset.Value); } + private static readonly Lazy _TurnToFaceOffset = new(() => Schema.GetOffset(0x20514621BB363416), LazyThreadSafetyMode.None); + public ref bool TurnToFace { - get => ref _Handle.AsRef(Schema.GetOffset(0x20514621BB363416)); + get => ref _Handle.AsRef(_TurnToFaceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFollowTargetUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFollowTargetUpdateNodeImpl.cs index 3318a4d79..87a171dd0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFollowTargetUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFollowTargetUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CFollowTargetUpdateNodeImpl : CUnaryUpdateNodeImpl, CFoll public CFollowTargetUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _OpFixedDataOffset = new(() => Schema.GetOffset(0x2A45E9CB6960AF8C), LazyThreadSafetyMode.None); + public FollowTargetOpFixedSettings_t OpFixedData { - get => new FollowTargetOpFixedSettings_tImpl(_Handle + Schema.GetOffset(0x2A45E9CB6960AF8C)); + get => new FollowTargetOpFixedSettings_tImpl(_Handle + _OpFixedDataOffset.Value); } + private static readonly Lazy _ParameterPositionOffset = new(() => Schema.GetOffset(0x2A45E9CBDA71CD41), LazyThreadSafetyMode.None); + public CAnimParamHandle ParameterPosition { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x2A45E9CBDA71CD41)); + get => new CAnimParamHandleImpl(_Handle + _ParameterPositionOffset.Value); } + private static readonly Lazy _ParameterOrientationOffset = new(() => Schema.GetOffset(0x2A45E9CB1320E9C8), LazyThreadSafetyMode.None); + public CAnimParamHandle ParameterOrientation { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x2A45E9CB1320E9C8)); + get => new CAnimParamHandleImpl(_Handle + _ParameterOrientationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootAdjustmentUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootAdjustmentUpdateNodeImpl.cs index ed90a8ee3..3eeef7780 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootAdjustmentUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootAdjustmentUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class CFootAdjustmentUpdateNodeImpl : CUnaryUpdateNodeImpl, CFo public CFootAdjustmentUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _ClipsOffset = new(() => Schema.GetOffset(0x667ADE248CB21A38), LazyThreadSafetyMode.None); + public ref CUtlVector Clips { - get => ref _Handle.AsRef>(Schema.GetOffset(0x667ADE248CB21A38)); + get => ref _Handle.AsRef>(_ClipsOffset.Value); } + private static readonly Lazy _BasePoseCacheHandleOffset = new(() => Schema.GetOffset(0x667ADE240690C505), LazyThreadSafetyMode.None); + public CPoseHandle BasePoseCacheHandle { - get => new CPoseHandleImpl(_Handle + Schema.GetOffset(0x667ADE240690C505)); + get => new CPoseHandleImpl(_Handle + _BasePoseCacheHandleOffset.Value); } + private static readonly Lazy _FacingTargetOffset = new(() => Schema.GetOffset(0x667ADE24ED73C452), LazyThreadSafetyMode.None); + public CAnimParamHandle FacingTarget { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x667ADE24ED73C452)); + get => new CAnimParamHandleImpl(_Handle + _FacingTargetOffset.Value); } + private static readonly Lazy _TurnTimeMinOffset = new(() => Schema.GetOffset(0x667ADE247BF2813F), LazyThreadSafetyMode.None); + public ref float TurnTimeMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x667ADE247BF2813F)); + get => ref _Handle.AsRef(_TurnTimeMinOffset.Value); } + private static readonly Lazy _TurnTimeMaxOffset = new(() => Schema.GetOffset(0x667ADE2489DF0F91), LazyThreadSafetyMode.None); + public ref float TurnTimeMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x667ADE2489DF0F91)); + get => ref _Handle.AsRef(_TurnTimeMaxOffset.Value); } + private static readonly Lazy _StepHeightMaxOffset = new(() => Schema.GetOffset(0x667ADE24C48F8DDC), LazyThreadSafetyMode.None); + public ref float StepHeightMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x667ADE24C48F8DDC)); + get => ref _Handle.AsRef(_StepHeightMaxOffset.Value); } + private static readonly Lazy _StepHeightMaxAngleOffset = new(() => Schema.GetOffset(0x667ADE24E36AE247), LazyThreadSafetyMode.None); + public ref float StepHeightMaxAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0x667ADE24E36AE247)); + get => ref _Handle.AsRef(_StepHeightMaxAngleOffset.Value); } + private static readonly Lazy _ResetChildOffset = new(() => Schema.GetOffset(0x667ADE2465CC88B6), LazyThreadSafetyMode.None); + public ref bool ResetChild { - get => ref _Handle.AsRef(Schema.GetOffset(0x667ADE2465CC88B6)); + get => ref _Handle.AsRef(_ResetChildOffset.Value); } + private static readonly Lazy _AnimationDrivenOffset = new(() => Schema.GetOffset(0x667ADE24B5FFC0F3), LazyThreadSafetyMode.None); + public ref bool AnimationDriven { - get => ref _Handle.AsRef(Schema.GetOffset(0x667ADE24B5FFC0F3)); + get => ref _Handle.AsRef(_AnimationDrivenOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootCycleDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootCycleDefinitionImpl.cs index 5b70e7025..1f3de1148 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootCycleDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootCycleDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class CFootCycleDefinitionImpl : SchemaClass, CFootCycleDefinit public CFootCycleDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _StancePositionMSOffset = new(() => Schema.GetOffset(0x6D604C9567085F86), LazyThreadSafetyMode.None); + public ref Vector StancePositionMS { - get => ref _Handle.AsRef(Schema.GetOffset(0x6D604C9567085F86)); + get => ref _Handle.AsRef(_StancePositionMSOffset.Value); } + private static readonly Lazy _MidpointPositionMSOffset = new(() => Schema.GetOffset(0x6D604C9553980B1A), LazyThreadSafetyMode.None); + public ref Vector MidpointPositionMS { - get => ref _Handle.AsRef(Schema.GetOffset(0x6D604C9553980B1A)); + get => ref _Handle.AsRef(_MidpointPositionMSOffset.Value); } + private static readonly Lazy _StanceDirectionMSOffset = new(() => Schema.GetOffset(0x6D604C95848F3868), LazyThreadSafetyMode.None); + public ref float StanceDirectionMS { - get => ref _Handle.AsRef(Schema.GetOffset(0x6D604C95848F3868)); + get => ref _Handle.AsRef(_StanceDirectionMSOffset.Value); } + private static readonly Lazy _ToStrideStartPosOffset = new(() => Schema.GetOffset(0x6D604C953F2E1417), LazyThreadSafetyMode.None); + public ref Vector ToStrideStartPos { - get => ref _Handle.AsRef(Schema.GetOffset(0x6D604C953F2E1417)); + get => ref _Handle.AsRef(_ToStrideStartPosOffset.Value); } + private static readonly Lazy _StanceCycleOffset = new(() => Schema.GetOffset(0x6D604C954EDCBD91), LazyThreadSafetyMode.None); + public CAnimCycle StanceCycle { - get => new CAnimCycleImpl(_Handle + Schema.GetOffset(0x6D604C954EDCBD91)); + get => new CAnimCycleImpl(_Handle + _StanceCycleOffset.Value); } + private static readonly Lazy _FootLiftCycleOffset = new(() => Schema.GetOffset(0x6D604C9553A7B946), LazyThreadSafetyMode.None); + public CFootCycle FootLiftCycle { - get => new CFootCycleImpl(_Handle + Schema.GetOffset(0x6D604C9553A7B946)); + get => new CFootCycleImpl(_Handle + _FootLiftCycleOffset.Value); } + private static readonly Lazy _FootOffCycleOffset = new(() => Schema.GetOffset(0x6D604C959AC5AE30), LazyThreadSafetyMode.None); + public CFootCycle FootOffCycle { - get => new CFootCycleImpl(_Handle + Schema.GetOffset(0x6D604C959AC5AE30)); + get => new CFootCycleImpl(_Handle + _FootOffCycleOffset.Value); } + private static readonly Lazy _FootStrikeCycleOffset = new(() => Schema.GetOffset(0x6D604C95E4D3DC2B), LazyThreadSafetyMode.None); + public CFootCycle FootStrikeCycle { - get => new CFootCycleImpl(_Handle + Schema.GetOffset(0x6D604C95E4D3DC2B)); + get => new CFootCycleImpl(_Handle + _FootStrikeCycleOffset.Value); } + private static readonly Lazy _FootLandCycleOffset = new(() => Schema.GetOffset(0x6D604C954C100B46), LazyThreadSafetyMode.None); + public CFootCycle FootLandCycle { - get => new CFootCycleImpl(_Handle + Schema.GetOffset(0x6D604C954C100B46)); + get => new CFootCycleImpl(_Handle + _FootLandCycleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootCycleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootCycleImpl.cs index c845701ab..40009986e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootCycleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootCycleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootCycleMetricEvaluatorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootCycleMetricEvaluatorImpl.cs index e597a3d27..5393aede7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootCycleMetricEvaluatorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootCycleMetricEvaluatorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CFootCycleMetricEvaluatorImpl : CMotionMetricEvaluatorImp public CFootCycleMetricEvaluatorImpl(nint handle) : base(handle) { } + private static readonly Lazy _FootIndicesOffset = new(() => Schema.GetOffset(0x1773C1814C840316), LazyThreadSafetyMode.None); + public ref CUtlVector FootIndices { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1773C1814C840316)); + get => ref _Handle.AsRef>(_FootIndicesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootDefinitionImpl.cs index f57156064..334bfcc03 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,62 @@ internal partial class CFootDefinitionImpl : SchemaClass, CFootDefinition { public CFootDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xAA3BA2A34D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xAA3BA2A34D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xAA3BA2A34D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _AnkleBoneNameOffset = new(() => Schema.GetOffset(0xAA3BA2A3A8A2DEF9), LazyThreadSafetyMode.None); + public string AnkleBoneName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xAA3BA2A3A8A2DEF9)); + var ptr = _Handle.Read(_AnkleBoneNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xAA3BA2A3A8A2DEF9, value); + set => Schema.SetString(_Handle, _AnkleBoneNameOffset.Value, value); } + private static readonly Lazy _ToeBoneNameOffset = new(() => Schema.GetOffset(0xAA3BA2A39C96209A), LazyThreadSafetyMode.None); + public string ToeBoneName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xAA3BA2A39C96209A)); + var ptr = _Handle.Read(_ToeBoneNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xAA3BA2A39C96209A, value); + set => Schema.SetString(_Handle, _ToeBoneNameOffset.Value, value); } + private static readonly Lazy _BallOffsetOffset = new(() => Schema.GetOffset(0xAA3BA2A3E3376F1B), LazyThreadSafetyMode.None); + public ref Vector BallOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xAA3BA2A3E3376F1B)); + get => ref _Handle.AsRef(_BallOffsetOffset.Value); } + private static readonly Lazy _HeelOffsetOffset = new(() => Schema.GetOffset(0xAA3BA2A3306AE608), LazyThreadSafetyMode.None); + public ref Vector HeelOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xAA3BA2A3306AE608)); + get => ref _Handle.AsRef(_HeelOffsetOffset.Value); } + private static readonly Lazy _FootLengthOffset = new(() => Schema.GetOffset(0xAA3BA2A308C0C9F7), LazyThreadSafetyMode.None); + public ref float FootLength { - get => ref _Handle.AsRef(Schema.GetOffset(0xAA3BA2A308C0C9F7)); + get => ref _Handle.AsRef(_FootLengthOffset.Value); } + private static readonly Lazy _BindPoseDirectionMSOffset = new(() => Schema.GetOffset(0xAA3BA2A34413B862), LazyThreadSafetyMode.None); + public ref float BindPoseDirectionMS { - get => ref _Handle.AsRef(Schema.GetOffset(0xAA3BA2A34413B862)); + get => ref _Handle.AsRef(_BindPoseDirectionMSOffset.Value); } + private static readonly Lazy _TraceHeightOffset = new(() => Schema.GetOffset(0xAA3BA2A3EFB858CF), LazyThreadSafetyMode.None); + public ref float TraceHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0xAA3BA2A3EFB858CF)); + get => ref _Handle.AsRef(_TraceHeightOffset.Value); } + private static readonly Lazy _TraceRadiusOffset = new(() => Schema.GetOffset(0xAA3BA2A39A33E452), LazyThreadSafetyMode.None); + public ref float TraceRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xAA3BA2A39A33E452)); + get => ref _Handle.AsRef(_TraceRadiusOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootFallAnimTagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootFallAnimTagImpl.cs index 8877c3d54..730a99226 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootFallAnimTagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootFallAnimTagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CFootFallAnimTagImpl : CAnimTagBaseImpl, CFootFallAnimTag public CFootFallAnimTagImpl(nint handle) : base(handle) { } + private static readonly Lazy _FootOffset = new(() => Schema.GetOffset(0xC142B61EEB2B8B39), LazyThreadSafetyMode.None); + public ref FootFallTagFoot_t Foot { - get => ref _Handle.AsRef(Schema.GetOffset(0xC142B61EEB2B8B39)); + get => ref _Handle.AsRef(_FootOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootLockUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootLockUpdateNodeImpl.cs index 33b8494af..561cc8656 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootLockUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootLockUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,65 +17,105 @@ internal partial class CFootLockUpdateNodeImpl : CUnaryUpdateNodeImpl, CFootLock public CFootLockUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _OpFixedSettingsOffset = new(() => Schema.GetOffset(0xA8F37E8E533AB09), LazyThreadSafetyMode.None); + public FootLockPoseOpFixedSettings OpFixedSettings { - get => new FootLockPoseOpFixedSettingsImpl(_Handle + Schema.GetOffset(0xA8F37E8E533AB09)); + get => new FootLockPoseOpFixedSettingsImpl(_Handle + _OpFixedSettingsOffset.Value); } + private static readonly Lazy _FootSettingsOffset = new(() => Schema.GetOffset(0xA8F37E8A7F2ADE4), LazyThreadSafetyMode.None); + public ref CUtlVector FootSettings { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F37E8A7F2ADE4)); + get => ref _Handle.AsRef>(_FootSettingsOffset.Value); } + private static readonly Lazy _HipShiftDampingOffset = new(() => Schema.GetOffset(0xA8F37E80EA57628), LazyThreadSafetyMode.None); + public CAnimInputDamping HipShiftDamping { - get => new CAnimInputDampingImpl(_Handle + Schema.GetOffset(0xA8F37E80EA57628)); + get => new CAnimInputDampingImpl(_Handle + _HipShiftDampingOffset.Value); } + private static readonly Lazy _RootHeightDampingOffset = new(() => Schema.GetOffset(0xA8F37E84DE10164), LazyThreadSafetyMode.None); + public CAnimInputDamping RootHeightDamping { - get => new CAnimInputDampingImpl(_Handle + Schema.GetOffset(0xA8F37E84DE10164)); + get => new CAnimInputDampingImpl(_Handle + _RootHeightDampingOffset.Value); } + private static readonly Lazy _StrideCurveScaleOffset = new(() => Schema.GetOffset(0xA8F37E824E250E9), LazyThreadSafetyMode.None); + public ref float StrideCurveScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F37E824E250E9)); + get => ref _Handle.AsRef(_StrideCurveScaleOffset.Value); } + private static readonly Lazy _StrideCurveLimitScaleOffset = new(() => Schema.GetOffset(0xA8F37E8BE5E55F6), LazyThreadSafetyMode.None); + public ref float StrideCurveLimitScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F37E8BE5E55F6)); + get => ref _Handle.AsRef(_StrideCurveLimitScaleOffset.Value); } + private static readonly Lazy _StepHeightIncreaseScaleOffset = new(() => Schema.GetOffset(0xA8F37E8AEFDE950), LazyThreadSafetyMode.None); + public ref float StepHeightIncreaseScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F37E8AEFDE950)); + get => ref _Handle.AsRef(_StepHeightIncreaseScaleOffset.Value); } + private static readonly Lazy _StepHeightDecreaseScaleOffset = new(() => Schema.GetOffset(0xA8F37E882893258), LazyThreadSafetyMode.None); + public ref float StepHeightDecreaseScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F37E882893258)); + get => ref _Handle.AsRef(_StepHeightDecreaseScaleOffset.Value); } + private static readonly Lazy _HipShiftScaleOffset = new(() => Schema.GetOffset(0xA8F37E847C1BE5A), LazyThreadSafetyMode.None); + public ref float HipShiftScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F37E847C1BE5A)); + get => ref _Handle.AsRef(_HipShiftScaleOffset.Value); } + private static readonly Lazy _BlendTimeOffset = new(() => Schema.GetOffset(0xA8F37E8A6206E9F), LazyThreadSafetyMode.None); + public ref float BlendTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F37E8A6206E9F)); + get => ref _Handle.AsRef(_BlendTimeOffset.Value); } + private static readonly Lazy _MaxRootHeightOffsetOffset = new(() => Schema.GetOffset(0xA8F37E8C33AC7DF), LazyThreadSafetyMode.None); + public ref float MaxRootHeightOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F37E8C33AC7DF)); + get => ref _Handle.AsRef(_MaxRootHeightOffsetOffset.Value); } + private static readonly Lazy _MinRootHeightOffsetOffset = new(() => Schema.GetOffset(0xA8F37E8D9B970B1), LazyThreadSafetyMode.None); + public ref float MinRootHeightOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F37E8D9B970B1)); + get => ref _Handle.AsRef(_MinRootHeightOffsetOffset.Value); } + private static readonly Lazy _TiltPlanePitchSpringStrengthOffset = new(() => Schema.GetOffset(0xA8F37E864893350), LazyThreadSafetyMode.None); + public ref float TiltPlanePitchSpringStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F37E864893350)); + get => ref _Handle.AsRef(_TiltPlanePitchSpringStrengthOffset.Value); } + private static readonly Lazy _TiltPlaneRollSpringStrengthOffset = new(() => Schema.GetOffset(0xA8F37E8AD412E55), LazyThreadSafetyMode.None); + public ref float TiltPlaneRollSpringStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F37E8AD412E55)); + get => ref _Handle.AsRef(_TiltPlaneRollSpringStrengthOffset.Value); } + private static readonly Lazy _ApplyFootRotationLimitsOffset = new(() => Schema.GetOffset(0xA8F37E87C3F5AED), LazyThreadSafetyMode.None); + public ref bool ApplyFootRotationLimits { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F37E87C3F5AED)); + get => ref _Handle.AsRef(_ApplyFootRotationLimitsOffset.Value); } + private static readonly Lazy _ApplyHipShiftOffset = new(() => Schema.GetOffset(0xA8F37E8DE90F994), LazyThreadSafetyMode.None); + public ref bool ApplyHipShift { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F37E8DE90F994)); + get => ref _Handle.AsRef(_ApplyHipShiftOffset.Value); } + private static readonly Lazy _ModulateStepHeightOffset = new(() => Schema.GetOffset(0xA8F37E82412FFBF), LazyThreadSafetyMode.None); + public ref bool ModulateStepHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F37E82412FFBF)); + get => ref _Handle.AsRef(_ModulateStepHeightOffset.Value); } + private static readonly Lazy _ResetChildOffset = new(() => Schema.GetOffset(0xA8F37E865CC88B6), LazyThreadSafetyMode.None); + public ref bool ResetChild { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F37E865CC88B6)); + get => ref _Handle.AsRef(_ResetChildOffset.Value); } + private static readonly Lazy _EnableVerticalCurvedPathsOffset = new(() => Schema.GetOffset(0xA8F37E80A18A0EB), LazyThreadSafetyMode.None); + public ref bool EnableVerticalCurvedPaths { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F37E80A18A0EB)); + get => ref _Handle.AsRef(_EnableVerticalCurvedPathsOffset.Value); } + private static readonly Lazy _EnableRootHeightDampingOffset = new(() => Schema.GetOffset(0xA8F37E802F42911), LazyThreadSafetyMode.None); + public ref bool EnableRootHeightDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8F37E802F42911)); + get => ref _Handle.AsRef(_EnableRootHeightDampingOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootMotionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootMotionImpl.cs index 8f615a263..a903c81fb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootMotionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootMotionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class CFootMotionImpl : SchemaClass, CFootMotion { public CFootMotionImpl(nint handle) : base(handle) { } + private static readonly Lazy _StridesOffset = new(() => Schema.GetOffset(0xA4A598B8AE9C97F1), LazyThreadSafetyMode.None); + public ref CUtlVector Strides { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA4A598B8AE9C97F1)); + get => ref _Handle.AsRef>(_StridesOffset.Value); } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xA4A598B84D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA4A598B84D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA4A598B84D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _AdditiveOffset = new(() => Schema.GetOffset(0xA4A598B80FA86105), LazyThreadSafetyMode.None); + public ref bool Additive { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4A598B80FA86105)); + get => ref _Handle.AsRef(_AdditiveOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootPinningUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootPinningUpdateNodeImpl.cs index a35b7a119..d6e291d93 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootPinningUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootPinningUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CFootPinningUpdateNodeImpl : CUnaryUpdateNodeImpl, CFootP public CFootPinningUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _PoseOpFixedDataOffset = new(() => Schema.GetOffset(0x9D0C68166EC45627), LazyThreadSafetyMode.None); + public FootPinningPoseOpFixedData_t PoseOpFixedData { - get => new FootPinningPoseOpFixedData_tImpl(_Handle + Schema.GetOffset(0x9D0C68166EC45627)); + get => new FootPinningPoseOpFixedData_tImpl(_Handle + _PoseOpFixedDataOffset.Value); } + private static readonly Lazy _TimingSourceOffset = new(() => Schema.GetOffset(0x9D0C68164D5A2DD7), LazyThreadSafetyMode.None); + public ref FootPinningTimingSource TimingSource { - get => ref _Handle.AsRef(Schema.GetOffset(0x9D0C68164D5A2DD7)); + get => ref _Handle.AsRef(_TimingSourceOffset.Value); } + private static readonly Lazy _ParamsOffset = new(() => Schema.GetOffset(0x9D0C6816640EA8F3), LazyThreadSafetyMode.None); + public ref CUtlVector Params { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9D0C6816640EA8F3)); + get => ref _Handle.AsRef>(_ParamsOffset.Value); } + private static readonly Lazy _ResetChildOffset = new(() => Schema.GetOffset(0x9D0C681665CC88B6), LazyThreadSafetyMode.None); + public ref bool ResetChild { - get => ref _Handle.AsRef(Schema.GetOffset(0x9D0C681665CC88B6)); + get => ref _Handle.AsRef(_ResetChildOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootPositionMetricEvaluatorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootPositionMetricEvaluatorImpl.cs index 268578710..3982b1863 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootPositionMetricEvaluatorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootPositionMetricEvaluatorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CFootPositionMetricEvaluatorImpl : CMotionMetricEvaluator public CFootPositionMetricEvaluatorImpl(nint handle) : base(handle) { } + private static readonly Lazy _FootIndicesOffset = new(() => Schema.GetOffset(0x67E807C64C840316), LazyThreadSafetyMode.None); + public ref CUtlVector FootIndices { - get => ref _Handle.AsRef>(Schema.GetOffset(0x67E807C64C840316)); + get => ref _Handle.AsRef>(_FootIndicesOffset.Value); } + private static readonly Lazy _IgnoreSlopeOffset = new(() => Schema.GetOffset(0x67E807C6541E43F2), LazyThreadSafetyMode.None); + public ref bool IgnoreSlope { - get => ref _Handle.AsRef(Schema.GetOffset(0x67E807C6541E43F2)); + get => ref _Handle.AsRef(_IgnoreSlopeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootStepTriggerUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootStepTriggerUpdateNodeImpl.cs index 457127e71..c56b6996b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootStepTriggerUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootStepTriggerUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CFootStepTriggerUpdateNodeImpl : CUnaryUpdateNodeImpl, CF public CFootStepTriggerUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _TriggersOffset = new(() => Schema.GetOffset(0x799A3B55684C6AF0), LazyThreadSafetyMode.None); + public ref CUtlVector Triggers { - get => ref _Handle.AsRef>(Schema.GetOffset(0x799A3B55684C6AF0)); + get => ref _Handle.AsRef>(_TriggersOffset.Value); } + private static readonly Lazy _ToleranceOffset = new(() => Schema.GetOffset(0x799A3B558C29728E), LazyThreadSafetyMode.None); + public ref float Tolerance { - get => ref _Handle.AsRef(Schema.GetOffset(0x799A3B558C29728E)); + get => ref _Handle.AsRef(_ToleranceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootStrideImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootStrideImpl.cs index a1baaded9..db0badea4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootStrideImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootStrideImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CFootStrideImpl : SchemaClass, CFootStride { public CFootStrideImpl(nint handle) : base(handle) { } + private static readonly Lazy _DefinitionOffset = new(() => Schema.GetOffset(0x6093B6FA95E6F40), LazyThreadSafetyMode.None); + public CFootCycleDefinition Definition { - get => new CFootCycleDefinitionImpl(_Handle + Schema.GetOffset(0x6093B6FA95E6F40)); + get => new CFootCycleDefinitionImpl(_Handle + _DefinitionOffset.Value); } + private static readonly Lazy _TrajectoriesOffset = new(() => Schema.GetOffset(0x6093B6F7964C78C), LazyThreadSafetyMode.None); + public CFootTrajectories Trajectories { - get => new CFootTrajectoriesImpl(_Handle + Schema.GetOffset(0x6093B6F7964C78C)); + get => new CFootTrajectoriesImpl(_Handle + _TrajectoriesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootTrajectoriesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootTrajectoriesImpl.cs index 991d09425..e8aa8f8e7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootTrajectoriesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootTrajectoriesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CFootTrajectoriesImpl : SchemaClass, CFootTrajectories { public CFootTrajectoriesImpl(nint handle) : base(handle) { } + private static readonly Lazy _TrajectoriesOffset = new(() => Schema.GetOffset(0x5D019D277964C78C), LazyThreadSafetyMode.None); + public ref CUtlVector Trajectories { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5D019D277964C78C)); + get => ref _Handle.AsRef>(_TrajectoriesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootTrajectoryImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootTrajectoryImpl.cs index 2777e65a3..2d7323144 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootTrajectoryImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootTrajectoryImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CFootTrajectoryImpl : SchemaClass, CFootTrajectory { public CFootTrajectoryImpl(nint handle) : base(handle) { } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0x193297AFFE159136), LazyThreadSafetyMode.None); + public ref Vector Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0x193297AFFE159136)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _RotationOffsetOffset = new(() => Schema.GetOffset(0x193297AFF811C66E), LazyThreadSafetyMode.None); + public ref float RotationOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x193297AFF811C66E)); + get => ref _Handle.AsRef(_RotationOffsetOffset.Value); } + private static readonly Lazy _ProgressionOffset = new(() => Schema.GetOffset(0x193297AF4C9E1656), LazyThreadSafetyMode.None); + public ref float Progression { - get => ref _Handle.AsRef(Schema.GetOffset(0x193297AF4C9E1656)); + get => ref _Handle.AsRef(_ProgressionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootstepControlImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootstepControlImpl.cs index 0bf36d1bb..7359251fa 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootstepControlImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootstepControlImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,19 +17,23 @@ internal partial class CFootstepControlImpl : CBaseTriggerImpl, CFootstepControl public CFootstepControlImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceOffset = new(() => Schema.GetOffset(0x85B34315D0835C78), LazyThreadSafetyMode.None); + public string Source { get { - var ptr = _Handle.Read(Schema.GetOffset(0x85B34315D0835C78)); + var ptr = _Handle.Read(_SourceOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x85B34315D0835C78, value); + set => Schema.SetString(_Handle, _SourceOffset.Value, value); } + private static readonly Lazy _DestinationOffset = new(() => Schema.GetOffset(0x85B343156E5C12DF), LazyThreadSafetyMode.None); + public string Destination { get { - var ptr = _Handle.Read(Schema.GetOffset(0x85B343156E5C12DF)); + var ptr = _Handle.Read(_DestinationOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x85B343156E5C12DF, value); + set => Schema.SetString(_Handle, _DestinationOffset.Value, value); } public void SourceUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootstepLandedAnimTagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootstepLandedAnimTagImpl.cs index 5c5a6d9ff..8a12e6dce 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootstepLandedAnimTagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootstepLandedAnimTagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,37 @@ internal partial class CFootstepLandedAnimTagImpl : CAnimTagBaseImpl, CFootstepL public CFootstepLandedAnimTagImpl(nint handle) : base(handle) { } + private static readonly Lazy _FootstepTypeOffset = new(() => Schema.GetOffset(0xD5058C6793F974DB), LazyThreadSafetyMode.None); + public ref FootstepLandedFootSoundType_t FootstepType { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5058C6793F974DB)); + get => ref _Handle.AsRef(_FootstepTypeOffset.Value); } + private static readonly Lazy _OverrideSoundNameOffset = new(() => Schema.GetOffset(0xD5058C67FEE552B7), LazyThreadSafetyMode.None); + public string OverrideSoundName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD5058C67FEE552B7)); + var ptr = _Handle.Read(_OverrideSoundNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD5058C67FEE552B7, value); + set => Schema.SetString(_Handle, _OverrideSoundNameOffset.Value, value); } + private static readonly Lazy _DebugAnimSourceStringOffset = new(() => Schema.GetOffset(0xD5058C676912A1B9), LazyThreadSafetyMode.None); + public string DebugAnimSourceString { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD5058C676912A1B9)); + var ptr = _Handle.Read(_DebugAnimSourceStringOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD5058C676912A1B9, value); + set => Schema.SetString(_Handle, _DebugAnimSourceStringOffset.Value, value); } + private static readonly Lazy _BoneNameOffset = new(() => Schema.GetOffset(0xD5058C6707D0902C), LazyThreadSafetyMode.None); + public string BoneName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD5058C6707D0902C)); + var ptr = _Handle.Read(_BoneNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD5058C6707D0902C, value); + set => Schema.SetString(_Handle, _BoneNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootstepTableHandleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootstepTableHandleImpl.cs index a48d7b1b5..f949cff6f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootstepTableHandleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFootstepTableHandleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncBrushImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncBrushImpl.cs index 11ab50544..7d4162219 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncBrushImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncBrushImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,27 +17,39 @@ internal partial class CFuncBrushImpl : CBaseModelEntityImpl, CFuncBrush { public CFuncBrushImpl(nint handle) : base(handle) { } + private static readonly Lazy _SolidityOffset = new(() => Schema.GetOffset(0x26435484B869EE4D), LazyThreadSafetyMode.None); + public ref BrushSolidities_e Solidity { - get => ref _Handle.AsRef(Schema.GetOffset(0x26435484B869EE4D)); + get => ref _Handle.AsRef(_SolidityOffset.Value); } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x2643548451B3CEAC), LazyThreadSafetyMode.None); + public ref int Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x2643548451B3CEAC)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _SolidBspOffset = new(() => Schema.GetOffset(0x26435484A50CEC89), LazyThreadSafetyMode.None); + public ref bool SolidBsp { - get => ref _Handle.AsRef(Schema.GetOffset(0x26435484A50CEC89)); + get => ref _Handle.AsRef(_SolidBspOffset.Value); } + private static readonly Lazy _ExcludedClassOffset = new(() => Schema.GetOffset(0x2643548495B3D111), LazyThreadSafetyMode.None); + public string ExcludedClass { get { - var ptr = _Handle.Read(Schema.GetOffset(0x2643548495B3D111)); + var ptr = _Handle.Read(_ExcludedClassOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x2643548495B3D111, value); + set => Schema.SetString(_Handle, _ExcludedClassOffset.Value, value); } + private static readonly Lazy _InvertExclusionOffset = new(() => Schema.GetOffset(0x264354845DE14F07), LazyThreadSafetyMode.None); + public ref bool InvertExclusion { - get => ref _Handle.AsRef(Schema.GetOffset(0x264354845DE14F07)); + get => ref _Handle.AsRef(_InvertExclusionOffset.Value); } + private static readonly Lazy _ScriptedMovementOffset = new(() => Schema.GetOffset(0x26435484C2863DD2), LazyThreadSafetyMode.None); + public ref bool ScriptedMovement { - get => ref _Handle.AsRef(Schema.GetOffset(0x26435484C2863DD2)); + get => ref _Handle.AsRef(_ScriptedMovementOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncConveyorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncConveyorImpl.cs index 2113edbbb..458566b92 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncConveyorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncConveyorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,36 +17,54 @@ internal partial class CFuncConveyorImpl : CBaseModelEntityImpl, CFuncConveyor { public CFuncConveyorImpl(nint handle) : base(handle) { } + private static readonly Lazy _ConveyorModelsOffset = new(() => Schema.GetOffset(0x6E29EBA973AE4DBB), LazyThreadSafetyMode.None); + public string ConveyorModels { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6E29EBA973AE4DBB)); + var ptr = _Handle.Read(_ConveyorModelsOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6E29EBA973AE4DBB, value); + set => Schema.SetString(_Handle, _ConveyorModelsOffset.Value, value); } + private static readonly Lazy _TransitionDurationSecondsOffset = new(() => Schema.GetOffset(0x6E29EBA9D5E92B1D), LazyThreadSafetyMode.None); + public ref float TransitionDurationSeconds { - get => ref _Handle.AsRef(Schema.GetOffset(0x6E29EBA9D5E92B1D)); + get => ref _Handle.AsRef(_TransitionDurationSecondsOffset.Value); } + private static readonly Lazy _MoveEntitySpaceOffset = new(() => Schema.GetOffset(0x6E29EBA9325319F9), LazyThreadSafetyMode.None); + public ref QAngle MoveEntitySpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x6E29EBA9325319F9)); + get => ref _Handle.AsRef(_MoveEntitySpaceOffset.Value); } + private static readonly Lazy _MoveDirEntitySpaceOffset = new(() => Schema.GetOffset(0x6E29EBA98181512A), LazyThreadSafetyMode.None); + public ref Vector MoveDirEntitySpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x6E29EBA98181512A)); + get => ref _Handle.AsRef(_MoveDirEntitySpaceOffset.Value); } + private static readonly Lazy _TargetSpeedOffset = new(() => Schema.GetOffset(0x6E29EBA99C627845), LazyThreadSafetyMode.None); + public ref float TargetSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x6E29EBA99C627845)); + get => ref _Handle.AsRef(_TargetSpeedOffset.Value); } + private static readonly Lazy _TransitionStartTickOffset = new(() => Schema.GetOffset(0x6E29EBA9FB464AF3), LazyThreadSafetyMode.None); + public GameTick_t TransitionStartTick { - get => new GameTick_tImpl(_Handle + Schema.GetOffset(0x6E29EBA9FB464AF3)); + get => new GameTick_tImpl(_Handle + _TransitionStartTickOffset.Value); } + private static readonly Lazy _TransitionDurationTicksOffset = new(() => Schema.GetOffset(0x6E29EBA9B99437D4), LazyThreadSafetyMode.None); + public ref int TransitionDurationTicks { - get => ref _Handle.AsRef(Schema.GetOffset(0x6E29EBA9B99437D4)); + get => ref _Handle.AsRef(_TransitionDurationTicksOffset.Value); } + private static readonly Lazy _TransitionStartSpeedOffset = new(() => Schema.GetOffset(0x6E29EBA97456F6D7), LazyThreadSafetyMode.None); + public ref float TransitionStartSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x6E29EBA97456F6D7)); + get => ref _Handle.AsRef(_TransitionStartSpeedOffset.Value); } + private static readonly Lazy _ConveyorModels1Offset = new(() => Schema.GetOffset(0x6E29EBA9BAB755A8), LazyThreadSafetyMode.None); + public ref CUtlVector> ConveyorModels1 { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x6E29EBA9BAB755A8)); + get => ref _Handle.AsRef>>(_ConveyorModels1Offset.Value); } public void MoveDirEntitySpaceUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncElectrifiedVolumeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncElectrifiedVolumeImpl.cs index e8bece86c..48ee91ffa 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncElectrifiedVolumeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncElectrifiedVolumeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,33 +17,41 @@ internal partial class CFuncElectrifiedVolumeImpl : CFuncBrushImpl, CFuncElectri public CFuncElectrifiedVolumeImpl(nint handle) : base(handle) { } + private static readonly Lazy _EffectNameOffset = new(() => Schema.GetOffset(0x51A0E59866CD81EF), LazyThreadSafetyMode.None); + public string EffectName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x51A0E59866CD81EF)); + var ptr = _Handle.Read(_EffectNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x51A0E59866CD81EF, value); + set => Schema.SetString(_Handle, _EffectNameOffset.Value, value); } + private static readonly Lazy _EffectInterpenetrateNameOffset = new(() => Schema.GetOffset(0x51A0E5987691FB19), LazyThreadSafetyMode.None); + public string EffectInterpenetrateName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x51A0E5987691FB19)); + var ptr = _Handle.Read(_EffectInterpenetrateNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x51A0E5987691FB19, value); + set => Schema.SetString(_Handle, _EffectInterpenetrateNameOffset.Value, value); } + private static readonly Lazy _EffectZapNameOffset = new(() => Schema.GetOffset(0x51A0E598BE142B78), LazyThreadSafetyMode.None); + public string EffectZapName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x51A0E598BE142B78)); + var ptr = _Handle.Read(_EffectZapNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x51A0E598BE142B78, value); + set => Schema.SetString(_Handle, _EffectZapNameOffset.Value, value); } + private static readonly Lazy _EffectSourceOffset = new(() => Schema.GetOffset(0x51A0E598300F4ED9), LazyThreadSafetyMode.None); + public string EffectSource { get { - var ptr = _Handle.Read(Schema.GetOffset(0x51A0E598300F4ED9)); + var ptr = _Handle.Read(_EffectSourceOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x51A0E598300F4ED9, value); + set => Schema.SetString(_Handle, _EffectSourceOffset.Value, value); } public void EffectNameUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncIllusionaryImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncIllusionaryImpl.cs index e9f2a7509..df02a9289 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncIllusionaryImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncIllusionaryImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncInteractionLayerClipImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncInteractionLayerClipImpl.cs index 2096ba8a3..ff5662875 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncInteractionLayerClipImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncInteractionLayerClipImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,22 +17,28 @@ internal partial class CFuncInteractionLayerClipImpl : CBaseModelEntityImpl, CFu public CFuncInteractionLayerClipImpl(nint handle) : base(handle) { } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x5A9288DF3A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x5A9288DF3A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _InteractsAsOffset = new(() => Schema.GetOffset(0x5A9288DF488FC5DC), LazyThreadSafetyMode.None); + public string InteractsAs { get { - var ptr = _Handle.Read(Schema.GetOffset(0x5A9288DF488FC5DC)); + var ptr = _Handle.Read(_InteractsAsOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x5A9288DF488FC5DC, value); + set => Schema.SetString(_Handle, _InteractsAsOffset.Value, value); } + private static readonly Lazy _InteractsWithOffset = new(() => Schema.GetOffset(0x5A9288DF84AB4214), LazyThreadSafetyMode.None); + public string InteractsWith { get { - var ptr = _Handle.Read(Schema.GetOffset(0x5A9288DF84AB4214)); + var ptr = _Handle.Read(_InteractsWithOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x5A9288DF84AB4214, value); + set => Schema.SetString(_Handle, _InteractsWithOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncLadderAlias_func_useableladderImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncLadderAlias_func_useableladderImpl.cs index 83ede797d..26965533f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncLadderAlias_func_useableladderImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncLadderAlias_func_useableladderImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncLadderImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncLadderImpl.cs index 706233d49..a22991b5d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncLadderImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncLadderImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,45 +17,69 @@ internal partial class CFuncLadderImpl : CBaseModelEntityImpl, CFuncLadder { public CFuncLadderImpl(nint handle) : base(handle) { } + private static readonly Lazy _LadderDirOffset = new(() => Schema.GetOffset(0xD85E0238BEE3D218), LazyThreadSafetyMode.None); + public ref Vector LadderDir { - get => ref _Handle.AsRef(Schema.GetOffset(0xD85E0238BEE3D218)); + get => ref _Handle.AsRef(_LadderDirOffset.Value); } + private static readonly Lazy _DismountsOffset = new(() => Schema.GetOffset(0xD85E0238E1BF2F19), LazyThreadSafetyMode.None); + public ref CUtlVector> Dismounts { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xD85E0238E1BF2F19)); + get => ref _Handle.AsRef>>(_DismountsOffset.Value); } + private static readonly Lazy _LocalTopOffset = new(() => Schema.GetOffset(0xD85E0238A709E4E3), LazyThreadSafetyMode.None); + public ref Vector LocalTop { - get => ref _Handle.AsRef(Schema.GetOffset(0xD85E0238A709E4E3)); + get => ref _Handle.AsRef(_LocalTopOffset.Value); } + private static readonly Lazy _PlayerMountPositionTopOffset = new(() => Schema.GetOffset(0xD85E02383DC07685), LazyThreadSafetyMode.None); + public ref Vector PlayerMountPositionTop { - get => ref _Handle.AsRef(Schema.GetOffset(0xD85E02383DC07685)); + get => ref _Handle.AsRef(_PlayerMountPositionTopOffset.Value); } + private static readonly Lazy _PlayerMountPositionBottomOffset = new(() => Schema.GetOffset(0xD85E02387AC961B1), LazyThreadSafetyMode.None); + public ref Vector PlayerMountPositionBottom { - get => ref _Handle.AsRef(Schema.GetOffset(0xD85E02387AC961B1)); + get => ref _Handle.AsRef(_PlayerMountPositionBottomOffset.Value); } + private static readonly Lazy _AutoRideSpeedOffset = new(() => Schema.GetOffset(0xD85E0238B5C8CE19), LazyThreadSafetyMode.None); + public ref float AutoRideSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xD85E0238B5C8CE19)); + get => ref _Handle.AsRef(_AutoRideSpeedOffset.Value); } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0xD85E02383A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xD85E02383A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _FakeLadderOffset = new(() => Schema.GetOffset(0xD85E023887708598), LazyThreadSafetyMode.None); + public ref bool FakeLadder { - get => ref _Handle.AsRef(Schema.GetOffset(0xD85E023887708598)); + get => ref _Handle.AsRef(_FakeLadderOffset.Value); } + private static readonly Lazy _HasSlackOffset = new(() => Schema.GetOffset(0xD85E02381745DB1D), LazyThreadSafetyMode.None); + public ref bool HasSlack { - get => ref _Handle.AsRef(Schema.GetOffset(0xD85E02381745DB1D)); + get => ref _Handle.AsRef(_HasSlackOffset.Value); } + private static readonly Lazy _SurfacePropNameOffset = new(() => Schema.GetOffset(0xD85E0238749EACC6), LazyThreadSafetyMode.None); + public string SurfacePropName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD85E0238749EACC6)); + var ptr = _Handle.Read(_SurfacePropNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD85E0238749EACC6, value); + set => Schema.SetString(_Handle, _SurfacePropNameOffset.Value, value); } + private static readonly Lazy _OnPlayerGotOnLadderOffset = new(() => Schema.GetOffset(0xD85E02381B2BA3FC), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPlayerGotOnLadder { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xD85E02381B2BA3FC)); + get => new CEntityIOOutputImpl(_Handle + _OnPlayerGotOnLadderOffset.Value); } + private static readonly Lazy _OnPlayerGotOffLadderOffset = new(() => Schema.GetOffset(0xD85E02388AD8997A), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPlayerGotOffLadder { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xD85E02388AD8997A)); + get => new CEntityIOOutputImpl(_Handle + _OnPlayerGotOffLadderOffset.Value); } public void LadderDirUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMonitorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMonitorImpl.cs index 2e93e8e45..6d62791ff 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMonitorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMonitorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,40 +17,58 @@ internal partial class CFuncMonitorImpl : CFuncBrushImpl, CFuncMonitor { public CFuncMonitorImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetCameraOffset = new(() => Schema.GetOffset(0x17F9564ADE5A6027), LazyThreadSafetyMode.None); + public string TargetCamera { get { - var ptr = _Handle.Read(Schema.GetOffset(0x17F9564ADE5A6027)); + var ptr = _Handle.Read(_TargetCameraOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x17F9564ADE5A6027, value); + set => Schema.SetString(_Handle, _TargetCameraOffset.Value, value); } + private static readonly Lazy _ResolutionEnumOffset = new(() => Schema.GetOffset(0x17F9564A7A397BAA), LazyThreadSafetyMode.None); + public ref int ResolutionEnum { - get => ref _Handle.AsRef(Schema.GetOffset(0x17F9564A7A397BAA)); + get => ref _Handle.AsRef(_ResolutionEnumOffset.Value); } + private static readonly Lazy _RenderShadowsOffset = new(() => Schema.GetOffset(0x17F9564AB664410E), LazyThreadSafetyMode.None); + public ref bool RenderShadows { - get => ref _Handle.AsRef(Schema.GetOffset(0x17F9564AB664410E)); + get => ref _Handle.AsRef(_RenderShadowsOffset.Value); } + private static readonly Lazy _UseUniqueColorTargetOffset = new(() => Schema.GetOffset(0x17F9564A53B28E5B), LazyThreadSafetyMode.None); + public ref bool UseUniqueColorTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0x17F9564A53B28E5B)); + get => ref _Handle.AsRef(_UseUniqueColorTargetOffset.Value); } + private static readonly Lazy _BrushModelNameOffset = new(() => Schema.GetOffset(0x17F9564A85323213), LazyThreadSafetyMode.None); + public string BrushModelName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x17F9564A85323213)); + var ptr = _Handle.Read(_BrushModelNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x17F9564A85323213, value); + set => Schema.SetString(_Handle, _BrushModelNameOffset.Value, value); } + private static readonly Lazy _TargetCamera1Offset = new(() => Schema.GetOffset(0x17F9564ACC7D5969), LazyThreadSafetyMode.None); + public ref CHandle TargetCamera1 { - get => ref _Handle.AsRef>(Schema.GetOffset(0x17F9564ACC7D5969)); + get => ref _Handle.AsRef>(_TargetCamera1Offset.Value); } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0x17F9564A6154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x17F9564A6154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } + private static readonly Lazy _Draw3DSkyboxOffset = new(() => Schema.GetOffset(0x17F9564AA37E21FE), LazyThreadSafetyMode.None); + public ref bool Draw3DSkybox { - get => ref _Handle.AsRef(Schema.GetOffset(0x17F9564AA37E21FE)); + get => ref _Handle.AsRef(_Draw3DSkyboxOffset.Value); } + private static readonly Lazy _StartEnabledOffset = new(() => Schema.GetOffset(0x17F9564A500D5C24), LazyThreadSafetyMode.None); + public ref bool StartEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x17F9564A500D5C24)); + get => ref _Handle.AsRef(_StartEnabledOffset.Value); } public void TargetCameraUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMoveLinearAlias_momentary_doorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMoveLinearAlias_momentary_doorImpl.cs index 2231eeb12..1987ccdae 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMoveLinearAlias_momentary_doorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMoveLinearAlias_momentary_doorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMoveLinearImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMoveLinearImpl.cs index 3458313d3..a87ecbb7e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMoveLinearImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMoveLinearImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,56 +17,82 @@ internal partial class CFuncMoveLinearImpl : CBaseToggleImpl, CFuncMoveLinear { public CFuncMoveLinearImpl(nint handle) : base(handle) { } + private static readonly Lazy _AuthoredPositionOffset = new(() => Schema.GetOffset(0xDC0EE8941BF65B84), LazyThreadSafetyMode.None); + public ref MoveLinearAuthoredPos_t AuthoredPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC0EE8941BF65B84)); + get => ref _Handle.AsRef(_AuthoredPositionOffset.Value); } + private static readonly Lazy _MoveEntitySpaceOffset = new(() => Schema.GetOffset(0xDC0EE894325319F9), LazyThreadSafetyMode.None); + public ref QAngle MoveEntitySpace { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC0EE894325319F9)); + get => ref _Handle.AsRef(_MoveEntitySpaceOffset.Value); } + private static readonly Lazy _MoveDirParentSpaceOffset = new(() => Schema.GetOffset(0xDC0EE894EC2120EF), LazyThreadSafetyMode.None); + public ref Vector MoveDirParentSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC0EE894EC2120EF)); + get => ref _Handle.AsRef(_MoveDirParentSpaceOffset.Value); } + private static readonly Lazy _SoundStartOffset = new(() => Schema.GetOffset(0xDC0EE894E2756078), LazyThreadSafetyMode.None); + public string SoundStart { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDC0EE894E2756078)); + var ptr = _Handle.Read(_SoundStartOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDC0EE894E2756078, value); + set => Schema.SetString(_Handle, _SoundStartOffset.Value, value); } + private static readonly Lazy _SoundStopOffset = new(() => Schema.GetOffset(0xDC0EE894E9EADD9C), LazyThreadSafetyMode.None); + public string SoundStop { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDC0EE894E9EADD9C)); + var ptr = _Handle.Read(_SoundStopOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDC0EE894E9EADD9C, value); + set => Schema.SetString(_Handle, _SoundStopOffset.Value, value); } + private static readonly Lazy _CurrentSoundOffset = new(() => Schema.GetOffset(0xDC0EE894C4F1FE51), LazyThreadSafetyMode.None); + public string CurrentSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDC0EE894C4F1FE51)); + var ptr = _Handle.Read(_CurrentSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDC0EE894C4F1FE51, value); + set => Schema.SetString(_Handle, _CurrentSoundOffset.Value, value); } + private static readonly Lazy _BlockDamageOffset = new(() => Schema.GetOffset(0xDC0EE894A5348091), LazyThreadSafetyMode.None); + public ref float BlockDamage { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC0EE894A5348091)); + get => ref _Handle.AsRef(_BlockDamageOffset.Value); } + private static readonly Lazy _StartPositionOffset = new(() => Schema.GetOffset(0xDC0EE894E34367EA), LazyThreadSafetyMode.None); + public ref float StartPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC0EE894E34367EA)); + get => ref _Handle.AsRef(_StartPositionOffset.Value); } + private static readonly Lazy _OnFullyOpenOffset = new(() => Schema.GetOffset(0xDC0EE89421733AE4), LazyThreadSafetyMode.None); + public CEntityIOOutput OnFullyOpen { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xDC0EE89421733AE4)); + get => new CEntityIOOutputImpl(_Handle + _OnFullyOpenOffset.Value); } + private static readonly Lazy _OnFullyClosedOffset = new(() => Schema.GetOffset(0xDC0EE89475470294), LazyThreadSafetyMode.None); + public CEntityIOOutput OnFullyClosed { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xDC0EE89475470294)); + get => new CEntityIOOutputImpl(_Handle + _OnFullyClosedOffset.Value); } + private static readonly Lazy _CreateMovableNavMeshOffset = new(() => Schema.GetOffset(0xDC0EE89485442AAF), LazyThreadSafetyMode.None); + public ref bool CreateMovableNavMesh { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC0EE89485442AAF)); + get => ref _Handle.AsRef(_CreateMovableNavMeshOffset.Value); } + private static readonly Lazy _AllowMovableNavMeshDockingOnEntireEntityOffset = new(() => Schema.GetOffset(0xDC0EE8940CC0563A), LazyThreadSafetyMode.None); + public ref bool AllowMovableNavMeshDockingOnEntireEntity { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC0EE8940CC0563A)); + get => ref _Handle.AsRef(_AllowMovableNavMeshDockingOnEntireEntityOffset.Value); } + private static readonly Lazy _CreateNavObstacleOffset = new(() => Schema.GetOffset(0xDC0EE8941849970B), LazyThreadSafetyMode.None); + public ref bool CreateNavObstacle { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC0EE8941849970B)); + get => ref _Handle.AsRef(_CreateNavObstacleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMoverAPIImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMoverAPIImpl.cs index c99c5c855..1eb7bcc81 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMoverAPIImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMoverAPIImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMoverImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMoverImpl.cs index 65f7f4bd5..483e06baa 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMoverImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncMoverImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,257 +17,393 @@ internal partial class CFuncMoverImpl : CBaseModelEntityImpl, CFuncMover { public CFuncMoverImpl(nint handle) : base(handle) { } + private static readonly Lazy _PathNameOffset = new(() => Schema.GetOffset(0x320E8B6981A419FD), LazyThreadSafetyMode.None); + public string PathName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x320E8B6981A419FD)); + var ptr = _Handle.Read(_PathNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x320E8B6981A419FD, value); + set => Schema.SetString(_Handle, _PathNameOffset.Value, value); } + private static readonly Lazy _PathMoverOffset = new(() => Schema.GetOffset(0x320E8B69AFA877CD), LazyThreadSafetyMode.None); + public ref CHandle PathMover { - get => ref _Handle.AsRef>(Schema.GetOffset(0x320E8B69AFA877CD)); + get => ref _Handle.AsRef>(_PathMoverOffset.Value); } + private static readonly Lazy _PrevPathMoverOffset = new(() => Schema.GetOffset(0x320E8B69FB9DE3C6), LazyThreadSafetyMode.None); + public ref CHandle PrevPathMover { - get => ref _Handle.AsRef>(Schema.GetOffset(0x320E8B69FB9DE3C6)); + get => ref _Handle.AsRef>(_PrevPathMoverOffset.Value); } + private static readonly Lazy _PathNodeStartOffset = new(() => Schema.GetOffset(0x320E8B691B0A1252), LazyThreadSafetyMode.None); + public string PathNodeStart { get { - var ptr = _Handle.Read(Schema.GetOffset(0x320E8B691B0A1252)); + var ptr = _Handle.Read(_PathNodeStartOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x320E8B691B0A1252, value); + set => Schema.SetString(_Handle, _PathNodeStartOffset.Value, value); } + private static readonly Lazy _PathNodeEndOffset = new(() => Schema.GetOffset(0x320E8B69F1D1AED7), LazyThreadSafetyMode.None); + public string PathNodeEnd { get { - var ptr = _Handle.Read(Schema.GetOffset(0x320E8B69F1D1AED7)); + var ptr = _Handle.Read(_PathNodeEndOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x320E8B69F1D1AED7, value); + set => Schema.SetString(_Handle, _PathNodeEndOffset.Value, value); } + private static readonly Lazy _MoveTypeOffset = new(() => Schema.GetOffset(0x320E8B69E635C185), LazyThreadSafetyMode.None); + public ref CFuncMover__Move_t MoveType { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B69E635C185)); + get => ref _Handle.AsRef(_MoveTypeOffset.Value); } + private static readonly Lazy _IsReversingOffset = new(() => Schema.GetOffset(0x320E8B69899E5BEE), LazyThreadSafetyMode.None); + public ref bool IsReversing { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B69899E5BEE)); + get => ref _Handle.AsRef(_IsReversingOffset.Value); } + private static readonly Lazy _TargetOffset = new(() => Schema.GetOffset(0x320E8B69C61225FC), LazyThreadSafetyMode.None); + public ref Vector Target { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B69C61225FC)); + get => ref _Handle.AsRef(_TargetOffset.Value); } + private static readonly Lazy _StartSpeedOffset = new(() => Schema.GetOffset(0x320E8B695EAB0EE0), LazyThreadSafetyMode.None); + public ref float StartSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B695EAB0EE0)); + get => ref _Handle.AsRef(_StartSpeedOffset.Value); } + private static readonly Lazy _PathLocationOffset = new(() => Schema.GetOffset(0x320E8B694232CFBF), LazyThreadSafetyMode.None); + public ref float PathLocation { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B694232CFBF)); + get => ref _Handle.AsRef(_PathLocationOffset.Value); } + private static readonly Lazy _TOffset = new(() => Schema.GetOffset(0x320E8B6993122981), LazyThreadSafetyMode.None); + public ref float T { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B6993122981)); + get => ref _Handle.AsRef(_TOffset.Value); } + private static readonly Lazy _CurrentNodeIndexOffset = new(() => Schema.GetOffset(0x320E8B6948C15E6E), LazyThreadSafetyMode.None); + public ref int CurrentNodeIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B6948C15E6E)); + get => ref _Handle.AsRef(_CurrentNodeIndexOffset.Value); } + private static readonly Lazy _PreviousNodeIndexOffset = new(() => Schema.GetOffset(0x320E8B690BA7740C), LazyThreadSafetyMode.None); + public ref int PreviousNodeIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B690BA7740C)); + get => ref _Handle.AsRef(_PreviousNodeIndexOffset.Value); } + private static readonly Lazy _SolidTypeOffset = new(() => Schema.GetOffset(0x320E8B695B4C380F), LazyThreadSafetyMode.None); + public ref SolidType_t SolidType { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B695B4C380F)); + get => ref _Handle.AsRef(_SolidTypeOffset.Value); } + private static readonly Lazy _IsMovingOffset = new(() => Schema.GetOffset(0x320E8B69874D1717), LazyThreadSafetyMode.None); + public ref bool IsMoving { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B69874D1717)); + get => ref _Handle.AsRef(_IsMovingOffset.Value); } + private static readonly Lazy _TimeToReachMaxSpeedOffset = new(() => Schema.GetOffset(0x320E8B699452902F), LazyThreadSafetyMode.None); + public ref float TimeToReachMaxSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B699452902F)); + get => ref _Handle.AsRef(_TimeToReachMaxSpeedOffset.Value); } + private static readonly Lazy _DistanceToReachMaxSpeedOffset = new(() => Schema.GetOffset(0x320E8B6907733475), LazyThreadSafetyMode.None); + public ref float DistanceToReachMaxSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B6907733475)); + get => ref _Handle.AsRef(_DistanceToReachMaxSpeedOffset.Value); } + private static readonly Lazy _TimeToReachZeroSpeedOffset = new(() => Schema.GetOffset(0x320E8B69816228FB), LazyThreadSafetyMode.None); + public ref float TimeToReachZeroSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B69816228FB)); + get => ref _Handle.AsRef(_TimeToReachZeroSpeedOffset.Value); } + private static readonly Lazy _DistanceToReachZeroSpeedOffset = new(() => Schema.GetOffset(0x320E8B69354237E9), LazyThreadSafetyMode.None); + public ref float DistanceToReachZeroSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B69354237E9)); + get => ref _Handle.AsRef(_DistanceToReachZeroSpeedOffset.Value); } + private static readonly Lazy _TimeMovementStartOffset = new(() => Schema.GetOffset(0x320E8B69CD2B8B85), LazyThreadSafetyMode.None); + public GameTime_t TimeMovementStart { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x320E8B69CD2B8B85)); + get => new GameTime_tImpl(_Handle + _TimeMovementStartOffset.Value); } + private static readonly Lazy _TimeMovementStopOffset = new(() => Schema.GetOffset(0x320E8B696E9B82D7), LazyThreadSafetyMode.None); + public GameTime_t TimeMovementStop { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x320E8B696E9B82D7)); + get => new GameTime_tImpl(_Handle + _TimeMovementStopOffset.Value); } + private static readonly Lazy _StopAtNodeOffset = new(() => Schema.GetOffset(0x320E8B6907744C56), LazyThreadSafetyMode.None); + public ref CHandle StopAtNode { - get => ref _Handle.AsRef>(Schema.GetOffset(0x320E8B6907744C56)); + get => ref _Handle.AsRef>(_StopAtNodeOffset.Value); } + private static readonly Lazy _PathLocationToBeginStopOffset = new(() => Schema.GetOffset(0x320E8B69976C5777), LazyThreadSafetyMode.None); + public ref float PathLocationToBeginStop { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B69976C5777)); + get => ref _Handle.AsRef(_PathLocationToBeginStopOffset.Value); } + private static readonly Lazy _StartForwardSoundOffset = new(() => Schema.GetOffset(0x320E8B69CBDFD56B), LazyThreadSafetyMode.None); + public string StartForwardSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0x320E8B69CBDFD56B)); + var ptr = _Handle.Read(_StartForwardSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x320E8B69CBDFD56B, value); + set => Schema.SetString(_Handle, _StartForwardSoundOffset.Value, value); } + private static readonly Lazy _LoopForwardSoundOffset = new(() => Schema.GetOffset(0x320E8B69C875F2F7), LazyThreadSafetyMode.None); + public string LoopForwardSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0x320E8B69C875F2F7)); + var ptr = _Handle.Read(_LoopForwardSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x320E8B69C875F2F7, value); + set => Schema.SetString(_Handle, _LoopForwardSoundOffset.Value, value); } + private static readonly Lazy _StopForwardSoundOffset = new(() => Schema.GetOffset(0x320E8B69B72A6EC9), LazyThreadSafetyMode.None); + public string StopForwardSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0x320E8B69B72A6EC9)); + var ptr = _Handle.Read(_StopForwardSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x320E8B69B72A6EC9, value); + set => Schema.SetString(_Handle, _StopForwardSoundOffset.Value, value); } + private static readonly Lazy _StartReverseSoundOffset = new(() => Schema.GetOffset(0x320E8B6927D9C282), LazyThreadSafetyMode.None); + public string StartReverseSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0x320E8B6927D9C282)); + var ptr = _Handle.Read(_StartReverseSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x320E8B6927D9C282, value); + set => Schema.SetString(_Handle, _StartReverseSoundOffset.Value, value); } + private static readonly Lazy _LoopReverseSoundOffset = new(() => Schema.GetOffset(0x320E8B69FC2C15CE), LazyThreadSafetyMode.None); + public string LoopReverseSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0x320E8B69FC2C15CE)); + var ptr = _Handle.Read(_LoopReverseSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x320E8B69FC2C15CE, value); + set => Schema.SetString(_Handle, _LoopReverseSoundOffset.Value, value); } + private static readonly Lazy _StopReverseSoundOffset = new(() => Schema.GetOffset(0x320E8B69B0EFF4BC), LazyThreadSafetyMode.None); + public string StopReverseSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0x320E8B69B0EFF4BC)); + var ptr = _Handle.Read(_StopReverseSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x320E8B69B0EFF4BC, value); + set => Schema.SetString(_Handle, _StopReverseSoundOffset.Value, value); } + private static readonly Lazy _ArriveAtDestinationSoundOffset = new(() => Schema.GetOffset(0x320E8B696350F6A0), LazyThreadSafetyMode.None); + public string ArriveAtDestinationSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0x320E8B696350F6A0)); + var ptr = _Handle.Read(_ArriveAtDestinationSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x320E8B696350F6A0, value); + set => Schema.SetString(_Handle, _ArriveAtDestinationSoundOffset.Value, value); } + private static readonly Lazy _OnMovementEndOffset = new(() => Schema.GetOffset(0x320E8B699BD1966A), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMovementEnd { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x320E8B699BD1966A)); + get => new CEntityIOOutputImpl(_Handle + _OnMovementEndOffset.Value); } + private static readonly Lazy _StartAtClosestPointOffset = new(() => Schema.GetOffset(0x320E8B69FBBC7ACD), LazyThreadSafetyMode.None); + public ref bool StartAtClosestPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B69FBBC7ACD)); + get => ref _Handle.AsRef(_StartAtClosestPointOffset.Value); } + private static readonly Lazy _StartAtEndOffset = new(() => Schema.GetOffset(0x320E8B694B214AF7), LazyThreadSafetyMode.None); + public ref bool StartAtEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B694B214AF7)); + get => ref _Handle.AsRef(_StartAtEndOffset.Value); } + private static readonly Lazy _OrientationUpdateOffset = new(() => Schema.GetOffset(0x320E8B69D0D215E3), LazyThreadSafetyMode.None); + public ref CFuncMover__OrientationUpdate_t OrientationUpdate { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B69D0D215E3)); + get => ref _Handle.AsRef(_OrientationUpdateOffset.Value); } + private static readonly Lazy _TimeStartOrientationChangeOffset = new(() => Schema.GetOffset(0x320E8B698090B2A8), LazyThreadSafetyMode.None); + public GameTime_t TimeStartOrientationChange { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x320E8B698090B2A8)); + get => new GameTime_tImpl(_Handle + _TimeStartOrientationChangeOffset.Value); } + private static readonly Lazy _TimeToBlendToNewOrientationOffset = new(() => Schema.GetOffset(0x320E8B69F64E85BB), LazyThreadSafetyMode.None); + public ref float TimeToBlendToNewOrientation { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B69F64E85BB)); + get => ref _Handle.AsRef(_TimeToBlendToNewOrientationOffset.Value); } + private static readonly Lazy _DurationBlendToNewOrientationRanOffset = new(() => Schema.GetOffset(0x320E8B693B19BF08), LazyThreadSafetyMode.None); + public ref float DurationBlendToNewOrientationRan { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B693B19BF08)); + get => ref _Handle.AsRef(_DurationBlendToNewOrientationRanOffset.Value); } + private static readonly Lazy _OriginalOrientationIndexOffset = new(() => Schema.GetOffset(0x320E8B69A132531C), LazyThreadSafetyMode.None); + public ref int OriginalOrientationIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B69A132531C)); + get => ref _Handle.AsRef(_OriginalOrientationIndexOffset.Value); } + private static readonly Lazy _CreateMovableNavMeshOffset = new(() => Schema.GetOffset(0x320E8B6985442AAF), LazyThreadSafetyMode.None); + public ref bool CreateMovableNavMesh { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B6985442AAF)); + get => ref _Handle.AsRef(_CreateMovableNavMeshOffset.Value); } + private static readonly Lazy _AllowMovableNavMeshDockingOnEntireEntityOffset = new(() => Schema.GetOffset(0x320E8B690CC0563A), LazyThreadSafetyMode.None); + public ref bool AllowMovableNavMeshDockingOnEntireEntity { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B690CC0563A)); + get => ref _Handle.AsRef(_AllowMovableNavMeshDockingOnEntireEntityOffset.Value); } + private static readonly Lazy _OnNodePassedOffset = new(() => Schema.GetOffset(0x320E8B69709328FC), LazyThreadSafetyMode.None); + public CEntityIOOutput OnNodePassed { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x320E8B69709328FC)); + get => new CEntityIOOutputImpl(_Handle + _OnNodePassedOffset.Value); } + private static readonly Lazy _OrientationMatchEntityNameOffset = new(() => Schema.GetOffset(0x320E8B69384CF18A), LazyThreadSafetyMode.None); + public string OrientationMatchEntityName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x320E8B69384CF18A)); + var ptr = _Handle.Read(_OrientationMatchEntityNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x320E8B69384CF18A, value); + set => Schema.SetString(_Handle, _OrientationMatchEntityNameOffset.Value, value); } + private static readonly Lazy _OrientationMatchEntityOffset = new(() => Schema.GetOffset(0x320E8B6924A0D317), LazyThreadSafetyMode.None); + public ref CHandle OrientationMatchEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x320E8B6924A0D317)); + get => ref _Handle.AsRef>(_OrientationMatchEntityOffset.Value); } + private static readonly Lazy _TimeToTraverseToNextNodeOffset = new(() => Schema.GetOffset(0x320E8B6942129DF9), LazyThreadSafetyMode.None); + public ref float TimeToTraverseToNextNode { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B6942129DF9)); + get => ref _Handle.AsRef(_TimeToTraverseToNextNodeOffset.Value); } + private static readonly Lazy _LerpToNewPosStartInPathEntitySpaceOffset = new(() => Schema.GetOffset(0x320E8B6958D80CD2), LazyThreadSafetyMode.None); + public ref Vector LerpToNewPosStartInPathEntitySpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B6958D80CD2)); + get => ref _Handle.AsRef(_LerpToNewPosStartInPathEntitySpaceOffset.Value); } + private static readonly Lazy _LerpToNewPosEndInPathEntitySpaceOffset = new(() => Schema.GetOffset(0x320E8B698269BEB5), LazyThreadSafetyMode.None); + public ref Vector LerpToNewPosEndInPathEntitySpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B698269BEB5)); + get => ref _Handle.AsRef(_LerpToNewPosEndInPathEntitySpaceOffset.Value); } + private static readonly Lazy _LerpToPositionTOffset = new(() => Schema.GetOffset(0x320E8B69C191D824), LazyThreadSafetyMode.None); + public ref float LerpToPositionT { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B69C191D824)); + get => ref _Handle.AsRef(_LerpToPositionTOffset.Value); } + private static readonly Lazy _LerpToPositionDeltaTOffset = new(() => Schema.GetOffset(0x320E8B69A0AFA3BE), LazyThreadSafetyMode.None); + public ref float LerpToPositionDeltaT { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B69A0AFA3BE)); + get => ref _Handle.AsRef(_LerpToPositionDeltaTOffset.Value); } + private static readonly Lazy _OnLerpToPositionCompleteOffset = new(() => Schema.GetOffset(0x320E8B693D72E078), LazyThreadSafetyMode.None); + public CEntityIOOutput OnLerpToPositionComplete { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x320E8B693D72E078)); + get => new CEntityIOOutputImpl(_Handle + _OnLerpToPositionCompleteOffset.Value); } + private static readonly Lazy _IsPausedOffset = new(() => Schema.GetOffset(0x320E8B690BA146BB), LazyThreadSafetyMode.None); + public ref bool IsPaused { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B690BA146BB)); + get => ref _Handle.AsRef(_IsPausedOffset.Value); } + private static readonly Lazy _TransitionedToPathNodeActionOffset = new(() => Schema.GetOffset(0x320E8B696FEE6BBE), LazyThreadSafetyMode.None); + public ref CFuncMover__TransitionToPathNodeAction_t TransitionedToPathNodeAction { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B696FEE6BBE)); + get => ref _Handle.AsRef(_TransitionedToPathNodeActionOffset.Value); } + private static readonly Lazy _DelayedTeleportToNodeOffset = new(() => Schema.GetOffset(0x320E8B69A71F8CA3), LazyThreadSafetyMode.None); + public ref int DelayedTeleportToNode { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B69A71F8CA3)); + get => ref _Handle.AsRef(_DelayedTeleportToNodeOffset.Value); } + private static readonly Lazy _IsVerboseLoggingOffset = new(() => Schema.GetOffset(0x320E8B6963292696), LazyThreadSafetyMode.None); + public ref bool IsVerboseLogging { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B6963292696)); + get => ref _Handle.AsRef(_IsVerboseLoggingOffset.Value); } + private static readonly Lazy _FollowEntityOffset = new(() => Schema.GetOffset(0x320E8B6969846129), LazyThreadSafetyMode.None); + public ref CHandle FollowEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x320E8B6969846129)); + get => ref _Handle.AsRef>(_FollowEntityOffset.Value); } + private static readonly Lazy _FollowDistanceOffset = new(() => Schema.GetOffset(0x320E8B69CF6A55D9), LazyThreadSafetyMode.None); + public ref float FollowDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B69CF6A55D9)); + get => ref _Handle.AsRef(_FollowDistanceOffset.Value); } + private static readonly Lazy _FollowMinimumSpeedOffset = new(() => Schema.GetOffset(0x320E8B69929585C9), LazyThreadSafetyMode.None); + public ref float FollowMinimumSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B69929585C9)); + get => ref _Handle.AsRef(_FollowMinimumSpeedOffset.Value); } + private static readonly Lazy _CurFollowEntityTOffset = new(() => Schema.GetOffset(0x320E8B6977610EE3), LazyThreadSafetyMode.None); + public ref float CurFollowEntityT { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B6977610EE3)); + get => ref _Handle.AsRef(_CurFollowEntityTOffset.Value); } + private static readonly Lazy _CurFollowSpeedOffset = new(() => Schema.GetOffset(0x320E8B6958BEEE69), LazyThreadSafetyMode.None); + public ref float CurFollowSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B6958BEEE69)); + get => ref _Handle.AsRef(_CurFollowSpeedOffset.Value); } + private static readonly Lazy _StrOrientationFaceEntityNameOffset = new(() => Schema.GetOffset(0x320E8B694B008CC7), LazyThreadSafetyMode.None); + public string StrOrientationFaceEntityName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x320E8B694B008CC7)); + var ptr = _Handle.Read(_StrOrientationFaceEntityNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x320E8B694B008CC7, value); + set => Schema.SetString(_Handle, _StrOrientationFaceEntityNameOffset.Value, value); } + private static readonly Lazy _OrientationFaceEntityOffset = new(() => Schema.GetOffset(0x320E8B696BA187E1), LazyThreadSafetyMode.None); + public ref CHandle OrientationFaceEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x320E8B696BA187E1)); + get => ref _Handle.AsRef>(_OrientationFaceEntityOffset.Value); } + private static readonly Lazy _OnStartOffset = new(() => Schema.GetOffset(0x320E8B69C3FE848C), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStart { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x320E8B69C3FE848C)); + get => new CEntityIOOutputImpl(_Handle + _OnStartOffset.Value); } + private static readonly Lazy _OnStartForwardOffset = new(() => Schema.GetOffset(0x320E8B69FC63B371), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStartForward { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x320E8B69FC63B371)); + get => new CEntityIOOutputImpl(_Handle + _OnStartForwardOffset.Value); } + private static readonly Lazy _OnStartReverseOffset = new(() => Schema.GetOffset(0x320E8B693AC2BDEA), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStartReverse { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x320E8B693AC2BDEA)); + get => new CEntityIOOutputImpl(_Handle + _OnStartReverseOffset.Value); } + private static readonly Lazy _OnStopOffset = new(() => Schema.GetOffset(0x320E8B6915A596E8), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStop { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x320E8B6915A596E8)); + get => new CEntityIOOutputImpl(_Handle + _OnStopOffset.Value); } + private static readonly Lazy _OnStoppedOffset = new(() => Schema.GetOffset(0x320E8B69161C44C9), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStopped { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x320E8B69161C44C9)); + get => new CEntityIOOutputImpl(_Handle + _OnStoppedOffset.Value); } + private static readonly Lazy _NextNodeReturnsCurrentOffset = new(() => Schema.GetOffset(0x320E8B69097A17E4), LazyThreadSafetyMode.None); + public ref bool NextNodeReturnsCurrent { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B69097A17E4)); + get => ref _Handle.AsRef(_NextNodeReturnsCurrentOffset.Value); } + private static readonly Lazy _StartedMovingOffset = new(() => Schema.GetOffset(0x320E8B6939B1504C), LazyThreadSafetyMode.None); + public ref bool StartedMoving { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B6939B1504C)); + get => ref _Handle.AsRef(_StartedMovingOffset.Value); } + private static readonly Lazy _FollowEntityDirectionOffset = new(() => Schema.GetOffset(0x320E8B69E14C9BB7), LazyThreadSafetyMode.None); + public ref CFuncMover__FollowEntityDirection_t FollowEntityDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0x320E8B69E14C9BB7)); + get => ref _Handle.AsRef(_FollowEntityDirectionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncNavBlockerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncNavBlockerImpl.cs index fa8b24f50..7b7765181 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncNavBlockerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncNavBlockerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CFuncNavBlockerImpl : CBaseModelEntityImpl, CFuncNavBlock public CFuncNavBlockerImpl(nint handle) : base(handle) { } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x3F066D113A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F066D113A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _BlockedTeamNumberOffset = new(() => Schema.GetOffset(0x3F066D11B33D3543), LazyThreadSafetyMode.None); + public ref int BlockedTeamNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F066D11B33D3543)); + get => ref _Handle.AsRef(_BlockedTeamNumberOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncNavObstructionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncNavObstructionImpl.cs index 50bd36c62..51d7eddda 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncNavObstructionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncNavObstructionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CFuncNavObstructionImpl : CBaseModelEntityImpl, CFuncNavO public CFuncNavObstructionImpl(nint handle) : base(handle) { } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0xCF9A1E413A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xCF9A1E413A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _UseAsyncObstacleUpdateOffset = new(() => Schema.GetOffset(0xCF9A1E41094FA698), LazyThreadSafetyMode.None); + public ref bool UseAsyncObstacleUpdate { - get => ref _Handle.AsRef(Schema.GetOffset(0xCF9A1E41094FA698)); + get => ref _Handle.AsRef(_UseAsyncObstacleUpdateOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncPlatImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncPlatImpl.cs index 302fc056b..fedfa0ef7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncPlatImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncPlatImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CFuncPlatImpl : CBasePlatTrainImpl, CFuncPlat { public CFuncPlatImpl(nint handle) : base(handle) { } + private static readonly Lazy _NoiseOffset = new(() => Schema.GetOffset(0x57400D651F22B8CC), LazyThreadSafetyMode.None); + public string Noise { get { - var ptr = _Handle.Read(Schema.GetOffset(0x57400D651F22B8CC)); + var ptr = _Handle.Read(_NoiseOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x57400D651F22B8CC, value); + set => Schema.SetString(_Handle, _NoiseOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncPlatRotImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncPlatRotImpl.cs index 24eef1ed2..487cdd319 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncPlatRotImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncPlatRotImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CFuncPlatRotImpl : CFuncPlatImpl, CFuncPlatRot { public CFuncPlatRotImpl(nint handle) : base(handle) { } + private static readonly Lazy _EndOffset = new(() => Schema.GetOffset(0xF566498E5B29CFCA), LazyThreadSafetyMode.None); + public ref QAngle End { - get => ref _Handle.AsRef(Schema.GetOffset(0xF566498E5B29CFCA)); + get => ref _Handle.AsRef(_EndOffset.Value); } + private static readonly Lazy _StartOffset = new(() => Schema.GetOffset(0xF566498EA539BEFF), LazyThreadSafetyMode.None); + public ref QAngle Start { - get => ref _Handle.AsRef(Schema.GetOffset(0xF566498EA539BEFF)); + get => ref _Handle.AsRef(_StartOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncPropRespawnZoneImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncPropRespawnZoneImpl.cs index 0ac8235f1..919db31a8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncPropRespawnZoneImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncPropRespawnZoneImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncRetakeBarrierImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncRetakeBarrierImpl.cs index 2566e693b..ce175e9c4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncRetakeBarrierImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncRetakeBarrierImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncRotatingImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncRotatingImpl.cs index 76ac771b1..33fac9191 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncRotatingImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncRotatingImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,63 +17,99 @@ internal partial class CFuncRotatingImpl : CBaseModelEntityImpl, CFuncRotating { public CFuncRotatingImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnStoppedOffset = new(() => Schema.GetOffset(0x1A29EA94161C44C9), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStopped { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1A29EA94161C44C9)); + get => new CEntityIOOutputImpl(_Handle + _OnStoppedOffset.Value); } + private static readonly Lazy _OnStartedOffset = new(() => Schema.GetOffset(0x1A29EA94328D617D), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStarted { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1A29EA94328D617D)); + get => new CEntityIOOutputImpl(_Handle + _OnStartedOffset.Value); } + private static readonly Lazy _OnReachedStartOffset = new(() => Schema.GetOffset(0x1A29EA945C72A242), LazyThreadSafetyMode.None); + public CEntityIOOutput OnReachedStart { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1A29EA945C72A242)); + get => new CEntityIOOutputImpl(_Handle + _OnReachedStartOffset.Value); } + private static readonly Lazy _LocalRotationVectorOffset = new(() => Schema.GetOffset(0x1A29EA946ACE06C5), LazyThreadSafetyMode.None); + public SchemaUntypedField LocalRotationVector { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x1A29EA946ACE06C5)); + get => new SchemaUntypedField(_Handle + _LocalRotationVectorOffset.Value); } + private static readonly Lazy _FanFrictionOffset = new(() => Schema.GetOffset(0x1A29EA9446523D02), LazyThreadSafetyMode.None); + public ref float FanFriction { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A29EA9446523D02)); + get => ref _Handle.AsRef(_FanFrictionOffset.Value); } + private static readonly Lazy _AttenuationOffset = new(() => Schema.GetOffset(0x1A29EA94D112ECE1), LazyThreadSafetyMode.None); + public ref float Attenuation { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A29EA94D112ECE1)); + get => ref _Handle.AsRef(_AttenuationOffset.Value); } + private static readonly Lazy _VolumeOffset = new(() => Schema.GetOffset(0x1A29EA947647E0C9), LazyThreadSafetyMode.None); + public ref float Volume { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A29EA947647E0C9)); + get => ref _Handle.AsRef(_VolumeOffset.Value); } + private static readonly Lazy _TargetSpeedOffset = new(() => Schema.GetOffset(0x1A29EA949C627845), LazyThreadSafetyMode.None); + public ref float TargetSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A29EA949C627845)); + get => ref _Handle.AsRef(_TargetSpeedOffset.Value); } + private static readonly Lazy _MaxSpeedOffset = new(() => Schema.GetOffset(0x1A29EA94EC4C9592), LazyThreadSafetyMode.None); + public ref float MaxSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A29EA94EC4C9592)); + get => ref _Handle.AsRef(_MaxSpeedOffset.Value); } + private static readonly Lazy _BlockDamageOffset = new(() => Schema.GetOffset(0x1A29EA94A5348091), LazyThreadSafetyMode.None); + public ref float BlockDamage { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A29EA94A5348091)); + get => ref _Handle.AsRef(_BlockDamageOffset.Value); } + private static readonly Lazy _NoiseRunningOffset = new(() => Schema.GetOffset(0x1A29EA943C33F758), LazyThreadSafetyMode.None); + public string NoiseRunning { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1A29EA943C33F758)); + var ptr = _Handle.Read(_NoiseRunningOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1A29EA943C33F758, value); + set => Schema.SetString(_Handle, _NoiseRunningOffset.Value, value); } + private static readonly Lazy _ReversedOffset = new(() => Schema.GetOffset(0x1A29EA945A005113), LazyThreadSafetyMode.None); + public ref bool Reversed { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A29EA945A005113)); + get => ref _Handle.AsRef(_ReversedOffset.Value); } + private static readonly Lazy _AccelDecelOffset = new(() => Schema.GetOffset(0x1A29EA941765B278), LazyThreadSafetyMode.None); + public ref bool AccelDecel { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A29EA941765B278)); + get => ref _Handle.AsRef(_AccelDecelOffset.Value); } + private static readonly Lazy _PrevLocalAnglesOffset = new(() => Schema.GetOffset(0x1A29EA9494C1668B), LazyThreadSafetyMode.None); + public ref QAngle PrevLocalAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A29EA9494C1668B)); + get => ref _Handle.AsRef(_PrevLocalAnglesOffset.Value); } + private static readonly Lazy _StartOffset = new(() => Schema.GetOffset(0x1A29EA947AE5D8A1), LazyThreadSafetyMode.None); + public ref QAngle Start { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A29EA947AE5D8A1)); + get => ref _Handle.AsRef(_StartOffset.Value); } + private static readonly Lazy _StopAtStartPosOffset = new(() => Schema.GetOffset(0x1A29EA944E6241BE), LazyThreadSafetyMode.None); + public ref bool StopAtStartPos { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A29EA944E6241BE)); + get => ref _Handle.AsRef(_StopAtStartPosOffset.Value); } + private static readonly Lazy _ClientOriginOffset = new(() => Schema.GetOffset(0x1A29EA9470D96068), LazyThreadSafetyMode.None); + public ref Vector ClientOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A29EA9470D96068)); + get => ref _Handle.AsRef(_ClientOriginOffset.Value); } + private static readonly Lazy _ClientAnglesOffset = new(() => Schema.GetOffset(0x1A29EA94F6CF85C2), LazyThreadSafetyMode.None); + public ref QAngle ClientAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A29EA94F6CF85C2)); + get => ref _Handle.AsRef(_ClientAnglesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncRotatorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncRotatorImpl.cs index 9f540be96..42f80bc4f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncRotatorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncRotatorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,114 +17,184 @@ internal partial class CFuncRotatorImpl : CBaseModelEntityImpl, CFuncRotator { public CFuncRotatorImpl(nint handle) : base(handle) { } + private static readonly Lazy _RotatorTargetOffset = new(() => Schema.GetOffset(0x73DA1BB9F324C519), LazyThreadSafetyMode.None); + public ref CHandle RotatorTarget { - get => ref _Handle.AsRef>(Schema.GetOffset(0x73DA1BB9F324C519)); + get => ref _Handle.AsRef>(_RotatorTargetOffset.Value); } + private static readonly Lazy _IsRotatingOffset = new(() => Schema.GetOffset(0x73DA1BB94C9E159D), LazyThreadSafetyMode.None); + public ref bool IsRotating { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB94C9E159D)); + get => ref _Handle.AsRef(_IsRotatingOffset.Value); } + private static readonly Lazy _IsReversingOffset = new(() => Schema.GetOffset(0x73DA1BB9899E5BEE), LazyThreadSafetyMode.None); + public ref bool IsReversing { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB9899E5BEE)); + get => ref _Handle.AsRef(_IsReversingOffset.Value); } + private static readonly Lazy _TimeToReachMaxSpeedOffset = new(() => Schema.GetOffset(0x73DA1BB99452902F), LazyThreadSafetyMode.None); + public ref float TimeToReachMaxSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB99452902F)); + get => ref _Handle.AsRef(_TimeToReachMaxSpeedOffset.Value); } + private static readonly Lazy _TimeToReachZeroSpeedOffset = new(() => Schema.GetOffset(0x73DA1BB9816228FB), LazyThreadSafetyMode.None); + public ref float TimeToReachZeroSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB9816228FB)); + get => ref _Handle.AsRef(_TimeToReachZeroSpeedOffset.Value); } + private static readonly Lazy _DistanceAlongArcTraveledOffset = new(() => Schema.GetOffset(0x73DA1BB9AF2FCEDE), LazyThreadSafetyMode.None); + public ref float DistanceAlongArcTraveled { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB9AF2FCEDE)); + get => ref _Handle.AsRef(_DistanceAlongArcTraveledOffset.Value); } + private static readonly Lazy _TimeToWaitOscillateOffset = new(() => Schema.GetOffset(0x73DA1BB96E3B4BF4), LazyThreadSafetyMode.None); + public ref float TimeToWaitOscillate { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB96E3B4BF4)); + get => ref _Handle.AsRef(_TimeToWaitOscillateOffset.Value); } + private static readonly Lazy _TimeRotationStartOffset = new(() => Schema.GetOffset(0x73DA1BB952C0B2E8), LazyThreadSafetyMode.None); + public GameTime_t TimeRotationStart { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x73DA1BB952C0B2E8)); + get => new GameTime_tImpl(_Handle + _TimeRotationStartOffset.Value); } + private static readonly Lazy _LSPrevChangeOffset = new(() => Schema.GetOffset(0x73DA1BB9BC15BD54), LazyThreadSafetyMode.None); + public ref Quaternion LSPrevChange { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB9BC15BD54)); + get => ref _Handle.AsRef(_LSPrevChangeOffset.Value); } + private static readonly Lazy _WSPrevOffset = new(() => Schema.GetOffset(0x73DA1BB9C3EEEFFB), LazyThreadSafetyMode.None); + public ref Quaternion WSPrev { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB9C3EEEFFB)); + get => ref _Handle.AsRef(_WSPrevOffset.Value); } + private static readonly Lazy _WSInitOffset = new(() => Schema.GetOffset(0x73DA1BB99E7E023C), LazyThreadSafetyMode.None); + public ref Quaternion WSInit { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB99E7E023C)); + get => ref _Handle.AsRef(_WSInitOffset.Value); } + private static readonly Lazy _LSInitOffset = new(() => Schema.GetOffset(0x73DA1BB966C62507), LazyThreadSafetyMode.None); + public ref Quaternion LSInit { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB966C62507)); + get => ref _Handle.AsRef(_LSInitOffset.Value); } + private static readonly Lazy _LSOrientationOffset = new(() => Schema.GetOffset(0x73DA1BB9BD794B25), LazyThreadSafetyMode.None); + public ref Quaternion LSOrientation { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB9BD794B25)); + get => ref _Handle.AsRef(_LSOrientationOffset.Value); } + private static readonly Lazy _OnRotationStartedOffset = new(() => Schema.GetOffset(0x73DA1BB9A2961697), LazyThreadSafetyMode.None); + public CEntityIOOutput OnRotationStarted { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x73DA1BB9A2961697)); + get => new CEntityIOOutputImpl(_Handle + _OnRotationStartedOffset.Value); } + private static readonly Lazy _OnRotationCompletedOffset = new(() => Schema.GetOffset(0x73DA1BB90478C90B), LazyThreadSafetyMode.None); + public CEntityIOOutput OnRotationCompleted { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x73DA1BB90478C90B)); + get => new CEntityIOOutputImpl(_Handle + _OnRotationCompletedOffset.Value); } + private static readonly Lazy _OnOscillateOffset = new(() => Schema.GetOffset(0x73DA1BB931B79B92), LazyThreadSafetyMode.None); + public CEntityIOOutput OnOscillate { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x73DA1BB931B79B92)); + get => new CEntityIOOutputImpl(_Handle + _OnOscillateOffset.Value); } + private static readonly Lazy _OnOscillateStartArriveOffset = new(() => Schema.GetOffset(0x73DA1BB996E9B88D), LazyThreadSafetyMode.None); + public CEntityIOOutput OnOscillateStartArrive { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x73DA1BB996E9B88D)); + get => new CEntityIOOutputImpl(_Handle + _OnOscillateStartArriveOffset.Value); } + private static readonly Lazy _OnOscillateStartDepartOffset = new(() => Schema.GetOffset(0x73DA1BB908C9CF2C), LazyThreadSafetyMode.None); + public CEntityIOOutput OnOscillateStartDepart { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x73DA1BB908C9CF2C)); + get => new CEntityIOOutputImpl(_Handle + _OnOscillateStartDepartOffset.Value); } + private static readonly Lazy _OnOscillateEndArriveOffset = new(() => Schema.GetOffset(0x73DA1BB98F4F6014), LazyThreadSafetyMode.None); + public CEntityIOOutput OnOscillateEndArrive { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x73DA1BB98F4F6014)); + get => new CEntityIOOutputImpl(_Handle + _OnOscillateEndArriveOffset.Value); } + private static readonly Lazy _OnOscillateEndDepartOffset = new(() => Schema.GetOffset(0x73DA1BB943D41D49), LazyThreadSafetyMode.None); + public CEntityIOOutput OnOscillateEndDepart { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x73DA1BB943D41D49)); + get => new CEntityIOOutputImpl(_Handle + _OnOscillateEndDepartOffset.Value); } + private static readonly Lazy _OscillateDepartOffset = new(() => Schema.GetOffset(0x73DA1BB9CAB88EEB), LazyThreadSafetyMode.None); + public ref bool OscillateDepart { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB9CAB88EEB)); + get => ref _Handle.AsRef(_OscillateDepartOffset.Value); } + private static readonly Lazy _OscillateCountOffset = new(() => Schema.GetOffset(0x73DA1BB9C2609150), LazyThreadSafetyMode.None); + public ref int OscillateCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB9C2609150)); + get => ref _Handle.AsRef(_OscillateCountOffset.Value); } + private static readonly Lazy _RotateTypeOffset = new(() => Schema.GetOffset(0x73DA1BB94BD69967), LazyThreadSafetyMode.None); + public ref CFuncRotator__Rotate_t RotateType { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB94BD69967)); + get => ref _Handle.AsRef(_RotateTypeOffset.Value); } + private static readonly Lazy _PrevRotateTypeOffset = new(() => Schema.GetOffset(0x73DA1BB9DB4BE282), LazyThreadSafetyMode.None); + public ref CFuncRotator__Rotate_t PrevRotateType { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB9DB4BE282)); + get => ref _Handle.AsRef(_PrevRotateTypeOffset.Value); } + private static readonly Lazy _HasTargetOverrideOffset = new(() => Schema.GetOffset(0x73DA1BB9E91C45E6), LazyThreadSafetyMode.None); + public ref bool HasTargetOverride { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB9E91C45E6)); + get => ref _Handle.AsRef(_HasTargetOverrideOffset.Value); } + private static readonly Lazy _OrientationOverrideOffset = new(() => Schema.GetOffset(0x73DA1BB9EE27F696), LazyThreadSafetyMode.None); + public ref Quaternion OrientationOverride { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB9EE27F696)); + get => ref _Handle.AsRef(_OrientationOverrideOffset.Value); } + private static readonly Lazy _SpaceOverrideOffset = new(() => Schema.GetOffset(0x73DA1BB9BAF52F16), LazyThreadSafetyMode.None); + public ref RotatorTargetSpace_t SpaceOverride { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB9BAF52F16)); + get => ref _Handle.AsRef(_SpaceOverrideOffset.Value); } + private static readonly Lazy _AngularVelocityOffset = new(() => Schema.GetOffset(0x73DA1BB9CB9A90B9), LazyThreadSafetyMode.None); + public ref QAngle AngularVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB9CB9A90B9)); + get => ref _Handle.AsRef(_AngularVelocityOffset.Value); } + private static readonly Lazy _LookAtForcedUpOffset = new(() => Schema.GetOffset(0x73DA1BB948B272FF), LazyThreadSafetyMode.None); + public ref Vector LookAtForcedUp { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB948B272FF)); + get => ref _Handle.AsRef(_LookAtForcedUpOffset.Value); } + private static readonly Lazy _StrRotatorTargetOffset = new(() => Schema.GetOffset(0x73DA1BB95D9EF510), LazyThreadSafetyMode.None); + public string StrRotatorTarget { get { - var ptr = _Handle.Read(Schema.GetOffset(0x73DA1BB95D9EF510)); + var ptr = _Handle.Read(_StrRotatorTargetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x73DA1BB95D9EF510, value); + set => Schema.SetString(_Handle, _StrRotatorTargetOffset.Value, value); } + private static readonly Lazy _RecordHistoryOffset = new(() => Schema.GetOffset(0x73DA1BB9A1A2B6DC), LazyThreadSafetyMode.None); + public ref bool RecordHistory { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB9A1A2B6DC)); + get => ref _Handle.AsRef(_RecordHistoryOffset.Value); } + private static readonly Lazy _RotatorHistoryOffset = new(() => Schema.GetOffset(0x73DA1BB91907536A), LazyThreadSafetyMode.None); + public ref CUtlVector RotatorHistory { - get => ref _Handle.AsRef>(Schema.GetOffset(0x73DA1BB91907536A)); + get => ref _Handle.AsRef>(_RotatorHistoryOffset.Value); } + private static readonly Lazy _ReturningToPreviousOrientationOffset = new(() => Schema.GetOffset(0x73DA1BB9540035F9), LazyThreadSafetyMode.None); + public ref bool ReturningToPreviousOrientation { - get => ref _Handle.AsRef(Schema.GetOffset(0x73DA1BB9540035F9)); + get => ref _Handle.AsRef(_ReturningToPreviousOrientationOffset.Value); } + private static readonly Lazy _RotatorQueueOffset = new(() => Schema.GetOffset(0x73DA1BB941C250ED), LazyThreadSafetyMode.None); + public ref CUtlVector RotatorQueue { - get => ref _Handle.AsRef>(Schema.GetOffset(0x73DA1BB941C250ED)); + get => ref _Handle.AsRef>(_RotatorQueueOffset.Value); } + private static readonly Lazy _RotatorQueueHistoryOffset = new(() => Schema.GetOffset(0x73DA1BB9671778B7), LazyThreadSafetyMode.None); + public ref CUtlVector RotatorQueueHistory { - get => ref _Handle.AsRef>(Schema.GetOffset(0x73DA1BB9671778B7)); + get => ref _Handle.AsRef>(_RotatorQueueHistoryOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncShatterglassImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncShatterglassImpl.cs index 91b79e5ef..fbf9372ad 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncShatterglassImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncShatterglassImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,99 +17,151 @@ internal partial class CFuncShatterglassImpl : CBaseModelEntityImpl, CFuncShatte public CFuncShatterglassImpl(nint handle) : base(handle) { } + private static readonly Lazy _MatPanelTransformOffset = new(() => Schema.GetOffset(0xB755F0FB82550F23), LazyThreadSafetyMode.None); + public ref matrix3x4_t MatPanelTransform { - get => ref _Handle.AsRef(Schema.GetOffset(0xB755F0FB82550F23)); + get => ref _Handle.AsRef(_MatPanelTransformOffset.Value); } + private static readonly Lazy _MatPanelTransformWsTempOffset = new(() => Schema.GetOffset(0xB755F0FB74E9192F), LazyThreadSafetyMode.None); + public ref matrix3x4_t MatPanelTransformWsTemp { - get => ref _Handle.AsRef(Schema.GetOffset(0xB755F0FB74E9192F)); + get => ref _Handle.AsRef(_MatPanelTransformWsTempOffset.Value); } + private static readonly Lazy _ShatterGlassShardsOffset = new(() => Schema.GetOffset(0xB755F0FBCC0BC437), LazyThreadSafetyMode.None); + public ref CUtlVector ShatterGlassShards { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB755F0FBCC0BC437)); + get => ref _Handle.AsRef>(_ShatterGlassShardsOffset.Value); } + private static readonly Lazy _PanelSizeOffset = new(() => Schema.GetOffset(0xB755F0FBC54D327C), LazyThreadSafetyMode.None); + public ref Vector2D PanelSize { - get => ref _Handle.AsRef(Schema.GetOffset(0xB755F0FBC54D327C)); + get => ref _Handle.AsRef(_PanelSizeOffset.Value); } + private static readonly Lazy _LastShatterSoundEmitTimeOffset = new(() => Schema.GetOffset(0xB755F0FB1708F9B9), LazyThreadSafetyMode.None); + public GameTime_t LastShatterSoundEmitTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xB755F0FB1708F9B9)); + get => new GameTime_tImpl(_Handle + _LastShatterSoundEmitTimeOffset.Value); } + private static readonly Lazy _LastCleanupTimeOffset = new(() => Schema.GetOffset(0xB755F0FBB24E6FB0), LazyThreadSafetyMode.None); + public GameTime_t LastCleanupTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xB755F0FBB24E6FB0)); + get => new GameTime_tImpl(_Handle + _LastCleanupTimeOffset.Value); } + private static readonly Lazy _InitAtTimeOffset = new(() => Schema.GetOffset(0xB755F0FBBBC7C1A5), LazyThreadSafetyMode.None); + public GameTime_t InitAtTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xB755F0FBBBC7C1A5)); + get => new GameTime_tImpl(_Handle + _InitAtTimeOffset.Value); } + private static readonly Lazy _GlassThicknessOffset = new(() => Schema.GetOffset(0xB755F0FB59A7355D), LazyThreadSafetyMode.None); + public ref float GlassThickness { - get => ref _Handle.AsRef(Schema.GetOffset(0xB755F0FB59A7355D)); + get => ref _Handle.AsRef(_GlassThicknessOffset.Value); } + private static readonly Lazy _SpawnInvulnerabilityOffset = new(() => Schema.GetOffset(0xB755F0FB2B3B17C1), LazyThreadSafetyMode.None); + public ref float SpawnInvulnerability { - get => ref _Handle.AsRef(Schema.GetOffset(0xB755F0FB2B3B17C1)); + get => ref _Handle.AsRef(_SpawnInvulnerabilityOffset.Value); } + private static readonly Lazy _BreakSilentOffset = new(() => Schema.GetOffset(0xB755F0FB87C0E711), LazyThreadSafetyMode.None); + public ref bool BreakSilent { - get => ref _Handle.AsRef(Schema.GetOffset(0xB755F0FB87C0E711)); + get => ref _Handle.AsRef(_BreakSilentOffset.Value); } + private static readonly Lazy _BreakShardlessOffset = new(() => Schema.GetOffset(0xB755F0FBC509E199), LazyThreadSafetyMode.None); + public ref bool BreakShardless { - get => ref _Handle.AsRef(Schema.GetOffset(0xB755F0FBC509E199)); + get => ref _Handle.AsRef(_BreakShardlessOffset.Value); } + private static readonly Lazy _BrokenOffset = new(() => Schema.GetOffset(0xB755F0FB06654200), LazyThreadSafetyMode.None); + public ref bool Broken { - get => ref _Handle.AsRef(Schema.GetOffset(0xB755F0FB06654200)); + get => ref _Handle.AsRef(_BrokenOffset.Value); } + private static readonly Lazy _GlassNavIgnoreOffset = new(() => Schema.GetOffset(0xB755F0FBD9034606), LazyThreadSafetyMode.None); + public ref bool GlassNavIgnore { - get => ref _Handle.AsRef(Schema.GetOffset(0xB755F0FBD9034606)); + get => ref _Handle.AsRef(_GlassNavIgnoreOffset.Value); } + private static readonly Lazy _GlassInFrameOffset = new(() => Schema.GetOffset(0xB755F0FBEB8CF645), LazyThreadSafetyMode.None); + public ref bool GlassInFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0xB755F0FBEB8CF645)); + get => ref _Handle.AsRef(_GlassInFrameOffset.Value); } + private static readonly Lazy _StartBrokenOffset = new(() => Schema.GetOffset(0xB755F0FBEA039156), LazyThreadSafetyMode.None); + public ref bool StartBroken { - get => ref _Handle.AsRef(Schema.GetOffset(0xB755F0FBEA039156)); + get => ref _Handle.AsRef(_StartBrokenOffset.Value); } + private static readonly Lazy _InitialDamageTypeOffset = new(() => Schema.GetOffset(0xB755F0FBED01D1E1), LazyThreadSafetyMode.None); + public ref byte InitialDamageType { - get => ref _Handle.AsRef(Schema.GetOffset(0xB755F0FBED01D1E1)); + get => ref _Handle.AsRef(_InitialDamageTypeOffset.Value); } + private static readonly Lazy _DamagePositioningEntityName01Offset = new(() => Schema.GetOffset(0xB755F0FBADF2770D), LazyThreadSafetyMode.None); + public string DamagePositioningEntityName01 { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB755F0FBADF2770D)); + var ptr = _Handle.Read(_DamagePositioningEntityName01Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB755F0FBADF2770D, value); + set => Schema.SetString(_Handle, _DamagePositioningEntityName01Offset.Value, value); } + private static readonly Lazy _DamagePositioningEntityName02Offset = new(() => Schema.GetOffset(0xB755F0FBAAF27254), LazyThreadSafetyMode.None); + public string DamagePositioningEntityName02 { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB755F0FBAAF27254)); + var ptr = _Handle.Read(_DamagePositioningEntityName02Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB755F0FBAAF27254, value); + set => Schema.SetString(_Handle, _DamagePositioningEntityName02Offset.Value, value); } + private static readonly Lazy _DamagePositioningEntityName03Offset = new(() => Schema.GetOffset(0xB755F0FBABF273E7), LazyThreadSafetyMode.None); + public string DamagePositioningEntityName03 { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB755F0FBABF273E7)); + var ptr = _Handle.Read(_DamagePositioningEntityName03Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB755F0FBABF273E7, value); + set => Schema.SetString(_Handle, _DamagePositioningEntityName03Offset.Value, value); } + private static readonly Lazy _DamagePositioningEntityName04Offset = new(() => Schema.GetOffset(0xB755F0FBA8F26F2E), LazyThreadSafetyMode.None); + public string DamagePositioningEntityName04 { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB755F0FBA8F26F2E)); + var ptr = _Handle.Read(_DamagePositioningEntityName04Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB755F0FBA8F26F2E, value); + set => Schema.SetString(_Handle, _DamagePositioningEntityName04Offset.Value, value); } + private static readonly Lazy _InitialDamagePositionsOffset = new(() => Schema.GetOffset(0xB755F0FB6D8C7F56), LazyThreadSafetyMode.None); + public ref CUtlVector InitialDamagePositions { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB755F0FB6D8C7F56)); + get => ref _Handle.AsRef>(_InitialDamagePositionsOffset.Value); } + private static readonly Lazy _ExtraDamagePositionsOffset = new(() => Schema.GetOffset(0xB755F0FB94D38DA0), LazyThreadSafetyMode.None); + public ref CUtlVector ExtraDamagePositions { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB755F0FB94D38DA0)); + get => ref _Handle.AsRef>(_ExtraDamagePositionsOffset.Value); } + private static readonly Lazy _InitialPanelVerticesOffset = new(() => Schema.GetOffset(0xB755F0FB39117F58), LazyThreadSafetyMode.None); + public ref CUtlVector InitialPanelVertices { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB755F0FB39117F58)); + get => ref _Handle.AsRef>(_InitialPanelVerticesOffset.Value); } + private static readonly Lazy _OnBrokenOffset = new(() => Schema.GetOffset(0xB755F0FB961F60E5), LazyThreadSafetyMode.None); + public CEntityIOOutput OnBroken { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xB755F0FB961F60E5)); + get => new CEntityIOOutputImpl(_Handle + _OnBrokenOffset.Value); } + private static readonly Lazy _SurfaceTypeOffset = new(() => Schema.GetOffset(0xB755F0FB3A6DDFE7), LazyThreadSafetyMode.None); + public ref byte SurfaceType { - get => ref _Handle.AsRef(Schema.GetOffset(0xB755F0FB3A6DDFE7)); + get => ref _Handle.AsRef(_SurfaceTypeOffset.Value); } + private static readonly Lazy _MaterialDamageBaseOffset = new(() => Schema.GetOffset(0xB755F0FB3000A1C6), LazyThreadSafetyMode.None); + public ref CStrongHandle MaterialDamageBase { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB755F0FB3000A1C6)); + get => ref _Handle.AsRef>(_MaterialDamageBaseOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTankTrainImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTankTrainImpl.cs index f4a66e8f3..1c4865d56 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTankTrainImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTankTrainImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CFuncTankTrainImpl : CFuncTrackTrainImpl, CFuncTankTrain public CFuncTankTrainImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnDeathOffset = new(() => Schema.GetOffset(0xF7897E7E6F756BD2), LazyThreadSafetyMode.None); + public CEntityIOOutput OnDeath { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xF7897E7E6F756BD2)); + get => new CEntityIOOutputImpl(_Handle + _OnDeathOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTimescaleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTimescaleImpl.cs index 52c70ccc3..e21d180f4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTimescaleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTimescaleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CFuncTimescaleImpl : CBaseEntityImpl, CFuncTimescale { public CFuncTimescaleImpl(nint handle) : base(handle) { } + private static readonly Lazy _DesiredTimescaleOffset = new(() => Schema.GetOffset(0x93388D41E4EE9A68), LazyThreadSafetyMode.None); + public ref float DesiredTimescale { - get => ref _Handle.AsRef(Schema.GetOffset(0x93388D41E4EE9A68)); + get => ref _Handle.AsRef(_DesiredTimescaleOffset.Value); } + private static readonly Lazy _AccelerationOffset = new(() => Schema.GetOffset(0x93388D41071E739B), LazyThreadSafetyMode.None); + public ref float Acceleration { - get => ref _Handle.AsRef(Schema.GetOffset(0x93388D41071E739B)); + get => ref _Handle.AsRef(_AccelerationOffset.Value); } + private static readonly Lazy _MinBlendRateOffset = new(() => Schema.GetOffset(0x93388D41E90D5E26), LazyThreadSafetyMode.None); + public ref float MinBlendRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x93388D41E90D5E26)); + get => ref _Handle.AsRef(_MinBlendRateOffset.Value); } + private static readonly Lazy _BlendDeltaMultiplierOffset = new(() => Schema.GetOffset(0x93388D413D2158F7), LazyThreadSafetyMode.None); + public ref float BlendDeltaMultiplier { - get => ref _Handle.AsRef(Schema.GetOffset(0x93388D413D2158F7)); + get => ref _Handle.AsRef(_BlendDeltaMultiplierOffset.Value); } + private static readonly Lazy _IsStartedOffset = new(() => Schema.GetOffset(0x93388D41C4A4378E), LazyThreadSafetyMode.None); + public ref bool IsStarted { - get => ref _Handle.AsRef(Schema.GetOffset(0x93388D41C4A4378E)); + get => ref _Handle.AsRef(_IsStartedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrackAutoImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrackAutoImpl.cs index 83d2c7623..ca635c4a5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrackAutoImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrackAutoImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrackChangeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrackChangeImpl.cs index 12583e958..25cd184f5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrackChangeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrackChangeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,53 +17,71 @@ internal partial class CFuncTrackChangeImpl : CFuncPlatRotImpl, CFuncTrackChange public CFuncTrackChangeImpl(nint handle) : base(handle) { } + private static readonly Lazy _TrackTopOffset = new(() => Schema.GetOffset(0x25A8A26FF7C2CCBF), LazyThreadSafetyMode.None); + public CPathTrack? TrackTop { get { - var ptr = _Handle.Read(Schema.GetOffset(0x25A8A26FF7C2CCBF)); + var ptr = _Handle.Read(_TrackTopOffset.Value); return ptr.IsValidPtr() ? new CPathTrackImpl(ptr) : null; } } + private static readonly Lazy _TrackBottomOffset = new(() => Schema.GetOffset(0x25A8A26F37EC7637), LazyThreadSafetyMode.None); + public CPathTrack? TrackBottom { get { - var ptr = _Handle.Read(Schema.GetOffset(0x25A8A26F37EC7637)); + var ptr = _Handle.Read(_TrackBottomOffset.Value); return ptr.IsValidPtr() ? new CPathTrackImpl(ptr) : null; } } + private static readonly Lazy _TrainOffset = new(() => Schema.GetOffset(0x25A8A26FB8642689), LazyThreadSafetyMode.None); + public CFuncTrackTrain? Train { get { - var ptr = _Handle.Read(Schema.GetOffset(0x25A8A26FB8642689)); + var ptr = _Handle.Read(_TrainOffset.Value); return ptr.IsValidPtr() ? new CFuncTrackTrainImpl(ptr) : null; } } + private static readonly Lazy _TrackTopNameOffset = new(() => Schema.GetOffset(0x25A8A26FF9BD489C), LazyThreadSafetyMode.None); + public string TrackTopName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x25A8A26FF9BD489C)); + var ptr = _Handle.Read(_TrackTopNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x25A8A26FF9BD489C, value); + set => Schema.SetString(_Handle, _TrackTopNameOffset.Value, value); } + private static readonly Lazy _TrackBottomNameOffset = new(() => Schema.GetOffset(0x25A8A26F7F34C2D4), LazyThreadSafetyMode.None); + public string TrackBottomName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x25A8A26F7F34C2D4)); + var ptr = _Handle.Read(_TrackBottomNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x25A8A26F7F34C2D4, value); + set => Schema.SetString(_Handle, _TrackBottomNameOffset.Value, value); } + private static readonly Lazy _TrainNameOffset = new(() => Schema.GetOffset(0x25A8A26FA3DC4C82), LazyThreadSafetyMode.None); + public string TrainName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x25A8A26FA3DC4C82)); + var ptr = _Handle.Read(_TrainNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x25A8A26FA3DC4C82, value); + set => Schema.SetString(_Handle, _TrainNameOffset.Value, value); } + private static readonly Lazy _CodeOffset = new(() => Schema.GetOffset(0x25A8A26FB70C9D94), LazyThreadSafetyMode.None); + public ref TRAIN_CODE Code { - get => ref _Handle.AsRef(Schema.GetOffset(0x25A8A26FB70C9D94)); + get => ref _Handle.AsRef(_CodeOffset.Value); } + private static readonly Lazy _TargetStateOffset = new(() => Schema.GetOffset(0x25A8A26F9EA3444D), LazyThreadSafetyMode.None); + public ref int TargetState { - get => ref _Handle.AsRef(Schema.GetOffset(0x25A8A26F9EA3444D)); + get => ref _Handle.AsRef(_TargetStateOffset.Value); } + private static readonly Lazy _UseOffset = new(() => Schema.GetOffset(0x25A8A26F45B2B614), LazyThreadSafetyMode.None); + public ref int Use { - get => ref _Handle.AsRef(Schema.GetOffset(0x25A8A26F45B2B614)); + get => ref _Handle.AsRef(_UseOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrackTrainImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrackTrainImpl.cs index ac9dab11a..e3257372b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrackTrainImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrackTrainImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,136 +17,210 @@ internal partial class CFuncTrackTrainImpl : CBaseModelEntityImpl, CFuncTrackTra public CFuncTrackTrainImpl(nint handle) : base(handle) { } + private static readonly Lazy _PpathOffset = new(() => Schema.GetOffset(0x416637FB5A26CD88), LazyThreadSafetyMode.None); + public ref CHandle Ppath { - get => ref _Handle.AsRef>(Schema.GetOffset(0x416637FB5A26CD88)); + get => ref _Handle.AsRef>(_PpathOffset.Value); } + private static readonly Lazy _LengthOffset = new(() => Schema.GetOffset(0x416637FB3AFED1B5), LazyThreadSafetyMode.None); + public ref float Length { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FB3AFED1B5)); + get => ref _Handle.AsRef(_LengthOffset.Value); } + private static readonly Lazy _PosPrevOffset = new(() => Schema.GetOffset(0x416637FB359844A8), LazyThreadSafetyMode.None); + public ref Vector PosPrev { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FB359844A8)); + get => ref _Handle.AsRef(_PosPrevOffset.Value); } + private static readonly Lazy _PrevOffset = new(() => Schema.GetOffset(0x416637FB560A937E), LazyThreadSafetyMode.None); + public ref QAngle Prev { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FB560A937E)); + get => ref _Handle.AsRef(_PrevOffset.Value); } + private static readonly Lazy _ControlMinsOffset = new(() => Schema.GetOffset(0x416637FB8E95DFBB), LazyThreadSafetyMode.None); + public ref Vector ControlMins { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FB8E95DFBB)); + get => ref _Handle.AsRef(_ControlMinsOffset.Value); } + private static readonly Lazy _ControlMaxsOffset = new(() => Schema.GetOffset(0x416637FBE56D54C9), LazyThreadSafetyMode.None); + public ref Vector ControlMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FBE56D54C9)); + get => ref _Handle.AsRef(_ControlMaxsOffset.Value); } + private static readonly Lazy _LastBlockPosOffset = new(() => Schema.GetOffset(0x416637FB93D6BD54), LazyThreadSafetyMode.None); + public ref Vector LastBlockPos { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FB93D6BD54)); + get => ref _Handle.AsRef(_LastBlockPosOffset.Value); } + private static readonly Lazy _LastBlockTickOffset = new(() => Schema.GetOffset(0x416637FBBAD8855B), LazyThreadSafetyMode.None); + public ref int LastBlockTick { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FBBAD8855B)); + get => ref _Handle.AsRef(_LastBlockTickOffset.Value); } + private static readonly Lazy _VolumeOffset = new(() => Schema.GetOffset(0x416637FB7647E0C9), LazyThreadSafetyMode.None); + public ref float Volume { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FB7647E0C9)); + get => ref _Handle.AsRef(_VolumeOffset.Value); } + private static readonly Lazy _BankOffset = new(() => Schema.GetOffset(0x416637FB80D0525D), LazyThreadSafetyMode.None); + public ref float Bank { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FB80D0525D)); + get => ref _Handle.AsRef(_BankOffset.Value); } + private static readonly Lazy _OldSpeedOffset = new(() => Schema.GetOffset(0x416637FB6FB3C229), LazyThreadSafetyMode.None); + public ref float OldSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FB6FB3C229)); + get => ref _Handle.AsRef(_OldSpeedOffset.Value); } + private static readonly Lazy _BlockDamageOffset = new(() => Schema.GetOffset(0x416637FBA5348091), LazyThreadSafetyMode.None); + public ref float BlockDamage { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FBA5348091)); + get => ref _Handle.AsRef(_BlockDamageOffset.Value); } + private static readonly Lazy _HeightOffset = new(() => Schema.GetOffset(0x416637FB8A71EDE2), LazyThreadSafetyMode.None); + public ref float Height { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FB8A71EDE2)); + get => ref _Handle.AsRef(_HeightOffset.Value); } + private static readonly Lazy _MaxSpeedOffset = new(() => Schema.GetOffset(0x416637FB992A9164), LazyThreadSafetyMode.None); + public ref float MaxSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FB992A9164)); + get => ref _Handle.AsRef(_MaxSpeedOffset.Value); } + private static readonly Lazy _DirOffset = new(() => Schema.GetOffset(0x416637FBD9FF9EB4), LazyThreadSafetyMode.None); + public ref float Dir { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FBD9FF9EB4)); + get => ref _Handle.AsRef(_DirOffset.Value); } + private static readonly Lazy _SoundMoveOffset = new(() => Schema.GetOffset(0x416637FB73E14089), LazyThreadSafetyMode.None); + public string SoundMove { get { - var ptr = _Handle.Read(Schema.GetOffset(0x416637FB73E14089)); + var ptr = _Handle.Read(_SoundMoveOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x416637FB73E14089, value); + set => Schema.SetString(_Handle, _SoundMoveOffset.Value, value); } + private static readonly Lazy _SoundMovePingOffset = new(() => Schema.GetOffset(0x416637FB68B489FD), LazyThreadSafetyMode.None); + public string SoundMovePing { get { - var ptr = _Handle.Read(Schema.GetOffset(0x416637FB68B489FD)); + var ptr = _Handle.Read(_SoundMovePingOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x416637FB68B489FD, value); + set => Schema.SetString(_Handle, _SoundMovePingOffset.Value, value); } + private static readonly Lazy _SoundStartOffset = new(() => Schema.GetOffset(0x416637FB7CA15A30), LazyThreadSafetyMode.None); + public string SoundStart { get { - var ptr = _Handle.Read(Schema.GetOffset(0x416637FB7CA15A30)); + var ptr = _Handle.Read(_SoundStartOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x416637FB7CA15A30, value); + set => Schema.SetString(_Handle, _SoundStartOffset.Value, value); } + private static readonly Lazy _SoundStopOffset = new(() => Schema.GetOffset(0x416637FB34D8E0B4), LazyThreadSafetyMode.None); + public string SoundStop { get { - var ptr = _Handle.Read(Schema.GetOffset(0x416637FB34D8E0B4)); + var ptr = _Handle.Read(_SoundStopOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x416637FB34D8E0B4, value); + set => Schema.SetString(_Handle, _SoundStopOffset.Value, value); } + private static readonly Lazy _StrPathTargetOffset = new(() => Schema.GetOffset(0x416637FB7AF8129A), LazyThreadSafetyMode.None); + public string StrPathTarget { get { - var ptr = _Handle.Read(Schema.GetOffset(0x416637FB7AF8129A)); + var ptr = _Handle.Read(_StrPathTargetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x416637FB7AF8129A, value); + set => Schema.SetString(_Handle, _StrPathTargetOffset.Value, value); } + private static readonly Lazy _MoveSoundMinDurationOffset = new(() => Schema.GetOffset(0x416637FB00A53693), LazyThreadSafetyMode.None); + public ref float MoveSoundMinDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FB00A53693)); + get => ref _Handle.AsRef(_MoveSoundMinDurationOffset.Value); } + private static readonly Lazy _MoveSoundMaxDurationOffset = new(() => Schema.GetOffset(0x416637FBA06C5829), LazyThreadSafetyMode.None); + public ref float MoveSoundMaxDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FBA06C5829)); + get => ref _Handle.AsRef(_MoveSoundMaxDurationOffset.Value); } + private static readonly Lazy _NextMoveSoundTimeOffset = new(() => Schema.GetOffset(0x416637FB05BD176B), LazyThreadSafetyMode.None); + public GameTime_t NextMoveSoundTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x416637FB05BD176B)); + get => new GameTime_tImpl(_Handle + _NextMoveSoundTimeOffset.Value); } + private static readonly Lazy _MoveSoundMinPitchOffset = new(() => Schema.GetOffset(0x416637FBFED455E3), LazyThreadSafetyMode.None); + public ref float MoveSoundMinPitch { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FBFED455E3)); + get => ref _Handle.AsRef(_MoveSoundMinPitchOffset.Value); } + private static readonly Lazy _MoveSoundMaxPitchOffset = new(() => Schema.GetOffset(0x416637FBE1C88895), LazyThreadSafetyMode.None); + public ref float MoveSoundMaxPitch { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FBE1C88895)); + get => ref _Handle.AsRef(_MoveSoundMaxPitchOffset.Value); } + private static readonly Lazy _OrientationTypeOffset = new(() => Schema.GetOffset(0x416637FB468ECE0A), LazyThreadSafetyMode.None); + public ref TrainOrientationType_t OrientationType { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FB468ECE0A)); + get => ref _Handle.AsRef(_OrientationTypeOffset.Value); } + private static readonly Lazy _VelocityTypeOffset = new(() => Schema.GetOffset(0x416637FBA952DF0B), LazyThreadSafetyMode.None); + public ref TrainVelocityType_t VelocityType { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FBA952DF0B)); + get => ref _Handle.AsRef(_VelocityTypeOffset.Value); } + private static readonly Lazy _OnStartOffset = new(() => Schema.GetOffset(0x416637FBC3FE848C), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStart { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x416637FBC3FE848C)); + get => new CEntityIOOutputImpl(_Handle + _OnStartOffset.Value); } + private static readonly Lazy _OnNextOffset = new(() => Schema.GetOffset(0x416637FBFE51ADC1), LazyThreadSafetyMode.None); + public CEntityIOOutput OnNext { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x416637FBFE51ADC1)); + get => new CEntityIOOutputImpl(_Handle + _OnNextOffset.Value); } + private static readonly Lazy _OnArrivedAtDestinationNodeOffset = new(() => Schema.GetOffset(0x416637FBCAE21100), LazyThreadSafetyMode.None); + public CEntityIOOutput OnArrivedAtDestinationNode { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x416637FBCAE21100)); + get => new CEntityIOOutputImpl(_Handle + _OnArrivedAtDestinationNodeOffset.Value); } + private static readonly Lazy _ManualSpeedChangesOffset = new(() => Schema.GetOffset(0x416637FBB3C37B9B), LazyThreadSafetyMode.None); + public ref bool ManualSpeedChanges { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FBB3C37B9B)); + get => ref _Handle.AsRef(_ManualSpeedChangesOffset.Value); } + private static readonly Lazy _DesiredSpeedOffset = new(() => Schema.GetOffset(0x416637FBF7F86D26), LazyThreadSafetyMode.None); + public ref float DesiredSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FBF7F86D26)); + get => ref _Handle.AsRef(_DesiredSpeedOffset.Value); } + private static readonly Lazy _SpeedChangeTimeOffset = new(() => Schema.GetOffset(0x416637FBCC334417), LazyThreadSafetyMode.None); + public GameTime_t SpeedChangeTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x416637FBCC334417)); + get => new GameTime_tImpl(_Handle + _SpeedChangeTimeOffset.Value); } + private static readonly Lazy _AccelSpeedOffset = new(() => Schema.GetOffset(0x416637FB345C91CC), LazyThreadSafetyMode.None); + public ref float AccelSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FB345C91CC)); + get => ref _Handle.AsRef(_AccelSpeedOffset.Value); } + private static readonly Lazy _DecelSpeedOffset = new(() => Schema.GetOffset(0x416637FBC85D7DF7), LazyThreadSafetyMode.None); + public ref float DecelSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FBC85D7DF7)); + get => ref _Handle.AsRef(_DecelSpeedOffset.Value); } + private static readonly Lazy _AccelToSpeedOffset = new(() => Schema.GetOffset(0x416637FB540D38C1), LazyThreadSafetyMode.None); + public ref bool AccelToSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x416637FB540D38C1)); + get => ref _Handle.AsRef(_AccelToSpeedOffset.Value); } + private static readonly Lazy _NextMPSoundTimeOffset = new(() => Schema.GetOffset(0x416637FB251847DB), LazyThreadSafetyMode.None); + public GameTime_t NextMPSoundTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x416637FB251847DB)); + get => new GameTime_tImpl(_Handle + _NextMPSoundTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrainControlsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrainControlsImpl.cs index 7c41a2348..0feb3bb51 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrainControlsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrainControlsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrainImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrainImpl.cs index cb6ea4e5c..a7548960f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrainImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncTrainImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,27 +17,39 @@ internal partial class CFuncTrainImpl : CBasePlatTrainImpl, CFuncTrain { public CFuncTrainImpl(nint handle) : base(handle) { } + private static readonly Lazy _CurrentTargetOffset = new(() => Schema.GetOffset(0xAAD8EE8EBD175911), LazyThreadSafetyMode.None); + public ref CHandle CurrentTarget { - get => ref _Handle.AsRef>(Schema.GetOffset(0xAAD8EE8EBD175911)); + get => ref _Handle.AsRef>(_CurrentTargetOffset.Value); } + private static readonly Lazy _ActivatedOffset = new(() => Schema.GetOffset(0xAAD8EE8E4337A09C), LazyThreadSafetyMode.None); + public ref bool Activated { - get => ref _Handle.AsRef(Schema.GetOffset(0xAAD8EE8E4337A09C)); + get => ref _Handle.AsRef(_ActivatedOffset.Value); } + private static readonly Lazy _EnemyOffset = new(() => Schema.GetOffset(0xAAD8EE8E430EC2D5), LazyThreadSafetyMode.None); + public ref CHandle Enemy { - get => ref _Handle.AsRef>(Schema.GetOffset(0xAAD8EE8E430EC2D5)); + get => ref _Handle.AsRef>(_EnemyOffset.Value); } + private static readonly Lazy _BlockDamageOffset = new(() => Schema.GetOffset(0xAAD8EE8EA5348091), LazyThreadSafetyMode.None); + public ref float BlockDamage { - get => ref _Handle.AsRef(Schema.GetOffset(0xAAD8EE8EA5348091)); + get => ref _Handle.AsRef(_BlockDamageOffset.Value); } + private static readonly Lazy _NextBlockTimeOffset = new(() => Schema.GetOffset(0xAAD8EE8E82BC1902), LazyThreadSafetyMode.None); + public GameTime_t NextBlockTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xAAD8EE8E82BC1902)); + get => new GameTime_tImpl(_Handle + _NextBlockTimeOffset.Value); } + private static readonly Lazy _LastTargetOffset = new(() => Schema.GetOffset(0xAAD8EE8ECF22FD34), LazyThreadSafetyMode.None); + public string LastTarget { get { - var ptr = _Handle.Read(Schema.GetOffset(0xAAD8EE8ECF22FD34)); + var ptr = _Handle.Read(_LastTargetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xAAD8EE8ECF22FD34, value); + set => Schema.SetString(_Handle, _LastTargetOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncVPhysicsClipImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncVPhysicsClipImpl.cs index 665330db9..1d2ce271f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncVPhysicsClipImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncVPhysicsClipImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CFuncVPhysicsClipImpl : CBaseModelEntityImpl, CFuncVPhysi public CFuncVPhysicsClipImpl(nint handle) : base(handle) { } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0xE695DCD93A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xE695DCD93A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncVehicleClipImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncVehicleClipImpl.cs index 158fb8b91..87c6efc61 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncVehicleClipImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncVehicleClipImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncWallImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncWallImpl.cs index 7c15aabd5..5764f9b86 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncWallImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncWallImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CFuncWallImpl : CBaseModelEntityImpl, CFuncWall { public CFuncWallImpl(nint handle) : base(handle) { } + private static readonly Lazy _StateOffset = new(() => Schema.GetOffset(0x8F4C70C07C824322), LazyThreadSafetyMode.None); + public ref int State { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F4C70C07C824322)); + get => ref _Handle.AsRef(_StateOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncWallToggleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncWallToggleImpl.cs index 777a75a91..a4bffdf44 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncWallToggleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncWallToggleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncWaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncWaterImpl.cs index 5dcc6c8cb..db8d7f0dc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncWaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuncWaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CFuncWaterImpl : CBaseModelEntityImpl, CFuncWater { public CFuncWaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _BuoyancyHelperOffset = new(() => Schema.GetOffset(0x7DCF4A236BAFFEA7), LazyThreadSafetyMode.None); + public CBuoyancyHelper BuoyancyHelper { - get => new CBuoyancyHelperImpl(_Handle + Schema.GetOffset(0x7DCF4A236BAFFEA7)); + get => new CBuoyancyHelperImpl(_Handle + _BuoyancyHelperOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuseProgramImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuseProgramImpl.cs index 750af7154..b95ff007b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuseProgramImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuseProgramImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CFuseProgramImpl : SchemaClass, CFuseProgram { public CFuseProgramImpl(nint handle) : base(handle) { } + private static readonly Lazy _ProgramBufferOffset = new(() => Schema.GetOffset(0x81E69119349962E1), LazyThreadSafetyMode.None); + public ref CUtlVector ProgramBuffer { - get => ref _Handle.AsRef>(Schema.GetOffset(0x81E69119349962E1)); + get => ref _Handle.AsRef>(_ProgramBufferOffset.Value); } + private static readonly Lazy _VariablesReadOffset = new(() => Schema.GetOffset(0x81E691194C160BEA), LazyThreadSafetyMode.None); + public ref CUtlVector VariablesRead { - get => ref _Handle.AsRef>(Schema.GetOffset(0x81E691194C160BEA)); + get => ref _Handle.AsRef>(_VariablesReadOffset.Value); } + private static readonly Lazy _VariablesWrittenOffset = new(() => Schema.GetOffset(0x81E69119E9491C49), LazyThreadSafetyMode.None); + public ref CUtlVector VariablesWritten { - get => ref _Handle.AsRef>(Schema.GetOffset(0x81E69119E9491C49)); + get => ref _Handle.AsRef>(_VariablesWrittenOffset.Value); } + private static readonly Lazy _MaxTempVarsUsedOffset = new(() => Schema.GetOffset(0x81E69119981A1518), LazyThreadSafetyMode.None); + public ref int MaxTempVarsUsed { - get => ref _Handle.AsRef(Schema.GetOffset(0x81E69119981A1518)); + get => ref _Handle.AsRef(_MaxTempVarsUsedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuseSymbolTableImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuseSymbolTableImpl.cs index 8ae04bec0..be66d5976 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuseSymbolTableImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFuseSymbolTableImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CFuseSymbolTableImpl : SchemaClass, CFuseSymbolTable { public CFuseSymbolTableImpl(nint handle) : base(handle) { } + private static readonly Lazy _ConstantsOffset = new(() => Schema.GetOffset(0xD8A03B41460C1382), LazyThreadSafetyMode.None); + public ref CUtlVector Constants { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD8A03B41460C1382)); + get => ref _Handle.AsRef>(_ConstantsOffset.Value); } + private static readonly Lazy _VariablesOffset = new(() => Schema.GetOffset(0xD8A03B4106AE7DE2), LazyThreadSafetyMode.None); + public ref CUtlVector Variables { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD8A03B4106AE7DE2)); + get => ref _Handle.AsRef>(_VariablesOffset.Value); } + private static readonly Lazy _FunctionsOffset = new(() => Schema.GetOffset(0xD8A03B41F6EF246E), LazyThreadSafetyMode.None); + public ref CUtlVector Functions { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD8A03B41F6EF246E)); + get => ref _Handle.AsRef>(_FunctionsOffset.Value); } + private static readonly Lazy _ConstantMapOffset = new(() => Schema.GetOffset(0xD8A03B4198BF6E51), LazyThreadSafetyMode.None); + public SchemaUntypedField ConstantMap { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD8A03B4198BF6E51)); + get => new SchemaUntypedField(_Handle + _ConstantMapOffset.Value); } + private static readonly Lazy _VariableMapOffset = new(() => Schema.GetOffset(0xD8A03B410FDE3671), LazyThreadSafetyMode.None); + public SchemaUntypedField VariableMap { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD8A03B410FDE3671)); + get => new SchemaUntypedField(_Handle + _VariableMapOffset.Value); } + private static readonly Lazy _FunctionMapOffset = new(() => Schema.GetOffset(0xD8A03B4147A33EC5), LazyThreadSafetyMode.None); + public SchemaUntypedField FunctionMap { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD8A03B4147A33EC5)); + get => new SchemaUntypedField(_Handle + _FunctionMapOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFutureFacingMetricEvaluatorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFutureFacingMetricEvaluatorImpl.cs index 9755069dd..584228a31 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFutureFacingMetricEvaluatorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFutureFacingMetricEvaluatorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CFutureFacingMetricEvaluatorImpl : CMotionMetricEvaluator public CFutureFacingMetricEvaluatorImpl(nint handle) : base(handle) { } + private static readonly Lazy _DistanceOffset = new(() => Schema.GetOffset(0x6A3CD0D400DC4A68), LazyThreadSafetyMode.None); + public ref float Distance { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A3CD0D400DC4A68)); + get => ref _Handle.AsRef(_DistanceOffset.Value); } + private static readonly Lazy _TimeOffset = new(() => Schema.GetOffset(0x6A3CD0D4C957229E), LazyThreadSafetyMode.None); + public ref float Time { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A3CD0D4C957229E)); + get => ref _Handle.AsRef(_TimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFutureVelocityMetricEvaluatorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFutureVelocityMetricEvaluatorImpl.cs index e2b5619e5..68effa491 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFutureVelocityMetricEvaluatorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CFutureVelocityMetricEvaluatorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CFutureVelocityMetricEvaluatorImpl : CMotionMetricEvaluat public CFutureVelocityMetricEvaluatorImpl(nint handle) : base(handle) { } + private static readonly Lazy _DistanceOffset = new(() => Schema.GetOffset(0xF0A3A8300DC4A68), LazyThreadSafetyMode.None); + public ref float Distance { - get => ref _Handle.AsRef(Schema.GetOffset(0xF0A3A8300DC4A68)); + get => ref _Handle.AsRef(_DistanceOffset.Value); } + private static readonly Lazy _StoppingDistanceOffset = new(() => Schema.GetOffset(0xF0A3A8324979434), LazyThreadSafetyMode.None); + public ref float StoppingDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xF0A3A8324979434)); + get => ref _Handle.AsRef(_StoppingDistanceOffset.Value); } + private static readonly Lazy _TargetSpeedOffset = new(() => Schema.GetOffset(0xF0A3A839C627845), LazyThreadSafetyMode.None); + public ref float TargetSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xF0A3A839C627845)); + get => ref _Handle.AsRef(_TargetSpeedOffset.Value); } + private static readonly Lazy _ModeOffset = new(() => Schema.GetOffset(0xF0A3A831050A633), LazyThreadSafetyMode.None); + public ref VelocityMetricMode Mode { - get => ref _Handle.AsRef(Schema.GetOffset(0xF0A3A831050A633)); + get => ref _Handle.AsRef(_ModeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameChoreoServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameChoreoServicesImpl.cs index 65246e1a0..3f00260b3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameChoreoServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameChoreoServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CGameChoreoServicesImpl : IChoreoServicesImpl, CGameChore public CGameChoreoServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _OwnerOffset = new(() => Schema.GetOffset(0xF5FFE2B2F6D89572), LazyThreadSafetyMode.None); + public ref CHandle Owner { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF5FFE2B2F6D89572)); + get => ref _Handle.AsRef>(_OwnerOffset.Value); } + private static readonly Lazy _ScriptedSequenceOffset = new(() => Schema.GetOffset(0xF5FFE2B2E43BF85C), LazyThreadSafetyMode.None); + public ref CHandle ScriptedSequence { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF5FFE2B2E43BF85C)); + get => ref _Handle.AsRef>(_ScriptedSequenceOffset.Value); } + private static readonly Lazy _ScriptStateOffset = new(() => Schema.GetOffset(0xF5FFE2B2E4CD331F), LazyThreadSafetyMode.None); + public ref IChoreoServices__ScriptState_t ScriptState { - get => ref _Handle.AsRef(Schema.GetOffset(0xF5FFE2B2E4CD331F)); + get => ref _Handle.AsRef(_ScriptStateOffset.Value); } + private static readonly Lazy _ChoreoStateOffset = new(() => Schema.GetOffset(0xF5FFE2B251730DD8), LazyThreadSafetyMode.None); + public ref IChoreoServices__ChoreoState_t ChoreoState { - get => ref _Handle.AsRef(Schema.GetOffset(0xF5FFE2B251730DD8)); + get => ref _Handle.AsRef(_ChoreoStateOffset.Value); } + private static readonly Lazy _TimeStartedStateOffset = new(() => Schema.GetOffset(0xF5FFE2B20BD38900), LazyThreadSafetyMode.None); + public GameTime_t TimeStartedState { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xF5FFE2B20BD38900)); + get => new GameTime_tImpl(_Handle + _TimeStartedStateOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameEndImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameEndImpl.cs index d2da5c8fb..b39d4915f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameEndImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameEndImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameGibManagerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameGibManagerImpl.cs index 0325d39e8..4b877e8b0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameGibManagerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameGibManagerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CGameGibManagerImpl : CBaseEntityImpl, CGameGibManager { public CGameGibManagerImpl(nint handle) : base(handle) { } + private static readonly Lazy _AllowNewGibsOffset = new(() => Schema.GetOffset(0x1068CB09FD80F507), LazyThreadSafetyMode.None); + public ref bool AllowNewGibs { - get => ref _Handle.AsRef(Schema.GetOffset(0x1068CB09FD80F507)); + get => ref _Handle.AsRef(_AllowNewGibsOffset.Value); } + private static readonly Lazy _CurrentMaxPiecesOffset = new(() => Schema.GetOffset(0x1068CB0999B0D602), LazyThreadSafetyMode.None); + public ref int CurrentMaxPieces { - get => ref _Handle.AsRef(Schema.GetOffset(0x1068CB0999B0D602)); + get => ref _Handle.AsRef(_CurrentMaxPiecesOffset.Value); } + private static readonly Lazy _MaxPiecesOffset = new(() => Schema.GetOffset(0x1068CB092DDFB63D), LazyThreadSafetyMode.None); + public ref int MaxPieces { - get => ref _Handle.AsRef(Schema.GetOffset(0x1068CB092DDFB63D)); + get => ref _Handle.AsRef(_MaxPiecesOffset.Value); } + private static readonly Lazy _LastFrameOffset = new(() => Schema.GetOffset(0x1068CB09F0B58C21), LazyThreadSafetyMode.None); + public ref int LastFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x1068CB09F0B58C21)); + get => ref _Handle.AsRef(_LastFrameOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameMoneyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameMoneyImpl.cs index 21a8277e6..f2429a38b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameMoneyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameMoneyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class CGameMoneyImpl : CRulePointEntityImpl, CGameMoney { public CGameMoneyImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnMoneySpentOffset = new(() => Schema.GetOffset(0xED17C684B6CD990C), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMoneySpent { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xED17C684B6CD990C)); + get => new CEntityIOOutputImpl(_Handle + _OnMoneySpentOffset.Value); } + private static readonly Lazy _OnMoneySpentFailOffset = new(() => Schema.GetOffset(0xED17C684DB165FC0), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMoneySpentFail { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xED17C684DB165FC0)); + get => new CEntityIOOutputImpl(_Handle + _OnMoneySpentFailOffset.Value); } + private static readonly Lazy _MoneyOffset = new(() => Schema.GetOffset(0xED17C6845BE25D03), LazyThreadSafetyMode.None); + public ref int Money { - get => ref _Handle.AsRef(Schema.GetOffset(0xED17C6845BE25D03)); + get => ref _Handle.AsRef(_MoneyOffset.Value); } + private static readonly Lazy _StrAwardTextOffset = new(() => Schema.GetOffset(0xED17C684B48AB662), LazyThreadSafetyMode.None); + public string StrAwardText { get { - var ptr = _Handle.Read(Schema.GetOffset(0xED17C684B48AB662)); + var ptr = _Handle.Read(_StrAwardTextOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xED17C684B48AB662, value); + set => Schema.SetString(_Handle, _StrAwardTextOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGamePlayerEquipImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGamePlayerEquipImpl.cs index ba1bb9c48..1d1b20981 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGamePlayerEquipImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGamePlayerEquipImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGamePlayerZoneImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGamePlayerZoneImpl.cs index 34a227c1f..dd181b12a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGamePlayerZoneImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGamePlayerZoneImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CGamePlayerZoneImpl : CRuleBrushEntityImpl, CGamePlayerZo public CGamePlayerZoneImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnPlayerInZoneOffset = new(() => Schema.GetOffset(0x35811C97FBD22730), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPlayerInZone { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x35811C97FBD22730)); + get => new CEntityIOOutputImpl(_Handle + _OnPlayerInZoneOffset.Value); } + private static readonly Lazy _OnPlayerOutZoneOffset = new(() => Schema.GetOffset(0x35811C97E3DE880D), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPlayerOutZone { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x35811C97E3DE880D)); + get => new CEntityIOOutputImpl(_Handle + _OnPlayerOutZoneOffset.Value); } + private static readonly Lazy _PlayersInCountOffset = new(() => Schema.GetOffset(0x35811C9706A59501), LazyThreadSafetyMode.None); + public SchemaUntypedField PlayersInCount { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x35811C9706A59501)); + get => new SchemaUntypedField(_Handle + _PlayersInCountOffset.Value); } + private static readonly Lazy _PlayersOutCountOffset = new(() => Schema.GetOffset(0x35811C976894D862), LazyThreadSafetyMode.None); + public SchemaUntypedField PlayersOutCount { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x35811C976894D862)); + get => new SchemaUntypedField(_Handle + _PlayersOutCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameRulesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameRulesImpl.cs index d5d0f0ec6..53f055c00 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameRulesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameRulesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,27 +17,39 @@ internal partial class CGameRulesImpl : SchemaClass, CGameRules { public CGameRulesImpl(nint handle) : base(handle) { } + private static readonly Lazy ___m_pChainEntityOffset = new(() => Schema.GetOffset(0x4807DA77F63F0E7D), LazyThreadSafetyMode.None); + public ref CNetworkVarChainer __m_pChainEntity { - get => ref _Handle.AsRef(Schema.GetOffset(0x4807DA77F63F0E7D)); + get => ref _Handle.AsRef(___m_pChainEntityOffset.Value); } + private static readonly Lazy _QuestNameOffset = new(() => Schema.GetOffset(0x4807DA7748F621A1), LazyThreadSafetyMode.None); + public string QuestName { get { - var ptr = _Handle + Schema.GetOffset(0x4807DA7748F621A1); + var ptr = _Handle + _QuestNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x4807DA7748F621A1, value, 128); + set => Schema.SetFixedString(_Handle, _QuestNameOffset.Value, value, 128); } + private static readonly Lazy _QuestPhaseOffset = new(() => Schema.GetOffset(0x4807DA77335693EC), LazyThreadSafetyMode.None); + public ref int QuestPhase { - get => ref _Handle.AsRef(Schema.GetOffset(0x4807DA77335693EC)); + get => ref _Handle.AsRef(_QuestPhaseOffset.Value); } + private static readonly Lazy _TotalPausedTicksOffset = new(() => Schema.GetOffset(0x4807DA7723281397), LazyThreadSafetyMode.None); + public ref int TotalPausedTicks { - get => ref _Handle.AsRef(Schema.GetOffset(0x4807DA7723281397)); + get => ref _Handle.AsRef(_TotalPausedTicksOffset.Value); } + private static readonly Lazy _PauseStartTickOffset = new(() => Schema.GetOffset(0x4807DA77E64EC54A), LazyThreadSafetyMode.None); + public ref int PauseStartTick { - get => ref _Handle.AsRef(Schema.GetOffset(0x4807DA77E64EC54A)); + get => ref _Handle.AsRef(_PauseStartTickOffset.Value); } + private static readonly Lazy _GamePausedOffset = new(() => Schema.GetOffset(0x4807DA77582909A9), LazyThreadSafetyMode.None); + public ref bool GamePaused { - get => ref _Handle.AsRef(Schema.GetOffset(0x4807DA77582909A9)); + get => ref _Handle.AsRef(_GamePausedOffset.Value); } public void TotalPausedTicksUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameRulesProxyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameRulesProxyImpl.cs index 3c2811a2b..3eb95d467 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameRulesProxyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameRulesProxyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameSceneNodeHandleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameSceneNodeHandleImpl.cs index 65e46f5e4..09f4c9368 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameSceneNodeHandleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameSceneNodeHandleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CGameSceneNodeHandleImpl : SchemaClass, CGameSceneNodeHan public CGameSceneNodeHandleImpl(nint handle) : base(handle) { } + private static readonly Lazy _OwnerOffset = new(() => Schema.GetOffset(0x9A961FAF6D89572), LazyThreadSafetyMode.None); + public ref CHandle Owner { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9A961FAF6D89572)); + get => ref _Handle.AsRef>(_OwnerOffset.Value); } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x9A961FA4D8F5786), LazyThreadSafetyMode.None); + public ref CUtlStringToken Name { - get => ref _Handle.AsRef(Schema.GetOffset(0x9A961FA4D8F5786)); + get => ref _Handle.AsRef(_NameOffset.Value); } public void OwnerUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameSceneNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameSceneNodeImpl.cs index 3b9a4b5ec..32fb82c5b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameSceneNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameSceneNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,116 +17,182 @@ internal partial class CGameSceneNodeImpl : SchemaClass, CGameSceneNode { public CGameSceneNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _NodeToWorldOffset = new(() => Schema.GetOffset(0xD9451D94E9EB4068), LazyThreadSafetyMode.None); + public ref CTransform NodeToWorld { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9451D94E9EB4068)); + get => ref _Handle.AsRef(_NodeToWorldOffset.Value); } + private static readonly Lazy _OwnerOffset = new(() => Schema.GetOffset(0xD9451D9406B325DA), LazyThreadSafetyMode.None); + public CEntityInstance? Owner { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD9451D9406B325DA)); + var ptr = _Handle.Read(_OwnerOffset.Value); return ptr.IsValidPtr() ? new CEntityInstanceImpl(ptr) : null; } } + private static readonly Lazy _ParentOffset = new(() => Schema.GetOffset(0xD9451D94B89C7C3F), LazyThreadSafetyMode.None); + public CGameSceneNode? Parent { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD9451D94B89C7C3F)); + var ptr = _Handle.Read(_ParentOffset.Value); return ptr.IsValidPtr() ? new CGameSceneNodeImpl(ptr) : null; } } + private static readonly Lazy _ChildOffset = new(() => Schema.GetOffset(0xD9451D944A0B773F), LazyThreadSafetyMode.None); + public CGameSceneNode? Child { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD9451D944A0B773F)); + var ptr = _Handle.Read(_ChildOffset.Value); return ptr.IsValidPtr() ? new CGameSceneNodeImpl(ptr) : null; } } + private static readonly Lazy _NextSiblingOffset = new(() => Schema.GetOffset(0xD9451D9440E828FC), LazyThreadSafetyMode.None); + public CGameSceneNode? NextSibling { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD9451D9440E828FC)); + var ptr = _Handle.Read(_NextSiblingOffset.Value); return ptr.IsValidPtr() ? new CGameSceneNodeImpl(ptr) : null; } } + private static readonly Lazy _Parent1Offset = new(() => Schema.GetOffset(0xD9451D949FD3A1B7), LazyThreadSafetyMode.None); + public CGameSceneNodeHandle Parent1 { - get => new CGameSceneNodeHandleImpl(_Handle + Schema.GetOffset(0xD9451D949FD3A1B7)); + get => new CGameSceneNodeHandleImpl(_Handle + _Parent1Offset.Value); } + private static readonly Lazy _OriginOffset = new(() => Schema.GetOffset(0xD9451D94559D81AF), LazyThreadSafetyMode.None); + public CNetworkOriginCellCoordQuantizedVector Origin { - get => new CNetworkOriginCellCoordQuantizedVectorImpl(_Handle + Schema.GetOffset(0xD9451D94559D81AF)); + get => new CNetworkOriginCellCoordQuantizedVectorImpl(_Handle + _OriginOffset.Value); } + private static readonly Lazy _RotationOffset = new(() => Schema.GetOffset(0xD9451D945E8229ED), LazyThreadSafetyMode.None); + public ref QAngle Rotation { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9451D945E8229ED)); + get => ref _Handle.AsRef(_RotationOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0xD9451D94B731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9451D94B731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _AbsOriginOffset = new(() => Schema.GetOffset(0xD9451D94E8B4EAE5), LazyThreadSafetyMode.None); + public ref Vector AbsOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9451D94E8B4EAE5)); + get => ref _Handle.AsRef(_AbsOriginOffset.Value); } + private static readonly Lazy _AbsRotationOffset = new(() => Schema.GetOffset(0xD9451D94AE099497), LazyThreadSafetyMode.None); + public ref QAngle AbsRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9451D94AE099497)); + get => ref _Handle.AsRef(_AbsRotationOffset.Value); } + private static readonly Lazy _AbsScaleOffset = new(() => Schema.GetOffset(0xD9451D9480BD51E5), LazyThreadSafetyMode.None); + public ref float AbsScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9451D9480BD51E5)); + get => ref _Handle.AsRef(_AbsScaleOffset.Value); } + private static readonly Lazy _ParentAttachmentOrBoneOffset = new(() => Schema.GetOffset(0xD9451D943A5CD26B), LazyThreadSafetyMode.None); + public ref short ParentAttachmentOrBone { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9451D943A5CD26B)); + get => ref _Handle.AsRef(_ParentAttachmentOrBoneOffset.Value); } + private static readonly Lazy _DebugAbsOriginChangesOffset = new(() => Schema.GetOffset(0xD9451D94EE4CADE7), LazyThreadSafetyMode.None); + public ref bool DebugAbsOriginChanges { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9451D94EE4CADE7)); + get => ref _Handle.AsRef(_DebugAbsOriginChangesOffset.Value); } + private static readonly Lazy _DormantOffset = new(() => Schema.GetOffset(0xD9451D94F9373B5E), LazyThreadSafetyMode.None); + public ref bool Dormant { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9451D94F9373B5E)); + get => ref _Handle.AsRef(_DormantOffset.Value); } + private static readonly Lazy _ForceParentToBeNetworkedOffset = new(() => Schema.GetOffset(0xD9451D945A4F37E7), LazyThreadSafetyMode.None); + public ref bool ForceParentToBeNetworked { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9451D945A4F37E7)); + get => ref _Handle.AsRef(_ForceParentToBeNetworkedOffset.Value); } + private static readonly Lazy _DirtyHierarchyOffset = new(() => Schema.GetOffset(0xD9451D947012AE3E), LazyThreadSafetyMode.None); + public SchemaUntypedField DirtyHierarchy { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD9451D947012AE3E)); + get => new SchemaUntypedField(_Handle + _DirtyHierarchyOffset.Value); } + private static readonly Lazy _DirtyBoneMergeInfoOffset = new(() => Schema.GetOffset(0xD9451D94C0CDCFD7), LazyThreadSafetyMode.None); + public SchemaUntypedField DirtyBoneMergeInfo { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD9451D94C0CDCFD7)); + get => new SchemaUntypedField(_Handle + _DirtyBoneMergeInfoOffset.Value); } + private static readonly Lazy _NetworkedPositionChangedOffset = new(() => Schema.GetOffset(0xD9451D94CE9CD1FD), LazyThreadSafetyMode.None); + public SchemaUntypedField NetworkedPositionChanged { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD9451D94CE9CD1FD)); + get => new SchemaUntypedField(_Handle + _NetworkedPositionChangedOffset.Value); } + private static readonly Lazy _NetworkedAnglesChangedOffset = new(() => Schema.GetOffset(0xD9451D944D31E168), LazyThreadSafetyMode.None); + public SchemaUntypedField NetworkedAnglesChanged { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD9451D944D31E168)); + get => new SchemaUntypedField(_Handle + _NetworkedAnglesChangedOffset.Value); } + private static readonly Lazy _NetworkedScaleChangedOffset = new(() => Schema.GetOffset(0xD9451D94FBE9F8E2), LazyThreadSafetyMode.None); + public SchemaUntypedField NetworkedScaleChanged { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD9451D94FBE9F8E2)); + get => new SchemaUntypedField(_Handle + _NetworkedScaleChangedOffset.Value); } + private static readonly Lazy _WillBeCallingPostDataUpdateOffset = new(() => Schema.GetOffset(0xD9451D94352742F3), LazyThreadSafetyMode.None); + public SchemaUntypedField WillBeCallingPostDataUpdate { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD9451D94352742F3)); + get => new SchemaUntypedField(_Handle + _WillBeCallingPostDataUpdateOffset.Value); } + private static readonly Lazy _BoneMergeFlexOffset = new(() => Schema.GetOffset(0xD9451D948B6BC852), LazyThreadSafetyMode.None); + public SchemaUntypedField BoneMergeFlex { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD9451D948B6BC852)); + get => new SchemaUntypedField(_Handle + _BoneMergeFlexOffset.Value); } + private static readonly Lazy _LatchAbsOriginOffset = new(() => Schema.GetOffset(0xD9451D94BB41CC11), LazyThreadSafetyMode.None); + public SchemaUntypedField LatchAbsOrigin { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD9451D94BB41CC11)); + get => new SchemaUntypedField(_Handle + _LatchAbsOriginOffset.Value); } + private static readonly Lazy _DirtyBoneMergeBoneToRootOffset = new(() => Schema.GetOffset(0xD9451D9472001FC8), LazyThreadSafetyMode.None); + public SchemaUntypedField DirtyBoneMergeBoneToRoot { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD9451D9472001FC8)); + get => new SchemaUntypedField(_Handle + _DirtyBoneMergeBoneToRootOffset.Value); } + private static readonly Lazy _HierarchicalDepthOffset = new(() => Schema.GetOffset(0xD9451D94B7064305), LazyThreadSafetyMode.None); + public ref byte HierarchicalDepth { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9451D94B7064305)); + get => ref _Handle.AsRef(_HierarchicalDepthOffset.Value); } + private static readonly Lazy _HierarchyTypeOffset = new(() => Schema.GetOffset(0xD9451D941DDA2C7C), LazyThreadSafetyMode.None); + public ref byte HierarchyType { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9451D941DDA2C7C)); + get => ref _Handle.AsRef(_HierarchyTypeOffset.Value); } + private static readonly Lazy _DoNotSetAnimTimeInInvalidatePhysicsCountOffset = new(() => Schema.GetOffset(0xD9451D94B7293951), LazyThreadSafetyMode.None); + public ref byte DoNotSetAnimTimeInInvalidatePhysicsCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9451D94B7293951)); + get => ref _Handle.AsRef(_DoNotSetAnimTimeInInvalidatePhysicsCountOffset.Value); } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xD9451D944D8F5786), LazyThreadSafetyMode.None); + public ref CUtlStringToken Name { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9451D944D8F5786)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _HierarchyAttachNameOffset = new(() => Schema.GetOffset(0xD9451D9463D5B4EE), LazyThreadSafetyMode.None); + public ref CUtlStringToken HierarchyAttachName { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9451D9463D5B4EE)); + get => ref _Handle.AsRef(_HierarchyAttachNameOffset.Value); } + private static readonly Lazy _ZOffsetOffset = new(() => Schema.GetOffset(0xD9451D94BD4A8DF4), LazyThreadSafetyMode.None); + public ref float ZOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9451D94BD4A8DF4)); + get => ref _Handle.AsRef(_ZOffsetOffset.Value); } + private static readonly Lazy _ClientLocalScaleOffset = new(() => Schema.GetOffset(0xD9451D94957885D3), LazyThreadSafetyMode.None); + public ref float ClientLocalScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9451D94957885D3)); + get => ref _Handle.AsRef(_ClientLocalScaleOffset.Value); } + private static readonly Lazy _RenderOriginOffset = new(() => Schema.GetOffset(0xD9451D94A46385A3), LazyThreadSafetyMode.None); + public ref Vector RenderOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9451D94A46385A3)); + get => ref _Handle.AsRef(_RenderOriginOffset.Value); } public void Parent1Updated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameScriptedMoveDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameScriptedMoveDataImpl.cs index c3803583a..33774378c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameScriptedMoveDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameScriptedMoveDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,59 +17,95 @@ internal partial class CGameScriptedMoveDataImpl : SchemaClass, CGameScriptedMov public CGameScriptedMoveDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _AccumulatedRootMotionOffset = new(() => Schema.GetOffset(0x6F78B5E783C65B7B), LazyThreadSafetyMode.None); + public ref Vector AccumulatedRootMotion { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F78B5E783C65B7B)); + get => ref _Handle.AsRef(_AccumulatedRootMotionOffset.Value); } + private static readonly Lazy _AccumulatedRootMotionRotationOffset = new(() => Schema.GetOffset(0x6F78B5E750D6BEEB), LazyThreadSafetyMode.None); + public ref QAngle AccumulatedRootMotionRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F78B5E750D6BEEB)); + get => ref _Handle.AsRef(_AccumulatedRootMotionRotationOffset.Value); } + private static readonly Lazy _SrcOffset = new(() => Schema.GetOffset(0x6F78B5E74B186FB5), LazyThreadSafetyMode.None); + public ref Vector Src { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F78B5E74B186FB5)); + get => ref _Handle.AsRef(_SrcOffset.Value); } + private static readonly Lazy _Src1Offset = new(() => Schema.GetOffset(0x6F78B5E79E96F12F), LazyThreadSafetyMode.None); + public ref QAngle Src1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F78B5E79E96F12F)); + get => ref _Handle.AsRef(_Src1Offset.Value); } + private static readonly Lazy _CurrentOffset = new(() => Schema.GetOffset(0x6F78B5E72FDA50BC), LazyThreadSafetyMode.None); + public ref QAngle Current { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F78B5E72FDA50BC)); + get => ref _Handle.AsRef(_CurrentOffset.Value); } + private static readonly Lazy _LockedSpeedOffset = new(() => Schema.GetOffset(0x6F78B5E71AD453B4), LazyThreadSafetyMode.None); + public ref float LockedSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F78B5E71AD453B4)); + get => ref _Handle.AsRef(_LockedSpeedOffset.Value); } + private static readonly Lazy _AngRateOffset = new(() => Schema.GetOffset(0x6F78B5E725A03D83), LazyThreadSafetyMode.None); + public ref float AngRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F78B5E725A03D83)); + get => ref _Handle.AsRef(_AngRateOffset.Value); } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0x6F78B5E7BC5E3BAB), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F78B5E7BC5E3BAB)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0x6F78B5E767FE9DC4), LazyThreadSafetyMode.None); + public GameTime_t StartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x6F78B5E767FE9DC4)); + get => new GameTime_tImpl(_Handle + _StartTimeOffset.Value); } + private static readonly Lazy _ActiveOffset = new(() => Schema.GetOffset(0x6F78B5E78334208F), LazyThreadSafetyMode.None); + public ref bool Active { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F78B5E78334208F)); + get => ref _Handle.AsRef(_ActiveOffset.Value); } + private static readonly Lazy _TeleportOnEndOffset = new(() => Schema.GetOffset(0x6F78B5E74CE07264), LazyThreadSafetyMode.None); + public ref bool TeleportOnEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F78B5E74CE07264)); + get => ref _Handle.AsRef(_TeleportOnEndOffset.Value); } + private static readonly Lazy _IgnoreRotationOffset = new(() => Schema.GetOffset(0x6F78B5E7C7A0F33D), LazyThreadSafetyMode.None); + public ref bool IgnoreRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F78B5E7C7A0F33D)); + get => ref _Handle.AsRef(_IgnoreRotationOffset.Value); } + private static readonly Lazy _SuccessOffset = new(() => Schema.GetOffset(0x6F78B5E7BDD1AFF0), LazyThreadSafetyMode.None); + public ref bool Success { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F78B5E7BDD1AFF0)); + get => ref _Handle.AsRef(_SuccessOffset.Value); } + private static readonly Lazy _ForcedCrouchStateOffset = new(() => Schema.GetOffset(0x6F78B5E771B1ABC7), LazyThreadSafetyMode.None); + public ref ForcedCrouchState_t ForcedCrouchState { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F78B5E771B1ABC7)); + get => ref _Handle.AsRef(_ForcedCrouchStateOffset.Value); } + private static readonly Lazy _IgnoreCollisionsOffset = new(() => Schema.GetOffset(0x6F78B5E7B31AABC2), LazyThreadSafetyMode.None); + public ref bool IgnoreCollisions { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F78B5E7B31AABC2)); + get => ref _Handle.AsRef(_IgnoreCollisionsOffset.Value); } + private static readonly Lazy _DestOffset = new(() => Schema.GetOffset(0x6F78B5E784257371), LazyThreadSafetyMode.None); + public ref Vector Dest { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F78B5E784257371)); + get => ref _Handle.AsRef(_DestOffset.Value); } + private static readonly Lazy _DstOffset = new(() => Schema.GetOffset(0x6F78B5E7535FD052), LazyThreadSafetyMode.None); + public ref QAngle Dst { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F78B5E7535FD052)); + get => ref _Handle.AsRef(_DstOffset.Value); } + private static readonly Lazy _DestEntityOffset = new(() => Schema.GetOffset(0x6F78B5E7A1CF74EC), LazyThreadSafetyMode.None); + public ref CHandle DestEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6F78B5E7A1CF74EC)); + get => ref _Handle.AsRef>(_DestEntityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameScriptedMoveDef_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameScriptedMoveDef_tImpl.cs index f28353d45..2888ce78d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameScriptedMoveDef_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameScriptedMoveDef_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class CGameScriptedMoveDef_tImpl : SchemaClass, CGameScriptedMo public CGameScriptedMoveDef_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _DestOffsetOffset = new(() => Schema.GetOffset(0x278F5D457DA34A6E), LazyThreadSafetyMode.None); + public ref Vector DestOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x278F5D457DA34A6E)); + get => ref _Handle.AsRef(_DestOffsetOffset.Value); } + private static readonly Lazy _DestEntityOffset = new(() => Schema.GetOffset(0x278F5D45A1CF74EC), LazyThreadSafetyMode.None); + public ref CHandle DestEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x278F5D45A1CF74EC)); + get => ref _Handle.AsRef>(_DestEntityOffset.Value); } + private static readonly Lazy _DestOffset = new(() => Schema.GetOffset(0x278F5D45B61266D7), LazyThreadSafetyMode.None); + public ref QAngle Dest { - get => ref _Handle.AsRef(Schema.GetOffset(0x278F5D45B61266D7)); + get => ref _Handle.AsRef(_DestOffset.Value); } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0x278F5D45BC5E3BAB), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0x278F5D45BC5E3BAB)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _AngRateOffset = new(() => Schema.GetOffset(0x278F5D4525A03D83), LazyThreadSafetyMode.None); + public ref float AngRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x278F5D4525A03D83)); + get => ref _Handle.AsRef(_AngRateOffset.Value); } + private static readonly Lazy _MoveSpeedOffset = new(() => Schema.GetOffset(0x278F5D4566D18279), LazyThreadSafetyMode.None); + public ref float MoveSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x278F5D4566D18279)); + get => ref _Handle.AsRef(_MoveSpeedOffset.Value); } + private static readonly Lazy _AimDisabledOffset = new(() => Schema.GetOffset(0x278F5D457E2FBF2E), LazyThreadSafetyMode.None); + public ref bool AimDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x278F5D457E2FBF2E)); + get => ref _Handle.AsRef(_AimDisabledOffset.Value); } + private static readonly Lazy _IgnoreRotationOffset = new(() => Schema.GetOffset(0x278F5D45C7A0F33D), LazyThreadSafetyMode.None); + public ref bool IgnoreRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0x278F5D45C7A0F33D)); + get => ref _Handle.AsRef(_IgnoreRotationOffset.Value); } + private static readonly Lazy _ForcedCrouchStateOffset = new(() => Schema.GetOffset(0x278F5D4571B1ABC7), LazyThreadSafetyMode.None); + public ref ForcedCrouchState_t ForcedCrouchState { - get => ref _Handle.AsRef(Schema.GetOffset(0x278F5D4571B1ABC7)); + get => ref _Handle.AsRef(_ForcedCrouchStateOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameTextImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameTextImpl.cs index 4b391477b..dc9a0e652 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameTextImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGameTextImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CGameTextImpl : CRulePointEntityImpl, CGameText { public CGameTextImpl(nint handle) : base(handle) { } + private static readonly Lazy _MessageOffset = new(() => Schema.GetOffset(0x8AF55797CC5243DC), LazyThreadSafetyMode.None); + public string Message { get { - var ptr = _Handle.Read(Schema.GetOffset(0x8AF55797CC5243DC)); + var ptr = _Handle.Read(_MessageOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x8AF55797CC5243DC, value); + set => Schema.SetString(_Handle, _MessageOffset.Value, value); } + private static readonly Lazy _TextParmsOffset = new(() => Schema.GetOffset(0x8AF5579715FCA35D), LazyThreadSafetyMode.None); + public hudtextparms_t TextParms { - get => new hudtextparms_tImpl(_Handle + Schema.GetOffset(0x8AF5579715FCA35D)); + get => new hudtextparms_tImpl(_Handle + _TextParmsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGeneralRandomRotationImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGeneralRandomRotationImpl.cs index 061a0f2b3..8a3341d84 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGeneralRandomRotationImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGeneralRandomRotationImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CGeneralRandomRotationImpl : CParticleFunctionInitializer public CGeneralRandomRotationImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xB15F344FE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xB15F344FE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _DegreesOffset = new(() => Schema.GetOffset(0xB15F344FB2A877A0), LazyThreadSafetyMode.None); + public ref float Degrees { - get => ref _Handle.AsRef(Schema.GetOffset(0xB15F344FB2A877A0)); + get => ref _Handle.AsRef(_DegreesOffset.Value); } + private static readonly Lazy _DegreesMinOffset = new(() => Schema.GetOffset(0xB15F344F6D22DDDC), LazyThreadSafetyMode.None); + public ref float DegreesMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xB15F344F6D22DDDC)); + get => ref _Handle.AsRef(_DegreesMinOffset.Value); } + private static readonly Lazy _DegreesMaxOffset = new(() => Schema.GetOffset(0xB15F344F5B0F39CE), LazyThreadSafetyMode.None); + public ref float DegreesMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xB15F344F5B0F39CE)); + get => ref _Handle.AsRef(_DegreesMaxOffset.Value); } + private static readonly Lazy _RotationRandExponentOffset = new(() => Schema.GetOffset(0xB15F344F348610D5), LazyThreadSafetyMode.None); + public ref float RotationRandExponent { - get => ref _Handle.AsRef(Schema.GetOffset(0xB15F344F348610D5)); + get => ref _Handle.AsRef(_RotationRandExponentOffset.Value); } + private static readonly Lazy _RandomlyFlipDirectionOffset = new(() => Schema.GetOffset(0xB15F344F26D0F2EF), LazyThreadSafetyMode.None); + public ref bool RandomlyFlipDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0xB15F344F26D0F2EF)); + get => ref _Handle.AsRef(_RandomlyFlipDirectionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGeneralSpinImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGeneralSpinImpl.cs index 4378192f3..cbd1bad1c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGeneralSpinImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGeneralSpinImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CGeneralSpinImpl : CParticleFunctionOperatorImpl, CGenera public CGeneralSpinImpl(nint handle) : base(handle) { } + private static readonly Lazy _SpinRateDegreesOffset = new(() => Schema.GetOffset(0xFC0422E2BF9AC820), LazyThreadSafetyMode.None); + public ref int SpinRateDegrees { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC0422E2BF9AC820)); + get => ref _Handle.AsRef(_SpinRateDegreesOffset.Value); } + private static readonly Lazy _SpinRateMinDegreesOffset = new(() => Schema.GetOffset(0xFC0422E2F3639852), LazyThreadSafetyMode.None); + public ref int SpinRateMinDegrees { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC0422E2F3639852)); + get => ref _Handle.AsRef(_SpinRateMinDegreesOffset.Value); } + private static readonly Lazy _SpinRateStopTimeOffset = new(() => Schema.GetOffset(0xFC0422E28365AFDE), LazyThreadSafetyMode.None); + public ref float SpinRateStopTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC0422E28365AFDE)); + get => ref _Handle.AsRef(_SpinRateStopTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGenericConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGenericConstraintImpl.cs index 1ab3adc3c..2c74aad65 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGenericConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGenericConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,149 +17,245 @@ internal partial class CGenericConstraintImpl : CPhysConstraintImpl, CGenericCon public CGenericConstraintImpl(nint handle) : base(handle) { } + private static readonly Lazy _LinearMotionXOffset = new(() => Schema.GetOffset(0x1698284879962AA2), LazyThreadSafetyMode.None); + public ref JointMotion_t LinearMotionX { - get => ref _Handle.AsRef(Schema.GetOffset(0x1698284879962AA2)); + get => ref _Handle.AsRef(_LinearMotionXOffset.Value); } + private static readonly Lazy _LinearMotionYOffset = new(() => Schema.GetOffset(0x169828487A962C35), LazyThreadSafetyMode.None); + public ref JointMotion_t LinearMotionY { - get => ref _Handle.AsRef(Schema.GetOffset(0x169828487A962C35)); + get => ref _Handle.AsRef(_LinearMotionYOffset.Value); } + private static readonly Lazy _LinearMotionZOffset = new(() => Schema.GetOffset(0x169828487796277C), LazyThreadSafetyMode.None); + public ref JointMotion_t LinearMotionZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x169828487796277C)); + get => ref _Handle.AsRef(_LinearMotionZOffset.Value); } + private static readonly Lazy _LinearFrequencyXOffset = new(() => Schema.GetOffset(0x16982848D427BA04), LazyThreadSafetyMode.None); + public ref float LinearFrequencyX { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848D427BA04)); + get => ref _Handle.AsRef(_LinearFrequencyXOffset.Value); } + private static readonly Lazy _LinearFrequencyYOffset = new(() => Schema.GetOffset(0x16982848D527BB97), LazyThreadSafetyMode.None); + public ref float LinearFrequencyY { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848D527BB97)); + get => ref _Handle.AsRef(_LinearFrequencyYOffset.Value); } + private static readonly Lazy _LinearFrequencyZOffset = new(() => Schema.GetOffset(0x16982848D627BD2A), LazyThreadSafetyMode.None); + public ref float LinearFrequencyZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848D627BD2A)); + get => ref _Handle.AsRef(_LinearFrequencyZOffset.Value); } + private static readonly Lazy _LinearDampingRatioXOffset = new(() => Schema.GetOffset(0x16982848075BA1D5), LazyThreadSafetyMode.None); + public ref float LinearDampingRatioX { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848075BA1D5)); + get => ref _Handle.AsRef(_LinearDampingRatioXOffset.Value); } + private static readonly Lazy _LinearDampingRatioYOffset = new(() => Schema.GetOffset(0x16982848065BA042), LazyThreadSafetyMode.None); + public ref float LinearDampingRatioY { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848065BA042)); + get => ref _Handle.AsRef(_LinearDampingRatioYOffset.Value); } + private static readonly Lazy _LinearDampingRatioZOffset = new(() => Schema.GetOffset(0x16982848055B9EAF), LazyThreadSafetyMode.None); + public ref float LinearDampingRatioZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848055B9EAF)); + get => ref _Handle.AsRef(_LinearDampingRatioZOffset.Value); } + private static readonly Lazy _MaxLinearImpulseXOffset = new(() => Schema.GetOffset(0x16982848DA6330BF), LazyThreadSafetyMode.None); + public ref float MaxLinearImpulseX { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848DA6330BF)); + get => ref _Handle.AsRef(_MaxLinearImpulseXOffset.Value); } + private static readonly Lazy _MaxLinearImpulseYOffset = new(() => Schema.GetOffset(0x16982848D9632F2C), LazyThreadSafetyMode.None); + public ref float MaxLinearImpulseY { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848D9632F2C)); + get => ref _Handle.AsRef(_MaxLinearImpulseYOffset.Value); } + private static readonly Lazy _MaxLinearImpulseZOffset = new(() => Schema.GetOffset(0x16982848DC6333E5), LazyThreadSafetyMode.None); + public ref float MaxLinearImpulseZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848DC6333E5)); + get => ref _Handle.AsRef(_MaxLinearImpulseZOffset.Value); } + private static readonly Lazy _BreakAfterTimeXOffset = new(() => Schema.GetOffset(0x16982848D1BE25CB), LazyThreadSafetyMode.None); + public ref float BreakAfterTimeX { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848D1BE25CB)); + get => ref _Handle.AsRef(_BreakAfterTimeXOffset.Value); } + private static readonly Lazy _BreakAfterTimeYOffset = new(() => Schema.GetOffset(0x16982848D0BE2438), LazyThreadSafetyMode.None); + public ref float BreakAfterTimeY { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848D0BE2438)); + get => ref _Handle.AsRef(_BreakAfterTimeYOffset.Value); } + private static readonly Lazy _BreakAfterTimeZOffset = new(() => Schema.GetOffset(0x16982848D3BE28F1), LazyThreadSafetyMode.None); + public ref float BreakAfterTimeZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848D3BE28F1)); + get => ref _Handle.AsRef(_BreakAfterTimeZOffset.Value); } + private static readonly Lazy _BreakAfterTimeStartTimeXOffset = new(() => Schema.GetOffset(0x169828480B0683A6), LazyThreadSafetyMode.None); + public GameTime_t BreakAfterTimeStartTimeX { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x169828480B0683A6)); + get => new GameTime_tImpl(_Handle + _BreakAfterTimeStartTimeXOffset.Value); } + private static readonly Lazy _BreakAfterTimeStartTimeYOffset = new(() => Schema.GetOffset(0x169828480C068539), LazyThreadSafetyMode.None); + public GameTime_t BreakAfterTimeStartTimeY { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x169828480C068539)); + get => new GameTime_tImpl(_Handle + _BreakAfterTimeStartTimeYOffset.Value); } + private static readonly Lazy _BreakAfterTimeStartTimeZOffset = new(() => Schema.GetOffset(0x1698284809068080), LazyThreadSafetyMode.None); + public GameTime_t BreakAfterTimeStartTimeZ { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1698284809068080)); + get => new GameTime_tImpl(_Handle + _BreakAfterTimeStartTimeZOffset.Value); } + private static readonly Lazy _BreakAfterTimeThresholdXOffset = new(() => Schema.GetOffset(0x16982848EA81B5D4), LazyThreadSafetyMode.None); + public ref float BreakAfterTimeThresholdX { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848EA81B5D4)); + get => ref _Handle.AsRef(_BreakAfterTimeThresholdXOffset.Value); } + private static readonly Lazy _BreakAfterTimeThresholdYOffset = new(() => Schema.GetOffset(0x16982848EB81B767), LazyThreadSafetyMode.None); + public ref float BreakAfterTimeThresholdY { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848EB81B767)); + get => ref _Handle.AsRef(_BreakAfterTimeThresholdYOffset.Value); } + private static readonly Lazy _BreakAfterTimeThresholdZOffset = new(() => Schema.GetOffset(0x16982848EC81B8FA), LazyThreadSafetyMode.None); + public ref float BreakAfterTimeThresholdZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848EC81B8FA)); + get => ref _Handle.AsRef(_BreakAfterTimeThresholdZOffset.Value); } + private static readonly Lazy _NotifyForceXOffset = new(() => Schema.GetOffset(0x1698284842CA87EB), LazyThreadSafetyMode.None); + public ref float NotifyForceX { - get => ref _Handle.AsRef(Schema.GetOffset(0x1698284842CA87EB)); + get => ref _Handle.AsRef(_NotifyForceXOffset.Value); } + private static readonly Lazy _NotifyForceYOffset = new(() => Schema.GetOffset(0x1698284841CA8658), LazyThreadSafetyMode.None); + public ref float NotifyForceY { - get => ref _Handle.AsRef(Schema.GetOffset(0x1698284841CA8658)); + get => ref _Handle.AsRef(_NotifyForceYOffset.Value); } + private static readonly Lazy _NotifyForceZOffset = new(() => Schema.GetOffset(0x1698284844CA8B11), LazyThreadSafetyMode.None); + public ref float NotifyForceZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x1698284844CA8B11)); + get => ref _Handle.AsRef(_NotifyForceZOffset.Value); } + private static readonly Lazy _NotifyForceMinTimeXOffset = new(() => Schema.GetOffset(0x169828482CB94C2E), LazyThreadSafetyMode.None); + public ref float NotifyForceMinTimeX { - get => ref _Handle.AsRef(Schema.GetOffset(0x169828482CB94C2E)); + get => ref _Handle.AsRef(_NotifyForceMinTimeXOffset.Value); } + private static readonly Lazy _NotifyForceMinTimeYOffset = new(() => Schema.GetOffset(0x169828482DB94DC1), LazyThreadSafetyMode.None); + public ref float NotifyForceMinTimeY { - get => ref _Handle.AsRef(Schema.GetOffset(0x169828482DB94DC1)); + get => ref _Handle.AsRef(_NotifyForceMinTimeYOffset.Value); } + private static readonly Lazy _NotifyForceMinTimeZOffset = new(() => Schema.GetOffset(0x169828482AB94908), LazyThreadSafetyMode.None); + public ref float NotifyForceMinTimeZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x169828482AB94908)); + get => ref _Handle.AsRef(_NotifyForceMinTimeZOffset.Value); } + private static readonly Lazy _NotifyForceLastTimeXOffset = new(() => Schema.GetOffset(0x169828485B7371B4), LazyThreadSafetyMode.None); + public GameTime_t NotifyForceLastTimeX { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x169828485B7371B4)); + get => new GameTime_tImpl(_Handle + _NotifyForceLastTimeXOffset.Value); } + private static readonly Lazy _NotifyForceLastTimeYOffset = new(() => Schema.GetOffset(0x169828485C737347), LazyThreadSafetyMode.None); + public GameTime_t NotifyForceLastTimeY { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x169828485C737347)); + get => new GameTime_tImpl(_Handle + _NotifyForceLastTimeYOffset.Value); } + private static readonly Lazy _NotifyForceLastTimeZOffset = new(() => Schema.GetOffset(0x169828485D7374DA), LazyThreadSafetyMode.None); + public GameTime_t NotifyForceLastTimeZ { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x169828485D7374DA)); + get => new GameTime_tImpl(_Handle + _NotifyForceLastTimeZOffset.Value); } + private static readonly Lazy _AxisNotifiedXOffset = new(() => Schema.GetOffset(0x169828483F5088F4), LazyThreadSafetyMode.None); + public ref bool AxisNotifiedX { - get => ref _Handle.AsRef(Schema.GetOffset(0x169828483F5088F4)); + get => ref _Handle.AsRef(_AxisNotifiedXOffset.Value); } + private static readonly Lazy _AxisNotifiedYOffset = new(() => Schema.GetOffset(0x1698284840508A87), LazyThreadSafetyMode.None); + public ref bool AxisNotifiedY { - get => ref _Handle.AsRef(Schema.GetOffset(0x1698284840508A87)); + get => ref _Handle.AsRef(_AxisNotifiedYOffset.Value); } + private static readonly Lazy _AxisNotifiedZOffset = new(() => Schema.GetOffset(0x1698284841508C1A), LazyThreadSafetyMode.None); + public ref bool AxisNotifiedZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x1698284841508C1A)); + get => ref _Handle.AsRef(_AxisNotifiedZOffset.Value); } + private static readonly Lazy _AngularMotionXOffset = new(() => Schema.GetOffset(0x16982848F5DC3335), LazyThreadSafetyMode.None); + public ref JointMotion_t AngularMotionX { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848F5DC3335)); + get => ref _Handle.AsRef(_AngularMotionXOffset.Value); } + private static readonly Lazy _AngularMotionYOffset = new(() => Schema.GetOffset(0x16982848F4DC31A2), LazyThreadSafetyMode.None); + public ref JointMotion_t AngularMotionY { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848F4DC31A2)); + get => ref _Handle.AsRef(_AngularMotionYOffset.Value); } + private static readonly Lazy _AngularMotionZOffset = new(() => Schema.GetOffset(0x16982848F3DC300F), LazyThreadSafetyMode.None); + public ref JointMotion_t AngularMotionZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848F3DC300F)); + get => ref _Handle.AsRef(_AngularMotionZOffset.Value); } + private static readonly Lazy _AngularFrequencyXOffset = new(() => Schema.GetOffset(0x1698284874F93B19), LazyThreadSafetyMode.None); + public ref float AngularFrequencyX { - get => ref _Handle.AsRef(Schema.GetOffset(0x1698284874F93B19)); + get => ref _Handle.AsRef(_AngularFrequencyXOffset.Value); } + private static readonly Lazy _AngularFrequencyYOffset = new(() => Schema.GetOffset(0x1698284873F93986), LazyThreadSafetyMode.None); + public ref float AngularFrequencyY { - get => ref _Handle.AsRef(Schema.GetOffset(0x1698284873F93986)); + get => ref _Handle.AsRef(_AngularFrequencyYOffset.Value); } + private static readonly Lazy _AngularFrequencyZOffset = new(() => Schema.GetOffset(0x1698284872F937F3), LazyThreadSafetyMode.None); + public ref float AngularFrequencyZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x1698284872F937F3)); + get => ref _Handle.AsRef(_AngularFrequencyZOffset.Value); } + private static readonly Lazy _AngularDampingRatioXOffset = new(() => Schema.GetOffset(0x169828486B71C0CE), LazyThreadSafetyMode.None); + public ref float AngularDampingRatioX { - get => ref _Handle.AsRef(Schema.GetOffset(0x169828486B71C0CE)); + get => ref _Handle.AsRef(_AngularDampingRatioXOffset.Value); } + private static readonly Lazy _AngularDampingRatioYOffset = new(() => Schema.GetOffset(0x169828486C71C261), LazyThreadSafetyMode.None); + public ref float AngularDampingRatioY { - get => ref _Handle.AsRef(Schema.GetOffset(0x169828486C71C261)); + get => ref _Handle.AsRef(_AngularDampingRatioYOffset.Value); } + private static readonly Lazy _AngularDampingRatioZOffset = new(() => Schema.GetOffset(0x169828486971BDA8), LazyThreadSafetyMode.None); + public ref float AngularDampingRatioZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x169828486971BDA8)); + get => ref _Handle.AsRef(_AngularDampingRatioZOffset.Value); } + private static readonly Lazy _MaxAngularImpulseXOffset = new(() => Schema.GetOffset(0x169828489B259BC6), LazyThreadSafetyMode.None); + public ref float MaxAngularImpulseX { - get => ref _Handle.AsRef(Schema.GetOffset(0x169828489B259BC6)); + get => ref _Handle.AsRef(_MaxAngularImpulseXOffset.Value); } + private static readonly Lazy _MaxAngularImpulseYOffset = new(() => Schema.GetOffset(0x169828489C259D59), LazyThreadSafetyMode.None); + public ref float MaxAngularImpulseY { - get => ref _Handle.AsRef(Schema.GetOffset(0x169828489C259D59)); + get => ref _Handle.AsRef(_MaxAngularImpulseYOffset.Value); } + private static readonly Lazy _MaxAngularImpulseZOffset = new(() => Schema.GetOffset(0x16982848992598A0), LazyThreadSafetyMode.None); + public ref float MaxAngularImpulseZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x16982848992598A0)); + get => ref _Handle.AsRef(_MaxAngularImpulseZOffset.Value); } + private static readonly Lazy _NotifyForceReachedXOffset = new(() => Schema.GetOffset(0x169828486707AE55), LazyThreadSafetyMode.None); + public CEntityIOOutput NotifyForceReachedX { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x169828486707AE55)); + get => new CEntityIOOutputImpl(_Handle + _NotifyForceReachedXOffset.Value); } + private static readonly Lazy _NotifyForceReachedYOffset = new(() => Schema.GetOffset(0x169828486607ACC2), LazyThreadSafetyMode.None); + public CEntityIOOutput NotifyForceReachedY { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x169828486607ACC2)); + get => new CEntityIOOutputImpl(_Handle + _NotifyForceReachedYOffset.Value); } + private static readonly Lazy _NotifyForceReachedZOffset = new(() => Schema.GetOffset(0x169828486507AB2F), LazyThreadSafetyMode.None); + public CEntityIOOutput NotifyForceReachedZ { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x169828486507AB2F)); + get => new CEntityIOOutputImpl(_Handle + _NotifyForceReachedZOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGlowPropertyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGlowPropertyImpl.cs index cc1b8ddd2..c73656e40 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGlowPropertyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGlowPropertyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class CGlowPropertyImpl : SchemaClass, CGlowProperty { public CGlowPropertyImpl(nint handle) : base(handle) { } + private static readonly Lazy _GlowColorOffset = new(() => Schema.GetOffset(0x3ABE6F3E15CEA997), LazyThreadSafetyMode.None); + public ref Vector GlowColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x3ABE6F3E15CEA997)); + get => ref _Handle.AsRef(_GlowColorOffset.Value); } + private static readonly Lazy _GlowTypeOffset = new(() => Schema.GetOffset(0x3ABE6F3E0600E8DD), LazyThreadSafetyMode.None); + public ref int GlowType { - get => ref _Handle.AsRef(Schema.GetOffset(0x3ABE6F3E0600E8DD)); + get => ref _Handle.AsRef(_GlowTypeOffset.Value); } + private static readonly Lazy _GlowTeamOffset = new(() => Schema.GetOffset(0x3ABE6F3E34FAFCDC), LazyThreadSafetyMode.None); + public ref int GlowTeam { - get => ref _Handle.AsRef(Schema.GetOffset(0x3ABE6F3E34FAFCDC)); + get => ref _Handle.AsRef(_GlowTeamOffset.Value); } + private static readonly Lazy _GlowRangeOffset = new(() => Schema.GetOffset(0x3ABE6F3ED03F97ED), LazyThreadSafetyMode.None); + public ref int GlowRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x3ABE6F3ED03F97ED)); + get => ref _Handle.AsRef(_GlowRangeOffset.Value); } + private static readonly Lazy _GlowRangeMinOffset = new(() => Schema.GetOffset(0x3ABE6F3EA28EDB1F), LazyThreadSafetyMode.None); + public ref int GlowRangeMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x3ABE6F3EA28EDB1F)); + get => ref _Handle.AsRef(_GlowRangeMinOffset.Value); } + private static readonly Lazy _GlowColorOverrideOffset = new(() => Schema.GetOffset(0x3ABE6F3E50C6E26B), LazyThreadSafetyMode.None); + public ref Color GlowColorOverride { - get => ref _Handle.AsRef(Schema.GetOffset(0x3ABE6F3E50C6E26B)); + get => ref _Handle.AsRef(_GlowColorOverrideOffset.Value); } + private static readonly Lazy _FlashingOffset = new(() => Schema.GetOffset(0x3ABE6F3EB646AC57), LazyThreadSafetyMode.None); + public ref bool Flashing { - get => ref _Handle.AsRef(Schema.GetOffset(0x3ABE6F3EB646AC57)); + get => ref _Handle.AsRef(_FlashingOffset.Value); } + private static readonly Lazy _GlowTimeOffset = new(() => Schema.GetOffset(0x3ABE6F3E11622DBB), LazyThreadSafetyMode.None); + public ref float GlowTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x3ABE6F3E11622DBB)); + get => ref _Handle.AsRef(_GlowTimeOffset.Value); } + private static readonly Lazy _GlowStartTimeOffset = new(() => Schema.GetOffset(0x3ABE6F3E411532C3), LazyThreadSafetyMode.None); + public ref float GlowStartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x3ABE6F3E411532C3)); + get => ref _Handle.AsRef(_GlowStartTimeOffset.Value); } + private static readonly Lazy _EligibleForScreenHighlightOffset = new(() => Schema.GetOffset(0x3ABE6F3E23B89FB9), LazyThreadSafetyMode.None); + public ref bool EligibleForScreenHighlight { - get => ref _Handle.AsRef(Schema.GetOffset(0x3ABE6F3E23B89FB9)); + get => ref _Handle.AsRef(_EligibleForScreenHighlightOffset.Value); } + private static readonly Lazy _GlowingOffset = new(() => Schema.GetOffset(0x3ABE6F3E3DEA07DC), LazyThreadSafetyMode.None); + public ref bool Glowing { - get => ref _Handle.AsRef(Schema.GetOffset(0x3ABE6F3E3DEA07DC)); + get => ref _Handle.AsRef(_GlowingOffset.Value); } public void GlowTypeUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGradientFogImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGradientFogImpl.cs index 30eb518da..edbee8299 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGradientFogImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGradientFogImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,53 +17,85 @@ internal partial class CGradientFogImpl : CBaseEntityImpl, CGradientFog { public CGradientFogImpl(nint handle) : base(handle) { } + private static readonly Lazy _GradientFogTextureOffset = new(() => Schema.GetOffset(0x978D360E547F825C), LazyThreadSafetyMode.None); + public ref CStrongHandle GradientFogTexture { - get => ref _Handle.AsRef>(Schema.GetOffset(0x978D360E547F825C)); + get => ref _Handle.AsRef>(_GradientFogTextureOffset.Value); } + private static readonly Lazy _FogStartDistanceOffset = new(() => Schema.GetOffset(0x978D360E4B5A1DBC), LazyThreadSafetyMode.None); + public ref float FogStartDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x978D360E4B5A1DBC)); + get => ref _Handle.AsRef(_FogStartDistanceOffset.Value); } + private static readonly Lazy _FogEndDistanceOffset = new(() => Schema.GetOffset(0x978D360E27F71D5D), LazyThreadSafetyMode.None); + public ref float FogEndDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x978D360E27F71D5D)); + get => ref _Handle.AsRef(_FogEndDistanceOffset.Value); } + private static readonly Lazy _HeightFogEnabledOffset = new(() => Schema.GetOffset(0x978D360EFB7ED9F7), LazyThreadSafetyMode.None); + public ref bool HeightFogEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x978D360EFB7ED9F7)); + get => ref _Handle.AsRef(_HeightFogEnabledOffset.Value); } + private static readonly Lazy _FogStartHeightOffset = new(() => Schema.GetOffset(0x978D360E34EA384C), LazyThreadSafetyMode.None); + public ref float FogStartHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x978D360E34EA384C)); + get => ref _Handle.AsRef(_FogStartHeightOffset.Value); } + private static readonly Lazy _FogEndHeightOffset = new(() => Schema.GetOffset(0x978D360E6644141D), LazyThreadSafetyMode.None); + public ref float FogEndHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x978D360E6644141D)); + get => ref _Handle.AsRef(_FogEndHeightOffset.Value); } + private static readonly Lazy _FarZOffset = new(() => Schema.GetOffset(0x978D360E38F5E41A), LazyThreadSafetyMode.None); + public ref float FarZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x978D360E38F5E41A)); + get => ref _Handle.AsRef(_FarZOffset.Value); } + private static readonly Lazy _FogMaxOpacityOffset = new(() => Schema.GetOffset(0x978D360E7BF7FD56), LazyThreadSafetyMode.None); + public ref float FogMaxOpacity { - get => ref _Handle.AsRef(Schema.GetOffset(0x978D360E7BF7FD56)); + get => ref _Handle.AsRef(_FogMaxOpacityOffset.Value); } + private static readonly Lazy _FogFalloffExponentOffset = new(() => Schema.GetOffset(0x978D360E2068A39A), LazyThreadSafetyMode.None); + public ref float FogFalloffExponent { - get => ref _Handle.AsRef(Schema.GetOffset(0x978D360E2068A39A)); + get => ref _Handle.AsRef(_FogFalloffExponentOffset.Value); } + private static readonly Lazy _FogVerticalExponentOffset = new(() => Schema.GetOffset(0x978D360EBBE3E0C4), LazyThreadSafetyMode.None); + public ref float FogVerticalExponent { - get => ref _Handle.AsRef(Schema.GetOffset(0x978D360EBBE3E0C4)); + get => ref _Handle.AsRef(_FogVerticalExponentOffset.Value); } + private static readonly Lazy _FogColorOffset = new(() => Schema.GetOffset(0x978D360E200EEE0E), LazyThreadSafetyMode.None); + public ref Color FogColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x978D360E200EEE0E)); + get => ref _Handle.AsRef(_FogColorOffset.Value); } + private static readonly Lazy _FogStrengthOffset = new(() => Schema.GetOffset(0x978D360E2DCA8F14), LazyThreadSafetyMode.None); + public ref float FogStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x978D360E2DCA8F14)); + get => ref _Handle.AsRef(_FogStrengthOffset.Value); } + private static readonly Lazy _FadeTimeOffset = new(() => Schema.GetOffset(0x978D360E00BEDB08), LazyThreadSafetyMode.None); + public ref float FadeTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x978D360E00BEDB08)); + get => ref _Handle.AsRef(_FadeTimeOffset.Value); } + private static readonly Lazy _StartDisabledOffset = new(() => Schema.GetOffset(0x978D360E61ED0C4F), LazyThreadSafetyMode.None); + public ref bool StartDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x978D360E61ED0C4F)); + get => ref _Handle.AsRef(_StartDisabledOffset.Value); } + private static readonly Lazy _IsEnabledOffset = new(() => Schema.GetOffset(0x978D360E5360D70E), LazyThreadSafetyMode.None); + public ref bool IsEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x978D360E5360D70E)); + get => ref _Handle.AsRef(_IsEnabledOffset.Value); } + private static readonly Lazy _GradientFogNeedsTexturesOffset = new(() => Schema.GetOffset(0x978D360E55F47008), LazyThreadSafetyMode.None); + public ref bool GradientFogNeedsTextures { - get => ref _Handle.AsRef(Schema.GetOffset(0x978D360E55F47008)); + get => ref _Handle.AsRef(_GradientFogNeedsTexturesOffset.Value); } public void GradientFogTextureUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGunTargetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGunTargetImpl.cs index cb879f3f5..ccd6c000d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGunTargetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CGunTargetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CGunTargetImpl : CBaseToggleImpl, CGunTarget { public CGunTargetImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnOffset = new(() => Schema.GetOffset(0x4CB42969DEB2AE70), LazyThreadSafetyMode.None); + public ref bool On { - get => ref _Handle.AsRef(Schema.GetOffset(0x4CB42969DEB2AE70)); + get => ref _Handle.AsRef(_OnOffset.Value); } + private static readonly Lazy _TargetEntOffset = new(() => Schema.GetOffset(0x4CB429692DD292D7), LazyThreadSafetyMode.None); + public ref CHandle TargetEnt { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4CB429692DD292D7)); + get => ref _Handle.AsRef>(_TargetEntOffset.Value); } + private static readonly Lazy _OnDeathOffset = new(() => Schema.GetOffset(0x4CB429696F756BD2), LazyThreadSafetyMode.None); + public CEntityIOOutput OnDeath { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x4CB429696F756BD2)); + get => new CEntityIOOutputImpl(_Handle + _OnDeathOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHEGrenadeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHEGrenadeImpl.cs index 83089a265..2dda2451f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHEGrenadeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHEGrenadeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHEGrenadeProjectileImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHEGrenadeProjectileImpl.cs index df088b89c..3995e4733 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHEGrenadeProjectileImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHEGrenadeProjectileImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHandleDummyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHandleDummyImpl.cs index 55d2fc07e..8bc86c55f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHandleDummyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHandleDummyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHandleTestImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHandleTestImpl.cs index 6c6e13f0f..14738cea7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHandleTestImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHandleTestImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CHandleTestImpl : CBaseEntityImpl, CHandleTest { public CHandleTestImpl(nint handle) : base(handle) { } + private static readonly Lazy _HandleOffset = new(() => Schema.GetOffset(0xCC5023E89D208453), LazyThreadSafetyMode.None); + public ref CHandle Handle { - get => ref _Handle.AsRef>(Schema.GetOffset(0xCC5023E89D208453)); + get => ref _Handle.AsRef>(_HandleOffset.Value); } + private static readonly Lazy _SendHandleOffset = new(() => Schema.GetOffset(0xCC5023E8EACC8501), LazyThreadSafetyMode.None); + public ref bool SendHandle { - get => ref _Handle.AsRef(Schema.GetOffset(0xCC5023E8EACC8501)); + get => ref _Handle.AsRef(_SendHandleOffset.Value); } public void HandleUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHandshakeAnimTagBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHandshakeAnimTagBaseImpl.cs index 0a461e3e4..cc41dc699 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHandshakeAnimTagBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHandshakeAnimTagBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CHandshakeAnimTagBaseImpl : CAnimTagBaseImpl, CHandshakeA public CHandshakeAnimTagBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _IsDisableTagOffset = new(() => Schema.GetOffset(0x73566C0F04E21131), LazyThreadSafetyMode.None); + public ref bool IsDisableTag { - get => ref _Handle.AsRef(Schema.GetOffset(0x73566C0F04E21131)); + get => ref _Handle.AsRef(_IsDisableTagOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHintMessageImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHintMessageImpl.cs index 5b504d9b9..bf8de116a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHintMessageImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHintMessageImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class CHintMessageImpl : SchemaClass, CHintMessage { public CHintMessageImpl(nint handle) : base(handle) { } + private static readonly Lazy _HintStringOffset = new(() => Schema.GetOffset(0x7663729E433E2101), LazyThreadSafetyMode.None); + public string HintString { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7663729E433E2101)); + var ptr = _Handle.Read(_HintStringOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7663729E433E2101, value); + set => Schema.SetString(_Handle, _HintStringOffset.Value, value); } + private static readonly Lazy _ArgsOffset = new(() => Schema.GetOffset(0x7663729E5D6040DC), LazyThreadSafetyMode.None); + public ref CUtlVector Args { - get => ref _Handle.AsRef>(Schema.GetOffset(0x7663729E5D6040DC)); + get => ref _Handle.AsRef>(_ArgsOffset.Value); } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0x7663729E3D9FF5AD), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0x7663729E3D9FF5AD)); + get => ref _Handle.AsRef(_DurationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHintMessageQueueImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHintMessageQueueImpl.cs index 5b1fbefdf..02cd2af16 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHintMessageQueueImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHintMessageQueueImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,21 @@ internal partial class CHintMessageQueueImpl : SchemaClass, CHintMessageQueue { public CHintMessageQueueImpl(nint handle) : base(handle) { } + private static readonly Lazy _TmMessageEndOffset = new(() => Schema.GetOffset(0xBE13489745AC0F6), LazyThreadSafetyMode.None); + public ref float TmMessageEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE13489745AC0F6)); + get => ref _Handle.AsRef(_TmMessageEndOffset.Value); } + private static readonly Lazy _MessagesOffset = new(() => Schema.GetOffset(0xBE134896139CC55), LazyThreadSafetyMode.None); + public ref CUtlVector> Messages { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xBE134896139CC55)); + get => ref _Handle.AsRef>>(_MessagesOffset.Value); } + private static readonly Lazy _PlayerControllerOffset = new(() => Schema.GetOffset(0xBE13489DCE6762E), LazyThreadSafetyMode.None); + public CBasePlayerController? PlayerController { get { - var ptr = _Handle.Read(Schema.GetOffset(0xBE13489DCE6762E)); + var ptr = _Handle.Read(_PlayerControllerOffset.Value); return ptr.IsValidPtr() ? new CBasePlayerControllerImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitBoxImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitBoxImpl.cs index 94f0434e6..d42f390ae 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitBoxImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitBoxImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,56 +17,82 @@ internal partial class CHitBoxImpl : SchemaClass, CHitBox { public CHitBoxImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x97E3DD244D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x97E3DD244D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x97E3DD244D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _SurfacePropertyOffset = new(() => Schema.GetOffset(0x97E3DD241A25534C), LazyThreadSafetyMode.None); + public string SurfaceProperty { get { - var ptr = _Handle.Read(Schema.GetOffset(0x97E3DD241A25534C)); + var ptr = _Handle.Read(_SurfacePropertyOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x97E3DD241A25534C, value); + set => Schema.SetString(_Handle, _SurfacePropertyOffset.Value, value); } + private static readonly Lazy _BoneNameOffset = new(() => Schema.GetOffset(0x97E3DD247559AC1F), LazyThreadSafetyMode.None); + public string BoneName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x97E3DD247559AC1F)); + var ptr = _Handle.Read(_BoneNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x97E3DD247559AC1F, value); + set => Schema.SetString(_Handle, _BoneNameOffset.Value, value); } + private static readonly Lazy _MinBoundsOffset = new(() => Schema.GetOffset(0x97E3DD24114799FE), LazyThreadSafetyMode.None); + public ref Vector MinBounds { - get => ref _Handle.AsRef(Schema.GetOffset(0x97E3DD24114799FE)); + get => ref _Handle.AsRef(_MinBoundsOffset.Value); } + private static readonly Lazy _MaxBoundsOffset = new(() => Schema.GetOffset(0x97E3DD24C0B4CE60), LazyThreadSafetyMode.None); + public ref Vector MaxBounds { - get => ref _Handle.AsRef(Schema.GetOffset(0x97E3DD24C0B4CE60)); + get => ref _Handle.AsRef(_MaxBoundsOffset.Value); } + private static readonly Lazy _ShapeRadiusOffset = new(() => Schema.GetOffset(0x97E3DD24D8107F0E), LazyThreadSafetyMode.None); + public ref float ShapeRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x97E3DD24D8107F0E)); + get => ref _Handle.AsRef(_ShapeRadiusOffset.Value); } + private static readonly Lazy _BoneNameHashOffset = new(() => Schema.GetOffset(0x97E3DD24767FF938), LazyThreadSafetyMode.None); + public ref uint BoneNameHash { - get => ref _Handle.AsRef(Schema.GetOffset(0x97E3DD24767FF938)); + get => ref _Handle.AsRef(_BoneNameHashOffset.Value); } + private static readonly Lazy _GroupIdOffset = new(() => Schema.GetOffset(0x97E3DD245BB08395), LazyThreadSafetyMode.None); + public ref int GroupId { - get => ref _Handle.AsRef(Schema.GetOffset(0x97E3DD245BB08395)); + get => ref _Handle.AsRef(_GroupIdOffset.Value); } + private static readonly Lazy _ShapeTypeOffset = new(() => Schema.GetOffset(0x97E3DD24AE159B72), LazyThreadSafetyMode.None); + public ref byte ShapeType { - get => ref _Handle.AsRef(Schema.GetOffset(0x97E3DD24AE159B72)); + get => ref _Handle.AsRef(_ShapeTypeOffset.Value); } + private static readonly Lazy _TranslationOnlyOffset = new(() => Schema.GetOffset(0x97E3DD24B775D846), LazyThreadSafetyMode.None); + public ref bool TranslationOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0x97E3DD24B775D846)); + get => ref _Handle.AsRef(_TranslationOnlyOffset.Value); } + private static readonly Lazy _CRCOffset = new(() => Schema.GetOffset(0x97E3DD244E8CCEF9), LazyThreadSafetyMode.None); + public ref uint CRC { - get => ref _Handle.AsRef(Schema.GetOffset(0x97E3DD244E8CCEF9)); + get => ref _Handle.AsRef(_CRCOffset.Value); } + private static readonly Lazy _CRenderColorOffset = new(() => Schema.GetOffset(0x97E3DD24723B0259), LazyThreadSafetyMode.None); + public ref Color CRenderColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x97E3DD24723B0259)); + get => ref _Handle.AsRef(_CRenderColorOffset.Value); } + private static readonly Lazy _HitBoxIndexOffset = new(() => Schema.GetOffset(0x97E3DD24770A3AE9), LazyThreadSafetyMode.None); + public ref ushort HitBoxIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x97E3DD24770A3AE9)); + get => ref _Handle.AsRef(_HitBoxIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitBoxSetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitBoxSetImpl.cs index 615d45975..504f5c276 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitBoxSetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitBoxSetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,25 +17,33 @@ internal partial class CHitBoxSetImpl : SchemaClass, CHitBoxSet { public CHitBoxSetImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x742AE9EC4D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x742AE9EC4D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x742AE9EC4D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _NameHashOffset = new(() => Schema.GetOffset(0x742AE9ECDE15EEFE), LazyThreadSafetyMode.None); + public ref uint NameHash { - get => ref _Handle.AsRef(Schema.GetOffset(0x742AE9ECDE15EEFE)); + get => ref _Handle.AsRef(_NameHashOffset.Value); } + private static readonly Lazy _HitBoxesOffset = new(() => Schema.GetOffset(0x742AE9EC07A4113F), LazyThreadSafetyMode.None); + public ref CUtlVector HitBoxes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x742AE9EC07A4113F)); + get => ref _Handle.AsRef>(_HitBoxesOffset.Value); } + private static readonly Lazy _SourceFilenameOffset = new(() => Schema.GetOffset(0x742AE9ECD49CE26D), LazyThreadSafetyMode.None); + public string SourceFilename { get { - var ptr = _Handle.Read(Schema.GetOffset(0x742AE9ECD49CE26D)); + var ptr = _Handle.Read(_SourceFilenameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x742AE9ECD49CE26D, value); + set => Schema.SetString(_Handle, _SourceFilenameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitBoxSetListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitBoxSetListImpl.cs index 085b892cd..e92151281 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitBoxSetListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitBoxSetListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CHitBoxSetListImpl : SchemaClass, CHitBoxSetList { public CHitBoxSetListImpl(nint handle) : base(handle) { } + private static readonly Lazy _HitBoxSetsOffset = new(() => Schema.GetOffset(0x2FE1303444ABBA1A), LazyThreadSafetyMode.None); + public ref CUtlVector HitBoxSets { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2FE1303444ABBA1A)); + get => ref _Handle.AsRef>(_HitBoxSetsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitReactUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitReactUpdateNodeImpl.cs index 65c17ea74..9d2815411 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitReactUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitReactUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CHitReactUpdateNodeImpl : CUnaryUpdateNodeImpl, CHitReact public CHitReactUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _OpFixedSettingsOffset = new(() => Schema.GetOffset(0x64E4D4A7E533AB09), LazyThreadSafetyMode.None); + public HitReactFixedSettings_t OpFixedSettings { - get => new HitReactFixedSettings_tImpl(_Handle + Schema.GetOffset(0x64E4D4A7E533AB09)); + get => new HitReactFixedSettings_tImpl(_Handle + _OpFixedSettingsOffset.Value); } + private static readonly Lazy _TriggerParamOffset = new(() => Schema.GetOffset(0x64E4D4A7AA3B4860), LazyThreadSafetyMode.None); + public CAnimParamHandle TriggerParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x64E4D4A7AA3B4860)); + get => new CAnimParamHandleImpl(_Handle + _TriggerParamOffset.Value); } + private static readonly Lazy _HitBoneParamOffset = new(() => Schema.GetOffset(0x64E4D4A70CD5764D), LazyThreadSafetyMode.None); + public CAnimParamHandle HitBoneParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x64E4D4A70CD5764D)); + get => new CAnimParamHandleImpl(_Handle + _HitBoneParamOffset.Value); } + private static readonly Lazy _HitOffsetParamOffset = new(() => Schema.GetOffset(0x64E4D4A7F1CA4A4A), LazyThreadSafetyMode.None); + public CAnimParamHandle HitOffsetParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x64E4D4A7F1CA4A4A)); + get => new CAnimParamHandleImpl(_Handle + _HitOffsetParamOffset.Value); } + private static readonly Lazy _HitDirectionParamOffset = new(() => Schema.GetOffset(0x64E4D4A76F980EDC), LazyThreadSafetyMode.None); + public CAnimParamHandle HitDirectionParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x64E4D4A76F980EDC)); + get => new CAnimParamHandleImpl(_Handle + _HitDirectionParamOffset.Value); } + private static readonly Lazy _HitStrengthParamOffset = new(() => Schema.GetOffset(0x64E4D4A7BD447408), LazyThreadSafetyMode.None); + public CAnimParamHandle HitStrengthParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x64E4D4A7BD447408)); + get => new CAnimParamHandleImpl(_Handle + _HitStrengthParamOffset.Value); } + private static readonly Lazy _MinDelayBetweenHitsOffset = new(() => Schema.GetOffset(0x64E4D4A762EED38E), LazyThreadSafetyMode.None); + public ref float MinDelayBetweenHits { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E4D4A762EED38E)); + get => ref _Handle.AsRef(_MinDelayBetweenHitsOffset.Value); } + private static readonly Lazy _ResetChildOffset = new(() => Schema.GetOffset(0x64E4D4A765CC88B6), LazyThreadSafetyMode.None); + public ref bool ResetChild { - get => ref _Handle.AsRef(Schema.GetOffset(0x64E4D4A765CC88B6)); + get => ref _Handle.AsRef(_ResetChildOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitboxComponentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitboxComponentImpl.cs index 7f44e51be..e0660ff78 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitboxComponentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHitboxComponentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CHitboxComponentImpl : CEntityComponentImpl, CHitboxCompo public CHitboxComponentImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoundsExpandRadiusOffset = new(() => Schema.GetOffset(0x8148DEC366FA148C), LazyThreadSafetyMode.None); + public ref float BoundsExpandRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x8148DEC366FA148C)); + get => ref _Handle.AsRef(_BoundsExpandRadiusOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageAlias_info_hostage_spawnImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageAlias_info_hostage_spawnImpl.cs index 08ec71b1b..ff16c03d8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageAlias_info_hostage_spawnImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageAlias_info_hostage_spawnImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageCarriablePropImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageCarriablePropImpl.cs index 2366fd916..165732092 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageCarriablePropImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageCarriablePropImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageExpresserShimImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageExpresserShimImpl.cs index 1211a80c5..1b03a53d7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageExpresserShimImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageExpresserShimImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,9 +17,11 @@ internal partial class CHostageExpresserShimImpl : CBaseCombatCharacterImpl, CHo public CHostageExpresserShimImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExpresserOffset = new(() => Schema.GetOffset(0xD6B3DCE7697CAC2A), LazyThreadSafetyMode.None); + public CAI_Expresser? Expresser { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD6B3DCE7697CAC2A)); + var ptr = _Handle.Read(_ExpresserOffset.Value); return ptr.IsValidPtr() ? new CAI_ExpresserImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageImpl.cs index 7aad59374..f5ae9b84e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,122 +17,200 @@ internal partial class CHostageImpl : CHostageExpresserShimImpl, CHostage { public CHostageImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnHostageBeginGrabOffset = new(() => Schema.GetOffset(0x1A122BDF0DA44EAC), LazyThreadSafetyMode.None); + public CEntityIOOutput OnHostageBeginGrab { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1A122BDF0DA44EAC)); + get => new CEntityIOOutputImpl(_Handle + _OnHostageBeginGrabOffset.Value); } + private static readonly Lazy _OnFirstPickedUpOffset = new(() => Schema.GetOffset(0x1A122BDFCBF60E53), LazyThreadSafetyMode.None); + public CEntityIOOutput OnFirstPickedUp { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1A122BDFCBF60E53)); + get => new CEntityIOOutputImpl(_Handle + _OnFirstPickedUpOffset.Value); } + private static readonly Lazy _OnDroppedNotRescuedOffset = new(() => Schema.GetOffset(0x1A122BDFE6BC925E), LazyThreadSafetyMode.None); + public CEntityIOOutput OnDroppedNotRescued { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1A122BDFE6BC925E)); + get => new CEntityIOOutputImpl(_Handle + _OnDroppedNotRescuedOffset.Value); } + private static readonly Lazy _OnRescuedOffset = new(() => Schema.GetOffset(0x1A122BDF421F0657), LazyThreadSafetyMode.None); + public CEntityIOOutput OnRescued { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1A122BDF421F0657)); + get => new CEntityIOOutputImpl(_Handle + _OnRescuedOffset.Value); } + private static readonly Lazy _EntitySpottedStateOffset = new(() => Schema.GetOffset(0x1A122BDF032B547C), LazyThreadSafetyMode.None); + public EntitySpottedState_t EntitySpottedState { - get => new EntitySpottedState_tImpl(_Handle + Schema.GetOffset(0x1A122BDF032B547C)); + get => new EntitySpottedState_tImpl(_Handle + _EntitySpottedStateOffset.Value); } + private static readonly Lazy _SpotRulesOffset = new(() => Schema.GetOffset(0x1A122BDF776CCE44), LazyThreadSafetyMode.None); + public ref int SpotRules { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDF776CCE44)); + get => ref _Handle.AsRef(_SpotRulesOffset.Value); } + private static readonly Lazy _UiHostageSpawnExclusionGroupMaskOffset = new(() => Schema.GetOffset(0x1A122BDF1F6BC7DC), LazyThreadSafetyMode.None); + public ref uint UiHostageSpawnExclusionGroupMask { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDF1F6BC7DC)); + get => ref _Handle.AsRef(_UiHostageSpawnExclusionGroupMaskOffset.Value); } + private static readonly Lazy _HostageSpawnRandomFactorOffset = new(() => Schema.GetOffset(0x1A122BDFD6DEF099), LazyThreadSafetyMode.None); + public ref uint HostageSpawnRandomFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDFD6DEF099)); + get => ref _Handle.AsRef(_HostageSpawnRandomFactorOffset.Value); } + private static readonly Lazy _RemoveOffset = new(() => Schema.GetOffset(0x1A122BDFDE0A6D5D), LazyThreadSafetyMode.None); + public ref bool Remove { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDFDE0A6D5D)); + get => ref _Handle.AsRef(_RemoveOffset.Value); } + private static readonly Lazy _VelOffset = new(() => Schema.GetOffset(0x1A122BDF62514398), LazyThreadSafetyMode.None); + public ref Vector Vel { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDF62514398)); + get => ref _Handle.AsRef(_VelOffset.Value); } + private static readonly Lazy _IsRescuedOffset = new(() => Schema.GetOffset(0x1A122BDF18E05CC8), LazyThreadSafetyMode.None); + public ref bool IsRescued { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDF18E05CC8)); + get => ref _Handle.AsRef(_IsRescuedOffset.Value); } + private static readonly Lazy _JumpedThisFrameOffset = new(() => Schema.GetOffset(0x1A122BDF6BF897BD), LazyThreadSafetyMode.None); + public ref bool JumpedThisFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDF6BF897BD)); + get => ref _Handle.AsRef(_JumpedThisFrameOffset.Value); } + private static readonly Lazy _HostageStateOffset = new(() => Schema.GetOffset(0x1A122BDF5B4A8B2F), LazyThreadSafetyMode.None); + public ref int HostageState { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDF5B4A8B2F)); + get => ref _Handle.AsRef(_HostageStateOffset.Value); } + private static readonly Lazy _LeaderOffset = new(() => Schema.GetOffset(0x1A122BDF658B4E84), LazyThreadSafetyMode.None); + public ref CHandle Leader { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1A122BDF658B4E84)); + get => ref _Handle.AsRef>(_LeaderOffset.Value); } + private static readonly Lazy _LastLeaderOffset = new(() => Schema.GetOffset(0x1A122BDF1598AC08), LazyThreadSafetyMode.None); + public ref CHandle LastLeader { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1A122BDF1598AC08)); + get => ref _Handle.AsRef>(_LastLeaderOffset.Value); } + private static readonly Lazy _ReuseTimerOffset = new(() => Schema.GetOffset(0x1A122BDF6D7BFBA8), LazyThreadSafetyMode.None); + public CountdownTimer ReuseTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1A122BDF6D7BFBA8)); + get => new CountdownTimerImpl(_Handle + _ReuseTimerOffset.Value); } + private static readonly Lazy _HasBeenUsedOffset = new(() => Schema.GetOffset(0x1A122BDF4B85A934), LazyThreadSafetyMode.None); + public ref bool HasBeenUsed { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDF4B85A934)); + get => ref _Handle.AsRef(_HasBeenUsedOffset.Value); } + private static readonly Lazy _AccelOffset = new(() => Schema.GetOffset(0x1A122BDF21A5D4B3), LazyThreadSafetyMode.None); + public ref Vector Accel { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDF21A5D4B3)); + get => ref _Handle.AsRef(_AccelOffset.Value); } + private static readonly Lazy _IsRunningOffset = new(() => Schema.GetOffset(0x1A122BDFE59BA57C), LazyThreadSafetyMode.None); + public ref bool IsRunning { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDFE59BA57C)); + get => ref _Handle.AsRef(_IsRunningOffset.Value); } + private static readonly Lazy _IsCrouchingOffset = new(() => Schema.GetOffset(0x1A122BDF7C7E997D), LazyThreadSafetyMode.None); + public ref bool IsCrouching { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDF7C7E997D)); + get => ref _Handle.AsRef(_IsCrouchingOffset.Value); } + private static readonly Lazy _JumpTimerOffset = new(() => Schema.GetOffset(0x1A122BDF6CBF3C9A), LazyThreadSafetyMode.None); + public CountdownTimer JumpTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1A122BDF6CBF3C9A)); + get => new CountdownTimerImpl(_Handle + _JumpTimerOffset.Value); } + private static readonly Lazy _IsWaitingForLeaderOffset = new(() => Schema.GetOffset(0x1A122BDF1E830BB2), LazyThreadSafetyMode.None); + public ref bool IsWaitingForLeader { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDF1E830BB2)); + get => ref _Handle.AsRef(_IsWaitingForLeaderOffset.Value); } + private static readonly Lazy _RepathTimerOffset = new(() => Schema.GetOffset(0x1A122BDF4AEA977C), LazyThreadSafetyMode.None); + public CountdownTimer RepathTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1A122BDF4AEA977C)); + get => new CountdownTimerImpl(_Handle + _RepathTimerOffset.Value); } + private static readonly Lazy _InhibitDoorTimerOffset = new(() => Schema.GetOffset(0x1A122BDF4CDEAEF5), LazyThreadSafetyMode.None); + public CountdownTimer InhibitDoorTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1A122BDF4CDEAEF5)); + get => new CountdownTimerImpl(_Handle + _InhibitDoorTimerOffset.Value); } + private static readonly Lazy _InhibitObstacleAvoidanceTimerOffset = new(() => Schema.GetOffset(0x1A122BDF6310A196), LazyThreadSafetyMode.None); + public CountdownTimer InhibitObstacleAvoidanceTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1A122BDF6310A196)); + get => new CountdownTimerImpl(_Handle + _InhibitObstacleAvoidanceTimerOffset.Value); } + private static readonly Lazy _WiggleTimerOffset = new(() => Schema.GetOffset(0x1A122BDFEDBA9421), LazyThreadSafetyMode.None); + public CountdownTimer WiggleTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x1A122BDFEDBA9421)); + get => new CountdownTimerImpl(_Handle + _WiggleTimerOffset.Value); } + private static readonly Lazy _IsAdjustedOffset = new(() => Schema.GetOffset(0x1A122BDFA875F12F), LazyThreadSafetyMode.None); + public ref bool IsAdjusted { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDFA875F12F)); + get => ref _Handle.AsRef(_IsAdjustedOffset.Value); } + private static readonly Lazy _HandsHaveBeenCutOffset = new(() => Schema.GetOffset(0x1A122BDF36E822D3), LazyThreadSafetyMode.None); + public ref bool HandsHaveBeenCut { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDF36E822D3)); + get => ref _Handle.AsRef(_HandsHaveBeenCutOffset.Value); } + private static readonly Lazy _HostageGrabberOffset = new(() => Schema.GetOffset(0x1A122BDF052DBC9F), LazyThreadSafetyMode.None); + public ref CHandle HostageGrabber { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1A122BDF052DBC9F)); + get => ref _Handle.AsRef>(_HostageGrabberOffset.Value); } + private static readonly Lazy _LastGrabTimeOffset = new(() => Schema.GetOffset(0x1A122BDFCF347506), LazyThreadSafetyMode.None); + public GameTime_t LastGrabTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1A122BDFCF347506)); + get => new GameTime_tImpl(_Handle + _LastGrabTimeOffset.Value); } + private static readonly Lazy _PositionWhenStartedDroppingToGroundOffset = new(() => Schema.GetOffset(0x1A122BDF59A358F0), LazyThreadSafetyMode.None); + public ref Vector PositionWhenStartedDroppingToGround { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDF59A358F0)); + get => ref _Handle.AsRef(_PositionWhenStartedDroppingToGroundOffset.Value); } + private static readonly Lazy _GrabbedPosOffset = new(() => Schema.GetOffset(0x1A122BDFBB7B9A0C), LazyThreadSafetyMode.None); + public ref Vector GrabbedPos { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDFBB7B9A0C)); + get => ref _Handle.AsRef(_GrabbedPosOffset.Value); } + private static readonly Lazy _RescueStartTimeOffset = new(() => Schema.GetOffset(0x1A122BDF6085D94B), LazyThreadSafetyMode.None); + public GameTime_t RescueStartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1A122BDF6085D94B)); + get => new GameTime_tImpl(_Handle + _RescueStartTimeOffset.Value); } + private static readonly Lazy _GrabSuccessTimeOffset = new(() => Schema.GetOffset(0x1A122BDF2EA3F531), LazyThreadSafetyMode.None); + public GameTime_t GrabSuccessTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1A122BDF2EA3F531)); + get => new GameTime_tImpl(_Handle + _GrabSuccessTimeOffset.Value); } + private static readonly Lazy _DropStartTimeOffset = new(() => Schema.GetOffset(0x1A122BDF61FA47CF), LazyThreadSafetyMode.None); + public GameTime_t DropStartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1A122BDF61FA47CF)); + get => new GameTime_tImpl(_Handle + _DropStartTimeOffset.Value); } + private static readonly Lazy _ApproachRewardPayoutsOffset = new(() => Schema.GetOffset(0x1A122BDF985F9A31), LazyThreadSafetyMode.None); + public ref int ApproachRewardPayouts { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDF985F9A31)); + get => ref _Handle.AsRef(_ApproachRewardPayoutsOffset.Value); } + private static readonly Lazy _PickupEventCountOffset = new(() => Schema.GetOffset(0x1A122BDF3D4AD912), LazyThreadSafetyMode.None); + public ref int PickupEventCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDF3D4AD912)); + get => ref _Handle.AsRef(_PickupEventCountOffset.Value); } + private static readonly Lazy _SpawnGroundPosOffset = new(() => Schema.GetOffset(0x1A122BDFF05F3703), LazyThreadSafetyMode.None); + public ref Vector SpawnGroundPos { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDFF05F3703)); + get => ref _Handle.AsRef(_SpawnGroundPosOffset.Value); } + private static readonly Lazy _HostageResetPositionOffset = new(() => Schema.GetOffset(0x1A122BDF81ABDB0E), LazyThreadSafetyMode.None); + public ref Vector HostageResetPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A122BDF81ABDB0E)); + get => ref _Handle.AsRef(_HostageResetPositionOffset.Value); } public void EntitySpottedStateUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageRescueZoneImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageRescueZoneImpl.cs index 55da7341f..3cd49aa36 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageRescueZoneImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageRescueZoneImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageRescueZoneShimImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageRescueZoneShimImpl.cs index f1df5a41d..f6f8da523 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageRescueZoneShimImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CHostageRescueZoneShimImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInButtonStateImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInButtonStateImpl.cs index a8270ee0a..df98ddcf1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInButtonStateImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInButtonStateImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CIncendiaryGrenadeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CIncendiaryGrenadeImpl.cs index 6c9d6f5f1..a63033849 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CIncendiaryGrenadeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CIncendiaryGrenadeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfernoImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfernoImpl.cs index 01eb83c88..9d3e47f8b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfernoImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfernoImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -27,65 +29,105 @@ public ISchemaFixedArray FireIsBurning { public ISchemaFixedArray BurnNormal { get => new SchemaFixedArray(_Handle, 0xABE104C9382663DB, 64, 12, 4); } + private static readonly Lazy _FireCountOffset = new(() => Schema.GetOffset(0xABE104C9820942A0), LazyThreadSafetyMode.None); + public ref int FireCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xABE104C9820942A0)); + get => ref _Handle.AsRef(_FireCountOffset.Value); } + private static readonly Lazy _InfernoTypeOffset = new(() => Schema.GetOffset(0xABE104C903C628B8), LazyThreadSafetyMode.None); + public ref int InfernoType { - get => ref _Handle.AsRef(Schema.GetOffset(0xABE104C903C628B8)); + get => ref _Handle.AsRef(_InfernoTypeOffset.Value); } + private static readonly Lazy _FireEffectTickBeginOffset = new(() => Schema.GetOffset(0xABE104C989EB57F2), LazyThreadSafetyMode.None); + public ref int FireEffectTickBegin { - get => ref _Handle.AsRef(Schema.GetOffset(0xABE104C989EB57F2)); + get => ref _Handle.AsRef(_FireEffectTickBeginOffset.Value); } + private static readonly Lazy _FireLifetimeOffset = new(() => Schema.GetOffset(0xABE104C9B2E34E7E), LazyThreadSafetyMode.None); + public ref float FireLifetime { - get => ref _Handle.AsRef(Schema.GetOffset(0xABE104C9B2E34E7E)); + get => ref _Handle.AsRef(_FireLifetimeOffset.Value); } + private static readonly Lazy _InPostEffectTimeOffset = new(() => Schema.GetOffset(0xABE104C963E4F6B8), LazyThreadSafetyMode.None); + public ref bool InPostEffectTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xABE104C963E4F6B8)); + get => ref _Handle.AsRef(_InPostEffectTimeOffset.Value); } + private static readonly Lazy _WasCreatedInSmokeOffset = new(() => Schema.GetOffset(0xABE104C95CC1EF2A), LazyThreadSafetyMode.None); + public ref bool WasCreatedInSmoke { - get => ref _Handle.AsRef(Schema.GetOffset(0xABE104C95CC1EF2A)); + get => ref _Handle.AsRef(_WasCreatedInSmokeOffset.Value); } + private static readonly Lazy _ExtentOffset = new(() => Schema.GetOffset(0xABE104C9DD2CA0B9), LazyThreadSafetyMode.None); + public Extent Extent { - get => new ExtentImpl(_Handle + Schema.GetOffset(0xABE104C9DD2CA0B9)); + get => new ExtentImpl(_Handle + _ExtentOffset.Value); } + private static readonly Lazy _DamageTimerOffset = new(() => Schema.GetOffset(0xABE104C979F45751), LazyThreadSafetyMode.None); + public CountdownTimer DamageTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0xABE104C979F45751)); + get => new CountdownTimerImpl(_Handle + _DamageTimerOffset.Value); } + private static readonly Lazy _DamageRampTimerOffset = new(() => Schema.GetOffset(0xABE104C9400054C9), LazyThreadSafetyMode.None); + public CountdownTimer DamageRampTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0xABE104C9400054C9)); + get => new CountdownTimerImpl(_Handle + _DamageRampTimerOffset.Value); } + private static readonly Lazy _SplashVelocityOffset = new(() => Schema.GetOffset(0xABE104C963461F75), LazyThreadSafetyMode.None); + public ref Vector SplashVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xABE104C963461F75)); + get => ref _Handle.AsRef(_SplashVelocityOffset.Value); } + private static readonly Lazy _InitialSplashVelocityOffset = new(() => Schema.GetOffset(0xABE104C9757A42BF), LazyThreadSafetyMode.None); + public ref Vector InitialSplashVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xABE104C9757A42BF)); + get => ref _Handle.AsRef(_InitialSplashVelocityOffset.Value); } + private static readonly Lazy _StartPosOffset = new(() => Schema.GetOffset(0xABE104C9676FC33F), LazyThreadSafetyMode.None); + public ref Vector StartPos { - get => ref _Handle.AsRef(Schema.GetOffset(0xABE104C9676FC33F)); + get => ref _Handle.AsRef(_StartPosOffset.Value); } + private static readonly Lazy _OriginalSpawnLocationOffset = new(() => Schema.GetOffset(0xABE104C95E59F382), LazyThreadSafetyMode.None); + public ref Vector OriginalSpawnLocation { - get => ref _Handle.AsRef(Schema.GetOffset(0xABE104C95E59F382)); + get => ref _Handle.AsRef(_OriginalSpawnLocationOffset.Value); } + private static readonly Lazy _ActiveTimerOffset = new(() => Schema.GetOffset(0xABE104C946FF8D04), LazyThreadSafetyMode.None); + public IntervalTimer ActiveTimer { - get => new IntervalTimerImpl(_Handle + Schema.GetOffset(0xABE104C946FF8D04)); + get => new IntervalTimerImpl(_Handle + _ActiveTimerOffset.Value); } + private static readonly Lazy _FireSpawnOffsetOffset = new(() => Schema.GetOffset(0xABE104C90C7D268F), LazyThreadSafetyMode.None); + public ref int FireSpawnOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xABE104C90C7D268F)); + get => ref _Handle.AsRef(_FireSpawnOffsetOffset.Value); } + private static readonly Lazy _MaxFlamesOffset = new(() => Schema.GetOffset(0xABE104C972805F39), LazyThreadSafetyMode.None); + public ref int MaxFlames { - get => ref _Handle.AsRef(Schema.GetOffset(0xABE104C972805F39)); + get => ref _Handle.AsRef(_MaxFlamesOffset.Value); } + private static readonly Lazy _SpreadCountOffset = new(() => Schema.GetOffset(0xABE104C9F27833E1), LazyThreadSafetyMode.None); + public ref int SpreadCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xABE104C9F27833E1)); + get => ref _Handle.AsRef(_SpreadCountOffset.Value); } + private static readonly Lazy _BookkeepingTimerOffset = new(() => Schema.GetOffset(0xABE104C975065DCC), LazyThreadSafetyMode.None); + public CountdownTimer BookkeepingTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0xABE104C975065DCC)); + get => new CountdownTimerImpl(_Handle + _BookkeepingTimerOffset.Value); } + private static readonly Lazy _NextSpreadTimerOffset = new(() => Schema.GetOffset(0xABE104C93045281C), LazyThreadSafetyMode.None); + public CountdownTimer NextSpreadTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0xABE104C93045281C)); + get => new CountdownTimerImpl(_Handle + _NextSpreadTimerOffset.Value); } + private static readonly Lazy _SourceItemDefIndexOffset = new(() => Schema.GetOffset(0xABE104C905A4D2E6), LazyThreadSafetyMode.None); + public ref ushort SourceItemDefIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xABE104C905A4D2E6)); + get => ref _Handle.AsRef(_SourceItemDefIndexOffset.Value); } public void FirePositionsUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoDataImpl.cs index c5e2c04ae..a5b6d6086 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoDeathmatchSpawnImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoDeathmatchSpawnImpl.cs index 8c821f241..43f7b68f2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoDeathmatchSpawnImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoDeathmatchSpawnImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoDynamicShadowHintBoxImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoDynamicShadowHintBoxImpl.cs index 4612e9a70..d4599d022 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoDynamicShadowHintBoxImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoDynamicShadowHintBoxImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CInfoDynamicShadowHintBoxImpl : CInfoDynamicShadowHintImp public CInfoDynamicShadowHintBoxImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoxMinsOffset = new(() => Schema.GetOffset(0xFD9FEBD8201373), LazyThreadSafetyMode.None); + public ref Vector BoxMins { - get => ref _Handle.AsRef(Schema.GetOffset(0xFD9FEBD8201373)); + get => ref _Handle.AsRef(_BoxMinsOffset.Value); } + private static readonly Lazy _BoxMaxsOffset = new(() => Schema.GetOffset(0xFD9FEB817A3B31), LazyThreadSafetyMode.None); + public ref Vector BoxMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0xFD9FEB817A3B31)); + get => ref _Handle.AsRef(_BoxMaxsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoDynamicShadowHintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoDynamicShadowHintImpl.cs index 9e72ab896..dd828460f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoDynamicShadowHintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoDynamicShadowHintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CInfoDynamicShadowHintImpl : CPointEntityImpl, CInfoDynam public CInfoDynamicShadowHintImpl(nint handle) : base(handle) { } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x46DDE8EE3A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x46DDE8EE3A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _RangeOffset = new(() => Schema.GetOffset(0x46DDE8EE3FC92844), LazyThreadSafetyMode.None); + public ref float Range { - get => ref _Handle.AsRef(Schema.GetOffset(0x46DDE8EE3FC92844)); + get => ref _Handle.AsRef(_RangeOffset.Value); } + private static readonly Lazy _ImportanceOffset = new(() => Schema.GetOffset(0x46DDE8EE85D7F083), LazyThreadSafetyMode.None); + public ref int Importance { - get => ref _Handle.AsRef(Schema.GetOffset(0x46DDE8EE85D7F083)); + get => ref _Handle.AsRef(_ImportanceOffset.Value); } + private static readonly Lazy _LightChoiceOffset = new(() => Schema.GetOffset(0x46DDE8EED82DFBD8), LazyThreadSafetyMode.None); + public ref int LightChoice { - get => ref _Handle.AsRef(Schema.GetOffset(0x46DDE8EED82DFBD8)); + get => ref _Handle.AsRef(_LightChoiceOffset.Value); } + private static readonly Lazy _LightOffset = new(() => Schema.GetOffset(0x46DDE8EEF68359B1), LazyThreadSafetyMode.None); + public ref CHandle Light { - get => ref _Handle.AsRef>(Schema.GetOffset(0x46DDE8EEF68359B1)); + get => ref _Handle.AsRef>(_LightOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoFanImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoFanImpl.cs index 080ed45a3..b1939fb2f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoFanImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoFanImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class CInfoFanImpl : CPointEntityImpl, CInfoFan { public CInfoFanImpl(nint handle) : base(handle) { } + private static readonly Lazy _FanForceMaxRadiusOffset = new(() => Schema.GetOffset(0x1372EEA33EA45A67), LazyThreadSafetyMode.None); + public ref float FanForceMaxRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x1372EEA33EA45A67)); + get => ref _Handle.AsRef(_FanForceMaxRadiusOffset.Value); } + private static readonly Lazy _FanForceMinRadiusOffset = new(() => Schema.GetOffset(0x1372EEA352CA71C5), LazyThreadSafetyMode.None); + public ref float FanForceMinRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x1372EEA352CA71C5)); + get => ref _Handle.AsRef(_FanForceMinRadiusOffset.Value); } + private static readonly Lazy _CurveDistRangeOffset = new(() => Schema.GetOffset(0x1372EEA3EE91456F), LazyThreadSafetyMode.None); + public ref float CurveDistRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x1372EEA3EE91456F)); + get => ref _Handle.AsRef(_CurveDistRangeOffset.Value); } + private static readonly Lazy _FanForceCurveStringOffset = new(() => Schema.GetOffset(0x1372EEA3CC493A61), LazyThreadSafetyMode.None); + public string FanForceCurveString { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1372EEA3CC493A61)); + var ptr = _Handle.Read(_FanForceCurveStringOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1372EEA3CC493A61, value); + set => Schema.SetString(_Handle, _FanForceCurveStringOffset.Value, value); } public void FanForceMaxRadiusUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoGameEventProxyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoGameEventProxyImpl.cs index 918cb287d..4b476f639 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoGameEventProxyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoGameEventProxyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CInfoGameEventProxyImpl : CPointEntityImpl, CInfoGameEven public CInfoGameEventProxyImpl(nint handle) : base(handle) { } + private static readonly Lazy _EventNameOffset = new(() => Schema.GetOffset(0x483B3FC078114A54), LazyThreadSafetyMode.None); + public string EventName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x483B3FC078114A54)); + var ptr = _Handle.Read(_EventNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x483B3FC078114A54, value); + set => Schema.SetString(_Handle, _EventNameOffset.Value, value); } + private static readonly Lazy _RangeOffset = new(() => Schema.GetOffset(0x483B3FC03FC92844), LazyThreadSafetyMode.None); + public ref float Range { - get => ref _Handle.AsRef(Schema.GetOffset(0x483B3FC03FC92844)); + get => ref _Handle.AsRef(_RangeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoInstructorHintBombTargetAImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoInstructorHintBombTargetAImpl.cs index 15241fd93..b10ef4c4c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoInstructorHintBombTargetAImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoInstructorHintBombTargetAImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoInstructorHintBombTargetBImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoInstructorHintBombTargetBImpl.cs index 6ce93f534..0111ecabc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoInstructorHintBombTargetBImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoInstructorHintBombTargetBImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoInstructorHintHostageRescueZoneImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoInstructorHintHostageRescueZoneImpl.cs index bca5eab37..8a671d623 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoInstructorHintHostageRescueZoneImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoInstructorHintHostageRescueZoneImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoInstructorHintTargetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoInstructorHintTargetImpl.cs index 6f05bce6e..c342147b3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoInstructorHintTargetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoInstructorHintTargetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoLadderDismountImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoLadderDismountImpl.cs index 59a6f6edb..11e33805b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoLadderDismountImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoLadderDismountImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoLandmarkImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoLandmarkImpl.cs index f444d438c..5055a65cb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoLandmarkImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoLandmarkImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoOffscreenPanoramaTextureImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoOffscreenPanoramaTextureImpl.cs index e5f17a250..210967df5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoOffscreenPanoramaTextureImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoOffscreenPanoramaTextureImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,47 +17,67 @@ internal partial class CInfoOffscreenPanoramaTextureImpl : CPointEntityImpl, CIn public CInfoOffscreenPanoramaTextureImpl(nint handle) : base(handle) { } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x584660AF3A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x584660AF3A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _ResolutionXOffset = new(() => Schema.GetOffset(0x584660AF6C22DC51), LazyThreadSafetyMode.None); + public ref int ResolutionX { - get => ref _Handle.AsRef(Schema.GetOffset(0x584660AF6C22DC51)); + get => ref _Handle.AsRef(_ResolutionXOffset.Value); } + private static readonly Lazy _ResolutionYOffset = new(() => Schema.GetOffset(0x584660AF6B22DABE), LazyThreadSafetyMode.None); + public ref int ResolutionY { - get => ref _Handle.AsRef(Schema.GetOffset(0x584660AF6B22DABE)); + get => ref _Handle.AsRef(_ResolutionYOffset.Value); } + private static readonly Lazy _LayoutFileNameOffset = new(() => Schema.GetOffset(0x584660AF5D1172FB), LazyThreadSafetyMode.None); + public string LayoutFileName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x584660AF5D1172FB)); + var ptr = _Handle.Read(_LayoutFileNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x584660AF5D1172FB, value); + set => Schema.SetString(_Handle, _LayoutFileNameOffset.Value, value); } + private static readonly Lazy _RenderAttrNameOffset = new(() => Schema.GetOffset(0x584660AFE624CDC1), LazyThreadSafetyMode.None); + public string RenderAttrName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x584660AFE624CDC1)); + var ptr = _Handle.Read(_RenderAttrNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x584660AFE624CDC1, value); + set => Schema.SetString(_Handle, _RenderAttrNameOffset.Value, value); } + private static readonly Lazy _TargetEntitiesOffset = new(() => Schema.GetOffset(0x584660AFA0100A93), LazyThreadSafetyMode.None); + public ref CUtlVector> TargetEntities { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x584660AFA0100A93)); + get => ref _Handle.AsRef>>(_TargetEntitiesOffset.Value); } + private static readonly Lazy _TargetChangeCountOffset = new(() => Schema.GetOffset(0x584660AF309CAEAB), LazyThreadSafetyMode.None); + public ref int TargetChangeCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x584660AF309CAEAB)); + get => ref _Handle.AsRef(_TargetChangeCountOffset.Value); } + private static readonly Lazy _CSSClassesOffset = new(() => Schema.GetOffset(0x584660AFCB74D1DC), LazyThreadSafetyMode.None); + public ref CUtlVector CSSClasses { - get => ref _Handle.AsRef>(Schema.GetOffset(0x584660AFCB74D1DC)); + get => ref _Handle.AsRef>(_CSSClassesOffset.Value); } + private static readonly Lazy _TargetsNameOffset = new(() => Schema.GetOffset(0x584660AF82C9ED45), LazyThreadSafetyMode.None); + public string TargetsName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x584660AF82C9ED45)); + var ptr = _Handle.Read(_TargetsNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x584660AF82C9ED45, value); + set => Schema.SetString(_Handle, _TargetsNameOffset.Value, value); } + private static readonly Lazy _AdditionalTargetEntitiesOffset = new(() => Schema.GetOffset(0x584660AFD38E792A), LazyThreadSafetyMode.None); + public ref CUtlVector> AdditionalTargetEntities { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x584660AFD38E792A)); + get => ref _Handle.AsRef>>(_AdditionalTargetEntitiesOffset.Value); } public void DisabledUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoParticleTargetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoParticleTargetImpl.cs index 13b49c1fa..ed7e82b46 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoParticleTargetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoParticleTargetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoPlayerCounterterroristImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoPlayerCounterterroristImpl.cs index 654ff6b02..5f72a9d2b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoPlayerCounterterroristImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoPlayerCounterterroristImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoPlayerStartImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoPlayerStartImpl.cs index f2b3958fa..185717dd7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoPlayerStartImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoPlayerStartImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CInfoPlayerStartImpl : CPointEntityImpl, CInfoPlayerStart public CInfoPlayerStartImpl(nint handle) : base(handle) { } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0xE0799D713A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xE0799D713A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _IsMasterOffset = new(() => Schema.GetOffset(0xE0799D71DE5719A3), LazyThreadSafetyMode.None); + public ref bool IsMaster { - get => ref _Handle.AsRef(Schema.GetOffset(0xE0799D71DE5719A3)); + get => ref _Handle.AsRef(_IsMasterOffset.Value); } + private static readonly Lazy _PawnSubclassOffset = new(() => Schema.GetOffset(0xE0799D7190AFB5EF), LazyThreadSafetyMode.None); + public ref CGlobalSymbol PawnSubclass { - get => ref _Handle.AsRef(Schema.GetOffset(0xE0799D7190AFB5EF)); + get => ref _Handle.AsRef(_PawnSubclassOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoPlayerTerroristImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoPlayerTerroristImpl.cs index 692832fe3..25494c3c5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoPlayerTerroristImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoPlayerTerroristImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoSpawnGroupLandmarkImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoSpawnGroupLandmarkImpl.cs index 8d680709a..5ad475882 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoSpawnGroupLandmarkImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoSpawnGroupLandmarkImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoSpawnGroupLoadUnloadImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoSpawnGroupLoadUnloadImpl.cs index 761f4d5fe..dea08983b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoSpawnGroupLoadUnloadImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoSpawnGroupLoadUnloadImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,60 +17,86 @@ internal partial class CInfoSpawnGroupLoadUnloadImpl : CLogicalEntityImpl, CInfo public CInfoSpawnGroupLoadUnloadImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnSpawnGroupLoadStartedOffset = new(() => Schema.GetOffset(0x2537640F52B8B787), LazyThreadSafetyMode.None); + public CEntityIOOutput OnSpawnGroupLoadStarted { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x2537640F52B8B787)); + get => new CEntityIOOutputImpl(_Handle + _OnSpawnGroupLoadStartedOffset.Value); } + private static readonly Lazy _OnSpawnGroupLoadFinishedOffset = new(() => Schema.GetOffset(0x2537640FF5DA3EA8), LazyThreadSafetyMode.None); + public CEntityIOOutput OnSpawnGroupLoadFinished { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x2537640FF5DA3EA8)); + get => new CEntityIOOutputImpl(_Handle + _OnSpawnGroupLoadFinishedOffset.Value); } + private static readonly Lazy _OnSpawnGroupUnloadStartedOffset = new(() => Schema.GetOffset(0x2537640F89E6672A), LazyThreadSafetyMode.None); + public CEntityIOOutput OnSpawnGroupUnloadStarted { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x2537640F89E6672A)); + get => new CEntityIOOutputImpl(_Handle + _OnSpawnGroupUnloadStartedOffset.Value); } + private static readonly Lazy _OnSpawnGroupUnloadFinishedOffset = new(() => Schema.GetOffset(0x2537640F1268C477), LazyThreadSafetyMode.None); + public CEntityIOOutput OnSpawnGroupUnloadFinished { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x2537640F1268C477)); + get => new CEntityIOOutputImpl(_Handle + _OnSpawnGroupUnloadFinishedOffset.Value); } + private static readonly Lazy _SpawnGroupNameOffset = new(() => Schema.GetOffset(0x2537640FBEEECC58), LazyThreadSafetyMode.None); + public string SpawnGroupName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x2537640FBEEECC58)); + var ptr = _Handle.Read(_SpawnGroupNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x2537640FBEEECC58, value); + set => Schema.SetString(_Handle, _SpawnGroupNameOffset.Value, value); } + private static readonly Lazy _SpawnGroupFilterNameOffset = new(() => Schema.GetOffset(0x2537640FE9A4A47E), LazyThreadSafetyMode.None); + public string SpawnGroupFilterName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x2537640FE9A4A47E)); + var ptr = _Handle.Read(_SpawnGroupFilterNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x2537640FE9A4A47E, value); + set => Schema.SetString(_Handle, _SpawnGroupFilterNameOffset.Value, value); } + private static readonly Lazy _LandmarkNameOffset = new(() => Schema.GetOffset(0x2537640F3207F70E), LazyThreadSafetyMode.None); + public string LandmarkName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x2537640F3207F70E)); + var ptr = _Handle.Read(_LandmarkNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x2537640F3207F70E, value); + set => Schema.SetString(_Handle, _LandmarkNameOffset.Value, value); } + private static readonly Lazy _FixedSpawnGroupNameOffset = new(() => Schema.GetOffset(0x2537640FB094CD41), LazyThreadSafetyMode.None); + public string FixedSpawnGroupName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x2537640FB094CD41)); + var ptr = _Handle.Read(_FixedSpawnGroupNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x2537640FB094CD41, value); + set => Schema.SetString(_Handle, _FixedSpawnGroupNameOffset.Value, value); } + private static readonly Lazy _TimeoutIntervalOffset = new(() => Schema.GetOffset(0x2537640F354D6687), LazyThreadSafetyMode.None); + public ref float TimeoutInterval { - get => ref _Handle.AsRef(Schema.GetOffset(0x2537640F354D6687)); + get => ref _Handle.AsRef(_TimeoutIntervalOffset.Value); } + private static readonly Lazy _AutoActivateOffset = new(() => Schema.GetOffset(0x2537640F8DAF22D7), LazyThreadSafetyMode.None); + public ref bool AutoActivate { - get => ref _Handle.AsRef(Schema.GetOffset(0x2537640F8DAF22D7)); + get => ref _Handle.AsRef(_AutoActivateOffset.Value); } + private static readonly Lazy _UnloadingStartedOffset = new(() => Schema.GetOffset(0x2537640F11D7B43F), LazyThreadSafetyMode.None); + public ref bool UnloadingStarted { - get => ref _Handle.AsRef(Schema.GetOffset(0x2537640F11D7B43F)); + get => ref _Handle.AsRef(_UnloadingStartedOffset.Value); } + private static readonly Lazy _QueueActiveSpawnGroupChangeOffset = new(() => Schema.GetOffset(0x2537640FC2B29DC8), LazyThreadSafetyMode.None); + public ref bool QueueActiveSpawnGroupChange { - get => ref _Handle.AsRef(Schema.GetOffset(0x2537640FC2B29DC8)); + get => ref _Handle.AsRef(_QueueActiveSpawnGroupChangeOffset.Value); } + private static readonly Lazy _QueueFinishLoadingOffset = new(() => Schema.GetOffset(0x2537640F39EC1459), LazyThreadSafetyMode.None); + public ref bool QueueFinishLoading { - get => ref _Handle.AsRef(Schema.GetOffset(0x2537640F39EC1459)); + get => ref _Handle.AsRef(_QueueFinishLoadingOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoTargetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoTargetImpl.cs index e9accfc47..81a64e9a6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoTargetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoTargetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoTargetServerOnlyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoTargetServerOnlyImpl.cs index 6608cd560..dd6cd0509 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoTargetServerOnlyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoTargetServerOnlyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoTeleportDestinationImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoTeleportDestinationImpl.cs index b91ef3617..7ccbc3e20 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoTeleportDestinationImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoTeleportDestinationImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoVisibilityBoxImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoVisibilityBoxImpl.cs index b5f4b1d1e..a71c1ce3b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoVisibilityBoxImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoVisibilityBoxImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CInfoVisibilityBoxImpl : CBaseEntityImpl, CInfoVisibility public CInfoVisibilityBoxImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModeOffset = new(() => Schema.GetOffset(0xD226824F137F1E0E), LazyThreadSafetyMode.None); + public ref int Mode { - get => ref _Handle.AsRef(Schema.GetOffset(0xD226824F137F1E0E)); + get => ref _Handle.AsRef(_ModeOffset.Value); } + private static readonly Lazy _BoxSizeOffset = new(() => Schema.GetOffset(0xD226824FE553E487), LazyThreadSafetyMode.None); + public ref Vector BoxSize { - get => ref _Handle.AsRef(Schema.GetOffset(0xD226824FE553E487)); + get => ref _Handle.AsRef(_BoxSizeOffset.Value); } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0xD226824F6154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xD226824F6154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } public void ModeUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoWorldLayerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoWorldLayerImpl.cs index 30c8323b6..da9476a2c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoWorldLayerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInfoWorldLayerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,34 +17,48 @@ internal partial class CInfoWorldLayerImpl : CBaseEntityImpl, CInfoWorldLayer { public CInfoWorldLayerImpl(nint handle) : base(handle) { } + private static readonly Lazy _OutputOnEntitiesSpawnedOffset = new(() => Schema.GetOffset(0x74C9C61B31420D1E), LazyThreadSafetyMode.None); + public CEntityIOOutput OutputOnEntitiesSpawned { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x74C9C61B31420D1E)); + get => new CEntityIOOutputImpl(_Handle + _OutputOnEntitiesSpawnedOffset.Value); } + private static readonly Lazy _WorldNameOffset = new(() => Schema.GetOffset(0x74C9C61B29890DD8), LazyThreadSafetyMode.None); + public string WorldName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x74C9C61B29890DD8)); + var ptr = _Handle.Read(_WorldNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x74C9C61B29890DD8, value); + set => Schema.SetString(_Handle, _WorldNameOffset.Value, value); } + private static readonly Lazy _LayerNameOffset = new(() => Schema.GetOffset(0x74C9C61BEABDA295), LazyThreadSafetyMode.None); + public string LayerName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x74C9C61BEABDA295)); + var ptr = _Handle.Read(_LayerNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x74C9C61BEABDA295, value); + set => Schema.SetString(_Handle, _LayerNameOffset.Value, value); } + private static readonly Lazy _WorldLayerVisibleOffset = new(() => Schema.GetOffset(0x74C9C61BA9B3715E), LazyThreadSafetyMode.None); + public ref bool WorldLayerVisible { - get => ref _Handle.AsRef(Schema.GetOffset(0x74C9C61BA9B3715E)); + get => ref _Handle.AsRef(_WorldLayerVisibleOffset.Value); } + private static readonly Lazy _EntitiesSpawnedOffset = new(() => Schema.GetOffset(0x74C9C61BAEF9D6C8), LazyThreadSafetyMode.None); + public ref bool EntitiesSpawned { - get => ref _Handle.AsRef(Schema.GetOffset(0x74C9C61BAEF9D6C8)); + get => ref _Handle.AsRef(_EntitiesSpawnedOffset.Value); } + private static readonly Lazy _CreateAsChildSpawnGroupOffset = new(() => Schema.GetOffset(0x74C9C61B6D553CD3), LazyThreadSafetyMode.None); + public ref bool CreateAsChildSpawnGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0x74C9C61B6D553CD3)); + get => ref _Handle.AsRef(_CreateAsChildSpawnGroupOffset.Value); } + private static readonly Lazy _LayerSpawnGroupOffset = new(() => Schema.GetOffset(0x74C9C61B56D4B70E), LazyThreadSafetyMode.None); + public ref uint LayerSpawnGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0x74C9C61B56D4B70E)); + get => ref _Handle.AsRef(_LayerSpawnGroupOffset.Value); } public void WorldNameUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInputStreamUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInputStreamUpdateNodeImpl.cs index 34210de6a..f81cbc53a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInputStreamUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInputStreamUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInstancedSceneEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInstancedSceneEntityImpl.cs index d05c60d01..854119895 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInstancedSceneEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInstancedSceneEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CInstancedSceneEntityImpl : CSceneEntityImpl, CInstancedS public CInstancedSceneEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _OwnerOffset = new(() => Schema.GetOffset(0x2D9E341EF6D89572), LazyThreadSafetyMode.None); + public ref CHandle Owner { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2D9E341EF6D89572)); + get => ref _Handle.AsRef>(_OwnerOffset.Value); } + private static readonly Lazy _HadOwnerOffset = new(() => Schema.GetOffset(0x2D9E341EB77772CD), LazyThreadSafetyMode.None); + public ref bool HadOwner { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D9E341EB77772CD)); + get => ref _Handle.AsRef(_HadOwnerOffset.Value); } + private static readonly Lazy _PostSpeakDelayOffset = new(() => Schema.GetOffset(0x2D9E341E56890308), LazyThreadSafetyMode.None); + public ref float PostSpeakDelay { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D9E341E56890308)); + get => ref _Handle.AsRef(_PostSpeakDelayOffset.Value); } + private static readonly Lazy _PreDelayOffset = new(() => Schema.GetOffset(0x2D9E341E0C9072B7), LazyThreadSafetyMode.None); + public ref float PreDelay { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D9E341E0C9072B7)); + get => ref _Handle.AsRef(_PreDelayOffset.Value); } + private static readonly Lazy _IsBackgroundOffset = new(() => Schema.GetOffset(0x2D9E341E380A60AD), LazyThreadSafetyMode.None); + public ref bool IsBackground { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D9E341E380A60AD)); + get => ref _Handle.AsRef(_IsBackgroundOffset.Value); } + private static readonly Lazy _RemoveOnCompletionOffset = new(() => Schema.GetOffset(0x2D9E341E06E2CBD6), LazyThreadSafetyMode.None); + public ref bool RemoveOnCompletion { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D9E341E06E2CBD6)); + get => ref _Handle.AsRef(_RemoveOnCompletionOffset.Value); } + private static readonly Lazy _TargetOffset = new(() => Schema.GetOffset(0x2D9E341ECE35901A), LazyThreadSafetyMode.None); + public ref CHandle Target { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2D9E341ECE35901A)); + get => ref _Handle.AsRef>(_TargetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInstructorEventEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInstructorEventEntityImpl.cs index 04a5456a1..227e59bb0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInstructorEventEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CInstructorEventEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,22 +17,28 @@ internal partial class CInstructorEventEntityImpl : CPointEntityImpl, CInstructo public CInstructorEventEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x6DE6628874FF65FE), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6DE6628874FF65FE)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6DE6628874FF65FE, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _HintTargetEntityOffset = new(() => Schema.GetOffset(0x6DE662880024C1BE), LazyThreadSafetyMode.None); + public string HintTargetEntity { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6DE662880024C1BE)); + var ptr = _Handle.Read(_HintTargetEntityOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6DE662880024C1BE, value); + set => Schema.SetString(_Handle, _HintTargetEntityOffset.Value, value); } + private static readonly Lazy _TargetPlayerOffset = new(() => Schema.GetOffset(0x6DE66288BA425153), LazyThreadSafetyMode.None); + public ref CHandle TargetPlayer { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6DE66288BA425153)); + get => ref _Handle.AsRef>(_TargetPlayerOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CIntAnimParameterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CIntAnimParameterImpl.cs index d88e3f24e..fb90efaf1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CIntAnimParameterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CIntAnimParameterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CIntAnimParameterImpl : CConcreteAnimParameterImpl, CIntA public CIntAnimParameterImpl(nint handle) : base(handle) { } + private static readonly Lazy _DefaultValueOffset = new(() => Schema.GetOffset(0xD1AA42D5BBE0341F), LazyThreadSafetyMode.None); + public ref int DefaultValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1AA42D5BBE0341F)); + get => ref _Handle.AsRef(_DefaultValueOffset.Value); } + private static readonly Lazy _MinValueOffset = new(() => Schema.GetOffset(0xD1AA42D503F1334C), LazyThreadSafetyMode.None); + public ref int MinValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1AA42D503F1334C)); + get => ref _Handle.AsRef(_MinValueOffset.Value); } + private static readonly Lazy _MaxValueOffset = new(() => Schema.GetOffset(0xD1AA42D5857E5426), LazyThreadSafetyMode.None); + public ref int MaxValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1AA42D5857E5426)); + get => ref _Handle.AsRef(_MaxValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CIronSightControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CIronSightControllerImpl.cs index 50008fc46..8f7b8c013 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CIronSightControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CIronSightControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CIronSightControllerImpl : SchemaClass, CIronSightControl public CIronSightControllerImpl(nint handle) : base(handle) { } + private static readonly Lazy _IronSightAvailableOffset = new(() => Schema.GetOffset(0x9E147D3131BCE9D3), LazyThreadSafetyMode.None); + public ref bool IronSightAvailable { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E147D3131BCE9D3)); + get => ref _Handle.AsRef(_IronSightAvailableOffset.Value); } + private static readonly Lazy _IronSightAmountOffset = new(() => Schema.GetOffset(0x9E147D31D64422F6), LazyThreadSafetyMode.None); + public ref float IronSightAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E147D31D64422F6)); + get => ref _Handle.AsRef(_IronSightAmountOffset.Value); } + private static readonly Lazy _IronSightAmountGainedOffset = new(() => Schema.GetOffset(0x9E147D316631E9A0), LazyThreadSafetyMode.None); + public ref float IronSightAmountGained { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E147D316631E9A0)); + get => ref _Handle.AsRef(_IronSightAmountGainedOffset.Value); } + private static readonly Lazy _IronSightAmountBiasedOffset = new(() => Schema.GetOffset(0x9E147D31526716FA), LazyThreadSafetyMode.None); + public ref float IronSightAmountBiased { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E147D31526716FA)); + get => ref _Handle.AsRef(_IronSightAmountBiasedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemAssaultSuitImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemAssaultSuitImpl.cs index b18522bc9..ccd8bad4f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemAssaultSuitImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemAssaultSuitImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemDefuserAlias_item_defuserImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemDefuserAlias_item_defuserImpl.cs index f6acef8da..8105d444f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemDefuserAlias_item_defuserImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemDefuserAlias_item_defuserImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemDefuserImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemDefuserImpl.cs index 333149aba..050191dea 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemDefuserImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemDefuserImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CItemDefuserImpl : CItemImpl, CItemDefuser { public CItemDefuserImpl(nint handle) : base(handle) { } + private static readonly Lazy _EntitySpottedStateOffset = new(() => Schema.GetOffset(0xC9362933032B547C), LazyThreadSafetyMode.None); + public EntitySpottedState_t EntitySpottedState { - get => new EntitySpottedState_tImpl(_Handle + Schema.GetOffset(0xC9362933032B547C)); + get => new EntitySpottedState_tImpl(_Handle + _EntitySpottedStateOffset.Value); } + private static readonly Lazy _SpotRulesOffset = new(() => Schema.GetOffset(0xC9362933776CCE44), LazyThreadSafetyMode.None); + public ref int SpotRules { - get => ref _Handle.AsRef(Schema.GetOffset(0xC9362933776CCE44)); + get => ref _Handle.AsRef(_SpotRulesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemDogtagsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemDogtagsImpl.cs index 7434dd90c..5e2ef76b9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemDogtagsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemDogtagsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CItemDogtagsImpl : CItemImpl, CItemDogtags { public CItemDogtagsImpl(nint handle) : base(handle) { } + private static readonly Lazy _OwningPlayerOffset = new(() => Schema.GetOffset(0x69879A78258F5D24), LazyThreadSafetyMode.None); + public ref CHandle OwningPlayer { - get => ref _Handle.AsRef>(Schema.GetOffset(0x69879A78258F5D24)); + get => ref _Handle.AsRef>(_OwningPlayerOffset.Value); } + private static readonly Lazy _KillingPlayerOffset = new(() => Schema.GetOffset(0x69879A784617E6C6), LazyThreadSafetyMode.None); + public ref CHandle KillingPlayer { - get => ref _Handle.AsRef>(Schema.GetOffset(0x69879A784617E6C6)); + get => ref _Handle.AsRef>(_KillingPlayerOffset.Value); } public void OwningPlayerUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemGenericImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemGenericImpl.cs index b9cd955b6..72409984d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemGenericImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemGenericImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,137 +17,201 @@ internal partial class CItemGenericImpl : CItemImpl, CItemGeneric { public CItemGenericImpl(nint handle) : base(handle) { } + private static readonly Lazy _HasTriggerRadiusOffset = new(() => Schema.GetOffset(0xE5C051B6D8BAB96B), LazyThreadSafetyMode.None); + public ref bool HasTriggerRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xE5C051B6D8BAB96B)); + get => ref _Handle.AsRef(_HasTriggerRadiusOffset.Value); } + private static readonly Lazy _HasPickupRadiusOffset = new(() => Schema.GetOffset(0xE5C051B6665CA089), LazyThreadSafetyMode.None); + public ref bool HasPickupRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xE5C051B6665CA089)); + get => ref _Handle.AsRef(_HasPickupRadiusOffset.Value); } + private static readonly Lazy _PickupRadiusSqrOffset = new(() => Schema.GetOffset(0xE5C051B6B3C8BD69), LazyThreadSafetyMode.None); + public ref float PickupRadiusSqr { - get => ref _Handle.AsRef(Schema.GetOffset(0xE5C051B6B3C8BD69)); + get => ref _Handle.AsRef(_PickupRadiusSqrOffset.Value); } + private static readonly Lazy _TriggerRadiusSqrOffset = new(() => Schema.GetOffset(0xE5C051B64E7B40B7), LazyThreadSafetyMode.None); + public ref float TriggerRadiusSqr { - get => ref _Handle.AsRef(Schema.GetOffset(0xE5C051B64E7B40B7)); + get => ref _Handle.AsRef(_TriggerRadiusSqrOffset.Value); } + private static readonly Lazy _LastPickupCheckOffset = new(() => Schema.GetOffset(0xE5C051B6CE974DB1), LazyThreadSafetyMode.None); + public GameTime_t LastPickupCheck { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xE5C051B6CE974DB1)); + get => new GameTime_tImpl(_Handle + _LastPickupCheckOffset.Value); } + private static readonly Lazy _PlayerCounterListenerAddedOffset = new(() => Schema.GetOffset(0xE5C051B6198E288E), LazyThreadSafetyMode.None); + public ref bool PlayerCounterListenerAdded { - get => ref _Handle.AsRef(Schema.GetOffset(0xE5C051B6198E288E)); + get => ref _Handle.AsRef(_PlayerCounterListenerAddedOffset.Value); } + private static readonly Lazy _PlayerInTriggerRadiusOffset = new(() => Schema.GetOffset(0xE5C051B66DC39F9F), LazyThreadSafetyMode.None); + public ref bool PlayerInTriggerRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xE5C051B66DC39F9F)); + get => ref _Handle.AsRef(_PlayerInTriggerRadiusOffset.Value); } + private static readonly Lazy _SpawnParticleEffectOffset = new(() => Schema.GetOffset(0xE5C051B6576146D5), LazyThreadSafetyMode.None); + public ref CStrongHandle SpawnParticleEffect { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE5C051B6576146D5)); + get => ref _Handle.AsRef>(_SpawnParticleEffectOffset.Value); } + private static readonly Lazy _AmbientSoundEffectOffset = new(() => Schema.GetOffset(0xE5C051B65DD78861), LazyThreadSafetyMode.None); + public string AmbientSoundEffect { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE5C051B65DD78861)); + var ptr = _Handle.Read(_AmbientSoundEffectOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xE5C051B65DD78861, value); + set => Schema.SetString(_Handle, _AmbientSoundEffectOffset.Value, value); } + private static readonly Lazy _AutoStartAmbientSoundOffset = new(() => Schema.GetOffset(0xE5C051B678660D41), LazyThreadSafetyMode.None); + public ref bool AutoStartAmbientSound { - get => ref _Handle.AsRef(Schema.GetOffset(0xE5C051B678660D41)); + get => ref _Handle.AsRef(_AutoStartAmbientSoundOffset.Value); } + private static readonly Lazy _SpawnScriptFunctionOffset = new(() => Schema.GetOffset(0xE5C051B6BC2C9805), LazyThreadSafetyMode.None); + public string SpawnScriptFunction { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE5C051B6BC2C9805)); + var ptr = _Handle.Read(_SpawnScriptFunctionOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xE5C051B6BC2C9805, value); + set => Schema.SetString(_Handle, _SpawnScriptFunctionOffset.Value, value); } + private static readonly Lazy _PickupParticleEffectOffset = new(() => Schema.GetOffset(0xE5C051B6A61E7280), LazyThreadSafetyMode.None); + public ref CStrongHandle PickupParticleEffect { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE5C051B6A61E7280)); + get => ref _Handle.AsRef>(_PickupParticleEffectOffset.Value); } + private static readonly Lazy _PickupSoundEffectOffset = new(() => Schema.GetOffset(0xE5C051B6ECB75E7B), LazyThreadSafetyMode.None); + public string PickupSoundEffect { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE5C051B6ECB75E7B)); + var ptr = _Handle.Read(_PickupSoundEffectOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xE5C051B6ECB75E7B, value); + set => Schema.SetString(_Handle, _PickupSoundEffectOffset.Value, value); } + private static readonly Lazy _PickupScriptFunctionOffset = new(() => Schema.GetOffset(0xE5C051B64242F490), LazyThreadSafetyMode.None); + public string PickupScriptFunction { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE5C051B64242F490)); + var ptr = _Handle.Read(_PickupScriptFunctionOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xE5C051B64242F490, value); + set => Schema.SetString(_Handle, _PickupScriptFunctionOffset.Value, value); } + private static readonly Lazy _TimeoutParticleEffectOffset = new(() => Schema.GetOffset(0xE5C051B6FE95C38D), LazyThreadSafetyMode.None); + public ref CStrongHandle TimeoutParticleEffect { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE5C051B6FE95C38D)); + get => ref _Handle.AsRef>(_TimeoutParticleEffectOffset.Value); } + private static readonly Lazy _TimeoutSoundEffectOffset = new(() => Schema.GetOffset(0xE5C051B6F5AD0260), LazyThreadSafetyMode.None); + public string TimeoutSoundEffect { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE5C051B6F5AD0260)); + var ptr = _Handle.Read(_TimeoutSoundEffectOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xE5C051B6F5AD0260, value); + set => Schema.SetString(_Handle, _TimeoutSoundEffectOffset.Value, value); } + private static readonly Lazy _TimeoutScriptFunctionOffset = new(() => Schema.GetOffset(0xE5C051B6E8BF2F2D), LazyThreadSafetyMode.None); + public string TimeoutScriptFunction { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE5C051B6E8BF2F2D)); + var ptr = _Handle.Read(_TimeoutScriptFunctionOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xE5C051B6E8BF2F2D, value); + set => Schema.SetString(_Handle, _TimeoutScriptFunctionOffset.Value, value); } + private static readonly Lazy _PickupFilterNameOffset = new(() => Schema.GetOffset(0xE5C051B613C0B032), LazyThreadSafetyMode.None); + public string PickupFilterName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE5C051B613C0B032)); + var ptr = _Handle.Read(_PickupFilterNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xE5C051B613C0B032, value); + set => Schema.SetString(_Handle, _PickupFilterNameOffset.Value, value); } + private static readonly Lazy _PickupFilterOffset = new(() => Schema.GetOffset(0xE5C051B605240E41), LazyThreadSafetyMode.None); + public ref CHandle PickupFilter { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE5C051B605240E41)); + get => ref _Handle.AsRef>(_PickupFilterOffset.Value); } + private static readonly Lazy _OnPickupOffset = new(() => Schema.GetOffset(0xE5C051B628BC1F6C), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPickup { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xE5C051B628BC1F6C)); + get => new CEntityIOOutputImpl(_Handle + _OnPickupOffset.Value); } + private static readonly Lazy _OnTimeoutOffset = new(() => Schema.GetOffset(0xE5C051B6C5301603), LazyThreadSafetyMode.None); + public CEntityIOOutput OnTimeout { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xE5C051B6C5301603)); + get => new CEntityIOOutputImpl(_Handle + _OnTimeoutOffset.Value); } + private static readonly Lazy _OnTriggerStartTouchOffset = new(() => Schema.GetOffset(0xE5C051B66E537987), LazyThreadSafetyMode.None); + public CEntityIOOutput OnTriggerStartTouch { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xE5C051B66E537987)); + get => new CEntityIOOutputImpl(_Handle + _OnTriggerStartTouchOffset.Value); } + private static readonly Lazy _OnTriggerTouchOffset = new(() => Schema.GetOffset(0xE5C051B63BCAE033), LazyThreadSafetyMode.None); + public CEntityIOOutput OnTriggerTouch { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xE5C051B63BCAE033)); + get => new CEntityIOOutputImpl(_Handle + _OnTriggerTouchOffset.Value); } + private static readonly Lazy _OnTriggerEndTouchOffset = new(() => Schema.GetOffset(0xE5C051B63DA3CB84), LazyThreadSafetyMode.None); + public CEntityIOOutput OnTriggerEndTouch { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xE5C051B63DA3CB84)); + get => new CEntityIOOutputImpl(_Handle + _OnTriggerEndTouchOffset.Value); } + private static readonly Lazy _AllowPickupScriptFunctionOffset = new(() => Schema.GetOffset(0xE5C051B6DC2DF75F), LazyThreadSafetyMode.None); + public string AllowPickupScriptFunction { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE5C051B6DC2DF75F)); + var ptr = _Handle.Read(_AllowPickupScriptFunctionOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xE5C051B6DC2DF75F, value); + set => Schema.SetString(_Handle, _AllowPickupScriptFunctionOffset.Value, value); } + private static readonly Lazy _PickupRadiusOffset = new(() => Schema.GetOffset(0xE5C051B64EED9A9D), LazyThreadSafetyMode.None); + public ref float PickupRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xE5C051B64EED9A9D)); + get => ref _Handle.AsRef(_PickupRadiusOffset.Value); } + private static readonly Lazy _TriggerRadiusOffset = new(() => Schema.GetOffset(0xE5C051B6051F7F0F), LazyThreadSafetyMode.None); + public ref float TriggerRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xE5C051B6051F7F0F)); + get => ref _Handle.AsRef(_TriggerRadiusOffset.Value); } + private static readonly Lazy _TriggerSoundEffectOffset = new(() => Schema.GetOffset(0xE5C051B67E4EA459), LazyThreadSafetyMode.None); + public string TriggerSoundEffect { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE5C051B67E4EA459)); + var ptr = _Handle.Read(_TriggerSoundEffectOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xE5C051B67E4EA459, value); + set => Schema.SetString(_Handle, _TriggerSoundEffectOffset.Value, value); } + private static readonly Lazy _GlowWhenInTriggerOffset = new(() => Schema.GetOffset(0xE5C051B6FCAD755D), LazyThreadSafetyMode.None); + public ref bool GlowWhenInTrigger { - get => ref _Handle.AsRef(Schema.GetOffset(0xE5C051B6FCAD755D)); + get => ref _Handle.AsRef(_GlowWhenInTriggerOffset.Value); } + private static readonly Lazy _GlowColorOffset = new(() => Schema.GetOffset(0xE5C051B674A5EE03), LazyThreadSafetyMode.None); + public ref Color GlowColor { - get => ref _Handle.AsRef(Schema.GetOffset(0xE5C051B674A5EE03)); + get => ref _Handle.AsRef(_GlowColorOffset.Value); } + private static readonly Lazy _UseableOffset = new(() => Schema.GetOffset(0xE5C051B6E4DBE46C), LazyThreadSafetyMode.None); + public ref bool Useable { - get => ref _Handle.AsRef(Schema.GetOffset(0xE5C051B6E4DBE46C)); + get => ref _Handle.AsRef(_UseableOffset.Value); } + private static readonly Lazy _TriggerHelperOffset = new(() => Schema.GetOffset(0xE5C051B62DCBD7A9), LazyThreadSafetyMode.None); + public ref CHandle TriggerHelper { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE5C051B62DCBD7A9)); + get => ref _Handle.AsRef>(_TriggerHelperOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemGenericTriggerHelperImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemGenericTriggerHelperImpl.cs index bdfdfe075..20711e196 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemGenericTriggerHelperImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemGenericTriggerHelperImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CItemGenericTriggerHelperImpl : CBaseModelEntityImpl, CIt public CItemGenericTriggerHelperImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParentItemOffset = new(() => Schema.GetOffset(0x9E59EC5AEA0B7250), LazyThreadSafetyMode.None); + public ref CHandle ParentItem { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9E59EC5AEA0B7250)); + get => ref _Handle.AsRef>(_ParentItemOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemImpl.cs index 70bc87032..c63978ab5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CItemImpl : CBaseAnimGraphImpl, CItem { public CItemImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnPlayerTouchOffset = new(() => Schema.GetOffset(0x20C89FC926AD34F8), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPlayerTouch { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x20C89FC926AD34F8)); + get => new CEntityIOOutputImpl(_Handle + _OnPlayerTouchOffset.Value); } + private static readonly Lazy _OnPlayerPickupOffset = new(() => Schema.GetOffset(0x20C89FC9DE81BF25), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPlayerPickup { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x20C89FC9DE81BF25)); + get => new CEntityIOOutputImpl(_Handle + _OnPlayerPickupOffset.Value); } + private static readonly Lazy _ActivateWhenAtRestOffset = new(() => Schema.GetOffset(0x20C89FC982B8CCFF), LazyThreadSafetyMode.None); + public ref bool ActivateWhenAtRest { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C89FC982B8CCFF)); + get => ref _Handle.AsRef(_ActivateWhenAtRestOffset.Value); } + private static readonly Lazy _OnCacheInteractionOffset = new(() => Schema.GetOffset(0x20C89FC9FB2A1C2A), LazyThreadSafetyMode.None); + public CEntityIOOutput OnCacheInteraction { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x20C89FC9FB2A1C2A)); + get => new CEntityIOOutputImpl(_Handle + _OnCacheInteractionOffset.Value); } + private static readonly Lazy _OnGlovePulledOffset = new(() => Schema.GetOffset(0x20C89FC928CF9923), LazyThreadSafetyMode.None); + public CEntityIOOutput OnGlovePulled { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x20C89FC928CF9923)); + get => new CEntityIOOutputImpl(_Handle + _OnGlovePulledOffset.Value); } + private static readonly Lazy _OriginalSpawnOriginOffset = new(() => Schema.GetOffset(0x20C89FC9B6F410AF), LazyThreadSafetyMode.None); + public ref Vector OriginalSpawnOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C89FC9B6F410AF)); + get => ref _Handle.AsRef(_OriginalSpawnOriginOffset.Value); } + private static readonly Lazy _OriginalSpawnAnglesOffset = new(() => Schema.GetOffset(0x20C89FC9F7A16BD1), LazyThreadSafetyMode.None); + public ref QAngle OriginalSpawnAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C89FC9F7A16BD1)); + get => ref _Handle.AsRef(_OriginalSpawnAnglesOffset.Value); } + private static readonly Lazy _PhysStartAsleepOffset = new(() => Schema.GetOffset(0x20C89FC94BB7E9FD), LazyThreadSafetyMode.None); + public ref bool PhysStartAsleep { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C89FC94BB7E9FD)); + get => ref _Handle.AsRef(_PhysStartAsleepOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemKevlarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemKevlarImpl.cs index 6e03507ed..fe721fe7e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemKevlarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemKevlarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemSodaImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemSodaImpl.cs index fa41b2752..256ec19bd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemSodaImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItemSodaImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItem_HealthshotImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItem_HealthshotImpl.cs index ba83387c2..61955e99c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItem_HealthshotImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CItem_HealthshotImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CJiggleBoneUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CJiggleBoneUpdateNodeImpl.cs index e2f0d89af..2c016456e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CJiggleBoneUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CJiggleBoneUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CJiggleBoneUpdateNodeImpl : CUnaryUpdateNodeImpl, CJiggle public CJiggleBoneUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _OpFixedDataOffset = new(() => Schema.GetOffset(0x6CA954296960AF8C), LazyThreadSafetyMode.None); + public JiggleBoneSettingsList_t OpFixedData { - get => new JiggleBoneSettingsList_tImpl(_Handle + Schema.GetOffset(0x6CA954296960AF8C)); + get => new JiggleBoneSettingsList_tImpl(_Handle + _OpFixedDataOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CJumpHelperUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CJumpHelperUpdateNodeImpl.cs index 8f29b9aa0..a4aacd6ac 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CJumpHelperUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CJumpHelperUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,43 @@ internal partial class CJumpHelperUpdateNodeImpl : CSequenceUpdateNodeImpl, CJum public CJumpHelperUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetParamOffset = new(() => Schema.GetOffset(0xB5EA3127D85B45EB), LazyThreadSafetyMode.None); + public CAnimParamHandle TargetParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xB5EA3127D85B45EB)); + get => new CAnimParamHandleImpl(_Handle + _TargetParamOffset.Value); } + private static readonly Lazy _OriginalJumpMovementOffset = new(() => Schema.GetOffset(0xB5EA31277E064DE5), LazyThreadSafetyMode.None); + public ref Vector OriginalJumpMovement { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5EA31277E064DE5)); + get => ref _Handle.AsRef(_OriginalJumpMovementOffset.Value); } + private static readonly Lazy _OriginalJumpDurationOffset = new(() => Schema.GetOffset(0xB5EA3127DC8F3370), LazyThreadSafetyMode.None); + public ref float OriginalJumpDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5EA3127DC8F3370)); + get => ref _Handle.AsRef(_OriginalJumpDurationOffset.Value); } + private static readonly Lazy _JumpStartCycleOffset = new(() => Schema.GetOffset(0xB5EA31275B46CD7D), LazyThreadSafetyMode.None); + public ref float JumpStartCycle { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5EA31275B46CD7D)); + get => ref _Handle.AsRef(_JumpStartCycleOffset.Value); } + private static readonly Lazy _JumpEndCycleOffset = new(() => Schema.GetOffset(0xB5EA3127FDF5C656), LazyThreadSafetyMode.None); + public ref float JumpEndCycle { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5EA3127FDF5C656)); + get => ref _Handle.AsRef(_JumpEndCycleOffset.Value); } + private static readonly Lazy _CorrectionMethodOffset = new(() => Schema.GetOffset(0xB5EA31271E19BA51), LazyThreadSafetyMode.None); + public ref JumpCorrectionMethod CorrectionMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5EA31271E19BA51)); + get => ref _Handle.AsRef(_CorrectionMethodOffset.Value); } public ISchemaFixedArray TranslationAxis { get => new SchemaFixedArray(_Handle, 0xB5EA3127F062387D, 3, 1, 1); } + private static readonly Lazy _ScaleSpeedOffset = new(() => Schema.GetOffset(0xB5EA31272776330C), LazyThreadSafetyMode.None); + public ref bool ScaleSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5EA31272776330C)); + get => ref _Handle.AsRef(_ScaleSpeedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CKeepUprightImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CKeepUprightImpl.cs index 90ae9b584..264d3db09 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CKeepUprightImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CKeepUprightImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,30 +17,44 @@ internal partial class CKeepUprightImpl : CPointEntityImpl, CKeepUpright { public CKeepUprightImpl(nint handle) : base(handle) { } + private static readonly Lazy _WorldGoalAxisOffset = new(() => Schema.GetOffset(0xB65A0D30836922ED), LazyThreadSafetyMode.None); + public ref Vector WorldGoalAxis { - get => ref _Handle.AsRef(Schema.GetOffset(0xB65A0D30836922ED)); + get => ref _Handle.AsRef(_WorldGoalAxisOffset.Value); } + private static readonly Lazy _LocalTestAxisOffset = new(() => Schema.GetOffset(0xB65A0D30B678975D), LazyThreadSafetyMode.None); + public ref Vector LocalTestAxis { - get => ref _Handle.AsRef(Schema.GetOffset(0xB65A0D30B678975D)); + get => ref _Handle.AsRef(_LocalTestAxisOffset.Value); } + private static readonly Lazy _NameAttachOffset = new(() => Schema.GetOffset(0xB65A0D30BECAEF3F), LazyThreadSafetyMode.None); + public string NameAttach { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB65A0D30BECAEF3F)); + var ptr = _Handle.Read(_NameAttachOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB65A0D30BECAEF3F, value); + set => Schema.SetString(_Handle, _NameAttachOffset.Value, value); } + private static readonly Lazy _AttachedObjectOffset = new(() => Schema.GetOffset(0xB65A0D301AE8F30A), LazyThreadSafetyMode.None); + public ref CHandle AttachedObject { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB65A0D301AE8F30A)); + get => ref _Handle.AsRef>(_AttachedObjectOffset.Value); } + private static readonly Lazy _AngularLimitOffset = new(() => Schema.GetOffset(0xB65A0D30497B8D18), LazyThreadSafetyMode.None); + public ref float AngularLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0xB65A0D30497B8D18)); + get => ref _Handle.AsRef(_AngularLimitOffset.Value); } + private static readonly Lazy _ActiveOffset = new(() => Schema.GetOffset(0xB65A0D308334208F), LazyThreadSafetyMode.None); + public ref bool Active { - get => ref _Handle.AsRef(Schema.GetOffset(0xB65A0D308334208F)); + get => ref _Handle.AsRef(_ActiveOffset.Value); } + private static readonly Lazy _DampAllRotationOffset = new(() => Schema.GetOffset(0xB65A0D30AAA70B9C), LazyThreadSafetyMode.None); + public ref bool DampAllRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0xB65A0D30AAA70B9C)); + get => ref _Handle.AsRef(_DampAllRotationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CKnifeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CKnifeImpl.cs index f50f5eaca..0695b0ee2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CKnifeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CKnifeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CKnifeImpl : CCSWeaponBaseImpl, CKnife { public CKnifeImpl(nint handle) : base(handle) { } + private static readonly Lazy _FirstAttackOffset = new(() => Schema.GetOffset(0x2551A83B441D83D9), LazyThreadSafetyMode.None); + public ref bool FirstAttack { - get => ref _Handle.AsRef(Schema.GetOffset(0x2551A83B441D83D9)); + get => ref _Handle.AsRef(_FirstAttackOffset.Value); } public void FirstAttackUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLODComponentUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLODComponentUpdaterImpl.cs index f69491129..38c59497a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLODComponentUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLODComponentUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CLODComponentUpdaterImpl : CAnimComponentUpdaterImpl, CLO public CLODComponentUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _ServerLODOffset = new(() => Schema.GetOffset(0xDE1020D244E2C75), LazyThreadSafetyMode.None); + public ref int ServerLOD { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE1020D244E2C75)); + get => ref _Handle.AsRef(_ServerLODOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLeafUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLeafUpdateNodeImpl.cs index e3a0f6c99..9d8ff62ae 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLeafUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLeafUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLeanMatrixUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLeanMatrixUpdateNodeImpl.cs index a6b54df9e..b38b48b0c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLeanMatrixUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLeanMatrixUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class CLeanMatrixUpdateNodeImpl : CLeafUpdateNodeImpl, CLeanMat public CLeanMatrixUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _FrameCornersOffset = new(() => Schema.GetOffset(0xDB33C9A617463774), LazyThreadSafetyMode.None); + public SchemaUntypedField FrameCorners { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xDB33C9A617463774)); + get => new SchemaUntypedField(_Handle + _FrameCornersOffset.Value); } + private static readonly Lazy _PosesOffset = new(() => Schema.GetOffset(0xDB33C9A6B851C9F5), LazyThreadSafetyMode.None); + public SchemaUntypedField Poses { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xDB33C9A6B851C9F5)); + get => new SchemaUntypedField(_Handle + _PosesOffset.Value); } + private static readonly Lazy _DampingOffset = new(() => Schema.GetOffset(0xDB33C9A615440FB5), LazyThreadSafetyMode.None); + public CAnimInputDamping Damping { - get => new CAnimInputDampingImpl(_Handle + Schema.GetOffset(0xDB33C9A615440FB5)); + get => new CAnimInputDampingImpl(_Handle + _DampingOffset.Value); } + private static readonly Lazy _BlendSourceOffset = new(() => Schema.GetOffset(0xDB33C9A6EB9142CD), LazyThreadSafetyMode.None); + public ref AnimVectorSource BlendSource { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB33C9A6EB9142CD)); + get => ref _Handle.AsRef(_BlendSourceOffset.Value); } + private static readonly Lazy _ParamIndexOffset = new(() => Schema.GetOffset(0xDB33C9A661990A86), LazyThreadSafetyMode.None); + public CAnimParamHandle ParamIndex { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xDB33C9A661990A86)); + get => new CAnimParamHandleImpl(_Handle + _ParamIndexOffset.Value); } + private static readonly Lazy _VerticalAxisOffset = new(() => Schema.GetOffset(0xDB33C9A6F82ED1C6), LazyThreadSafetyMode.None); + public ref Vector VerticalAxis { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB33C9A6F82ED1C6)); + get => ref _Handle.AsRef(_VerticalAxisOffset.Value); } + private static readonly Lazy _HorizontalAxisOffset = new(() => Schema.GetOffset(0xDB33C9A6FE8AD688), LazyThreadSafetyMode.None); + public ref Vector HorizontalAxis { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB33C9A6FE8AD688)); + get => ref _Handle.AsRef(_HorizontalAxisOffset.Value); } + private static readonly Lazy _SequenceOffset = new(() => Schema.GetOffset(0xDB33C9A6E0A0598E), LazyThreadSafetyMode.None); + public HSequence Sequence { - get => new HSequenceImpl(_Handle + Schema.GetOffset(0xDB33C9A6E0A0598E)); + get => new HSequenceImpl(_Handle + _SequenceOffset.Value); } + private static readonly Lazy _MaxValueOffset = new(() => Schema.GetOffset(0xDB33C9A6D0A5C87C), LazyThreadSafetyMode.None); + public ref float MaxValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB33C9A6D0A5C87C)); + get => ref _Handle.AsRef(_MaxValueOffset.Value); } + private static readonly Lazy _SequenceMaxFrameOffset = new(() => Schema.GetOffset(0xDB33C9A65FD0AE0B), LazyThreadSafetyMode.None); + public ref int SequenceMaxFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB33C9A65FD0AE0B)); + get => ref _Handle.AsRef(_SequenceMaxFrameOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightComponentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightComponentImpl.cs index 21abab712..f0da3f108 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightComponentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightComponentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,219 +17,359 @@ internal partial class CLightComponentImpl : CEntityComponentImpl, CLightCompone public CLightComponentImpl(nint handle) : base(handle) { } + private static readonly Lazy ___m_pChainEntityOffset = new(() => Schema.GetOffset(0x15B1C6A5F63F0E7D), LazyThreadSafetyMode.None); + public ref CNetworkVarChainer __m_pChainEntity { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5F63F0E7D)); + get => ref _Handle.AsRef(___m_pChainEntityOffset.Value); } + private static readonly Lazy _ColorOffset = new(() => Schema.GetOffset(0x15B1C6A5D7D017D8), LazyThreadSafetyMode.None); + public ref Color Color { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5D7D017D8)); + get => ref _Handle.AsRef(_ColorOffset.Value); } + private static readonly Lazy _SecondaryColorOffset = new(() => Schema.GetOffset(0x15B1C6A549D78994), LazyThreadSafetyMode.None); + public ref Color SecondaryColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A549D78994)); + get => ref _Handle.AsRef(_SecondaryColorOffset.Value); } + private static readonly Lazy _BrightnessOffset = new(() => Schema.GetOffset(0x15B1C6A59132D314), LazyThreadSafetyMode.None); + public ref float Brightness { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A59132D314)); + get => ref _Handle.AsRef(_BrightnessOffset.Value); } + private static readonly Lazy _BrightnessScaleOffset = new(() => Schema.GetOffset(0x15B1C6A55EFC3AAE), LazyThreadSafetyMode.None); + public ref float BrightnessScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A55EFC3AAE)); + get => ref _Handle.AsRef(_BrightnessScaleOffset.Value); } + private static readonly Lazy _BrightnessMultOffset = new(() => Schema.GetOffset(0x15B1C6A5EAC09432), LazyThreadSafetyMode.None); + public ref float BrightnessMult { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5EAC09432)); + get => ref _Handle.AsRef(_BrightnessMultOffset.Value); } + private static readonly Lazy _RangeOffset = new(() => Schema.GetOffset(0x15B1C6A53FC92844), LazyThreadSafetyMode.None); + public ref float Range { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A53FC92844)); + get => ref _Handle.AsRef(_RangeOffset.Value); } + private static readonly Lazy _FalloffOffset = new(() => Schema.GetOffset(0x15B1C6A5FA143DCB), LazyThreadSafetyMode.None); + public ref float Falloff { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5FA143DCB)); + get => ref _Handle.AsRef(_FalloffOffset.Value); } + private static readonly Lazy _Attenuation0Offset = new(() => Schema.GetOffset(0x15B1C6A5F1CACD03), LazyThreadSafetyMode.None); + public ref float Attenuation0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5F1CACD03)); + get => ref _Handle.AsRef(_Attenuation0Offset.Value); } + private static readonly Lazy _Attenuation1Offset = new(() => Schema.GetOffset(0x15B1C6A5F0CACB70), LazyThreadSafetyMode.None); + public ref float Attenuation1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5F0CACB70)); + get => ref _Handle.AsRef(_Attenuation1Offset.Value); } + private static readonly Lazy _Attenuation2Offset = new(() => Schema.GetOffset(0x15B1C6A5F3CAD029), LazyThreadSafetyMode.None); + public ref float Attenuation2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5F3CAD029)); + get => ref _Handle.AsRef(_Attenuation2Offset.Value); } + private static readonly Lazy _ThetaOffset = new(() => Schema.GetOffset(0x15B1C6A5F8B2ACC1), LazyThreadSafetyMode.None); + public ref float Theta { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5F8B2ACC1)); + get => ref _Handle.AsRef(_ThetaOffset.Value); } + private static readonly Lazy _PhiOffset = new(() => Schema.GetOffset(0x15B1C6A5957450E2), LazyThreadSafetyMode.None); + public ref float Phi { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5957450E2)); + get => ref _Handle.AsRef(_PhiOffset.Value); } + private static readonly Lazy _LightCookieOffset = new(() => Schema.GetOffset(0x15B1C6A50609D103), LazyThreadSafetyMode.None); + public ref CStrongHandle LightCookie { - get => ref _Handle.AsRef>(Schema.GetOffset(0x15B1C6A50609D103)); + get => ref _Handle.AsRef>(_LightCookieOffset.Value); } + private static readonly Lazy _CascadesOffset = new(() => Schema.GetOffset(0x15B1C6A567FE3EFE), LazyThreadSafetyMode.None); + public ref int Cascades { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A567FE3EFE)); + get => ref _Handle.AsRef(_CascadesOffset.Value); } + private static readonly Lazy _CastShadowsOffset = new(() => Schema.GetOffset(0x15B1C6A551564EBB), LazyThreadSafetyMode.None); + public ref int CastShadows { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A551564EBB)); + get => ref _Handle.AsRef(_CastShadowsOffset.Value); } + private static readonly Lazy _ShadowWidthOffset = new(() => Schema.GetOffset(0x15B1C6A5C671948F), LazyThreadSafetyMode.None); + public ref int ShadowWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5C671948F)); + get => ref _Handle.AsRef(_ShadowWidthOffset.Value); } + private static readonly Lazy _ShadowHeightOffset = new(() => Schema.GetOffset(0x15B1C6A5EC2D0CB2), LazyThreadSafetyMode.None); + public ref int ShadowHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5EC2D0CB2)); + get => ref _Handle.AsRef(_ShadowHeightOffset.Value); } + private static readonly Lazy _RenderDiffuseOffset = new(() => Schema.GetOffset(0x15B1C6A5DEDF2F65), LazyThreadSafetyMode.None); + public ref bool RenderDiffuse { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5DEDF2F65)); + get => ref _Handle.AsRef(_RenderDiffuseOffset.Value); } + private static readonly Lazy _RenderSpecularOffset = new(() => Schema.GetOffset(0x15B1C6A53728DE0C), LazyThreadSafetyMode.None); + public ref int RenderSpecular { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A53728DE0C)); + get => ref _Handle.AsRef(_RenderSpecularOffset.Value); } + private static readonly Lazy _RenderTransmissiveOffset = new(() => Schema.GetOffset(0x15B1C6A5186B09E9), LazyThreadSafetyMode.None); + public ref bool RenderTransmissive { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5186B09E9)); + get => ref _Handle.AsRef(_RenderTransmissiveOffset.Value); } + private static readonly Lazy _OrthoLightWidthOffset = new(() => Schema.GetOffset(0x15B1C6A53E465C73), LazyThreadSafetyMode.None); + public ref float OrthoLightWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A53E465C73)); + get => ref _Handle.AsRef(_OrthoLightWidthOffset.Value); } + private static readonly Lazy _OrthoLightHeightOffset = new(() => Schema.GetOffset(0x15B1C6A525F3CD2E), LazyThreadSafetyMode.None); + public ref float OrthoLightHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A525F3CD2E)); + get => ref _Handle.AsRef(_OrthoLightHeightOffset.Value); } + private static readonly Lazy _StyleOffset = new(() => Schema.GetOffset(0x15B1C6A5F6004492), LazyThreadSafetyMode.None); + public ref int Style { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5F6004492)); + get => ref _Handle.AsRef(_StyleOffset.Value); } + private static readonly Lazy _PatternOffset = new(() => Schema.GetOffset(0x15B1C6A52E3F72A9), LazyThreadSafetyMode.None); + public string Pattern { get { - var ptr = _Handle.Read(Schema.GetOffset(0x15B1C6A52E3F72A9)); + var ptr = _Handle.Read(_PatternOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x15B1C6A52E3F72A9, value); + set => Schema.SetString(_Handle, _PatternOffset.Value, value); } + private static readonly Lazy _CascadeRenderStaticObjectsOffset = new(() => Schema.GetOffset(0x15B1C6A51197D9D5), LazyThreadSafetyMode.None); + public ref int CascadeRenderStaticObjects { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A51197D9D5)); + get => ref _Handle.AsRef(_CascadeRenderStaticObjectsOffset.Value); } + private static readonly Lazy _ShadowCascadeCrossFadeOffset = new(() => Schema.GetOffset(0x15B1C6A5AB97244B), LazyThreadSafetyMode.None); + public ref float ShadowCascadeCrossFade { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5AB97244B)); + get => ref _Handle.AsRef(_ShadowCascadeCrossFadeOffset.Value); } + private static readonly Lazy _ShadowCascadeDistanceFadeOffset = new(() => Schema.GetOffset(0x15B1C6A5FD0BFBEE), LazyThreadSafetyMode.None); + public ref float ShadowCascadeDistanceFade { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5FD0BFBEE)); + get => ref _Handle.AsRef(_ShadowCascadeDistanceFadeOffset.Value); } + private static readonly Lazy _ShadowCascadeDistance0Offset = new(() => Schema.GetOffset(0x15B1C6A59431AE78), LazyThreadSafetyMode.None); + public ref float ShadowCascadeDistance0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A59431AE78)); + get => ref _Handle.AsRef(_ShadowCascadeDistance0Offset.Value); } + private static readonly Lazy _ShadowCascadeDistance1Offset = new(() => Schema.GetOffset(0x15B1C6A59531B00B), LazyThreadSafetyMode.None); + public ref float ShadowCascadeDistance1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A59531B00B)); + get => ref _Handle.AsRef(_ShadowCascadeDistance1Offset.Value); } + private static readonly Lazy _ShadowCascadeDistance2Offset = new(() => Schema.GetOffset(0x15B1C6A59631B19E), LazyThreadSafetyMode.None); + public ref float ShadowCascadeDistance2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A59631B19E)); + get => ref _Handle.AsRef(_ShadowCascadeDistance2Offset.Value); } + private static readonly Lazy _ShadowCascadeDistance3Offset = new(() => Schema.GetOffset(0x15B1C6A59731B331), LazyThreadSafetyMode.None); + public ref float ShadowCascadeDistance3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A59731B331)); + get => ref _Handle.AsRef(_ShadowCascadeDistance3Offset.Value); } + private static readonly Lazy _ShadowCascadeResolution0Offset = new(() => Schema.GetOffset(0x15B1C6A58B5CD1AD), LazyThreadSafetyMode.None); + public ref int ShadowCascadeResolution0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A58B5CD1AD)); + get => ref _Handle.AsRef(_ShadowCascadeResolution0Offset.Value); } + private static readonly Lazy _ShadowCascadeResolution1Offset = new(() => Schema.GetOffset(0x15B1C6A58A5CD01A), LazyThreadSafetyMode.None); + public ref int ShadowCascadeResolution1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A58A5CD01A)); + get => ref _Handle.AsRef(_ShadowCascadeResolution1Offset.Value); } + private static readonly Lazy _ShadowCascadeResolution2Offset = new(() => Schema.GetOffset(0x15B1C6A5895CCE87), LazyThreadSafetyMode.None); + public ref int ShadowCascadeResolution2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5895CCE87)); + get => ref _Handle.AsRef(_ShadowCascadeResolution2Offset.Value); } + private static readonly Lazy _ShadowCascadeResolution3Offset = new(() => Schema.GetOffset(0x15B1C6A5885CCCF4), LazyThreadSafetyMode.None); + public ref int ShadowCascadeResolution3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5885CCCF4)); + get => ref _Handle.AsRef(_ShadowCascadeResolution3Offset.Value); } + private static readonly Lazy _UsesBakedShadowingOffset = new(() => Schema.GetOffset(0x15B1C6A523C6D880), LazyThreadSafetyMode.None); + public ref bool UsesBakedShadowing { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A523C6D880)); + get => ref _Handle.AsRef(_UsesBakedShadowingOffset.Value); } + private static readonly Lazy _ShadowPriorityOffset = new(() => Schema.GetOffset(0x15B1C6A515B296B9), LazyThreadSafetyMode.None); + public ref int ShadowPriority { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A515B296B9)); + get => ref _Handle.AsRef(_ShadowPriorityOffset.Value); } + private static readonly Lazy _BakedShadowIndexOffset = new(() => Schema.GetOffset(0x15B1C6A5D4F129E0), LazyThreadSafetyMode.None); + public ref int BakedShadowIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5D4F129E0)); + get => ref _Handle.AsRef(_BakedShadowIndexOffset.Value); } + private static readonly Lazy _LightPathUniqueIdOffset = new(() => Schema.GetOffset(0x15B1C6A58626C8FE), LazyThreadSafetyMode.None); + public ref int LightPathUniqueId { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A58626C8FE)); + get => ref _Handle.AsRef(_LightPathUniqueIdOffset.Value); } + private static readonly Lazy _LightMapUniqueIdOffset = new(() => Schema.GetOffset(0x15B1C6A58E111BB5), LazyThreadSafetyMode.None); + public ref int LightMapUniqueId { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A58E111BB5)); + get => ref _Handle.AsRef(_LightMapUniqueIdOffset.Value); } + private static readonly Lazy _RenderToCubemapsOffset = new(() => Schema.GetOffset(0x15B1C6A58A23364A), LazyThreadSafetyMode.None); + public ref bool RenderToCubemaps { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A58A23364A)); + get => ref _Handle.AsRef(_RenderToCubemapsOffset.Value); } + private static readonly Lazy _AllowSSTGenerationOffset = new(() => Schema.GetOffset(0x15B1C6A54E93C4FA), LazyThreadSafetyMode.None); + public ref bool AllowSSTGeneration { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A54E93C4FA)); + get => ref _Handle.AsRef(_AllowSSTGenerationOffset.Value); } + private static readonly Lazy _DirectLightOffset = new(() => Schema.GetOffset(0x15B1C6A5DEC0AAB4), LazyThreadSafetyMode.None); + public ref int DirectLight { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5DEC0AAB4)); + get => ref _Handle.AsRef(_DirectLightOffset.Value); } + private static readonly Lazy _IndirectLightOffset = new(() => Schema.GetOffset(0x15B1C6A5E5EAAFBD), LazyThreadSafetyMode.None); + public ref int IndirectLight { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5E5EAAFBD)); + get => ref _Handle.AsRef(_IndirectLightOffset.Value); } + private static readonly Lazy _FadeMinDistOffset = new(() => Schema.GetOffset(0x15B1C6A545D2BAAB), LazyThreadSafetyMode.None); + public ref float FadeMinDist { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A545D2BAAB)); + get => ref _Handle.AsRef(_FadeMinDistOffset.Value); } + private static readonly Lazy _FadeMaxDistOffset = new(() => Schema.GetOffset(0x15B1C6A5ACCE9CB9), LazyThreadSafetyMode.None); + public ref float FadeMaxDist { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5ACCE9CB9)); + get => ref _Handle.AsRef(_FadeMaxDistOffset.Value); } + private static readonly Lazy _ShadowFadeMinDistOffset = new(() => Schema.GetOffset(0x15B1C6A589AB0803), LazyThreadSafetyMode.None); + public ref float ShadowFadeMinDist { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A589AB0803)); + get => ref _Handle.AsRef(_ShadowFadeMinDistOffset.Value); } + private static readonly Lazy _ShadowFadeMaxDistOffset = new(() => Schema.GetOffset(0x15B1C6A534C66901), LazyThreadSafetyMode.None); + public ref float ShadowFadeMaxDist { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A534C66901)); + get => ref _Handle.AsRef(_ShadowFadeMaxDistOffset.Value); } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0x15B1C6A56154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A56154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } + private static readonly Lazy _FlickerOffset = new(() => Schema.GetOffset(0x15B1C6A5D679F96F), LazyThreadSafetyMode.None); + public ref bool Flicker { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5D679F96F)); + get => ref _Handle.AsRef(_FlickerOffset.Value); } + private static readonly Lazy _PrecomputedFieldsValidOffset = new(() => Schema.GetOffset(0x15B1C6A591C883D6), LazyThreadSafetyMode.None); + public ref bool PrecomputedFieldsValid { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A591C883D6)); + get => ref _Handle.AsRef(_PrecomputedFieldsValidOffset.Value); } + private static readonly Lazy _PrecomputedBoundsMinsOffset = new(() => Schema.GetOffset(0x15B1C6A56F3FE3C1), LazyThreadSafetyMode.None); + public ref Vector PrecomputedBoundsMins { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A56F3FE3C1)); + get => ref _Handle.AsRef(_PrecomputedBoundsMinsOffset.Value); } + private static readonly Lazy _PrecomputedBoundsMaxsOffset = new(() => Schema.GetOffset(0x15B1C6A5C5E5BC03), LazyThreadSafetyMode.None); + public ref Vector PrecomputedBoundsMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5C5E5BC03)); + get => ref _Handle.AsRef(_PrecomputedBoundsMaxsOffset.Value); } + private static readonly Lazy _PrecomputedOBBOriginOffset = new(() => Schema.GetOffset(0x15B1C6A5D6D011C8), LazyThreadSafetyMode.None); + public ref Vector PrecomputedOBBOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5D6D011C8)); + get => ref _Handle.AsRef(_PrecomputedOBBOriginOffset.Value); } + private static readonly Lazy _PrecomputedOBBAnglesOffset = new(() => Schema.GetOffset(0x15B1C6A589054822), LazyThreadSafetyMode.None); + public ref QAngle PrecomputedOBBAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A589054822)); + get => ref _Handle.AsRef(_PrecomputedOBBAnglesOffset.Value); } + private static readonly Lazy _PrecomputedOBBExtentOffset = new(() => Schema.GetOffset(0x15B1C6A585AE2732), LazyThreadSafetyMode.None); + public ref Vector PrecomputedOBBExtent { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A585AE2732)); + get => ref _Handle.AsRef(_PrecomputedOBBExtentOffset.Value); } + private static readonly Lazy _PrecomputedMaxRangeOffset = new(() => Schema.GetOffset(0x15B1C6A5ACFF5B3C), LazyThreadSafetyMode.None); + public ref float PrecomputedMaxRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5ACFF5B3C)); + get => ref _Handle.AsRef(_PrecomputedMaxRangeOffset.Value); } + private static readonly Lazy _FogLightingModeOffset = new(() => Schema.GetOffset(0x15B1C6A568C76B34), LazyThreadSafetyMode.None); + public ref int FogLightingMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A568C76B34)); + get => ref _Handle.AsRef(_FogLightingModeOffset.Value); } + private static readonly Lazy _FogContributionStengthOffset = new(() => Schema.GetOffset(0x15B1C6A535236D54), LazyThreadSafetyMode.None); + public ref float FogContributionStength { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A535236D54)); + get => ref _Handle.AsRef(_FogContributionStengthOffset.Value); } + private static readonly Lazy _NearClipPlaneOffset = new(() => Schema.GetOffset(0x15B1C6A562E34A17), LazyThreadSafetyMode.None); + public ref float NearClipPlane { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A562E34A17)); + get => ref _Handle.AsRef(_NearClipPlaneOffset.Value); } + private static readonly Lazy _SkyColorOffset = new(() => Schema.GetOffset(0x15B1C6A51DCFBBF9), LazyThreadSafetyMode.None); + public ref Color SkyColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A51DCFBBF9)); + get => ref _Handle.AsRef(_SkyColorOffset.Value); } + private static readonly Lazy _SkyIntensityOffset = new(() => Schema.GetOffset(0x15B1C6A5C3AB3B4D), LazyThreadSafetyMode.None); + public ref float SkyIntensity { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5C3AB3B4D)); + get => ref _Handle.AsRef(_SkyIntensityOffset.Value); } + private static readonly Lazy _SkyAmbientBounceOffset = new(() => Schema.GetOffset(0x15B1C6A57995A96A), LazyThreadSafetyMode.None); + public ref Color SkyAmbientBounce { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A57995A96A)); + get => ref _Handle.AsRef(_SkyAmbientBounceOffset.Value); } + private static readonly Lazy _UseSecondaryColorOffset = new(() => Schema.GetOffset(0x15B1C6A5447EF561), LazyThreadSafetyMode.None); + public ref bool UseSecondaryColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5447EF561)); + get => ref _Handle.AsRef(_UseSecondaryColorOffset.Value); } + private static readonly Lazy _MixedShadowsOffset = new(() => Schema.GetOffset(0x15B1C6A5C557957D), LazyThreadSafetyMode.None); + public ref bool MixedShadows { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5C557957D)); + get => ref _Handle.AsRef(_MixedShadowsOffset.Value); } + private static readonly Lazy _LightStyleStartTimeOffset = new(() => Schema.GetOffset(0x15B1C6A5A3B159A3), LazyThreadSafetyMode.None); + public GameTime_t LightStyleStartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x15B1C6A5A3B159A3)); + get => new GameTime_tImpl(_Handle + _LightStyleStartTimeOffset.Value); } + private static readonly Lazy _CapsuleLengthOffset = new(() => Schema.GetOffset(0x15B1C6A5F692B376), LazyThreadSafetyMode.None); + public ref float CapsuleLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5F692B376)); + get => ref _Handle.AsRef(_CapsuleLengthOffset.Value); } + private static readonly Lazy _MinRoughnessOffset = new(() => Schema.GetOffset(0x15B1C6A5B3A6FDC9), LazyThreadSafetyMode.None); + public ref float MinRoughness { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A5B3A6FDC9)); + get => ref _Handle.AsRef(_MinRoughnessOffset.Value); } + private static readonly Lazy _PvsModifyEntityOffset = new(() => Schema.GetOffset(0x15B1C6A533895595), LazyThreadSafetyMode.None); + public ref bool PvsModifyEntity { - get => ref _Handle.AsRef(Schema.GetOffset(0x15B1C6A533895595)); + get => ref _Handle.AsRef(_PvsModifyEntityOffset.Value); } public void ColorUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightDirectionalEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightDirectionalEntityImpl.cs index 8eb49a775..cd66ba51b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightDirectionalEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightDirectionalEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightEntityImpl.cs index c100f9a0d..9dd0ddf15 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,9 +17,11 @@ internal partial class CLightEntityImpl : CBaseModelEntityImpl, CLightEntity { public CLightEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _CLightComponentOffset = new(() => Schema.GetOffset(0xA3C95F05104F0185), LazyThreadSafetyMode.None); + public CLightComponent? CLightComponent { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA3C95F05104F0185)); + var ptr = _Handle.Read(_CLightComponentOffset.Value); return ptr.IsValidPtr() ? new CLightComponentImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightEnvironmentEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightEnvironmentEntityImpl.cs index 3a28b83b1..2e1d01f3e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightEnvironmentEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightEnvironmentEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightOrthoEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightOrthoEntityImpl.cs index a9f284f5f..7c2bf6000 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightOrthoEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightOrthoEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightSpotEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightSpotEntityImpl.cs index 9e7ac626c..82b1df12a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightSpotEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLightSpotEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicAchievementImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicAchievementImpl.cs index 31c0928c5..f49f6562a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicAchievementImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicAchievementImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class CLogicAchievementImpl : CLogicalEntityImpl, CLogicAchieve public CLogicAchievementImpl(nint handle) : base(handle) { } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0xE8C4579F3A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xE8C4579F3A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _AchievementEventIDOffset = new(() => Schema.GetOffset(0xE8C4579F12AB7E15), LazyThreadSafetyMode.None); + public string AchievementEventID { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE8C4579F12AB7E15)); + var ptr = _Handle.Read(_AchievementEventIDOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xE8C4579F12AB7E15, value); + set => Schema.SetString(_Handle, _AchievementEventIDOffset.Value, value); } + private static readonly Lazy _OnFiredOffset = new(() => Schema.GetOffset(0xE8C4579F84825730), LazyThreadSafetyMode.None); + public CEntityIOOutput OnFired { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xE8C4579F84825730)); + get => new CEntityIOOutputImpl(_Handle + _OnFiredOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicActiveAutosaveImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicActiveAutosaveImpl.cs index 076af6565..060837e1e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicActiveAutosaveImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicActiveAutosaveImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CLogicActiveAutosaveImpl : CLogicAutosaveImpl, CLogicActi public CLogicActiveAutosaveImpl(nint handle) : base(handle) { } + private static readonly Lazy _TriggerHitPointsOffset = new(() => Schema.GetOffset(0x9BBDEF887D8FAE5B), LazyThreadSafetyMode.None); + public ref int TriggerHitPoints { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BBDEF887D8FAE5B)); + get => ref _Handle.AsRef(_TriggerHitPointsOffset.Value); } + private static readonly Lazy _TimeToTriggerOffset = new(() => Schema.GetOffset(0x9BBDEF880C3F780D), LazyThreadSafetyMode.None); + public ref float TimeToTrigger { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BBDEF880C3F780D)); + get => ref _Handle.AsRef(_TimeToTriggerOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0x9BBDEF8867FE9DC4), LazyThreadSafetyMode.None); + public GameTime_t StartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x9BBDEF8867FE9DC4)); + get => new GameTime_tImpl(_Handle + _StartTimeOffset.Value); } + private static readonly Lazy _DangerousTimeOffset = new(() => Schema.GetOffset(0x9BBDEF8819BC5644), LazyThreadSafetyMode.None); + public ref float DangerousTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BBDEF8819BC5644)); + get => ref _Handle.AsRef(_DangerousTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicAutoImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicAutoImpl.cs index 5dab33cc7..4aad3dd24 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicAutoImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicAutoImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,42 +17,64 @@ internal partial class CLogicAutoImpl : CBaseEntityImpl, CLogicAuto { public CLogicAutoImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnMapSpawnOffset = new(() => Schema.GetOffset(0x1FA33DC758EC03E5), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMapSpawn { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1FA33DC758EC03E5)); + get => new CEntityIOOutputImpl(_Handle + _OnMapSpawnOffset.Value); } + private static readonly Lazy _OnDemoMapSpawnOffset = new(() => Schema.GetOffset(0x1FA33DC7798F0A72), LazyThreadSafetyMode.None); + public CEntityIOOutput OnDemoMapSpawn { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1FA33DC7798F0A72)); + get => new CEntityIOOutputImpl(_Handle + _OnDemoMapSpawnOffset.Value); } + private static readonly Lazy _OnNewGameOffset = new(() => Schema.GetOffset(0x1FA33DC7F77845A4), LazyThreadSafetyMode.None); + public CEntityIOOutput OnNewGame { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1FA33DC7F77845A4)); + get => new CEntityIOOutputImpl(_Handle + _OnNewGameOffset.Value); } + private static readonly Lazy _OnLoadGameOffset = new(() => Schema.GetOffset(0x1FA33DC748F2D9A6), LazyThreadSafetyMode.None); + public CEntityIOOutput OnLoadGame { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1FA33DC748F2D9A6)); + get => new CEntityIOOutputImpl(_Handle + _OnLoadGameOffset.Value); } + private static readonly Lazy _OnMapTransitionOffset = new(() => Schema.GetOffset(0x1FA33DC7EEE1CA9D), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMapTransition { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1FA33DC7EEE1CA9D)); + get => new CEntityIOOutputImpl(_Handle + _OnMapTransitionOffset.Value); } + private static readonly Lazy _OnBackgroundMapOffset = new(() => Schema.GetOffset(0x1FA33DC7FD54329A), LazyThreadSafetyMode.None); + public CEntityIOOutput OnBackgroundMap { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1FA33DC7FD54329A)); + get => new CEntityIOOutputImpl(_Handle + _OnBackgroundMapOffset.Value); } + private static readonly Lazy _OnMultiNewMapOffset = new(() => Schema.GetOffset(0x1FA33DC74D5DCA0D), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMultiNewMap { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1FA33DC74D5DCA0D)); + get => new CEntityIOOutputImpl(_Handle + _OnMultiNewMapOffset.Value); } + private static readonly Lazy _OnMultiNewRoundOffset = new(() => Schema.GetOffset(0x1FA33DC70D4B293F), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMultiNewRound { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1FA33DC70D4B293F)); + get => new CEntityIOOutputImpl(_Handle + _OnMultiNewRoundOffset.Value); } + private static readonly Lazy _OnVREnabledOffset = new(() => Schema.GetOffset(0x1FA33DC79A1AB4C1), LazyThreadSafetyMode.None); + public CEntityIOOutput OnVREnabled { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1FA33DC79A1AB4C1)); + get => new CEntityIOOutputImpl(_Handle + _OnVREnabledOffset.Value); } + private static readonly Lazy _OnVRNotEnabledOffset = new(() => Schema.GetOffset(0x1FA33DC745E8A1DA), LazyThreadSafetyMode.None); + public CEntityIOOutput OnVRNotEnabled { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1FA33DC745E8A1DA)); + get => new CEntityIOOutputImpl(_Handle + _OnVRNotEnabledOffset.Value); } + private static readonly Lazy _GlobalstateOffset = new(() => Schema.GetOffset(0x1FA33DC777A86653), LazyThreadSafetyMode.None); + public string Globalstate { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1FA33DC777A86653)); + var ptr = _Handle.Read(_GlobalstateOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1FA33DC777A86653, value); + set => Schema.SetString(_Handle, _GlobalstateOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicAutosaveImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicAutosaveImpl.cs index 58cf1f015..836c05ed9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicAutosaveImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicAutosaveImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CLogicAutosaveImpl : CLogicalEntityImpl, CLogicAutosave { public CLogicAutosaveImpl(nint handle) : base(handle) { } + private static readonly Lazy _ForceNewLevelUnitOffset = new(() => Schema.GetOffset(0xE30CCBF21473BFDE), LazyThreadSafetyMode.None); + public ref bool ForceNewLevelUnit { - get => ref _Handle.AsRef(Schema.GetOffset(0xE30CCBF21473BFDE)); + get => ref _Handle.AsRef(_ForceNewLevelUnitOffset.Value); } + private static readonly Lazy _MinHitPointsOffset = new(() => Schema.GetOffset(0xE30CCBF22C7E0C57), LazyThreadSafetyMode.None); + public ref int MinHitPoints { - get => ref _Handle.AsRef(Schema.GetOffset(0xE30CCBF22C7E0C57)); + get => ref _Handle.AsRef(_MinHitPointsOffset.Value); } + private static readonly Lazy _MinHitPointsToCommitOffset = new(() => Schema.GetOffset(0xE30CCBF23AAC1C7F), LazyThreadSafetyMode.None); + public ref int MinHitPointsToCommit { - get => ref _Handle.AsRef(Schema.GetOffset(0xE30CCBF23AAC1C7F)); + get => ref _Handle.AsRef(_MinHitPointsToCommitOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicBranchImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicBranchImpl.cs index de3cb976c..41090c9bf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicBranchImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicBranchImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CLogicBranchImpl : CLogicalEntityImpl, CLogicBranch { public CLogicBranchImpl(nint handle) : base(handle) { } + private static readonly Lazy _InValueOffset = new(() => Schema.GetOffset(0x5B700E1052400A1F), LazyThreadSafetyMode.None); + public ref bool InValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B700E1052400A1F)); + get => ref _Handle.AsRef(_InValueOffset.Value); } + private static readonly Lazy _ListenersOffset = new(() => Schema.GetOffset(0x5B700E10E4AECE86), LazyThreadSafetyMode.None); + public ref CUtlVector> Listeners { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x5B700E10E4AECE86)); + get => ref _Handle.AsRef>>(_ListenersOffset.Value); } + private static readonly Lazy _OnTrueOffset = new(() => Schema.GetOffset(0x5B700E106EAE5D88), LazyThreadSafetyMode.None); + public CEntityIOOutput OnTrue { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x5B700E106EAE5D88)); + get => new CEntityIOOutputImpl(_Handle + _OnTrueOffset.Value); } + private static readonly Lazy _OnFalseOffset = new(() => Schema.GetOffset(0x5B700E104973AF03), LazyThreadSafetyMode.None); + public CEntityIOOutput OnFalse { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x5B700E104973AF03)); + get => new CEntityIOOutputImpl(_Handle + _OnFalseOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicBranchListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicBranchListImpl.cs index 472f232bb..988e5191b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicBranchListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicBranchListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,27 +17,39 @@ internal partial class CLogicBranchListImpl : CLogicalEntityImpl, CLogicBranchLi public CLogicBranchListImpl(nint handle) : base(handle) { } + private static readonly Lazy _LogicBranchNamesOffset = new(() => Schema.GetOffset(0xB21E12B82C1677D7), LazyThreadSafetyMode.None); + public string LogicBranchNames { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB21E12B82C1677D7)); + var ptr = _Handle.Read(_LogicBranchNamesOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB21E12B82C1677D7, value); + set => Schema.SetString(_Handle, _LogicBranchNamesOffset.Value, value); } + private static readonly Lazy _LogicBranchListOffset = new(() => Schema.GetOffset(0xB21E12B8E4DEC285), LazyThreadSafetyMode.None); + public ref CUtlVector> LogicBranchList { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xB21E12B8E4DEC285)); + get => ref _Handle.AsRef>>(_LogicBranchListOffset.Value); } + private static readonly Lazy _LastStateOffset = new(() => Schema.GetOffset(0xB21E12B89A391AC5), LazyThreadSafetyMode.None); + public ref CLogicBranchList__LogicBranchListenerLastState_t LastState { - get => ref _Handle.AsRef(Schema.GetOffset(0xB21E12B89A391AC5)); + get => ref _Handle.AsRef(_LastStateOffset.Value); } + private static readonly Lazy _OnAllTrueOffset = new(() => Schema.GetOffset(0xB21E12B8419FFFAF), LazyThreadSafetyMode.None); + public CEntityIOOutput OnAllTrue { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xB21E12B8419FFFAF)); + get => new CEntityIOOutputImpl(_Handle + _OnAllTrueOffset.Value); } + private static readonly Lazy _OnAllFalseOffset = new(() => Schema.GetOffset(0xB21E12B86EFCD332), LazyThreadSafetyMode.None); + public CEntityIOOutput OnAllFalse { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xB21E12B86EFCD332)); + get => new CEntityIOOutputImpl(_Handle + _OnAllFalseOffset.Value); } + private static readonly Lazy _OnMixedOffset = new(() => Schema.GetOffset(0xB21E12B8EBC72437), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMixed { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xB21E12B8EBC72437)); + get => new CEntityIOOutputImpl(_Handle + _OnMixedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicCaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicCaseImpl.cs index 446d38e08..cd3f2c463 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicCaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicCaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,27 +17,37 @@ internal partial class CLogicCaseImpl : CLogicalEntityImpl, CLogicCase { public CLogicCaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _CaseOffset = new(() => Schema.GetOffset(0x4B6BB20CBD726255), LazyThreadSafetyMode.None); + public string Case { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4B6BB20CBD726255)); + var ptr = _Handle.Read(_CaseOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x4B6BB20CBD726255, value); + set => Schema.SetString(_Handle, _CaseOffset.Value, value); } + private static readonly Lazy _ShuffleCasesOffset = new(() => Schema.GetOffset(0x4B6BB20C3441354F), LazyThreadSafetyMode.None); + public ref int ShuffleCases { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B6BB20C3441354F)); + get => ref _Handle.AsRef(_ShuffleCasesOffset.Value); } + private static readonly Lazy _LastShuffleCaseOffset = new(() => Schema.GetOffset(0x4B6BB20C053CE392), LazyThreadSafetyMode.None); + public ref int LastShuffleCase { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B6BB20C053CE392)); + get => ref _Handle.AsRef(_LastShuffleCaseOffset.Value); } public ISchemaFixedArray UchShuffleCaseMap { get => new SchemaFixedArray(_Handle, 0x4B6BB20CF9FC41AE, 32, 1, 1); } + private static readonly Lazy _OnCaseOffset = new(() => Schema.GetOffset(0x4B6BB20CF8743C7C), LazyThreadSafetyMode.None); + public SchemaUntypedField OnCase { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x4B6BB20CF8743C7C)); + get => new SchemaUntypedField(_Handle + _OnCaseOffset.Value); } + private static readonly Lazy _OnDefaultOffset = new(() => Schema.GetOffset(0x4B6BB20C4B03C3CD), LazyThreadSafetyMode.None); + public SchemaUntypedField OnDefault { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x4B6BB20C4B03C3CD)); + get => new SchemaUntypedField(_Handle + _OnDefaultOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicCollisionPairImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicCollisionPairImpl.cs index 2171c4de6..f0da613fb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicCollisionPairImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicCollisionPairImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,31 +17,43 @@ internal partial class CLogicCollisionPairImpl : CLogicalEntityImpl, CLogicColli public CLogicCollisionPairImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameAttach1Offset = new(() => Schema.GetOffset(0x9E0FC6AC6776530A), LazyThreadSafetyMode.None); + public string NameAttach1 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9E0FC6AC6776530A)); + var ptr = _Handle.Read(_NameAttach1Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9E0FC6AC6776530A, value); + set => Schema.SetString(_Handle, _NameAttach1Offset.Value, value); } + private static readonly Lazy _NameAttach2Offset = new(() => Schema.GetOffset(0x9E0FC6AC66765177), LazyThreadSafetyMode.None); + public string NameAttach2 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9E0FC6AC66765177)); + var ptr = _Handle.Read(_NameAttach2Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9E0FC6AC66765177, value); + set => Schema.SetString(_Handle, _NameAttach2Offset.Value, value); } + private static readonly Lazy _IncludeHierarchyOffset = new(() => Schema.GetOffset(0x9E0FC6ACC064916A), LazyThreadSafetyMode.None); + public ref bool IncludeHierarchy { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E0FC6ACC064916A)); + get => ref _Handle.AsRef(_IncludeHierarchyOffset.Value); } + private static readonly Lazy _SupportMultipleEntitiesWithSameNameOffset = new(() => Schema.GetOffset(0x9E0FC6ACD009870A), LazyThreadSafetyMode.None); + public ref bool SupportMultipleEntitiesWithSameName { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E0FC6ACD009870A)); + get => ref _Handle.AsRef(_SupportMultipleEntitiesWithSameNameOffset.Value); } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x9E0FC6AC28A745A5), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E0FC6AC28A745A5)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _SucceededOffset = new(() => Schema.GetOffset(0x9E0FC6AC48FBF712), LazyThreadSafetyMode.None); + public ref bool Succeeded { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E0FC6AC48FBF712)); + get => ref _Handle.AsRef(_SucceededOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicCompareImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicCompareImpl.cs index d8cc5adcb..a7781fd34 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicCompareImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicCompareImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CLogicCompareImpl : CLogicalEntityImpl, CLogicCompare { public CLogicCompareImpl(nint handle) : base(handle) { } + private static readonly Lazy _InValueOffset = new(() => Schema.GetOffset(0xCEFDBF2F414AD5ED), LazyThreadSafetyMode.None); + public ref float InValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xCEFDBF2F414AD5ED)); + get => ref _Handle.AsRef(_InValueOffset.Value); } + private static readonly Lazy _CompareValueOffset = new(() => Schema.GetOffset(0xCEFDBF2F42C0882F), LazyThreadSafetyMode.None); + public ref float CompareValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xCEFDBF2F42C0882F)); + get => ref _Handle.AsRef(_CompareValueOffset.Value); } + private static readonly Lazy _OnLessThanOffset = new(() => Schema.GetOffset(0xCEFDBF2FB6AC02FE), LazyThreadSafetyMode.None); + public SchemaUntypedField OnLessThan { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xCEFDBF2FB6AC02FE)); + get => new SchemaUntypedField(_Handle + _OnLessThanOffset.Value); } + private static readonly Lazy _OnEqualToOffset = new(() => Schema.GetOffset(0xCEFDBF2F87EEC581), LazyThreadSafetyMode.None); + public SchemaUntypedField OnEqualTo { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xCEFDBF2F87EEC581)); + get => new SchemaUntypedField(_Handle + _OnEqualToOffset.Value); } + private static readonly Lazy _OnNotEqualToOffset = new(() => Schema.GetOffset(0xCEFDBF2FDA1680D6), LazyThreadSafetyMode.None); + public SchemaUntypedField OnNotEqualTo { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xCEFDBF2FDA1680D6)); + get => new SchemaUntypedField(_Handle + _OnNotEqualToOffset.Value); } + private static readonly Lazy _OnGreaterThanOffset = new(() => Schema.GetOffset(0xCEFDBF2F50BD472D), LazyThreadSafetyMode.None); + public SchemaUntypedField OnGreaterThan { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xCEFDBF2F50BD472D)); + get => new SchemaUntypedField(_Handle + _OnGreaterThanOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicDistanceAutosaveImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicDistanceAutosaveImpl.cs index c3319a97f..7263fe492 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicDistanceAutosaveImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicDistanceAutosaveImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,27 +17,39 @@ internal partial class CLogicDistanceAutosaveImpl : CLogicalEntityImpl, CLogicDi public CLogicDistanceAutosaveImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetEntityOffset = new(() => Schema.GetOffset(0x8E908EDD8951B0FB), LazyThreadSafetyMode.None); + public string TargetEntity { get { - var ptr = _Handle.Read(Schema.GetOffset(0x8E908EDD8951B0FB)); + var ptr = _Handle.Read(_TargetEntityOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x8E908EDD8951B0FB, value); + set => Schema.SetString(_Handle, _TargetEntityOffset.Value, value); } + private static readonly Lazy _DistanceToPlayerOffset = new(() => Schema.GetOffset(0x8E908EDDF04AFE0C), LazyThreadSafetyMode.None); + public ref float DistanceToPlayer { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E908EDDF04AFE0C)); + get => ref _Handle.AsRef(_DistanceToPlayerOffset.Value); } + private static readonly Lazy _ForceNewLevelUnitOffset = new(() => Schema.GetOffset(0x8E908EDD1473BFDE), LazyThreadSafetyMode.None); + public ref bool ForceNewLevelUnit { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E908EDD1473BFDE)); + get => ref _Handle.AsRef(_ForceNewLevelUnitOffset.Value); } + private static readonly Lazy _CheckCoughOffset = new(() => Schema.GetOffset(0x8E908EDD25C565C3), LazyThreadSafetyMode.None); + public ref bool CheckCough { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E908EDD25C565C3)); + get => ref _Handle.AsRef(_CheckCoughOffset.Value); } + private static readonly Lazy _ThinkDangerousOffset = new(() => Schema.GetOffset(0x8E908EDDE079F1C9), LazyThreadSafetyMode.None); + public ref bool ThinkDangerous { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E908EDDE079F1C9)); + get => ref _Handle.AsRef(_ThinkDangerousOffset.Value); } + private static readonly Lazy _DangerousTimeOffset = new(() => Schema.GetOffset(0x8E908EDD19BC5644), LazyThreadSafetyMode.None); + public ref float DangerousTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E908EDD19BC5644)); + get => ref _Handle.AsRef(_DangerousTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicDistanceCheckImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicDistanceCheckImpl.cs index 2ce022597..a6548eaf3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicDistanceCheckImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicDistanceCheckImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,34 +17,48 @@ internal partial class CLogicDistanceCheckImpl : CLogicalEntityImpl, CLogicDista public CLogicDistanceCheckImpl(nint handle) : base(handle) { } + private static readonly Lazy _EntityAOffset = new(() => Schema.GetOffset(0x523E7E6D07823CB9), LazyThreadSafetyMode.None); + public string EntityA { get { - var ptr = _Handle.Read(Schema.GetOffset(0x523E7E6D07823CB9)); + var ptr = _Handle.Read(_EntityAOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x523E7E6D07823CB9, value); + set => Schema.SetString(_Handle, _EntityAOffset.Value, value); } + private static readonly Lazy _EntityBOffset = new(() => Schema.GetOffset(0x523E7E6D04823800), LazyThreadSafetyMode.None); + public string EntityB { get { - var ptr = _Handle.Read(Schema.GetOffset(0x523E7E6D04823800)); + var ptr = _Handle.Read(_EntityBOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x523E7E6D04823800, value); + set => Schema.SetString(_Handle, _EntityBOffset.Value, value); } + private static readonly Lazy _Zone1DistanceOffset = new(() => Schema.GetOffset(0x523E7E6DFF385A8F), LazyThreadSafetyMode.None); + public ref float Zone1Distance { - get => ref _Handle.AsRef(Schema.GetOffset(0x523E7E6DFF385A8F)); + get => ref _Handle.AsRef(_Zone1DistanceOffset.Value); } + private static readonly Lazy _Zone2DistanceOffset = new(() => Schema.GetOffset(0x523E7E6DE1734A1A), LazyThreadSafetyMode.None); + public ref float Zone2Distance { - get => ref _Handle.AsRef(Schema.GetOffset(0x523E7E6DE1734A1A)); + get => ref _Handle.AsRef(_Zone2DistanceOffset.Value); } + private static readonly Lazy _InZone1Offset = new(() => Schema.GetOffset(0x523E7E6D25378DB3), LazyThreadSafetyMode.None); + public CEntityIOOutput InZone1 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x523E7E6D25378DB3)); + get => new CEntityIOOutputImpl(_Handle + _InZone1Offset.Value); } + private static readonly Lazy _InZone2Offset = new(() => Schema.GetOffset(0x523E7E6D26378F46), LazyThreadSafetyMode.None); + public CEntityIOOutput InZone2 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x523E7E6D26378F46)); + get => new CEntityIOOutputImpl(_Handle + _InZone2Offset.Value); } + private static readonly Lazy _InZone3Offset = new(() => Schema.GetOffset(0x523E7E6D273790D9), LazyThreadSafetyMode.None); + public CEntityIOOutput InZone3 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x523E7E6D273790D9)); + get => new CEntityIOOutputImpl(_Handle + _InZone3Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicEventListenerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicEventListenerImpl.cs index ce5a3a394..c3b20f919 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicEventListenerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicEventListenerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class CLogicEventListenerImpl : CLogicalEntityImpl, CLogicEvent public CLogicEventListenerImpl(nint handle) : base(handle) { } + private static readonly Lazy _StrEventNameOffset = new(() => Schema.GetOffset(0xD797C990BC41C13B), LazyThreadSafetyMode.None); + public string StrEventName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD797C990BC41C13B)); + var ptr = _Handle.Read(_StrEventNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD797C990BC41C13B, value); + set => Schema.SetString(_Handle, _StrEventNameOffset.Value, value); } + private static readonly Lazy _IsEnabledOffset = new(() => Schema.GetOffset(0xD797C9905360D70E), LazyThreadSafetyMode.None); + public ref bool IsEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xD797C9905360D70E)); + get => ref _Handle.AsRef(_IsEnabledOffset.Value); } + private static readonly Lazy _TeamOffset = new(() => Schema.GetOffset(0xD797C990BEB42230), LazyThreadSafetyMode.None); + public ref int Team { - get => ref _Handle.AsRef(Schema.GetOffset(0xD797C990BEB42230)); + get => ref _Handle.AsRef(_TeamOffset.Value); } + private static readonly Lazy _OnEventFiredOffset = new(() => Schema.GetOffset(0xD797C990E84EA158), LazyThreadSafetyMode.None); + public CEntityIOOutput OnEventFired { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xD797C990E84EA158)); + get => new CEntityIOOutputImpl(_Handle + _OnEventFiredOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicGameEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicGameEventImpl.cs index 96194138c..ac803f0fe 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicGameEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicGameEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CLogicGameEventImpl : CLogicalEntityImpl, CLogicGameEvent public CLogicGameEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _EventNameOffset = new(() => Schema.GetOffset(0xBED9751E78114A54), LazyThreadSafetyMode.None); + public string EventName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xBED9751E78114A54)); + var ptr = _Handle.Read(_EventNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xBED9751E78114A54, value); + set => Schema.SetString(_Handle, _EventNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicGameEventListenerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicGameEventListenerImpl.cs index 7f7bdeb10..e928d17a1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicGameEventListenerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicGameEventListenerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,28 +17,38 @@ internal partial class CLogicGameEventListenerImpl : CLogicalEntityImpl, CLogicG public CLogicGameEventListenerImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnEventFiredOffset = new(() => Schema.GetOffset(0xB18EF22E84EA158), LazyThreadSafetyMode.None); + public CEntityIOOutput OnEventFired { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xB18EF22E84EA158)); + get => new CEntityIOOutputImpl(_Handle + _OnEventFiredOffset.Value); } + private static readonly Lazy _GameEventNameOffset = new(() => Schema.GetOffset(0xB18EF22C6581BAE), LazyThreadSafetyMode.None); + public string GameEventName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB18EF22C6581BAE)); + var ptr = _Handle.Read(_GameEventNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB18EF22C6581BAE, value); + set => Schema.SetString(_Handle, _GameEventNameOffset.Value, value); } + private static readonly Lazy _GameEventItemOffset = new(() => Schema.GetOffset(0xB18EF22ACB669EE), LazyThreadSafetyMode.None); + public string GameEventItem { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB18EF22ACB669EE)); + var ptr = _Handle.Read(_GameEventItemOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB18EF22ACB669EE, value); + set => Schema.SetString(_Handle, _GameEventItemOffset.Value, value); } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0xB18EF226154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xB18EF226154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } + private static readonly Lazy _StartDisabledOffset = new(() => Schema.GetOffset(0xB18EF2261ED0C4F), LazyThreadSafetyMode.None); + public ref bool StartDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xB18EF2261ED0C4F)); + get => ref _Handle.AsRef(_StartDisabledOffset.Value); } public void EnabledUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicLineToEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicLineToEntityImpl.cs index 2d426937e..d7c1d5c4c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicLineToEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicLineToEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class CLogicLineToEntityImpl : CLogicalEntityImpl, CLogicLineTo public CLogicLineToEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _LineOffset = new(() => Schema.GetOffset(0x61067DC85589FAA7), LazyThreadSafetyMode.None); + public SchemaUntypedField Line { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x61067DC85589FAA7)); + get => new SchemaUntypedField(_Handle + _LineOffset.Value); } + private static readonly Lazy _SourceNameOffset = new(() => Schema.GetOffset(0x61067DC82F9BA2DB), LazyThreadSafetyMode.None); + public string SourceName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x61067DC82F9BA2DB)); + var ptr = _Handle.Read(_SourceNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x61067DC82F9BA2DB, value); + set => Schema.SetString(_Handle, _SourceNameOffset.Value, value); } + private static readonly Lazy _StartEntityOffset = new(() => Schema.GetOffset(0x61067DC8904F2828), LazyThreadSafetyMode.None); + public ref CHandle StartEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x61067DC8904F2828)); + get => ref _Handle.AsRef>(_StartEntityOffset.Value); } + private static readonly Lazy _EndEntityOffset = new(() => Schema.GetOffset(0x61067DC89114A219), LazyThreadSafetyMode.None); + public ref CHandle EndEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x61067DC89114A219)); + get => ref _Handle.AsRef>(_EndEntityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicMeasureMovementImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicMeasureMovementImpl.cs index 7bee27b03..5eaf8b06e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicMeasureMovementImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicMeasureMovementImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,62 @@ internal partial class CLogicMeasureMovementImpl : CLogicalEntityImpl, CLogicMea public CLogicMeasureMovementImpl(nint handle) : base(handle) { } + private static readonly Lazy _StrMeasureTargetOffset = new(() => Schema.GetOffset(0x11EA274585646A89), LazyThreadSafetyMode.None); + public string StrMeasureTarget { get { - var ptr = _Handle.Read(Schema.GetOffset(0x11EA274585646A89)); + var ptr = _Handle.Read(_StrMeasureTargetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x11EA274585646A89, value); + set => Schema.SetString(_Handle, _StrMeasureTargetOffset.Value, value); } + private static readonly Lazy _StrMeasureReferenceOffset = new(() => Schema.GetOffset(0x11EA2745CF4AF1BD), LazyThreadSafetyMode.None); + public string StrMeasureReference { get { - var ptr = _Handle.Read(Schema.GetOffset(0x11EA2745CF4AF1BD)); + var ptr = _Handle.Read(_StrMeasureReferenceOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x11EA2745CF4AF1BD, value); + set => Schema.SetString(_Handle, _StrMeasureReferenceOffset.Value, value); } + private static readonly Lazy _StrTargetReferenceOffset = new(() => Schema.GetOffset(0x11EA27453E928D56), LazyThreadSafetyMode.None); + public string StrTargetReference { get { - var ptr = _Handle.Read(Schema.GetOffset(0x11EA27453E928D56)); + var ptr = _Handle.Read(_StrTargetReferenceOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x11EA27453E928D56, value); + set => Schema.SetString(_Handle, _StrTargetReferenceOffset.Value, value); } + private static readonly Lazy _MeasureTargetOffset = new(() => Schema.GetOffset(0x11EA2745F81BC1A8), LazyThreadSafetyMode.None); + public ref CHandle MeasureTarget { - get => ref _Handle.AsRef>(Schema.GetOffset(0x11EA2745F81BC1A8)); + get => ref _Handle.AsRef>(_MeasureTargetOffset.Value); } + private static readonly Lazy _MeasureReferenceOffset = new(() => Schema.GetOffset(0x11EA274567F65D7A), LazyThreadSafetyMode.None); + public ref CHandle MeasureReference { - get => ref _Handle.AsRef>(Schema.GetOffset(0x11EA274567F65D7A)); + get => ref _Handle.AsRef>(_MeasureReferenceOffset.Value); } + private static readonly Lazy _TargetOffset = new(() => Schema.GetOffset(0x11EA2745CE35901A), LazyThreadSafetyMode.None); + public ref CHandle Target { - get => ref _Handle.AsRef>(Schema.GetOffset(0x11EA2745CE35901A)); + get => ref _Handle.AsRef>(_TargetOffset.Value); } + private static readonly Lazy _TargetReferenceOffset = new(() => Schema.GetOffset(0x11EA2745EB33504F), LazyThreadSafetyMode.None); + public ref CHandle TargetReference { - get => ref _Handle.AsRef>(Schema.GetOffset(0x11EA2745EB33504F)); + get => ref _Handle.AsRef>(_TargetReferenceOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x11EA2745B731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0x11EA2745B731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _MeasureTypeOffset = new(() => Schema.GetOffset(0x11EA274593190C1B), LazyThreadSafetyMode.None); + public ref int MeasureType { - get => ref _Handle.AsRef(Schema.GetOffset(0x11EA274593190C1B)); + get => ref _Handle.AsRef(_MeasureTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicNPCCounterAABBImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicNPCCounterAABBImpl.cs index 642395bda..72f9e0804 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicNPCCounterAABBImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicNPCCounterAABBImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CLogicNPCCounterAABBImpl : CLogicNPCCounterImpl, CLogicNP public CLogicNPCCounterAABBImpl(nint handle) : base(handle) { } + private static readonly Lazy _DistanceOuterMinsOffset = new(() => Schema.GetOffset(0x264C2C4B185EC6F4), LazyThreadSafetyMode.None); + public ref Vector DistanceOuterMins { - get => ref _Handle.AsRef(Schema.GetOffset(0x264C2C4B185EC6F4)); + get => ref _Handle.AsRef(_DistanceOuterMinsOffset.Value); } + private static readonly Lazy _DistanceOuterMaxsOffset = new(() => Schema.GetOffset(0x264C2C4B99738B36), LazyThreadSafetyMode.None); + public ref Vector DistanceOuterMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0x264C2C4B99738B36)); + get => ref _Handle.AsRef(_DistanceOuterMaxsOffset.Value); } + private static readonly Lazy _OuterMinsOffset = new(() => Schema.GetOffset(0x264C2C4B30928F3D), LazyThreadSafetyMode.None); + public ref Vector OuterMins { - get => ref _Handle.AsRef(Schema.GetOffset(0x264C2C4B30928F3D)); + get => ref _Handle.AsRef(_OuterMinsOffset.Value); } + private static readonly Lazy _OuterMaxsOffset = new(() => Schema.GetOffset(0x264C2C4BC9A77947), LazyThreadSafetyMode.None); + public ref Vector OuterMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0x264C2C4BC9A77947)); + get => ref _Handle.AsRef(_OuterMaxsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicNPCCounterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicNPCCounterImpl.cs index f652e3788..d669a4985 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicNPCCounterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicNPCCounterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,165 +17,261 @@ internal partial class CLogicNPCCounterImpl : CBaseEntityImpl, CLogicNPCCounter public CLogicNPCCounterImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnMinCountAllOffset = new(() => Schema.GetOffset(0x485D88795307A826), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMinCountAll { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x485D88795307A826)); + get => new CEntityIOOutputImpl(_Handle + _OnMinCountAllOffset.Value); } + private static readonly Lazy _OnMaxCountAllOffset = new(() => Schema.GetOffset(0x485D8879DDCC356C), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMaxCountAll { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x485D8879DDCC356C)); + get => new CEntityIOOutputImpl(_Handle + _OnMaxCountAllOffset.Value); } + private static readonly Lazy _OnFactorAllOffset = new(() => Schema.GetOffset(0x485D8879E34F3A26), LazyThreadSafetyMode.None); + public SchemaUntypedField OnFactorAll { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x485D8879E34F3A26)); + get => new SchemaUntypedField(_Handle + _OnFactorAllOffset.Value); } + private static readonly Lazy _OnMinPlayerDistAllOffset = new(() => Schema.GetOffset(0x485D887936FA93F4), LazyThreadSafetyMode.None); + public SchemaUntypedField OnMinPlayerDistAll { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x485D887936FA93F4)); + get => new SchemaUntypedField(_Handle + _OnMinPlayerDistAllOffset.Value); } + private static readonly Lazy _OnMinCount_1Offset = new(() => Schema.GetOffset(0x485D88794C66E6EF), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMinCount_1 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x485D88794C66E6EF)); + get => new CEntityIOOutputImpl(_Handle + _OnMinCount_1Offset.Value); } + private static readonly Lazy _OnMaxCount_1Offset = new(() => Schema.GetOffset(0x485D8879A364ADD5), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMaxCount_1 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x485D8879A364ADD5)); + get => new CEntityIOOutputImpl(_Handle + _OnMaxCount_1Offset.Value); } + private static readonly Lazy _OnFactor_1Offset = new(() => Schema.GetOffset(0x485D8879A2844CEF), LazyThreadSafetyMode.None); + public SchemaUntypedField OnFactor_1 { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x485D8879A2844CEF)); + get => new SchemaUntypedField(_Handle + _OnFactor_1Offset.Value); } + private static readonly Lazy _OnMinPlayerDist_1Offset = new(() => Schema.GetOffset(0x485D8879C69B333D), LazyThreadSafetyMode.None); + public SchemaUntypedField OnMinPlayerDist_1 { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x485D8879C69B333D)); + get => new SchemaUntypedField(_Handle + _OnMinPlayerDist_1Offset.Value); } + private static readonly Lazy _OnMinCount_2Offset = new(() => Schema.GetOffset(0x485D88794D66E882), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMinCount_2 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x485D88794D66E882)); + get => new CEntityIOOutputImpl(_Handle + _OnMinCount_2Offset.Value); } + private static readonly Lazy _OnMaxCount_2Offset = new(() => Schema.GetOffset(0x485D8879A064A91C), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMaxCount_2 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x485D8879A064A91C)); + get => new CEntityIOOutputImpl(_Handle + _OnMaxCount_2Offset.Value); } + private static readonly Lazy _OnFactor_2Offset = new(() => Schema.GetOffset(0x485D8879A3844E82), LazyThreadSafetyMode.None); + public SchemaUntypedField OnFactor_2 { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x485D8879A3844E82)); + get => new SchemaUntypedField(_Handle + _OnFactor_2Offset.Value); } + private static readonly Lazy _OnMinPlayerDist_2Offset = new(() => Schema.GetOffset(0x485D8879C39B2E84), LazyThreadSafetyMode.None); + public SchemaUntypedField OnMinPlayerDist_2 { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x485D8879C39B2E84)); + get => new SchemaUntypedField(_Handle + _OnMinPlayerDist_2Offset.Value); } + private static readonly Lazy _OnMinCount_3Offset = new(() => Schema.GetOffset(0x485D88794E66EA15), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMinCount_3 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x485D88794E66EA15)); + get => new CEntityIOOutputImpl(_Handle + _OnMinCount_3Offset.Value); } + private static readonly Lazy _OnMaxCount_3Offset = new(() => Schema.GetOffset(0x485D8879A164AAAF), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMaxCount_3 { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x485D8879A164AAAF)); + get => new CEntityIOOutputImpl(_Handle + _OnMaxCount_3Offset.Value); } + private static readonly Lazy _OnFactor_3Offset = new(() => Schema.GetOffset(0x485D8879A4845015), LazyThreadSafetyMode.None); + public SchemaUntypedField OnFactor_3 { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x485D8879A4845015)); + get => new SchemaUntypedField(_Handle + _OnFactor_3Offset.Value); } + private static readonly Lazy _OnMinPlayerDist_3Offset = new(() => Schema.GetOffset(0x485D8879C49B3017), LazyThreadSafetyMode.None); + public SchemaUntypedField OnMinPlayerDist_3 { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x485D8879C49B3017)); + get => new SchemaUntypedField(_Handle + _OnMinPlayerDist_3Offset.Value); } + private static readonly Lazy _SourceOffset = new(() => Schema.GetOffset(0x485D887933D3CD82), LazyThreadSafetyMode.None); + public ref CHandle Source { - get => ref _Handle.AsRef>(Schema.GetOffset(0x485D887933D3CD82)); + get => ref _Handle.AsRef>(_SourceOffset.Value); } + private static readonly Lazy _SourceEntityNameOffset = new(() => Schema.GetOffset(0x485D88796C1387C0), LazyThreadSafetyMode.None); + public string SourceEntityName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x485D88796C1387C0)); + var ptr = _Handle.Read(_SourceEntityNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x485D88796C1387C0, value); + set => Schema.SetString(_Handle, _SourceEntityNameOffset.Value, value); } + private static readonly Lazy _DistanceMaxOffset = new(() => Schema.GetOffset(0x485D8879FDEBADA6), LazyThreadSafetyMode.None); + public ref float DistanceMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D8879FDEBADA6)); + get => ref _Handle.AsRef(_DistanceMaxOffset.Value); } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x485D88793A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D88793A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _MinCountAllOffset = new(() => Schema.GetOffset(0x485D8879CC867BE1), LazyThreadSafetyMode.None); + public ref int MinCountAll { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D8879CC867BE1)); + get => ref _Handle.AsRef(_MinCountAllOffset.Value); } + private static readonly Lazy _MaxCountAllOffset = new(() => Schema.GetOffset(0x485D8879307AEE1F), LazyThreadSafetyMode.None); + public ref int MaxCountAll { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D8879307AEE1F)); + get => ref _Handle.AsRef(_MaxCountAllOffset.Value); } + private static readonly Lazy _MinFactorAllOffset = new(() => Schema.GetOffset(0x485D887945AC8C1F), LazyThreadSafetyMode.None); + public ref int MinFactorAll { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D887945AC8C1F)); + get => ref _Handle.AsRef(_MinFactorAllOffset.Value); } + private static readonly Lazy _MaxFactorAllOffset = new(() => Schema.GetOffset(0x485D88793E95FEF5), LazyThreadSafetyMode.None); + public ref int MaxFactorAll { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D88793E95FEF5)); + get => ref _Handle.AsRef(_MaxFactorAllOffset.Value); } + private static readonly Lazy _NPCClassname_1Offset = new(() => Schema.GetOffset(0x485D8879DF49E85F), LazyThreadSafetyMode.None); + public string NPCClassname_1 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x485D8879DF49E85F)); + var ptr = _Handle.Read(_NPCClassname_1Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x485D8879DF49E85F, value); + set => Schema.SetString(_Handle, _NPCClassname_1Offset.Value, value); } + private static readonly Lazy _NPCState_1Offset = new(() => Schema.GetOffset(0x485D887959CDEB41), LazyThreadSafetyMode.None); + public ref int NPCState_1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D887959CDEB41)); + get => ref _Handle.AsRef(_NPCState_1Offset.Value); } + private static readonly Lazy _InvertState_1Offset = new(() => Schema.GetOffset(0x485D88796F698432), LazyThreadSafetyMode.None); + public ref bool InvertState_1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D88796F698432)); + get => ref _Handle.AsRef(_InvertState_1Offset.Value); } + private static readonly Lazy _MinCount_1Offset = new(() => Schema.GetOffset(0x485D88797F3A776A), LazyThreadSafetyMode.None); + public ref int MinCount_1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D88797F3A776A)); + get => ref _Handle.AsRef(_MinCount_1Offset.Value); } + private static readonly Lazy _MaxCount_1Offset = new(() => Schema.GetOffset(0x485D8879A6C8B370), LazyThreadSafetyMode.None); + public ref int MaxCount_1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D8879A6C8B370)); + get => ref _Handle.AsRef(_MaxCount_1Offset.Value); } + private static readonly Lazy _MinFactor_1Offset = new(() => Schema.GetOffset(0x485D8879F1CB5D70), LazyThreadSafetyMode.None); + public ref int MinFactor_1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D8879F1CB5D70)); + get => ref _Handle.AsRef(_MinFactor_1Offset.Value); } + private static readonly Lazy _MaxFactor_1Offset = new(() => Schema.GetOffset(0x485D887909B4368E), LazyThreadSafetyMode.None); + public ref int MaxFactor_1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D887909B4368E)); + get => ref _Handle.AsRef(_MaxFactor_1Offset.Value); } + private static readonly Lazy _DefaultDist_1Offset = new(() => Schema.GetOffset(0x485D88793E54B91C), LazyThreadSafetyMode.None); + public ref float DefaultDist_1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D88793E54B91C)); + get => ref _Handle.AsRef(_DefaultDist_1Offset.Value); } + private static readonly Lazy _NPCClassname_2Offset = new(() => Schema.GetOffset(0x485D8879E049E9F2), LazyThreadSafetyMode.None); + public string NPCClassname_2 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x485D8879E049E9F2)); + var ptr = _Handle.Read(_NPCClassname_2Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x485D8879E049E9F2, value); + set => Schema.SetString(_Handle, _NPCClassname_2Offset.Value, value); } + private static readonly Lazy _NPCState_2Offset = new(() => Schema.GetOffset(0x485D887956CDE688), LazyThreadSafetyMode.None); + public ref int NPCState_2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D887956CDE688)); + get => ref _Handle.AsRef(_NPCState_2Offset.Value); } + private static readonly Lazy _InvertState_2Offset = new(() => Schema.GetOffset(0x485D88796E69829F), LazyThreadSafetyMode.None); + public ref bool InvertState_2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D88796E69829F)); + get => ref _Handle.AsRef(_InvertState_2Offset.Value); } + private static readonly Lazy _MinCount_2Offset = new(() => Schema.GetOffset(0x485D88797E3A75D7), LazyThreadSafetyMode.None); + public ref int MinCount_2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D88797E3A75D7)); + get => ref _Handle.AsRef(_MinCount_2Offset.Value); } + private static readonly Lazy _MaxCount_2Offset = new(() => Schema.GetOffset(0x485D8879A9C8B829), LazyThreadSafetyMode.None); + public ref int MaxCount_2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D8879A9C8B829)); + get => ref _Handle.AsRef(_MaxCount_2Offset.Value); } + private static readonly Lazy _MinFactor_2Offset = new(() => Schema.GetOffset(0x485D8879F4CB6229), LazyThreadSafetyMode.None); + public ref int MinFactor_2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D8879F4CB6229)); + get => ref _Handle.AsRef(_MinFactor_2Offset.Value); } + private static readonly Lazy _MaxFactor_2Offset = new(() => Schema.GetOffset(0x485D887908B434FB), LazyThreadSafetyMode.None); + public ref int MaxFactor_2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D887908B434FB)); + get => ref _Handle.AsRef(_MaxFactor_2Offset.Value); } + private static readonly Lazy _DefaultDist_2Offset = new(() => Schema.GetOffset(0x485D88794154BDD5), LazyThreadSafetyMode.None); + public ref float DefaultDist_2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D88794154BDD5)); + get => ref _Handle.AsRef(_DefaultDist_2Offset.Value); } + private static readonly Lazy _NPCClassname_3Offset = new(() => Schema.GetOffset(0x485D8879E149EB85), LazyThreadSafetyMode.None); + public string NPCClassname_3 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x485D8879E149EB85)); + var ptr = _Handle.Read(_NPCClassname_3Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x485D8879E149EB85, value); + set => Schema.SetString(_Handle, _NPCClassname_3Offset.Value, value); } + private static readonly Lazy _NPCState_3Offset = new(() => Schema.GetOffset(0x485D887957CDE81B), LazyThreadSafetyMode.None); + public ref int NPCState_3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D887957CDE81B)); + get => ref _Handle.AsRef(_NPCState_3Offset.Value); } + private static readonly Lazy _InvertState_3Offset = new(() => Schema.GetOffset(0x485D88796D69810C), LazyThreadSafetyMode.None); + public ref bool InvertState_3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D88796D69810C)); + get => ref _Handle.AsRef(_InvertState_3Offset.Value); } + private static readonly Lazy _MinCount_3Offset = new(() => Schema.GetOffset(0x485D88797D3A7444), LazyThreadSafetyMode.None); + public ref int MinCount_3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D88797D3A7444)); + get => ref _Handle.AsRef(_MinCount_3Offset.Value); } + private static readonly Lazy _MaxCount_3Offset = new(() => Schema.GetOffset(0x485D8879A8C8B696), LazyThreadSafetyMode.None); + public ref int MaxCount_3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D8879A8C8B696)); + get => ref _Handle.AsRef(_MaxCount_3Offset.Value); } + private static readonly Lazy _MinFactor_3Offset = new(() => Schema.GetOffset(0x485D8879F3CB6096), LazyThreadSafetyMode.None); + public ref int MinFactor_3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D8879F3CB6096)); + get => ref _Handle.AsRef(_MinFactor_3Offset.Value); } + private static readonly Lazy _MaxFactor_3Offset = new(() => Schema.GetOffset(0x485D887907B43368), LazyThreadSafetyMode.None); + public ref int MaxFactor_3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D887907B43368)); + get => ref _Handle.AsRef(_MaxFactor_3Offset.Value); } + private static readonly Lazy _DefaultDist_3Offset = new(() => Schema.GetOffset(0x485D88794054BC42), LazyThreadSafetyMode.None); + public ref float DefaultDist_3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x485D88794054BC42)); + get => ref _Handle.AsRef(_DefaultDist_3Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicNPCCounterOBBImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicNPCCounterOBBImpl.cs index a673966f7..d5fdd6605 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicNPCCounterOBBImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicNPCCounterOBBImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicNavigationImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicNavigationImpl.cs index 673d7d6c7..6801db89c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicNavigationImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicNavigationImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CLogicNavigationImpl : CLogicalEntityImpl, CLogicNavigati public CLogicNavigationImpl(nint handle) : base(handle) { } + private static readonly Lazy _IsOnOffset = new(() => Schema.GetOffset(0x8E444D6254B260A0), LazyThreadSafetyMode.None); + public ref bool IsOn { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E444D6254B260A0)); + get => ref _Handle.AsRef(_IsOnOffset.Value); } + private static readonly Lazy _NavPropertyOffset = new(() => Schema.GetOffset(0x8E444D62C9E0B3E7), LazyThreadSafetyMode.None); + public ref navproperties_t NavProperty { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E444D62C9E0B3E7)); + get => ref _Handle.AsRef(_NavPropertyOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicPlayerProxyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicPlayerProxyImpl.cs index 14c1fceb0..c9cb948a1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicPlayerProxyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicPlayerProxyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CLogicPlayerProxyImpl : CLogicalEntityImpl, CLogicPlayerP public CLogicPlayerProxyImpl(nint handle) : base(handle) { } + private static readonly Lazy _PlayerOffset = new(() => Schema.GetOffset(0x81D444EB68856C16), LazyThreadSafetyMode.None); + public ref CHandle Player { - get => ref _Handle.AsRef>(Schema.GetOffset(0x81D444EB68856C16)); + get => ref _Handle.AsRef>(_PlayerOffset.Value); } + private static readonly Lazy _PlayerHasAmmoOffset = new(() => Schema.GetOffset(0x81D444EB6A23AB96), LazyThreadSafetyMode.None); + public CEntityIOOutput PlayerHasAmmo { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x81D444EB6A23AB96)); + get => new CEntityIOOutputImpl(_Handle + _PlayerHasAmmoOffset.Value); } + private static readonly Lazy _PlayerHasNoAmmoOffset = new(() => Schema.GetOffset(0x81D444EB06CA340D), LazyThreadSafetyMode.None); + public CEntityIOOutput PlayerHasNoAmmo { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x81D444EB06CA340D)); + get => new CEntityIOOutputImpl(_Handle + _PlayerHasNoAmmoOffset.Value); } + private static readonly Lazy _PlayerDiedOffset = new(() => Schema.GetOffset(0x81D444EBB440E03E), LazyThreadSafetyMode.None); + public CEntityIOOutput PlayerDied { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x81D444EBB440E03E)); + get => new CEntityIOOutputImpl(_Handle + _PlayerDiedOffset.Value); } + private static readonly Lazy _RequestedPlayerHealthOffset = new(() => Schema.GetOffset(0x81D444EBF1F83D58), LazyThreadSafetyMode.None); + public SchemaUntypedField RequestedPlayerHealth { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x81D444EBF1F83D58)); + get => new SchemaUntypedField(_Handle + _RequestedPlayerHealthOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicProximityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicProximityImpl.cs index a004f5c88..9403cbc3e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicProximityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicProximityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicRelayAPIImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicRelayAPIImpl.cs index facc0ea1f..1037db060 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicRelayAPIImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicRelayAPIImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicRelayImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicRelayImpl.cs index 56abc8713..080956a76 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicRelayImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicRelayImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CLogicRelayImpl : CLogicalEntityImpl, CLogicRelay { public CLogicRelayImpl(nint handle) : base(handle) { } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x15CFD4B93A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CFD4B93A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _WaitForRefireOffset = new(() => Schema.GetOffset(0x15CFD4B9AB85983A), LazyThreadSafetyMode.None); + public ref bool WaitForRefire { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CFD4B9AB85983A)); + get => ref _Handle.AsRef(_WaitForRefireOffset.Value); } + private static readonly Lazy _TriggerOnceOffset = new(() => Schema.GetOffset(0x15CFD4B981D75586), LazyThreadSafetyMode.None); + public ref bool TriggerOnce { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CFD4B981D75586)); + get => ref _Handle.AsRef(_TriggerOnceOffset.Value); } + private static readonly Lazy _FastRetriggerOffset = new(() => Schema.GetOffset(0x15CFD4B91AD2302E), LazyThreadSafetyMode.None); + public ref bool FastRetrigger { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CFD4B91AD2302E)); + get => ref _Handle.AsRef(_FastRetriggerOffset.Value); } + private static readonly Lazy _PassthoughCallerOffset = new(() => Schema.GetOffset(0x15CFD4B969DA94C8), LazyThreadSafetyMode.None); + public ref bool PassthoughCaller { - get => ref _Handle.AsRef(Schema.GetOffset(0x15CFD4B969DA94C8)); + get => ref _Handle.AsRef(_PassthoughCallerOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicScriptImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicScriptImpl.cs index f2d252c9f..e8faca8d7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicScriptImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicScriptImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicalEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicalEntityImpl.cs index 2acdaff88..f856f0edb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicalEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLogicalEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLookAtUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLookAtUpdateNodeImpl.cs index 00bd1f7ed..5460e7b77 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLookAtUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLookAtUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CLookAtUpdateNodeImpl : CUnaryUpdateNodeImpl, CLookAtUpda public CLookAtUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _OpFixedSettingsOffset = new(() => Schema.GetOffset(0xC17476D5E533AB09), LazyThreadSafetyMode.None); + public LookAtOpFixedSettings_t OpFixedSettings { - get => new LookAtOpFixedSettings_tImpl(_Handle + Schema.GetOffset(0xC17476D5E533AB09)); + get => new LookAtOpFixedSettings_tImpl(_Handle + _OpFixedSettingsOffset.Value); } + private static readonly Lazy _TargetOffset = new(() => Schema.GetOffset(0xC17476D5FA08A9E8), LazyThreadSafetyMode.None); + public ref AnimVectorSource Target { - get => ref _Handle.AsRef(Schema.GetOffset(0xC17476D5FA08A9E8)); + get => ref _Handle.AsRef(_TargetOffset.Value); } + private static readonly Lazy _ParamIndexOffset = new(() => Schema.GetOffset(0xC17476D561990A86), LazyThreadSafetyMode.None); + public CAnimParamHandle ParamIndex { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xC17476D561990A86)); + get => new CAnimParamHandleImpl(_Handle + _ParamIndexOffset.Value); } + private static readonly Lazy _WeightParamIndexOffset = new(() => Schema.GetOffset(0xC17476D50F2AED7A), LazyThreadSafetyMode.None); + public CAnimParamHandle WeightParamIndex { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xC17476D50F2AED7A)); + get => new CAnimParamHandleImpl(_Handle + _WeightParamIndexOffset.Value); } + private static readonly Lazy _ResetChildOffset = new(() => Schema.GetOffset(0xC17476D565CC88B6), LazyThreadSafetyMode.None); + public ref bool ResetChild { - get => ref _Handle.AsRef(Schema.GetOffset(0xC17476D565CC88B6)); + get => ref _Handle.AsRef(_ResetChildOffset.Value); } + private static readonly Lazy _LockWhenWaningOffset = new(() => Schema.GetOffset(0xC17476D5EED48004), LazyThreadSafetyMode.None); + public ref bool LockWhenWaning { - get => ref _Handle.AsRef(Schema.GetOffset(0xC17476D5EED48004)); + get => ref _Handle.AsRef(_LockWhenWaningOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLookComponentUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLookComponentUpdaterImpl.cs index 2eadeda50..cce097348 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLookComponentUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CLookComponentUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class CLookComponentUpdaterImpl : CAnimComponentUpdaterImpl, CL public CLookComponentUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _LookHeadingOffset = new(() => Schema.GetOffset(0xA3C6996DE7EA9C52), LazyThreadSafetyMode.None); + public CAnimParamHandle LookHeading { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xA3C6996DE7EA9C52)); + get => new CAnimParamHandleImpl(_Handle + _LookHeadingOffset.Value); } + private static readonly Lazy _LookHeadingNormalizedOffset = new(() => Schema.GetOffset(0xA3C6996D305E6B07), LazyThreadSafetyMode.None); + public CAnimParamHandle LookHeadingNormalized { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xA3C6996D305E6B07)); + get => new CAnimParamHandleImpl(_Handle + _LookHeadingNormalizedOffset.Value); } + private static readonly Lazy _LookHeadingVelocityOffset = new(() => Schema.GetOffset(0xA3C6996DF9527FD9), LazyThreadSafetyMode.None); + public CAnimParamHandle LookHeadingVelocity { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xA3C6996DF9527FD9)); + get => new CAnimParamHandleImpl(_Handle + _LookHeadingVelocityOffset.Value); } + private static readonly Lazy _LookPitchOffset = new(() => Schema.GetOffset(0xA3C6996D3D4C7812), LazyThreadSafetyMode.None); + public CAnimParamHandle LookPitch { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xA3C6996D3D4C7812)); + get => new CAnimParamHandleImpl(_Handle + _LookPitchOffset.Value); } + private static readonly Lazy _LookDistanceOffset = new(() => Schema.GetOffset(0xA3C6996DD4722447), LazyThreadSafetyMode.None); + public CAnimParamHandle LookDistance { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xA3C6996DD4722447)); + get => new CAnimParamHandleImpl(_Handle + _LookDistanceOffset.Value); } + private static readonly Lazy _LookDirectionOffset = new(() => Schema.GetOffset(0xA3C6996DAF5526AD), LazyThreadSafetyMode.None); + public CAnimParamHandle LookDirection { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xA3C6996DAF5526AD)); + get => new CAnimParamHandleImpl(_Handle + _LookDirectionOffset.Value); } + private static readonly Lazy _LookTargetOffset = new(() => Schema.GetOffset(0xA3C6996D3361F745), LazyThreadSafetyMode.None); + public CAnimParamHandle LookTarget { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xA3C6996D3361F745)); + get => new CAnimParamHandleImpl(_Handle + _LookTargetOffset.Value); } + private static readonly Lazy _LookTargetWorldSpaceOffset = new(() => Schema.GetOffset(0xA3C6996DD1AC545F), LazyThreadSafetyMode.None); + public CAnimParamHandle LookTargetWorldSpace { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xA3C6996DD1AC545F)); + get => new CAnimParamHandleImpl(_Handle + _LookTargetWorldSpaceOffset.Value); } + private static readonly Lazy _NetworkLookTargetOffset = new(() => Schema.GetOffset(0xA3C6996D39F2F527), LazyThreadSafetyMode.None); + public ref bool NetworkLookTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3C6996D39F2F527)); + get => ref _Handle.AsRef(_NetworkLookTargetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMapInfoImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMapInfoImpl.cs index cd759469b..5c08241f9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMapInfoImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMapInfoImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,47 +17,75 @@ internal partial class CMapInfoImpl : CPointEntityImpl, CMapInfo { public CMapInfoImpl(nint handle) : base(handle) { } + private static readonly Lazy _BuyingStatusOffset = new(() => Schema.GetOffset(0x64779D004D95482E), LazyThreadSafetyMode.None); + public ref int BuyingStatus { - get => ref _Handle.AsRef(Schema.GetOffset(0x64779D004D95482E)); + get => ref _Handle.AsRef(_BuyingStatusOffset.Value); } + private static readonly Lazy _BombRadiusOffset = new(() => Schema.GetOffset(0x64779D009E7FF135), LazyThreadSafetyMode.None); + public ref float BombRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x64779D009E7FF135)); + get => ref _Handle.AsRef(_BombRadiusOffset.Value); } + private static readonly Lazy _PetPopulationOffset = new(() => Schema.GetOffset(0x64779D00BCEEB4DA), LazyThreadSafetyMode.None); + public ref int PetPopulation { - get => ref _Handle.AsRef(Schema.GetOffset(0x64779D00BCEEB4DA)); + get => ref _Handle.AsRef(_PetPopulationOffset.Value); } + private static readonly Lazy _UseNormalSpawnsForDMOffset = new(() => Schema.GetOffset(0x64779D007D2B7341), LazyThreadSafetyMode.None); + public ref bool UseNormalSpawnsForDM { - get => ref _Handle.AsRef(Schema.GetOffset(0x64779D007D2B7341)); + get => ref _Handle.AsRef(_UseNormalSpawnsForDMOffset.Value); } + private static readonly Lazy _DisableAutoGeneratedDMSpawnsOffset = new(() => Schema.GetOffset(0x64779D001002982A), LazyThreadSafetyMode.None); + public ref bool DisableAutoGeneratedDMSpawns { - get => ref _Handle.AsRef(Schema.GetOffset(0x64779D001002982A)); + get => ref _Handle.AsRef(_DisableAutoGeneratedDMSpawnsOffset.Value); } + private static readonly Lazy _BotMaxVisionDistanceOffset = new(() => Schema.GetOffset(0x64779D00C24A99A9), LazyThreadSafetyMode.None); + public ref float BotMaxVisionDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x64779D00C24A99A9)); + get => ref _Handle.AsRef(_BotMaxVisionDistanceOffset.Value); } + private static readonly Lazy _HostageCountOffset = new(() => Schema.GetOffset(0x64779D00712B11F0), LazyThreadSafetyMode.None); + public ref int HostageCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x64779D00712B11F0)); + get => ref _Handle.AsRef(_HostageCountOffset.Value); } + private static readonly Lazy _FadePlayerVisibilityFarZOffset = new(() => Schema.GetOffset(0x64779D00747F0977), LazyThreadSafetyMode.None); + public ref bool FadePlayerVisibilityFarZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x64779D00747F0977)); + get => ref _Handle.AsRef(_FadePlayerVisibilityFarZOffset.Value); } + private static readonly Lazy _RainTraceToSkyEnabledOffset = new(() => Schema.GetOffset(0x64779D009EB6B2C7), LazyThreadSafetyMode.None); + public ref bool RainTraceToSkyEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x64779D009EB6B2C7)); + get => ref _Handle.AsRef(_RainTraceToSkyEnabledOffset.Value); } + private static readonly Lazy _EnvRainStrengthOffset = new(() => Schema.GetOffset(0x64779D006B9B85E1), LazyThreadSafetyMode.None); + public ref float EnvRainStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x64779D006B9B85E1)); + get => ref _Handle.AsRef(_EnvRainStrengthOffset.Value); } + private static readonly Lazy _EnvPuddleRippleStrengthOffset = new(() => Schema.GetOffset(0x64779D00E94DCDCD), LazyThreadSafetyMode.None); + public ref float EnvPuddleRippleStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x64779D00E94DCDCD)); + get => ref _Handle.AsRef(_EnvPuddleRippleStrengthOffset.Value); } + private static readonly Lazy _EnvPuddleRippleDirectionOffset = new(() => Schema.GetOffset(0x64779D00B1B7BC85), LazyThreadSafetyMode.None); + public ref float EnvPuddleRippleDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0x64779D00B1B7BC85)); + get => ref _Handle.AsRef(_EnvPuddleRippleDirectionOffset.Value); } + private static readonly Lazy _EnvWetnessCoverageOffset = new(() => Schema.GetOffset(0x64779D001005A92B), LazyThreadSafetyMode.None); + public ref float EnvWetnessCoverage { - get => ref _Handle.AsRef(Schema.GetOffset(0x64779D001005A92B)); + get => ref _Handle.AsRef(_EnvWetnessCoverageOffset.Value); } + private static readonly Lazy _EnvWetnessDryingAmountOffset = new(() => Schema.GetOffset(0x64779D00FC4DB04E), LazyThreadSafetyMode.None); + public ref float EnvWetnessDryingAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0x64779D00FC4DB04E)); + get => ref _Handle.AsRef(_EnvWetnessDryingAmountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMapSharedEnvironmentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMapSharedEnvironmentImpl.cs index fc061c34e..e2a5d2207 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMapSharedEnvironmentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMapSharedEnvironmentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CMapSharedEnvironmentImpl : CLogicalEntityImpl, CMapShare public CMapSharedEnvironmentImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetMapNameOffset = new(() => Schema.GetOffset(0xDA50C2DE129742FD), LazyThreadSafetyMode.None); + public string TargetMapName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDA50C2DE129742FD)); + var ptr = _Handle.Read(_TargetMapNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDA50C2DE129742FD, value); + set => Schema.SetString(_Handle, _TargetMapNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMapVetoPickControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMapVetoPickControllerImpl.cs index 5a5271ec9..662fe95f7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMapVetoPickControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMapVetoPickControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CMapVetoPickControllerImpl : CBaseEntityImpl, CMapVetoPic public CMapVetoPickControllerImpl(nint handle) : base(handle) { } + private static readonly Lazy _PlayedIntroVcdOffset = new(() => Schema.GetOffset(0xD5DDD68DA8EE58C9), LazyThreadSafetyMode.None); + public ref bool PlayedIntroVcd { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5DDD68DA8EE58C9)); + get => ref _Handle.AsRef(_PlayedIntroVcdOffset.Value); } + private static readonly Lazy _NeedToPlayFiveSecondsRemainingOffset = new(() => Schema.GetOffset(0xD5DDD68D94B61BAD), LazyThreadSafetyMode.None); + public ref bool NeedToPlayFiveSecondsRemaining { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5DDD68D94B61BAD)); + get => ref _Handle.AsRef(_NeedToPlayFiveSecondsRemainingOffset.Value); } + private static readonly Lazy _DblPreMatchDraftSequenceTimeOffset = new(() => Schema.GetOffset(0xD5DDD68DB69AE022), LazyThreadSafetyMode.None); + public ref double DblPreMatchDraftSequenceTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5DDD68DB69AE022)); + get => ref _Handle.AsRef(_DblPreMatchDraftSequenceTimeOffset.Value); } + private static readonly Lazy _PreMatchDraftStateChangedOffset = new(() => Schema.GetOffset(0xD5DDD68D114D7C7D), LazyThreadSafetyMode.None); + public ref bool PreMatchDraftStateChanged { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5DDD68D114D7C7D)); + get => ref _Handle.AsRef(_PreMatchDraftStateChangedOffset.Value); } + private static readonly Lazy _DraftTypeOffset = new(() => Schema.GetOffset(0xD5DDD68D6BFCF590), LazyThreadSafetyMode.None); + public ref int DraftType { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5DDD68D6BFCF590)); + get => ref _Handle.AsRef(_DraftTypeOffset.Value); } + private static readonly Lazy _TeamWinningCoinTossOffset = new(() => Schema.GetOffset(0xD5DDD68D45B5B5A2), LazyThreadSafetyMode.None); + public ref int TeamWinningCoinToss { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5DDD68D45B5B5A2)); + get => ref _Handle.AsRef(_TeamWinningCoinTossOffset.Value); } public ISchemaFixedArray TeamWithFirstChoice { get => new SchemaFixedArray(_Handle, 0xD5DDD68D8887D005, 64, 4, 4); @@ -63,29 +77,45 @@ public ISchemaFixedArray MapId5 { public ISchemaFixedArray StartingSide0 { get => new SchemaFixedArray(_Handle, 0xD5DDD68DDAE5D5BA, 64, 4, 4); } + private static readonly Lazy _CurrentPhaseOffset = new(() => Schema.GetOffset(0xD5DDD68DA6D9FE15), LazyThreadSafetyMode.None); + public ref int CurrentPhase { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5DDD68DA6D9FE15)); + get => ref _Handle.AsRef(_CurrentPhaseOffset.Value); } + private static readonly Lazy _PhaseStartTickOffset = new(() => Schema.GetOffset(0xD5DDD68DD6F24225), LazyThreadSafetyMode.None); + public ref int PhaseStartTick { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5DDD68DD6F24225)); + get => ref _Handle.AsRef(_PhaseStartTickOffset.Value); } + private static readonly Lazy _PhaseDurationTicksOffset = new(() => Schema.GetOffset(0xD5DDD68D77B8F176), LazyThreadSafetyMode.None); + public ref int PhaseDurationTicks { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5DDD68D77B8F176)); + get => ref _Handle.AsRef(_PhaseDurationTicksOffset.Value); } + private static readonly Lazy _OnMapVetoedOffset = new(() => Schema.GetOffset(0xD5DDD68D6C16E77B), LazyThreadSafetyMode.None); + public SchemaUntypedField OnMapVetoed { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD5DDD68D6C16E77B)); + get => new SchemaUntypedField(_Handle + _OnMapVetoedOffset.Value); } + private static readonly Lazy _OnMapPickedOffset = new(() => Schema.GetOffset(0xD5DDD68DF50BA186), LazyThreadSafetyMode.None); + public SchemaUntypedField OnMapPicked { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD5DDD68DF50BA186)); + get => new SchemaUntypedField(_Handle + _OnMapPickedOffset.Value); } + private static readonly Lazy _OnSidesPickedOffset = new(() => Schema.GetOffset(0xD5DDD68DC852D128), LazyThreadSafetyMode.None); + public SchemaUntypedField OnSidesPicked { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD5DDD68DC852D128)); + get => new SchemaUntypedField(_Handle + _OnSidesPickedOffset.Value); } + private static readonly Lazy _OnNewPhaseStartedOffset = new(() => Schema.GetOffset(0xD5DDD68D40B650EE), LazyThreadSafetyMode.None); + public SchemaUntypedField OnNewPhaseStarted { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD5DDD68D40B650EE)); + get => new SchemaUntypedField(_Handle + _OnNewPhaseStartedOffset.Value); } + private static readonly Lazy _OnLevelTransitionOffset = new(() => Schema.GetOffset(0xD5DDD68D2AEE71AD), LazyThreadSafetyMode.None); + public SchemaUntypedField OnLevelTransition { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD5DDD68D2AEE71AD)); + get => new SchemaUntypedField(_Handle + _OnLevelTransitionOffset.Value); } public void DraftTypeUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeImpl.cs index da5cf6252..b70f2d192 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CMarkupVolumeImpl : CBaseModelEntityImpl, CMarkupVolume { public CMarkupVolumeImpl(nint handle) : base(handle) { } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x41A873203A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x41A873203A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeTaggedImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeTaggedImpl.cs index 822cd946e..7139f87dc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeTaggedImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeTaggedImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CMarkupVolumeTaggedImpl : CMarkupVolumeImpl, CMarkupVolum public CMarkupVolumeTaggedImpl(nint handle) : base(handle) { } + private static readonly Lazy _GroupNamesOffset = new(() => Schema.GetOffset(0x4113340CB853197C), LazyThreadSafetyMode.None); + public ref CUtlVector GroupNames { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4113340CB853197C)); + get => ref _Handle.AsRef>(_GroupNamesOffset.Value); } + private static readonly Lazy _TagsOffset = new(() => Schema.GetOffset(0x4113340C31C5D020), LazyThreadSafetyMode.None); + public ref CUtlVector Tags { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4113340C31C5D020)); + get => ref _Handle.AsRef>(_TagsOffset.Value); } + private static readonly Lazy _IsGroupOffset = new(() => Schema.GetOffset(0x4113340CB68D3FDC), LazyThreadSafetyMode.None); + public ref bool IsGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0x4113340CB68D3FDC)); + get => ref _Handle.AsRef(_IsGroupOffset.Value); } + private static readonly Lazy _GroupByPrefabOffset = new(() => Schema.GetOffset(0x4113340CBCD6E7A7), LazyThreadSafetyMode.None); + public ref bool GroupByPrefab { - get => ref _Handle.AsRef(Schema.GetOffset(0x4113340CBCD6E7A7)); + get => ref _Handle.AsRef(_GroupByPrefabOffset.Value); } + private static readonly Lazy _GroupByVolumeOffset = new(() => Schema.GetOffset(0x4113340CFE19F503), LazyThreadSafetyMode.None); + public ref bool GroupByVolume { - get => ref _Handle.AsRef(Schema.GetOffset(0x4113340CFE19F503)); + get => ref _Handle.AsRef(_GroupByVolumeOffset.Value); } + private static readonly Lazy _GroupOtherGroupsOffset = new(() => Schema.GetOffset(0x4113340CE6C708E6), LazyThreadSafetyMode.None); + public ref bool GroupOtherGroups { - get => ref _Handle.AsRef(Schema.GetOffset(0x4113340CE6C708E6)); + get => ref _Handle.AsRef(_GroupOtherGroupsOffset.Value); } + private static readonly Lazy _IsInGroupOffset = new(() => Schema.GetOffset(0x4113340C19D5C241), LazyThreadSafetyMode.None); + public ref bool IsInGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0x4113340C19D5C241)); + get => ref _Handle.AsRef(_IsInGroupOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeTagged_NavGameImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeTagged_NavGameImpl.cs index f9199aefc..24a0b946c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeTagged_NavGameImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeTagged_NavGameImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CMarkupVolumeTagged_NavGameImpl : CMarkupVolumeWithRefImp public CMarkupVolumeTagged_NavGameImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScopesOffset = new(() => Schema.GetOffset(0xFB4AC8A49E6C8A44), LazyThreadSafetyMode.None); + public ref NavScopeFlags_t Scopes { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB4AC8A49E6C8A44)); + get => ref _Handle.AsRef(_ScopesOffset.Value); } + private static readonly Lazy _FloodFillAttributeOffset = new(() => Schema.GetOffset(0xFB4AC8A4ECF24446), LazyThreadSafetyMode.None); + public ref bool FloodFillAttribute { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB4AC8A4ECF24446)); + get => ref _Handle.AsRef(_FloodFillAttributeOffset.Value); } + private static readonly Lazy _SplitNavSpaceOffset = new(() => Schema.GetOffset(0xFB4AC8A438B16FC2), LazyThreadSafetyMode.None); + public ref bool SplitNavSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB4AC8A438B16FC2)); + get => ref _Handle.AsRef(_SplitNavSpaceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeTagged_NavImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeTagged_NavImpl.cs index ecc928415..0f8afaa70 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeTagged_NavImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeTagged_NavImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CMarkupVolumeTagged_NavImpl : CMarkupVolumeTaggedImpl, CM public CMarkupVolumeTagged_NavImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScopesOffset = new(() => Schema.GetOffset(0x3E97D28E9E6C8A44), LazyThreadSafetyMode.None); + public ref NavScopeFlags_t Scopes { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E97D28E9E6C8A44)); + get => ref _Handle.AsRef(_ScopesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeWithRefImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeWithRefImpl.cs index 696f2c6cc..42f9e9b61 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeWithRefImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMarkupVolumeWithRefImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CMarkupVolumeWithRefImpl : CMarkupVolumeTaggedImpl, CMark public CMarkupVolumeWithRefImpl(nint handle) : base(handle) { } + private static readonly Lazy _UseRefOffset = new(() => Schema.GetOffset(0x12AA97857F572B29), LazyThreadSafetyMode.None); + public ref bool UseRef { - get => ref _Handle.AsRef(Schema.GetOffset(0x12AA97857F572B29)); + get => ref _Handle.AsRef(_UseRefOffset.Value); } + private static readonly Lazy _RefPosEntitySpaceOffset = new(() => Schema.GetOffset(0x12AA978532BBDFAB), LazyThreadSafetyMode.None); + public ref Vector RefPosEntitySpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x12AA978532BBDFAB)); + get => ref _Handle.AsRef(_RefPosEntitySpaceOffset.Value); } + private static readonly Lazy _RefPosWorldSpaceOffset = new(() => Schema.GetOffset(0x12AA97856139C236), LazyThreadSafetyMode.None); + public ref Vector RefPosWorldSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x12AA97856139C236)); + get => ref _Handle.AsRef(_RefPosWorldSpaceOffset.Value); } + private static readonly Lazy _RefDotOffset = new(() => Schema.GetOffset(0x12AA9785584DB957), LazyThreadSafetyMode.None); + public ref float RefDot { - get => ref _Handle.AsRef(Schema.GetOffset(0x12AA9785584DB957)); + get => ref _Handle.AsRef(_RefDotOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMaterialAttributeAnimTagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMaterialAttributeAnimTagImpl.cs index e277b86bb..9ddb82ef3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMaterialAttributeAnimTagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMaterialAttributeAnimTagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class CMaterialAttributeAnimTagImpl : CAnimTagBaseImpl, CMateri public CMaterialAttributeAnimTagImpl(nint handle) : base(handle) { } + private static readonly Lazy _AttributeNameOffset = new(() => Schema.GetOffset(0x509D90A81408864C), LazyThreadSafetyMode.None); + public string AttributeName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x509D90A81408864C)); + var ptr = _Handle.Read(_AttributeNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x509D90A81408864C, value); + set => Schema.SetString(_Handle, _AttributeNameOffset.Value, value); } + private static readonly Lazy _AttributeTypeOffset = new(() => Schema.GetOffset(0x509D90A84243CC37), LazyThreadSafetyMode.None); + public ref MatterialAttributeTagType_t AttributeType { - get => ref _Handle.AsRef(Schema.GetOffset(0x509D90A84243CC37)); + get => ref _Handle.AsRef(_AttributeTypeOffset.Value); } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x509D90A88DFCB984), LazyThreadSafetyMode.None); + public ref float Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x509D90A88DFCB984)); + get => ref _Handle.AsRef(_ValueOffset.Value); } + private static readonly Lazy _ColorOffset = new(() => Schema.GetOffset(0x509D90A8D7D017D8), LazyThreadSafetyMode.None); + public ref Color Color { - get => ref _Handle.AsRef(Schema.GetOffset(0x509D90A8D7D017D8)); + get => ref _Handle.AsRef(_ColorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMaterialDrawDescriptorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMaterialDrawDescriptorImpl.cs index 87c6ca5f3..f6225bc8d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMaterialDrawDescriptorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMaterialDrawDescriptorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,56 +17,90 @@ internal partial class CMaterialDrawDescriptorImpl : SchemaClass, CMaterialDrawD public CMaterialDrawDescriptorImpl(nint handle) : base(handle) { } + private static readonly Lazy _UvDensityOffset = new(() => Schema.GetOffset(0xE7C21000A7661B68), LazyThreadSafetyMode.None); + public ref float UvDensity { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7C21000A7661B68)); + get => ref _Handle.AsRef(_UvDensityOffset.Value); } + private static readonly Lazy _TintColorOffset = new(() => Schema.GetOffset(0xE7C2100050AFF21F), LazyThreadSafetyMode.None); + public ref Vector TintColor { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7C2100050AFF21F)); + get => ref _Handle.AsRef(_TintColorOffset.Value); } + private static readonly Lazy _AlphaOffset = new(() => Schema.GetOffset(0xE7C21000A0DB7DD1), LazyThreadSafetyMode.None); + public ref float Alpha { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7C21000A0DB7DD1)); + get => ref _Handle.AsRef(_AlphaOffset.Value); } + private static readonly Lazy _NumMeshletsOffset = new(() => Schema.GetOffset(0xE7C21000A56D0338), LazyThreadSafetyMode.None); + public ref ushort NumMeshlets { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7C21000A56D0338)); + get => ref _Handle.AsRef(_NumMeshletsOffset.Value); } + private static readonly Lazy _FirstMeshletOffset = new(() => Schema.GetOffset(0xE7C210006DA99901), LazyThreadSafetyMode.None); + public ref uint FirstMeshlet { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7C210006DA99901)); + get => ref _Handle.AsRef(_FirstMeshletOffset.Value); } + private static readonly Lazy _AppliedIndexOffsetOffset = new(() => Schema.GetOffset(0xE7C21000A24FA35D), LazyThreadSafetyMode.None); + public ref uint AppliedIndexOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7C21000A24FA35D)); + get => ref _Handle.AsRef(_AppliedIndexOffsetOffset.Value); } + private static readonly Lazy _DepthVertexBufferIndexOffset = new(() => Schema.GetOffset(0xE7C2100049292FE2), LazyThreadSafetyMode.None); + public ref byte DepthVertexBufferIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7C2100049292FE2)); + get => ref _Handle.AsRef(_DepthVertexBufferIndexOffset.Value); } + private static readonly Lazy _MeshletPackedIVBIndexOffset = new(() => Schema.GetOffset(0xE7C21000A98C8BAC), LazyThreadSafetyMode.None); + public ref byte MeshletPackedIVBIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7C21000A98C8BAC)); + get => ref _Handle.AsRef(_MeshletPackedIVBIndexOffset.Value); } + private static readonly Lazy _RigidMeshPartsOffset = new(() => Schema.GetOffset(0xE7C2100062848C01), LazyThreadSafetyMode.None); + public ref CUtlLeanVector RigidMeshParts { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE7C2100062848C01)); + get => ref _Handle.AsRef>(_RigidMeshPartsOffset.Value); } + private static readonly Lazy _PrimitiveTypeOffset = new(() => Schema.GetOffset(0xE7C2100041517C4A), LazyThreadSafetyMode.None); + public ref RenderPrimitiveType_t PrimitiveType { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7C2100041517C4A)); + get => ref _Handle.AsRef(_PrimitiveTypeOffset.Value); } + private static readonly Lazy _BaseVertexOffset = new(() => Schema.GetOffset(0xE7C2100048F55CFA), LazyThreadSafetyMode.None); + public ref int BaseVertex { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7C2100048F55CFA)); + get => ref _Handle.AsRef(_BaseVertexOffset.Value); } + private static readonly Lazy _VertexCountOffset = new(() => Schema.GetOffset(0xE7C2100012923E12), LazyThreadSafetyMode.None); + public ref int VertexCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7C2100012923E12)); + get => ref _Handle.AsRef(_VertexCountOffset.Value); } + private static readonly Lazy _StartIndexOffset = new(() => Schema.GetOffset(0xE7C210008A0ACD99), LazyThreadSafetyMode.None); + public ref int StartIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7C210008A0ACD99)); + get => ref _Handle.AsRef(_StartIndexOffset.Value); } + private static readonly Lazy _IndexCountOffset = new(() => Schema.GetOffset(0xE7C21000B0202EFE), LazyThreadSafetyMode.None); + public ref int IndexCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7C21000B0202EFE)); + get => ref _Handle.AsRef(_IndexCountOffset.Value); } + private static readonly Lazy _IndexBufferOffset = new(() => Schema.GetOffset(0xE7C210003C0C2701), LazyThreadSafetyMode.None); + public CRenderBufferBinding IndexBuffer { - get => new CRenderBufferBindingImpl(_Handle + Schema.GetOffset(0xE7C210003C0C2701)); + get => new CRenderBufferBindingImpl(_Handle + _IndexBufferOffset.Value); } + private static readonly Lazy _MeshletPackedIVBOffset = new(() => Schema.GetOffset(0xE7C21000015D34E4), LazyThreadSafetyMode.None); + public CRenderBufferBinding MeshletPackedIVB { - get => new CRenderBufferBindingImpl(_Handle + Schema.GetOffset(0xE7C21000015D34E4)); + get => new CRenderBufferBindingImpl(_Handle + _MeshletPackedIVBOffset.Value); } + private static readonly Lazy _MaterialOffset = new(() => Schema.GetOffset(0xE7C2100034ADFC00), LazyThreadSafetyMode.None); + public ref CStrongHandle Material { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE7C2100034ADFC00)); + get => ref _Handle.AsRef>(_MaterialOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMaterialDrawDescriptor__RigidMeshPart_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMaterialDrawDescriptor__RigidMeshPart_tImpl.cs index 8b5ad9272..6cffee7af 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMaterialDrawDescriptor__RigidMeshPart_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMaterialDrawDescriptor__RigidMeshPart_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CMaterialDrawDescriptor__RigidMeshPart_tImpl : SchemaClas public CMaterialDrawDescriptor__RigidMeshPart_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _RigidBLASIndexOffset = new(() => Schema.GetOffset(0xD375EED8EE87873E), LazyThreadSafetyMode.None); + public ref ushort RigidBLASIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xD375EED8EE87873E)); + get => ref _Handle.AsRef(_RigidBLASIndexOffset.Value); } + private static readonly Lazy _BoneIndexOffset = new(() => Schema.GetOffset(0xD375EED89F407B79), LazyThreadSafetyMode.None); + public ref short BoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xD375EED89F407B79)); + get => ref _Handle.AsRef(_BoneIndexOffset.Value); } + private static readonly Lazy _StartIndexOffsetOffset = new(() => Schema.GetOffset(0xD375EED891EF1626), LazyThreadSafetyMode.None); + public ref uint StartIndexOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xD375EED891EF1626)); + get => ref _Handle.AsRef(_StartIndexOffsetOffset.Value); } + private static readonly Lazy _PrimitiveCountOffset = new(() => Schema.GetOffset(0xD375EED8B627A621), LazyThreadSafetyMode.None); + public ref uint PrimitiveCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xD375EED8B627A621)); + get => ref _Handle.AsRef(_PrimitiveCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMathColorBlendImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMathColorBlendImpl.cs index aedb621bf..8e6a6b696 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMathColorBlendImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMathColorBlendImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CMathColorBlendImpl : CLogicalEntityImpl, CMathColorBlend public CMathColorBlendImpl(nint handle) : base(handle) { } + private static readonly Lazy _InMinOffset = new(() => Schema.GetOffset(0xCC5E3EF67506C6C8), LazyThreadSafetyMode.None); + public ref float InMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xCC5E3EF67506C6C8)); + get => ref _Handle.AsRef(_InMinOffset.Value); } + private static readonly Lazy _InMaxOffset = new(() => Schema.GetOffset(0xCC5E3EF66B1BD1C2), LazyThreadSafetyMode.None); + public ref float InMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xCC5E3EF66B1BD1C2)); + get => ref _Handle.AsRef(_InMaxOffset.Value); } + private static readonly Lazy _OutColor1Offset = new(() => Schema.GetOffset(0xCC5E3EF639D7D5AD), LazyThreadSafetyMode.None); + public ref Color OutColor1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xCC5E3EF639D7D5AD)); + get => ref _Handle.AsRef(_OutColor1Offset.Value); } + private static readonly Lazy _OutColor2Offset = new(() => Schema.GetOffset(0xCC5E3EF636D7D0F4), LazyThreadSafetyMode.None); + public ref Color OutColor2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xCC5E3EF636D7D0F4)); + get => ref _Handle.AsRef(_OutColor2Offset.Value); } + private static readonly Lazy _OutValueOffset = new(() => Schema.GetOffset(0xCC5E3EF6B5358CB4), LazyThreadSafetyMode.None); + public SchemaUntypedField OutValue { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xCC5E3EF6B5358CB4)); + get => new SchemaUntypedField(_Handle + _OutValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMathCounterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMathCounterImpl.cs index ea0ac5c92..7d4ed5f08 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMathCounterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMathCounterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class CMathCounterImpl : CLogicalEntityImpl, CMathCounter { public CMathCounterImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinOffset = new(() => Schema.GetOffset(0x516742BC3B1A5649), LazyThreadSafetyMode.None); + public ref float Min { - get => ref _Handle.AsRef(Schema.GetOffset(0x516742BC3B1A5649)); + get => ref _Handle.AsRef(_MinOffset.Value); } + private static readonly Lazy _MaxOffset = new(() => Schema.GetOffset(0x516742BC2D06B887), LazyThreadSafetyMode.None); + public ref float Max { - get => ref _Handle.AsRef(Schema.GetOffset(0x516742BC2D06B887)); + get => ref _Handle.AsRef(_MaxOffset.Value); } + private static readonly Lazy _HitMinOffset = new(() => Schema.GetOffset(0x516742BC563A161E), LazyThreadSafetyMode.None); + public ref bool HitMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x516742BC563A161E)); + get => ref _Handle.AsRef(_HitMinOffset.Value); } + private static readonly Lazy _HitMaxOffset = new(() => Schema.GetOffset(0x516742BC6826AABC), LazyThreadSafetyMode.None); + public ref bool HitMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x516742BC6826AABC)); + get => ref _Handle.AsRef(_HitMaxOffset.Value); } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x516742BC3A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x516742BC3A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _OutValueOffset = new(() => Schema.GetOffset(0x516742BCB5358CB4), LazyThreadSafetyMode.None); + public SchemaUntypedField OutValue { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x516742BCB5358CB4)); + get => new SchemaUntypedField(_Handle + _OutValueOffset.Value); } + private static readonly Lazy _OnGetValueOffset = new(() => Schema.GetOffset(0x516742BC4246EF45), LazyThreadSafetyMode.None); + public SchemaUntypedField OnGetValue { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x516742BC4246EF45)); + get => new SchemaUntypedField(_Handle + _OnGetValueOffset.Value); } + private static readonly Lazy _OnHitMinOffset = new(() => Schema.GetOffset(0x516742BCFBD89E37), LazyThreadSafetyMode.None); + public CEntityIOOutput OnHitMin { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x516742BCFBD89E37)); + get => new CEntityIOOutputImpl(_Handle + _OnHitMinOffset.Value); } + private static readonly Lazy _OnHitMaxOffset = new(() => Schema.GetOffset(0x516742BC09EC3BF9), LazyThreadSafetyMode.None); + public CEntityIOOutput OnHitMax { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x516742BC09EC3BF9)); + get => new CEntityIOOutputImpl(_Handle + _OnHitMaxOffset.Value); } + private static readonly Lazy _OnChangedFromMinOffset = new(() => Schema.GetOffset(0x516742BC0DDBD960), LazyThreadSafetyMode.None); + public CEntityIOOutput OnChangedFromMin { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x516742BC0DDBD960)); + get => new CEntityIOOutputImpl(_Handle + _OnChangedFromMinOffset.Value); } + private static readonly Lazy _OnChangedFromMaxOffset = new(() => Schema.GetOffset(0x516742BC23C8744A), LazyThreadSafetyMode.None); + public CEntityIOOutput OnChangedFromMax { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x516742BC23C8744A)); + get => new CEntityIOOutputImpl(_Handle + _OnChangedFromMaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMathRemapImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMathRemapImpl.cs index 07cd8453d..0119fb01e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMathRemapImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMathRemapImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class CMathRemapImpl : CLogicalEntityImpl, CMathRemap { public CMathRemapImpl(nint handle) : base(handle) { } + private static readonly Lazy _InMinOffset = new(() => Schema.GetOffset(0xDE4BD86D7506C6C8), LazyThreadSafetyMode.None); + public ref float InMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE4BD86D7506C6C8)); + get => ref _Handle.AsRef(_InMinOffset.Value); } + private static readonly Lazy _InMaxOffset = new(() => Schema.GetOffset(0xDE4BD86D6B1BD1C2), LazyThreadSafetyMode.None); + public ref float InMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE4BD86D6B1BD1C2)); + get => ref _Handle.AsRef(_InMaxOffset.Value); } + private static readonly Lazy _Out1Offset = new(() => Schema.GetOffset(0xDE4BD86D536FFA50), LazyThreadSafetyMode.None); + public ref float Out1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE4BD86D536FFA50)); + get => ref _Handle.AsRef(_Out1Offset.Value); } + private static readonly Lazy _Out2Offset = new(() => Schema.GetOffset(0xDE4BD86D566FFF09), LazyThreadSafetyMode.None); + public ref float Out2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE4BD86D566FFF09)); + get => ref _Handle.AsRef(_Out2Offset.Value); } + private static readonly Lazy _OldInValueOffset = new(() => Schema.GetOffset(0xDE4BD86D36ED0B54), LazyThreadSafetyMode.None); + public ref float OldInValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE4BD86D36ED0B54)); + get => ref _Handle.AsRef(_OldInValueOffset.Value); } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0xDE4BD86D6154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE4BD86D6154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } + private static readonly Lazy _OutValueOffset = new(() => Schema.GetOffset(0xDE4BD86DB5358CB4), LazyThreadSafetyMode.None); + public SchemaUntypedField OutValue { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xDE4BD86DB5358CB4)); + get => new SchemaUntypedField(_Handle + _OutValueOffset.Value); } + private static readonly Lazy _OnRoseAboveMinOffset = new(() => Schema.GetOffset(0xDE4BD86D814C5D50), LazyThreadSafetyMode.None); + public CEntityIOOutput OnRoseAboveMin { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xDE4BD86D814C5D50)); + get => new CEntityIOOutputImpl(_Handle + _OnRoseAboveMinOffset.Value); } + private static readonly Lazy _OnRoseAboveMaxOffset = new(() => Schema.GetOffset(0xDE4BD86D7738C5DA), LazyThreadSafetyMode.None); + public CEntityIOOutput OnRoseAboveMax { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xDE4BD86D7738C5DA)); + get => new CEntityIOOutputImpl(_Handle + _OnRoseAboveMaxOffset.Value); } + private static readonly Lazy _OnFellBelowMinOffset = new(() => Schema.GetOffset(0xDE4BD86DBF740886), LazyThreadSafetyMode.None); + public CEntityIOOutput OnFellBelowMin { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xDE4BD86DBF740886)); + get => new CEntityIOOutputImpl(_Handle + _OnFellBelowMinOffset.Value); } + private static readonly Lazy _OnFellBelowMaxOffset = new(() => Schema.GetOffset(0xDE4BD86DD187AC94), LazyThreadSafetyMode.None); + public CEntityIOOutput OnFellBelowMax { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xDE4BD86DD187AC94)); + get => new CEntityIOOutputImpl(_Handle + _OnFellBelowMaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMeshletDescriptorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMeshletDescriptorImpl.cs index 1399b5b43..40818dca6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMeshletDescriptorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMeshletDescriptorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CMeshletDescriptorImpl : SchemaClass, CMeshletDescriptor public CMeshletDescriptorImpl(nint handle) : base(handle) { } + private static readonly Lazy _PackedAABBOffset = new(() => Schema.GetOffset(0xAF93495D8D638233), LazyThreadSafetyMode.None); + public PackedAABB_t PackedAABB { - get => new PackedAABB_tImpl(_Handle + Schema.GetOffset(0xAF93495D8D638233)); + get => new PackedAABB_tImpl(_Handle + _PackedAABBOffset.Value); } + private static readonly Lazy _CullingDataOffset = new(() => Schema.GetOffset(0xAF93495DA6D54DC3), LazyThreadSafetyMode.None); + public CDrawCullingData CullingData { - get => new CDrawCullingDataImpl(_Handle + Schema.GetOffset(0xAF93495DA6D54DC3)); + get => new CDrawCullingDataImpl(_Handle + _CullingDataOffset.Value); } + private static readonly Lazy _VertexOffsetOffset = new(() => Schema.GetOffset(0xAF93495DF1F6FC40), LazyThreadSafetyMode.None); + public ref uint VertexOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xAF93495DF1F6FC40)); + get => ref _Handle.AsRef(_VertexOffsetOffset.Value); } + private static readonly Lazy _TriangleOffsetOffset = new(() => Schema.GetOffset(0xAF93495DAFE22CE6), LazyThreadSafetyMode.None); + public ref uint TriangleOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xAF93495DAFE22CE6)); + get => ref _Handle.AsRef(_TriangleOffsetOffset.Value); } + private static readonly Lazy _VertexCountOffset = new(() => Schema.GetOffset(0xAF93495D12923E12), LazyThreadSafetyMode.None); + public ref byte VertexCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xAF93495D12923E12)); + get => ref _Handle.AsRef(_VertexCountOffset.Value); } + private static readonly Lazy _TriangleCountOffset = new(() => Schema.GetOffset(0xAF93495D5E82E240), LazyThreadSafetyMode.None); + public ref byte TriangleCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xAF93495D5E82E240)); + get => ref _Handle.AsRef(_TriangleCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMessageEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMessageEntityImpl.cs index c46a804dd..16583a8bf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMessageEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMessageEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class CMessageEntityImpl : CPointEntityImpl, CMessageEntity { public CMessageEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x893EADCEA921CA53), LazyThreadSafetyMode.None); + public ref int Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x893EADCEA921CA53)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _MessageTextOffset = new(() => Schema.GetOffset(0x893EADCEBA6E5D73), LazyThreadSafetyMode.None); + public string MessageText { get { - var ptr = _Handle.Read(Schema.GetOffset(0x893EADCEBA6E5D73)); + var ptr = _Handle.Read(_MessageTextOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x893EADCEBA6E5D73, value); + set => Schema.SetString(_Handle, _MessageTextOffset.Value, value); } + private static readonly Lazy _DrawTextOffset = new(() => Schema.GetOffset(0x893EADCE598871D4), LazyThreadSafetyMode.None); + public ref bool DrawText { - get => ref _Handle.AsRef(Schema.GetOffset(0x893EADCE598871D4)); + get => ref _Handle.AsRef(_DrawTextOffset.Value); } + private static readonly Lazy _DeveloperOnlyOffset = new(() => Schema.GetOffset(0x893EADCE981A6E5F), LazyThreadSafetyMode.None); + public ref bool DeveloperOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0x893EADCE981A6E5F)); + get => ref _Handle.AsRef(_DeveloperOnlyOffset.Value); } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0x893EADCE6154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x893EADCE6154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMessageImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMessageImpl.cs index 1b060f101..050396ab1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMessageImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMessageImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,31 +17,43 @@ internal partial class CMessageImpl : CPointEntityImpl, CMessage { public CMessageImpl(nint handle) : base(handle) { } + private static readonly Lazy _MessageOffset = new(() => Schema.GetOffset(0xCCCF499CC5243DC), LazyThreadSafetyMode.None); + public string Message { get { - var ptr = _Handle.Read(Schema.GetOffset(0xCCCF499CC5243DC)); + var ptr = _Handle.Read(_MessageOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xCCCF499CC5243DC, value); + set => Schema.SetString(_Handle, _MessageOffset.Value, value); } + private static readonly Lazy _MessageVolumeOffset = new(() => Schema.GetOffset(0xCCCF499C87F24D6), LazyThreadSafetyMode.None); + public ref float MessageVolume { - get => ref _Handle.AsRef(Schema.GetOffset(0xCCCF499C87F24D6)); + get => ref _Handle.AsRef(_MessageVolumeOffset.Value); } + private static readonly Lazy _MessageAttenuationOffset = new(() => Schema.GetOffset(0xCCCF4998F72B2B4), LazyThreadSafetyMode.None); + public ref int MessageAttenuation { - get => ref _Handle.AsRef(Schema.GetOffset(0xCCCF4998F72B2B4)); + get => ref _Handle.AsRef(_MessageAttenuationOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0xCCCF4997C5B0533), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0xCCCF4997C5B0533)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _NoiseOffset = new(() => Schema.GetOffset(0xCCCF4991F22B8CC), LazyThreadSafetyMode.None); + public string Noise { get { - var ptr = _Handle.Read(Schema.GetOffset(0xCCCF4991F22B8CC)); + var ptr = _Handle.Read(_NoiseOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xCCCF4991F22B8CC, value); + set => Schema.SetString(_Handle, _NoiseOffset.Value, value); } + private static readonly Lazy _OnShowMessageOffset = new(() => Schema.GetOffset(0xCCCF499D586D920), LazyThreadSafetyMode.None); + public CEntityIOOutput OnShowMessage { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xCCCF499D586D920)); + get => new CEntityIOOutputImpl(_Handle + _OnShowMessageOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElementImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElementImpl.cs index 8eddd5c3f..11cb362a1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElementImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElementImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CModelConfigElementImpl : SchemaClass, CModelConfigElemen public CModelConfigElementImpl(nint handle) : base(handle) { } + private static readonly Lazy _ElementNameOffset = new(() => Schema.GetOffset(0x240CE3EFEBDAB614), LazyThreadSafetyMode.None); + public string ElementName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x240CE3EFEBDAB614)); + var ptr = _Handle.Read(_ElementNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x240CE3EFEBDAB614, value); + set => Schema.SetString(_Handle, _ElementNameOffset.Value, value); } + private static readonly Lazy _NestedElementsOffset = new(() => Schema.GetOffset(0x240CE3EFA31BDBC3), LazyThreadSafetyMode.None); + public ref CUtlVector> NestedElements { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x240CE3EFA31BDBC3)); + get => ref _Handle.AsRef>>(_NestedElementsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_AttachedModelImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_AttachedModelImpl.cs index 6617d0ffe..b753accdb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_AttachedModelImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_AttachedModelImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,71 +17,99 @@ internal partial class CModelConfigElement_AttachedModelImpl : CModelConfigEleme public CModelConfigElement_AttachedModelImpl(nint handle) : base(handle) { } + private static readonly Lazy _InstanceNameOffset = new(() => Schema.GetOffset(0x82D04A99643AE8F9), LazyThreadSafetyMode.None); + public string InstanceName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x82D04A99643AE8F9)); + var ptr = _Handle.Read(_InstanceNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x82D04A99643AE8F9, value); + set => Schema.SetString(_Handle, _InstanceNameOffset.Value, value); } + private static readonly Lazy _EntityClassOffset = new(() => Schema.GetOffset(0x82D04A995BEE014A), LazyThreadSafetyMode.None); + public string EntityClass { get { - var ptr = _Handle.Read(Schema.GetOffset(0x82D04A995BEE014A)); + var ptr = _Handle.Read(_EntityClassOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x82D04A995BEE014A, value); + set => Schema.SetString(_Handle, _EntityClassOffset.Value, value); } + private static readonly Lazy _ModelOffset = new(() => Schema.GetOffset(0x82D04A99E100C814), LazyThreadSafetyMode.None); + public ref CStrongHandle Model { - get => ref _Handle.AsRef>(Schema.GetOffset(0x82D04A99E100C814)); + get => ref _Handle.AsRef>(_ModelOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0x82D04A99FE159136), LazyThreadSafetyMode.None); + public ref Vector Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0x82D04A99FE159136)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _AngOffsetOffset = new(() => Schema.GetOffset(0x82D04A9971C0EE4F), LazyThreadSafetyMode.None); + public ref QAngle AngOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x82D04A9971C0EE4F)); + get => ref _Handle.AsRef(_AngOffsetOffset.Value); } + private static readonly Lazy _AttachmentNameOffset = new(() => Schema.GetOffset(0x82D04A999CFCA76B), LazyThreadSafetyMode.None); + public string AttachmentName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x82D04A999CFCA76B)); + var ptr = _Handle.Read(_AttachmentNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x82D04A999CFCA76B, value); + set => Schema.SetString(_Handle, _AttachmentNameOffset.Value, value); } + private static readonly Lazy _LocalAttachmentOffsetNameOffset = new(() => Schema.GetOffset(0x82D04A9934391DC1), LazyThreadSafetyMode.None); + public string LocalAttachmentOffsetName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x82D04A9934391DC1)); + var ptr = _Handle.Read(_LocalAttachmentOffsetNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x82D04A9934391DC1, value); + set => Schema.SetString(_Handle, _LocalAttachmentOffsetNameOffset.Value, value); } + private static readonly Lazy _AttachmentTypeOffset = new(() => Schema.GetOffset(0x82D04A99EB2E2AA0), LazyThreadSafetyMode.None); + public ref ModelConfigAttachmentType_t AttachmentType { - get => ref _Handle.AsRef(Schema.GetOffset(0x82D04A99EB2E2AA0)); + get => ref _Handle.AsRef(_AttachmentTypeOffset.Value); } + private static readonly Lazy _BoneMergeFlexOffset = new(() => Schema.GetOffset(0x82D04A998B6BC852), LazyThreadSafetyMode.None); + public ref bool BoneMergeFlex { - get => ref _Handle.AsRef(Schema.GetOffset(0x82D04A998B6BC852)); + get => ref _Handle.AsRef(_BoneMergeFlexOffset.Value); } + private static readonly Lazy _UserSpecifiedColorOffset = new(() => Schema.GetOffset(0x82D04A9952ADA09B), LazyThreadSafetyMode.None); + public ref bool UserSpecifiedColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x82D04A9952ADA09B)); + get => ref _Handle.AsRef(_UserSpecifiedColorOffset.Value); } + private static readonly Lazy _UserSpecifiedMaterialGroupOffset = new(() => Schema.GetOffset(0x82D04A99DBD8A8C4), LazyThreadSafetyMode.None); + public ref bool UserSpecifiedMaterialGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0x82D04A99DBD8A8C4)); + get => ref _Handle.AsRef(_UserSpecifiedMaterialGroupOffset.Value); } + private static readonly Lazy _AcceptParentMaterialDrivenDecalsOffset = new(() => Schema.GetOffset(0x82D04A996A2FFA80), LazyThreadSafetyMode.None); + public ref bool AcceptParentMaterialDrivenDecals { - get => ref _Handle.AsRef(Schema.GetOffset(0x82D04A996A2FFA80)); + get => ref _Handle.AsRef(_AcceptParentMaterialDrivenDecalsOffset.Value); } + private static readonly Lazy _BodygroupOnOtherModelsOffset = new(() => Schema.GetOffset(0x82D04A994536DE3B), LazyThreadSafetyMode.None); + public string BodygroupOnOtherModels { get { - var ptr = _Handle.Read(Schema.GetOffset(0x82D04A994536DE3B)); + var ptr = _Handle.Read(_BodygroupOnOtherModelsOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x82D04A994536DE3B, value); + set => Schema.SetString(_Handle, _BodygroupOnOtherModelsOffset.Value, value); } + private static readonly Lazy _MaterialGroupOnOtherModelsOffset = new(() => Schema.GetOffset(0x82D04A9959E9920E), LazyThreadSafetyMode.None); + public string MaterialGroupOnOtherModels { get { - var ptr = _Handle.Read(Schema.GetOffset(0x82D04A9959E9920E)); + var ptr = _Handle.Read(_MaterialGroupOnOtherModelsOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x82D04A9959E9920E, value); + set => Schema.SetString(_Handle, _MaterialGroupOnOtherModelsOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_CommandImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_CommandImpl.cs index 51cb62d24..8be8a35ae 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_CommandImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_CommandImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CModelConfigElement_CommandImpl : CModelConfigElementImpl public CModelConfigElement_CommandImpl(nint handle) : base(handle) { } + private static readonly Lazy _CommandOffset = new(() => Schema.GetOffset(0x89334ED93A5BBC32), LazyThreadSafetyMode.None); + public string Command { get { - var ptr = _Handle.Read(Schema.GetOffset(0x89334ED93A5BBC32)); + var ptr = _Handle.Read(_CommandOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x89334ED93A5BBC32, value); + set => Schema.SetString(_Handle, _CommandOffset.Value, value); } + private static readonly Lazy _ArgsOffset = new(() => Schema.GetOffset(0x89334ED9DAB98BBC), LazyThreadSafetyMode.None); + public SchemaUntypedField Args { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x89334ED9DAB98BBC)); + get => new SchemaUntypedField(_Handle + _ArgsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_RandomColorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_RandomColorImpl.cs index 8f5ddc59d..3ba2dbbe8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_RandomColorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_RandomColorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CModelConfigElement_RandomColorImpl : CModelConfigElement public CModelConfigElement_RandomColorImpl(nint handle) : base(handle) { } + private static readonly Lazy _GradientOffset = new(() => Schema.GetOffset(0x375CC66605C95F25), LazyThreadSafetyMode.None); + public SchemaUntypedField Gradient { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x375CC66605C95F25)); + get => new SchemaUntypedField(_Handle + _GradientOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_RandomPickImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_RandomPickImpl.cs index be3cf6980..935bf28ea 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_RandomPickImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_RandomPickImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CModelConfigElement_RandomPickImpl : CModelConfigElementI public CModelConfigElement_RandomPickImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChoicesOffset = new(() => Schema.GetOffset(0x31F9AEEA9E9959BF), LazyThreadSafetyMode.None); + public ref CUtlVector Choices { - get => ref _Handle.AsRef>(Schema.GetOffset(0x31F9AEEA9E9959BF)); + get => ref _Handle.AsRef>(_ChoicesOffset.Value); } + private static readonly Lazy _ChoiceWeightsOffset = new(() => Schema.GetOffset(0x31F9AEEA379579F7), LazyThreadSafetyMode.None); + public ref CUtlVector ChoiceWeights { - get => ref _Handle.AsRef>(Schema.GetOffset(0x31F9AEEA379579F7)); + get => ref _Handle.AsRef>(_ChoiceWeightsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetBodygroupImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetBodygroupImpl.cs index bad1cf4d4..9fa740a7c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetBodygroupImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetBodygroupImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CModelConfigElement_SetBodygroupImpl : CModelConfigElemen public CModelConfigElement_SetBodygroupImpl(nint handle) : base(handle) { } + private static readonly Lazy _GroupNameOffset = new(() => Schema.GetOffset(0x390A561FE0A55E67), LazyThreadSafetyMode.None); + public ref CGlobalSymbol GroupName { - get => ref _Handle.AsRef(Schema.GetOffset(0x390A561FE0A55E67)); + get => ref _Handle.AsRef(_GroupNameOffset.Value); } + private static readonly Lazy _ChoiceOffset = new(() => Schema.GetOffset(0x390A561F7CC11192), LazyThreadSafetyMode.None); + public ref int Choice { - get => ref _Handle.AsRef(Schema.GetOffset(0x390A561F7CC11192)); + get => ref _Handle.AsRef(_ChoiceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetBodygroupOnAttachedModelsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetBodygroupOnAttachedModelsImpl.cs index db576d0d2..fe66c4c34 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetBodygroupOnAttachedModelsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetBodygroupOnAttachedModelsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CModelConfigElement_SetBodygroupOnAttachedModelsImpl : CM public CModelConfigElement_SetBodygroupOnAttachedModelsImpl(nint handle) : base(handle) { } + private static readonly Lazy _GroupNameOffset = new(() => Schema.GetOffset(0xCC9BDB84E0A55E67), LazyThreadSafetyMode.None); + public string GroupName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xCC9BDB84E0A55E67)); + var ptr = _Handle.Read(_GroupNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xCC9BDB84E0A55E67, value); + set => Schema.SetString(_Handle, _GroupNameOffset.Value, value); } + private static readonly Lazy _ChoiceOffset = new(() => Schema.GetOffset(0xCC9BDB847CC11192), LazyThreadSafetyMode.None); + public ref int Choice { - get => ref _Handle.AsRef(Schema.GetOffset(0xCC9BDB847CC11192)); + get => ref _Handle.AsRef(_ChoiceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetMaterialGroupImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetMaterialGroupImpl.cs index 45672c317..0b814b3a0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetMaterialGroupImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetMaterialGroupImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CModelConfigElement_SetMaterialGroupImpl : CModelConfigEl public CModelConfigElement_SetMaterialGroupImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaterialGroupNameOffset = new(() => Schema.GetOffset(0xFF9AED50C2DD3048), LazyThreadSafetyMode.None); + public string MaterialGroupName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xFF9AED50C2DD3048)); + var ptr = _Handle.Read(_MaterialGroupNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xFF9AED50C2DD3048, value); + set => Schema.SetString(_Handle, _MaterialGroupNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetMaterialGroupOnAttachedModelsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetMaterialGroupOnAttachedModelsImpl.cs index 3ee6186e6..28c87d3f1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetMaterialGroupOnAttachedModelsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetMaterialGroupOnAttachedModelsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CModelConfigElement_SetMaterialGroupOnAttachedModelsImpl public CModelConfigElement_SetMaterialGroupOnAttachedModelsImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaterialGroupNameOffset = new(() => Schema.GetOffset(0xAD67B617C2DD3048), LazyThreadSafetyMode.None); + public string MaterialGroupName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xAD67B617C2DD3048)); + var ptr = _Handle.Read(_MaterialGroupNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xAD67B617C2DD3048, value); + set => Schema.SetString(_Handle, _MaterialGroupNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetRenderColorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetRenderColorImpl.cs index 2733ec926..0e3bd0769 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetRenderColorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_SetRenderColorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CModelConfigElement_SetRenderColorImpl : CModelConfigElem public CModelConfigElement_SetRenderColorImpl(nint handle) : base(handle) { } + private static readonly Lazy _ColorOffset = new(() => Schema.GetOffset(0x4B560F27D7D017D8), LazyThreadSafetyMode.None); + public ref Color Color { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B560F27D7D017D8)); + get => ref _Handle.AsRef(_ColorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_UserPickImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_UserPickImpl.cs index 60c6dbe06..6c2a0b709 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_UserPickImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigElement_UserPickImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CModelConfigElement_UserPickImpl : CModelConfigElementImp public CModelConfigElement_UserPickImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChoicesOffset = new(() => Schema.GetOffset(0x9AB617A69E9959BF), LazyThreadSafetyMode.None); + public ref CUtlVector Choices { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9AB617A69E9959BF)); + get => ref _Handle.AsRef>(_ChoicesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigImpl.cs index abfe17019..ee07edb38 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class CModelConfigImpl : SchemaClass, CModelConfig { public CModelConfigImpl(nint handle) : base(handle) { } + private static readonly Lazy _ConfigNameOffset = new(() => Schema.GetOffset(0xF6401D5DA7B74064), LazyThreadSafetyMode.None); + public string ConfigName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF6401D5DA7B74064)); + var ptr = _Handle.Read(_ConfigNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF6401D5DA7B74064, value); + set => Schema.SetString(_Handle, _ConfigNameOffset.Value, value); } + private static readonly Lazy _ElementsOffset = new(() => Schema.GetOffset(0xF6401D5DC36D5D4C), LazyThreadSafetyMode.None); + public ref CUtlVector> Elements { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xF6401D5DC36D5D4C)); + get => ref _Handle.AsRef>>(_ElementsOffset.Value); } + private static readonly Lazy _TopLevelOffset = new(() => Schema.GetOffset(0xF6401D5D0EC64BE2), LazyThreadSafetyMode.None); + public ref bool TopLevel { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6401D5D0EC64BE2)); + get => ref _Handle.AsRef(_TopLevelOffset.Value); } + private static readonly Lazy _ActiveInEditorByDefaultOffset = new(() => Schema.GetOffset(0xF6401D5D6E287741), LazyThreadSafetyMode.None); + public ref bool ActiveInEditorByDefault { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6401D5D6E287741)); + get => ref _Handle.AsRef(_ActiveInEditorByDefaultOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigListImpl.cs index 2cd3447ef..9d64a3e67 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelConfigListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CModelConfigListImpl : SchemaClass, CModelConfigList { public CModelConfigListImpl(nint handle) : base(handle) { } + private static readonly Lazy _HideMaterialGroupInToolsOffset = new(() => Schema.GetOffset(0x5291D8D9214E9E53), LazyThreadSafetyMode.None); + public ref bool HideMaterialGroupInTools { - get => ref _Handle.AsRef(Schema.GetOffset(0x5291D8D9214E9E53)); + get => ref _Handle.AsRef(_HideMaterialGroupInToolsOffset.Value); } + private static readonly Lazy _HideRenderColorInToolsOffset = new(() => Schema.GetOffset(0x5291D8D9C25B2716), LazyThreadSafetyMode.None); + public ref bool HideRenderColorInTools { - get => ref _Handle.AsRef(Schema.GetOffset(0x5291D8D9C25B2716)); + get => ref _Handle.AsRef(_HideRenderColorInToolsOffset.Value); } + private static readonly Lazy _ConfigsOffset = new(() => Schema.GetOffset(0x5291D8D906111EDC), LazyThreadSafetyMode.None); + public ref CUtlVector> Configs { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x5291D8D906111EDC)); + get => ref _Handle.AsRef>>(_ConfigsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelPointEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelPointEntityImpl.cs index 23d866907..4a649985e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelPointEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelPointEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelStateImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelStateImpl.cs index 92fed585e..e4f73df21 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelStateImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CModelStateImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,33 +17,49 @@ internal partial class CModelStateImpl : SchemaClass, CModelState { public CModelStateImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModelOffset = new(() => Schema.GetOffset(0xC0A51C0E100C814), LazyThreadSafetyMode.None); + public ref CStrongHandle Model { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC0A51C0E100C814)); + get => ref _Handle.AsRef>(_ModelOffset.Value); } + private static readonly Lazy _ModelNameOffset = new(() => Schema.GetOffset(0xC0A51C0D7A1D881), LazyThreadSafetyMode.None); + public string ModelName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC0A51C0D7A1D881)); + var ptr = _Handle.Read(_ModelNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xC0A51C0D7A1D881, value); + set => Schema.SetString(_Handle, _ModelNameOffset.Value, value); } + private static readonly Lazy _ClientClothCreationSuppressedOffset = new(() => Schema.GetOffset(0xC0A51C0953717E1), LazyThreadSafetyMode.None); + public ref bool ClientClothCreationSuppressed { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0A51C0953717E1)); + get => ref _Handle.AsRef(_ClientClothCreationSuppressedOffset.Value); } + private static readonly Lazy _MeshGroupMaskOffset = new(() => Schema.GetOffset(0xC0A51C009C93F2B), LazyThreadSafetyMode.None); + public ref ulong MeshGroupMask { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0A51C009C93F2B)); + get => ref _Handle.AsRef(_MeshGroupMaskOffset.Value); } + private static readonly Lazy _BodyGroupChoicesOffset = new(() => Schema.GetOffset(0xC0A51C02395D0B0), LazyThreadSafetyMode.None); + public ref CUtlVector BodyGroupChoices { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC0A51C02395D0B0)); + get => ref _Handle.AsRef>(_BodyGroupChoicesOffset.Value); } + private static readonly Lazy _IdealMotionTypeOffset = new(() => Schema.GetOffset(0xC0A51C00A904E94), LazyThreadSafetyMode.None); + public ref byte IdealMotionType { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0A51C00A904E94)); + get => ref _Handle.AsRef(_IdealMotionTypeOffset.Value); } + private static readonly Lazy _ForceLODOffset = new(() => Schema.GetOffset(0xC0A51C091D53D5F), LazyThreadSafetyMode.None); + public ref byte ForceLOD { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0A51C091D53D5F)); + get => ref _Handle.AsRef(_ForceLODOffset.Value); } + private static readonly Lazy _ClothUpdateFlagsOffset = new(() => Schema.GetOffset(0xC0A51C0C74A2B81), LazyThreadSafetyMode.None); + public ref byte ClothUpdateFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0A51C0C74A2B81)); + get => ref _Handle.AsRef(_ClothUpdateFlagsOffset.Value); } public void ModelUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMolotovGrenadeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMolotovGrenadeImpl.cs index 6355ad135..820d9113e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMolotovGrenadeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMolotovGrenadeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMolotovProjectileImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMolotovProjectileImpl.cs index d0ba97ca1..37291539a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMolotovProjectileImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMolotovProjectileImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CMolotovProjectileImpl : CBaseCSGrenadeProjectileImpl, CM public CMolotovProjectileImpl(nint handle) : base(handle) { } + private static readonly Lazy _IsIncGrenadeOffset = new(() => Schema.GetOffset(0xA239EA8F9D1C12B7), LazyThreadSafetyMode.None); + public ref bool IsIncGrenade { - get => ref _Handle.AsRef(Schema.GetOffset(0xA239EA8F9D1C12B7)); + get => ref _Handle.AsRef(_IsIncGrenadeOffset.Value); } + private static readonly Lazy _DetonatedOffset = new(() => Schema.GetOffset(0xA239EA8F97D602AF), LazyThreadSafetyMode.None); + public ref bool Detonated { - get => ref _Handle.AsRef(Schema.GetOffset(0xA239EA8F97D602AF)); + get => ref _Handle.AsRef(_DetonatedOffset.Value); } + private static readonly Lazy _StillTimerOffset = new(() => Schema.GetOffset(0xA239EA8F2772246E), LazyThreadSafetyMode.None); + public IntervalTimer StillTimer { - get => new IntervalTimerImpl(_Handle + Schema.GetOffset(0xA239EA8F2772246E)); + get => new IntervalTimerImpl(_Handle + _StillTimerOffset.Value); } + private static readonly Lazy _HasBouncedOffPlayerOffset = new(() => Schema.GetOffset(0xA239EA8F2A625F7B), LazyThreadSafetyMode.None); + public ref bool HasBouncedOffPlayer { - get => ref _Handle.AsRef(Schema.GetOffset(0xA239EA8F2A625F7B)); + get => ref _Handle.AsRef(_HasBouncedOffPlayerOffset.Value); } public void IsIncGrenadeUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMomentaryRotButtonImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMomentaryRotButtonImpl.cs index 187820a9a..90a17b366 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMomentaryRotButtonImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMomentaryRotButtonImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,51 +17,79 @@ internal partial class CMomentaryRotButtonImpl : CRotButtonImpl, CMomentaryRotBu public CMomentaryRotButtonImpl(nint handle) : base(handle) { } + private static readonly Lazy _PositionOffset = new(() => Schema.GetOffset(0x85A553CDFC27FA8A), LazyThreadSafetyMode.None); + public SchemaUntypedField Position { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x85A553CDFC27FA8A)); + get => new SchemaUntypedField(_Handle + _PositionOffset.Value); } + private static readonly Lazy _OnUnpressedOffset = new(() => Schema.GetOffset(0x85A553CD446980EB), LazyThreadSafetyMode.None); + public CEntityIOOutput OnUnpressed { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x85A553CD446980EB)); + get => new CEntityIOOutputImpl(_Handle + _OnUnpressedOffset.Value); } + private static readonly Lazy _OnFullyOpenOffset = new(() => Schema.GetOffset(0x85A553CD21733AE4), LazyThreadSafetyMode.None); + public CEntityIOOutput OnFullyOpen { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x85A553CD21733AE4)); + get => new CEntityIOOutputImpl(_Handle + _OnFullyOpenOffset.Value); } + private static readonly Lazy _OnFullyClosedOffset = new(() => Schema.GetOffset(0x85A553CD75470294), LazyThreadSafetyMode.None); + public CEntityIOOutput OnFullyClosed { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x85A553CD75470294)); + get => new CEntityIOOutputImpl(_Handle + _OnFullyClosedOffset.Value); } + private static readonly Lazy _OnReachedPositionOffset = new(() => Schema.GetOffset(0x85A553CDC5B3EAA5), LazyThreadSafetyMode.None); + public CEntityIOOutput OnReachedPosition { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x85A553CDC5B3EAA5)); + get => new CEntityIOOutputImpl(_Handle + _OnReachedPositionOffset.Value); } + private static readonly Lazy _LastUsedOffset = new(() => Schema.GetOffset(0x85A553CD3297229C), LazyThreadSafetyMode.None); + public ref int LastUsed { - get => ref _Handle.AsRef(Schema.GetOffset(0x85A553CD3297229C)); + get => ref _Handle.AsRef(_LastUsedOffset.Value); } + private static readonly Lazy _StartOffset = new(() => Schema.GetOffset(0x85A553CDA539BEFF), LazyThreadSafetyMode.None); + public ref QAngle Start { - get => ref _Handle.AsRef(Schema.GetOffset(0x85A553CDA539BEFF)); + get => ref _Handle.AsRef(_StartOffset.Value); } + private static readonly Lazy _EndOffset = new(() => Schema.GetOffset(0x85A553CD5B29CFCA), LazyThreadSafetyMode.None); + public ref QAngle End { - get => ref _Handle.AsRef(Schema.GetOffset(0x85A553CD5B29CFCA)); + get => ref _Handle.AsRef(_EndOffset.Value); } + private static readonly Lazy _IdealYawOffset = new(() => Schema.GetOffset(0x85A553CD48C477F5), LazyThreadSafetyMode.None); + public ref float IdealYaw { - get => ref _Handle.AsRef(Schema.GetOffset(0x85A553CD48C477F5)); + get => ref _Handle.AsRef(_IdealYawOffset.Value); } + private static readonly Lazy _NoiseOffset = new(() => Schema.GetOffset(0x85A553CD1F22B8CC), LazyThreadSafetyMode.None); + public string Noise { get { - var ptr = _Handle.Read(Schema.GetOffset(0x85A553CD1F22B8CC)); + var ptr = _Handle.Read(_NoiseOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x85A553CD1F22B8CC, value); + set => Schema.SetString(_Handle, _NoiseOffset.Value, value); } + private static readonly Lazy _UpdateTargetOffset = new(() => Schema.GetOffset(0x85A553CDBE14BF5D), LazyThreadSafetyMode.None); + public ref bool UpdateTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0x85A553CDBE14BF5D)); + get => ref _Handle.AsRef(_UpdateTargetOffset.Value); } + private static readonly Lazy _DirectionOffset = new(() => Schema.GetOffset(0x85A553CDEF16898A), LazyThreadSafetyMode.None); + public ref int Direction { - get => ref _Handle.AsRef(Schema.GetOffset(0x85A553CDEF16898A)); + get => ref _Handle.AsRef(_DirectionOffset.Value); } + private static readonly Lazy _ReturnSpeedOffset = new(() => Schema.GetOffset(0x85A553CDDFA1CF5A), LazyThreadSafetyMode.None); + public ref float ReturnSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x85A553CDDFA1CF5A)); + get => ref _Handle.AsRef(_ReturnSpeedOffset.Value); } + private static readonly Lazy _StartPositionOffset = new(() => Schema.GetOffset(0x85A553CDE34367EA), LazyThreadSafetyMode.None); + public ref float StartPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x85A553CDE34367EA)); + get => ref _Handle.AsRef(_StartPositionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMoodVDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMoodVDataImpl.cs index 56402c8e8..2b728fd32 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMoodVDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMoodVDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CMoodVDataImpl : SchemaClass, CMoodVData { public CMoodVDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModelNameOffset = new(() => Schema.GetOffset(0x3C9F4201002A227C), LazyThreadSafetyMode.None); + public SchemaUntypedField ModelName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x3C9F4201002A227C)); + get => new SchemaUntypedField(_Handle + _ModelNameOffset.Value); } + private static readonly Lazy _MoodTypeOffset = new(() => Schema.GetOffset(0x3C9F42019039BEAA), LazyThreadSafetyMode.None); + public ref MoodType_t MoodType { - get => ref _Handle.AsRef(Schema.GetOffset(0x3C9F42019039BEAA)); + get => ref _Handle.AsRef(_MoodTypeOffset.Value); } + private static readonly Lazy _AnimationLayersOffset = new(() => Schema.GetOffset(0x3C9F420179729D37), LazyThreadSafetyMode.None); + public ref CUtlVector AnimationLayers { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3C9F420179729D37)); + get => ref _Handle.AsRef>(_AnimationLayersOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphBundleDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphBundleDataImpl.cs index 324529af4..4a2e82194 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphBundleDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphBundleDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CMorphBundleDataImpl : SchemaClass, CMorphBundleData { public CMorphBundleDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _ULeftSrcOffset = new(() => Schema.GetOffset(0x8F3A47DCADC9D147), LazyThreadSafetyMode.None); + public ref float ULeftSrc { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F3A47DCADC9D147)); + get => ref _Handle.AsRef(_ULeftSrcOffset.Value); } + private static readonly Lazy _VTopSrcOffset = new(() => Schema.GetOffset(0x8F3A47DCEF710ED0), LazyThreadSafetyMode.None); + public ref float VTopSrc { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F3A47DCEF710ED0)); + get => ref _Handle.AsRef(_VTopSrcOffset.Value); } + private static readonly Lazy _OffsetsOffset = new(() => Schema.GetOffset(0x8F3A47DCD6CBA75B), LazyThreadSafetyMode.None); + public ref CUtlVector Offsets { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8F3A47DCD6CBA75B)); + get => ref _Handle.AsRef>(_OffsetsOffset.Value); } + private static readonly Lazy _RangesOffset = new(() => Schema.GetOffset(0x8F3A47DC24CF5F13), LazyThreadSafetyMode.None); + public ref CUtlVector Ranges { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8F3A47DC24CF5F13)); + get => ref _Handle.AsRef>(_RangesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphConstraintImpl.cs index 59eb688b3..4ffda2f26 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class CMorphConstraintImpl : CBaseConstraintImpl, CMorphConstra public CMorphConstraintImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetMorphOffset = new(() => Schema.GetOffset(0xC24859C39FF7D337), LazyThreadSafetyMode.None); + public string TargetMorph { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC24859C39FF7D337)); + var ptr = _Handle.Read(_TargetMorphOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xC24859C39FF7D337, value); + set => Schema.SetString(_Handle, _TargetMorphOffset.Value, value); } + private static readonly Lazy _SlaveChannelOffset = new(() => Schema.GetOffset(0xC24859C3A439DE4F), LazyThreadSafetyMode.None); + public ref int SlaveChannel { - get => ref _Handle.AsRef(Schema.GetOffset(0xC24859C3A439DE4F)); + get => ref _Handle.AsRef(_SlaveChannelOffset.Value); } + private static readonly Lazy _MinOffset = new(() => Schema.GetOffset(0xC24859C33B1A5649), LazyThreadSafetyMode.None); + public ref float Min { - get => ref _Handle.AsRef(Schema.GetOffset(0xC24859C33B1A5649)); + get => ref _Handle.AsRef(_MinOffset.Value); } + private static readonly Lazy _MaxOffset = new(() => Schema.GetOffset(0xC24859C32D06B887), LazyThreadSafetyMode.None); + public ref float Max { - get => ref _Handle.AsRef(Schema.GetOffset(0xC24859C32D06B887)); + get => ref _Handle.AsRef(_MaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphDataImpl.cs index a45e8ec34..826185de7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CMorphDataImpl : SchemaClass, CMorphData { public CMorphDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x603F8C4D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x603F8C4D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x603F8C4D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _MorphRectDatasOffset = new(() => Schema.GetOffset(0x603F8CB92C9674), LazyThreadSafetyMode.None); + public ref CUtlVector MorphRectDatas { - get => ref _Handle.AsRef>(Schema.GetOffset(0x603F8CB92C9674)); + get => ref _Handle.AsRef>(_MorphRectDatasOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphRectDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphRectDataImpl.cs index 0f573444d..4ce03d554 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphRectDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphRectDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CMorphRectDataImpl : SchemaClass, CMorphRectData { public CMorphRectDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _XLeftDstOffset = new(() => Schema.GetOffset(0xB12257C224FC92D5), LazyThreadSafetyMode.None); + public ref short XLeftDst { - get => ref _Handle.AsRef(Schema.GetOffset(0xB12257C224FC92D5)); + get => ref _Handle.AsRef(_XLeftDstOffset.Value); } + private static readonly Lazy _YTopDstOffset = new(() => Schema.GetOffset(0xB12257C291EBF0D2), LazyThreadSafetyMode.None); + public ref short YTopDst { - get => ref _Handle.AsRef(Schema.GetOffset(0xB12257C291EBF0D2)); + get => ref _Handle.AsRef(_YTopDstOffset.Value); } + private static readonly Lazy _UWidthSrcOffset = new(() => Schema.GetOffset(0xB12257C29F37ECB8), LazyThreadSafetyMode.None); + public ref float UWidthSrc { - get => ref _Handle.AsRef(Schema.GetOffset(0xB12257C29F37ECB8)); + get => ref _Handle.AsRef(_UWidthSrcOffset.Value); } + private static readonly Lazy _VHeightSrcOffset = new(() => Schema.GetOffset(0xB12257C230C84BA2), LazyThreadSafetyMode.None); + public ref float VHeightSrc { - get => ref _Handle.AsRef(Schema.GetOffset(0xB12257C230C84BA2)); + get => ref _Handle.AsRef(_VHeightSrcOffset.Value); } + private static readonly Lazy _BundleDatasOffset = new(() => Schema.GetOffset(0xB12257C255A3B6A2), LazyThreadSafetyMode.None); + public ref CUtlVector BundleDatas { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB12257C255A3B6A2)); + get => ref _Handle.AsRef>(_BundleDatasOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphSetDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphSetDataImpl.cs index 750686696..9039ef03a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphSetDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMorphSetDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CMorphSetDataImpl : SchemaClass, CMorphSetData { public CMorphSetDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _WidthOffset = new(() => Schema.GetOffset(0xE777C2D4119108BB), LazyThreadSafetyMode.None); + public ref int Width { - get => ref _Handle.AsRef(Schema.GetOffset(0xE777C2D4119108BB)); + get => ref _Handle.AsRef(_WidthOffset.Value); } + private static readonly Lazy _HeightOffset = new(() => Schema.GetOffset(0xE777C2D4CAB61C56), LazyThreadSafetyMode.None); + public ref int Height { - get => ref _Handle.AsRef(Schema.GetOffset(0xE777C2D4CAB61C56)); + get => ref _Handle.AsRef(_HeightOffset.Value); } + private static readonly Lazy _BundleTypesOffset = new(() => Schema.GetOffset(0xE777C2D4B233045A), LazyThreadSafetyMode.None); + public ref CUtlVector BundleTypes { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE777C2D4B233045A)); + get => ref _Handle.AsRef>(_BundleTypesOffset.Value); } + private static readonly Lazy _MorphDatasOffset = new(() => Schema.GetOffset(0xE777C2D4C1280FA2), LazyThreadSafetyMode.None); + public ref CUtlVector MorphDatas { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE777C2D4C1280FA2)); + get => ref _Handle.AsRef>(_MorphDatasOffset.Value); } + private static readonly Lazy _TextureAtlasOffset = new(() => Schema.GetOffset(0xE777C2D4B63CAC4D), LazyThreadSafetyMode.None); + public ref CStrongHandle TextureAtlas { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE777C2D4B63CAC4D)); + get => ref _Handle.AsRef>(_TextureAtlasOffset.Value); } + private static readonly Lazy _FlexDescOffset = new(() => Schema.GetOffset(0xE777C2D4D73F3393), LazyThreadSafetyMode.None); + public ref CUtlVector FlexDesc { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE777C2D4D73F3393)); + get => ref _Handle.AsRef>(_FlexDescOffset.Value); } + private static readonly Lazy _FlexControllersOffset = new(() => Schema.GetOffset(0xE777C2D4ABE5EBBB), LazyThreadSafetyMode.None); + public ref CUtlVector FlexControllers { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE777C2D4ABE5EBBB)); + get => ref _Handle.AsRef>(_FlexControllersOffset.Value); } + private static readonly Lazy _FlexRulesOffset = new(() => Schema.GetOffset(0xE777C2D47FE50585), LazyThreadSafetyMode.None); + public ref CUtlVector FlexRules { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE777C2D47FE50585)); + get => ref _Handle.AsRef>(_FlexRulesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionDataSetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionDataSetImpl.cs index ab58ea8e5..6f194545d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionDataSetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionDataSetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CMotionDataSetImpl : SchemaClass, CMotionDataSet { public CMotionDataSetImpl(nint handle) : base(handle) { } + private static readonly Lazy _GroupsOffset = new(() => Schema.GetOffset(0x8AC1A050641FFE0D), LazyThreadSafetyMode.None); + public ref CUtlVector Groups { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8AC1A050641FFE0D)); + get => ref _Handle.AsRef>(_GroupsOffset.Value); } + private static readonly Lazy _DimensionCountOffset = new(() => Schema.GetOffset(0x8AC1A05036656C8E), LazyThreadSafetyMode.None); + public ref int DimensionCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x8AC1A05036656C8E)); + get => ref _Handle.AsRef(_DimensionCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionGraphConfigImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionGraphConfigImpl.cs index 4db13d8ac..6e342ac59 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionGraphConfigImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionGraphConfigImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,17 +20,25 @@ public CMotionGraphConfigImpl(nint handle) : base(handle) { public ISchemaFixedArray ParamValues { get => new SchemaFixedArray(_Handle, 0x851F6EEA365BD3F8, 4, 4, 4); } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0x851F6EEABC5E3BAB), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0x851F6EEABC5E3BAB)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _MotionIndexOffset = new(() => Schema.GetOffset(0x851F6EEABF50B8E1), LazyThreadSafetyMode.None); + public MotionIndex MotionIndex { - get => new MotionIndexImpl(_Handle + Schema.GetOffset(0x851F6EEABF50B8E1)); + get => new MotionIndexImpl(_Handle + _MotionIndexOffset.Value); } + private static readonly Lazy _SampleStartOffset = new(() => Schema.GetOffset(0x851F6EEA43384B19), LazyThreadSafetyMode.None); + public ref int SampleStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x851F6EEA43384B19)); + get => ref _Handle.AsRef(_SampleStartOffset.Value); } + private static readonly Lazy _SampleCountOffset = new(() => Schema.GetOffset(0x851F6EEA2DEF676A), LazyThreadSafetyMode.None); + public ref int SampleCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x851F6EEA2DEF676A)); + get => ref _Handle.AsRef(_SampleCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionGraphGroupImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionGraphGroupImpl.cs index 3f2a8c545..5ffabd47f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionGraphGroupImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionGraphGroupImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CMotionGraphGroupImpl : SchemaClass, CMotionGraphGroup { public CMotionGraphGroupImpl(nint handle) : base(handle) { } + private static readonly Lazy _SearchDBOffset = new(() => Schema.GetOffset(0x34D64AAF5662226F), LazyThreadSafetyMode.None); + public CMotionSearchDB SearchDB { - get => new CMotionSearchDBImpl(_Handle + Schema.GetOffset(0x34D64AAF5662226F)); + get => new CMotionSearchDBImpl(_Handle + _SearchDBOffset.Value); } + private static readonly Lazy _MotionGraphsOffset = new(() => Schema.GetOffset(0x34D64AAFE9CB46D2), LazyThreadSafetyMode.None); + public ref CUtlVector MotionGraphs { - get => ref _Handle.AsRef>(Schema.GetOffset(0x34D64AAFE9CB46D2)); + get => ref _Handle.AsRef>(_MotionGraphsOffset.Value); } + private static readonly Lazy _MotionGraphConfigsOffset = new(() => Schema.GetOffset(0x34D64AAF8D9A544C), LazyThreadSafetyMode.None); + public ref CUtlVector MotionGraphConfigs { - get => ref _Handle.AsRef>(Schema.GetOffset(0x34D64AAF8D9A544C)); + get => ref _Handle.AsRef>(_MotionGraphConfigsOffset.Value); } + private static readonly Lazy _SampleToConfigOffset = new(() => Schema.GetOffset(0x34D64AAF85EC9B7C), LazyThreadSafetyMode.None); + public ref CUtlVector SampleToConfig { - get => ref _Handle.AsRef>(Schema.GetOffset(0x34D64AAF85EC9B7C)); + get => ref _Handle.AsRef>(_SampleToConfigOffset.Value); } + private static readonly Lazy _IsActiveScriptOffset = new(() => Schema.GetOffset(0x34D64AAFF2DBEC2A), LazyThreadSafetyMode.None); + public AnimScriptHandle IsActiveScript { - get => new AnimScriptHandleImpl(_Handle + Schema.GetOffset(0x34D64AAFF2DBEC2A)); + get => new AnimScriptHandleImpl(_Handle + _IsActiveScriptOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionGraphImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionGraphImpl.cs index 51f490464..1fc0c02d0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionGraphImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionGraphImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CMotionGraphImpl : SchemaClass, CMotionGraph { public CMotionGraphImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParamSpansOffset = new(() => Schema.GetOffset(0xA24822FCDAC91553), LazyThreadSafetyMode.None); + public CParamSpanUpdater ParamSpans { - get => new CParamSpanUpdaterImpl(_Handle + Schema.GetOffset(0xA24822FCDAC91553)); + get => new CParamSpanUpdaterImpl(_Handle + _ParamSpansOffset.Value); } + private static readonly Lazy _TagsOffset = new(() => Schema.GetOffset(0xA24822FCB46C8540), LazyThreadSafetyMode.None); + public ref CUtlVector Tags { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA24822FCB46C8540)); + get => ref _Handle.AsRef>(_TagsOffset.Value); } + private static readonly Lazy _RootNodeOffset = new(() => Schema.GetOffset(0xA24822FC8BB07023), LazyThreadSafetyMode.None); + public SchemaUntypedField RootNode { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA24822FC8BB07023)); + get => new SchemaUntypedField(_Handle + _RootNodeOffset.Value); } + private static readonly Lazy _ParameterCountOffset = new(() => Schema.GetOffset(0xA24822FC3B0EE24B), LazyThreadSafetyMode.None); + public ref int ParameterCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xA24822FC3B0EE24B)); + get => ref _Handle.AsRef(_ParameterCountOffset.Value); } + private static readonly Lazy _ConfigStartIndexOffset = new(() => Schema.GetOffset(0xA24822FCEB4B0D77), LazyThreadSafetyMode.None); + public ref int ConfigStartIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xA24822FCEB4B0D77)); + get => ref _Handle.AsRef(_ConfigStartIndexOffset.Value); } + private static readonly Lazy _ConfigCountOffset = new(() => Schema.GetOffset(0xA24822FC16549AD2), LazyThreadSafetyMode.None); + public ref int ConfigCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xA24822FC16549AD2)); + get => ref _Handle.AsRef(_ConfigCountOffset.Value); } + private static readonly Lazy _LoopOffset = new(() => Schema.GetOffset(0xA24822FCC668A4CB), LazyThreadSafetyMode.None); + public ref bool Loop { - get => ref _Handle.AsRef(Schema.GetOffset(0xA24822FCC668A4CB)); + get => ref _Handle.AsRef(_LoopOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionGraphUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionGraphUpdateNodeImpl.cs index 2aee328ea..4f69e0bd2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionGraphUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionGraphUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CMotionGraphUpdateNodeImpl : CLeafUpdateNodeImpl, CMotion public CMotionGraphUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _MotionGraphOffset = new(() => Schema.GetOffset(0x69396A054F70C737), LazyThreadSafetyMode.None); + public SchemaUntypedField MotionGraph { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x69396A054F70C737)); + get => new SchemaUntypedField(_Handle + _MotionGraphOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionMatchingUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionMatchingUpdateNodeImpl.cs index c82dda19e..a0efbc74a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionMatchingUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionMatchingUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,74 +17,120 @@ internal partial class CMotionMatchingUpdateNodeImpl : CLeafUpdateNodeImpl, CMot public CMotionMatchingUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _DataSetOffset = new(() => Schema.GetOffset(0x69501C92DA4F8423), LazyThreadSafetyMode.None); + public CMotionDataSet DataSet { - get => new CMotionDataSetImpl(_Handle + Schema.GetOffset(0x69501C92DA4F8423)); + get => new CMotionDataSetImpl(_Handle + _DataSetOffset.Value); } + private static readonly Lazy _MetricsOffset = new(() => Schema.GetOffset(0x69501C922104DB96), LazyThreadSafetyMode.None); + public ref CUtlVector Metrics { - get => ref _Handle.AsRef>(Schema.GetOffset(0x69501C922104DB96)); + get => ref _Handle.AsRef>(_MetricsOffset.Value); } + private static readonly Lazy _WeightsOffset = new(() => Schema.GetOffset(0x69501C9277B2F91E), LazyThreadSafetyMode.None); + public ref CUtlVector Weights { - get => ref _Handle.AsRef>(Schema.GetOffset(0x69501C9277B2F91E)); + get => ref _Handle.AsRef>(_WeightsOffset.Value); } + private static readonly Lazy _SearchEveryTickOffset = new(() => Schema.GetOffset(0x69501C92F2CEEE05), LazyThreadSafetyMode.None); + public ref bool SearchEveryTick { - get => ref _Handle.AsRef(Schema.GetOffset(0x69501C92F2CEEE05)); + get => ref _Handle.AsRef(_SearchEveryTickOffset.Value); } + private static readonly Lazy _SearchIntervalOffset = new(() => Schema.GetOffset(0x69501C9293E76A9E), LazyThreadSafetyMode.None); + public ref float SearchInterval { - get => ref _Handle.AsRef(Schema.GetOffset(0x69501C9293E76A9E)); + get => ref _Handle.AsRef(_SearchIntervalOffset.Value); } + private static readonly Lazy _SearchWhenClipEndsOffset = new(() => Schema.GetOffset(0x69501C926A2E4B81), LazyThreadSafetyMode.None); + public ref bool SearchWhenClipEnds { - get => ref _Handle.AsRef(Schema.GetOffset(0x69501C926A2E4B81)); + get => ref _Handle.AsRef(_SearchWhenClipEndsOffset.Value); } + private static readonly Lazy _SearchWhenGoalChangesOffset = new(() => Schema.GetOffset(0x69501C927EC9CEE3), LazyThreadSafetyMode.None); + public ref bool SearchWhenGoalChanges { - get => ref _Handle.AsRef(Schema.GetOffset(0x69501C927EC9CEE3)); + get => ref _Handle.AsRef(_SearchWhenGoalChangesOffset.Value); } + private static readonly Lazy _BlendCurveOffset = new(() => Schema.GetOffset(0x69501C9291978183), LazyThreadSafetyMode.None); + public CBlendCurve BlendCurve { - get => new CBlendCurveImpl(_Handle + Schema.GetOffset(0x69501C9291978183)); + get => new CBlendCurveImpl(_Handle + _BlendCurveOffset.Value); } + private static readonly Lazy _SampleRateOffset = new(() => Schema.GetOffset(0x69501C922545791F), LazyThreadSafetyMode.None); + public ref float SampleRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x69501C922545791F)); + get => ref _Handle.AsRef(_SampleRateOffset.Value); } + private static readonly Lazy _BlendTimeOffset = new(() => Schema.GetOffset(0x69501C92A6206E9F), LazyThreadSafetyMode.None); + public ref float BlendTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x69501C92A6206E9F)); + get => ref _Handle.AsRef(_BlendTimeOffset.Value); } + private static readonly Lazy _LockClipWhenWaningOffset = new(() => Schema.GetOffset(0x69501C9218DA5DAE), LazyThreadSafetyMode.None); + public ref bool LockClipWhenWaning { - get => ref _Handle.AsRef(Schema.GetOffset(0x69501C9218DA5DAE)); + get => ref _Handle.AsRef(_LockClipWhenWaningOffset.Value); } + private static readonly Lazy _SelectionThresholdOffset = new(() => Schema.GetOffset(0x69501C92FDC93176), LazyThreadSafetyMode.None); + public ref float SelectionThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0x69501C92FDC93176)); + get => ref _Handle.AsRef(_SelectionThresholdOffset.Value); } + private static readonly Lazy _ReselectionTimeWindowOffset = new(() => Schema.GetOffset(0x69501C923E1DEB69), LazyThreadSafetyMode.None); + public ref float ReselectionTimeWindow { - get => ref _Handle.AsRef(Schema.GetOffset(0x69501C923E1DEB69)); + get => ref _Handle.AsRef(_ReselectionTimeWindowOffset.Value); } + private static readonly Lazy _EnableRotationCorrectionOffset = new(() => Schema.GetOffset(0x69501C922632BA1C), LazyThreadSafetyMode.None); + public ref bool EnableRotationCorrection { - get => ref _Handle.AsRef(Schema.GetOffset(0x69501C922632BA1C)); + get => ref _Handle.AsRef(_EnableRotationCorrectionOffset.Value); } + private static readonly Lazy _GoalAssistOffset = new(() => Schema.GetOffset(0x69501C923FDD6989), LazyThreadSafetyMode.None); + public ref bool GoalAssist { - get => ref _Handle.AsRef(Schema.GetOffset(0x69501C923FDD6989)); + get => ref _Handle.AsRef(_GoalAssistOffset.Value); } + private static readonly Lazy _GoalAssistDistanceOffset = new(() => Schema.GetOffset(0x69501C92593568B0), LazyThreadSafetyMode.None); + public ref float GoalAssistDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x69501C92593568B0)); + get => ref _Handle.AsRef(_GoalAssistDistanceOffset.Value); } + private static readonly Lazy _GoalAssistToleranceOffset = new(() => Schema.GetOffset(0x69501C92D338CA16), LazyThreadSafetyMode.None); + public ref float GoalAssistTolerance { - get => ref _Handle.AsRef(Schema.GetOffset(0x69501C92D338CA16)); + get => ref _Handle.AsRef(_GoalAssistToleranceOffset.Value); } + private static readonly Lazy _DistanceScale_DampingOffset = new(() => Schema.GetOffset(0x69501C92EA57FBF5), LazyThreadSafetyMode.None); + public CAnimInputDamping DistanceScale_Damping { - get => new CAnimInputDampingImpl(_Handle + Schema.GetOffset(0x69501C92EA57FBF5)); + get => new CAnimInputDampingImpl(_Handle + _DistanceScale_DampingOffset.Value); } + private static readonly Lazy _DistanceScale_OuterRadiusOffset = new(() => Schema.GetOffset(0x69501C92632DCAF8), LazyThreadSafetyMode.None); + public ref float DistanceScale_OuterRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x69501C92632DCAF8)); + get => ref _Handle.AsRef(_DistanceScale_OuterRadiusOffset.Value); } + private static readonly Lazy _DistanceScale_InnerRadiusOffset = new(() => Schema.GetOffset(0x69501C92A3772AE7), LazyThreadSafetyMode.None); + public ref float DistanceScale_InnerRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x69501C92A3772AE7)); + get => ref _Handle.AsRef(_DistanceScale_InnerRadiusOffset.Value); } + private static readonly Lazy _DistanceScale_MaxScaleOffset = new(() => Schema.GetOffset(0x69501C92233075C7), LazyThreadSafetyMode.None); + public ref float DistanceScale_MaxScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x69501C92233075C7)); + get => ref _Handle.AsRef(_DistanceScale_MaxScaleOffset.Value); } + private static readonly Lazy _DistanceScale_MinScaleOffset = new(() => Schema.GetOffset(0x69501C92DE35375D), LazyThreadSafetyMode.None); + public ref float DistanceScale_MinScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x69501C92DE35375D)); + get => ref _Handle.AsRef(_DistanceScale_MinScaleOffset.Value); } + private static readonly Lazy _EnableDistanceScalingOffset = new(() => Schema.GetOffset(0x69501C926CF73E92), LazyThreadSafetyMode.None); + public ref bool EnableDistanceScaling { - get => ref _Handle.AsRef(Schema.GetOffset(0x69501C926CF73E92)); + get => ref _Handle.AsRef(_EnableDistanceScalingOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionMetricEvaluatorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionMetricEvaluatorImpl.cs index c081a3b96..e74d813db 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionMetricEvaluatorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionMetricEvaluatorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CMotionMetricEvaluatorImpl : SchemaClass, CMotionMetricEv public CMotionMetricEvaluatorImpl(nint handle) : base(handle) { } + private static readonly Lazy _MeansOffset = new(() => Schema.GetOffset(0x1C07D08DAB070085), LazyThreadSafetyMode.None); + public ref CUtlVector Means { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1C07D08DAB070085)); + get => ref _Handle.AsRef>(_MeansOffset.Value); } + private static readonly Lazy _StandardDeviationsOffset = new(() => Schema.GetOffset(0x1C07D08D9114EB60), LazyThreadSafetyMode.None); + public ref CUtlVector StandardDeviations { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1C07D08D9114EB60)); + get => ref _Handle.AsRef>(_StandardDeviationsOffset.Value); } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0x1C07D08D7B81E7AB), LazyThreadSafetyMode.None); + public ref float Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0x1C07D08D7B81E7AB)); + get => ref _Handle.AsRef(_WeightOffset.Value); } + private static readonly Lazy _DimensionStartIndexOffset = new(() => Schema.GetOffset(0x1C07D08D3448F2E3), LazyThreadSafetyMode.None); + public ref int DimensionStartIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x1C07D08D3448F2E3)); + get => ref _Handle.AsRef(_DimensionStartIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionNodeBlend1DImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionNodeBlend1DImpl.cs index 5e469a0a4..a69ab3eae 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionNodeBlend1DImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionNodeBlend1DImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CMotionNodeBlend1DImpl : CMotionNodeImpl, CMotionNodeBlen public CMotionNodeBlend1DImpl(nint handle) : base(handle) { } + private static readonly Lazy _BlendItemsOffset = new(() => Schema.GetOffset(0xB34B43D2BCCB1A7C), LazyThreadSafetyMode.None); + public ref CUtlVector BlendItems { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB34B43D2BCCB1A7C)); + get => ref _Handle.AsRef>(_BlendItemsOffset.Value); } + private static readonly Lazy _ParamIndexOffset = new(() => Schema.GetOffset(0xB34B43D2CA6E6F52), LazyThreadSafetyMode.None); + public ref int ParamIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xB34B43D2CA6E6F52)); + get => ref _Handle.AsRef(_ParamIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionNodeImpl.cs index 1ce550d14..27a96183d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CMotionNodeImpl : SchemaClass, CMotionNode { public CMotionNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xB29D04644D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB29D04644D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB29D04644D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _IdOffset = new(() => Schema.GetOffset(0xB29D0464B4B6E980), LazyThreadSafetyMode.None); + public AnimNodeID Id { - get => new AnimNodeIDImpl(_Handle + Schema.GetOffset(0xB29D0464B4B6E980)); + get => new AnimNodeIDImpl(_Handle + _IdOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionNodeSequenceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionNodeSequenceImpl.cs index dd8d09cf1..055bec6dd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionNodeSequenceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionNodeSequenceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CMotionNodeSequenceImpl : CMotionNodeImpl, CMotionNodeSeq public CMotionNodeSequenceImpl(nint handle) : base(handle) { } + private static readonly Lazy _TagsOffset = new(() => Schema.GetOffset(0xA932DE59B46C8540), LazyThreadSafetyMode.None); + public ref CUtlVector Tags { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA932DE59B46C8540)); + get => ref _Handle.AsRef>(_TagsOffset.Value); } + private static readonly Lazy _SequenceOffset = new(() => Schema.GetOffset(0xA932DE59E0A0598E), LazyThreadSafetyMode.None); + public HSequence Sequence { - get => new HSequenceImpl(_Handle + Schema.GetOffset(0xA932DE59E0A0598E)); + get => new HSequenceImpl(_Handle + _SequenceOffset.Value); } + private static readonly Lazy _PlaybackSpeedOffset = new(() => Schema.GetOffset(0xA932DE59FA2B402D), LazyThreadSafetyMode.None); + public ref float PlaybackSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xA932DE59FA2B402D)); + get => ref _Handle.AsRef(_PlaybackSpeedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionSearchDBImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionSearchDBImpl.cs index 909480912..36788ed63 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionSearchDBImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionSearchDBImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CMotionSearchDBImpl : SchemaClass, CMotionSearchDB { public CMotionSearchDBImpl(nint handle) : base(handle) { } + private static readonly Lazy _RootNodeOffset = new(() => Schema.GetOffset(0x5F49286C3D5FF0D), LazyThreadSafetyMode.None); + public CMotionSearchNode RootNode { - get => new CMotionSearchNodeImpl(_Handle + Schema.GetOffset(0x5F49286C3D5FF0D)); + get => new CMotionSearchNodeImpl(_Handle + _RootNodeOffset.Value); } + private static readonly Lazy _ResidualQuantizerOffset = new(() => Schema.GetOffset(0x5F49286A3EDA009), LazyThreadSafetyMode.None); + public CProductQuantizer ResidualQuantizer { - get => new CProductQuantizerImpl(_Handle + Schema.GetOffset(0x5F49286A3EDA009)); + get => new CProductQuantizerImpl(_Handle + _ResidualQuantizerOffset.Value); } + private static readonly Lazy _CodeIndicesOffset = new(() => Schema.GetOffset(0x5F49286767A76B1), LazyThreadSafetyMode.None); + public ref CUtlVector CodeIndices { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5F49286767A76B1)); + get => ref _Handle.AsRef>(_CodeIndicesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionSearchNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionSearchNodeImpl.cs index 61a0cb68a..765983e9b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionSearchNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotionSearchNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CMotionSearchNodeImpl : SchemaClass, CMotionSearchNode { public CMotionSearchNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildrenOffset = new(() => Schema.GetOffset(0x7CB28AA07415FA72), LazyThreadSafetyMode.None); + public ref CUtlVector> Children { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x7CB28AA07415FA72)); + get => ref _Handle.AsRef>>(_ChildrenOffset.Value); } + private static readonly Lazy _QuantizerOffset = new(() => Schema.GetOffset(0x7CB28AA0C7DE6374), LazyThreadSafetyMode.None); + public CVectorQuantizer Quantizer { - get => new CVectorQuantizerImpl(_Handle + Schema.GetOffset(0x7CB28AA0C7DE6374)); + get => new CVectorQuantizerImpl(_Handle + _QuantizerOffset.Value); } + private static readonly Lazy _SampleCodesOffset = new(() => Schema.GetOffset(0x7CB28AA0D703E42F), LazyThreadSafetyMode.None); + public ref CUtlVector> SampleCodes { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x7CB28AA0D703E42F)); + get => ref _Handle.AsRef>>(_SampleCodesOffset.Value); } + private static readonly Lazy _SampleIndicesOffset = new(() => Schema.GetOffset(0x7CB28AA02EDA0064), LazyThreadSafetyMode.None); + public ref CUtlVector> SampleIndices { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x7CB28AA02EDA0064)); + get => ref _Handle.AsRef>>(_SampleIndicesOffset.Value); } + private static readonly Lazy _SelectableSamplesOffset = new(() => Schema.GetOffset(0x7CB28AA0C1D40F34), LazyThreadSafetyMode.None); + public ref CUtlVector SelectableSamples { - get => ref _Handle.AsRef>(Schema.GetOffset(0x7CB28AA0C1D40F34)); + get => ref _Handle.AsRef>(_SelectableSamplesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotorControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotorControllerImpl.cs index 45538e76c..4343fee06 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotorControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMotorControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CMotorControllerImpl : SchemaClass, CMotorController { public CMotorControllerImpl(nint handle) : base(handle) { } + private static readonly Lazy _SpeedOffset = new(() => Schema.GetOffset(0x1A8B9067A4BD35A0), LazyThreadSafetyMode.None); + public ref float Speed { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A8B9067A4BD35A0)); + get => ref _Handle.AsRef(_SpeedOffset.Value); } + private static readonly Lazy _MaxTorqueOffset = new(() => Schema.GetOffset(0x1A8B90677880BF37), LazyThreadSafetyMode.None); + public ref float MaxTorque { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A8B90677880BF37)); + get => ref _Handle.AsRef(_MaxTorqueOffset.Value); } + private static readonly Lazy _AxisOffset = new(() => Schema.GetOffset(0x1A8B90672B06DE94), LazyThreadSafetyMode.None); + public ref Vector Axis { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A8B90672B06DE94)); + get => ref _Handle.AsRef(_AxisOffset.Value); } + private static readonly Lazy _InertiaFactorOffset = new(() => Schema.GetOffset(0x1A8B9067B824C94A), LazyThreadSafetyMode.None); + public ref float InertiaFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A8B9067B824C94A)); + get => ref _Handle.AsRef(_InertiaFactorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMovementComponentUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMovementComponentUpdaterImpl.cs index 79c8fd705..ad7bf291b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMovementComponentUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMovementComponentUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CMovementComponentUpdaterImpl : CAnimComponentUpdaterImpl public CMovementComponentUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _MotorsOffset = new(() => Schema.GetOffset(0xCAAB73FD817BF33), LazyThreadSafetyMode.None); + public ref CUtlVector Motors { - get => ref _Handle.AsRef>(Schema.GetOffset(0xCAAB73FD817BF33)); + get => ref _Handle.AsRef>(_MotorsOffset.Value); } + private static readonly Lazy _FacingDampingOffset = new(() => Schema.GetOffset(0xCAAB73F9A430F4B), LazyThreadSafetyMode.None); + public CAnimInputDamping FacingDamping { - get => new CAnimInputDampingImpl(_Handle + Schema.GetOffset(0xCAAB73F9A430F4B)); + get => new CAnimInputDampingImpl(_Handle + _FacingDampingOffset.Value); } + private static readonly Lazy _DefaultMotorIndexOffset = new(() => Schema.GetOffset(0xCAAB73F5A788411), LazyThreadSafetyMode.None); + public ref int DefaultMotorIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xCAAB73F5A788411)); + get => ref _Handle.AsRef(_DefaultMotorIndexOffset.Value); } + private static readonly Lazy _DefaultRunSpeedOffset = new(() => Schema.GetOffset(0xCAAB73F47B9DED8), LazyThreadSafetyMode.None); + public ref float DefaultRunSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xCAAB73F47B9DED8)); + get => ref _Handle.AsRef(_DefaultRunSpeedOffset.Value); } + private static readonly Lazy _MoveVarsDisabledOffset = new(() => Schema.GetOffset(0xCAAB73FB55A4C6A), LazyThreadSafetyMode.None); + public ref bool MoveVarsDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xCAAB73FB55A4C6A)); + get => ref _Handle.AsRef(_MoveVarsDisabledOffset.Value); } + private static readonly Lazy _NetworkPathOffset = new(() => Schema.GetOffset(0xCAAB73F86C36FF6), LazyThreadSafetyMode.None); + public ref bool NetworkPath { - get => ref _Handle.AsRef(Schema.GetOffset(0xCAAB73F86C36FF6)); + get => ref _Handle.AsRef(_NetworkPathOffset.Value); } + private static readonly Lazy _NetworkFacingOffset = new(() => Schema.GetOffset(0xCAAB73FE3436E8F), LazyThreadSafetyMode.None); + public ref bool NetworkFacing { - get => ref _Handle.AsRef(Schema.GetOffset(0xCAAB73FE3436E8F)); + get => ref _Handle.AsRef(_NetworkFacingOffset.Value); } + private static readonly Lazy _ParamHandlesOffset = new(() => Schema.GetOffset(0xCAAB73FF6A771ED), LazyThreadSafetyMode.None); + public SchemaUntypedField ParamHandles { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xCAAB73FF6A771ED)); + get => new SchemaUntypedField(_Handle + _ParamHandlesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMovementHandshakeAnimTagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMovementHandshakeAnimTagImpl.cs index 973148edf..6796a4c39 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMovementHandshakeAnimTagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMovementHandshakeAnimTagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMovementStatsPropertyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMovementStatsPropertyImpl.cs index 17282b74d..d4691b731 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMovementStatsPropertyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMovementStatsPropertyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CMovementStatsPropertyImpl : SchemaClass, CMovementStatsP public CMovementStatsPropertyImpl(nint handle) : base(handle) { } + private static readonly Lazy _UseCounterOffset = new(() => Schema.GetOffset(0xDE38DFFB6294198C), LazyThreadSafetyMode.None); + public ref int UseCounter { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE38DFFB6294198C)); + get => ref _Handle.AsRef(_UseCounterOffset.Value); } + private static readonly Lazy _EmaMovementDirectionOffset = new(() => Schema.GetOffset(0xDE38DFFB3878FC8C), LazyThreadSafetyMode.None); + public CVectorExponentialMovingAverage EmaMovementDirection { - get => new CVectorExponentialMovingAverageImpl(_Handle + Schema.GetOffset(0xDE38DFFB3878FC8C)); + get => new CVectorExponentialMovingAverageImpl(_Handle + _EmaMovementDirectionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMoverPathNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMoverPathNodeImpl.cs index f093eb163..c5553ba29 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMoverPathNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMoverPathNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,46 +17,68 @@ internal partial class CMoverPathNodeImpl : CPointEntityImpl, CMoverPathNode { public CMoverPathNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _InTangentLocalOffset = new(() => Schema.GetOffset(0x5847AABC46C1388A), LazyThreadSafetyMode.None); + public ref Vector InTangentLocal { - get => ref _Handle.AsRef(Schema.GetOffset(0x5847AABC46C1388A)); + get => ref _Handle.AsRef(_InTangentLocalOffset.Value); } + private static readonly Lazy _OutTangentLocalOffset = new(() => Schema.GetOffset(0x5847AABC788EFFFB), LazyThreadSafetyMode.None); + public ref Vector OutTangentLocal { - get => ref _Handle.AsRef(Schema.GetOffset(0x5847AABC788EFFFB)); + get => ref _Handle.AsRef(_OutTangentLocalOffset.Value); } + private static readonly Lazy _ParentPathUniqueIDOffset = new(() => Schema.GetOffset(0x5847AABCC2958DE1), LazyThreadSafetyMode.None); + public string ParentPathUniqueID { get { - var ptr = _Handle.Read(Schema.GetOffset(0x5847AABCC2958DE1)); + var ptr = _Handle.Read(_ParentPathUniqueIDOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x5847AABCC2958DE1, value); + set => Schema.SetString(_Handle, _ParentPathUniqueIDOffset.Value, value); } + private static readonly Lazy _PathNodeParameterOffset = new(() => Schema.GetOffset(0x5847AABC5B2492DE), LazyThreadSafetyMode.None); + public string PathNodeParameter { get { - var ptr = _Handle.Read(Schema.GetOffset(0x5847AABC5B2492DE)); + var ptr = _Handle.Read(_PathNodeParameterOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x5847AABC5B2492DE, value); + set => Schema.SetString(_Handle, _PathNodeParameterOffset.Value, value); } + private static readonly Lazy _OnStartFromOrInSegmentOffset = new(() => Schema.GetOffset(0x5847AABC6622BECB), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStartFromOrInSegment { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x5847AABC6622BECB)); + get => new CEntityIOOutputImpl(_Handle + _OnStartFromOrInSegmentOffset.Value); } + private static readonly Lazy _OnStoppedAtOrInSegmentOffset = new(() => Schema.GetOffset(0x5847AABCBF4204DB), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStoppedAtOrInSegment { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x5847AABCBF4204DB)); + get => new CEntityIOOutputImpl(_Handle + _OnStoppedAtOrInSegmentOffset.Value); } + private static readonly Lazy _OnPassThroughOffset = new(() => Schema.GetOffset(0x5847AABC3A5F20B6), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPassThrough { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x5847AABC3A5F20B6)); + get => new CEntityIOOutputImpl(_Handle + _OnPassThroughOffset.Value); } + private static readonly Lazy _OnPassThroughForwardOffset = new(() => Schema.GetOffset(0x5847AABCA62F443B), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPassThroughForward { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x5847AABCA62F443B)); + get => new CEntityIOOutputImpl(_Handle + _OnPassThroughForwardOffset.Value); } + private static readonly Lazy _OnPassThroughReverseOffset = new(() => Schema.GetOffset(0x5847AABC37667FA8), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPassThroughReverse { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x5847AABC37667FA8)); + get => new CEntityIOOutputImpl(_Handle + _OnPassThroughReverseOffset.Value); } + private static readonly Lazy _MoverOffset = new(() => Schema.GetOffset(0x5847AABC3629FA74), LazyThreadSafetyMode.None); + public ref CHandle Mover { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5847AABC3629FA74)); + get => ref _Handle.AsRef>(_MoverOffset.Value); } + private static readonly Lazy _XWSPrevParentOffset = new(() => Schema.GetOffset(0x5847AABC2AEC980C), LazyThreadSafetyMode.None); + public ref CTransform XWSPrevParent { - get => ref _Handle.AsRef(Schema.GetOffset(0x5847AABC2AEC980C)); + get => ref _Handle.AsRef(_XWSPrevParentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMoverUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMoverUpdateNodeImpl.cs index 3c70ad7b7..ba730b40b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMoverUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMoverUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,65 @@ internal partial class CMoverUpdateNodeImpl : CUnaryUpdateNodeImpl, CMoverUpdate public CMoverUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _DampingOffset = new(() => Schema.GetOffset(0x42BA18A215440FB5), LazyThreadSafetyMode.None); + public CAnimInputDamping Damping { - get => new CAnimInputDampingImpl(_Handle + Schema.GetOffset(0x42BA18A215440FB5)); + get => new CAnimInputDampingImpl(_Handle + _DampingOffset.Value); } + private static readonly Lazy _FacingTargetOffset = new(() => Schema.GetOffset(0x42BA18A2ED73C452), LazyThreadSafetyMode.None); + public ref AnimValueSource FacingTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0x42BA18A2ED73C452)); + get => ref _Handle.AsRef(_FacingTargetOffset.Value); } + private static readonly Lazy _MoveVecParamOffset = new(() => Schema.GetOffset(0x42BA18A22C2934BD), LazyThreadSafetyMode.None); + public CAnimParamHandle MoveVecParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x42BA18A22C2934BD)); + get => new CAnimParamHandleImpl(_Handle + _MoveVecParamOffset.Value); } + private static readonly Lazy _MoveHeadingParamOffset = new(() => Schema.GetOffset(0x42BA18A283A456D1), LazyThreadSafetyMode.None); + public CAnimParamHandle MoveHeadingParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x42BA18A283A456D1)); + get => new CAnimParamHandleImpl(_Handle + _MoveHeadingParamOffset.Value); } + private static readonly Lazy _TurnToFaceParamOffset = new(() => Schema.GetOffset(0x42BA18A275778205), LazyThreadSafetyMode.None); + public CAnimParamHandle TurnToFaceParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x42BA18A275778205)); + get => new CAnimParamHandleImpl(_Handle + _TurnToFaceParamOffset.Value); } + private static readonly Lazy _TurnToFaceOffsetOffset = new(() => Schema.GetOffset(0x42BA18A2359F1A87), LazyThreadSafetyMode.None); + public ref float TurnToFaceOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x42BA18A2359F1A87)); + get => ref _Handle.AsRef(_TurnToFaceOffsetOffset.Value); } + private static readonly Lazy _TurnToFaceLimitOffset = new(() => Schema.GetOffset(0x42BA18A22A27B7DF), LazyThreadSafetyMode.None); + public ref float TurnToFaceLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0x42BA18A22A27B7DF)); + get => ref _Handle.AsRef(_TurnToFaceLimitOffset.Value); } + private static readonly Lazy _AdditiveOffset = new(() => Schema.GetOffset(0x42BA18A20FA86105), LazyThreadSafetyMode.None); + public ref bool Additive { - get => ref _Handle.AsRef(Schema.GetOffset(0x42BA18A20FA86105)); + get => ref _Handle.AsRef(_AdditiveOffset.Value); } + private static readonly Lazy _ApplyMovementOffset = new(() => Schema.GetOffset(0x42BA18A240CF2252), LazyThreadSafetyMode.None); + public ref bool ApplyMovement { - get => ref _Handle.AsRef(Schema.GetOffset(0x42BA18A240CF2252)); + get => ref _Handle.AsRef(_ApplyMovementOffset.Value); } + private static readonly Lazy _OrientMovementOffset = new(() => Schema.GetOffset(0x42BA18A2E957E789), LazyThreadSafetyMode.None); + public ref bool OrientMovement { - get => ref _Handle.AsRef(Schema.GetOffset(0x42BA18A2E957E789)); + get => ref _Handle.AsRef(_OrientMovementOffset.Value); } + private static readonly Lazy _ApplyRotationOffset = new(() => Schema.GetOffset(0x42BA18A25B6A1835), LazyThreadSafetyMode.None); + public ref bool ApplyRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0x42BA18A25B6A1835)); + get => ref _Handle.AsRef(_ApplyRotationOffset.Value); } + private static readonly Lazy _LimitOnlyOffset = new(() => Schema.GetOffset(0x42BA18A2D127934E), LazyThreadSafetyMode.None); + public ref bool LimitOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0x42BA18A2D127934E)); + get => ref _Handle.AsRef(_LimitOnlyOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMultiLightProxyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMultiLightProxyImpl.cs index 028d49292..976b5e0b0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMultiLightProxyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMultiLightProxyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,37 +17,53 @@ internal partial class CMultiLightProxyImpl : CLogicalEntityImpl, CMultiLightPro public CMultiLightProxyImpl(nint handle) : base(handle) { } + private static readonly Lazy _LightNameFilterOffset = new(() => Schema.GetOffset(0xF2B647B3071F3A26), LazyThreadSafetyMode.None); + public string LightNameFilter { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF2B647B3071F3A26)); + var ptr = _Handle.Read(_LightNameFilterOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF2B647B3071F3A26, value); + set => Schema.SetString(_Handle, _LightNameFilterOffset.Value, value); } + private static readonly Lazy _LightClassFilterOffset = new(() => Schema.GetOffset(0xF2B647B32B566D5B), LazyThreadSafetyMode.None); + public string LightClassFilter { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF2B647B32B566D5B)); + var ptr = _Handle.Read(_LightClassFilterOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF2B647B32B566D5B, value); + set => Schema.SetString(_Handle, _LightClassFilterOffset.Value, value); } + private static readonly Lazy _LightRadiusFilterOffset = new(() => Schema.GetOffset(0xF2B647B3DBC59891), LazyThreadSafetyMode.None); + public ref float LightRadiusFilter { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2B647B3DBC59891)); + get => ref _Handle.AsRef(_LightRadiusFilterOffset.Value); } + private static readonly Lazy _BrightnessDeltaOffset = new(() => Schema.GetOffset(0xF2B647B3E60D5182), LazyThreadSafetyMode.None); + public ref float BrightnessDelta { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2B647B3E60D5182)); + get => ref _Handle.AsRef(_BrightnessDeltaOffset.Value); } + private static readonly Lazy _PerformScreenFadeOffset = new(() => Schema.GetOffset(0xF2B647B3F3DAE928), LazyThreadSafetyMode.None); + public ref bool PerformScreenFade { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2B647B3F3DAE928)); + get => ref _Handle.AsRef(_PerformScreenFadeOffset.Value); } + private static readonly Lazy _TargetBrightnessMultiplierOffset = new(() => Schema.GetOffset(0xF2B647B3B84CF4BA), LazyThreadSafetyMode.None); + public ref float TargetBrightnessMultiplier { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2B647B3B84CF4BA)); + get => ref _Handle.AsRef(_TargetBrightnessMultiplierOffset.Value); } + private static readonly Lazy _CurrentBrightnessMultiplierOffset = new(() => Schema.GetOffset(0xF2B647B3C03C5EEC), LazyThreadSafetyMode.None); + public ref float CurrentBrightnessMultiplier { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2B647B3C03C5EEC)); + get => ref _Handle.AsRef(_CurrentBrightnessMultiplierOffset.Value); } + private static readonly Lazy _LightsOffset = new(() => Schema.GetOffset(0xF2B647B3A5ECA534), LazyThreadSafetyMode.None); + public ref CUtlVector> Lights { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xF2B647B3A5ECA534)); + get => ref _Handle.AsRef>>(_LightsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMultiSourceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMultiSourceImpl.cs index 6b88cd140..2bf4e3ef5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMultiSourceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMultiSourceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -21,18 +23,24 @@ public ISchemaFixedArray> RgEntities { public ISchemaFixedArray RgTriggered { get => new SchemaFixedArray(_Handle, 0x87DC5C664616C37F, 32, 4, 4); } + private static readonly Lazy _OnTriggerOffset = new(() => Schema.GetOffset(0x87DC5C6681E0BFEC), LazyThreadSafetyMode.None); + public CEntityIOOutput OnTrigger { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x87DC5C6681E0BFEC)); + get => new CEntityIOOutputImpl(_Handle + _OnTriggerOffset.Value); } + private static readonly Lazy _TotalOffset = new(() => Schema.GetOffset(0x87DC5C667223ED06), LazyThreadSafetyMode.None); + public ref int Total { - get => ref _Handle.AsRef(Schema.GetOffset(0x87DC5C667223ED06)); + get => ref _Handle.AsRef(_TotalOffset.Value); } + private static readonly Lazy _GlobalstateOffset = new(() => Schema.GetOffset(0x87DC5C6677A86653), LazyThreadSafetyMode.None); + public string Globalstate { get { - var ptr = _Handle.Read(Schema.GetOffset(0x87DC5C6677A86653)); + var ptr = _Handle.Read(_GlobalstateOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x87DC5C6677A86653, value); + set => Schema.SetString(_Handle, _GlobalstateOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMultiplayRulesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMultiplayRulesImpl.cs index b53a2a0e1..9d5dc1773 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMultiplayRulesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMultiplayRulesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMultiplayer_ExpresserImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMultiplayer_ExpresserImpl.cs index 0809a41e0..553621c35 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMultiplayer_ExpresserImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CMultiplayer_ExpresserImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CMultiplayer_ExpresserImpl : CAI_ExpresserWithFollowupImp public CMultiplayer_ExpresserImpl(nint handle) : base(handle) { } + private static readonly Lazy _AllowMultipleScenesOffset = new(() => Schema.GetOffset(0x19772F22AE5FCD97), LazyThreadSafetyMode.None); + public ref bool AllowMultipleScenes { - get => ref _Handle.AsRef(Schema.GetOffset(0x19772F22AE5FCD97)); + get => ref _Handle.AsRef(_AllowMultipleScenesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNPCPhysicsHullImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNPCPhysicsHullImpl.cs index d3b51a11b..1ec6c2df8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNPCPhysicsHullImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNPCPhysicsHullImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CNPCPhysicsHullImpl : SchemaClass, CNPCPhysicsHull { public CNPCPhysicsHullImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x6C27881963D22D49), LazyThreadSafetyMode.None); + public ref CGlobalSymbol Name { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C27881963D22D49)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x6C27881921B39888), LazyThreadSafetyMode.None); + public ref NPCPhysicsHullType_t Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C27881921B39888)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _CapsuleHeightOffset = new(() => Schema.GetOffset(0x6C278819043CF691), LazyThreadSafetyMode.None); + public ref float CapsuleHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C278819043CF691)); + get => ref _Handle.AsRef(_CapsuleHeightOffset.Value); } + private static readonly Lazy _CapsuleRadiusOffset = new(() => Schema.GetOffset(0x6C278819A1A593D0), LazyThreadSafetyMode.None); + public ref float CapsuleRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C278819A1A593D0)); + get => ref _Handle.AsRef(_CapsuleRadiusOffset.Value); } + private static readonly Lazy _CapsuleCenter1Offset = new(() => Schema.GetOffset(0x6C278819A5E81978), LazyThreadSafetyMode.None); + public ref Vector CapsuleCenter1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C278819A5E81978)); + get => ref _Handle.AsRef(_CapsuleCenter1Offset.Value); } + private static readonly Lazy _CapsuleCenter2Offset = new(() => Schema.GetOffset(0x6C278819A8E81E31), LazyThreadSafetyMode.None); + public ref Vector CapsuleCenter2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C278819A8E81E31)); + get => ref _Handle.AsRef(_CapsuleCenter2Offset.Value); } + private static readonly Lazy _GroundBoxHeightOffset = new(() => Schema.GetOffset(0x6C2788195B2D099E), LazyThreadSafetyMode.None); + public ref float GroundBoxHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C2788195B2D099E)); + get => ref _Handle.AsRef(_GroundBoxHeightOffset.Value); } + private static readonly Lazy _GroundBoxWidthOffset = new(() => Schema.GetOffset(0x6C2788194A30F5E3), LazyThreadSafetyMode.None); + public ref float GroundBoxWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C2788194A30F5E3)); + get => ref _Handle.AsRef(_GroundBoxWidthOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavHullPresetVDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavHullPresetVDataImpl.cs index f08001fde..81592cf6e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavHullPresetVDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavHullPresetVDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNavHullPresetVDataImpl : SchemaClass, CNavHullPresetVDat public CNavHullPresetVDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _NavHullsOffset = new(() => Schema.GetOffset(0x9963D667366CCF96), LazyThreadSafetyMode.None); + public ref CUtlVector NavHulls { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9963D667366CCF96)); + get => ref _Handle.AsRef>(_NavHullsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavHullVDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavHullVDataImpl.cs index 1dc2840c9..10de9d91c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavHullVDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavHullVDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,50 +17,80 @@ internal partial class CNavHullVDataImpl : SchemaClass, CNavHullVData { public CNavHullVDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _AgentEnabledOffset = new(() => Schema.GetOffset(0x74449E2E9D43CFF3), LazyThreadSafetyMode.None); + public ref bool AgentEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x74449E2E9D43CFF3)); + get => ref _Handle.AsRef(_AgentEnabledOffset.Value); } + private static readonly Lazy _AgentRadiusOffset = new(() => Schema.GetOffset(0x74449E2ED9F4ED84), LazyThreadSafetyMode.None); + public ref float AgentRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x74449E2ED9F4ED84)); + get => ref _Handle.AsRef(_AgentRadiusOffset.Value); } + private static readonly Lazy _AgentHeightOffset = new(() => Schema.GetOffset(0x74449E2E5A46CC6D), LazyThreadSafetyMode.None); + public ref float AgentHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x74449E2E5A46CC6D)); + get => ref _Handle.AsRef(_AgentHeightOffset.Value); } + private static readonly Lazy _AgentShortHeightEnabledOffset = new(() => Schema.GetOffset(0x74449E2EB869D4B0), LazyThreadSafetyMode.None); + public ref bool AgentShortHeightEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x74449E2EB869D4B0)); + get => ref _Handle.AsRef(_AgentShortHeightEnabledOffset.Value); } + private static readonly Lazy _AgentShortHeightOffset = new(() => Schema.GetOffset(0x74449E2E82909A4B), LazyThreadSafetyMode.None); + public ref float AgentShortHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x74449E2E82909A4B)); + get => ref _Handle.AsRef(_AgentShortHeightOffset.Value); } + private static readonly Lazy _AgentCrawlEnabledOffset = new(() => Schema.GetOffset(0x74449E2E042611D2), LazyThreadSafetyMode.None); + public ref bool AgentCrawlEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x74449E2E042611D2)); + get => ref _Handle.AsRef(_AgentCrawlEnabledOffset.Value); } + private static readonly Lazy _AgentCrawlHeightOffset = new(() => Schema.GetOffset(0x74449E2E8068594E), LazyThreadSafetyMode.None); + public ref float AgentCrawlHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x74449E2E8068594E)); + get => ref _Handle.AsRef(_AgentCrawlHeightOffset.Value); } + private static readonly Lazy _AgentMaxClimbOffset = new(() => Schema.GetOffset(0x74449E2EDF3EC175), LazyThreadSafetyMode.None); + public ref float AgentMaxClimb { - get => ref _Handle.AsRef(Schema.GetOffset(0x74449E2EDF3EC175)); + get => ref _Handle.AsRef(_AgentMaxClimbOffset.Value); } + private static readonly Lazy _AgentMaxSlopeOffset = new(() => Schema.GetOffset(0x74449E2EFAC02727), LazyThreadSafetyMode.None); + public ref int AgentMaxSlope { - get => ref _Handle.AsRef(Schema.GetOffset(0x74449E2EFAC02727)); + get => ref _Handle.AsRef(_AgentMaxSlopeOffset.Value); } + private static readonly Lazy _AgentMaxJumpDownDistOffset = new(() => Schema.GetOffset(0x74449E2E1B440540), LazyThreadSafetyMode.None); + public ref float AgentMaxJumpDownDist { - get => ref _Handle.AsRef(Schema.GetOffset(0x74449E2E1B440540)); + get => ref _Handle.AsRef(_AgentMaxJumpDownDistOffset.Value); } + private static readonly Lazy _AgentMaxJumpHorizDistBaseOffset = new(() => Schema.GetOffset(0x74449E2ED8C1AC5F), LazyThreadSafetyMode.None); + public ref float AgentMaxJumpHorizDistBase { - get => ref _Handle.AsRef(Schema.GetOffset(0x74449E2ED8C1AC5F)); + get => ref _Handle.AsRef(_AgentMaxJumpHorizDistBaseOffset.Value); } + private static readonly Lazy _AgentMaxJumpUpDistOffset = new(() => Schema.GetOffset(0x74449E2E0CA237AD), LazyThreadSafetyMode.None); + public ref float AgentMaxJumpUpDist { - get => ref _Handle.AsRef(Schema.GetOffset(0x74449E2E0CA237AD)); + get => ref _Handle.AsRef(_AgentMaxJumpUpDistOffset.Value); } + private static readonly Lazy _AgentBorderErosionOffset = new(() => Schema.GetOffset(0x74449E2EC445012D), LazyThreadSafetyMode.None); + public ref int AgentBorderErosion { - get => ref _Handle.AsRef(Schema.GetOffset(0x74449E2EC445012D)); + get => ref _Handle.AsRef(_AgentBorderErosionOffset.Value); } + private static readonly Lazy _FlowMapGenerationEnabledOffset = new(() => Schema.GetOffset(0x74449E2E8E7494D0), LazyThreadSafetyMode.None); + public ref bool FlowMapGenerationEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x74449E2E8E7494D0)); + get => ref _Handle.AsRef(_FlowMapGenerationEnabledOffset.Value); } + private static readonly Lazy _FlowMapNodeMaxRadiusOffset = new(() => Schema.GetOffset(0x74449E2E19B2323B), LazyThreadSafetyMode.None); + public ref float FlowMapNodeMaxRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x74449E2E19B2323B)); + get => ref _Handle.AsRef(_FlowMapNodeMaxRadiusOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavLinkAnimgraphVarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavLinkAnimgraphVarImpl.cs index eb5921df5..d67b5ca02 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavLinkAnimgraphVarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavLinkAnimgraphVarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNavLinkAnimgraphVarImpl : SchemaClass, CNavLinkAnimgraph public CNavLinkAnimgraphVarImpl(nint handle) : base(handle) { } + private static readonly Lazy _AnimGraphNavlinkTypeOffset = new(() => Schema.GetOffset(0xD079ABDB24A7FCF6), LazyThreadSafetyMode.None); + public ref CGlobalSymbol AnimGraphNavlinkType { - get => ref _Handle.AsRef(Schema.GetOffset(0xD079ABDB24A7FCF6)); + get => ref _Handle.AsRef(_AnimGraphNavlinkTypeOffset.Value); } + private static readonly Lazy _AlignmentDegreesOffset = new(() => Schema.GetOffset(0xD079ABDB371747C0), LazyThreadSafetyMode.None); + public ref uint AlignmentDegrees { - get => ref _Handle.AsRef(Schema.GetOffset(0xD079ABDB371747C0)); + get => ref _Handle.AsRef(_AlignmentDegreesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavLinkAreaEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavLinkAreaEntityImpl.cs index 2bc9d12fe..cb07fad55 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavLinkAreaEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavLinkAreaEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,56 +17,82 @@ internal partial class CNavLinkAreaEntityImpl : CPointEntityImpl, CNavLinkAreaEn public CNavLinkAreaEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _WidthOffset = new(() => Schema.GetOffset(0x1A0F1851B91935E1), LazyThreadSafetyMode.None); + public ref float Width { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A0F1851B91935E1)); + get => ref _Handle.AsRef(_WidthOffset.Value); } + private static readonly Lazy _LocatorOffsetOffset = new(() => Schema.GetOffset(0x1A0F185198225106), LazyThreadSafetyMode.None); + public ref Vector LocatorOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A0F185198225106)); + get => ref _Handle.AsRef(_LocatorOffsetOffset.Value); } + private static readonly Lazy _LocatorAnglesOffsetOffset = new(() => Schema.GetOffset(0x1A0F18517AFB1B3D), LazyThreadSafetyMode.None); + public ref QAngle LocatorAnglesOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A0F18517AFB1B3D)); + get => ref _Handle.AsRef(_LocatorAnglesOffsetOffset.Value); } + private static readonly Lazy _StrMovementForwardOffset = new(() => Schema.GetOffset(0x1A0F18517B8433BA), LazyThreadSafetyMode.None); + public string StrMovementForward { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1A0F18517B8433BA)); + var ptr = _Handle.Read(_StrMovementForwardOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1A0F18517B8433BA, value); + set => Schema.SetString(_Handle, _StrMovementForwardOffset.Value, value); } + private static readonly Lazy _StrMovementReverseOffset = new(() => Schema.GetOffset(0x1A0F1851E8768AA5), LazyThreadSafetyMode.None); + public string StrMovementReverse { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1A0F1851E8768AA5)); + var ptr = _Handle.Read(_StrMovementReverseOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1A0F1851E8768AA5, value); + set => Schema.SetString(_Handle, _StrMovementReverseOffset.Value, value); } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0x1A0F18516154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A0F18516154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } + private static readonly Lazy _AllowCrossMovableConnectionsOffset = new(() => Schema.GetOffset(0x1A0F1851A1D23BD9), LazyThreadSafetyMode.None); + public ref bool AllowCrossMovableConnections { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A0F1851A1D23BD9)); + get => ref _Handle.AsRef(_AllowCrossMovableConnectionsOffset.Value); } + private static readonly Lazy _StrFilterNameOffset = new(() => Schema.GetOffset(0x1A0F1851E3C44CC9), LazyThreadSafetyMode.None); + public string StrFilterName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1A0F1851E3C44CC9)); + var ptr = _Handle.Read(_StrFilterNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1A0F1851E3C44CC9, value); + set => Schema.SetString(_Handle, _StrFilterNameOffset.Value, value); } + private static readonly Lazy _FilterOffset = new(() => Schema.GetOffset(0x1A0F185145D9E0B1), LazyThreadSafetyMode.None); + public ref CHandle Filter { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1A0F185145D9E0B1)); + get => ref _Handle.AsRef>(_FilterOffset.Value); } + private static readonly Lazy _OnNavLinkStartOffset = new(() => Schema.GetOffset(0x1A0F185115E018DB), LazyThreadSafetyMode.None); + public CEntityIOOutput OnNavLinkStart { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1A0F185115E018DB)); + get => new CEntityIOOutputImpl(_Handle + _OnNavLinkStartOffset.Value); } + private static readonly Lazy _OnNavLinkFinishOffset = new(() => Schema.GetOffset(0x1A0F1851A3060EA6), LazyThreadSafetyMode.None); + public CEntityIOOutput OnNavLinkFinish { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1A0F1851A3060EA6)); + get => new CEntityIOOutputImpl(_Handle + _OnNavLinkFinishOffset.Value); } + private static readonly Lazy _IsTerminusOffset = new(() => Schema.GetOffset(0x1A0F1851CBA4EAB8), LazyThreadSafetyMode.None); + public ref bool IsTerminus { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A0F1851CBA4EAB8)); + get => ref _Handle.AsRef(_IsTerminusOffset.Value); } + private static readonly Lazy _SplitsOffset = new(() => Schema.GetOffset(0x1A0F185146EE14AC), LazyThreadSafetyMode.None); + public ref int Splits { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A0F185146EE14AC)); + get => ref _Handle.AsRef(_SplitsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavLinkMovementVDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavLinkMovementVDataImpl.cs index 852e96eeb..ffac4643a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavLinkMovementVDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavLinkMovementVDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CNavLinkMovementVDataImpl : SchemaClass, CNavLinkMovement public CNavLinkMovementVDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _ToolsOnlyOwnerModelNameOffset = new(() => Schema.GetOffset(0xACA2D2486DD9DD04), LazyThreadSafetyMode.None); + public SchemaUntypedField ToolsOnlyOwnerModelName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xACA2D2486DD9DD04)); + get => new SchemaUntypedField(_Handle + _ToolsOnlyOwnerModelNameOffset.Value); } + private static readonly Lazy _IsInterpolatedOffset = new(() => Schema.GetOffset(0xACA2D248EC811A8C), LazyThreadSafetyMode.None); + public ref bool IsInterpolated { - get => ref _Handle.AsRef(Schema.GetOffset(0xACA2D248EC811A8C)); + get => ref _Handle.AsRef(_IsInterpolatedOffset.Value); } + private static readonly Lazy _RecommendedDistanceOffset = new(() => Schema.GetOffset(0xACA2D248BA1A388E), LazyThreadSafetyMode.None); + public ref uint RecommendedDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xACA2D248BA1A388E)); + get => ref _Handle.AsRef(_RecommendedDistanceOffset.Value); } + private static readonly Lazy _AnimgraphVarsOffset = new(() => Schema.GetOffset(0xACA2D2480FD1BA32), LazyThreadSafetyMode.None); + public ref CUtlVector AnimgraphVars { - get => ref _Handle.AsRef>(Schema.GetOffset(0xACA2D2480FD1BA32)); + get => ref _Handle.AsRef>(_AnimgraphVarsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavSpaceInfoImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavSpaceInfoImpl.cs index ccc7511c6..c162bdbf3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavSpaceInfoImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavSpaceInfoImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeAllImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeAllImpl.cs index 2fb79cab8..777d788f7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeAllImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeAllImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeBreadthFirstSearchImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeBreadthFirstSearchImpl.cs index 88a743300..e29aaa188 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeBreadthFirstSearchImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeBreadthFirstSearchImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNavVolumeBreadthFirstSearchImpl : CNavVolumeCalculatedVe public CNavVolumeBreadthFirstSearchImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartPosOffset = new(() => Schema.GetOffset(0x7C16FC090FE14C1B), LazyThreadSafetyMode.None); + public ref Vector StartPos { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C16FC090FE14C1B)); + get => ref _Handle.AsRef(_StartPosOffset.Value); } + private static readonly Lazy _SearchDistOffset = new(() => Schema.GetOffset(0x7C16FC098227285F), LazyThreadSafetyMode.None); + public ref float SearchDist { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C16FC098227285F)); + get => ref _Handle.AsRef(_SearchDistOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeCalculatedVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeCalculatedVectorImpl.cs index e291a67a8..46b629cf0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeCalculatedVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeCalculatedVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeImpl.cs index 6a0388782..e32ac0a23 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeMarkupVolumeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeMarkupVolumeImpl.cs index d1004da3b..974ded3a7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeMarkupVolumeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeMarkupVolumeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeSphereImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeSphereImpl.cs index e2e3017be..99d11b560 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeSphereImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeSphereImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNavVolumeSphereImpl : CNavVolumeImpl, CNavVolumeSphere { public CNavVolumeSphereImpl(nint handle) : base(handle) { } + private static readonly Lazy _CenterOffset = new(() => Schema.GetOffset(0x8FB5B6B8C82A5908), LazyThreadSafetyMode.None); + public ref Vector Center { - get => ref _Handle.AsRef(Schema.GetOffset(0x8FB5B6B8C82A5908)); + get => ref _Handle.AsRef(_CenterOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x8FB5B6B85ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x8FB5B6B85ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeSphericalShellImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeSphericalShellImpl.cs index 8bb5d5724..453684cd5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeSphericalShellImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeSphericalShellImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNavVolumeSphericalShellImpl : CNavVolumeSphereImpl, CNav public CNavVolumeSphericalShellImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusInnerOffset = new(() => Schema.GetOffset(0x8AC7FC7A5D85234F), LazyThreadSafetyMode.None); + public ref float RadiusInner { - get => ref _Handle.AsRef(Schema.GetOffset(0x8AC7FC7A5D85234F)); + get => ref _Handle.AsRef(_RadiusInnerOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeVectorImpl.cs index 58a8144fd..4cbe8eb58 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavVolumeVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNavVolumeVectorImpl : CNavVolumeImpl, CNavVolumeVector { public CNavVolumeVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _HasBeenPreFilteredOffset = new(() => Schema.GetOffset(0x29D8C0A2454B59CD), LazyThreadSafetyMode.None); + public ref bool HasBeenPreFiltered { - get => ref _Handle.AsRef(Schema.GetOffset(0x29D8C0A2454B59CD)); + get => ref _Handle.AsRef(_HasBeenPreFilteredOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavWalkableImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavWalkableImpl.cs index c2e8bb5bd..a0b1c0346 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavWalkableImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNavWalkableImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkOriginCellCoordQuantizedVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkOriginCellCoordQuantizedVectorImpl.cs index 33e21636f..95eaccc1c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkOriginCellCoordQuantizedVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkOriginCellCoordQuantizedVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CNetworkOriginCellCoordQuantizedVectorImpl : SchemaClass, public CNetworkOriginCellCoordQuantizedVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _CellXOffset = new(() => Schema.GetOffset(0x2D24CA0B02D23477), LazyThreadSafetyMode.None); + public ref ushort CellX { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D24CA0B02D23477)); + get => ref _Handle.AsRef(_CellXOffset.Value); } + private static readonly Lazy _CellYOffset = new(() => Schema.GetOffset(0x2D24CA0B01D232E4), LazyThreadSafetyMode.None); + public ref ushort CellY { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D24CA0B01D232E4)); + get => ref _Handle.AsRef(_CellYOffset.Value); } + private static readonly Lazy _CellZOffset = new(() => Schema.GetOffset(0x2D24CA0B04D2379D), LazyThreadSafetyMode.None); + public ref ushort CellZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D24CA0B04D2379D)); + get => ref _Handle.AsRef(_CellZOffset.Value); } + private static readonly Lazy _OutsideWorldOffset = new(() => Schema.GetOffset(0x2D24CA0B1AFE3ED4), LazyThreadSafetyMode.None); + public ref ushort OutsideWorld { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D24CA0B1AFE3ED4)); + get => ref _Handle.AsRef(_OutsideWorldOffset.Value); } + private static readonly Lazy _XOffset = new(() => Schema.GetOffset(0x2D24CA0B8FEB7867), LazyThreadSafetyMode.None); + public ref CNetworkedQuantizedFloat X { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D24CA0B8FEB7867)); + get => ref _Handle.AsRef(_XOffset.Value); } + private static readonly Lazy _YOffset = new(() => Schema.GetOffset(0x2D24CA0B8EEB76D4), LazyThreadSafetyMode.None); + public ref CNetworkedQuantizedFloat Y { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D24CA0B8EEB76D4)); + get => ref _Handle.AsRef(_YOffset.Value); } + private static readonly Lazy _ZOffset = new(() => Schema.GetOffset(0x2D24CA0B91EB7B8D), LazyThreadSafetyMode.None); + public ref CNetworkedQuantizedFloat Z { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D24CA0B91EB7B8D)); + get => ref _Handle.AsRef(_ZOffset.Value); } public void CellXUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkOriginQuantizedVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkOriginQuantizedVectorImpl.cs index b828d23aa..a4c4a96af 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkOriginQuantizedVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkOriginQuantizedVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNetworkOriginQuantizedVectorImpl : SchemaClass, CNetwork public CNetworkOriginQuantizedVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _XOffset = new(() => Schema.GetOffset(0xB34626888FEB7867), LazyThreadSafetyMode.None); + public ref CNetworkedQuantizedFloat X { - get => ref _Handle.AsRef(Schema.GetOffset(0xB34626888FEB7867)); + get => ref _Handle.AsRef(_XOffset.Value); } + private static readonly Lazy _YOffset = new(() => Schema.GetOffset(0xB34626888EEB76D4), LazyThreadSafetyMode.None); + public ref CNetworkedQuantizedFloat Y { - get => ref _Handle.AsRef(Schema.GetOffset(0xB34626888EEB76D4)); + get => ref _Handle.AsRef(_YOffset.Value); } + private static readonly Lazy _ZOffset = new(() => Schema.GetOffset(0xB346268891EB7B8D), LazyThreadSafetyMode.None); + public ref CNetworkedQuantizedFloat Z { - get => ref _Handle.AsRef(Schema.GetOffset(0xB346268891EB7B8D)); + get => ref _Handle.AsRef(_ZOffset.Value); } public void XUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkTransmitComponentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkTransmitComponentImpl.cs index 35b591a2a..56b5a8ecf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkTransmitComponentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkTransmitComponentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNetworkTransmitComponentImpl : SchemaClass, CNetworkTran public CNetworkTransmitComponentImpl(nint handle) : base(handle) { } + private static readonly Lazy _TransmitStateOwnedCounterOffset = new(() => Schema.GetOffset(0x2D6BD23F6BC30751), LazyThreadSafetyMode.None); + public ref byte TransmitStateOwnedCounter { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D6BD23F6BC30751)); + get => ref _Handle.AsRef(_TransmitStateOwnedCounterOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkVelocityVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkVelocityVectorImpl.cs index 225b70535..f82d03d25 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkVelocityVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkVelocityVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNetworkVelocityVectorImpl : SchemaClass, CNetworkVelocit public CNetworkVelocityVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _XOffset = new(() => Schema.GetOffset(0x63CDAFC08FEB7867), LazyThreadSafetyMode.None); + public ref CNetworkedQuantizedFloat X { - get => ref _Handle.AsRef(Schema.GetOffset(0x63CDAFC08FEB7867)); + get => ref _Handle.AsRef(_XOffset.Value); } + private static readonly Lazy _YOffset = new(() => Schema.GetOffset(0x63CDAFC08EEB76D4), LazyThreadSafetyMode.None); + public ref CNetworkedQuantizedFloat Y { - get => ref _Handle.AsRef(Schema.GetOffset(0x63CDAFC08EEB76D4)); + get => ref _Handle.AsRef(_YOffset.Value); } + private static readonly Lazy _ZOffset = new(() => Schema.GetOffset(0x63CDAFC091EB7B8D), LazyThreadSafetyMode.None); + public ref CNetworkedQuantizedFloat Z { - get => ref _Handle.AsRef(Schema.GetOffset(0x63CDAFC091EB7B8D)); + get => ref _Handle.AsRef(_ZOffset.Value); } public void XUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkViewOffsetVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkViewOffsetVectorImpl.cs index 1c48ddde3..b07fbe3fd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkViewOffsetVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkViewOffsetVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNetworkViewOffsetVectorImpl : SchemaClass, CNetworkViewO public CNetworkViewOffsetVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _XOffset = new(() => Schema.GetOffset(0x178DD1B58FEB7867), LazyThreadSafetyMode.None); + public ref CNetworkedQuantizedFloat X { - get => ref _Handle.AsRef(Schema.GetOffset(0x178DD1B58FEB7867)); + get => ref _Handle.AsRef(_XOffset.Value); } + private static readonly Lazy _YOffset = new(() => Schema.GetOffset(0x178DD1B58EEB76D4), LazyThreadSafetyMode.None); + public ref CNetworkedQuantizedFloat Y { - get => ref _Handle.AsRef(Schema.GetOffset(0x178DD1B58EEB76D4)); + get => ref _Handle.AsRef(_YOffset.Value); } + private static readonly Lazy _ZOffset = new(() => Schema.GetOffset(0x178DD1B591EB7B8D), LazyThreadSafetyMode.None); + public ref CNetworkedQuantizedFloat Z { - get => ref _Handle.AsRef(Schema.GetOffset(0x178DD1B591EB7B8D)); + get => ref _Handle.AsRef(_ZOffset.Value); } public void XUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkedSequenceOperationImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkedSequenceOperationImpl.cs index d76c06170..b42f29d86 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkedSequenceOperationImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNetworkedSequenceOperationImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CNetworkedSequenceOperationImpl : SchemaClass, CNetworked public CNetworkedSequenceOperationImpl(nint handle) : base(handle) { } + private static readonly Lazy _SequenceOffset = new(() => Schema.GetOffset(0x3EA8ECC5E0A0598E), LazyThreadSafetyMode.None); + public HSequence Sequence { - get => new HSequenceImpl(_Handle + Schema.GetOffset(0x3EA8ECC5E0A0598E)); + get => new HSequenceImpl(_Handle + _SequenceOffset.Value); } + private static readonly Lazy _PrevCycleOffset = new(() => Schema.GetOffset(0x3EA8ECC5AA0F5CF4), LazyThreadSafetyMode.None); + public ref float PrevCycle { - get => ref _Handle.AsRef(Schema.GetOffset(0x3EA8ECC5AA0F5CF4)); + get => ref _Handle.AsRef(_PrevCycleOffset.Value); } + private static readonly Lazy _CycleOffset = new(() => Schema.GetOffset(0x3EA8ECC50C77829F), LazyThreadSafetyMode.None); + public ref float Cycle { - get => ref _Handle.AsRef(Schema.GetOffset(0x3EA8ECC50C77829F)); + get => ref _Handle.AsRef(_CycleOffset.Value); } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0x3EA8ECC57B81E7AB), LazyThreadSafetyMode.None); + public ref CNetworkedQuantizedFloat Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0x3EA8ECC57B81E7AB)); + get => ref _Handle.AsRef(_WeightOffset.Value); } + private static readonly Lazy _SequenceChangeNetworkedOffset = new(() => Schema.GetOffset(0x3EA8ECC510DEC927), LazyThreadSafetyMode.None); + public ref bool SequenceChangeNetworked { - get => ref _Handle.AsRef(Schema.GetOffset(0x3EA8ECC510DEC927)); + get => ref _Handle.AsRef(_SequenceChangeNetworkedOffset.Value); } + private static readonly Lazy _DiscontinuityOffset = new(() => Schema.GetOffset(0x3EA8ECC5C37DF9B1), LazyThreadSafetyMode.None); + public ref bool Discontinuity { - get => ref _Handle.AsRef(Schema.GetOffset(0x3EA8ECC5C37DF9B1)); + get => ref _Handle.AsRef(_DiscontinuityOffset.Value); } + private static readonly Lazy _PrevCycleFromDiscontinuityOffset = new(() => Schema.GetOffset(0x3EA8ECC581FD154E), LazyThreadSafetyMode.None); + public ref float PrevCycleFromDiscontinuity { - get => ref _Handle.AsRef(Schema.GetOffset(0x3EA8ECC581FD154E)); + get => ref _Handle.AsRef(_PrevCycleFromDiscontinuityOffset.Value); } + private static readonly Lazy _PrevCycleForAnimEventDetectionOffset = new(() => Schema.GetOffset(0x3EA8ECC5B36E4559), LazyThreadSafetyMode.None); + public ref float PrevCycleForAnimEventDetection { - get => ref _Handle.AsRef(Schema.GetOffset(0x3EA8ECC5B36E4559)); + get => ref _Handle.AsRef(_PrevCycleForAnimEventDetectionOffset.Value); } public void SequenceUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNewParticleEffectImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNewParticleEffectImpl.cs index 26797e944..1ca3c8e58 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNewParticleEffectImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNewParticleEffectImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,123 +17,189 @@ internal partial class CNewParticleEffectImpl : IParticleEffectImpl, CNewParticl public CNewParticleEffectImpl(nint handle) : base(handle) { } + private static readonly Lazy _NextOffset = new(() => Schema.GetOffset(0x80246F2332B11E0E), LazyThreadSafetyMode.None); + public CNewParticleEffect? Next { get { - var ptr = _Handle.Read(Schema.GetOffset(0x80246F2332B11E0E)); + var ptr = _Handle.Read(_NextOffset.Value); return ptr.IsValidPtr() ? new CNewParticleEffectImpl(ptr) : null; } } + private static readonly Lazy _PrevOffset = new(() => Schema.GetOffset(0x80246F23D49AD9AA), LazyThreadSafetyMode.None); + public CNewParticleEffect? Prev { get { - var ptr = _Handle.Read(Schema.GetOffset(0x80246F23D49AD9AA)); + var ptr = _Handle.Read(_PrevOffset.Value); return ptr.IsValidPtr() ? new CNewParticleEffectImpl(ptr) : null; } } + private static readonly Lazy _ParticlesOffset = new(() => Schema.GetOffset(0x80246F230264D666), LazyThreadSafetyMode.None); + public IParticleCollection? Particles { get { - var ptr = _Handle.Read(Schema.GetOffset(0x80246F230264D666)); + var ptr = _Handle.Read(_ParticlesOffset.Value); return ptr.IsValidPtr() ? new IParticleCollectionImpl(ptr) : null; } } + private static readonly Lazy _DebugNameOffset = new(() => Schema.GetOffset(0x80246F23831E1E2D), LazyThreadSafetyMode.None); + public string DebugName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x80246F23831E1E2D)); + var ptr = _Handle.Read(_DebugNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x80246F23831E1E2D, value); + set => Schema.SetString(_Handle, _DebugNameOffset.Value, value); } + private static readonly Lazy _DontRemoveOffset = new(() => Schema.GetOffset(0x80246F2318B469AA), LazyThreadSafetyMode.None); + public SchemaUntypedField DontRemove { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x80246F2318B469AA)); + get => new SchemaUntypedField(_Handle + _DontRemoveOffset.Value); } + private static readonly Lazy _RemoveOffset = new(() => Schema.GetOffset(0x80246F23DE0A6D5D), LazyThreadSafetyMode.None); + public SchemaUntypedField Remove { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x80246F23DE0A6D5D)); + get => new SchemaUntypedField(_Handle + _RemoveOffset.Value); } + private static readonly Lazy _NeedsBBoxUpdateOffset = new(() => Schema.GetOffset(0x80246F235AEEC4C0), LazyThreadSafetyMode.None); + public SchemaUntypedField NeedsBBoxUpdate { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x80246F235AEEC4C0)); + get => new SchemaUntypedField(_Handle + _NeedsBBoxUpdateOffset.Value); } + private static readonly Lazy _IsFirstFrameOffset = new(() => Schema.GetOffset(0x80246F238B55CEC2), LazyThreadSafetyMode.None); + public SchemaUntypedField IsFirstFrame { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x80246F238B55CEC2)); + get => new SchemaUntypedField(_Handle + _IsFirstFrameOffset.Value); } + private static readonly Lazy _AutoUpdateBBoxOffset = new(() => Schema.GetOffset(0x80246F2326B4EA98), LazyThreadSafetyMode.None); + public SchemaUntypedField AutoUpdateBBox { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x80246F2326B4EA98)); + get => new SchemaUntypedField(_Handle + _AutoUpdateBBoxOffset.Value); } + private static readonly Lazy _AllocatedOffset = new(() => Schema.GetOffset(0x80246F23BD9EA512), LazyThreadSafetyMode.None); + public SchemaUntypedField Allocated { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x80246F23BD9EA512)); + get => new SchemaUntypedField(_Handle + _AllocatedOffset.Value); } + private static readonly Lazy _SimulateOffset = new(() => Schema.GetOffset(0x80246F234268FC4F), LazyThreadSafetyMode.None); + public SchemaUntypedField Simulate { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x80246F234268FC4F)); + get => new SchemaUntypedField(_Handle + _SimulateOffset.Value); } + private static readonly Lazy _ShouldPerformCullCheckOffset = new(() => Schema.GetOffset(0x80246F235AE4A4A1), LazyThreadSafetyMode.None); + public SchemaUntypedField ShouldPerformCullCheck { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x80246F235AE4A4A1)); + get => new SchemaUntypedField(_Handle + _ShouldPerformCullCheckOffset.Value); } + private static readonly Lazy _ForceNoDrawOffset = new(() => Schema.GetOffset(0x80246F23B481F091), LazyThreadSafetyMode.None); + public SchemaUntypedField ForceNoDraw { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x80246F23B481F091)); + get => new SchemaUntypedField(_Handle + _ForceNoDrawOffset.Value); } + private static readonly Lazy _SuppressScreenSpaceEffectOffset = new(() => Schema.GetOffset(0x80246F237FA21D5D), LazyThreadSafetyMode.None); + public SchemaUntypedField SuppressScreenSpaceEffect { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x80246F237FA21D5D)); + get => new SchemaUntypedField(_Handle + _SuppressScreenSpaceEffectOffset.Value); } + private static readonly Lazy _ShouldSaveOffset = new(() => Schema.GetOffset(0x80246F23574A1977), LazyThreadSafetyMode.None); + public SchemaUntypedField ShouldSave { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x80246F23574A1977)); + get => new SchemaUntypedField(_Handle + _ShouldSaveOffset.Value); } + private static readonly Lazy _ShouldSimulateDuringGamePausedOffset = new(() => Schema.GetOffset(0x80246F233E7DF411), LazyThreadSafetyMode.None); + public SchemaUntypedField ShouldSimulateDuringGamePaused { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x80246F233E7DF411)); + get => new SchemaUntypedField(_Handle + _ShouldSimulateDuringGamePausedOffset.Value); } + private static readonly Lazy _ShouldCheckFoWOffset = new(() => Schema.GetOffset(0x80246F237B2493C2), LazyThreadSafetyMode.None); + public SchemaUntypedField ShouldCheckFoW { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x80246F237B2493C2)); + get => new SchemaUntypedField(_Handle + _ShouldCheckFoWOffset.Value); } + private static readonly Lazy _IsAsyncCreateOffset = new(() => Schema.GetOffset(0x80246F2325222507), LazyThreadSafetyMode.None); + public SchemaUntypedField IsAsyncCreate { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x80246F2325222507)); + get => new SchemaUntypedField(_Handle + _IsAsyncCreateOffset.Value); } + private static readonly Lazy _FreezeTransitionActiveOffset = new(() => Schema.GetOffset(0x80246F23DE61FB43), LazyThreadSafetyMode.None); + public SchemaUntypedField FreezeTransitionActive { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x80246F23DE61FB43)); + get => new SchemaUntypedField(_Handle + _FreezeTransitionActiveOffset.Value); } + private static readonly Lazy _FreezeTargetStateOffset = new(() => Schema.GetOffset(0x80246F235ACCAFF4), LazyThreadSafetyMode.None); + public SchemaUntypedField FreezeTargetState { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x80246F235ACCAFF4)); + get => new SchemaUntypedField(_Handle + _FreezeTargetStateOffset.Value); } + private static readonly Lazy _CanFreezeOffset = new(() => Schema.GetOffset(0x80246F2314DD4F42), LazyThreadSafetyMode.None); + public SchemaUntypedField CanFreeze { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x80246F2314DD4F42)); + get => new SchemaUntypedField(_Handle + _CanFreezeOffset.Value); } + private static readonly Lazy _SortOriginOffset = new(() => Schema.GetOffset(0x80246F23E2F1590F), LazyThreadSafetyMode.None); + public ref Vector SortOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0x80246F23E2F1590F)); + get => ref _Handle.AsRef(_SortOriginOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x80246F23B731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0x80246F23B731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _OwnerOffset = new(() => Schema.GetOffset(0x80246F23F6D89572), LazyThreadSafetyMode.None); + public PARTICLE_EHANDLE__? Owner { get { - var ptr = _Handle.Read(Schema.GetOffset(0x80246F23F6D89572)); + var ptr = _Handle.Read(_OwnerOffset.Value); return ptr.IsValidPtr() ? new PARTICLE_EHANDLE__Impl(ptr) : null; } } + private static readonly Lazy _OwningParticlePropertyOffset = new(() => Schema.GetOffset(0x80246F2374DD533C), LazyThreadSafetyMode.None); + public CParticleProperty? OwningParticleProperty { get { - var ptr = _Handle.Read(Schema.GetOffset(0x80246F2374DD533C)); + var ptr = _Handle.Read(_OwningParticlePropertyOffset.Value); return ptr.IsValidPtr() ? new CParticlePropertyImpl(ptr) : null; } } + private static readonly Lazy _FreezeTransitionStartOffset = new(() => Schema.GetOffset(0x80246F233AB5D201), LazyThreadSafetyMode.None); + public ref float FreezeTransitionStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x80246F233AB5D201)); + get => ref _Handle.AsRef(_FreezeTransitionStartOffset.Value); } + private static readonly Lazy _FreezeTransitionDurationOffset = new(() => Schema.GetOffset(0x80246F239CE29C67), LazyThreadSafetyMode.None); + public ref float FreezeTransitionDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x80246F239CE29C67)); + get => ref _Handle.AsRef(_FreezeTransitionDurationOffset.Value); } + private static readonly Lazy _FreezeTransitionOverrideOffset = new(() => Schema.GetOffset(0x80246F23A55719DB), LazyThreadSafetyMode.None); + public ref float FreezeTransitionOverride { - get => ref _Handle.AsRef(Schema.GetOffset(0x80246F23A55719DB)); + get => ref _Handle.AsRef(_FreezeTransitionOverrideOffset.Value); } + private static readonly Lazy _LastMinOffset = new(() => Schema.GetOffset(0x80246F23102539F3), LazyThreadSafetyMode.None); + public ref Vector LastMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x80246F23102539F3)); + get => ref _Handle.AsRef(_LastMinOffset.Value); } + private static readonly Lazy _LastMaxOffset = new(() => Schema.GetOffset(0x80246F232638E44D), LazyThreadSafetyMode.None); + public ref Vector LastMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x80246F232638E44D)); + get => ref _Handle.AsRef(_LastMaxOffset.Value); } + private static readonly Lazy _SplitScreenUserOffset = new(() => Schema.GetOffset(0x80246F23480103D8), LazyThreadSafetyMode.None); + public ref uint SplitScreenUser { - get => ref _Handle.AsRef(Schema.GetOffset(0x80246F23480103D8)); + get => ref _Handle.AsRef(_SplitScreenUserOffset.Value); } + private static readonly Lazy _AggregationCenterOffset = new(() => Schema.GetOffset(0x80246F23094BDF24), LazyThreadSafetyMode.None); + public ref Vector AggregationCenter { - get => ref _Handle.AsRef(Schema.GetOffset(0x80246F23094BDF24)); + get => ref _Handle.AsRef(_AggregationCenterOffset.Value); } + private static readonly Lazy _RefCountOffset = new(() => Schema.GetOffset(0x80246F237998CBC9), LazyThreadSafetyMode.None); + public ref int RefCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x80246F237998CBC9)); + get => ref _Handle.AsRef(_RefCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAdditiveBlendTaskImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAdditiveBlendTaskImpl.cs index 0db8e5acf..e86bb468a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAdditiveBlendTaskImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAdditiveBlendTaskImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAimCSNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAimCSNode__CDefinitionImpl.cs index ce3cab7c6..ce7ed158f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAimCSNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAimCSNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CNmAimCSNode__CDefinitionImpl : CNmPassthroughNode__CDefi public CNmAimCSNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _VerticalAngleNodeIdxOffset = new(() => Schema.GetOffset(0xE1CD14C20A1F17AD), LazyThreadSafetyMode.None); + public ref short VerticalAngleNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1CD14C20A1F17AD)); + get => ref _Handle.AsRef(_VerticalAngleNodeIdxOffset.Value); } + private static readonly Lazy _HorizontalAngleNodeIdxOffset = new(() => Schema.GetOffset(0xE1CD14C28E2FD3DB), LazyThreadSafetyMode.None); + public ref short HorizontalAngleNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1CD14C28E2FD3DB)); + get => ref _Handle.AsRef(_HorizontalAngleNodeIdxOffset.Value); } + private static readonly Lazy _WeaponCategoryNodeIdxOffset = new(() => Schema.GetOffset(0xE1CD14C216D198E4), LazyThreadSafetyMode.None); + public ref short WeaponCategoryNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1CD14C216D198E4)); + get => ref _Handle.AsRef(_WeaponCategoryNodeIdxOffset.Value); } + private static readonly Lazy _EnabledNodeIdxOffset = new(() => Schema.GetOffset(0xE1CD14C2F7CDF5E9), LazyThreadSafetyMode.None); + public ref short EnabledNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1CD14C2F7CDF5E9)); + get => ref _Handle.AsRef(_EnabledNodeIdxOffset.Value); } + private static readonly Lazy _BlendTimeSecondsOffset = new(() => Schema.GetOffset(0xE1CD14C26D3A08FC), LazyThreadSafetyMode.None); + public ref float BlendTimeSeconds { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1CD14C26D3A08FC)); + get => ref _Handle.AsRef(_BlendTimeSecondsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAimCSTaskImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAimCSTaskImpl.cs index 7c8713294..8243bdba6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAimCSTaskImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAimCSTaskImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAndNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAndNode__CDefinitionImpl.cs index 1271ba7b6..0a3add614 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAndNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAndNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmAndNode__CDefinitionImpl : CNmBoolValueNode__CDefiniti public CNmAndNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ConditionNodeIndicesOffset = new(() => Schema.GetOffset(0xC46B12E04A144D0F), LazyThreadSafetyMode.None); + public SchemaUntypedField ConditionNodeIndices { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC46B12E04A144D0F)); + get => new SchemaUntypedField(_Handle + _ConditionNodeIndicesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAnimationPoseNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAnimationPoseNode__CDefinitionImpl.cs index aa75f3fc6..989350f05 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAnimationPoseNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmAnimationPoseNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CNmAnimationPoseNode__CDefinitionImpl : CNmPoseNode__CDef public CNmAnimationPoseNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _PoseTimeValueNodeIdxOffset = new(() => Schema.GetOffset(0xAEB5DD4EE17A4AC5), LazyThreadSafetyMode.None); + public ref short PoseTimeValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xAEB5DD4EE17A4AC5)); + get => ref _Handle.AsRef(_PoseTimeValueNodeIdxOffset.Value); } + private static readonly Lazy _DataSlotIdxOffset = new(() => Schema.GetOffset(0xAEB5DD4EB1C15B68), LazyThreadSafetyMode.None); + public ref short DataSlotIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xAEB5DD4EB1C15B68)); + get => ref _Handle.AsRef(_DataSlotIdxOffset.Value); } + private static readonly Lazy _InputTimeRemapRangeOffset = new(() => Schema.GetOffset(0xAEB5DD4EE53BDBD4), LazyThreadSafetyMode.None); + public SchemaUntypedField InputTimeRemapRange { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xAEB5DD4EE53BDBD4)); + get => new SchemaUntypedField(_Handle + _InputTimeRemapRangeOffset.Value); } + private static readonly Lazy _UserSpecifiedTimeOffset = new(() => Schema.GetOffset(0xAEB5DD4E0D7319E7), LazyThreadSafetyMode.None); + public ref float UserSpecifiedTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xAEB5DD4E0D7319E7)); + get => ref _Handle.AsRef(_UserSpecifiedTimeOffset.Value); } + private static readonly Lazy _UseFramesAsInputOffset = new(() => Schema.GetOffset(0xAEB5DD4EF0C41386), LazyThreadSafetyMode.None); + public ref bool UseFramesAsInput { - get => ref _Handle.AsRef(Schema.GetOffset(0xAEB5DD4EF0C41386)); + get => ref _Handle.AsRef(_UseFramesAsInputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBitFlagsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBitFlagsImpl.cs index e36a89aba..47c935ccd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBitFlagsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBitFlagsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmBitFlagsImpl : SchemaClass, CNmBitFlags { public CNmBitFlagsImpl(nint handle) : base(handle) { } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x2D0B9CC1DC74A14C), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D0B9CC1DC74A14C)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBlend1DNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBlend1DNode__CDefinitionImpl.cs index e5ba8d891..d96e3520e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBlend1DNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBlend1DNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmBlend1DNode__CDefinitionImpl : CNmParameterizedBlendNo public CNmBlend1DNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParameterizationOffset = new(() => Schema.GetOffset(0xA5E668CDE173A928), LazyThreadSafetyMode.None); + public CNmParameterizedBlendNode__Parameterization_t Parameterization { - get => new CNmParameterizedBlendNode__Parameterization_tImpl(_Handle + Schema.GetOffset(0xA5E668CDE173A928)); + get => new CNmParameterizedBlendNode__Parameterization_tImpl(_Handle + _ParameterizationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBlend2DNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBlend2DNode__CDefinitionImpl.cs index 08bd3c8d5..eaf1b3107 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBlend2DNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBlend2DNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CNmBlend2DNode__CDefinitionImpl : CNmPoseNode__CDefinitio public CNmBlend2DNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceNodeIndicesOffset = new(() => Schema.GetOffset(0x965A04D8E90F1FE1), LazyThreadSafetyMode.None); + public SchemaUntypedField SourceNodeIndices { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x965A04D8E90F1FE1)); + get => new SchemaUntypedField(_Handle + _SourceNodeIndicesOffset.Value); } + private static readonly Lazy _InputParameterNodeIdx0Offset = new(() => Schema.GetOffset(0x965A04D85A96A1AF), LazyThreadSafetyMode.None); + public ref short InputParameterNodeIdx0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x965A04D85A96A1AF)); + get => ref _Handle.AsRef(_InputParameterNodeIdx0Offset.Value); } + private static readonly Lazy _InputParameterNodeIdx1Offset = new(() => Schema.GetOffset(0x965A04D85996A01C), LazyThreadSafetyMode.None); + public ref short InputParameterNodeIdx1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x965A04D85996A01C)); + get => ref _Handle.AsRef(_InputParameterNodeIdx1Offset.Value); } + private static readonly Lazy _ValuesOffset = new(() => Schema.GetOffset(0x965A04D8FBEDDADB), LazyThreadSafetyMode.None); + public SchemaUntypedField Values { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x965A04D8FBEDDADB)); + get => new SchemaUntypedField(_Handle + _ValuesOffset.Value); } + private static readonly Lazy _IndicesOffset = new(() => Schema.GetOffset(0x965A04D8CF5DEE92), LazyThreadSafetyMode.None); + public SchemaUntypedField Indices { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x965A04D8CF5DEE92)); + get => new SchemaUntypedField(_Handle + _IndicesOffset.Value); } + private static readonly Lazy _HullIndicesOffset = new(() => Schema.GetOffset(0x965A04D8A014D83B), LazyThreadSafetyMode.None); + public SchemaUntypedField HullIndices { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x965A04D8A014D83B)); + get => new SchemaUntypedField(_Handle + _HullIndicesOffset.Value); } + private static readonly Lazy _AllowLoopingOffset = new(() => Schema.GetOffset(0x965A04D8FEB26D98), LazyThreadSafetyMode.None); + public ref bool AllowLooping { - get => ref _Handle.AsRef(Schema.GetOffset(0x965A04D8FEB26D98)); + get => ref _Handle.AsRef(_AllowLoopingOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBlendTaskBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBlendTaskBaseImpl.cs index 7f6064b28..969414b4c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBlendTaskBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBlendTaskBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBlendTaskImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBlendTaskImpl.cs index b93b6895c..cc66bc4f4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBlendTaskImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBlendTaskImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBodyGroupEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBodyGroupEventImpl.cs index 1a83b3f5f..ac327e7ad 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBodyGroupEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBodyGroupEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CNmBodyGroupEventImpl : CNmEventImpl, CNmBodyGroupEvent { public CNmBodyGroupEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _GroupNameOffset = new(() => Schema.GetOffset(0xBC3A0016025FB2C7), LazyThreadSafetyMode.None); + public string GroupName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xBC3A0016025FB2C7)); + var ptr = _Handle.Read(_GroupNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xBC3A0016025FB2C7, value); + set => Schema.SetString(_Handle, _GroupNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneMaskBlendNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneMaskBlendNode__CDefinitionImpl.cs index a42782d7d..18ff15f27 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneMaskBlendNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneMaskBlendNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmBoneMaskBlendNode__CDefinitionImpl : CNmBoneMaskValueN public CNmBoneMaskBlendNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceMaskNodeIdxOffset = new(() => Schema.GetOffset(0x551EA0BCFF243A47), LazyThreadSafetyMode.None); + public ref short SourceMaskNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x551EA0BCFF243A47)); + get => ref _Handle.AsRef(_SourceMaskNodeIdxOffset.Value); } + private static readonly Lazy _TargetMaskNodeIdxOffset = new(() => Schema.GetOffset(0x551EA0BC74E90A6F), LazyThreadSafetyMode.None); + public ref short TargetMaskNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x551EA0BC74E90A6F)); + get => ref _Handle.AsRef(_TargetMaskNodeIdxOffset.Value); } + private static readonly Lazy _BlendWeightValueNodeIdxOffset = new(() => Schema.GetOffset(0x551EA0BC2735A990), LazyThreadSafetyMode.None); + public ref short BlendWeightValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x551EA0BC2735A990)); + get => ref _Handle.AsRef(_BlendWeightValueNodeIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneMaskNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneMaskNode__CDefinitionImpl.cs index 1da37ec0a..1dcad48ca 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneMaskNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneMaskNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmBoneMaskNode__CDefinitionImpl : CNmBoneMaskValueNode__ public CNmBoneMaskNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneMaskIDOffset = new(() => Schema.GetOffset(0xC50CAD4B5F09FD66), LazyThreadSafetyMode.None); + public ref CGlobalSymbol BoneMaskID { - get => ref _Handle.AsRef(Schema.GetOffset(0xC50CAD4B5F09FD66)); + get => ref _Handle.AsRef(_BoneMaskIDOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneMaskSelectorNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneMaskSelectorNode__CDefinitionImpl.cs index 3a1a4190a..ebc082770 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneMaskSelectorNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneMaskSelectorNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CNmBoneMaskSelectorNode__CDefinitionImpl : CNmBoneMaskVal public CNmBoneMaskSelectorNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _DefaultMaskNodeIdxOffset = new(() => Schema.GetOffset(0xA90158701E92549D), LazyThreadSafetyMode.None); + public ref short DefaultMaskNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xA90158701E92549D)); + get => ref _Handle.AsRef(_DefaultMaskNodeIdxOffset.Value); } + private static readonly Lazy _ParameterValueNodeIdxOffset = new(() => Schema.GetOffset(0xA90158702696FA7C), LazyThreadSafetyMode.None); + public ref short ParameterValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xA90158702696FA7C)); + get => ref _Handle.AsRef(_ParameterValueNodeIdxOffset.Value); } + private static readonly Lazy _SwitchDynamicallyOffset = new(() => Schema.GetOffset(0xA9015870461869F8), LazyThreadSafetyMode.None); + public ref bool SwitchDynamically { - get => ref _Handle.AsRef(Schema.GetOffset(0xA9015870461869F8)); + get => ref _Handle.AsRef(_SwitchDynamicallyOffset.Value); } + private static readonly Lazy _MaskNodeIndicesOffset = new(() => Schema.GetOffset(0xA90158703326692E), LazyThreadSafetyMode.None); + public SchemaUntypedField MaskNodeIndices { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA90158703326692E)); + get => new SchemaUntypedField(_Handle + _MaskNodeIndicesOffset.Value); } + private static readonly Lazy _ParameterValuesOffset = new(() => Schema.GetOffset(0xA90158709D777E36), LazyThreadSafetyMode.None); + public SchemaUntypedField ParameterValues { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA90158709D777E36)); + get => new SchemaUntypedField(_Handle + _ParameterValuesOffset.Value); } + private static readonly Lazy _BlendTimeSecondsOffset = new(() => Schema.GetOffset(0xA90158706D3A08FC), LazyThreadSafetyMode.None); + public ref float BlendTimeSeconds { - get => ref _Handle.AsRef(Schema.GetOffset(0xA90158706D3A08FC)); + get => ref _Handle.AsRef(_BlendTimeSecondsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneMaskValueNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneMaskValueNode__CDefinitionImpl.cs index bbc0453a3..207ea7d20 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneMaskValueNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneMaskValueNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneWeightListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneWeightListImpl.cs index 0646b108c..b2f245baa 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneWeightListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoneWeightListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmBoneWeightListImpl : SchemaClass, CNmBoneWeightList { public CNmBoneWeightListImpl(nint handle) : base(handle) { } + private static readonly Lazy _SkeletonNameOffset = new(() => Schema.GetOffset(0xA16307391879D68D), LazyThreadSafetyMode.None); + public SchemaUntypedField SkeletonName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA16307391879D68D)); + get => new SchemaUntypedField(_Handle + _SkeletonNameOffset.Value); } + private static readonly Lazy _BoneIDsOffset = new(() => Schema.GetOffset(0xA16307390909C443), LazyThreadSafetyMode.None); + public ref CUtlVector BoneIDs { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA16307390909C443)); + get => ref _Handle.AsRef>(_BoneIDsOffset.Value); } + private static readonly Lazy _WeightsOffset = new(() => Schema.GetOffset(0xA163073977B2F91E), LazyThreadSafetyMode.None); + public ref CUtlVector Weights { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA163073977B2F91E)); + get => ref _Handle.AsRef>(_WeightsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoolValueNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoolValueNode__CDefinitionImpl.cs index 987b64e0a..8db0ca9c4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoolValueNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmBoolValueNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedBoolNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedBoolNode__CDefinitionImpl.cs index e6d074828..df496666a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedBoolNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedBoolNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmCachedBoolNode__CDefinitionImpl : CNmBoolValueNode__CD public CNmCachedBoolNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x4BFAE2E795E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BFAE2E795E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _ModeOffset = new(() => Schema.GetOffset(0x4BFAE2E790FD5BB2), LazyThreadSafetyMode.None); + public ref NmCachedValueMode_t Mode { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BFAE2E790FD5BB2)); + get => ref _Handle.AsRef(_ModeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedFloatNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedFloatNode__CDefinitionImpl.cs index fcaa82d05..a5cc6c3d5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedFloatNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedFloatNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmCachedFloatNode__CDefinitionImpl : CNmFloatValueNode__ public CNmCachedFloatNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x3390BC2F95E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x3390BC2F95E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _ModeOffset = new(() => Schema.GetOffset(0x3390BC2F90FD5BB2), LazyThreadSafetyMode.None); + public ref NmCachedValueMode_t Mode { - get => ref _Handle.AsRef(Schema.GetOffset(0x3390BC2F90FD5BB2)); + get => ref _Handle.AsRef(_ModeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedIDNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedIDNode__CDefinitionImpl.cs index 25bc0948f..d8c73f743 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedIDNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedIDNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmCachedIDNode__CDefinitionImpl : CNmIDValueNode__CDefin public CNmCachedIDNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x9527FDE895E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x9527FDE895E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _ModeOffset = new(() => Schema.GetOffset(0x9527FDE890FD5BB2), LazyThreadSafetyMode.None); + public ref NmCachedValueMode_t Mode { - get => ref _Handle.AsRef(Schema.GetOffset(0x9527FDE890FD5BB2)); + get => ref _Handle.AsRef(_ModeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedPoseReadTaskImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedPoseReadTaskImpl.cs index d38aca3da..8995d82ee 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedPoseReadTaskImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedPoseReadTaskImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedPoseWriteTaskImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedPoseWriteTaskImpl.cs index d974ad272..6dda9796d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedPoseWriteTaskImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedPoseWriteTaskImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedTargetNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedTargetNode__CDefinitionImpl.cs index f1d78c3ab..e400f8b5a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedTargetNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedTargetNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmCachedTargetNode__CDefinitionImpl : CNmTargetValueNode public CNmCachedTargetNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x61F789E895E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x61F789E895E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _ModeOffset = new(() => Schema.GetOffset(0x61F789E890FD5BB2), LazyThreadSafetyMode.None); + public ref NmCachedValueMode_t Mode { - get => ref _Handle.AsRef(Schema.GetOffset(0x61F789E890FD5BB2)); + get => ref _Handle.AsRef(_ModeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedVectorNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedVectorNode__CDefinitionImpl.cs index 844bc36da..6f23695eb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedVectorNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCachedVectorNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmCachedVectorNode__CDefinitionImpl : CNmVectorValueNode public CNmCachedVectorNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x4F6FE2EA95E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F6FE2EA95E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _ModeOffset = new(() => Schema.GetOffset(0x4F6FE2EA90FD5BB2), LazyThreadSafetyMode.None); + public ref NmCachedValueMode_t Mode { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F6FE2EA90FD5BB2)); + get => ref _Handle.AsRef(_ModeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmChainLookatNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmChainLookatNode__CDefinitionImpl.cs index 5e3a834ee..5ca06bf65 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmChainLookatNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmChainLookatNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CNmChainLookatNode__CDefinitionImpl : CNmPassthroughNode_ public CNmChainLookatNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChainEndBoneIDOffset = new(() => Schema.GetOffset(0x3D36690222B26274), LazyThreadSafetyMode.None); + public ref CGlobalSymbol ChainEndBoneID { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D36690222B26274)); + get => ref _Handle.AsRef(_ChainEndBoneIDOffset.Value); } + private static readonly Lazy _LookatTargetNodeIdxOffset = new(() => Schema.GetOffset(0x3D36690221A633B1), LazyThreadSafetyMode.None); + public ref short LookatTargetNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D36690221A633B1)); + get => ref _Handle.AsRef(_LookatTargetNodeIdxOffset.Value); } + private static readonly Lazy _EnabledNodeIdxOffset = new(() => Schema.GetOffset(0x3D366902F7CDF5E9), LazyThreadSafetyMode.None); + public ref short EnabledNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D366902F7CDF5E9)); + get => ref _Handle.AsRef(_EnabledNodeIdxOffset.Value); } + private static readonly Lazy _BlendTimeSecondsOffset = new(() => Schema.GetOffset(0x3D3669026D3A08FC), LazyThreadSafetyMode.None); + public ref float BlendTimeSeconds { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D3669026D3A08FC)); + get => ref _Handle.AsRef(_BlendTimeSecondsOffset.Value); } + private static readonly Lazy _ChainLengthOffset = new(() => Schema.GetOffset(0x3D366902ACB94336), LazyThreadSafetyMode.None); + public ref byte ChainLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D366902ACB94336)); + get => ref _Handle.AsRef(_ChainLengthOffset.Value); } + private static readonly Lazy _IsTargetInWorldSpaceOffset = new(() => Schema.GetOffset(0x3D3669025F56E0C5), LazyThreadSafetyMode.None); + public ref bool IsTargetInWorldSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D3669025F56E0C5)); + get => ref _Handle.AsRef(_IsTargetInWorldSpaceOffset.Value); } + private static readonly Lazy _ChainForwardDirOffset = new(() => Schema.GetOffset(0x3D36690298A5355A), LazyThreadSafetyMode.None); + public ref Vector ChainForwardDir { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D36690298A5355A)); + get => ref _Handle.AsRef(_ChainForwardDirOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmChainLookatTaskImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmChainLookatTaskImpl.cs index 0540070d4..f2a3729c5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmChainLookatTaskImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmChainLookatTaskImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class CNmChainLookatTaskImpl : CNmPoseTaskImpl, CNmChainLookatT public CNmChainLookatTaskImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChainEndBoneIdxOffset = new(() => Schema.GetOffset(0x4021FFEBC513D7B8), LazyThreadSafetyMode.None); + public ref int ChainEndBoneIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x4021FFEBC513D7B8)); + get => ref _Handle.AsRef(_ChainEndBoneIdxOffset.Value); } + private static readonly Lazy _NumBonesInChainOffset = new(() => Schema.GetOffset(0x4021FFEBCAD2EB3E), LazyThreadSafetyMode.None); + public ref int NumBonesInChain { - get => ref _Handle.AsRef(Schema.GetOffset(0x4021FFEBCAD2EB3E)); + get => ref _Handle.AsRef(_NumBonesInChainOffset.Value); } + private static readonly Lazy _ChainForwardDirOffset = new(() => Schema.GetOffset(0x4021FFEB98A5355A), LazyThreadSafetyMode.None); + public ref Vector ChainForwardDir { - get => ref _Handle.AsRef(Schema.GetOffset(0x4021FFEB98A5355A)); + get => ref _Handle.AsRef(_ChainForwardDirOffset.Value); } + private static readonly Lazy _BlendWeightOffset = new(() => Schema.GetOffset(0x4021FFEBE5D6B9CE), LazyThreadSafetyMode.None); + public ref float BlendWeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x4021FFEBE5D6B9CE)); + get => ref _Handle.AsRef(_BlendWeightOffset.Value); } + private static readonly Lazy _HorizontalAngleLimitDegreesOffset = new(() => Schema.GetOffset(0x4021FFEB0D028F1E), LazyThreadSafetyMode.None); + public ref float HorizontalAngleLimitDegrees { - get => ref _Handle.AsRef(Schema.GetOffset(0x4021FFEB0D028F1E)); + get => ref _Handle.AsRef(_HorizontalAngleLimitDegreesOffset.Value); } + private static readonly Lazy _VerticalAngleLimitDegreesOffset = new(() => Schema.GetOffset(0x4021FFEBC3214250), LazyThreadSafetyMode.None); + public ref float VerticalAngleLimitDegrees { - get => ref _Handle.AsRef(Schema.GetOffset(0x4021FFEBC3214250)); + get => ref _Handle.AsRef(_VerticalAngleLimitDegreesOffset.Value); } + private static readonly Lazy _LookatTargetOffset = new(() => Schema.GetOffset(0x4021FFEBBD59D4D6), LazyThreadSafetyMode.None); + public ref Vector LookatTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0x4021FFEBBD59D4D6)); + get => ref _Handle.AsRef(_LookatTargetOffset.Value); } + private static readonly Lazy _IsTargetInWorldSpaceOffset = new(() => Schema.GetOffset(0x4021FFEB5F56E0C5), LazyThreadSafetyMode.None); + public ref bool IsTargetInWorldSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x4021FFEB5F56E0C5)); + get => ref _Handle.AsRef(_IsTargetInWorldSpaceOffset.Value); } + private static readonly Lazy _IsRunningFromDeserializedDataOffset = new(() => Schema.GetOffset(0x4021FFEB4791111D), LazyThreadSafetyMode.None); + public ref bool IsRunningFromDeserializedData { - get => ref _Handle.AsRef(Schema.GetOffset(0x4021FFEB4791111D)); + get => ref _Handle.AsRef(_IsRunningFromDeserializedDataOffset.Value); } + private static readonly Lazy _HorizontalAngleDegreesOffset = new(() => Schema.GetOffset(0x4021FFEB25C3867F), LazyThreadSafetyMode.None); + public ref float HorizontalAngleDegrees { - get => ref _Handle.AsRef(Schema.GetOffset(0x4021FFEB25C3867F)); + get => ref _Handle.AsRef(_HorizontalAngleDegreesOffset.Value); } + private static readonly Lazy _VerticalAngleDegreesOffset = new(() => Schema.GetOffset(0x4021FFEBF1DC7205), LazyThreadSafetyMode.None); + public ref float VerticalAngleDegrees { - get => ref _Handle.AsRef(Schema.GetOffset(0x4021FFEBF1DC7205)); + get => ref _Handle.AsRef(_VerticalAngleDegreesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmChainSolverTaskImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmChainSolverTaskImpl.cs index fb182fcef..01947c709 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmChainSolverTaskImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmChainSolverTaskImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,70 @@ internal partial class CNmChainSolverTaskImpl : CNmPoseTaskImpl, CNmChainSolverT public CNmChainSolverTaskImpl(nint handle) : base(handle) { } + private static readonly Lazy _EffectorBoneIdxOffset = new(() => Schema.GetOffset(0x5D675A12A9C233BE), LazyThreadSafetyMode.None); + public ref int EffectorBoneIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x5D675A12A9C233BE)); + get => ref _Handle.AsRef(_EffectorBoneIdxOffset.Value); } + private static readonly Lazy _EffectorTargetBoneIdxOffset = new(() => Schema.GetOffset(0x5D675A123A19E0D9), LazyThreadSafetyMode.None); + public ref int EffectorTargetBoneIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x5D675A123A19E0D9)); + get => ref _Handle.AsRef(_EffectorTargetBoneIdxOffset.Value); } + private static readonly Lazy _TargetTransformOffset = new(() => Schema.GetOffset(0x5D675A12B1497974), LazyThreadSafetyMode.None); + public ref CTransform TargetTransform { - get => ref _Handle.AsRef(Schema.GetOffset(0x5D675A12B1497974)); + get => ref _Handle.AsRef(_TargetTransformOffset.Value); } + private static readonly Lazy _NumBonesInChainOffset = new(() => Schema.GetOffset(0x5D675A12CAD2EB3E), LazyThreadSafetyMode.None); + public ref int NumBonesInChain { - get => ref _Handle.AsRef(Schema.GetOffset(0x5D675A12CAD2EB3E)); + get => ref _Handle.AsRef(_NumBonesInChainOffset.Value); } + private static readonly Lazy _EffectorTargetOffset = new(() => Schema.GetOffset(0x5D675A128D86AF5C), LazyThreadSafetyMode.None); + public CNmTarget EffectorTarget { - get => new CNmTargetImpl(_Handle + Schema.GetOffset(0x5D675A128D86AF5C)); + get => new CNmTargetImpl(_Handle + _EffectorTargetOffset.Value); } + private static readonly Lazy _BlendModeOffset = new(() => Schema.GetOffset(0x5D675A128D5006AB), LazyThreadSafetyMode.None); + public ref NmIKBlendMode_t BlendMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x5D675A128D5006AB)); + get => ref _Handle.AsRef(_BlendModeOffset.Value); } + private static readonly Lazy _BlendWeightOffset = new(() => Schema.GetOffset(0x5D675A12E5D6B9CE), LazyThreadSafetyMode.None); + public ref float BlendWeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x5D675A12E5D6B9CE)); + get => ref _Handle.AsRef(_BlendWeightOffset.Value); } + private static readonly Lazy _IsTargetInWorldSpaceOffset = new(() => Schema.GetOffset(0x5D675A125F56E0C5), LazyThreadSafetyMode.None); + public ref bool IsTargetInWorldSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x5D675A125F56E0C5)); + get => ref _Handle.AsRef(_IsTargetInWorldSpaceOffset.Value); } + private static readonly Lazy _IsRunningFromDeserializedDataOffset = new(() => Schema.GetOffset(0x5D675A124791111D), LazyThreadSafetyMode.None); + public ref bool IsRunningFromDeserializedData { - get => ref _Handle.AsRef(Schema.GetOffset(0x5D675A124791111D)); + get => ref _Handle.AsRef(_IsRunningFromDeserializedDataOffset.Value); } + private static readonly Lazy _DebugEffectorBoneIDOffset = new(() => Schema.GetOffset(0x5D675A12A9F0F1F3), LazyThreadSafetyMode.None); + public ref CGlobalSymbol DebugEffectorBoneID { - get => ref _Handle.AsRef(Schema.GetOffset(0x5D675A12A9F0F1F3)); + get => ref _Handle.AsRef(_DebugEffectorBoneIDOffset.Value); } + private static readonly Lazy _ChainStartTransformMSOffset = new(() => Schema.GetOffset(0x5D675A12E1B47AFE), LazyThreadSafetyMode.None); + public ref CTransform ChainStartTransformMS { - get => ref _Handle.AsRef(Schema.GetOffset(0x5D675A12E1B47AFE)); + get => ref _Handle.AsRef(_ChainStartTransformMSOffset.Value); } + private static readonly Lazy _DebugRequestedTargetTransformMSOffset = new(() => Schema.GetOffset(0x5D675A12416A1F2F), LazyThreadSafetyMode.None); + public ref CTransform DebugRequestedTargetTransformMS { - get => ref _Handle.AsRef(Schema.GetOffset(0x5D675A12416A1F2F)); + get => ref _Handle.AsRef(_DebugRequestedTargetTransformMSOffset.Value); } + private static readonly Lazy _DebugTotalChainLengthOffset = new(() => Schema.GetOffset(0x5D675A125ED39D2F), LazyThreadSafetyMode.None); + public ref float DebugTotalChainLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x5D675A125ED39D2F)); + get => ref _Handle.AsRef(_DebugTotalChainLengthOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClipImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClipImpl.cs index 0d5fc80b2..37530aa35 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClipImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClipImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,53 +17,85 @@ internal partial class CNmClipImpl : SchemaClass, CNmClip { public CNmClipImpl(nint handle) : base(handle) { } + private static readonly Lazy _SkeletonOffset = new(() => Schema.GetOffset(0x3FC883BDE77F030E), LazyThreadSafetyMode.None); + public ref CStrongHandle Skeleton { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3FC883BDE77F030E)); + get => ref _Handle.AsRef>(_SkeletonOffset.Value); } + private static readonly Lazy _NumFramesOffset = new(() => Schema.GetOffset(0x3FC883BDF764C355), LazyThreadSafetyMode.None); + public ref uint NumFrames { - get => ref _Handle.AsRef(Schema.GetOffset(0x3FC883BDF764C355)); + get => ref _Handle.AsRef(_NumFramesOffset.Value); } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0x3FC883BDBC5E3BAB), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0x3FC883BDBC5E3BAB)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _CompressedPoseDataOffset = new(() => Schema.GetOffset(0x3FC883BDDD916D11), LazyThreadSafetyMode.None); + public ref CUtlBinaryBlock CompressedPoseData { - get => ref _Handle.AsRef(Schema.GetOffset(0x3FC883BDDD916D11)); + get => ref _Handle.AsRef(_CompressedPoseDataOffset.Value); } + private static readonly Lazy _TrackCompressionSettingsOffset = new(() => Schema.GetOffset(0x3FC883BD94A50263), LazyThreadSafetyMode.None); + public ref CUtlVector TrackCompressionSettings { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3FC883BD94A50263)); + get => ref _Handle.AsRef>(_TrackCompressionSettingsOffset.Value); } + private static readonly Lazy _CompressedPoseOffsetsOffset = new(() => Schema.GetOffset(0x3FC883BD4B1ECAF7), LazyThreadSafetyMode.None); + public ref CUtlVector CompressedPoseOffsets { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3FC883BD4B1ECAF7)); + get => ref _Handle.AsRef>(_CompressedPoseOffsetsOffset.Value); } + private static readonly Lazy _FloatCurveIDsOffset = new(() => Schema.GetOffset(0x3FC883BD11EF489E), LazyThreadSafetyMode.None); + public ref CUtlVector FloatCurveIDs { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3FC883BD11EF489E)); + get => ref _Handle.AsRef>(_FloatCurveIDsOffset.Value); } + private static readonly Lazy _FloatCurveDefsOffset = new(() => Schema.GetOffset(0x3FC883BDE3CCFA68), LazyThreadSafetyMode.None); + public ref CUtlVector FloatCurveDefs { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3FC883BDE3CCFA68)); + get => ref _Handle.AsRef>(_FloatCurveDefsOffset.Value); } + private static readonly Lazy _CompressedFloatCurveDataOffset = new(() => Schema.GetOffset(0x3FC883BD42C154B9), LazyThreadSafetyMode.None); + public ref CUtlVector CompressedFloatCurveData { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3FC883BD42C154B9)); + get => ref _Handle.AsRef>(_CompressedFloatCurveDataOffset.Value); } + private static readonly Lazy _CompressedFloatCurveOffsetsOffset = new(() => Schema.GetOffset(0x3FC883BD24AF623F), LazyThreadSafetyMode.None); + public ref CUtlVector CompressedFloatCurveOffsets { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3FC883BD24AF623F)); + get => ref _Handle.AsRef>(_CompressedFloatCurveOffsetsOffset.Value); } + private static readonly Lazy _SecondaryAnimationsOffset = new(() => Schema.GetOffset(0x3FC883BD9A6B439E), LazyThreadSafetyMode.None); + public SchemaUntypedField SecondaryAnimations { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x3FC883BD9A6B439E)); + get => new SchemaUntypedField(_Handle + _SecondaryAnimationsOffset.Value); } + private static readonly Lazy _SyncTrackOffset = new(() => Schema.GetOffset(0x3FC883BDB268BEE9), LazyThreadSafetyMode.None); + public CNmSyncTrack SyncTrack { - get => new CNmSyncTrackImpl(_Handle + Schema.GetOffset(0x3FC883BDB268BEE9)); + get => new CNmSyncTrackImpl(_Handle + _SyncTrackOffset.Value); } + private static readonly Lazy _RootMotionOffset = new(() => Schema.GetOffset(0x3FC883BD664A3F27), LazyThreadSafetyMode.None); + public CNmRootMotionData RootMotion { - get => new CNmRootMotionDataImpl(_Handle + Schema.GetOffset(0x3FC883BD664A3F27)); + get => new CNmRootMotionDataImpl(_Handle + _RootMotionOffset.Value); } + private static readonly Lazy _IsAdditiveOffset = new(() => Schema.GetOffset(0x3FC883BD4146EEF5), LazyThreadSafetyMode.None); + public ref bool IsAdditive { - get => ref _Handle.AsRef(Schema.GetOffset(0x3FC883BD4146EEF5)); + get => ref _Handle.AsRef(_IsAdditiveOffset.Value); } + private static readonly Lazy _ModelSpaceSamplingChainOffset = new(() => Schema.GetOffset(0x3FC883BD54666BDA), LazyThreadSafetyMode.None); + public ref CUtlVector ModelSpaceSamplingChain { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3FC883BD54666BDA)); + get => ref _Handle.AsRef>(_ModelSpaceSamplingChainOffset.Value); } + private static readonly Lazy _ModelSpaceBoneSamplingIndicesOffset = new(() => Schema.GetOffset(0x3FC883BD197B4A28), LazyThreadSafetyMode.None); + public ref CUtlVector ModelSpaceBoneSamplingIndices { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3FC883BD197B4A28)); + get => ref _Handle.AsRef>(_ModelSpaceBoneSamplingIndicesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClipNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClipNode__CDefinitionImpl.cs index 5fbbd50ff..d759a1c32 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClipNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClipNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CNmClipNode__CDefinitionImpl : CNmClipReferenceNode__CDef public CNmClipNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _PlayInReverseValueNodeIdxOffset = new(() => Schema.GetOffset(0x9BA44A131BE16D82), LazyThreadSafetyMode.None); + public ref short PlayInReverseValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BA44A131BE16D82)); + get => ref _Handle.AsRef(_PlayInReverseValueNodeIdxOffset.Value); } + private static readonly Lazy _ResetTimeValueNodeIdxOffset = new(() => Schema.GetOffset(0x9BA44A13698930E1), LazyThreadSafetyMode.None); + public ref short ResetTimeValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BA44A13698930E1)); + get => ref _Handle.AsRef(_ResetTimeValueNodeIdxOffset.Value); } + private static readonly Lazy _SpeedMultiplierOffset = new(() => Schema.GetOffset(0x9BA44A135D5B304D), LazyThreadSafetyMode.None); + public ref float SpeedMultiplier { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BA44A135D5B304D)); + get => ref _Handle.AsRef(_SpeedMultiplierOffset.Value); } + private static readonly Lazy _StartSyncEventOffsetOffset = new(() => Schema.GetOffset(0x9BA44A138A6F2A97), LazyThreadSafetyMode.None); + public ref int StartSyncEventOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BA44A138A6F2A97)); + get => ref _Handle.AsRef(_StartSyncEventOffsetOffset.Value); } + private static readonly Lazy _SampleRootMotionOffset = new(() => Schema.GetOffset(0x9BA44A139443A5E9), LazyThreadSafetyMode.None); + public ref bool SampleRootMotion { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BA44A139443A5E9)); + get => ref _Handle.AsRef(_SampleRootMotionOffset.Value); } + private static readonly Lazy _AllowLoopingOffset = new(() => Schema.GetOffset(0x9BA44A13FEB26D98), LazyThreadSafetyMode.None); + public ref bool AllowLooping { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BA44A13FEB26D98)); + get => ref _Handle.AsRef(_AllowLoopingOffset.Value); } + private static readonly Lazy _DataSlotIdxOffset = new(() => Schema.GetOffset(0x9BA44A13B1C15B68), LazyThreadSafetyMode.None); + public ref short DataSlotIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BA44A13B1C15B68)); + get => ref _Handle.AsRef(_DataSlotIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClipReferenceNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClipReferenceNode__CDefinitionImpl.cs index 6fe77d3ad..b7acef9e6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClipReferenceNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClipReferenceNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClipSelectorNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClipSelectorNode__CDefinitionImpl.cs index 6d653e1dc..e240ded2a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClipSelectorNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClipSelectorNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmClipSelectorNode__CDefinitionImpl : CNmClipReferenceNo public CNmClipSelectorNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _OptionNodeIndicesOffset = new(() => Schema.GetOffset(0xCF32AC18DA97B15D), LazyThreadSafetyMode.None); + public SchemaUntypedField OptionNodeIndices { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xCF32AC18DA97B15D)); + get => new SchemaUntypedField(_Handle + _OptionNodeIndicesOffset.Value); } + private static readonly Lazy _ConditionNodeIndicesOffset = new(() => Schema.GetOffset(0xCF32AC184A144D0F), LazyThreadSafetyMode.None); + public SchemaUntypedField ConditionNodeIndices { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xCF32AC184A144D0F)); + get => new SchemaUntypedField(_Handle + _ConditionNodeIndicesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClip__ModelSpaceSamplingChainLink_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClip__ModelSpaceSamplingChainLink_tImpl.cs index 133a1e267..d4d0ae777 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClip__ModelSpaceSamplingChainLink_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmClip__ModelSpaceSamplingChainLink_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmClip__ModelSpaceSamplingChainLink_tImpl : SchemaClass, public CNmClip__ModelSpaceSamplingChainLink_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneIdxOffset = new(() => Schema.GetOffset(0xAFAB55410E26A9C2), LazyThreadSafetyMode.None); + public ref int BoneIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xAFAB55410E26A9C2)); + get => ref _Handle.AsRef(_BoneIdxOffset.Value); } + private static readonly Lazy _ParentBoneIdxOffset = new(() => Schema.GetOffset(0xAFAB554185076542), LazyThreadSafetyMode.None); + public ref int ParentBoneIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xAFAB554185076542)); + get => ref _Handle.AsRef(_ParentBoneIdxOffset.Value); } + private static readonly Lazy _ParentChainLinkIdxOffset = new(() => Schema.GetOffset(0xAFAB5541DB4E7C5D), LazyThreadSafetyMode.None); + public ref int ParentChainLinkIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xAFAB5541DB4E7C5D)); + get => ref _Handle.AsRef(_ParentChainLinkIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstBoolNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstBoolNode__CDefinitionImpl.cs index 71a457068..bb3cc372e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstBoolNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstBoolNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmConstBoolNode__CDefinitionImpl : CNmBoolValueNode__CDe public CNmConstBoolNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xDEAA315605AAB4AA), LazyThreadSafetyMode.None); + public ref bool Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xDEAA315605AAB4AA)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstFloatNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstFloatNode__CDefinitionImpl.cs index eb32a8496..216b13454 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstFloatNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstFloatNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmConstFloatNode__CDefinitionImpl : CNmFloatValueNode__C public CNmConstFloatNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xCB1D2D708DFCB984), LazyThreadSafetyMode.None); + public ref float Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xCB1D2D708DFCB984)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstIDNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstIDNode__CDefinitionImpl.cs index ff7db4479..0da648838 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstIDNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstIDNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmConstIDNode__CDefinitionImpl : CNmIDValueNode__CDefini public CNmConstIDNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xF68AB5F96B99AEEA), LazyThreadSafetyMode.None); + public ref CGlobalSymbol Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xF68AB5F96B99AEEA)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstTargetNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstTargetNode__CDefinitionImpl.cs index c0f28da99..d82d1a278 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstTargetNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstTargetNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmConstTargetNode__CDefinitionImpl : CNmTargetValueNode_ public CNmConstTargetNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xC54E1DF56B99AEEA), LazyThreadSafetyMode.None); + public CNmTarget Value { - get => new CNmTargetImpl(_Handle + Schema.GetOffset(0xC54E1DF56B99AEEA)); + get => new CNmTargetImpl(_Handle + _ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstVectorNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstVectorNode__CDefinitionImpl.cs index 5480ef36b..e574761cf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstVectorNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmConstVectorNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmConstVectorNode__CDefinitionImpl : CNmVectorValueNode_ public CNmConstVectorNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x78163C736B99AEEA), LazyThreadSafetyMode.None); + public ref Vector Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x78163C736B99AEEA)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterBoolNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterBoolNode__CDefinitionImpl.cs index f48946c6e..52a7627f2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterBoolNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterBoolNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterFloatNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterFloatNode__CDefinitionImpl.cs index a038eb8bf..e789ecc08 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterFloatNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterFloatNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterIDNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterIDNode__CDefinitionImpl.cs index 993545aa4..89f64cefd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterIDNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterIDNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterTargetNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterTargetNode__CDefinitionImpl.cs index d29296b5f..4fd5dcc31 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterTargetNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterTargetNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterVectorNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterVectorNode__CDefinitionImpl.cs index 871344658..4fe232b33 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterVectorNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmControlParameterVectorNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCurrentSyncEventIDNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCurrentSyncEventIDNode__CDefinitionImpl.cs index 406895e89..b0c92d35e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCurrentSyncEventIDNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCurrentSyncEventIDNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmCurrentSyncEventIDNode__CDefinitionImpl : CNmIDValueNo public CNmCurrentSyncEventIDNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceStateNodeIdxOffset = new(() => Schema.GetOffset(0x792E5F1463F0228C), LazyThreadSafetyMode.None); + public ref short SourceStateNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x792E5F1463F0228C)); + get => ref _Handle.AsRef(_SourceStateNodeIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCurrentSyncEventNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCurrentSyncEventNode__CDefinitionImpl.cs index eaec461a7..bc748e9ba 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCurrentSyncEventNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmCurrentSyncEventNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmCurrentSyncEventNode__CDefinitionImpl : CNmFloatValueN public CNmCurrentSyncEventNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceStateNodeIdxOffset = new(() => Schema.GetOffset(0x1F6A7BCB63F0228C), LazyThreadSafetyMode.None); + public ref short SourceStateNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x1F6A7BCB63F0228C)); + get => ref _Handle.AsRef(_SourceStateNodeIdxOffset.Value); } + private static readonly Lazy _InfoTypeOffset = new(() => Schema.GetOffset(0x1F6A7BCBCE6BA20D), LazyThreadSafetyMode.None); + public ref CNmCurrentSyncEventNode__InfoType_t InfoType { - get => ref _Handle.AsRef(Schema.GetOffset(0x1F6A7BCBCE6BA20D)); + get => ref _Handle.AsRef(_InfoTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmDurationScaleNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmDurationScaleNode__CDefinitionImpl.cs index fe9599690..309b33cee 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmDurationScaleNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmDurationScaleNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEntityAttributeEventBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEntityAttributeEventBaseImpl.cs index 43d3fcd81..0be856faf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEntityAttributeEventBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEntityAttributeEventBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CNmEntityAttributeEventBaseImpl : CNmEventImpl, CNmEntity public CNmEntityAttributeEventBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _AttributeNameOffset = new(() => Schema.GetOffset(0x92D29AE99168F02C), LazyThreadSafetyMode.None); + public string AttributeName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x92D29AE99168F02C)); + var ptr = _Handle.Read(_AttributeNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x92D29AE99168F02C, value); + set => Schema.SetString(_Handle, _AttributeNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEntityAttributeFloatEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEntityAttributeFloatEventImpl.cs index 8936d5c54..2c19e8d5e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEntityAttributeFloatEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEntityAttributeFloatEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmEntityAttributeFloatEventImpl : CNmEntityAttributeEven public CNmEntityAttributeFloatEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _FloatValueOffset = new(() => Schema.GetOffset(0x3ADB66C2ADBE62AA), LazyThreadSafetyMode.None); + public SchemaUntypedField FloatValue { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x3ADB66C2ADBE62AA)); + get => new SchemaUntypedField(_Handle + _FloatValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEntityAttributeIntEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEntityAttributeIntEventImpl.cs index 37bd9cb9c..c67ef38bf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEntityAttributeIntEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEntityAttributeIntEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmEntityAttributeIntEventImpl : CNmEntityAttributeEventB public CNmEntityAttributeIntEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _IntValueOffset = new(() => Schema.GetOffset(0x22C4DC17BF67A7DB), LazyThreadSafetyMode.None); + public ref int IntValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x22C4DC17BF67A7DB)); + get => ref _Handle.AsRef(_IntValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerAttributesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerAttributesImpl.cs index 15d5ce156..6e7d9f16b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerAttributesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerAttributesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerImpl.cs index bd02f3866..9fac52d6c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerLegacyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerLegacyImpl.cs index 45dcf0ced..d48f74099 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerLegacyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerLegacyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerParticleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerParticleImpl.cs index ee3a73b81..82c78ebbf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerParticleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerParticleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerSoundImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerSoundImpl.cs index 0791270e8..39d4580c9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerSoundImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventConsumerSoundImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventImpl.cs index 0720d35b8..0941e4e60 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CNmEventImpl : SchemaClass, CNmEvent { public CNmEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartTimeSecondsOffset = new(() => Schema.GetOffset(0xF9871009C1FCF499), LazyThreadSafetyMode.None); + public ref float StartTimeSeconds { - get => ref _Handle.AsRef(Schema.GetOffset(0xF9871009C1FCF499)); + get => ref _Handle.AsRef(_StartTimeSecondsOffset.Value); } + private static readonly Lazy _DurationSecondsOffset = new(() => Schema.GetOffset(0xF9871009917797C0), LazyThreadSafetyMode.None); + public ref float DurationSeconds { - get => ref _Handle.AsRef(Schema.GetOffset(0xF9871009917797C0)); + get => ref _Handle.AsRef(_DurationSecondsOffset.Value); } + private static readonly Lazy _SyncIDOffset = new(() => Schema.GetOffset(0xF987100915636837), LazyThreadSafetyMode.None); + public ref CGlobalSymbol SyncID { - get => ref _Handle.AsRef(Schema.GetOffset(0xF987100915636837)); + get => ref _Handle.AsRef(_SyncIDOffset.Value); } + private static readonly Lazy _ClientOnlyOffset = new(() => Schema.GetOffset(0xF9871009B39BA128), LazyThreadSafetyMode.None); + public ref bool ClientOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0xF9871009B39BA128)); + get => ref _Handle.AsRef(_ClientOnlyOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmExternalGraphNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmExternalGraphNode__CDefinitionImpl.cs index 533b7dd6b..14991eb97 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmExternalGraphNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmExternalGraphNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFixedWeightBoneMaskNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFixedWeightBoneMaskNode__CDefinitionImpl.cs index 3aa5743f3..82724d5a1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFixedWeightBoneMaskNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFixedWeightBoneMaskNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmFixedWeightBoneMaskNode__CDefinitionImpl : CNmBoneMask public CNmFixedWeightBoneMaskNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneWeightOffset = new(() => Schema.GetOffset(0x26E0BD7363DE76E9), LazyThreadSafetyMode.None); + public ref float BoneWeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x26E0BD7363DE76E9)); + get => ref _Handle.AsRef(_BoneWeightOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatAngleMathNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatAngleMathNode__CDefinitionImpl.cs index beae8f4de..03e9dfb24 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatAngleMathNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatAngleMathNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmFloatAngleMathNode__CDefinitionImpl : CNmFloatValueNod public CNmFloatAngleMathNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x464A924095E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x464A924095E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _OperationOffset = new(() => Schema.GetOffset(0x464A9240AEA59026), LazyThreadSafetyMode.None); + public ref CNmFloatAngleMathNode__Operation_t Operation { - get => ref _Handle.AsRef(Schema.GetOffset(0x464A9240AEA59026)); + get => ref _Handle.AsRef(_OperationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatClampNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatClampNode__CDefinitionImpl.cs index 460ff8684..f7656f32b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatClampNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatClampNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmFloatClampNode__CDefinitionImpl : CNmFloatValueNode__C public CNmFloatClampNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x77C3AAE295E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x77C3AAE295E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _ClampRangeOffset = new(() => Schema.GetOffset(0x77C3AAE2FED5C4A1), LazyThreadSafetyMode.None); + public SchemaUntypedField ClampRange { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x77C3AAE2FED5C4A1)); + get => new SchemaUntypedField(_Handle + _ClampRangeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatComparisonNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatComparisonNode__CDefinitionImpl.cs index 4fd0ca903..6b3920a98 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatComparisonNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatComparisonNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CNmFloatComparisonNode__CDefinitionImpl : CNmBoolValueNod public CNmFloatComparisonNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x48A96E9A95E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x48A96E9A95E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _ComparandValueNodeIdxOffset = new(() => Schema.GetOffset(0x48A96E9AF7CFFAF6), LazyThreadSafetyMode.None); + public ref short ComparandValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x48A96E9AF7CFFAF6)); + get => ref _Handle.AsRef(_ComparandValueNodeIdxOffset.Value); } + private static readonly Lazy _ComparisonOffset = new(() => Schema.GetOffset(0x48A96E9A897F8DE4), LazyThreadSafetyMode.None); + public ref CNmFloatComparisonNode__Comparison_t Comparison { - get => ref _Handle.AsRef(Schema.GetOffset(0x48A96E9A897F8DE4)); + get => ref _Handle.AsRef(_ComparisonOffset.Value); } + private static readonly Lazy _EpsilonOffset = new(() => Schema.GetOffset(0x48A96E9A34090A67), LazyThreadSafetyMode.None); + public ref float Epsilon { - get => ref _Handle.AsRef(Schema.GetOffset(0x48A96E9A34090A67)); + get => ref _Handle.AsRef(_EpsilonOffset.Value); } + private static readonly Lazy _ComparisonValueOffset = new(() => Schema.GetOffset(0x48A96E9A4C176B7F), LazyThreadSafetyMode.None); + public ref float ComparisonValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x48A96E9A4C176B7F)); + get => ref _Handle.AsRef(_ComparisonValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatCurveEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatCurveEventImpl.cs index 5d6272b65..492bd7b77 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatCurveEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatCurveEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmFloatCurveEventImpl : CNmEventImpl, CNmFloatCurveEvent public CNmFloatCurveEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _IDOffset = new(() => Schema.GetOffset(0x79BEBEA95066900), LazyThreadSafetyMode.None); + public ref CGlobalSymbol ID { - get => ref _Handle.AsRef(Schema.GetOffset(0x79BEBEA95066900)); + get => ref _Handle.AsRef(_IDOffset.Value); } + private static readonly Lazy _CurveOffset = new(() => Schema.GetOffset(0x79BEBEABFFA0B34), LazyThreadSafetyMode.None); + public SchemaUntypedField Curve { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x79BEBEABFFA0B34)); + get => new SchemaUntypedField(_Handle + _CurveOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatCurveEventNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatCurveEventNode__CDefinitionImpl.cs index 7516f0f0f..dda9c473c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatCurveEventNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatCurveEventNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CNmFloatCurveEventNode__CDefinitionImpl : CNmFloatValueNo public CNmFloatCurveEventNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _EventIDOffset = new(() => Schema.GetOffset(0x4512F5A69D798A72), LazyThreadSafetyMode.None); + public ref CGlobalSymbol EventID { - get => ref _Handle.AsRef(Schema.GetOffset(0x4512F5A69D798A72)); + get => ref _Handle.AsRef(_EventIDOffset.Value); } + private static readonly Lazy _DefaultNodeIdxOffset = new(() => Schema.GetOffset(0x4512F5A6C14C9521), LazyThreadSafetyMode.None); + public ref short DefaultNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x4512F5A6C14C9521)); + get => ref _Handle.AsRef(_DefaultNodeIdxOffset.Value); } + private static readonly Lazy _DefaultValueOffset = new(() => Schema.GetOffset(0x4512F5A6700AB429), LazyThreadSafetyMode.None); + public ref float DefaultValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x4512F5A6700AB429)); + get => ref _Handle.AsRef(_DefaultValueOffset.Value); } + private static readonly Lazy _EventConditionRulesOffset = new(() => Schema.GetOffset(0x4512F5A6A904315F), LazyThreadSafetyMode.None); + public CNmBitFlags EventConditionRules { - get => new CNmBitFlagsImpl(_Handle + Schema.GetOffset(0x4512F5A6A904315F)); + get => new CNmBitFlagsImpl(_Handle + _EventConditionRulesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatCurveNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatCurveNode__CDefinitionImpl.cs index 0a774fdd6..e48ad749f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatCurveNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatCurveNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmFloatCurveNode__CDefinitionImpl : CNmFloatValueNode__C public CNmFloatCurveNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x34D6839A95E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x34D6839A95E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _CurveOffset = new(() => Schema.GetOffset(0x34D6839ABFFA0B34), LazyThreadSafetyMode.None); + public SchemaUntypedField Curve { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x34D6839ABFFA0B34)); + get => new SchemaUntypedField(_Handle + _CurveOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatEaseNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatEaseNode__CDefinitionImpl.cs index 6432c2d9a..8fdf3807f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatEaseNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatEaseNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CNmFloatEaseNode__CDefinitionImpl : CNmFloatValueNode__CD public CNmFloatEaseNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _EaseTimeOffset = new(() => Schema.GetOffset(0x9D7103D0A54FCC), LazyThreadSafetyMode.None); + public ref float EaseTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x9D7103D0A54FCC)); + get => ref _Handle.AsRef(_EaseTimeOffset.Value); } + private static readonly Lazy _StartValueOffset = new(() => Schema.GetOffset(0x9D710351C82C2A), LazyThreadSafetyMode.None); + public ref float StartValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x9D710351C82C2A)); + get => ref _Handle.AsRef(_StartValueOffset.Value); } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x9D710395E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x9D710395E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _EasingOpOffset = new(() => Schema.GetOffset(0x9D7103CF457EAF), LazyThreadSafetyMode.None); + public ref NmEasingOperation_t EasingOp { - get => ref _Handle.AsRef(Schema.GetOffset(0x9D7103CF457EAF)); + get => ref _Handle.AsRef(_EasingOpOffset.Value); } + private static readonly Lazy _UseStartValueOffset = new(() => Schema.GetOffset(0x9D710306DE6089), LazyThreadSafetyMode.None); + public ref bool UseStartValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x9D710306DE6089)); + get => ref _Handle.AsRef(_UseStartValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatMathNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatMathNode__CDefinitionImpl.cs index 2c4cce03f..3119f9121 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatMathNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatMathNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CNmFloatMathNode__CDefinitionImpl : CNmFloatValueNode__CD public CNmFloatMathNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxAOffset = new(() => Schema.GetOffset(0x8A1F4F076332ED92), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdxA { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A1F4F076332ED92)); + get => ref _Handle.AsRef(_InputValueNodeIdxAOffset.Value); } + private static readonly Lazy _InputValueNodeIdxBOffset = new(() => Schema.GetOffset(0x8A1F4F076232EBFF), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdxB { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A1F4F076232EBFF)); + get => ref _Handle.AsRef(_InputValueNodeIdxBOffset.Value); } + private static readonly Lazy _ReturnAbsoluteResultOffset = new(() => Schema.GetOffset(0x8A1F4F07065EA6EB), LazyThreadSafetyMode.None); + public ref bool ReturnAbsoluteResult { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A1F4F07065EA6EB)); + get => ref _Handle.AsRef(_ReturnAbsoluteResultOffset.Value); } + private static readonly Lazy _ReturnNegatedResultOffset = new(() => Schema.GetOffset(0x8A1F4F07535A6CA2), LazyThreadSafetyMode.None); + public ref bool ReturnNegatedResult { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A1F4F07535A6CA2)); + get => ref _Handle.AsRef(_ReturnNegatedResultOffset.Value); } + private static readonly Lazy _OperatorOffset = new(() => Schema.GetOffset(0x8A1F4F078ABE049D), LazyThreadSafetyMode.None); + public ref CNmFloatMathNode__Operator_t Operator { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A1F4F078ABE049D)); + get => ref _Handle.AsRef(_OperatorOffset.Value); } + private static readonly Lazy _ValueBOffset = new(() => Schema.GetOffset(0x8A1F4F074AD872B2), LazyThreadSafetyMode.None); + public ref float ValueB { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A1F4F074AD872B2)); + get => ref _Handle.AsRef(_ValueBOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatRangeComparisonNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatRangeComparisonNode__CDefinitionImpl.cs index 7f66b3ede..43107d3d1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatRangeComparisonNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatRangeComparisonNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmFloatRangeComparisonNode__CDefinitionImpl : CNmBoolVal public CNmFloatRangeComparisonNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _RangeOffset = new(() => Schema.GetOffset(0x6F364CB3D639CF2), LazyThreadSafetyMode.None); + public SchemaUntypedField Range { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x6F364CB3D639CF2)); + get => new SchemaUntypedField(_Handle + _RangeOffset.Value); } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x6F364CB95E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F364CB95E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _IsInclusiveCheckOffset = new(() => Schema.GetOffset(0x6F364CBA95FA7C3), LazyThreadSafetyMode.None); + public ref bool IsInclusiveCheck { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F364CBA95FA7C3)); + get => ref _Handle.AsRef(_IsInclusiveCheckOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatRemapNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatRemapNode__CDefinitionImpl.cs index df95ee395..29b845423 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatRemapNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatRemapNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmFloatRemapNode__CDefinitionImpl : CNmFloatValueNode__C public CNmFloatRemapNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x5169293495E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x5169293495E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _InputRangeOffset = new(() => Schema.GetOffset(0x51692934096AEBF0), LazyThreadSafetyMode.None); + public CNmFloatRemapNode__RemapRange_t InputRange { - get => new CNmFloatRemapNode__RemapRange_tImpl(_Handle + Schema.GetOffset(0x51692934096AEBF0)); + get => new CNmFloatRemapNode__RemapRange_tImpl(_Handle + _InputRangeOffset.Value); } + private static readonly Lazy _OutputRangeOffset = new(() => Schema.GetOffset(0x5169293437E0CA29), LazyThreadSafetyMode.None); + public CNmFloatRemapNode__RemapRange_t OutputRange { - get => new CNmFloatRemapNode__RemapRange_tImpl(_Handle + Schema.GetOffset(0x5169293437E0CA29)); + get => new CNmFloatRemapNode__RemapRange_tImpl(_Handle + _OutputRangeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatRemapNode__RemapRange_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatRemapNode__RemapRange_tImpl.cs index c7a0a28b6..7c1041858 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatRemapNode__RemapRange_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatRemapNode__RemapRange_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmFloatRemapNode__RemapRange_tImpl : SchemaClass, CNmFlo public CNmFloatRemapNode__RemapRange_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BeginOffset = new(() => Schema.GetOffset(0x35C6A3517504C130), LazyThreadSafetyMode.None); + public ref float Begin { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C6A3517504C130)); + get => ref _Handle.AsRef(_BeginOffset.Value); } + private static readonly Lazy _EndOffset = new(() => Schema.GetOffset(0x35C6A3519616A27C), LazyThreadSafetyMode.None); + public ref float End { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C6A3519616A27C)); + get => ref _Handle.AsRef(_EndOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatSelectorNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatSelectorNode__CDefinitionImpl.cs index de7c431be..b1bf6f04e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatSelectorNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatSelectorNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CNmFloatSelectorNode__CDefinitionImpl : CNmFloatValueNode public CNmFloatSelectorNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ConditionNodeIndicesOffset = new(() => Schema.GetOffset(0xA387F8324A144D0F), LazyThreadSafetyMode.None); + public SchemaUntypedField ConditionNodeIndices { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA387F8324A144D0F)); + get => new SchemaUntypedField(_Handle + _ConditionNodeIndicesOffset.Value); } + private static readonly Lazy _ValuesOffset = new(() => Schema.GetOffset(0xA387F832FBEDDADB), LazyThreadSafetyMode.None); + public SchemaUntypedField Values { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA387F832FBEDDADB)); + get => new SchemaUntypedField(_Handle + _ValuesOffset.Value); } + private static readonly Lazy _DefaultValueOffset = new(() => Schema.GetOffset(0xA387F832700AB429), LazyThreadSafetyMode.None); + public ref float DefaultValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xA387F832700AB429)); + get => ref _Handle.AsRef(_DefaultValueOffset.Value); } + private static readonly Lazy _EaseTimeOffset = new(() => Schema.GetOffset(0xA387F832D0A54FCC), LazyThreadSafetyMode.None); + public ref float EaseTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xA387F832D0A54FCC)); + get => ref _Handle.AsRef(_EaseTimeOffset.Value); } + private static readonly Lazy _EasingOpOffset = new(() => Schema.GetOffset(0xA387F832CF457EAF), LazyThreadSafetyMode.None); + public ref NmEasingOperation_t EasingOp { - get => ref _Handle.AsRef(Schema.GetOffset(0xA387F832CF457EAF)); + get => ref _Handle.AsRef(_EasingOpOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatSwitchNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatSwitchNode__CDefinitionImpl.cs index 28bc899c6..6f4c3afdc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatSwitchNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatSwitchNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CNmFloatSwitchNode__CDefinitionImpl : CNmFloatValueNode__ public CNmFloatSwitchNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SwitchValueNodeIdxOffset = new(() => Schema.GetOffset(0x6D97CCCD7FBD7561), LazyThreadSafetyMode.None); + public ref short SwitchValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x6D97CCCD7FBD7561)); + get => ref _Handle.AsRef(_SwitchValueNodeIdxOffset.Value); } + private static readonly Lazy _TrueValueNodeIdxOffset = new(() => Schema.GetOffset(0x6D97CCCDFDE74365), LazyThreadSafetyMode.None); + public ref short TrueValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x6D97CCCDFDE74365)); + get => ref _Handle.AsRef(_TrueValueNodeIdxOffset.Value); } + private static readonly Lazy _FalseValueNodeIdxOffset = new(() => Schema.GetOffset(0x6D97CCCD8DBA2C78), LazyThreadSafetyMode.None); + public ref short FalseValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x6D97CCCD8DBA2C78)); + get => ref _Handle.AsRef(_FalseValueNodeIdxOffset.Value); } + private static readonly Lazy _FalseValueOffset = new(() => Schema.GetOffset(0x6D97CCCD5C87DE2F), LazyThreadSafetyMode.None); + public ref float FalseValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x6D97CCCD5C87DE2F)); + get => ref _Handle.AsRef(_FalseValueOffset.Value); } + private static readonly Lazy _TrueValueOffset = new(() => Schema.GetOffset(0x6D97CCCD28CBA8A0), LazyThreadSafetyMode.None); + public ref float TrueValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x6D97CCCD28CBA8A0)); + get => ref _Handle.AsRef(_TrueValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatValueNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatValueNode__CDefinitionImpl.cs index 9651cf1a1..1596c042b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatValueNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFloatValueNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFollowBoneNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFollowBoneNode__CDefinitionImpl.cs index 88016b106..f1a3abc0c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFollowBoneNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFollowBoneNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CNmFollowBoneNode__CDefinitionImpl : CNmPassthroughNode__ public CNmFollowBoneNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneOffset = new(() => Schema.GetOffset(0x51BD725C8020F02F), LazyThreadSafetyMode.None); + public ref CGlobalSymbol Bone { - get => ref _Handle.AsRef(Schema.GetOffset(0x51BD725C8020F02F)); + get => ref _Handle.AsRef(_BoneOffset.Value); } + private static readonly Lazy _FollowTargetBoneOffset = new(() => Schema.GetOffset(0x51BD725C38216D8B), LazyThreadSafetyMode.None); + public ref CGlobalSymbol FollowTargetBone { - get => ref _Handle.AsRef(Schema.GetOffset(0x51BD725C38216D8B)); + get => ref _Handle.AsRef(_FollowTargetBoneOffset.Value); } + private static readonly Lazy _EnabledNodeIdxOffset = new(() => Schema.GetOffset(0x51BD725CF7CDF5E9), LazyThreadSafetyMode.None); + public ref short EnabledNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x51BD725CF7CDF5E9)); + get => ref _Handle.AsRef(_EnabledNodeIdxOffset.Value); } + private static readonly Lazy _ModeOffset = new(() => Schema.GetOffset(0x51BD725C90FD5BB2), LazyThreadSafetyMode.None); + public ref NmFollowBoneMode_t Mode { - get => ref _Handle.AsRef(Schema.GetOffset(0x51BD725C90FD5BB2)); + get => ref _Handle.AsRef(_ModeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFollowBoneTaskImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFollowBoneTaskImpl.cs index fea69c9b7..be9e745d5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFollowBoneTaskImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFollowBoneTaskImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFootEventConditionNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFootEventConditionNode__CDefinitionImpl.cs index e2f0f960c..03f161e12 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFootEventConditionNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFootEventConditionNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmFootEventConditionNode__CDefinitionImpl : CNmBoolValue public CNmFootEventConditionNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceStateNodeIdxOffset = new(() => Schema.GetOffset(0xA837BCFE63F0228C), LazyThreadSafetyMode.None); + public ref short SourceStateNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xA837BCFE63F0228C)); + get => ref _Handle.AsRef(_SourceStateNodeIdxOffset.Value); } + private static readonly Lazy _PhaseConditionOffset = new(() => Schema.GetOffset(0xA837BCFE79D4BD7D), LazyThreadSafetyMode.None); + public ref NmFootPhaseCondition_t PhaseCondition { - get => ref _Handle.AsRef(Schema.GetOffset(0xA837BCFE79D4BD7D)); + get => ref _Handle.AsRef(_PhaseConditionOffset.Value); } + private static readonly Lazy _EventConditionRulesOffset = new(() => Schema.GetOffset(0xA837BCFEA904315F), LazyThreadSafetyMode.None); + public CNmBitFlags EventConditionRules { - get => new CNmBitFlagsImpl(_Handle + Schema.GetOffset(0xA837BCFEA904315F)); + get => new CNmBitFlagsImpl(_Handle + _EventConditionRulesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFootEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFootEventImpl.cs index b4e78d58f..4629b1dcf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFootEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFootEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmFootEventImpl : CNmEventImpl, CNmFootEvent { public CNmFootEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _PhaseOffset = new(() => Schema.GetOffset(0x1F9E5CE14846D318), LazyThreadSafetyMode.None); + public ref NmFootPhase_t Phase { - get => ref _Handle.AsRef(Schema.GetOffset(0x1F9E5CE14846D318)); + get => ref _Handle.AsRef(_PhaseOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFootstepEventIDNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFootstepEventIDNode__CDefinitionImpl.cs index bd65ad269..43e5ba0d8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFootstepEventIDNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFootstepEventIDNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmFootstepEventIDNode__CDefinitionImpl : CNmIDValueNode_ public CNmFootstepEventIDNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceStateNodeIdxOffset = new(() => Schema.GetOffset(0x2CDDA43263F0228C), LazyThreadSafetyMode.None); + public ref short SourceStateNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x2CDDA43263F0228C)); + get => ref _Handle.AsRef(_SourceStateNodeIdxOffset.Value); } + private static readonly Lazy _EventConditionRulesOffset = new(() => Schema.GetOffset(0x2CDDA432A904315F), LazyThreadSafetyMode.None); + public CNmBitFlags EventConditionRules { - get => new CNmBitFlagsImpl(_Handle + Schema.GetOffset(0x2CDDA432A904315F)); + get => new CNmBitFlagsImpl(_Handle + _EventConditionRulesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFootstepEventPercentageThroughNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFootstepEventPercentageThroughNode__CDefinitionImpl.cs index 061d85ac0..6bba193cc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFootstepEventPercentageThroughNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFootstepEventPercentageThroughNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmFootstepEventPercentageThroughNode__CDefinitionImpl : public CNmFootstepEventPercentageThroughNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceStateNodeIdxOffset = new(() => Schema.GetOffset(0x998F83E463F0228C), LazyThreadSafetyMode.None); + public ref short SourceStateNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x998F83E463F0228C)); + get => ref _Handle.AsRef(_SourceStateNodeIdxOffset.Value); } + private static readonly Lazy _PhaseConditionOffset = new(() => Schema.GetOffset(0x998F83E479D4BD7D), LazyThreadSafetyMode.None); + public ref NmFootPhaseCondition_t PhaseCondition { - get => ref _Handle.AsRef(Schema.GetOffset(0x998F83E479D4BD7D)); + get => ref _Handle.AsRef(_PhaseConditionOffset.Value); } + private static readonly Lazy _EventConditionRulesOffset = new(() => Schema.GetOffset(0x998F83E4A904315F), LazyThreadSafetyMode.None); + public CNmBitFlags EventConditionRules { - get => new CNmBitFlagsImpl(_Handle + Schema.GetOffset(0x998F83E4A904315F)); + get => new CNmBitFlagsImpl(_Handle + _EventConditionRulesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFrameSnapEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFrameSnapEventImpl.cs index d1af3491a..bb85758d3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFrameSnapEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmFrameSnapEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmFrameSnapEventImpl : CNmEventImpl, CNmFrameSnapEvent { public CNmFrameSnapEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _FrameSnapModeOffset = new(() => Schema.GetOffset(0x948CA66C6C68AC59), LazyThreadSafetyMode.None); + public ref NmFrameSnapEventMode_t FrameSnapMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x948CA66C6C68AC59)); + get => ref _Handle.AsRef(_FrameSnapModeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphDefinitionImpl.cs index b3209701e..f15656f5b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class CNmGraphDefinitionImpl : SchemaClass, CNmGraphDefinition public CNmGraphDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _VariationIDOffset = new(() => Schema.GetOffset(0xE028E08C8B90A5E3), LazyThreadSafetyMode.None); + public ref CGlobalSymbol VariationID { - get => ref _Handle.AsRef(Schema.GetOffset(0xE028E08C8B90A5E3)); + get => ref _Handle.AsRef(_VariationIDOffset.Value); } + private static readonly Lazy _SkeletonOffset = new(() => Schema.GetOffset(0xE028E08CE77F030E), LazyThreadSafetyMode.None); + public ref CStrongHandle Skeleton { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE028E08CE77F030E)); + get => ref _Handle.AsRef>(_SkeletonOffset.Value); } + private static readonly Lazy _PersistentNodeIndicesOffset = new(() => Schema.GetOffset(0xE028E08C90896209), LazyThreadSafetyMode.None); + public ref CUtlVector PersistentNodeIndices { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE028E08C90896209)); + get => ref _Handle.AsRef>(_PersistentNodeIndicesOffset.Value); } + private static readonly Lazy _RootNodeIdxOffset = new(() => Schema.GetOffset(0xE028E08C25EE94C4), LazyThreadSafetyMode.None); + public ref short RootNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xE028E08C25EE94C4)); + get => ref _Handle.AsRef(_RootNodeIdxOffset.Value); } + private static readonly Lazy _ControlParameterIDsOffset = new(() => Schema.GetOffset(0xE028E08C500E5F9D), LazyThreadSafetyMode.None); + public ref CUtlVector ControlParameterIDs { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE028E08C500E5F9D)); + get => ref _Handle.AsRef>(_ControlParameterIDsOffset.Value); } + private static readonly Lazy _VirtualParameterIDsOffset = new(() => Schema.GetOffset(0xE028E08CB54BB9E7), LazyThreadSafetyMode.None); + public ref CUtlVector VirtualParameterIDs { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE028E08CB54BB9E7)); + get => ref _Handle.AsRef>(_VirtualParameterIDsOffset.Value); } + private static readonly Lazy _VirtualParameterNodeIndicesOffset = new(() => Schema.GetOffset(0xE028E08C1A18B610), LazyThreadSafetyMode.None); + public ref CUtlVector VirtualParameterNodeIndices { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE028E08C1A18B610)); + get => ref _Handle.AsRef>(_VirtualParameterNodeIndicesOffset.Value); } + private static readonly Lazy _ReferencedGraphSlotsOffset = new(() => Schema.GetOffset(0xE028E08C6244F6FF), LazyThreadSafetyMode.None); + public ref CUtlVector ReferencedGraphSlots { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE028E08C6244F6FF)); + get => ref _Handle.AsRef>(_ReferencedGraphSlotsOffset.Value); } + private static readonly Lazy _ExternalGraphSlotsOffset = new(() => Schema.GetOffset(0xE028E08CECBCD94F), LazyThreadSafetyMode.None); + public ref CUtlVector ExternalGraphSlots { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE028E08CECBCD94F)); + get => ref _Handle.AsRef>(_ExternalGraphSlotsOffset.Value); } + private static readonly Lazy _NodePathsOffset = new(() => Schema.GetOffset(0xE028E08CFF3E5A07), LazyThreadSafetyMode.None); + public ref CUtlVector NodePaths { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE028E08CFF3E5A07)); + get => ref _Handle.AsRef>(_NodePathsOffset.Value); } + private static readonly Lazy _ResourcesOffset = new(() => Schema.GetOffset(0xE028E08C227C3612), LazyThreadSafetyMode.None); + public ref CUtlVector Resources { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE028E08C227C3612)); + get => ref _Handle.AsRef>(_ResourcesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphDefinition__ExternalGraphSlot_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphDefinition__ExternalGraphSlot_tImpl.cs index 8408c5b88..6f04c269f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphDefinition__ExternalGraphSlot_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphDefinition__ExternalGraphSlot_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmGraphDefinition__ExternalGraphSlot_tImpl : SchemaClass public CNmGraphDefinition__ExternalGraphSlot_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NodeIdxOffset = new(() => Schema.GetOffset(0xFF128092124AB5CC), LazyThreadSafetyMode.None); + public ref short NodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xFF128092124AB5CC)); + get => ref _Handle.AsRef(_NodeIdxOffset.Value); } + private static readonly Lazy _SlotIDOffset = new(() => Schema.GetOffset(0xFF128092EA2BB724), LazyThreadSafetyMode.None); + public ref CGlobalSymbol SlotID { - get => ref _Handle.AsRef(Schema.GetOffset(0xFF128092EA2BB724)); + get => ref _Handle.AsRef(_SlotIDOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphDefinition__ReferencedGraphSlot_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphDefinition__ReferencedGraphSlot_tImpl.cs index 913cb8517..d26f6e404 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphDefinition__ReferencedGraphSlot_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphDefinition__ReferencedGraphSlot_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmGraphDefinition__ReferencedGraphSlot_tImpl : SchemaCla public CNmGraphDefinition__ReferencedGraphSlot_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NodeIdxOffset = new(() => Schema.GetOffset(0x33C2E12E124AB5CC), LazyThreadSafetyMode.None); + public ref short NodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x33C2E12E124AB5CC)); + get => ref _Handle.AsRef(_NodeIdxOffset.Value); } + private static readonly Lazy _DataSlotIdxOffset = new(() => Schema.GetOffset(0x33C2E12E7115A3B4), LazyThreadSafetyMode.None); + public ref short DataSlotIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x33C2E12E7115A3B4)); + get => ref _Handle.AsRef(_DataSlotIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphEventConditionNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphEventConditionNode__CDefinitionImpl.cs index 5726d8306..512673b59 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphEventConditionNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphEventConditionNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmGraphEventConditionNode__CDefinitionImpl : CNmBoolValu public CNmGraphEventConditionNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceStateNodeIdxOffset = new(() => Schema.GetOffset(0x8806734863F0228C), LazyThreadSafetyMode.None); + public ref short SourceStateNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x8806734863F0228C)); + get => ref _Handle.AsRef(_SourceStateNodeIdxOffset.Value); } + private static readonly Lazy _EventConditionRulesOffset = new(() => Schema.GetOffset(0x88067348A904315F), LazyThreadSafetyMode.None); + public CNmBitFlags EventConditionRules { - get => new CNmBitFlagsImpl(_Handle + Schema.GetOffset(0x88067348A904315F)); + get => new CNmBitFlagsImpl(_Handle + _EventConditionRulesOffset.Value); } + private static readonly Lazy _ConditionsOffset = new(() => Schema.GetOffset(0x88067348EDDF6757), LazyThreadSafetyMode.None); + public SchemaUntypedField Conditions { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x88067348EDDF6757)); + get => new SchemaUntypedField(_Handle + _ConditionsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphEventConditionNode__Condition_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphEventConditionNode__Condition_tImpl.cs index 3db2fe33e..f91617771 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphEventConditionNode__Condition_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphEventConditionNode__Condition_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmGraphEventConditionNode__Condition_tImpl : SchemaClass public CNmGraphEventConditionNode__Condition_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _EventIDOffset = new(() => Schema.GetOffset(0xA3252A829D798A72), LazyThreadSafetyMode.None); + public ref CGlobalSymbol EventID { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3252A829D798A72)); + get => ref _Handle.AsRef(_EventIDOffset.Value); } + private static readonly Lazy _EventTypeConditionOffset = new(() => Schema.GetOffset(0xA3252A829BED2960), LazyThreadSafetyMode.None); + public ref NmGraphEventTypeCondition_t EventTypeCondition { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3252A829BED2960)); + get => ref _Handle.AsRef(_EventTypeConditionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphNode__CDefinitionImpl.cs index 00bb00c97..51227bf83 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmGraphNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmGraphNode__CDefinitionImpl : SchemaClass, CNmGraphNode public CNmGraphNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _NodeIdxOffset = new(() => Schema.GetOffset(0x97FBD3EF124AB5CC), LazyThreadSafetyMode.None); + public ref short NodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x97FBD3EF124AB5CC)); + get => ref _Handle.AsRef(_NodeIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDComparisonNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDComparisonNode__CDefinitionImpl.cs index cb09e25c7..7e8f619e0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDComparisonNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDComparisonNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmIDComparisonNode__CDefinitionImpl : CNmBoolValueNode__ public CNmIDComparisonNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0xE0D928B595E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xE0D928B595E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _ComparisonOffset = new(() => Schema.GetOffset(0xE0D928B5897F8DE4), LazyThreadSafetyMode.None); + public ref CNmIDComparisonNode__Comparison_t Comparison { - get => ref _Handle.AsRef(Schema.GetOffset(0xE0D928B5897F8DE4)); + get => ref _Handle.AsRef(_ComparisonOffset.Value); } + private static readonly Lazy _ComparisionIDsOffset = new(() => Schema.GetOffset(0xE0D928B5E68D53FD), LazyThreadSafetyMode.None); + public SchemaUntypedField ComparisionIDs { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xE0D928B5E68D53FD)); + get => new SchemaUntypedField(_Handle + _ComparisionIDsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDEventConditionNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDEventConditionNode__CDefinitionImpl.cs index 9cc757492..a947b402f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDEventConditionNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDEventConditionNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmIDEventConditionNode__CDefinitionImpl : CNmBoolValueNo public CNmIDEventConditionNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceStateNodeIdxOffset = new(() => Schema.GetOffset(0xBD2C5F7563F0228C), LazyThreadSafetyMode.None); + public ref short SourceStateNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xBD2C5F7563F0228C)); + get => ref _Handle.AsRef(_SourceStateNodeIdxOffset.Value); } + private static readonly Lazy _EventConditionRulesOffset = new(() => Schema.GetOffset(0xBD2C5F75A904315F), LazyThreadSafetyMode.None); + public CNmBitFlags EventConditionRules { - get => new CNmBitFlagsImpl(_Handle + Schema.GetOffset(0xBD2C5F75A904315F)); + get => new CNmBitFlagsImpl(_Handle + _EventConditionRulesOffset.Value); } + private static readonly Lazy _EventIDsOffset = new(() => Schema.GetOffset(0xBD2C5F75E7543F93), LazyThreadSafetyMode.None); + public SchemaUntypedField EventIDs { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xBD2C5F75E7543F93)); + get => new SchemaUntypedField(_Handle + _EventIDsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDEventImpl.cs index 332c894f3..100f78945 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmIDEventImpl : CNmEventImpl, CNmIDEvent { public CNmIDEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _IDOffset = new(() => Schema.GetOffset(0x31E463E295066900), LazyThreadSafetyMode.None); + public ref CGlobalSymbol ID { - get => ref _Handle.AsRef(Schema.GetOffset(0x31E463E295066900)); + get => ref _Handle.AsRef(_IDOffset.Value); } + private static readonly Lazy _SecondaryIDOffset = new(() => Schema.GetOffset(0x31E463E29B39DB84), LazyThreadSafetyMode.None); + public ref CGlobalSymbol SecondaryID { - get => ref _Handle.AsRef(Schema.GetOffset(0x31E463E29B39DB84)); + get => ref _Handle.AsRef(_SecondaryIDOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDEventNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDEventNode__CDefinitionImpl.cs index 54fb1dbfa..61e2af6cd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDEventNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDEventNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmIDEventNode__CDefinitionImpl : CNmIDValueNode__CDefini public CNmIDEventNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceStateNodeIdxOffset = new(() => Schema.GetOffset(0x6308800E63F0228C), LazyThreadSafetyMode.None); + public ref short SourceStateNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x6308800E63F0228C)); + get => ref _Handle.AsRef(_SourceStateNodeIdxOffset.Value); } + private static readonly Lazy _EventConditionRulesOffset = new(() => Schema.GetOffset(0x6308800EA904315F), LazyThreadSafetyMode.None); + public CNmBitFlags EventConditionRules { - get => new CNmBitFlagsImpl(_Handle + Schema.GetOffset(0x6308800EA904315F)); + get => new CNmBitFlagsImpl(_Handle + _EventConditionRulesOffset.Value); } + private static readonly Lazy _DefaultValueOffset = new(() => Schema.GetOffset(0x6308800EBBE0341F), LazyThreadSafetyMode.None); + public ref CGlobalSymbol DefaultValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x6308800EBBE0341F)); + get => ref _Handle.AsRef(_DefaultValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDEventPercentageThroughNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDEventPercentageThroughNode__CDefinitionImpl.cs index f6260dfe3..225bb09e1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDEventPercentageThroughNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDEventPercentageThroughNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmIDEventPercentageThroughNode__CDefinitionImpl : CNmBoo public CNmIDEventPercentageThroughNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceStateNodeIdxOffset = new(() => Schema.GetOffset(0x3912E5963F0228C), LazyThreadSafetyMode.None); + public ref short SourceStateNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x3912E5963F0228C)); + get => ref _Handle.AsRef(_SourceStateNodeIdxOffset.Value); } + private static readonly Lazy _EventConditionRulesOffset = new(() => Schema.GetOffset(0x3912E59A904315F), LazyThreadSafetyMode.None); + public CNmBitFlags EventConditionRules { - get => new CNmBitFlagsImpl(_Handle + Schema.GetOffset(0x3912E59A904315F)); + get => new CNmBitFlagsImpl(_Handle + _EventConditionRulesOffset.Value); } + private static readonly Lazy _EventIDOffset = new(() => Schema.GetOffset(0x3912E599D798A72), LazyThreadSafetyMode.None); + public ref CGlobalSymbol EventID { - get => ref _Handle.AsRef(Schema.GetOffset(0x3912E599D798A72)); + get => ref _Handle.AsRef(_EventIDOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDSelectorNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDSelectorNode__CDefinitionImpl.cs index 331e18fda..f12e120e7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDSelectorNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDSelectorNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmIDSelectorNode__CDefinitionImpl : CNmIDValueNode__CDef public CNmIDSelectorNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ConditionNodeIndicesOffset = new(() => Schema.GetOffset(0x23876114A144D0F), LazyThreadSafetyMode.None); + public SchemaUntypedField ConditionNodeIndices { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x23876114A144D0F)); + get => new SchemaUntypedField(_Handle + _ConditionNodeIndicesOffset.Value); } + private static readonly Lazy _ValuesOffset = new(() => Schema.GetOffset(0x2387611FBEDDADB), LazyThreadSafetyMode.None); + public SchemaUntypedField Values { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x2387611FBEDDADB)); + get => new SchemaUntypedField(_Handle + _ValuesOffset.Value); } + private static readonly Lazy _DefaultValueOffset = new(() => Schema.GetOffset(0x2387611BBE0341F), LazyThreadSafetyMode.None); + public ref CGlobalSymbol DefaultValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x2387611BBE0341F)); + get => ref _Handle.AsRef(_DefaultValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDSwitchNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDSwitchNode__CDefinitionImpl.cs index d275d129a..daad9d897 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDSwitchNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDSwitchNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CNmIDSwitchNode__CDefinitionImpl : CNmIDValueNode__CDefin public CNmIDSwitchNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SwitchValueNodeIdxOffset = new(() => Schema.GetOffset(0x24752DA7FBD7561), LazyThreadSafetyMode.None); + public ref short SwitchValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x24752DA7FBD7561)); + get => ref _Handle.AsRef(_SwitchValueNodeIdxOffset.Value); } + private static readonly Lazy _TrueValueNodeIdxOffset = new(() => Schema.GetOffset(0x24752DAFDE74365), LazyThreadSafetyMode.None); + public ref short TrueValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x24752DAFDE74365)); + get => ref _Handle.AsRef(_TrueValueNodeIdxOffset.Value); } + private static readonly Lazy _FalseValueNodeIdxOffset = new(() => Schema.GetOffset(0x24752DA8DBA2C78), LazyThreadSafetyMode.None); + public ref short FalseValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x24752DA8DBA2C78)); + get => ref _Handle.AsRef(_FalseValueNodeIdxOffset.Value); } + private static readonly Lazy _FalseValueOffset = new(() => Schema.GetOffset(0x24752DAD3506AE9), LazyThreadSafetyMode.None); + public ref CGlobalSymbol FalseValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x24752DAD3506AE9)); + get => ref _Handle.AsRef(_FalseValueOffset.Value); } + private static readonly Lazy _TrueValueOffset = new(() => Schema.GetOffset(0x24752DAF134112A), LazyThreadSafetyMode.None); + public ref CGlobalSymbol TrueValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x24752DAF134112A)); + get => ref _Handle.AsRef(_TrueValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDToFloatNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDToFloatNode__CDefinitionImpl.cs index f9b38e140..6f3405c94 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDToFloatNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDToFloatNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CNmIDToFloatNode__CDefinitionImpl : CNmFloatValueNode__CD public CNmIDToFloatNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x9F6F687D95E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x9F6F687D95E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _DefaultValueOffset = new(() => Schema.GetOffset(0x9F6F687DBBE0341F), LazyThreadSafetyMode.None); + public ref float DefaultValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x9F6F687DBBE0341F)); + get => ref _Handle.AsRef(_DefaultValueOffset.Value); } + private static readonly Lazy _IDsOffset = new(() => Schema.GetOffset(0x9F6F687D0C180009), LazyThreadSafetyMode.None); + public SchemaUntypedField IDs { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x9F6F687D0C180009)); + get => new SchemaUntypedField(_Handle + _IDsOffset.Value); } + private static readonly Lazy _ValuesOffset = new(() => Schema.GetOffset(0x9F6F687DFBEDDADB), LazyThreadSafetyMode.None); + public SchemaUntypedField Values { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x9F6F687DFBEDDADB)); + get => new SchemaUntypedField(_Handle + _ValuesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDValueNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDValueNode__CDefinitionImpl.cs index ce91caff1..fa4fcb8c2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDValueNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIDValueNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIKBodyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIKBodyImpl.cs index 5e2fd8383..b20d9a4cc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIKBodyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIKBodyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CNmIKBodyImpl : SchemaClass, CNmIKBody { public CNmIKBodyImpl(nint handle) : base(handle) { } + private static readonly Lazy _MassOffset = new(() => Schema.GetOffset(0x2162051FCD83D263), LazyThreadSafetyMode.None); + public ref float Mass { - get => ref _Handle.AsRef(Schema.GetOffset(0x2162051FCD83D263)); + get => ref _Handle.AsRef(_MassOffset.Value); } + private static readonly Lazy _LocalMassCenterOffset = new(() => Schema.GetOffset(0x2162051FAFDB4EDD), LazyThreadSafetyMode.None); + public ref Vector LocalMassCenter { - get => ref _Handle.AsRef(Schema.GetOffset(0x2162051FAFDB4EDD)); + get => ref _Handle.AsRef(_LocalMassCenterOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x2162051F0A9FA917), LazyThreadSafetyMode.None); + public ref Vector Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x2162051F0A9FA917)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _ResistanceOffset = new(() => Schema.GetOffset(0x2162051FE15D484E), LazyThreadSafetyMode.None); + public ref float Resistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x2162051FE15D484E)); + get => ref _Handle.AsRef(_ResistanceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIKEffectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIKEffectorImpl.cs index 4676bd924..e3cd5c940 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIKEffectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIKEffectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CNmIKEffectorImpl : SchemaClass, CNmIKEffector { public CNmIKEffectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _BodyIndexOffset = new(() => Schema.GetOffset(0xA45D61F2B50B497), LazyThreadSafetyMode.None); + public ref int BodyIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xA45D61F2B50B497)); + get => ref _Handle.AsRef(_BodyIndexOffset.Value); } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0xA45D61F6154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xA45D61F6154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } + private static readonly Lazy _TargetPositionOffset = new(() => Schema.GetOffset(0xA45D61FF028CBBF), LazyThreadSafetyMode.None); + public ref Vector TargetPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0xA45D61FF028CBBF)); + get => ref _Handle.AsRef(_TargetPositionOffset.Value); } + private static readonly Lazy _TargetOrientationOffset = new(() => Schema.GetOffset(0xA45D61FED14ED41), LazyThreadSafetyMode.None); + public ref Quaternion TargetOrientation { - get => ref _Handle.AsRef(Schema.GetOffset(0xA45D61FED14ED41)); + get => ref _Handle.AsRef(_TargetOrientationOffset.Value); } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0xA45D61F7B81E7AB), LazyThreadSafetyMode.None); + public ref float Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0xA45D61F7B81E7AB)); + get => ref _Handle.AsRef(_WeightOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIKJointImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIKJointImpl.cs index bc59c9ff1..b00a62c35 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIKJointImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIKJointImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CNmIKJointImpl : SchemaClass, CNmIKJoint { public CNmIKJointImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParentIndexOffset = new(() => Schema.GetOffset(0x31287449134E2DE7), LazyThreadSafetyMode.None); + public ref int ParentIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x31287449134E2DE7)); + get => ref _Handle.AsRef(_ParentIndexOffset.Value); } + private static readonly Lazy _BodyIndexOffset = new(() => Schema.GetOffset(0x312874492B50B497), LazyThreadSafetyMode.None); + public ref int BodyIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x312874492B50B497)); + get => ref _Handle.AsRef(_BodyIndexOffset.Value); } + private static readonly Lazy _XLocalFrameOffset = new(() => Schema.GetOffset(0x31287449AD5CD897), LazyThreadSafetyMode.None); + public ref CTransform XLocalFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x31287449AD5CD897)); + get => ref _Handle.AsRef(_XLocalFrameOffset.Value); } + private static readonly Lazy _SwingLimitOffset = new(() => Schema.GetOffset(0x31287449279A44C2), LazyThreadSafetyMode.None); + public ref float SwingLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0x31287449279A44C2)); + get => ref _Handle.AsRef(_SwingLimitOffset.Value); } + private static readonly Lazy _MinTwistLimitOffset = new(() => Schema.GetOffset(0x3128744914A803B7), LazyThreadSafetyMode.None); + public ref float MinTwistLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0x3128744914A803B7)); + get => ref _Handle.AsRef(_MinTwistLimitOffset.Value); } + private static readonly Lazy _MaxTwistLimitOffset = new(() => Schema.GetOffset(0x31287449F1241F7D), LazyThreadSafetyMode.None); + public ref float MaxTwistLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0x31287449F1241F7D)); + get => ref _Handle.AsRef(_MaxTwistLimitOffset.Value); } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0x312874497B81E7AB), LazyThreadSafetyMode.None); + public ref float Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0x312874497B81E7AB)); + get => ref _Handle.AsRef(_WeightOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIKRigImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIKRigImpl.cs index 1d16f1026..7d9683325 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIKRigImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIKRigImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmIKRigImpl : SchemaClass, CNmIKRig { public CNmIKRigImpl(nint handle) : base(handle) { } + private static readonly Lazy _SkeletonOffset = new(() => Schema.GetOffset(0x9C509BCFE77F030E), LazyThreadSafetyMode.None); + public ref CStrongHandle Skeleton { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9C509BCFE77F030E)); + get => ref _Handle.AsRef>(_SkeletonOffset.Value); } + private static readonly Lazy _BodiesOffset = new(() => Schema.GetOffset(0x9C509BCF24483A49), LazyThreadSafetyMode.None); + public ref CUtlVector Bodies { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9C509BCF24483A49)); + get => ref _Handle.AsRef>(_BodiesOffset.Value); } + private static readonly Lazy _JointsOffset = new(() => Schema.GetOffset(0x9C509BCF364EA4AC), LazyThreadSafetyMode.None); + public ref CUtlVector Joints { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9C509BCF364EA4AC)); + get => ref _Handle.AsRef>(_JointsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIsInactiveBranchConditionNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIsInactiveBranchConditionNode__CDefinitionImpl.cs index a68af326f..e35efc271 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIsInactiveBranchConditionNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIsInactiveBranchConditionNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIsTargetSetNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIsTargetSetNode__CDefinitionImpl.cs index f12b51396..0287a288d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIsTargetSetNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmIsTargetSetNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmIsTargetSetNode__CDefinitionImpl : CNmBoolValueNode__C public CNmIsTargetSetNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x27C85C3E95E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x27C85C3E95E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmLayerBlendNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmLayerBlendNode__CDefinitionImpl.cs index bef338b1f..6230da683 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmLayerBlendNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmLayerBlendNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmLayerBlendNode__CDefinitionImpl : CNmPoseNode__CDefini public CNmLayerBlendNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _BaseNodeIdxOffset = new(() => Schema.GetOffset(0xF9CDDBC5C07C7467), LazyThreadSafetyMode.None); + public ref short BaseNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xF9CDDBC5C07C7467)); + get => ref _Handle.AsRef(_BaseNodeIdxOffset.Value); } + private static readonly Lazy _OnlySampleBaseRootMotionOffset = new(() => Schema.GetOffset(0xF9CDDBC5ABE796B2), LazyThreadSafetyMode.None); + public ref bool OnlySampleBaseRootMotion { - get => ref _Handle.AsRef(Schema.GetOffset(0xF9CDDBC5ABE796B2)); + get => ref _Handle.AsRef(_OnlySampleBaseRootMotionOffset.Value); } + private static readonly Lazy _LayerDefinitionOffset = new(() => Schema.GetOffset(0xF9CDDBC51AE2DAAF), LazyThreadSafetyMode.None); + public SchemaUntypedField LayerDefinition { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xF9CDDBC51AE2DAAF)); + get => new SchemaUntypedField(_Handle + _LayerDefinitionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmLayerBlendNode__LayerDefinition_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmLayerBlendNode__LayerDefinition_tImpl.cs index ee8bf0c4a..2d2bce649 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmLayerBlendNode__LayerDefinition_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmLayerBlendNode__LayerDefinition_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CNmLayerBlendNode__LayerDefinition_tImpl : SchemaClass, C public CNmLayerBlendNode__LayerDefinition_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputNodeIdxOffset = new(() => Schema.GetOffset(0xB5F2C492B0A177F6), LazyThreadSafetyMode.None); + public ref short InputNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5F2C492B0A177F6)); + get => ref _Handle.AsRef(_InputNodeIdxOffset.Value); } + private static readonly Lazy _WeightValueNodeIdxOffset = new(() => Schema.GetOffset(0xB5F2C4924E4CD159), LazyThreadSafetyMode.None); + public ref short WeightValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5F2C4924E4CD159)); + get => ref _Handle.AsRef(_WeightValueNodeIdxOffset.Value); } + private static readonly Lazy _BoneMaskValueNodeIdxOffset = new(() => Schema.GetOffset(0xB5F2C49284E70B17), LazyThreadSafetyMode.None); + public ref short BoneMaskValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5F2C49284E70B17)); + get => ref _Handle.AsRef(_BoneMaskValueNodeIdxOffset.Value); } + private static readonly Lazy _RootMotionWeightValueNodeIdxOffset = new(() => Schema.GetOffset(0xB5F2C492C355D4CF), LazyThreadSafetyMode.None); + public ref short RootMotionWeightValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5F2C492C355D4CF)); + get => ref _Handle.AsRef(_RootMotionWeightValueNodeIdxOffset.Value); } + private static readonly Lazy _IsSynchronizedOffset = new(() => Schema.GetOffset(0xB5F2C492DCF1E06B), LazyThreadSafetyMode.None); + public ref bool IsSynchronized { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5F2C492DCF1E06B)); + get => ref _Handle.AsRef(_IsSynchronizedOffset.Value); } + private static readonly Lazy _IgnoreEventsOffset = new(() => Schema.GetOffset(0xB5F2C4920E574CA6), LazyThreadSafetyMode.None); + public ref bool IgnoreEvents { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5F2C4920E574CA6)); + get => ref _Handle.AsRef(_IgnoreEventsOffset.Value); } + private static readonly Lazy _IsStateMachineLayerOffset = new(() => Schema.GetOffset(0xB5F2C492EE48C9D0), LazyThreadSafetyMode.None); + public ref bool IsStateMachineLayer { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5F2C492EE48C9D0)); + get => ref _Handle.AsRef(_IsStateMachineLayerOffset.Value); } + private static readonly Lazy _BlendModeOffset = new(() => Schema.GetOffset(0xB5F2C4928D5006AB), LazyThreadSafetyMode.None); + public ref NmPoseBlendMode_t BlendMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5F2C4928D5006AB)); + get => ref _Handle.AsRef(_BlendModeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmLegacyEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmLegacyEventImpl.cs index b9350e54a..6cac26228 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmLegacyEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmLegacyEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CNmLegacyEventImpl : CNmEventImpl, CNmLegacyEvent { public CNmLegacyEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _AnimEventClassNameOffset = new(() => Schema.GetOffset(0x78C36574C276DA33), LazyThreadSafetyMode.None); + public string AnimEventClassName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x78C36574C276DA33)); + var ptr = _Handle.Read(_AnimEventClassNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x78C36574C276DA33, value); + set => Schema.SetString(_Handle, _AnimEventClassNameOffset.Value, value); } + private static readonly Lazy _KVOffset = new(() => Schema.GetOffset(0x78C36574F70B8074), LazyThreadSafetyMode.None); + public SchemaUntypedField KV { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x78C36574F70B8074)); + get => new SchemaUntypedField(_Handle + _KVOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmMaterialAttributeEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmMaterialAttributeEventImpl.cs index e248c23fe..660626bc5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmMaterialAttributeEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmMaterialAttributeEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,27 +17,39 @@ internal partial class CNmMaterialAttributeEventImpl : CNmEventImpl, CNmMaterial public CNmMaterialAttributeEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _AttributeNameOffset = new(() => Schema.GetOffset(0xFC131DA9168F02C), LazyThreadSafetyMode.None); + public string AttributeName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xFC131DA9168F02C)); + var ptr = _Handle.Read(_AttributeNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xFC131DA9168F02C, value); + set => Schema.SetString(_Handle, _AttributeNameOffset.Value, value); } + private static readonly Lazy _AttributeNameTokenOffset = new(() => Schema.GetOffset(0xFC131DA4C1F86C9), LazyThreadSafetyMode.None); + public ref CUtlStringToken AttributeNameToken { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC131DA4C1F86C9)); + get => ref _Handle.AsRef(_AttributeNameTokenOffset.Value); } + private static readonly Lazy _XOffset = new(() => Schema.GetOffset(0xFC131DADBC57BA7), LazyThreadSafetyMode.None); + public SchemaUntypedField X { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xFC131DADBC57BA7)); + get => new SchemaUntypedField(_Handle + _XOffset.Value); } + private static readonly Lazy _YOffset = new(() => Schema.GetOffset(0xFC131DADAC57A14), LazyThreadSafetyMode.None); + public SchemaUntypedField Y { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xFC131DADAC57A14)); + get => new SchemaUntypedField(_Handle + _YOffset.Value); } + private static readonly Lazy _ZOffset = new(() => Schema.GetOffset(0xFC131DADDC57ECD), LazyThreadSafetyMode.None); + public SchemaUntypedField Z { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xFC131DADDC57ECD)); + get => new SchemaUntypedField(_Handle + _ZOffset.Value); } + private static readonly Lazy _WOffset = new(() => Schema.GetOffset(0xFC131DAD0C56A56), LazyThreadSafetyMode.None); + public SchemaUntypedField W { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xFC131DAD0C56A56)); + get => new SchemaUntypedField(_Handle + _WOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmModelSpaceBlendTaskImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmModelSpaceBlendTaskImpl.cs index 11de86dfb..354339b19 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmModelSpaceBlendTaskImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmModelSpaceBlendTaskImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmNotNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmNotNode__CDefinitionImpl.cs index d11384512..0bf29c688 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmNotNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmNotNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmNotNode__CDefinitionImpl : CNmBoolValueNode__CDefiniti public CNmNotNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x844BE2B095E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x844BE2B095E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmOrNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmOrNode__CDefinitionImpl.cs index f07471574..0acb183ea 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmOrNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmOrNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmOrNode__CDefinitionImpl : CNmBoolValueNode__CDefinitio public CNmOrNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ConditionNodeIndicesOffset = new(() => Schema.GetOffset(0x9BF82E864A144D0F), LazyThreadSafetyMode.None); + public SchemaUntypedField ConditionNodeIndices { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x9BF82E864A144D0F)); + get => new SchemaUntypedField(_Handle + _ConditionNodeIndicesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmOrientationWarpEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmOrientationWarpEventImpl.cs index fef8a25b9..bae8791a4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmOrientationWarpEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmOrientationWarpEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmOrientationWarpNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmOrientationWarpNode__CDefinitionImpl.cs index 3dd6593cd..cba35b39d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmOrientationWarpNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmOrientationWarpNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CNmOrientationWarpNode__CDefinitionImpl : CNmPoseNode__CD public CNmOrientationWarpNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ClipReferenceNodeIdxOffset = new(() => Schema.GetOffset(0x1265525761EC8947), LazyThreadSafetyMode.None); + public ref short ClipReferenceNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x1265525761EC8947)); + get => ref _Handle.AsRef(_ClipReferenceNodeIdxOffset.Value); } + private static readonly Lazy _TargetValueNodeIdxOffset = new(() => Schema.GetOffset(0x12655257A040C7E8), LazyThreadSafetyMode.None); + public ref short TargetValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x12655257A040C7E8)); + get => ref _Handle.AsRef(_TargetValueNodeIdxOffset.Value); } + private static readonly Lazy _IsOffsetNodeOffset = new(() => Schema.GetOffset(0x12655257174AF9D6), LazyThreadSafetyMode.None); + public ref bool IsOffsetNode { - get => ref _Handle.AsRef(Schema.GetOffset(0x12655257174AF9D6)); + get => ref _Handle.AsRef(_IsOffsetNodeOffset.Value); } + private static readonly Lazy _IsOffsetRelativeToCharacterOffset = new(() => Schema.GetOffset(0x1265525793271816), LazyThreadSafetyMode.None); + public ref bool IsOffsetRelativeToCharacter { - get => ref _Handle.AsRef(Schema.GetOffset(0x1265525793271816)); + get => ref _Handle.AsRef(_IsOffsetRelativeToCharacterOffset.Value); } + private static readonly Lazy _SamplingModeOffset = new(() => Schema.GetOffset(0x12655257DDB31BE3), LazyThreadSafetyMode.None); + public ref CNmRootMotionData__SamplingMode_t SamplingMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x12655257DDB31BE3)); + get => ref _Handle.AsRef(_SamplingModeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmOverlayBlendTaskImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmOverlayBlendTaskImpl.cs index 3b111e402..333c8c620 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmOverlayBlendTaskImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmOverlayBlendTaskImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedBlendNode__BlendRange_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedBlendNode__BlendRange_tImpl.cs index 3857c80d7..a3864995d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedBlendNode__BlendRange_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedBlendNode__BlendRange_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmParameterizedBlendNode__BlendRange_tImpl : SchemaClass public CNmParameterizedBlendNode__BlendRange_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputIdx0Offset = new(() => Schema.GetOffset(0x17812ECC5A8983D2), LazyThreadSafetyMode.None); + public ref short InputIdx0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x17812ECC5A8983D2)); + get => ref _Handle.AsRef(_InputIdx0Offset.Value); } + private static readonly Lazy _InputIdx1Offset = new(() => Schema.GetOffset(0x17812ECC5B898565), LazyThreadSafetyMode.None); + public ref short InputIdx1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x17812ECC5B898565)); + get => ref _Handle.AsRef(_InputIdx1Offset.Value); } + private static readonly Lazy _ParameterValueRangeOffset = new(() => Schema.GetOffset(0x17812ECC64AF37AE), LazyThreadSafetyMode.None); + public SchemaUntypedField ParameterValueRange { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x17812ECC64AF37AE)); + get => new SchemaUntypedField(_Handle + _ParameterValueRangeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedBlendNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedBlendNode__CDefinitionImpl.cs index 5ecdaa4d9..592054408 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedBlendNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedBlendNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmParameterizedBlendNode__CDefinitionImpl : CNmPoseNode_ public CNmParameterizedBlendNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceNodeIndicesOffset = new(() => Schema.GetOffset(0x83A56F31E90F1FE1), LazyThreadSafetyMode.None); + public SchemaUntypedField SourceNodeIndices { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x83A56F31E90F1FE1)); + get => new SchemaUntypedField(_Handle + _SourceNodeIndicesOffset.Value); } + private static readonly Lazy _InputParameterValueNodeIdxOffset = new(() => Schema.GetOffset(0x83A56F31AEA94516), LazyThreadSafetyMode.None); + public ref short InputParameterValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x83A56F31AEA94516)); + get => ref _Handle.AsRef(_InputParameterValueNodeIdxOffset.Value); } + private static readonly Lazy _AllowLoopingOffset = new(() => Schema.GetOffset(0x83A56F31FEB26D98), LazyThreadSafetyMode.None); + public ref bool AllowLooping { - get => ref _Handle.AsRef(Schema.GetOffset(0x83A56F31FEB26D98)); + get => ref _Handle.AsRef(_AllowLoopingOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedBlendNode__Parameterization_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedBlendNode__Parameterization_tImpl.cs index 607f553c6..62f64b074 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedBlendNode__Parameterization_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedBlendNode__Parameterization_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmParameterizedBlendNode__Parameterization_tImpl : Schem public CNmParameterizedBlendNode__Parameterization_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BlendRangesOffset = new(() => Schema.GetOffset(0xD342D3196DA1C61A), LazyThreadSafetyMode.None); + public SchemaUntypedField BlendRanges { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD342D3196DA1C61A)); + get => new SchemaUntypedField(_Handle + _BlendRangesOffset.Value); } + private static readonly Lazy _ParameterRangeOffset = new(() => Schema.GetOffset(0xD342D319E7E71E25), LazyThreadSafetyMode.None); + public SchemaUntypedField ParameterRange { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD342D319E7E71E25)); + get => new SchemaUntypedField(_Handle + _ParameterRangeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedClipSelectorNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedClipSelectorNode__CDefinitionImpl.cs index 4d1ec1938..a6b3692c8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedClipSelectorNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedClipSelectorNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CNmParameterizedClipSelectorNode__CDefinitionImpl : CNmCl public CNmParameterizedClipSelectorNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _OptionNodeIndicesOffset = new(() => Schema.GetOffset(0xF7011439DA97B15D), LazyThreadSafetyMode.None); + public SchemaUntypedField OptionNodeIndices { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xF7011439DA97B15D)); + get => new SchemaUntypedField(_Handle + _OptionNodeIndicesOffset.Value); } + private static readonly Lazy _OptionWeightsOffset = new(() => Schema.GetOffset(0xF701143931D94DB5), LazyThreadSafetyMode.None); + public SchemaUntypedField OptionWeights { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xF701143931D94DB5)); + get => new SchemaUntypedField(_Handle + _OptionWeightsOffset.Value); } + private static readonly Lazy _ParameterNodeIdxOffset = new(() => Schema.GetOffset(0xF701143966C6F2AB), LazyThreadSafetyMode.None); + public ref short ParameterNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xF701143966C6F2AB)); + get => ref _Handle.AsRef(_ParameterNodeIdxOffset.Value); } + private static readonly Lazy _IgnoreInvalidOptionsOffset = new(() => Schema.GetOffset(0xF7011439507C679C), LazyThreadSafetyMode.None); + public ref bool IgnoreInvalidOptions { - get => ref _Handle.AsRef(Schema.GetOffset(0xF7011439507C679C)); + get => ref _Handle.AsRef(_IgnoreInvalidOptionsOffset.Value); } + private static readonly Lazy _HasWeightsSetOffset = new(() => Schema.GetOffset(0xF7011439EA6127CC), LazyThreadSafetyMode.None); + public ref bool HasWeightsSet { - get => ref _Handle.AsRef(Schema.GetOffset(0xF7011439EA6127CC)); + get => ref _Handle.AsRef(_HasWeightsSetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedSelectorNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedSelectorNode__CDefinitionImpl.cs index ec6e9fd9a..8ddef011b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedSelectorNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParameterizedSelectorNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CNmParameterizedSelectorNode__CDefinitionImpl : CNmPoseNo public CNmParameterizedSelectorNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _OptionNodeIndicesOffset = new(() => Schema.GetOffset(0xE1B260B3DA97B15D), LazyThreadSafetyMode.None); + public SchemaUntypedField OptionNodeIndices { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xE1B260B3DA97B15D)); + get => new SchemaUntypedField(_Handle + _OptionNodeIndicesOffset.Value); } + private static readonly Lazy _OptionWeightsOffset = new(() => Schema.GetOffset(0xE1B260B331D94DB5), LazyThreadSafetyMode.None); + public SchemaUntypedField OptionWeights { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xE1B260B331D94DB5)); + get => new SchemaUntypedField(_Handle + _OptionWeightsOffset.Value); } + private static readonly Lazy _ParameterNodeIdxOffset = new(() => Schema.GetOffset(0xE1B260B366C6F2AB), LazyThreadSafetyMode.None); + public ref short ParameterNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1B260B366C6F2AB)); + get => ref _Handle.AsRef(_ParameterNodeIdxOffset.Value); } + private static readonly Lazy _IgnoreInvalidOptionsOffset = new(() => Schema.GetOffset(0xE1B260B3507C679C), LazyThreadSafetyMode.None); + public ref bool IgnoreInvalidOptions { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1B260B3507C679C)); + get => ref _Handle.AsRef(_IgnoreInvalidOptionsOffset.Value); } + private static readonly Lazy _HasWeightsSetOffset = new(() => Schema.GetOffset(0xE1B260B3EA6127CC), LazyThreadSafetyMode.None); + public ref bool HasWeightsSet { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1B260B3EA6127CC)); + get => ref _Handle.AsRef(_HasWeightsSetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParticleEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParticleEventImpl.cs index 784abf1e4..8fa04432b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParticleEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmParticleEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,64 +17,90 @@ internal partial class CNmParticleEventImpl : CNmEventImpl, CNmParticleEvent { public CNmParticleEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _RelevanceOffset = new(() => Schema.GetOffset(0x441D270F1E3F4008), LazyThreadSafetyMode.None); + public ref CNmEventRelevance_t Relevance { - get => ref _Handle.AsRef(Schema.GetOffset(0x441D270F1E3F4008)); + get => ref _Handle.AsRef(_RelevanceOffset.Value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x441D270F0F04B4ED), LazyThreadSafetyMode.None); + public ref CNmParticleEvent__Type_t Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x441D270F0F04B4ED)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _ParticleSystemOffset = new(() => Schema.GetOffset(0x441D270FC9C33AF8), LazyThreadSafetyMode.None); + public ref CStrongHandle ParticleSystem { - get => ref _Handle.AsRef>(Schema.GetOffset(0x441D270FC9C33AF8)); + get => ref _Handle.AsRef>(_ParticleSystemOffset.Value); } + private static readonly Lazy _TagsOffset = new(() => Schema.GetOffset(0x441D270FB46C8540), LazyThreadSafetyMode.None); + public string Tags { get { - var ptr = _Handle.Read(Schema.GetOffset(0x441D270FB46C8540)); + var ptr = _Handle.Read(_TagsOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x441D270FB46C8540, value); + set => Schema.SetString(_Handle, _TagsOffset.Value, value); } + private static readonly Lazy _StopImmediatelyOffset = new(() => Schema.GetOffset(0x441D270FB16078E1), LazyThreadSafetyMode.None); + public ref bool StopImmediately { - get => ref _Handle.AsRef(Schema.GetOffset(0x441D270FB16078E1)); + get => ref _Handle.AsRef(_StopImmediatelyOffset.Value); } + private static readonly Lazy _DetachFromOwnerOffset = new(() => Schema.GetOffset(0x441D270F357F7C69), LazyThreadSafetyMode.None); + public ref bool DetachFromOwner { - get => ref _Handle.AsRef(Schema.GetOffset(0x441D270F357F7C69)); + get => ref _Handle.AsRef(_DetachFromOwnerOffset.Value); } + private static readonly Lazy _PlayEndCapOffset = new(() => Schema.GetOffset(0x441D270FA7AB4A38), LazyThreadSafetyMode.None); + public ref bool PlayEndCap { - get => ref _Handle.AsRef(Schema.GetOffset(0x441D270FA7AB4A38)); + get => ref _Handle.AsRef(_PlayEndCapOffset.Value); } + private static readonly Lazy _AttachmentPoint0Offset = new(() => Schema.GetOffset(0x441D270FBFDCDF8A), LazyThreadSafetyMode.None); + public string AttachmentPoint0 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x441D270FBFDCDF8A)); + var ptr = _Handle.Read(_AttachmentPoint0Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x441D270FBFDCDF8A, value); + set => Schema.SetString(_Handle, _AttachmentPoint0Offset.Value, value); } + private static readonly Lazy _AttachmentType0Offset = new(() => Schema.GetOffset(0x441D270F63E9B990), LazyThreadSafetyMode.None); + public ref ParticleAttachment_t AttachmentType0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x441D270F63E9B990)); + get => ref _Handle.AsRef(_AttachmentType0Offset.Value); } + private static readonly Lazy _AttachmentPoint1Offset = new(() => Schema.GetOffset(0x441D270FC0DCE11D), LazyThreadSafetyMode.None); + public string AttachmentPoint1 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x441D270FC0DCE11D)); + var ptr = _Handle.Read(_AttachmentPoint1Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x441D270FC0DCE11D, value); + set => Schema.SetString(_Handle, _AttachmentPoint1Offset.Value, value); } + private static readonly Lazy _AttachmentType1Offset = new(() => Schema.GetOffset(0x441D270F64E9BB23), LazyThreadSafetyMode.None); + public ref ParticleAttachment_t AttachmentType1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x441D270F64E9BB23)); + get => ref _Handle.AsRef(_AttachmentType1Offset.Value); } + private static readonly Lazy _ConfigOffset = new(() => Schema.GetOffset(0x441D270FD8B39967), LazyThreadSafetyMode.None); + public string Config { get { - var ptr = _Handle.Read(Schema.GetOffset(0x441D270FD8B39967)); + var ptr = _Handle.Read(_ConfigOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x441D270FD8B39967, value); + set => Schema.SetString(_Handle, _ConfigOffset.Value, value); } + private static readonly Lazy _EffectForConfigOffset = new(() => Schema.GetOffset(0x441D270FA68959D9), LazyThreadSafetyMode.None); + public string EffectForConfig { get { - var ptr = _Handle.Read(Schema.GetOffset(0x441D270FA68959D9)); + var ptr = _Handle.Read(_EffectForConfigOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x441D270FA68959D9, value); + set => Schema.SetString(_Handle, _EffectForConfigOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmPassthroughNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmPassthroughNode__CDefinitionImpl.cs index 74eda55cd..8ec66d7f9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmPassthroughNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmPassthroughNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmPassthroughNode__CDefinitionImpl : CNmPoseNode__CDefin public CNmPassthroughNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildNodeIdxOffset = new(() => Schema.GetOffset(0x989A91ED5C29A73C), LazyThreadSafetyMode.None); + public ref short ChildNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x989A91ED5C29A73C)); + get => ref _Handle.AsRef(_ChildNodeIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmPoseNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmPoseNode__CDefinitionImpl.cs index 8c619c3bd..86bb21cb7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmPoseNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmPoseNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmPoseTaskImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmPoseTaskImpl.cs index 014e0c2cc..bde761a8c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmPoseTaskImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmPoseTaskImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmReferencePoseNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmReferencePoseNode__CDefinitionImpl.cs index 1f0929a7f..b8a6f3a0f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmReferencePoseNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmReferencePoseNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmReferencePoseTaskImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmReferencePoseTaskImpl.cs index b73140222..e0cb1b298 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmReferencePoseTaskImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmReferencePoseTaskImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmReferencedGraphNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmReferencedGraphNode__CDefinitionImpl.cs index 870f1ed70..e908038f5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmReferencedGraphNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmReferencedGraphNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmReferencedGraphNode__CDefinitionImpl : CNmPoseNode__CD public CNmReferencedGraphNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ReferencedGraphIdxOffset = new(() => Schema.GetOffset(0x44045ED427B00199), LazyThreadSafetyMode.None); + public ref short ReferencedGraphIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x44045ED427B00199)); + get => ref _Handle.AsRef(_ReferencedGraphIdxOffset.Value); } + private static readonly Lazy _FallbackNodeIdxOffset = new(() => Schema.GetOffset(0x44045ED4AFA8F89E), LazyThreadSafetyMode.None); + public ref short FallbackNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x44045ED4AFA8F89E)); + get => ref _Handle.AsRef(_FallbackNodeIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmRootMotionDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmRootMotionDataImpl.cs index 543cae91f..558c95c41 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmRootMotionDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmRootMotionDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CNmRootMotionDataImpl : SchemaClass, CNmRootMotionData { public CNmRootMotionDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _TransformsOffset = new(() => Schema.GetOffset(0x2E2BC46D88C82C58), LazyThreadSafetyMode.None); + public ref CUtlVector Transforms { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2E2BC46D88C82C58)); + get => ref _Handle.AsRef>(_TransformsOffset.Value); } + private static readonly Lazy _NumFramesOffset = new(() => Schema.GetOffset(0x2E2BC46DF764C355), LazyThreadSafetyMode.None); + public ref int NumFrames { - get => ref _Handle.AsRef(Schema.GetOffset(0x2E2BC46DF764C355)); + get => ref _Handle.AsRef(_NumFramesOffset.Value); } + private static readonly Lazy _AverageLinearVelocityOffset = new(() => Schema.GetOffset(0x2E2BC46D497EE0D4), LazyThreadSafetyMode.None); + public ref float AverageLinearVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0x2E2BC46D497EE0D4)); + get => ref _Handle.AsRef(_AverageLinearVelocityOffset.Value); } + private static readonly Lazy _AverageAngularVelocityRadiansOffset = new(() => Schema.GetOffset(0x2E2BC46D11C83D0F), LazyThreadSafetyMode.None); + public ref float AverageAngularVelocityRadians { - get => ref _Handle.AsRef(Schema.GetOffset(0x2E2BC46D11C83D0F)); + get => ref _Handle.AsRef(_AverageAngularVelocityRadiansOffset.Value); } + private static readonly Lazy _TotalDeltaOffset = new(() => Schema.GetOffset(0x2E2BC46D71CA0F99), LazyThreadSafetyMode.None); + public ref CTransform TotalDelta { - get => ref _Handle.AsRef(Schema.GetOffset(0x2E2BC46D71CA0F99)); + get => ref _Handle.AsRef(_TotalDeltaOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmRootMotionEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmRootMotionEventImpl.cs index 13bff2923..68efea408 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmRootMotionEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmRootMotionEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmRootMotionEventImpl : CNmEventImpl, CNmRootMotionEvent public CNmRootMotionEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _BlendTimeSecondsOffset = new(() => Schema.GetOffset(0x8BA908676D3A08FC), LazyThreadSafetyMode.None); + public ref float BlendTimeSeconds { - get => ref _Handle.AsRef(Schema.GetOffset(0x8BA908676D3A08FC)); + get => ref _Handle.AsRef(_BlendTimeSecondsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmRootMotionOverrideNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmRootMotionOverrideNode__CDefinitionImpl.cs index 174f4b701..d76d17d9d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmRootMotionOverrideNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmRootMotionOverrideNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CNmRootMotionOverrideNode__CDefinitionImpl : CNmPassthrou public CNmRootMotionOverrideNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _DesiredMovingVelocityNodeIdxOffset = new(() => Schema.GetOffset(0x63AAD28BA5EFD80B), LazyThreadSafetyMode.None); + public ref short DesiredMovingVelocityNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x63AAD28BA5EFD80B)); + get => ref _Handle.AsRef(_DesiredMovingVelocityNodeIdxOffset.Value); } + private static readonly Lazy _DesiredFacingDirectionNodeIdxOffset = new(() => Schema.GetOffset(0x63AAD28BAC723A63), LazyThreadSafetyMode.None); + public ref short DesiredFacingDirectionNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x63AAD28BAC723A63)); + get => ref _Handle.AsRef(_DesiredFacingDirectionNodeIdxOffset.Value); } + private static readonly Lazy _LinearVelocityLimitNodeIdxOffset = new(() => Schema.GetOffset(0x63AAD28B56A698BD), LazyThreadSafetyMode.None); + public ref short LinearVelocityLimitNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x63AAD28B56A698BD)); + get => ref _Handle.AsRef(_LinearVelocityLimitNodeIdxOffset.Value); } + private static readonly Lazy _AngularVelocityLimitNodeIdxOffset = new(() => Schema.GetOffset(0x63AAD28BCC9208F8), LazyThreadSafetyMode.None); + public ref short AngularVelocityLimitNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x63AAD28BCC9208F8)); + get => ref _Handle.AsRef(_AngularVelocityLimitNodeIdxOffset.Value); } + private static readonly Lazy _MaxLinearVelocityOffset = new(() => Schema.GetOffset(0x63AAD28B70FC93F7), LazyThreadSafetyMode.None); + public ref float MaxLinearVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0x63AAD28B70FC93F7)); + get => ref _Handle.AsRef(_MaxLinearVelocityOffset.Value); } + private static readonly Lazy _MaxAngularVelocityRadiansOffset = new(() => Schema.GetOffset(0x63AAD28BC15BAB90), LazyThreadSafetyMode.None); + public ref float MaxAngularVelocityRadians { - get => ref _Handle.AsRef(Schema.GetOffset(0x63AAD28BC15BAB90)); + get => ref _Handle.AsRef(_MaxAngularVelocityRadiansOffset.Value); } + private static readonly Lazy _OverrideFlagsOffset = new(() => Schema.GetOffset(0x63AAD28BBDB571A4), LazyThreadSafetyMode.None); + public CNmBitFlags OverrideFlags { - get => new CNmBitFlagsImpl(_Handle + Schema.GetOffset(0x63AAD28BBDB571A4)); + get => new CNmBitFlagsImpl(_Handle + _OverrideFlagsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSampleTaskImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSampleTaskImpl.cs index 5d9c10fd3..1b3f5778a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSampleTaskImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSampleTaskImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmScaleNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmScaleNode__CDefinitionImpl.cs index 923310b4c..fd594b143 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmScaleNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmScaleNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmScaleNode__CDefinitionImpl : CNmPassthroughNode__CDefi public CNmScaleNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaskNodeIdxOffset = new(() => Schema.GetOffset(0x5902F6B1216FA578), LazyThreadSafetyMode.None); + public ref short MaskNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x5902F6B1216FA578)); + get => ref _Handle.AsRef(_MaskNodeIdxOffset.Value); } + private static readonly Lazy _EnableNodeIdxOffset = new(() => Schema.GetOffset(0x5902F6B10C9DD729), LazyThreadSafetyMode.None); + public ref short EnableNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x5902F6B10C9DD729)); + get => ref _Handle.AsRef(_EnableNodeIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmScaleTaskImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmScaleTaskImpl.cs index 6be0d13e8..810ed0dda 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmScaleTaskImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmScaleTaskImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSelectorNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSelectorNode__CDefinitionImpl.cs index 66405670a..7d74b2448 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSelectorNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSelectorNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmSelectorNode__CDefinitionImpl : CNmPoseNode__CDefiniti public CNmSelectorNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _OptionNodeIndicesOffset = new(() => Schema.GetOffset(0x4E964386DA97B15D), LazyThreadSafetyMode.None); + public SchemaUntypedField OptionNodeIndices { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x4E964386DA97B15D)); + get => new SchemaUntypedField(_Handle + _OptionNodeIndicesOffset.Value); } + private static readonly Lazy _ConditionNodeIndicesOffset = new(() => Schema.GetOffset(0x4E9643864A144D0F), LazyThreadSafetyMode.None); + public SchemaUntypedField ConditionNodeIndices { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x4E9643864A144D0F)); + get => new SchemaUntypedField(_Handle + _ConditionNodeIndicesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSkeletonImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSkeletonImpl.cs index a644c8584..5a1193661 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSkeletonImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSkeletonImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class CNmSkeletonImpl : SchemaClass, CNmSkeleton { public CNmSkeletonImpl(nint handle) : base(handle) { } + private static readonly Lazy _IDOffset = new(() => Schema.GetOffset(0xC923251495066900), LazyThreadSafetyMode.None); + public ref CGlobalSymbol ID { - get => ref _Handle.AsRef(Schema.GetOffset(0xC923251495066900)); + get => ref _Handle.AsRef(_IDOffset.Value); } + private static readonly Lazy _BoneIDsOffset = new(() => Schema.GetOffset(0xC92325140909C443), LazyThreadSafetyMode.None); + public ref CUtlLeanVector BoneIDs { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC92325140909C443)); + get => ref _Handle.AsRef>(_BoneIDsOffset.Value); } + private static readonly Lazy _ParentIndicesOffset = new(() => Schema.GetOffset(0xC923251480CFB2AA), LazyThreadSafetyMode.None); + public ref CUtlVector ParentIndices { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC923251480CFB2AA)); + get => ref _Handle.AsRef>(_ParentIndicesOffset.Value); } + private static readonly Lazy _ParentSpaceReferencePoseOffset = new(() => Schema.GetOffset(0xC92325145BF1EDE7), LazyThreadSafetyMode.None); + public ref CUtlVector ParentSpaceReferencePose { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC92325145BF1EDE7)); + get => ref _Handle.AsRef>(_ParentSpaceReferencePoseOffset.Value); } + private static readonly Lazy _ModelSpaceReferencePoseOffset = new(() => Schema.GetOffset(0xC92325147B025328), LazyThreadSafetyMode.None); + public ref CUtlVector ModelSpaceReferencePose { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC92325147B025328)); + get => ref _Handle.AsRef>(_ModelSpaceReferencePoseOffset.Value); } + private static readonly Lazy _NumBonesToSampleAtLowLODOffset = new(() => Schema.GetOffset(0xC9232514813C419D), LazyThreadSafetyMode.None); + public ref int NumBonesToSampleAtLowLOD { - get => ref _Handle.AsRef(Schema.GetOffset(0xC9232514813C419D)); + get => ref _Handle.AsRef(_NumBonesToSampleAtLowLODOffset.Value); } + private static readonly Lazy _MaskDefinitionsOffset = new(() => Schema.GetOffset(0xC92325147196574D), LazyThreadSafetyMode.None); + public ref CUtlLeanVector MaskDefinitions { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC92325147196574D)); + get => ref _Handle.AsRef>(_MaskDefinitionsOffset.Value); } + private static readonly Lazy _SecondarySkeletonsOffset = new(() => Schema.GetOffset(0xC9232514782F396B), LazyThreadSafetyMode.None); + public ref CUtlLeanVector SecondarySkeletons { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC9232514782F396B)); + get => ref _Handle.AsRef>(_SecondarySkeletonsOffset.Value); } + private static readonly Lazy _IsPropSkeletonOffset = new(() => Schema.GetOffset(0xC9232514FD7D351F), LazyThreadSafetyMode.None); + public ref bool IsPropSkeleton { - get => ref _Handle.AsRef(Schema.GetOffset(0xC9232514FD7D351F)); + get => ref _Handle.AsRef(_IsPropSkeletonOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSkeleton__SecondarySkeleton_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSkeleton__SecondarySkeleton_tImpl.cs index 2cc396a7c..768801ff9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSkeleton__SecondarySkeleton_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSkeleton__SecondarySkeleton_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmSkeleton__SecondarySkeleton_tImpl : SchemaClass, CNmSk public CNmSkeleton__SecondarySkeleton_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _AttachToBoneIDOffset = new(() => Schema.GetOffset(0x50F456DAB2F06B3A), LazyThreadSafetyMode.None); + public ref CGlobalSymbol AttachToBoneID { - get => ref _Handle.AsRef(Schema.GetOffset(0x50F456DAB2F06B3A)); + get => ref _Handle.AsRef(_AttachToBoneIDOffset.Value); } + private static readonly Lazy _SkeletonOffset = new(() => Schema.GetOffset(0x50F456DAE77F030E), LazyThreadSafetyMode.None); + public ref CStrongHandle Skeleton { - get => ref _Handle.AsRef>(Schema.GetOffset(0x50F456DAE77F030E)); + get => ref _Handle.AsRef>(_SkeletonOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSnapWeaponNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSnapWeaponNode__CDefinitionImpl.cs index f80d57217..a9eec10cb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSnapWeaponNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSnapWeaponNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmSnapWeaponNode__CDefinitionImpl : CNmPassthroughNode__ public CNmSnapWeaponNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _EnabledNodeIdxOffset = new(() => Schema.GetOffset(0x60733C89F7CDF5E9), LazyThreadSafetyMode.None); + public ref short EnabledNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x60733C89F7CDF5E9)); + get => ref _Handle.AsRef(_EnabledNodeIdxOffset.Value); } + private static readonly Lazy _LockLeftHandNodeIdxOffset = new(() => Schema.GetOffset(0x60733C89493D63C1), LazyThreadSafetyMode.None); + public ref short LockLeftHandNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x60733C89493D63C1)); + get => ref _Handle.AsRef(_LockLeftHandNodeIdxOffset.Value); } + private static readonly Lazy _BlendTimeSecondsOffset = new(() => Schema.GetOffset(0x60733C896D3A08FC), LazyThreadSafetyMode.None); + public ref float BlendTimeSeconds { - get => ref _Handle.AsRef(Schema.GetOffset(0x60733C896D3A08FC)); + get => ref _Handle.AsRef(_BlendTimeSecondsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSnapWeaponTaskImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSnapWeaponTaskImpl.cs index d1571b9f2..42c4a97d3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSnapWeaponTaskImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSnapWeaponTaskImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSoundEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSoundEventImpl.cs index 02f9a35ba..174658008 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSoundEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSoundEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,52 @@ internal partial class CNmSoundEventImpl : CNmEventImpl, CNmSoundEvent { public CNmSoundEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _RelevanceOffset = new(() => Schema.GetOffset(0xDC15E5261E3F4008), LazyThreadSafetyMode.None); + public ref CNmEventRelevance_t Relevance { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC15E5261E3F4008)); + get => ref _Handle.AsRef(_RelevanceOffset.Value); } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xDC15E5264D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDC15E5264D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDC15E5264D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _PositionOffset = new(() => Schema.GetOffset(0xDC15E5264B57E0AA), LazyThreadSafetyMode.None); + public ref CNmSoundEvent__Position_t Position { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC15E5264B57E0AA)); + get => ref _Handle.AsRef(_PositionOffset.Value); } + private static readonly Lazy _AttachmentNameOffset = new(() => Schema.GetOffset(0xDC15E526295DA9CB), LazyThreadSafetyMode.None); + public string AttachmentName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDC15E526295DA9CB)); + var ptr = _Handle.Read(_AttachmentNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDC15E526295DA9CB, value); + set => Schema.SetString(_Handle, _AttachmentNameOffset.Value, value); } + private static readonly Lazy _TagsOffset = new(() => Schema.GetOffset(0xDC15E526B46C8540), LazyThreadSafetyMode.None); + public string Tags { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDC15E526B46C8540)); + var ptr = _Handle.Read(_TagsOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDC15E526B46C8540, value); + set => Schema.SetString(_Handle, _TagsOffset.Value, value); } + private static readonly Lazy _ContinuePlayingSoundAtDurationEndOffset = new(() => Schema.GetOffset(0xDC15E5262CB53E61), LazyThreadSafetyMode.None); + public ref bool ContinuePlayingSoundAtDurationEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC15E5262CB53E61)); + get => ref _Handle.AsRef(_ContinuePlayingSoundAtDurationEndOffset.Value); } + private static readonly Lazy _DurationInterruptionThresholdOffset = new(() => Schema.GetOffset(0xDC15E5269F1AA35B), LazyThreadSafetyMode.None); + public ref float DurationInterruptionThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC15E5269F1AA35B)); + get => ref _Handle.AsRef(_DurationInterruptionThresholdOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSpeedScaleBaseNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSpeedScaleBaseNode__CDefinitionImpl.cs index 4ce27af7d..f4249cbf3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSpeedScaleBaseNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSpeedScaleBaseNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmSpeedScaleBaseNode__CDefinitionImpl : CNmPassthroughNo public CNmSpeedScaleBaseNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x69CF028795E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x69CF028795E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _DefaultInputValueOffset = new(() => Schema.GetOffset(0x69CF02875DFEC365), LazyThreadSafetyMode.None); + public ref float DefaultInputValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x69CF02875DFEC365)); + get => ref _Handle.AsRef(_DefaultInputValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSpeedScaleNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSpeedScaleNode__CDefinitionImpl.cs index 0398a0990..d5d38e59a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSpeedScaleNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSpeedScaleNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateCompletedConditionNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateCompletedConditionNode__CDefinitionImpl.cs index a53dfdcf8..656146fe0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateCompletedConditionNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateCompletedConditionNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmStateCompletedConditionNode__CDefinitionImpl : CNmBool public CNmStateCompletedConditionNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceStateNodeIdxOffset = new(() => Schema.GetOffset(0x4C5A15CA63F0228C), LazyThreadSafetyMode.None); + public ref short SourceStateNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C5A15CA63F0228C)); + get => ref _Handle.AsRef(_SourceStateNodeIdxOffset.Value); } + private static readonly Lazy _TransitionDurationOverrideNodeIdxOffset = new(() => Schema.GetOffset(0x4C5A15CACD97BBA1), LazyThreadSafetyMode.None); + public ref short TransitionDurationOverrideNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C5A15CACD97BBA1)); + get => ref _Handle.AsRef(_TransitionDurationOverrideNodeIdxOffset.Value); } + private static readonly Lazy _TransitionDurationSecondsOffset = new(() => Schema.GetOffset(0x4C5A15CAD5E92B1D), LazyThreadSafetyMode.None); + public ref float TransitionDurationSeconds { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C5A15CAD5E92B1D)); + get => ref _Handle.AsRef(_TransitionDurationSecondsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateMachineNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateMachineNode__CDefinitionImpl.cs index 4517eea4a..d46048ff0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateMachineNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateMachineNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmStateMachineNode__CDefinitionImpl : CNmPoseNode__CDefi public CNmStateMachineNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _StateDefinitionsOffset = new(() => Schema.GetOffset(0xA73F392775230B54), LazyThreadSafetyMode.None); + public SchemaUntypedField StateDefinitions { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA73F392775230B54)); + get => new SchemaUntypedField(_Handle + _StateDefinitionsOffset.Value); } + private static readonly Lazy _DefaultStateIndexOffset = new(() => Schema.GetOffset(0xA73F39276C1EC5ED), LazyThreadSafetyMode.None); + public ref short DefaultStateIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xA73F39276C1EC5ED)); + get => ref _Handle.AsRef(_DefaultStateIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateMachineNode__StateDefinition_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateMachineNode__StateDefinition_tImpl.cs index 6c388efe7..1ffb9433f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateMachineNode__StateDefinition_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateMachineNode__StateDefinition_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmStateMachineNode__StateDefinition_tImpl : SchemaClass, public CNmStateMachineNode__StateDefinition_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _StateNodeIdxOffset = new(() => Schema.GetOffset(0x539BB818074CB7A1), LazyThreadSafetyMode.None); + public ref short StateNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x539BB818074CB7A1)); + get => ref _Handle.AsRef(_StateNodeIdxOffset.Value); } + private static readonly Lazy _EntryConditionNodeIdxOffset = new(() => Schema.GetOffset(0x539BB8180B262993), LazyThreadSafetyMode.None); + public ref short EntryConditionNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x539BB8180B262993)); + get => ref _Handle.AsRef(_EntryConditionNodeIdxOffset.Value); } + private static readonly Lazy _TransitionDefinitionsOffset = new(() => Schema.GetOffset(0x539BB818F02EF580), LazyThreadSafetyMode.None); + public SchemaUntypedField TransitionDefinitions { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x539BB818F02EF580)); + get => new SchemaUntypedField(_Handle + _TransitionDefinitionsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateMachineNode__TransitionDefinition_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateMachineNode__TransitionDefinition_tImpl.cs index 0d6a67919..c26641979 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateMachineNode__TransitionDefinition_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateMachineNode__TransitionDefinition_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CNmStateMachineNode__TransitionDefinition_tImpl : SchemaC public CNmStateMachineNode__TransitionDefinition_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetStateIdxOffset = new(() => Schema.GetOffset(0x9404D2C4E5C0218C), LazyThreadSafetyMode.None); + public ref short TargetStateIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x9404D2C4E5C0218C)); + get => ref _Handle.AsRef(_TargetStateIdxOffset.Value); } + private static readonly Lazy _ConditionNodeIdxOffset = new(() => Schema.GetOffset(0x9404D2C4773FE641), LazyThreadSafetyMode.None); + public ref short ConditionNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x9404D2C4773FE641)); + get => ref _Handle.AsRef(_ConditionNodeIdxOffset.Value); } + private static readonly Lazy _TransitionNodeIdxOffset = new(() => Schema.GetOffset(0x9404D2C40D5CDE45), LazyThreadSafetyMode.None); + public ref short TransitionNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x9404D2C40D5CDE45)); + get => ref _Handle.AsRef(_TransitionNodeIdxOffset.Value); } + private static readonly Lazy _CanBeForcedOffset = new(() => Schema.GetOffset(0x9404D2C4B6EB0555), LazyThreadSafetyMode.None); + public ref bool CanBeForced { - get => ref _Handle.AsRef(Schema.GetOffset(0x9404D2C4B6EB0555)); + get => ref _Handle.AsRef(_CanBeForcedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateNode__CDefinitionImpl.cs index 2b469670f..630e94130 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class CNmStateNode__CDefinitionImpl : CNmPoseNode__CDefinitionI public CNmStateNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildNodeIdxOffset = new(() => Schema.GetOffset(0x1C1728105C29A73C), LazyThreadSafetyMode.None); + public ref short ChildNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x1C1728105C29A73C)); + get => ref _Handle.AsRef(_ChildNodeIdxOffset.Value); } + private static readonly Lazy _EntryEventsOffset = new(() => Schema.GetOffset(0x1C172810211A7856), LazyThreadSafetyMode.None); + public SchemaUntypedField EntryEvents { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x1C172810211A7856)); + get => new SchemaUntypedField(_Handle + _EntryEventsOffset.Value); } + private static readonly Lazy _ExecuteEventsOffset = new(() => Schema.GetOffset(0x1C1728103BF4FF69), LazyThreadSafetyMode.None); + public SchemaUntypedField ExecuteEvents { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x1C1728103BF4FF69)); + get => new SchemaUntypedField(_Handle + _ExecuteEventsOffset.Value); } + private static readonly Lazy _ExitEventsOffset = new(() => Schema.GetOffset(0x1C17281096F711C4), LazyThreadSafetyMode.None); + public SchemaUntypedField ExitEvents { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x1C17281096F711C4)); + get => new SchemaUntypedField(_Handle + _ExitEventsOffset.Value); } + private static readonly Lazy _TimedRemainingEventsOffset = new(() => Schema.GetOffset(0x1C172810DFC9D945), LazyThreadSafetyMode.None); + public SchemaUntypedField TimedRemainingEvents { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x1C172810DFC9D945)); + get => new SchemaUntypedField(_Handle + _TimedRemainingEventsOffset.Value); } + private static readonly Lazy _TimedElapsedEventsOffset = new(() => Schema.GetOffset(0x1C172810E054F8B9), LazyThreadSafetyMode.None); + public SchemaUntypedField TimedElapsedEvents { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x1C172810E054F8B9)); + get => new SchemaUntypedField(_Handle + _TimedElapsedEventsOffset.Value); } + private static readonly Lazy _LayerWeightNodeIdxOffset = new(() => Schema.GetOffset(0x1C17281069611331), LazyThreadSafetyMode.None); + public ref short LayerWeightNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x1C17281069611331)); + get => ref _Handle.AsRef(_LayerWeightNodeIdxOffset.Value); } + private static readonly Lazy _LayerRootMotionWeightNodeIdxOffset = new(() => Schema.GetOffset(0x1C17281040566E47), LazyThreadSafetyMode.None); + public ref short LayerRootMotionWeightNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x1C17281040566E47)); + get => ref _Handle.AsRef(_LayerRootMotionWeightNodeIdxOffset.Value); } + private static readonly Lazy _LayerBoneMaskNodeIdxOffset = new(() => Schema.GetOffset(0x1C1728101BA67627), LazyThreadSafetyMode.None); + public ref short LayerBoneMaskNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x1C1728101BA67627)); + get => ref _Handle.AsRef(_LayerBoneMaskNodeIdxOffset.Value); } + private static readonly Lazy _IsOffStateOffset = new(() => Schema.GetOffset(0x1C172810291F238F), LazyThreadSafetyMode.None); + public ref bool IsOffState { - get => ref _Handle.AsRef(Schema.GetOffset(0x1C172810291F238F)); + get => ref _Handle.AsRef(_IsOffStateOffset.Value); } + private static readonly Lazy _UseActualElapsedTimeInStateForTimedEventsOffset = new(() => Schema.GetOffset(0x1C1728106B790DFA), LazyThreadSafetyMode.None); + public ref bool UseActualElapsedTimeInStateForTimedEvents { - get => ref _Handle.AsRef(Schema.GetOffset(0x1C1728106B790DFA)); + get => ref _Handle.AsRef(_UseActualElapsedTimeInStateForTimedEventsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateNode__TimedEvent_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateNode__TimedEvent_tImpl.cs index a05756b59..e6049388f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateNode__TimedEvent_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmStateNode__TimedEvent_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmStateNode__TimedEvent_tImpl : SchemaClass, CNmStateNod public CNmStateNode__TimedEvent_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _IDOffset = new(() => Schema.GetOffset(0x256373A95066900), LazyThreadSafetyMode.None); + public ref CGlobalSymbol ID { - get => ref _Handle.AsRef(Schema.GetOffset(0x256373A95066900)); + get => ref _Handle.AsRef(_IDOffset.Value); } + private static readonly Lazy _TimeValueSecondsOffset = new(() => Schema.GetOffset(0x256373A3B175F1C), LazyThreadSafetyMode.None); + public ref float TimeValueSeconds { - get => ref _Handle.AsRef(Schema.GetOffset(0x256373A3B175F1C)); + get => ref _Handle.AsRef(_TimeValueSecondsOffset.Value); } + private static readonly Lazy _ComparisionOperatorOffset = new(() => Schema.GetOffset(0x256373A5C6D84A1), LazyThreadSafetyMode.None); + public ref CNmStateNode__TimedEvent_t__Comparison_t ComparisionOperator { - get => ref _Handle.AsRef(Schema.GetOffset(0x256373A5C6D84A1)); + get => ref _Handle.AsRef(_ComparisionOperatorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSyncEventIndexConditionNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSyncEventIndexConditionNode__CDefinitionImpl.cs index bdf33153c..4e00f97ff 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSyncEventIndexConditionNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSyncEventIndexConditionNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmSyncEventIndexConditionNode__CDefinitionImpl : CNmBool public CNmSyncEventIndexConditionNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceStateNodeIdxOffset = new(() => Schema.GetOffset(0x343CD5DB63F0228C), LazyThreadSafetyMode.None); + public ref short SourceStateNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x343CD5DB63F0228C)); + get => ref _Handle.AsRef(_SourceStateNodeIdxOffset.Value); } + private static readonly Lazy _TriggerModeOffset = new(() => Schema.GetOffset(0x343CD5DB0431A60C), LazyThreadSafetyMode.None); + public ref CNmSyncEventIndexConditionNode__TriggerMode_t TriggerMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x343CD5DB0431A60C)); + get => ref _Handle.AsRef(_TriggerModeOffset.Value); } + private static readonly Lazy _SyncEventIdxOffset = new(() => Schema.GetOffset(0x343CD5DBC84F66C9), LazyThreadSafetyMode.None); + public ref int SyncEventIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x343CD5DBC84F66C9)); + get => ref _Handle.AsRef(_SyncEventIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSyncTrackImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSyncTrackImpl.cs index e6a1a03ee..eace31c2a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSyncTrackImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSyncTrackImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmSyncTrackImpl : SchemaClass, CNmSyncTrack { public CNmSyncTrackImpl(nint handle) : base(handle) { } + private static readonly Lazy _SyncEventsOffset = new(() => Schema.GetOffset(0x29C7FA0336BAB4FF), LazyThreadSafetyMode.None); + public SchemaUntypedField SyncEvents { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x29C7FA0336BAB4FF)); + get => new SchemaUntypedField(_Handle + _SyncEventsOffset.Value); } + private static readonly Lazy _StartEventOffsetOffset = new(() => Schema.GetOffset(0x29C7FA03DDBC640E), LazyThreadSafetyMode.None); + public ref int StartEventOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x29C7FA03DDBC640E)); + get => ref _Handle.AsRef(_StartEventOffsetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSyncTrack__EventMarker_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSyncTrack__EventMarker_tImpl.cs index 0900dbecb..d4e123a83 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSyncTrack__EventMarker_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSyncTrack__EventMarker_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmSyncTrack__EventMarker_tImpl : SchemaClass, CNmSyncTra public CNmSyncTrack__EventMarker_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0x1BCC69006330E7EE), LazyThreadSafetyMode.None); + public NmPercent_t StartTime { - get => new NmPercent_tImpl(_Handle + Schema.GetOffset(0x1BCC69006330E7EE)); + get => new NmPercent_tImpl(_Handle + _StartTimeOffset.Value); } + private static readonly Lazy _IDOffset = new(() => Schema.GetOffset(0x1BCC690095066900), LazyThreadSafetyMode.None); + public ref CGlobalSymbol ID { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BCC690095066900)); + get => ref _Handle.AsRef(_IDOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSyncTrack__Event_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSyncTrack__Event_tImpl.cs index 6a9876f00..9190e5100 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSyncTrack__Event_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmSyncTrack__Event_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmSyncTrack__Event_tImpl : SchemaClass, CNmSyncTrack__Ev public CNmSyncTrack__Event_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _IDOffset = new(() => Schema.GetOffset(0x8B8C5B0A95066900), LazyThreadSafetyMode.None); + public ref CGlobalSymbol ID { - get => ref _Handle.AsRef(Schema.GetOffset(0x8B8C5B0A95066900)); + get => ref _Handle.AsRef(_IDOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0x8B8C5B0A6330E7EE), LazyThreadSafetyMode.None); + public NmPercent_t StartTime { - get => new NmPercent_tImpl(_Handle + Schema.GetOffset(0x8B8C5B0A6330E7EE)); + get => new NmPercent_tImpl(_Handle + _StartTimeOffset.Value); } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0x8B8C5B0A3D9FF5AD), LazyThreadSafetyMode.None); + public NmPercent_t Duration { - get => new NmPercent_tImpl(_Handle + Schema.GetOffset(0x8B8C5B0A3D9FF5AD)); + get => new NmPercent_tImpl(_Handle + _DurationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetImpl.cs index a80d8d517..dda74abe6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CNmTargetImpl : SchemaClass, CNmTarget { public CNmTargetImpl(nint handle) : base(handle) { } + private static readonly Lazy _TransformOffset = new(() => Schema.GetOffset(0xA3F5A45E3A9A393B), LazyThreadSafetyMode.None); + public ref CTransform Transform { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3F5A45E3A9A393B)); + get => ref _Handle.AsRef(_TransformOffset.Value); } + private static readonly Lazy _BoneIDOffset = new(() => Schema.GetOffset(0xA3F5A45E88DFA0E2), LazyThreadSafetyMode.None); + public ref CGlobalSymbol BoneID { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3F5A45E88DFA0E2)); + get => ref _Handle.AsRef(_BoneIDOffset.Value); } + private static readonly Lazy _IsBoneTargetOffset = new(() => Schema.GetOffset(0xA3F5A45E3C414BA2), LazyThreadSafetyMode.None); + public ref bool IsBoneTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3F5A45E3C414BA2)); + get => ref _Handle.AsRef(_IsBoneTargetOffset.Value); } + private static readonly Lazy _IsUsingBoneSpaceOffsetsOffset = new(() => Schema.GetOffset(0xA3F5A45EA6050C83), LazyThreadSafetyMode.None); + public ref bool IsUsingBoneSpaceOffsets { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3F5A45EA6050C83)); + get => ref _Handle.AsRef(_IsUsingBoneSpaceOffsetsOffset.Value); } + private static readonly Lazy _HasOffsetsOffset = new(() => Schema.GetOffset(0xA3F5A45ED8AA05D9), LazyThreadSafetyMode.None); + public ref bool HasOffsets { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3F5A45ED8AA05D9)); + get => ref _Handle.AsRef(_HasOffsetsOffset.Value); } + private static readonly Lazy _IsSetOffset = new(() => Schema.GetOffset(0xA3F5A45E4307E3B3), LazyThreadSafetyMode.None); + public ref bool IsSet { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3F5A45E4307E3B3)); + get => ref _Handle.AsRef(_IsSetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetInfoNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetInfoNode__CDefinitionImpl.cs index a07c9569f..8903c23fa 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetInfoNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetInfoNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CNmTargetInfoNode__CDefinitionImpl : CNmFloatValueNode__C public CNmTargetInfoNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x2288EABA95E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x2288EABA95E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _InfoTypeOffset = new(() => Schema.GetOffset(0x2288EABACE6BA20D), LazyThreadSafetyMode.None); + public ref CNmTargetInfoNode__Info_t InfoType { - get => ref _Handle.AsRef(Schema.GetOffset(0x2288EABACE6BA20D)); + get => ref _Handle.AsRef(_InfoTypeOffset.Value); } + private static readonly Lazy _IsWorldSpaceTargetOffset = new(() => Schema.GetOffset(0x2288EABAB81D53F2), LazyThreadSafetyMode.None); + public ref bool IsWorldSpaceTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0x2288EABAB81D53F2)); + get => ref _Handle.AsRef(_IsWorldSpaceTargetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetOffsetNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetOffsetNode__CDefinitionImpl.cs index 0bdd58b10..c0ebbdc41 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetOffsetNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetOffsetNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CNmTargetOffsetNode__CDefinitionImpl : CNmTargetValueNode public CNmTargetOffsetNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x33F484EF95E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x33F484EF95E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _IsBoneSpaceOffsetOffset = new(() => Schema.GetOffset(0x33F484EF7B33F588), LazyThreadSafetyMode.None); + public ref bool IsBoneSpaceOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x33F484EF7B33F588)); + get => ref _Handle.AsRef(_IsBoneSpaceOffsetOffset.Value); } + private static readonly Lazy _RotationOffsetOffset = new(() => Schema.GetOffset(0x33F484EFD70314A4), LazyThreadSafetyMode.None); + public ref Quaternion RotationOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x33F484EFD70314A4)); + get => ref _Handle.AsRef(_RotationOffsetOffset.Value); } + private static readonly Lazy _TranslationOffsetOffset = new(() => Schema.GetOffset(0x33F484EF1ABA9777), LazyThreadSafetyMode.None); + public ref Vector TranslationOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x33F484EF1ABA9777)); + get => ref _Handle.AsRef(_TranslationOffsetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetPointNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetPointNode__CDefinitionImpl.cs index 0ecebae13..a2b29243e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetPointNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetPointNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmTargetPointNode__CDefinitionImpl : CNmVectorValueNode_ public CNmTargetPointNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0xCF5C70C495E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xCF5C70C495E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _IsWorldSpaceTargetOffset = new(() => Schema.GetOffset(0xCF5C70C4B81D53F2), LazyThreadSafetyMode.None); + public ref bool IsWorldSpaceTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0xCF5C70C4B81D53F2)); + get => ref _Handle.AsRef(_IsWorldSpaceTargetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetValueNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetValueNode__CDefinitionImpl.cs index ca296b4ca..2dbbbe361 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetValueNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetValueNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetWarpEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetWarpEventImpl.cs index 26fcb714c..53620d641 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetWarpEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetWarpEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmTargetWarpEventImpl : CNmEventImpl, CNmTargetWarpEvent public CNmTargetWarpEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _RuleOffset = new(() => Schema.GetOffset(0x573F0894BA097173), LazyThreadSafetyMode.None); + public ref NmTargetWarpRule_t Rule { - get => ref _Handle.AsRef(Schema.GetOffset(0x573F0894BA097173)); + get => ref _Handle.AsRef(_RuleOffset.Value); } + private static readonly Lazy _AlgorithmOffset = new(() => Schema.GetOffset(0x573F0894265CAE8A), LazyThreadSafetyMode.None); + public ref NmTargetWarpAlgorithm_t Algorithm { - get => ref _Handle.AsRef(Schema.GetOffset(0x573F0894265CAE8A)); + get => ref _Handle.AsRef(_AlgorithmOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetWarpNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetWarpNode__CDefinitionImpl.cs index 99687cc68..3616dad6c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetWarpNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTargetWarpNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class CNmTargetWarpNode__CDefinitionImpl : CNmPoseNode__CDefini public CNmTargetWarpNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ClipReferenceNodeIdxOffset = new(() => Schema.GetOffset(0xEA16BCF061EC8947), LazyThreadSafetyMode.None); + public ref short ClipReferenceNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA16BCF061EC8947)); + get => ref _Handle.AsRef(_ClipReferenceNodeIdxOffset.Value); } + private static readonly Lazy _TargetValueNodeIdxOffset = new(() => Schema.GetOffset(0xEA16BCF0A040C7E8), LazyThreadSafetyMode.None); + public ref short TargetValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA16BCF0A040C7E8)); + get => ref _Handle.AsRef(_TargetValueNodeIdxOffset.Value); } + private static readonly Lazy _SamplingModeOffset = new(() => Schema.GetOffset(0xEA16BCF0DDB31BE3), LazyThreadSafetyMode.None); + public ref CNmRootMotionData__SamplingMode_t SamplingMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA16BCF0DDB31BE3)); + get => ref _Handle.AsRef(_SamplingModeOffset.Value); } + private static readonly Lazy _AllowTargetUpdateOffset = new(() => Schema.GetOffset(0xEA16BCF08A9C0712), LazyThreadSafetyMode.None); + public ref bool AllowTargetUpdate { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA16BCF08A9C0712)); + get => ref _Handle.AsRef(_AllowTargetUpdateOffset.Value); } + private static readonly Lazy _SamplingPositionErrorThresholdSqOffset = new(() => Schema.GetOffset(0xEA16BCF0C538C7A0), LazyThreadSafetyMode.None); + public ref float SamplingPositionErrorThresholdSq { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA16BCF0C538C7A0)); + get => ref _Handle.AsRef(_SamplingPositionErrorThresholdSqOffset.Value); } + private static readonly Lazy _MaxTangentLengthOffset = new(() => Schema.GetOffset(0xEA16BCF046EAA410), LazyThreadSafetyMode.None); + public ref float MaxTangentLength { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA16BCF046EAA410)); + get => ref _Handle.AsRef(_MaxTangentLengthOffset.Value); } + private static readonly Lazy _LerpFallbackDistanceThresholdOffset = new(() => Schema.GetOffset(0xEA16BCF0BBC41F32), LazyThreadSafetyMode.None); + public ref float LerpFallbackDistanceThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA16BCF0BBC41F32)); + get => ref _Handle.AsRef(_LerpFallbackDistanceThresholdOffset.Value); } + private static readonly Lazy _TargetUpdateDistanceThresholdOffset = new(() => Schema.GetOffset(0xEA16BCF074F10F17), LazyThreadSafetyMode.None); + public ref float TargetUpdateDistanceThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA16BCF074F10F17)); + get => ref _Handle.AsRef(_TargetUpdateDistanceThresholdOffset.Value); } + private static readonly Lazy _TargetUpdateAngleThresholdRadiansOffset = new(() => Schema.GetOffset(0xEA16BCF09A1C1D31), LazyThreadSafetyMode.None); + public ref float TargetUpdateAngleThresholdRadians { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA16BCF09A1C1D31)); + get => ref _Handle.AsRef(_TargetUpdateAngleThresholdRadiansOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTimeConditionNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTimeConditionNode__CDefinitionImpl.cs index ffe35b588..1f418f58a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTimeConditionNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTimeConditionNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CNmTimeConditionNode__CDefinitionImpl : CNmBoolValueNode_ public CNmTimeConditionNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceStateNodeIdxOffset = new(() => Schema.GetOffset(0x421E2145D1DB8128), LazyThreadSafetyMode.None); + public ref short SourceStateNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x421E2145D1DB8128)); + get => ref _Handle.AsRef(_SourceStateNodeIdxOffset.Value); } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x421E214595E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x421E214595E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _ComparandOffset = new(() => Schema.GetOffset(0x421E21450CF10B48), LazyThreadSafetyMode.None); + public ref float Comparand { - get => ref _Handle.AsRef(Schema.GetOffset(0x421E21450CF10B48)); + get => ref _Handle.AsRef(_ComparandOffset.Value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x421E21450F04B4ED), LazyThreadSafetyMode.None); + public ref CNmTimeConditionNode__ComparisonType_t Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x421E21450F04B4ED)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _OperatorOffset = new(() => Schema.GetOffset(0x421E21458ABE049D), LazyThreadSafetyMode.None); + public ref CNmTimeConditionNode__Operator_t Operator { - get => ref _Handle.AsRef(Schema.GetOffset(0x421E21458ABE049D)); + get => ref _Handle.AsRef(_OperatorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTransitionEventConditionNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTransitionEventConditionNode__CDefinitionImpl.cs index 2223f8782..08cace46c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTransitionEventConditionNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTransitionEventConditionNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CNmTransitionEventConditionNode__CDefinitionImpl : CNmBoo public CNmTransitionEventConditionNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _RequireRuleIDOffset = new(() => Schema.GetOffset(0x874AC07F75BFD237), LazyThreadSafetyMode.None); + public ref CGlobalSymbol RequireRuleID { - get => ref _Handle.AsRef(Schema.GetOffset(0x874AC07F75BFD237)); + get => ref _Handle.AsRef(_RequireRuleIDOffset.Value); } + private static readonly Lazy _EventConditionRulesOffset = new(() => Schema.GetOffset(0x874AC07FA904315F), LazyThreadSafetyMode.None); + public CNmBitFlags EventConditionRules { - get => new CNmBitFlagsImpl(_Handle + Schema.GetOffset(0x874AC07FA904315F)); + get => new CNmBitFlagsImpl(_Handle + _EventConditionRulesOffset.Value); } + private static readonly Lazy _SourceStateNodeIdxOffset = new(() => Schema.GetOffset(0x874AC07F63F0228C), LazyThreadSafetyMode.None); + public ref short SourceStateNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x874AC07F63F0228C)); + get => ref _Handle.AsRef(_SourceStateNodeIdxOffset.Value); } + private static readonly Lazy _RuleConditionOffset = new(() => Schema.GetOffset(0x874AC07FE5B98074), LazyThreadSafetyMode.None); + public ref NmTransitionRuleCondition_t RuleCondition { - get => ref _Handle.AsRef(Schema.GetOffset(0x874AC07FE5B98074)); + get => ref _Handle.AsRef(_RuleConditionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTransitionEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTransitionEventImpl.cs index 41f19c85b..b5e969499 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTransitionEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTransitionEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmTransitionEventImpl : CNmEventImpl, CNmTransitionEvent public CNmTransitionEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _RuleOffset = new(() => Schema.GetOffset(0x11493D8CBA097173), LazyThreadSafetyMode.None); + public ref NmTransitionRule_t Rule { - get => ref _Handle.AsRef(Schema.GetOffset(0x11493D8CBA097173)); + get => ref _Handle.AsRef(_RuleOffset.Value); } + private static readonly Lazy _IDOffset = new(() => Schema.GetOffset(0x11493D8C95066900), LazyThreadSafetyMode.None); + public ref CGlobalSymbol ID { - get => ref _Handle.AsRef(Schema.GetOffset(0x11493D8C95066900)); + get => ref _Handle.AsRef(_IDOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTransitionNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTransitionNode__CDefinitionImpl.cs index 45497d9df..5af892471 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTransitionNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTransitionNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class CNmTransitionNode__CDefinitionImpl : CNmPoseNode__CDefini public CNmTransitionNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetStateNodeIdxOffset = new(() => Schema.GetOffset(0x23B71EF8DE6A1B64), LazyThreadSafetyMode.None); + public ref short TargetStateNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x23B71EF8DE6A1B64)); + get => ref _Handle.AsRef(_TargetStateNodeIdxOffset.Value); } + private static readonly Lazy _DurationOverrideNodeIdxOffset = new(() => Schema.GetOffset(0x23B71EF8435EE64C), LazyThreadSafetyMode.None); + public ref short DurationOverrideNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x23B71EF8435EE64C)); + get => ref _Handle.AsRef(_DurationOverrideNodeIdxOffset.Value); } + private static readonly Lazy _TimeOffsetOverrideNodeIdxOffset = new(() => Schema.GetOffset(0x23B71EF87B4CE92E), LazyThreadSafetyMode.None); + public ref short TimeOffsetOverrideNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x23B71EF87B4CE92E)); + get => ref _Handle.AsRef(_TimeOffsetOverrideNodeIdxOffset.Value); } + private static readonly Lazy _StartBoneMaskNodeIdxOffset = new(() => Schema.GetOffset(0x23B71EF8EF270494), LazyThreadSafetyMode.None); + public ref short StartBoneMaskNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x23B71EF8EF270494)); + get => ref _Handle.AsRef(_StartBoneMaskNodeIdxOffset.Value); } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0x23B71EF8BC5E3BAB), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0x23B71EF8BC5E3BAB)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _BoneMaskBlendInTimePercentageOffset = new(() => Schema.GetOffset(0x23B71EF83CBCEB24), LazyThreadSafetyMode.None); + public NmPercent_t BoneMaskBlendInTimePercentage { - get => new NmPercent_tImpl(_Handle + Schema.GetOffset(0x23B71EF83CBCEB24)); + get => new NmPercent_tImpl(_Handle + _BoneMaskBlendInTimePercentageOffset.Value); } + private static readonly Lazy _TimeOffsetOffset = new(() => Schema.GetOffset(0x23B71EF86F4EE629), LazyThreadSafetyMode.None); + public ref float TimeOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x23B71EF86F4EE629)); + get => ref _Handle.AsRef(_TimeOffsetOffset.Value); } + private static readonly Lazy _TransitionOptionsOffset = new(() => Schema.GetOffset(0x23B71EF8875C9EAC), LazyThreadSafetyMode.None); + public CNmBitFlags TransitionOptions { - get => new CNmBitFlagsImpl(_Handle + Schema.GetOffset(0x23B71EF8875C9EAC)); + get => new CNmBitFlagsImpl(_Handle + _TransitionOptionsOffset.Value); } + private static readonly Lazy _TargetSyncIDNodeIdxOffset = new(() => Schema.GetOffset(0x23B71EF8A952D9BD), LazyThreadSafetyMode.None); + public ref short TargetSyncIDNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x23B71EF8A952D9BD)); + get => ref _Handle.AsRef(_TargetSyncIDNodeIdxOffset.Value); } + private static readonly Lazy _BlendWeightEasingOffset = new(() => Schema.GetOffset(0x23B71EF8E7454DC5), LazyThreadSafetyMode.None); + public ref NmEasingOperation_t BlendWeightEasing { - get => ref _Handle.AsRef(Schema.GetOffset(0x23B71EF8E7454DC5)); + get => ref _Handle.AsRef(_BlendWeightEasingOffset.Value); } + private static readonly Lazy _RootMotionBlendOffset = new(() => Schema.GetOffset(0x23B71EF88DADB2AE), LazyThreadSafetyMode.None); + public ref NmRootMotionBlendMode_t RootMotionBlend { - get => ref _Handle.AsRef(Schema.GetOffset(0x23B71EF88DADB2AE)); + get => ref _Handle.AsRef(_RootMotionBlendOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTwoBoneIKNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTwoBoneIKNode__CDefinitionImpl.cs index 624cc0642..5875a2116 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTwoBoneIKNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmTwoBoneIKNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CNmTwoBoneIKNode__CDefinitionImpl : CNmPassthroughNode__C public CNmTwoBoneIKNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _EffectorBoneIDOffset = new(() => Schema.GetOffset(0x4D36C61F7F221CB6), LazyThreadSafetyMode.None); + public ref CGlobalSymbol EffectorBoneID { - get => ref _Handle.AsRef(Schema.GetOffset(0x4D36C61F7F221CB6)); + get => ref _Handle.AsRef(_EffectorBoneIDOffset.Value); } + private static readonly Lazy _EffectorTargetNodeIdxOffset = new(() => Schema.GetOffset(0x4D36C61FD6B9B943), LazyThreadSafetyMode.None); + public ref short EffectorTargetNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x4D36C61FD6B9B943)); + get => ref _Handle.AsRef(_EffectorTargetNodeIdxOffset.Value); } + private static readonly Lazy _EnabledNodeIdxOffset = new(() => Schema.GetOffset(0x4D36C61FF7CDF5E9), LazyThreadSafetyMode.None); + public ref short EnabledNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x4D36C61FF7CDF5E9)); + get => ref _Handle.AsRef(_EnabledNodeIdxOffset.Value); } + private static readonly Lazy _BlendTimeSecondsOffset = new(() => Schema.GetOffset(0x4D36C61F6D3A08FC), LazyThreadSafetyMode.None); + public ref float BlendTimeSeconds { - get => ref _Handle.AsRef(Schema.GetOffset(0x4D36C61F6D3A08FC)); + get => ref _Handle.AsRef(_BlendTimeSecondsOffset.Value); } + private static readonly Lazy _BlendModeOffset = new(() => Schema.GetOffset(0x4D36C61F8D5006AB), LazyThreadSafetyMode.None); + public ref NmIKBlendMode_t BlendMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x4D36C61F8D5006AB)); + get => ref _Handle.AsRef(_BlendModeOffset.Value); } + private static readonly Lazy _IsTargetInWorldSpaceOffset = new(() => Schema.GetOffset(0x4D36C61F5F56E0C5), LazyThreadSafetyMode.None); + public ref bool IsTargetInWorldSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x4D36C61F5F56E0C5)); + get => ref _Handle.AsRef(_IsTargetInWorldSpaceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmValueNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmValueNode__CDefinitionImpl.cs index 7ea4e863f..b82a9f1cd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmValueNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmValueNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVectorCreateNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVectorCreateNode__CDefinitionImpl.cs index c3554db23..64a02c7aa 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVectorCreateNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVectorCreateNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CNmVectorCreateNode__CDefinitionImpl : CNmVectorValueNode public CNmVectorCreateNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputVectorValueNodeIdxOffset = new(() => Schema.GetOffset(0xA7AE86C01EF0C864), LazyThreadSafetyMode.None); + public ref short InputVectorValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xA7AE86C01EF0C864)); + get => ref _Handle.AsRef(_InputVectorValueNodeIdxOffset.Value); } + private static readonly Lazy _InputValueXNodeIdxOffset = new(() => Schema.GetOffset(0xA7AE86C0F25367BB), LazyThreadSafetyMode.None); + public ref short InputValueXNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xA7AE86C0F25367BB)); + get => ref _Handle.AsRef(_InputValueXNodeIdxOffset.Value); } + private static readonly Lazy _InputValueYNodeIdxOffset = new(() => Schema.GetOffset(0xA7AE86C0D056A5E2), LazyThreadSafetyMode.None); + public ref short InputValueYNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xA7AE86C0D056A5E2)); + get => ref _Handle.AsRef(_InputValueYNodeIdxOffset.Value); } + private static readonly Lazy _InputValueZNodeIdxOffset = new(() => Schema.GetOffset(0xA7AE86C05ED1BD45), LazyThreadSafetyMode.None); + public ref short InputValueZNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xA7AE86C05ED1BD45)); + get => ref _Handle.AsRef(_InputValueZNodeIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVectorInfoNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVectorInfoNode__CDefinitionImpl.cs index f4cd5a1c5..2a4778ae6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVectorInfoNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVectorInfoNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CNmVectorInfoNode__CDefinitionImpl : CNmFloatValueNode__C public CNmVectorInfoNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0x80D82BB895E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x80D82BB895E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } + private static readonly Lazy _DesiredInfoOffset = new(() => Schema.GetOffset(0x80D82BB838B16675), LazyThreadSafetyMode.None); + public ref CNmVectorInfoNode__Info_t DesiredInfo { - get => ref _Handle.AsRef(Schema.GetOffset(0x80D82BB838B16675)); + get => ref _Handle.AsRef(_DesiredInfoOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVectorNegateNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVectorNegateNode__CDefinitionImpl.cs index da14dc57b..aef68dd41 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVectorNegateNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVectorNegateNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmVectorNegateNode__CDefinitionImpl : CNmVectorValueNode public CNmVectorNegateNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueNodeIdxOffset = new(() => Schema.GetOffset(0xAC99508E95E89F27), LazyThreadSafetyMode.None); + public ref short InputValueNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xAC99508E95E89F27)); + get => ref _Handle.AsRef(_InputValueNodeIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVectorValueNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVectorValueNode__CDefinitionImpl.cs index 9614ec9e0..bc33a85f7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVectorValueNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVectorValueNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVelocityBasedSpeedScaleNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVelocityBasedSpeedScaleNode__CDefinitionImpl.cs index 85a9e538e..889cc3b3a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVelocityBasedSpeedScaleNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVelocityBasedSpeedScaleNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVelocityBlendNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVelocityBlendNode__CDefinitionImpl.cs index 61a4a76b6..9ec48c392 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVelocityBlendNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVelocityBlendNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterBoneMaskNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterBoneMaskNode__CDefinitionImpl.cs index 4ba277c4a..6845fd7f1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterBoneMaskNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterBoneMaskNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmVirtualParameterBoneMaskNode__CDefinitionImpl : CNmBon public CNmVirtualParameterBoneMaskNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildNodeIdxOffset = new(() => Schema.GetOffset(0x4C267E9D5C29A73C), LazyThreadSafetyMode.None); + public ref short ChildNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C267E9D5C29A73C)); + get => ref _Handle.AsRef(_ChildNodeIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterBoolNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterBoolNode__CDefinitionImpl.cs index 1761edb2b..f89f32dcd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterBoolNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterBoolNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmVirtualParameterBoolNode__CDefinitionImpl : CNmBoolVal public CNmVirtualParameterBoolNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildNodeIdxOffset = new(() => Schema.GetOffset(0xA28816AF5C29A73C), LazyThreadSafetyMode.None); + public ref short ChildNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xA28816AF5C29A73C)); + get => ref _Handle.AsRef(_ChildNodeIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterFloatNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterFloatNode__CDefinitionImpl.cs index f05a97cb3..c6a5c9d04 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterFloatNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterFloatNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmVirtualParameterFloatNode__CDefinitionImpl : CNmFloatV public CNmVirtualParameterFloatNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildNodeIdxOffset = new(() => Schema.GetOffset(0x29E3EB575C29A73C), LazyThreadSafetyMode.None); + public ref short ChildNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x29E3EB575C29A73C)); + get => ref _Handle.AsRef(_ChildNodeIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterIDNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterIDNode__CDefinitionImpl.cs index 20819d284..a7186aa12 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterIDNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterIDNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmVirtualParameterIDNode__CDefinitionImpl : CNmIDValueNo public CNmVirtualParameterIDNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildNodeIdxOffset = new(() => Schema.GetOffset(0xE010C6705C29A73C), LazyThreadSafetyMode.None); + public ref short ChildNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xE010C6705C29A73C)); + get => ref _Handle.AsRef(_ChildNodeIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterTargetNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterTargetNode__CDefinitionImpl.cs index ef8dbe4ae..044597b42 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterTargetNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterTargetNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmVirtualParameterTargetNode__CDefinitionImpl : CNmTarge public CNmVirtualParameterTargetNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildNodeIdxOffset = new(() => Schema.GetOffset(0xB17F7CE05C29A73C), LazyThreadSafetyMode.None); + public ref short ChildNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xB17F7CE05C29A73C)); + get => ref _Handle.AsRef(_ChildNodeIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterVectorNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterVectorNode__CDefinitionImpl.cs index 028e8ded8..686e2c085 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterVectorNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmVirtualParameterVectorNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CNmVirtualParameterVectorNode__CDefinitionImpl : CNmVecto public CNmVirtualParameterVectorNode__CDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildNodeIdxOffset = new(() => Schema.GetOffset(0xDD34E2D25C29A73C), LazyThreadSafetyMode.None); + public ref short ChildNodeIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xDD34E2D25C29A73C)); + get => ref _Handle.AsRef(_ChildNodeIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmZeroPoseNode__CDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmZeroPoseNode__CDefinitionImpl.cs index 2aa763d4a..e53327d74 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmZeroPoseNode__CDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmZeroPoseNode__CDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmZeroPoseTaskImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmZeroPoseTaskImpl.cs index 643b5882d..ac429d3a5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmZeroPoseTaskImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNmZeroPoseTaskImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNullEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNullEntityImpl.cs index 122c6ed12..3a1345eec 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNullEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CNullEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/COmniLightImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/COmniLightImpl.cs index 4a705a175..a008aada3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/COmniLightImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/COmniLightImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class COmniLightImpl : CBarnLightImpl, COmniLight { public COmniLightImpl(nint handle) : base(handle) { } + private static readonly Lazy _InnerAngleOffset = new(() => Schema.GetOffset(0x46F0D2E5142C32F4), LazyThreadSafetyMode.None); + public ref float InnerAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0x46F0D2E5142C32F4)); + get => ref _Handle.AsRef(_InnerAngleOffset.Value); } + private static readonly Lazy _OuterAngleOffset = new(() => Schema.GetOffset(0x46F0D2E5ECB8B519), LazyThreadSafetyMode.None); + public ref float OuterAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0x46F0D2E5ECB8B519)); + get => ref _Handle.AsRef(_OuterAngleOffset.Value); } + private static readonly Lazy _ShowLightOffset = new(() => Schema.GetOffset(0x46F0D2E5D67BC720), LazyThreadSafetyMode.None); + public ref bool ShowLight { - get => ref _Handle.AsRef(Schema.GetOffset(0x46F0D2E5D67BC720)); + get => ref _Handle.AsRef(_ShowLightOffset.Value); } public void InnerAngleUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/COrientConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/COrientConstraintImpl.cs index 4f3d7cc81..2728e0e97 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/COrientConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/COrientConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/COrientationWarpUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/COrientationWarpUpdateNodeImpl.cs index b45410b03..73cae3ac5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/COrientationWarpUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/COrientationWarpUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,70 @@ internal partial class COrientationWarpUpdateNodeImpl : CUnaryUpdateNodeImpl, CO public COrientationWarpUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModeOffset = new(() => Schema.GetOffset(0xD75D3B631050A633), LazyThreadSafetyMode.None); + public ref OrientationWarpMode_t Mode { - get => ref _Handle.AsRef(Schema.GetOffset(0xD75D3B631050A633)); + get => ref _Handle.AsRef(_ModeOffset.Value); } + private static readonly Lazy _TargetParamOffset = new(() => Schema.GetOffset(0xD75D3B63D85B45EB), LazyThreadSafetyMode.None); + public CAnimParamHandle TargetParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xD75D3B63D85B45EB)); + get => new CAnimParamHandleImpl(_Handle + _TargetParamOffset.Value); } + private static readonly Lazy _TargetPositionParamOffset = new(() => Schema.GetOffset(0xD75D3B63550BBF72), LazyThreadSafetyMode.None); + public CAnimParamHandle TargetPositionParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xD75D3B63550BBF72)); + get => new CAnimParamHandleImpl(_Handle + _TargetPositionParamOffset.Value); } + private static readonly Lazy _FallbackTargetPositionParamOffset = new(() => Schema.GetOffset(0xD75D3B63E8F94D78), LazyThreadSafetyMode.None); + public CAnimParamHandle FallbackTargetPositionParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xD75D3B63E8F94D78)); + get => new CAnimParamHandleImpl(_Handle + _FallbackTargetPositionParamOffset.Value); } + private static readonly Lazy _TargetOffsetModeOffset = new(() => Schema.GetOffset(0xD75D3B63487B121D), LazyThreadSafetyMode.None); + public ref OrientationWarpTargetOffsetMode_t TargetOffsetMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xD75D3B63487B121D)); + get => ref _Handle.AsRef(_TargetOffsetModeOffset.Value); } + private static readonly Lazy _TargetOffsetOffset = new(() => Schema.GetOffset(0xD75D3B6354596915), LazyThreadSafetyMode.None); + public ref float TargetOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xD75D3B6354596915)); + get => ref _Handle.AsRef(_TargetOffsetOffset.Value); } + private static readonly Lazy _TargetOffsetParamOffset = new(() => Schema.GetOffset(0xD75D3B63BA3F5E7A), LazyThreadSafetyMode.None); + public CAnimParamHandle TargetOffsetParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xD75D3B63BA3F5E7A)); + get => new CAnimParamHandleImpl(_Handle + _TargetOffsetParamOffset.Value); } + private static readonly Lazy _DampingOffset = new(() => Schema.GetOffset(0xD75D3B6315440FB5), LazyThreadSafetyMode.None); + public CAnimInputDamping Damping { - get => new CAnimInputDampingImpl(_Handle + Schema.GetOffset(0xD75D3B6315440FB5)); + get => new CAnimInputDampingImpl(_Handle + _DampingOffset.Value); } + private static readonly Lazy _RootMotionSourceOffset = new(() => Schema.GetOffset(0xD75D3B6398FEE9D7), LazyThreadSafetyMode.None); + public ref OrientationWarpRootMotionSource_t RootMotionSource { - get => ref _Handle.AsRef(Schema.GetOffset(0xD75D3B6398FEE9D7)); + get => ref _Handle.AsRef(_RootMotionSourceOffset.Value); } + private static readonly Lazy _MaxRootMotionScaleOffset = new(() => Schema.GetOffset(0xD75D3B6342F361DD), LazyThreadSafetyMode.None); + public ref float MaxRootMotionScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xD75D3B6342F361DD)); + get => ref _Handle.AsRef(_MaxRootMotionScaleOffset.Value); } + private static readonly Lazy _EnablePreferredRotationDirectionOffset = new(() => Schema.GetOffset(0xD75D3B63AA7BFB6E), LazyThreadSafetyMode.None); + public ref bool EnablePreferredRotationDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0xD75D3B63AA7BFB6E)); + get => ref _Handle.AsRef(_EnablePreferredRotationDirectionOffset.Value); } + private static readonly Lazy _PreferredRotationDirectionOffset = new(() => Schema.GetOffset(0xD75D3B633BBCBFE8), LazyThreadSafetyMode.None); + public ref AnimValueSource PreferredRotationDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0xD75D3B633BBCBFE8)); + get => ref _Handle.AsRef(_PreferredRotationDirectionOffset.Value); } + private static readonly Lazy _PreferredRotationThresholdOffset = new(() => Schema.GetOffset(0xD75D3B6397A825DD), LazyThreadSafetyMode.None); + public ref float PreferredRotationThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0xD75D3B6397A825DD)); + get => ref _Handle.AsRef(_PreferredRotationThresholdOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/COrnamentPropImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/COrnamentPropImpl.cs index dc9ccaf84..0578cc55e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/COrnamentPropImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/COrnamentPropImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class COrnamentPropImpl : CDynamicPropImpl, COrnamentProp { public COrnamentPropImpl(nint handle) : base(handle) { } + private static readonly Lazy _InitialOwnerOffset = new(() => Schema.GetOffset(0x1B8675B7BAA055D6), LazyThreadSafetyMode.None); + public string InitialOwner { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1B8675B7BAA055D6)); + var ptr = _Handle.Read(_InitialOwnerOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1B8675B7BAA055D6, value); + set => Schema.SetString(_Handle, _InitialOwnerOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPAssignment_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPAssignment_tImpl.cs index 49733caf7..429f2af98 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPAssignment_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPAssignment_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CPAssignment_tImpl : SchemaClass, CPAssignment_t { public CPAssignment_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPNumberOffset = new(() => Schema.GetOffset(0xEB6A63F032CCA91F), LazyThreadSafetyMode.None); + public ref int CPNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xEB6A63F032CCA91F)); + get => ref _Handle.AsRef(_CPNumberOffset.Value); } + private static readonly Lazy _PosOffset = new(() => Schema.GetOffset(0xEB6A63F0DFC9BE09), LazyThreadSafetyMode.None); + public CPerParticleVecInput Pos { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xEB6A63F0DFC9BE09)); + get => new CPerParticleVecInputImpl(_Handle + _PosOffset.Value); } + private static readonly Lazy _OrientationModeOffset = new(() => Schema.GetOffset(0xEB6A63F0272947BA), LazyThreadSafetyMode.None); + public ref ParticleOrientationSetMode_t OrientationMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xEB6A63F0272947BA)); + get => ref _Handle.AsRef(_OrientationModeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPairedSequenceComponentUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPairedSequenceComponentUpdaterImpl.cs index 38e1bfe2d..bad17f7ce 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPairedSequenceComponentUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPairedSequenceComponentUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPairedSequenceUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPairedSequenceUpdateNodeImpl.cs index c39abd33c..3337d58aa 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPairedSequenceUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPairedSequenceUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPairedSequenceUpdateNodeImpl : CSequenceUpdateNodeBaseIm public CPairedSequenceUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _PairedSequenceRoleOffset = new(() => Schema.GetOffset(0xB2B6F0EB4A4CFB12), LazyThreadSafetyMode.None); + public ref CGlobalSymbol PairedSequenceRole { - get => ref _Handle.AsRef(Schema.GetOffset(0xB2B6F0EB4A4CFB12)); + get => ref _Handle.AsRef(_PairedSequenceRoleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParamSpanUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParamSpanUpdaterImpl.cs index d1605cff8..7d374afc1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParamSpanUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParamSpanUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CParamSpanUpdaterImpl : SchemaClass, CParamSpanUpdater { public CParamSpanUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _SpansOffset = new(() => Schema.GetOffset(0xA35886AC66213056), LazyThreadSafetyMode.None); + public ref CUtlVector Spans { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA35886AC66213056)); + get => ref _Handle.AsRef>(_SpansOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParentConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParentConstraintImpl.cs index 5adbacf40..3c7b3f125 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParentConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParentConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleAnimTagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleAnimTagImpl.cs index 8e97fc571..ba2c6a0cd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleAnimTagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleAnimTagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,54 +17,76 @@ internal partial class CParticleAnimTagImpl : CAnimTagBaseImpl, CParticleAnimTag public CParticleAnimTagImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParticleSystemOffset = new(() => Schema.GetOffset(0x80C76F77C9C33AF8), LazyThreadSafetyMode.None); + public ref CStrongHandle ParticleSystem { - get => ref _Handle.AsRef>(Schema.GetOffset(0x80C76F77C9C33AF8)); + get => ref _Handle.AsRef>(_ParticleSystemOffset.Value); } + private static readonly Lazy _ParticleSystemNameOffset = new(() => Schema.GetOffset(0x80C76F775B35985D), LazyThreadSafetyMode.None); + public string ParticleSystemName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x80C76F775B35985D)); + var ptr = _Handle.Read(_ParticleSystemNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x80C76F775B35985D, value); + set => Schema.SetString(_Handle, _ParticleSystemNameOffset.Value, value); } + private static readonly Lazy _ConfigNameOffset = new(() => Schema.GetOffset(0x80C76F7791DC0E44), LazyThreadSafetyMode.None); + public string ConfigName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x80C76F7791DC0E44)); + var ptr = _Handle.Read(_ConfigNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x80C76F7791DC0E44, value); + set => Schema.SetString(_Handle, _ConfigNameOffset.Value, value); } + private static readonly Lazy _DetachFromOwnerOffset = new(() => Schema.GetOffset(0x80C76F77357F7C69), LazyThreadSafetyMode.None); + public ref bool DetachFromOwner { - get => ref _Handle.AsRef(Schema.GetOffset(0x80C76F77357F7C69)); + get => ref _Handle.AsRef(_DetachFromOwnerOffset.Value); } + private static readonly Lazy _AggregateOffset = new(() => Schema.GetOffset(0x80C76F77721C6688), LazyThreadSafetyMode.None); + public ref bool Aggregate { - get => ref _Handle.AsRef(Schema.GetOffset(0x80C76F77721C6688)); + get => ref _Handle.AsRef(_AggregateOffset.Value); } + private static readonly Lazy _StopWhenTagEndsOffset = new(() => Schema.GetOffset(0x80C76F77878BB46D), LazyThreadSafetyMode.None); + public ref bool StopWhenTagEnds { - get => ref _Handle.AsRef(Schema.GetOffset(0x80C76F77878BB46D)); + get => ref _Handle.AsRef(_StopWhenTagEndsOffset.Value); } + private static readonly Lazy _TagEndStopIsInstantOffset = new(() => Schema.GetOffset(0x80C76F7749C6A809), LazyThreadSafetyMode.None); + public ref bool TagEndStopIsInstant { - get => ref _Handle.AsRef(Schema.GetOffset(0x80C76F7749C6A809)); + get => ref _Handle.AsRef(_TagEndStopIsInstantOffset.Value); } + private static readonly Lazy _AttachmentNameOffset = new(() => Schema.GetOffset(0x80C76F77295DA9CB), LazyThreadSafetyMode.None); + public string AttachmentName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x80C76F77295DA9CB)); + var ptr = _Handle.Read(_AttachmentNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x80C76F77295DA9CB, value); + set => Schema.SetString(_Handle, _AttachmentNameOffset.Value, value); } + private static readonly Lazy _AttachmentTypeOffset = new(() => Schema.GetOffset(0x80C76F77778D9A00), LazyThreadSafetyMode.None); + public ref ParticleAttachment_t AttachmentType { - get => ref _Handle.AsRef(Schema.GetOffset(0x80C76F77778D9A00)); + get => ref _Handle.AsRef(_AttachmentTypeOffset.Value); } + private static readonly Lazy _AttachmentCP1NameOffset = new(() => Schema.GetOffset(0x80C76F77420E59C5), LazyThreadSafetyMode.None); + public string AttachmentCP1Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x80C76F77420E59C5)); + var ptr = _Handle.Read(_AttachmentCP1NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x80C76F77420E59C5, value); + set => Schema.SetString(_Handle, _AttachmentCP1NameOffset.Value, value); } + private static readonly Lazy _AttachmentCP1TypeOffset = new(() => Schema.GetOffset(0x80C76F77CD1D74D6), LazyThreadSafetyMode.None); + public ref ParticleAttachment_t AttachmentCP1Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x80C76F77CD1D74D6)); + get => ref _Handle.AsRef(_AttachmentCP1TypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleBindingRealPulseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleBindingRealPulseImpl.cs index 3d43119ec..a0c72319f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleBindingRealPulseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleBindingRealPulseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionBindingInstanceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionBindingInstanceImpl.cs index 355200a85..3b4adc03e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionBindingInstanceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionBindingInstanceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionFloatInputImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionFloatInputImpl.cs index d0f8bc93f..9b0c40c62 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionFloatInputImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionFloatInputImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionRendererFloatInputImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionRendererFloatInputImpl.cs index 640756d8b..6698cb9ef 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionRendererFloatInputImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionRendererFloatInputImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionRendererVecInputImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionRendererVecInputImpl.cs index 9547dd82e..bda0066ed 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionRendererVecInputImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionRendererVecInputImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionVecInputImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionVecInputImpl.cs index 26d0001a7..fc66bc4b2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionVecInputImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleCollectionVecInputImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFloatInputImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFloatInputImpl.cs index 430ee5daa..d4339f0a2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFloatInputImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFloatInputImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,156 +17,254 @@ internal partial class CParticleFloatInputImpl : CParticleInputImpl, CParticleFl public CParticleFloatInputImpl(nint handle) : base(handle) { } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x4330CD3218853D59), LazyThreadSafetyMode.None); + public ref ParticleFloatType_t Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD3218853D59)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _MapTypeOffset = new(() => Schema.GetOffset(0x4330CD3226E625A5), LazyThreadSafetyMode.None); + public ref ParticleFloatMapType_t MapType { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD3226E625A5)); + get => ref _Handle.AsRef(_MapTypeOffset.Value); } + private static readonly Lazy _LiteralValueOffset = new(() => Schema.GetOffset(0x4330CD32E7C4A627), LazyThreadSafetyMode.None); + public ref float LiteralValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD32E7C4A627)); + get => ref _Handle.AsRef(_LiteralValueOffset.Value); } + private static readonly Lazy _NamedValueOffset = new(() => Schema.GetOffset(0x4330CD32E0618727), LazyThreadSafetyMode.None); + public SchemaUntypedField NamedValue { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x4330CD32E0618727)); + get => new SchemaUntypedField(_Handle + _NamedValueOffset.Value); } + private static readonly Lazy _ControlPointOffset = new(() => Schema.GetOffset(0x4330CD320D0DDF8C), LazyThreadSafetyMode.None); + public ref int ControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD320D0DDF8C)); + get => ref _Handle.AsRef(_ControlPointOffset.Value); } + private static readonly Lazy _ScalarAttributeOffset = new(() => Schema.GetOffset(0x4330CD32263301AB), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t ScalarAttribute { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x4330CD32263301AB)); + get => new ParticleAttributeIndex_tImpl(_Handle + _ScalarAttributeOffset.Value); } + private static readonly Lazy _VectorAttributeOffset = new(() => Schema.GetOffset(0x4330CD322B36D79A), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t VectorAttribute { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x4330CD322B36D79A)); + get => new ParticleAttributeIndex_tImpl(_Handle + _VectorAttributeOffset.Value); } + private static readonly Lazy _VectorComponentOffset = new(() => Schema.GetOffset(0x4330CD324F08EE1D), LazyThreadSafetyMode.None); + public ref int VectorComponent { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD324F08EE1D)); + get => ref _Handle.AsRef(_VectorComponentOffset.Value); } + private static readonly Lazy _ReverseOrderOffset = new(() => Schema.GetOffset(0x4330CD3212C75F97), LazyThreadSafetyMode.None); + public ref bool ReverseOrder { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD3212C75F97)); + get => ref _Handle.AsRef(_ReverseOrderOffset.Value); } + private static readonly Lazy _RandomMinOffset = new(() => Schema.GetOffset(0x4330CD32C45AD7FC), LazyThreadSafetyMode.None); + public ref float RandomMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD32C45AD7FC)); + get => ref _Handle.AsRef(_RandomMinOffset.Value); } + private static readonly Lazy _RandomMaxOffset = new(() => Schema.GetOffset(0x4330CD32B24733EE), LazyThreadSafetyMode.None); + public ref float RandomMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD32B24733EE)); + get => ref _Handle.AsRef(_RandomMaxOffset.Value); } + private static readonly Lazy _HasRandomSignFlipOffset = new(() => Schema.GetOffset(0x4330CD327D74FC06), LazyThreadSafetyMode.None); + public ref bool HasRandomSignFlip { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD327D74FC06)); + get => ref _Handle.AsRef(_HasRandomSignFlipOffset.Value); } + private static readonly Lazy _RandomSeedOffset = new(() => Schema.GetOffset(0x4330CD326388F067), LazyThreadSafetyMode.None); + public ref int RandomSeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD326388F067)); + get => ref _Handle.AsRef(_RandomSeedOffset.Value); } + private static readonly Lazy _RandomModeOffset = new(() => Schema.GetOffset(0x4330CD3247E88035), LazyThreadSafetyMode.None); + public ref ParticleFloatRandomMode_t RandomMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD3247E88035)); + get => ref _Handle.AsRef(_RandomModeOffset.Value); } + private static readonly Lazy _StrSnapshotSubsetOffset = new(() => Schema.GetOffset(0x4330CD32BD8A8E5E), LazyThreadSafetyMode.None); + public string StrSnapshotSubset { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4330CD32BD8A8E5E)); + var ptr = _Handle.Read(_StrSnapshotSubsetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x4330CD32BD8A8E5E, value); + set => Schema.SetString(_Handle, _StrSnapshotSubsetOffset.Value, value); } + private static readonly Lazy _LOD0Offset = new(() => Schema.GetOffset(0x4330CD32B17B2EE6), LazyThreadSafetyMode.None); + public ref float LOD0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD32B17B2EE6)); + get => ref _Handle.AsRef(_LOD0Offset.Value); } + private static readonly Lazy _LOD1Offset = new(() => Schema.GetOffset(0x4330CD32B27B3079), LazyThreadSafetyMode.None); + public ref float LOD1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD32B27B3079)); + get => ref _Handle.AsRef(_LOD1Offset.Value); } + private static readonly Lazy _LOD2Offset = new(() => Schema.GetOffset(0x4330CD32AF7B2BC0), LazyThreadSafetyMode.None); + public ref float LOD2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD32AF7B2BC0)); + get => ref _Handle.AsRef(_LOD2Offset.Value); } + private static readonly Lazy _LOD3Offset = new(() => Schema.GetOffset(0x4330CD32B07B2D53), LazyThreadSafetyMode.None); + public ref float LOD3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD32B07B2D53)); + get => ref _Handle.AsRef(_LOD3Offset.Value); } + private static readonly Lazy _NoiseInputVectorAttributeOffset = new(() => Schema.GetOffset(0x4330CD3229C275A0), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t NoiseInputVectorAttribute { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x4330CD3229C275A0)); + get => new ParticleAttributeIndex_tImpl(_Handle + _NoiseInputVectorAttributeOffset.Value); } + private static readonly Lazy _NoiseOutputMinOffset = new(() => Schema.GetOffset(0x4330CD3221F9B712), LazyThreadSafetyMode.None); + public ref float NoiseOutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD3221F9B712)); + get => ref _Handle.AsRef(_NoiseOutputMinOffset.Value); } + private static readonly Lazy _NoiseOutputMaxOffset = new(() => Schema.GetOffset(0x4330CD322BE4AC18), LazyThreadSafetyMode.None); + public ref float NoiseOutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD322BE4AC18)); + get => ref _Handle.AsRef(_NoiseOutputMaxOffset.Value); } + private static readonly Lazy _NoiseScaleOffset = new(() => Schema.GetOffset(0x4330CD3232FE2EF3), LazyThreadSafetyMode.None); + public ref float NoiseScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD3232FE2EF3)); + get => ref _Handle.AsRef(_NoiseScaleOffset.Value); } + private static readonly Lazy _NoiseOffsetRateOffset = new(() => Schema.GetOffset(0x4330CD322D84E8CC), LazyThreadSafetyMode.None); + public ref Vector NoiseOffsetRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD322D84E8CC)); + get => ref _Handle.AsRef(_NoiseOffsetRateOffset.Value); } + private static readonly Lazy _NoiseOffsetOffset = new(() => Schema.GetOffset(0x4330CD3245B63C18), LazyThreadSafetyMode.None); + public ref float NoiseOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD3245B63C18)); + get => ref _Handle.AsRef(_NoiseOffsetOffset.Value); } + private static readonly Lazy _NoiseOctavesOffset = new(() => Schema.GetOffset(0x4330CD327781A322), LazyThreadSafetyMode.None); + public ref int NoiseOctaves { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD327781A322)); + get => ref _Handle.AsRef(_NoiseOctavesOffset.Value); } + private static readonly Lazy _NoiseTurbulenceOffset = new(() => Schema.GetOffset(0x4330CD320B63A93C), LazyThreadSafetyMode.None); + public ref PFNoiseTurbulence_t NoiseTurbulence { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD320B63A93C)); + get => ref _Handle.AsRef(_NoiseTurbulenceOffset.Value); } + private static readonly Lazy _NoiseTypeOffset = new(() => Schema.GetOffset(0x4330CD326758ED35), LazyThreadSafetyMode.None); + public ref PFNoiseType_t NoiseType { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD326758ED35)); + get => ref _Handle.AsRef(_NoiseTypeOffset.Value); } + private static readonly Lazy _NoiseModifierOffset = new(() => Schema.GetOffset(0x4330CD32C9F3EBC8), LazyThreadSafetyMode.None); + public ref PFNoiseModifier_t NoiseModifier { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD32C9F3EBC8)); + get => ref _Handle.AsRef(_NoiseModifierOffset.Value); } + private static readonly Lazy _NoiseTurbulenceScaleOffset = new(() => Schema.GetOffset(0x4330CD3209F16918), LazyThreadSafetyMode.None); + public ref float NoiseTurbulenceScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD3209F16918)); + get => ref _Handle.AsRef(_NoiseTurbulenceScaleOffset.Value); } + private static readonly Lazy _NoiseTurbulenceMixOffset = new(() => Schema.GetOffset(0x4330CD32A2E9146C), LazyThreadSafetyMode.None); + public ref float NoiseTurbulenceMix { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD32A2E9146C)); + get => ref _Handle.AsRef(_NoiseTurbulenceMixOffset.Value); } + private static readonly Lazy _NoiseImgPreviewScaleOffset = new(() => Schema.GetOffset(0x4330CD32F94C82CC), LazyThreadSafetyMode.None); + public ref float NoiseImgPreviewScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD32F94C82CC)); + get => ref _Handle.AsRef(_NoiseImgPreviewScaleOffset.Value); } + private static readonly Lazy _NoiseImgPreviewLiveOffset = new(() => Schema.GetOffset(0x4330CD327DECC7A6), LazyThreadSafetyMode.None); + public ref bool NoiseImgPreviewLive { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD327DECC7A6)); + get => ref _Handle.AsRef(_NoiseImgPreviewLiveOffset.Value); } + private static readonly Lazy _NoCameraFallbackOffset = new(() => Schema.GetOffset(0x4330CD3225458889), LazyThreadSafetyMode.None); + public ref float NoCameraFallback { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD3225458889)); + get => ref _Handle.AsRef(_NoCameraFallbackOffset.Value); } + private static readonly Lazy _UseBoundsCenterOffset = new(() => Schema.GetOffset(0x4330CD3203C783A4), LazyThreadSafetyMode.None); + public ref bool UseBoundsCenter { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD3203C783A4)); + get => ref _Handle.AsRef(_UseBoundsCenterOffset.Value); } + private static readonly Lazy _InputModeOffset = new(() => Schema.GetOffset(0x4330CD32266E8EC0), LazyThreadSafetyMode.None); + public ref ParticleFloatInputMode_t InputMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD32266E8EC0)); + get => ref _Handle.AsRef(_InputModeOffset.Value); } + private static readonly Lazy _MultFactorOffset = new(() => Schema.GetOffset(0x4330CD32ECCE8A6A), LazyThreadSafetyMode.None); + public ref float MultFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD32ECCE8A6A)); + get => ref _Handle.AsRef(_MultFactorOffset.Value); } + private static readonly Lazy _Input0Offset = new(() => Schema.GetOffset(0x4330CD32EADA2FB7), LazyThreadSafetyMode.None); + public ref float Input0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD32EADA2FB7)); + get => ref _Handle.AsRef(_Input0Offset.Value); } + private static readonly Lazy _Input1Offset = new(() => Schema.GetOffset(0x4330CD32E9DA2E24), LazyThreadSafetyMode.None); + public ref float Input1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD32E9DA2E24)); + get => ref _Handle.AsRef(_Input1Offset.Value); } + private static readonly Lazy _Output0Offset = new(() => Schema.GetOffset(0x4330CD32760A07D6), LazyThreadSafetyMode.None); + public ref float Output0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD32760A07D6)); + get => ref _Handle.AsRef(_Output0Offset.Value); } + private static readonly Lazy _Output1Offset = new(() => Schema.GetOffset(0x4330CD32770A0969), LazyThreadSafetyMode.None); + public ref float Output1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD32770A0969)); + get => ref _Handle.AsRef(_Output1Offset.Value); } + private static readonly Lazy _NotchedRangeMinOffset = new(() => Schema.GetOffset(0x4330CD3228E87189), LazyThreadSafetyMode.None); + public ref float NotchedRangeMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD3228E87189)); + get => ref _Handle.AsRef(_NotchedRangeMinOffset.Value); } + private static readonly Lazy _NotchedRangeMaxOffset = new(() => Schema.GetOffset(0x4330CD321AD4D3C7), LazyThreadSafetyMode.None); + public ref float NotchedRangeMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD321AD4D3C7)); + get => ref _Handle.AsRef(_NotchedRangeMaxOffset.Value); } + private static readonly Lazy _NotchedOutputOutsideOffset = new(() => Schema.GetOffset(0x4330CD32880DA9AE), LazyThreadSafetyMode.None); + public ref float NotchedOutputOutside { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD32880DA9AE)); + get => ref _Handle.AsRef(_NotchedOutputOutsideOffset.Value); } + private static readonly Lazy _NotchedOutputInsideOffset = new(() => Schema.GetOffset(0x4330CD327435127B), LazyThreadSafetyMode.None); + public ref float NotchedOutputInside { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD327435127B)); + get => ref _Handle.AsRef(_NotchedOutputInsideOffset.Value); } + private static readonly Lazy _RoundTypeOffset = new(() => Schema.GetOffset(0x4330CD32A3B1B6E7), LazyThreadSafetyMode.None); + public ref ParticleFloatRoundType_t RoundType { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD32A3B1B6E7)); + get => ref _Handle.AsRef(_RoundTypeOffset.Value); } + private static readonly Lazy _BiasTypeOffset = new(() => Schema.GetOffset(0x4330CD325FAB0448), LazyThreadSafetyMode.None); + public ref ParticleFloatBiasType_t BiasType { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD325FAB0448)); + get => ref _Handle.AsRef(_BiasTypeOffset.Value); } + private static readonly Lazy _BiasParameterOffset = new(() => Schema.GetOffset(0x4330CD3215172A11), LazyThreadSafetyMode.None); + public ref float BiasParameter { - get => ref _Handle.AsRef(Schema.GetOffset(0x4330CD3215172A11)); + get => ref _Handle.AsRef(_BiasParameterOffset.Value); } + private static readonly Lazy _CurveOffset = new(() => Schema.GetOffset(0x4330CD323389BB94), LazyThreadSafetyMode.None); + public SchemaUntypedField Curve { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x4330CD323389BB94)); + get => new SchemaUntypedField(_Handle + _CurveOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionConstraintImpl.cs index 5d4312c74..97088fae1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionEmitterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionEmitterImpl.cs index 5037802d3..a64a18913 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionEmitterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionEmitterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CParticleFunctionEmitterImpl : CParticleFunctionImpl, CPa public CParticleFunctionEmitterImpl(nint handle) : base(handle) { } + private static readonly Lazy _EmitterIndexOffset = new(() => Schema.GetOffset(0x72B3FA32117F91FF), LazyThreadSafetyMode.None); + public ref int EmitterIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x72B3FA32117F91FF)); + get => ref _Handle.AsRef(_EmitterIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionForceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionForceImpl.cs index 450c2ae56..1533dcff3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionForceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionForceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionImpl.cs index b81a0c2ae..ace86bc08 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,57 +17,89 @@ internal partial class CParticleFunctionImpl : SchemaClass, CParticleFunction { public CParticleFunctionImpl(nint handle) : base(handle) { } + private static readonly Lazy _OpStrengthOffset = new(() => Schema.GetOffset(0x4E0CACB41DD56291), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput OpStrength { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x4E0CACB41DD56291)); + get => new CParticleCollectionFloatInputImpl(_Handle + _OpStrengthOffset.Value); } + private static readonly Lazy _OpEndCapStateOffset = new(() => Schema.GetOffset(0x4E0CACB45CC37252), LazyThreadSafetyMode.None); + public ref ParticleEndcapMode_t OpEndCapState { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E0CACB45CC37252)); + get => ref _Handle.AsRef(_OpEndCapStateOffset.Value); } + private static readonly Lazy _OpStartFadeInTimeOffset = new(() => Schema.GetOffset(0x4E0CACB419F734B4), LazyThreadSafetyMode.None); + public ref float OpStartFadeInTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E0CACB419F734B4)); + get => ref _Handle.AsRef(_OpStartFadeInTimeOffset.Value); } + private static readonly Lazy _OpEndFadeInTimeOffset = new(() => Schema.GetOffset(0x4E0CACB4ACF7C409), LazyThreadSafetyMode.None); + public ref float OpEndFadeInTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E0CACB4ACF7C409)); + get => ref _Handle.AsRef(_OpEndFadeInTimeOffset.Value); } + private static readonly Lazy _OpStartFadeOutTimeOffset = new(() => Schema.GetOffset(0x4E0CACB4708F42B7), LazyThreadSafetyMode.None); + public ref float OpStartFadeOutTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E0CACB4708F42B7)); + get => ref _Handle.AsRef(_OpStartFadeOutTimeOffset.Value); } + private static readonly Lazy _OpEndFadeOutTimeOffset = new(() => Schema.GetOffset(0x4E0CACB451633BD4), LazyThreadSafetyMode.None); + public ref float OpEndFadeOutTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E0CACB451633BD4)); + get => ref _Handle.AsRef(_OpEndFadeOutTimeOffset.Value); } + private static readonly Lazy _OpFadeOscillatePeriodOffset = new(() => Schema.GetOffset(0x4E0CACB441341EE1), LazyThreadSafetyMode.None); + public ref float OpFadeOscillatePeriod { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E0CACB441341EE1)); + get => ref _Handle.AsRef(_OpFadeOscillatePeriodOffset.Value); } + private static readonly Lazy _NormalizeToStopTimeOffset = new(() => Schema.GetOffset(0x4E0CACB42195F2E4), LazyThreadSafetyMode.None); + public ref bool NormalizeToStopTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E0CACB42195F2E4)); + get => ref _Handle.AsRef(_NormalizeToStopTimeOffset.Value); } + private static readonly Lazy _OpTimeOffsetMinOffset = new(() => Schema.GetOffset(0x4E0CACB4D764CFA2), LazyThreadSafetyMode.None); + public ref float OpTimeOffsetMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E0CACB4D764CFA2)); + get => ref _Handle.AsRef(_OpTimeOffsetMinOffset.Value); } + private static readonly Lazy _OpTimeOffsetMaxOffset = new(() => Schema.GetOffset(0x4E0CACB4C1512548), LazyThreadSafetyMode.None); + public ref float OpTimeOffsetMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E0CACB4C1512548)); + get => ref _Handle.AsRef(_OpTimeOffsetMaxOffset.Value); } + private static readonly Lazy _OpTimeOffsetSeedOffset = new(() => Schema.GetOffset(0x4E0CACB4EB255BD9), LazyThreadSafetyMode.None); + public ref int OpTimeOffsetSeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E0CACB4EB255BD9)); + get => ref _Handle.AsRef(_OpTimeOffsetSeedOffset.Value); } + private static readonly Lazy _OpTimeScaleSeedOffset = new(() => Schema.GetOffset(0x4E0CACB43A25FF8A), LazyThreadSafetyMode.None); + public ref int OpTimeScaleSeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E0CACB43A25FF8A)); + get => ref _Handle.AsRef(_OpTimeScaleSeedOffset.Value); } + private static readonly Lazy _OpTimeScaleMinOffset = new(() => Schema.GetOffset(0x4E0CACB44A95534F), LazyThreadSafetyMode.None); + public ref float OpTimeScaleMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E0CACB44A95534F)); + get => ref _Handle.AsRef(_OpTimeScaleMinOffset.Value); } + private static readonly Lazy _OpTimeScaleMaxOffset = new(() => Schema.GetOffset(0x4E0CACB43881AF41), LazyThreadSafetyMode.None); + public ref float OpTimeScaleMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E0CACB43881AF41)); + get => ref _Handle.AsRef(_OpTimeScaleMaxOffset.Value); } + private static readonly Lazy _DisableOperatorOffset = new(() => Schema.GetOffset(0x4E0CACB49F141CC3), LazyThreadSafetyMode.None); + public ref bool DisableOperator { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E0CACB49F141CC3)); + get => ref _Handle.AsRef(_DisableOperatorOffset.Value); } + private static readonly Lazy _NotesOffset = new(() => Schema.GetOffset(0x4E0CACB41DD3144A), LazyThreadSafetyMode.None); + public string Notes { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4E0CACB41DD3144A)); + var ptr = _Handle.Read(_NotesOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x4E0CACB41DD3144A, value); + set => Schema.SetString(_Handle, _NotesOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionInitializerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionInitializerImpl.cs index f4ef7044f..cb2b15f28 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionInitializerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionInitializerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CParticleFunctionInitializerImpl : CParticleFunctionImpl, public CParticleFunctionInitializerImpl(nint handle) : base(handle) { } + private static readonly Lazy _AssociatedEmitterIndexOffset = new(() => Schema.GetOffset(0xA224E6D8D47B3DA5), LazyThreadSafetyMode.None); + public ref int AssociatedEmitterIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xA224E6D8D47B3DA5)); + get => ref _Handle.AsRef(_AssociatedEmitterIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionOperatorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionOperatorImpl.cs index a8240f928..b5f05a58c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionOperatorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionOperatorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionPreEmissionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionPreEmissionImpl.cs index 6b9c643f2..31316ae73 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionPreEmissionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionPreEmissionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CParticleFunctionPreEmissionImpl : CParticleFunctionOpera public CParticleFunctionPreEmissionImpl(nint handle) : base(handle) { } + private static readonly Lazy _RunOnceOffset = new(() => Schema.GetOffset(0x60FF68618CD905F), LazyThreadSafetyMode.None); + public ref bool RunOnce { - get => ref _Handle.AsRef(Schema.GetOffset(0x60FF68618CD905F)); + get => ref _Handle.AsRef(_RunOnceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionRendererImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionRendererImpl.cs index 9813fd937..aca86f062 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionRendererImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleFunctionRendererImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CParticleFunctionRendererImpl : CParticleFunctionImpl, CP public CParticleFunctionRendererImpl(nint handle) : base(handle) { } + private static readonly Lazy _VisibilityInputsOffset = new(() => Schema.GetOffset(0xAE332DA3CF8264F8), LazyThreadSafetyMode.None); + public CParticleVisibilityInputs VisibilityInputs { - get => new CParticleVisibilityInputsImpl(_Handle + Schema.GetOffset(0xAE332DA3CF8264F8)); + get => new CParticleVisibilityInputsImpl(_Handle + _VisibilityInputsOffset.Value); } + private static readonly Lazy _CannotBeRefractedOffset = new(() => Schema.GetOffset(0xAE332DA3CC78C4FB), LazyThreadSafetyMode.None); + public ref bool CannotBeRefracted { - get => ref _Handle.AsRef(Schema.GetOffset(0xAE332DA3CC78C4FB)); + get => ref _Handle.AsRef(_CannotBeRefractedOffset.Value); } + private static readonly Lazy _SkipRenderingOnMobileOffset = new(() => Schema.GetOffset(0xAE332DA33F34EA75), LazyThreadSafetyMode.None); + public ref bool SkipRenderingOnMobile { - get => ref _Handle.AsRef(Schema.GetOffset(0xAE332DA33F34EA75)); + get => ref _Handle.AsRef(_SkipRenderingOnMobileOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleInputImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleInputImpl.cs index 003766c43..55d967d42 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleInputImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleInputImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleMassCalculationParametersImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleMassCalculationParametersImpl.cs index b4ff95048..f9d8dda9f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleMassCalculationParametersImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleMassCalculationParametersImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CParticleMassCalculationParametersImpl : SchemaClass, CPa public CParticleMassCalculationParametersImpl(nint handle) : base(handle) { } + private static readonly Lazy _MassModeOffset = new(() => Schema.GetOffset(0xAA3341F9D5B6E412), LazyThreadSafetyMode.None); + public ref ParticleMassMode_t MassMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xAA3341F9D5B6E412)); + get => ref _Handle.AsRef(_MassModeOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0xAA3341F95ACFC08D), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Radius { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xAA3341F95ACFC08D)); + get => new CPerParticleFloatInputImpl(_Handle + _RadiusOffset.Value); } + private static readonly Lazy _NominalRadiusOffset = new(() => Schema.GetOffset(0xAA3341F9B6692A73), LazyThreadSafetyMode.None); + public CPerParticleFloatInput NominalRadius { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xAA3341F9B6692A73)); + get => new CPerParticleFloatInputImpl(_Handle + _NominalRadiusOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0xAA3341F9B731A42F), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Scale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xAA3341F9B731A42F)); + get => new CPerParticleFloatInputImpl(_Handle + _ScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleModelInputImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleModelInputImpl.cs index 3e3748a53..4c31da90e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleModelInputImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleModelInputImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CParticleModelInputImpl : CParticleInputImpl, CParticleMo public CParticleModelInputImpl(nint handle) : base(handle) { } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0xC8FF4F3F18853D59), LazyThreadSafetyMode.None); + public ref ParticleModelType_t Type { - get => ref _Handle.AsRef(Schema.GetOffset(0xC8FF4F3F18853D59)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _NamedValueOffset = new(() => Schema.GetOffset(0xC8FF4F3FE0618727), LazyThreadSafetyMode.None); + public SchemaUntypedField NamedValue { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC8FF4F3FE0618727)); + get => new SchemaUntypedField(_Handle + _NamedValueOffset.Value); } + private static readonly Lazy _ControlPointOffset = new(() => Schema.GetOffset(0xC8FF4F3F0D0DDF8C), LazyThreadSafetyMode.None); + public ref int ControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xC8FF4F3F0D0DDF8C)); + get => ref _Handle.AsRef(_ControlPointOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticlePropertyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticlePropertyImpl.cs index 5a8e49f9c..f238d883e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticlePropertyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticlePropertyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleRemapFloatInputImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleRemapFloatInputImpl.cs index b45105a9a..2723e7c95 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleRemapFloatInputImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleRemapFloatInputImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleSystemDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleSystemDefinitionImpl.cs index a02bbeeaa..35b8cd0d4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleSystemDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleSystemDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,208 +17,338 @@ internal partial class CParticleSystemDefinitionImpl : IParticleSystemDefinition public CParticleSystemDefinitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _BehaviorVersionOffset = new(() => Schema.GetOffset(0xDA4320E001EEB9D5), LazyThreadSafetyMode.None); + public ref int BehaviorVersion { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E001EEB9D5)); + get => ref _Handle.AsRef(_BehaviorVersionOffset.Value); } + private static readonly Lazy _PreEmissionOperatorsOffset = new(() => Schema.GetOffset(0xDA4320E0805AFF22), LazyThreadSafetyMode.None); + public ref CUtlVector> PreEmissionOperators { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xDA4320E0805AFF22)); + get => ref _Handle.AsRef>>(_PreEmissionOperatorsOffset.Value); } + private static readonly Lazy _EmittersOffset = new(() => Schema.GetOffset(0xDA4320E0C459029A), LazyThreadSafetyMode.None); + public ref CUtlVector> Emitters { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xDA4320E0C459029A)); + get => ref _Handle.AsRef>>(_EmittersOffset.Value); } + private static readonly Lazy _InitializersOffset = new(() => Schema.GetOffset(0xDA4320E033FFD058), LazyThreadSafetyMode.None); + public ref CUtlVector> Initializers { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xDA4320E033FFD058)); + get => ref _Handle.AsRef>>(_InitializersOffset.Value); } + private static readonly Lazy _OperatorsOffset = new(() => Schema.GetOffset(0xDA4320E08B4B170A), LazyThreadSafetyMode.None); + public ref CUtlVector> Operators { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xDA4320E08B4B170A)); + get => ref _Handle.AsRef>>(_OperatorsOffset.Value); } + private static readonly Lazy _ForceGeneratorsOffset = new(() => Schema.GetOffset(0xDA4320E00EBFE04E), LazyThreadSafetyMode.None); + public ref CUtlVector> ForceGenerators { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xDA4320E00EBFE04E)); + get => ref _Handle.AsRef>>(_ForceGeneratorsOffset.Value); } + private static readonly Lazy _ConstraintsOffset = new(() => Schema.GetOffset(0xDA4320E03B02100B), LazyThreadSafetyMode.None); + public ref CUtlVector> Constraints { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xDA4320E03B02100B)); + get => ref _Handle.AsRef>>(_ConstraintsOffset.Value); } + private static readonly Lazy _RenderersOffset = new(() => Schema.GetOffset(0xDA4320E065610B77), LazyThreadSafetyMode.None); + public ref CUtlVector> Renderers { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xDA4320E065610B77)); + get => ref _Handle.AsRef>>(_RenderersOffset.Value); } + private static readonly Lazy _ChildrenOffset = new(() => Schema.GetOffset(0xDA4320E0D0827652), LazyThreadSafetyMode.None); + public ref CUtlVector Children { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDA4320E0D0827652)); + get => ref _Handle.AsRef>(_ChildrenOffset.Value); } + private static readonly Lazy _FirstMultipleOverride_BackwardCompatOffset = new(() => Schema.GetOffset(0xDA4320E070B95011), LazyThreadSafetyMode.None); + public ref int FirstMultipleOverride_BackwardCompat { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E070B95011)); + get => ref _Handle.AsRef(_FirstMultipleOverride_BackwardCompatOffset.Value); } + private static readonly Lazy _InitialParticlesOffset = new(() => Schema.GetOffset(0xDA4320E0AFBEAE36), LazyThreadSafetyMode.None); + public ref int InitialParticles { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0AFBEAE36)); + get => ref _Handle.AsRef(_InitialParticlesOffset.Value); } + private static readonly Lazy _MaxParticlesOffset = new(() => Schema.GetOffset(0xDA4320E01D53BB94), LazyThreadSafetyMode.None); + public ref int MaxParticles { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E01D53BB94)); + get => ref _Handle.AsRef(_MaxParticlesOffset.Value); } + private static readonly Lazy _GroupIDOffset = new(() => Schema.GetOffset(0xDA4320E03BB05135), LazyThreadSafetyMode.None); + public ref int GroupID { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E03BB05135)); + get => ref _Handle.AsRef(_GroupIDOffset.Value); } + private static readonly Lazy _BoundingBoxMinOffset = new(() => Schema.GetOffset(0xDA4320E06B6E213E), LazyThreadSafetyMode.None); + public ref Vector BoundingBoxMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E06B6E213E)); + get => ref _Handle.AsRef(_BoundingBoxMinOffset.Value); } + private static readonly Lazy _BoundingBoxMaxOffset = new(() => Schema.GetOffset(0xDA4320E07D5AB5DC), LazyThreadSafetyMode.None); + public ref Vector BoundingBoxMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E07D5AB5DC)); + get => ref _Handle.AsRef(_BoundingBoxMaxOffset.Value); } + private static readonly Lazy _DepthSortBiasOffset = new(() => Schema.GetOffset(0xDA4320E0D8EE79D9), LazyThreadSafetyMode.None); + public ref float DepthSortBias { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0D8EE79D9)); + get => ref _Handle.AsRef(_DepthSortBiasOffset.Value); } + private static readonly Lazy _SortOverridePositionCPOffset = new(() => Schema.GetOffset(0xDA4320E0384CD411), LazyThreadSafetyMode.None); + public ref int SortOverridePositionCP { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0384CD411)); + get => ref _Handle.AsRef(_SortOverridePositionCPOffset.Value); } + private static readonly Lazy _InfiniteBoundsOffset = new(() => Schema.GetOffset(0xDA4320E0ABC153F0), LazyThreadSafetyMode.None); + public ref bool InfiniteBounds { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0ABC153F0)); + get => ref _Handle.AsRef(_InfiniteBoundsOffset.Value); } + private static readonly Lazy _EnableNamedValuesOffset = new(() => Schema.GetOffset(0xDA4320E050DBA721), LazyThreadSafetyMode.None); + public ref bool EnableNamedValues { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E050DBA721)); + get => ref _Handle.AsRef(_EnableNamedValuesOffset.Value); } + private static readonly Lazy _NamedValueDomainOffset = new(() => Schema.GetOffset(0xDA4320E0D00B8FCB), LazyThreadSafetyMode.None); + public string NamedValueDomain { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDA4320E0D00B8FCB)); + var ptr = _Handle.Read(_NamedValueDomainOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDA4320E0D00B8FCB, value); + set => Schema.SetString(_Handle, _NamedValueDomainOffset.Value, value); } + private static readonly Lazy _NamedValueLocalsOffset = new(() => Schema.GetOffset(0xDA4320E02F97EB6F), LazyThreadSafetyMode.None); + public ref CUtlVector> NamedValueLocals { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xDA4320E02F97EB6F)); + get => ref _Handle.AsRef>>(_NamedValueLocalsOffset.Value); } + private static readonly Lazy _ConstantColorOffset = new(() => Schema.GetOffset(0xDA4320E09FC64C18), LazyThreadSafetyMode.None); + public ref Color ConstantColor { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E09FC64C18)); + get => ref _Handle.AsRef(_ConstantColorOffset.Value); } + private static readonly Lazy _ConstantNormalOffset = new(() => Schema.GetOffset(0xDA4320E07C056212), LazyThreadSafetyMode.None); + public ref Vector ConstantNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E07C056212)); + get => ref _Handle.AsRef(_ConstantNormalOffset.Value); } + private static readonly Lazy _ConstantRadiusOffset = new(() => Schema.GetOffset(0xDA4320E0C9ED3339), LazyThreadSafetyMode.None); + public ref float ConstantRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0C9ED3339)); + get => ref _Handle.AsRef(_ConstantRadiusOffset.Value); } + private static readonly Lazy _ConstantRotationOffset = new(() => Schema.GetOffset(0xDA4320E0628B0815), LazyThreadSafetyMode.None); + public ref float ConstantRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0628B0815)); + get => ref _Handle.AsRef(_ConstantRotationOffset.Value); } + private static readonly Lazy _ConstantRotationSpeedOffset = new(() => Schema.GetOffset(0xDA4320E0E6BFD610), LazyThreadSafetyMode.None); + public ref float ConstantRotationSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0E6BFD610)); + get => ref _Handle.AsRef(_ConstantRotationSpeedOffset.Value); } + private static readonly Lazy _ConstantLifespanOffset = new(() => Schema.GetOffset(0xDA4320E03B07FD5D), LazyThreadSafetyMode.None); + public ref float ConstantLifespan { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E03B07FD5D)); + get => ref _Handle.AsRef(_ConstantLifespanOffset.Value); } + private static readonly Lazy _ConstantSequenceNumberOffset = new(() => Schema.GetOffset(0xDA4320E0EC8561B5), LazyThreadSafetyMode.None); + public ref int ConstantSequenceNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0EC8561B5)); + get => ref _Handle.AsRef(_ConstantSequenceNumberOffset.Value); } + private static readonly Lazy _ConstantSequenceNumber1Offset = new(() => Schema.GetOffset(0xDA4320E0D9F882CC), LazyThreadSafetyMode.None); + public ref int ConstantSequenceNumber1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0D9F882CC)); + get => ref _Handle.AsRef(_ConstantSequenceNumber1Offset.Value); } + private static readonly Lazy _SnapshotControlPointOffset = new(() => Schema.GetOffset(0xDA4320E0192638EC), LazyThreadSafetyMode.None); + public ref int SnapshotControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0192638EC)); + get => ref _Handle.AsRef(_SnapshotControlPointOffset.Value); } + private static readonly Lazy _SnapshotOffset = new(() => Schema.GetOffset(0xDA4320E0FB69CF2F), LazyThreadSafetyMode.None); + public ref CStrongHandle Snapshot { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDA4320E0FB69CF2F)); + get => ref _Handle.AsRef>(_SnapshotOffset.Value); } + private static readonly Lazy _CullReplacementNameOffset = new(() => Schema.GetOffset(0xDA4320E0F766ED25), LazyThreadSafetyMode.None); + public ref CStrongHandle CullReplacementName { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDA4320E0F766ED25)); + get => ref _Handle.AsRef>(_CullReplacementNameOffset.Value); } + private static readonly Lazy _CullRadiusOffset = new(() => Schema.GetOffset(0xDA4320E0E52D3471), LazyThreadSafetyMode.None); + public ref float CullRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0E52D3471)); + get => ref _Handle.AsRef(_CullRadiusOffset.Value); } + private static readonly Lazy _CullFillCostOffset = new(() => Schema.GetOffset(0xDA4320E0C60C53D3), LazyThreadSafetyMode.None); + public ref float CullFillCost { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0C60C53D3)); + get => ref _Handle.AsRef(_CullFillCostOffset.Value); } + private static readonly Lazy _CullControlPointOffset = new(() => Schema.GetOffset(0xDA4320E0E0BBD6A4), LazyThreadSafetyMode.None); + public ref int CullControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0E0BBD6A4)); + get => ref _Handle.AsRef(_CullControlPointOffset.Value); } + private static readonly Lazy _FallbackOffset = new(() => Schema.GetOffset(0xDA4320E0E0481D45), LazyThreadSafetyMode.None); + public ref CStrongHandle Fallback { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDA4320E0E0481D45)); + get => ref _Handle.AsRef>(_FallbackOffset.Value); } + private static readonly Lazy _FallbackMaxCountOffset = new(() => Schema.GetOffset(0xDA4320E097AF336E), LazyThreadSafetyMode.None); + public ref int FallbackMaxCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E097AF336E)); + get => ref _Handle.AsRef(_FallbackMaxCountOffset.Value); } + private static readonly Lazy _LowViolenceDefOffset = new(() => Schema.GetOffset(0xDA4320E012A2B819), LazyThreadSafetyMode.None); + public ref CStrongHandle LowViolenceDef { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDA4320E012A2B819)); + get => ref _Handle.AsRef>(_LowViolenceDefOffset.Value); } + private static readonly Lazy _ReferenceReplacementOffset = new(() => Schema.GetOffset(0xDA4320E0676869A0), LazyThreadSafetyMode.None); + public ref CStrongHandle ReferenceReplacement { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDA4320E0676869A0)); + get => ref _Handle.AsRef>(_ReferenceReplacementOffset.Value); } + private static readonly Lazy _PreSimulationTimeOffset = new(() => Schema.GetOffset(0xDA4320E0353642D6), LazyThreadSafetyMode.None); + public ref float PreSimulationTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0353642D6)); + get => ref _Handle.AsRef(_PreSimulationTimeOffset.Value); } + private static readonly Lazy _StopSimulationAfterTimeOffset = new(() => Schema.GetOffset(0xDA4320E0154D0AB7), LazyThreadSafetyMode.None); + public ref float StopSimulationAfterTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0154D0AB7)); + get => ref _Handle.AsRef(_StopSimulationAfterTimeOffset.Value); } + private static readonly Lazy _MaximumTimeStepOffset = new(() => Schema.GetOffset(0xDA4320E09D495584), LazyThreadSafetyMode.None); + public ref float MaximumTimeStep { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E09D495584)); + get => ref _Handle.AsRef(_MaximumTimeStepOffset.Value); } + private static readonly Lazy _MaximumSimTimeOffset = new(() => Schema.GetOffset(0xDA4320E02A2FD0BF), LazyThreadSafetyMode.None); + public ref float MaximumSimTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E02A2FD0BF)); + get => ref _Handle.AsRef(_MaximumSimTimeOffset.Value); } + private static readonly Lazy _MinimumSimTimeOffset = new(() => Schema.GetOffset(0xDA4320E0C8BEDB09), LazyThreadSafetyMode.None); + public ref float MinimumSimTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0C8BEDB09)); + get => ref _Handle.AsRef(_MinimumSimTimeOffset.Value); } + private static readonly Lazy _MinimumTimeStepOffset = new(() => Schema.GetOffset(0xDA4320E0FEC1858A), LazyThreadSafetyMode.None); + public ref float MinimumTimeStep { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0FEC1858A)); + get => ref _Handle.AsRef(_MinimumTimeStepOffset.Value); } + private static readonly Lazy _MinimumFramesOffset = new(() => Schema.GetOffset(0xDA4320E0C0B1A451), LazyThreadSafetyMode.None); + public ref int MinimumFrames { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0C0B1A451)); + get => ref _Handle.AsRef(_MinimumFramesOffset.Value); } + private static readonly Lazy _MinCPULevelOffset = new(() => Schema.GetOffset(0xDA4320E0E99C0DA7), LazyThreadSafetyMode.None); + public ref int MinCPULevel { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0E99C0DA7)); + get => ref _Handle.AsRef(_MinCPULevelOffset.Value); } + private static readonly Lazy _MinGPULevelOffset = new(() => Schema.GetOffset(0xDA4320E02F78732B), LazyThreadSafetyMode.None); + public ref int MinGPULevel { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E02F78732B)); + get => ref _Handle.AsRef(_MinGPULevelOffset.Value); } + private static readonly Lazy _NoDrawTimeToGoToSleepOffset = new(() => Schema.GetOffset(0xDA4320E02ACD5184), LazyThreadSafetyMode.None); + public ref float NoDrawTimeToGoToSleep { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E02ACD5184)); + get => ref _Handle.AsRef(_NoDrawTimeToGoToSleepOffset.Value); } + private static readonly Lazy _MaxDrawDistanceOffset = new(() => Schema.GetOffset(0xDA4320E08E4CDFA2), LazyThreadSafetyMode.None); + public ref float MaxDrawDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E08E4CDFA2)); + get => ref _Handle.AsRef(_MaxDrawDistanceOffset.Value); } + private static readonly Lazy _StartFadeDistanceOffset = new(() => Schema.GetOffset(0xDA4320E04F680B0C), LazyThreadSafetyMode.None); + public ref float StartFadeDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E04F680B0C)); + get => ref _Handle.AsRef(_StartFadeDistanceOffset.Value); } + private static readonly Lazy _MaxCreationDistanceOffset = new(() => Schema.GetOffset(0xDA4320E0E978F3BD), LazyThreadSafetyMode.None); + public ref float MaxCreationDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0E978F3BD)); + get => ref _Handle.AsRef(_MaxCreationDistanceOffset.Value); } + private static readonly Lazy _AggregationMinAvailableParticlesOffset = new(() => Schema.GetOffset(0xDA4320E0327D71FD), LazyThreadSafetyMode.None); + public ref int AggregationMinAvailableParticles { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0327D71FD)); + get => ref _Handle.AsRef(_AggregationMinAvailableParticlesOffset.Value); } + private static readonly Lazy _AggregateRadiusOffset = new(() => Schema.GetOffset(0xDA4320E0352430AC), LazyThreadSafetyMode.None); + public ref float AggregateRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0352430AC)); + get => ref _Handle.AsRef(_AggregateRadiusOffset.Value); } + private static readonly Lazy _ShouldBatchOffset = new(() => Schema.GetOffset(0xDA4320E0D8D847F6), LazyThreadSafetyMode.None); + public ref bool ShouldBatch { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0D8D847F6)); + get => ref _Handle.AsRef(_ShouldBatchOffset.Value); } + private static readonly Lazy _ShouldHitboxesFallbackToRenderBoundsOffset = new(() => Schema.GetOffset(0xDA4320E08B4E62F2), LazyThreadSafetyMode.None); + public ref bool ShouldHitboxesFallbackToRenderBounds { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E08B4E62F2)); + get => ref _Handle.AsRef(_ShouldHitboxesFallbackToRenderBoundsOffset.Value); } + private static readonly Lazy _ShouldHitboxesFallbackToSnapshotOffset = new(() => Schema.GetOffset(0xDA4320E02D6E6B93), LazyThreadSafetyMode.None); + public ref bool ShouldHitboxesFallbackToSnapshot { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E02D6E6B93)); + get => ref _Handle.AsRef(_ShouldHitboxesFallbackToSnapshotOffset.Value); } + private static readonly Lazy _ShouldHitboxesFallbackToCollisionHullsOffset = new(() => Schema.GetOffset(0xDA4320E05E66E94F), LazyThreadSafetyMode.None); + public ref bool ShouldHitboxesFallbackToCollisionHulls { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E05E66E94F)); + get => ref _Handle.AsRef(_ShouldHitboxesFallbackToCollisionHullsOffset.Value); } + private static readonly Lazy _ViewModelEffectOffset = new(() => Schema.GetOffset(0xDA4320E06B068FD0), LazyThreadSafetyMode.None); + public ref InheritableBoolType_t ViewModelEffect { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E06B068FD0)); + get => ref _Handle.AsRef(_ViewModelEffectOffset.Value); } + private static readonly Lazy _ScreenSpaceEffectOffset = new(() => Schema.GetOffset(0xDA4320E0175D9268), LazyThreadSafetyMode.None); + public ref bool ScreenSpaceEffect { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0175D9268)); + get => ref _Handle.AsRef(_ScreenSpaceEffectOffset.Value); } + private static readonly Lazy _TargetLayerIDOffset = new(() => Schema.GetOffset(0xDA4320E0FD7195C9), LazyThreadSafetyMode.None); + public string TargetLayerID { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDA4320E0FD7195C9)); + var ptr = _Handle.Read(_TargetLayerIDOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDA4320E0FD7195C9, value); + set => Schema.SetString(_Handle, _TargetLayerIDOffset.Value, value); } + private static readonly Lazy _SkipRenderControlPointOffset = new(() => Schema.GetOffset(0xDA4320E091966FFF), LazyThreadSafetyMode.None); + public ref int SkipRenderControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E091966FFF)); + get => ref _Handle.AsRef(_SkipRenderControlPointOffset.Value); } + private static readonly Lazy _AllowRenderControlPointOffset = new(() => Schema.GetOffset(0xDA4320E03455C797), LazyThreadSafetyMode.None); + public ref int AllowRenderControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E03455C797)); + get => ref _Handle.AsRef(_AllowRenderControlPointOffset.Value); } + private static readonly Lazy _ShouldSortOffset = new(() => Schema.GetOffset(0xDA4320E0DCA74CFA), LazyThreadSafetyMode.None); + public ref bool ShouldSort { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA4320E0DCA74CFA)); + get => ref _Handle.AsRef(_ShouldSortOffset.Value); } + private static readonly Lazy _ControlPointConfigurationsOffset = new(() => Schema.GetOffset(0xDA4320E09B7B10E3), LazyThreadSafetyMode.None); + public ref CUtlVector ControlPointConfigurations { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDA4320E09B7B10E3)); + get => ref _Handle.AsRef>(_ControlPointConfigurationsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleSystemImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleSystemImpl.cs index a07d816d5..ba732e176 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleSystemImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleSystemImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,36 +17,54 @@ internal partial class CParticleSystemImpl : CBaseModelEntityImpl, CParticleSyst public CParticleSystemImpl(nint handle) : base(handle) { } + private static readonly Lazy _SnapshotFileNameOffset = new(() => Schema.GetOffset(0x8F6D2B258D2636C1), LazyThreadSafetyMode.None); + public string SnapshotFileName { get { - var ptr = _Handle + Schema.GetOffset(0x8F6D2B258D2636C1); + var ptr = _Handle + _SnapshotFileNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x8F6D2B258D2636C1, value, 512); + set => Schema.SetFixedString(_Handle, _SnapshotFileNameOffset.Value, value, 512); } + private static readonly Lazy _ActiveOffset = new(() => Schema.GetOffset(0x8F6D2B258334208F), LazyThreadSafetyMode.None); + public ref bool Active { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F6D2B258334208F)); + get => ref _Handle.AsRef(_ActiveOffset.Value); } + private static readonly Lazy _FrozenOffset = new(() => Schema.GetOffset(0x8F6D2B25119A2BE3), LazyThreadSafetyMode.None); + public ref bool Frozen { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F6D2B25119A2BE3)); + get => ref _Handle.AsRef(_FrozenOffset.Value); } + private static readonly Lazy _FreezeTransitionDurationOffset = new(() => Schema.GetOffset(0x8F6D2B259CE29C67), LazyThreadSafetyMode.None); + public ref float FreezeTransitionDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F6D2B259CE29C67)); + get => ref _Handle.AsRef(_FreezeTransitionDurationOffset.Value); } + private static readonly Lazy _StopTypeOffset = new(() => Schema.GetOffset(0x8F6D2B2513397259), LazyThreadSafetyMode.None); + public ref int StopType { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F6D2B2513397259)); + get => ref _Handle.AsRef(_StopTypeOffset.Value); } + private static readonly Lazy _AnimateDuringGameplayPauseOffset = new(() => Schema.GetOffset(0x8F6D2B25A4EB73F5), LazyThreadSafetyMode.None); + public ref bool AnimateDuringGameplayPause { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F6D2B25A4EB73F5)); + get => ref _Handle.AsRef(_AnimateDuringGameplayPauseOffset.Value); } + private static readonly Lazy _EffectIndexOffset = new(() => Schema.GetOffset(0x8F6D2B253C93DC73), LazyThreadSafetyMode.None); + public ref CStrongHandle EffectIndex { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8F6D2B253C93DC73)); + get => ref _Handle.AsRef>(_EffectIndexOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0x8F6D2B2567FE9DC4), LazyThreadSafetyMode.None); + public GameTime_t StartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8F6D2B2567FE9DC4)); + get => new GameTime_tImpl(_Handle + _StartTimeOffset.Value); } + private static readonly Lazy _PreSimTimeOffset = new(() => Schema.GetOffset(0x8F6D2B25CD67F64E), LazyThreadSafetyMode.None); + public ref float PreSimTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F6D2B25CD67F64E)); + get => ref _Handle.AsRef(_PreSimTimeOffset.Value); } public ISchemaFixedArray ServerControlPoints { get => new SchemaFixedArray(_Handle, 0x8F6D2B2561386048, 4, 12, 4); @@ -55,43 +75,63 @@ public ISchemaFixedArray ServerControlPointAssignments { public ISchemaFixedArray> ControlPointEnts { get => new SchemaFixedArray>(_Handle, 0x8F6D2B25ECA36598, 64, 4, 4); } + private static readonly Lazy _NoSaveOffset = new(() => Schema.GetOffset(0x8F6D2B257507B947), LazyThreadSafetyMode.None); + public ref bool NoSave { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F6D2B257507B947)); + get => ref _Handle.AsRef(_NoSaveOffset.Value); } + private static readonly Lazy _NoFreezeOffset = new(() => Schema.GetOffset(0x8F6D2B256015A661), LazyThreadSafetyMode.None); + public ref bool NoFreeze { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F6D2B256015A661)); + get => ref _Handle.AsRef(_NoFreezeOffset.Value); } + private static readonly Lazy _NoRampOffset = new(() => Schema.GetOffset(0x8F6D2B25AD7F8116), LazyThreadSafetyMode.None); + public ref bool NoRamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F6D2B25AD7F8116)); + get => ref _Handle.AsRef(_NoRampOffset.Value); } + private static readonly Lazy _StartActiveOffset = new(() => Schema.GetOffset(0x8F6D2B25953CBC21), LazyThreadSafetyMode.None); + public ref bool StartActive { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F6D2B25953CBC21)); + get => ref _Handle.AsRef(_StartActiveOffset.Value); } + private static readonly Lazy _EffectNameOffset = new(() => Schema.GetOffset(0x8F6D2B2582D2BFC7), LazyThreadSafetyMode.None); + public string EffectName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x8F6D2B2582D2BFC7)); + var ptr = _Handle.Read(_EffectNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x8F6D2B2582D2BFC7, value); + set => Schema.SetString(_Handle, _EffectNameOffset.Value, value); } + private static readonly Lazy _ControlPointNamesOffset = new(() => Schema.GetOffset(0x8F6D2B258DBFEC78), LazyThreadSafetyMode.None); + public string ControlPointNames { get { - var ptr = _Handle.Read(Schema.GetOffset(0x8F6D2B258DBFEC78)); + var ptr = _Handle.Read(_ControlPointNamesOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x8F6D2B258DBFEC78, value); + set => Schema.SetString(_Handle, _ControlPointNamesOffset.Value, value); } + private static readonly Lazy _DataCPOffset = new(() => Schema.GetOffset(0x8F6D2B258DC46F82), LazyThreadSafetyMode.None); + public ref int DataCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F6D2B258DC46F82)); + get => ref _Handle.AsRef(_DataCPOffset.Value); } + private static readonly Lazy _DataCPValueOffset = new(() => Schema.GetOffset(0x8F6D2B250AC27507), LazyThreadSafetyMode.None); + public ref Vector DataCPValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F6D2B250AC27507)); + get => ref _Handle.AsRef(_DataCPValueOffset.Value); } + private static readonly Lazy _TintCPOffset = new(() => Schema.GetOffset(0x8F6D2B2554940ABB), LazyThreadSafetyMode.None); + public ref int TintCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F6D2B2554940ABB)); + get => ref _Handle.AsRef(_TintCPOffset.Value); } + private static readonly Lazy _TintOffset = new(() => Schema.GetOffset(0x8F6D2B25CEA8BB7D), LazyThreadSafetyMode.None); + public ref Color Tint { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F6D2B25CEA8BB7D)); + get => ref _Handle.AsRef(_TintOffset.Value); } public void SnapshotFileNameUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleTransformInputImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleTransformInputImpl.cs index 49bf76bd3..90b4361f7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleTransformInputImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleTransformInputImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CParticleTransformInputImpl : CParticleInputImpl, CPartic public CParticleTransformInputImpl(nint handle) : base(handle) { } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x9DF3328C18853D59), LazyThreadSafetyMode.None); + public ref ParticleTransformType_t Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DF3328C18853D59)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _NamedValueOffset = new(() => Schema.GetOffset(0x9DF3328CE0618727), LazyThreadSafetyMode.None); + public SchemaUntypedField NamedValue { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x9DF3328CE0618727)); + get => new SchemaUntypedField(_Handle + _NamedValueOffset.Value); } + private static readonly Lazy _FollowNamedValueOffset = new(() => Schema.GetOffset(0x9DF3328C0F6CBBBA), LazyThreadSafetyMode.None); + public ref bool FollowNamedValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DF3328C0F6CBBBA)); + get => ref _Handle.AsRef(_FollowNamedValueOffset.Value); } + private static readonly Lazy _SupportsDisabledOffset = new(() => Schema.GetOffset(0x9DF3328CCCD6A201), LazyThreadSafetyMode.None); + public ref bool SupportsDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DF3328CCCD6A201)); + get => ref _Handle.AsRef(_SupportsDisabledOffset.Value); } + private static readonly Lazy _UseOrientationOffset = new(() => Schema.GetOffset(0x9DF3328C8DAE39FE), LazyThreadSafetyMode.None); + public ref bool UseOrientation { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DF3328C8DAE39FE)); + get => ref _Handle.AsRef(_UseOrientationOffset.Value); } + private static readonly Lazy _ControlPointOffset = new(() => Schema.GetOffset(0x9DF3328C0D0DDF8C), LazyThreadSafetyMode.None); + public ref int ControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DF3328C0D0DDF8C)); + get => ref _Handle.AsRef(_ControlPointOffset.Value); } + private static readonly Lazy _ControlPointRangeMaxOffset = new(() => Schema.GetOffset(0x9DF3328CE07DB935), LazyThreadSafetyMode.None); + public ref int ControlPointRangeMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DF3328CE07DB935)); + get => ref _Handle.AsRef(_ControlPointRangeMaxOffset.Value); } + private static readonly Lazy _EndCPGrowthTimeOffset = new(() => Schema.GetOffset(0x9DF3328CC156B981), LazyThreadSafetyMode.None); + public ref float EndCPGrowthTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x9DF3328CC156B981)); + get => ref _Handle.AsRef(_EndCPGrowthTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleVariableRefImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleVariableRefImpl.cs index 022221b14..85246ca7d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleVariableRefImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleVariableRefImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CParticleVariableRefImpl : SchemaClass, CParticleVariable public CParticleVariableRefImpl(nint handle) : base(handle) { } + private static readonly Lazy _VariableNameOffset = new(() => Schema.GetOffset(0x4FB747D9D3D609A6), LazyThreadSafetyMode.None); + public SchemaUntypedField VariableName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x4FB747D9D3D609A6)); + get => new SchemaUntypedField(_Handle + _VariableNameOffset.Value); } + private static readonly Lazy _VariableTypeOffset = new(() => Schema.GetOffset(0x4FB747D9954B670D), LazyThreadSafetyMode.None); + public SchemaUntypedField VariableType { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x4FB747D9954B670D)); + get => new SchemaUntypedField(_Handle + _VariableTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleVecInputImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleVecInputImpl.cs index 632302287..2966350bc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleVecInputImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleVecInputImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,74 +17,120 @@ internal partial class CParticleVecInputImpl : CParticleInputImpl, CParticleVecI public CParticleVecInputImpl(nint handle) : base(handle) { } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0xD598DA0A18853D59), LazyThreadSafetyMode.None); + public ref ParticleVecType_t Type { - get => ref _Handle.AsRef(Schema.GetOffset(0xD598DA0A18853D59)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _LiteralValueOffset = new(() => Schema.GetOffset(0xD598DA0A80638A21), LazyThreadSafetyMode.None); + public ref Vector LiteralValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xD598DA0A80638A21)); + get => ref _Handle.AsRef(_LiteralValueOffset.Value); } + private static readonly Lazy _LiteralColorOffset = new(() => Schema.GetOffset(0xD598DA0A75AE86AB), LazyThreadSafetyMode.None); + public ref Color LiteralColor { - get => ref _Handle.AsRef(Schema.GetOffset(0xD598DA0A75AE86AB)); + get => ref _Handle.AsRef(_LiteralColorOffset.Value); } + private static readonly Lazy _NamedValueOffset = new(() => Schema.GetOffset(0xD598DA0AE0618727), LazyThreadSafetyMode.None); + public SchemaUntypedField NamedValue { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD598DA0AE0618727)); + get => new SchemaUntypedField(_Handle + _NamedValueOffset.Value); } + private static readonly Lazy _FollowNamedValueOffset = new(() => Schema.GetOffset(0xD598DA0A0F6CBBBA), LazyThreadSafetyMode.None); + public ref bool FollowNamedValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xD598DA0A0F6CBBBA)); + get => ref _Handle.AsRef(_FollowNamedValueOffset.Value); } + private static readonly Lazy _VectorAttributeOffset = new(() => Schema.GetOffset(0xD598DA0A2B36D79A), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t VectorAttribute { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xD598DA0A2B36D79A)); + get => new ParticleAttributeIndex_tImpl(_Handle + _VectorAttributeOffset.Value); } + private static readonly Lazy _VectorAttributeScaleOffset = new(() => Schema.GetOffset(0xD598DA0A69912478), LazyThreadSafetyMode.None); + public ref Vector VectorAttributeScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xD598DA0A69912478)); + get => ref _Handle.AsRef(_VectorAttributeScaleOffset.Value); } + private static readonly Lazy _ControlPointOffset = new(() => Schema.GetOffset(0xD598DA0A0D0DDF8C), LazyThreadSafetyMode.None); + public ref int ControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xD598DA0A0D0DDF8C)); + get => ref _Handle.AsRef(_ControlPointOffset.Value); } + private static readonly Lazy _DeltaControlPointOffset = new(() => Schema.GetOffset(0xD598DA0AC74F7C50), LazyThreadSafetyMode.None); + public ref int DeltaControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xD598DA0AC74F7C50)); + get => ref _Handle.AsRef(_DeltaControlPointOffset.Value); } + private static readonly Lazy _CPValueScaleOffset = new(() => Schema.GetOffset(0xD598DA0A9A43168B), LazyThreadSafetyMode.None); + public ref Vector CPValueScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xD598DA0A9A43168B)); + get => ref _Handle.AsRef(_CPValueScaleOffset.Value); } + private static readonly Lazy _CPRelativePositionOffset = new(() => Schema.GetOffset(0xD598DA0A1964C465), LazyThreadSafetyMode.None); + public ref Vector CPRelativePosition { - get => ref _Handle.AsRef(Schema.GetOffset(0xD598DA0A1964C465)); + get => ref _Handle.AsRef(_CPRelativePositionOffset.Value); } + private static readonly Lazy _CPRelativeDirOffset = new(() => Schema.GetOffset(0xD598DA0A23334FC1), LazyThreadSafetyMode.None); + public ref Vector CPRelativeDir { - get => ref _Handle.AsRef(Schema.GetOffset(0xD598DA0A23334FC1)); + get => ref _Handle.AsRef(_CPRelativeDirOffset.Value); } + private static readonly Lazy _FloatComponentXOffset = new(() => Schema.GetOffset(0xD598DA0A8D4D4148), LazyThreadSafetyMode.None); + public CParticleFloatInput FloatComponentX { - get => new CParticleFloatInputImpl(_Handle + Schema.GetOffset(0xD598DA0A8D4D4148)); + get => new CParticleFloatInputImpl(_Handle + _FloatComponentXOffset.Value); } + private static readonly Lazy _FloatComponentYOffset = new(() => Schema.GetOffset(0xD598DA0A8E4D42DB), LazyThreadSafetyMode.None); + public CParticleFloatInput FloatComponentY { - get => new CParticleFloatInputImpl(_Handle + Schema.GetOffset(0xD598DA0A8E4D42DB)); + get => new CParticleFloatInputImpl(_Handle + _FloatComponentYOffset.Value); } + private static readonly Lazy _FloatComponentZOffset = new(() => Schema.GetOffset(0xD598DA0A8F4D446E), LazyThreadSafetyMode.None); + public CParticleFloatInput FloatComponentZ { - get => new CParticleFloatInputImpl(_Handle + Schema.GetOffset(0xD598DA0A8F4D446E)); + get => new CParticleFloatInputImpl(_Handle + _FloatComponentZOffset.Value); } + private static readonly Lazy _FloatInterpOffset = new(() => Schema.GetOffset(0xD598DA0AF81AB0BB), LazyThreadSafetyMode.None); + public CParticleFloatInput FloatInterp { - get => new CParticleFloatInputImpl(_Handle + Schema.GetOffset(0xD598DA0AF81AB0BB)); + get => new CParticleFloatInputImpl(_Handle + _FloatInterpOffset.Value); } + private static readonly Lazy _InterpInput0Offset = new(() => Schema.GetOffset(0xD598DA0A55806CD1), LazyThreadSafetyMode.None); + public ref float InterpInput0 { - get => ref _Handle.AsRef(Schema.GetOffset(0xD598DA0A55806CD1)); + get => ref _Handle.AsRef(_InterpInput0Offset.Value); } + private static readonly Lazy _InterpInput1Offset = new(() => Schema.GetOffset(0xD598DA0A54806B3E), LazyThreadSafetyMode.None); + public ref float InterpInput1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xD598DA0A54806B3E)); + get => ref _Handle.AsRef(_InterpInput1Offset.Value); } + private static readonly Lazy _InterpOutput0Offset = new(() => Schema.GetOffset(0xD598DA0AD54AF42E), LazyThreadSafetyMode.None); + public ref Vector InterpOutput0 { - get => ref _Handle.AsRef(Schema.GetOffset(0xD598DA0AD54AF42E)); + get => ref _Handle.AsRef(_InterpOutput0Offset.Value); } + private static readonly Lazy _InterpOutput1Offset = new(() => Schema.GetOffset(0xD598DA0AD64AF5C1), LazyThreadSafetyMode.None); + public ref Vector InterpOutput1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xD598DA0AD64AF5C1)); + get => ref _Handle.AsRef(_InterpOutput1Offset.Value); } + private static readonly Lazy _GradientOffset = new(() => Schema.GetOffset(0xD598DA0A05C95F25), LazyThreadSafetyMode.None); + public SchemaUntypedField Gradient { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD598DA0A05C95F25)); + get => new SchemaUntypedField(_Handle + _GradientOffset.Value); } + private static readonly Lazy _RandomMinOffset = new(() => Schema.GetOffset(0xD598DA0AC6B45DA2), LazyThreadSafetyMode.None); + public ref Vector RandomMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xD598DA0AC6B45DA2)); + get => ref _Handle.AsRef(_RandomMinOffset.Value); } + private static readonly Lazy _RandomMaxOffset = new(() => Schema.GetOffset(0xD598DA0AB0A0B348), LazyThreadSafetyMode.None); + public ref Vector RandomMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xD598DA0AB0A0B348)); + get => ref _Handle.AsRef(_RandomMaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleVisibilityInputsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleVisibilityInputsImpl.cs index 683fe4b4d..be2124a73 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleVisibilityInputsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CParticleVisibilityInputsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,62 +17,100 @@ internal partial class CParticleVisibilityInputsImpl : SchemaClass, CParticleVis public CParticleVisibilityInputsImpl(nint handle) : base(handle) { } + private static readonly Lazy _CameraBiasOffset = new(() => Schema.GetOffset(0xF3FC60F57CAF2EE5), LazyThreadSafetyMode.None); + public ref float CameraBias { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F57CAF2EE5)); + get => ref _Handle.AsRef(_CameraBiasOffset.Value); } + private static readonly Lazy _CPinOffset = new(() => Schema.GetOffset(0xF3FC60F5CAA9CA3D), LazyThreadSafetyMode.None); + public ref int CPin { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F5CAA9CA3D)); + get => ref _Handle.AsRef(_CPinOffset.Value); } + private static readonly Lazy _ProxyRadiusOffset = new(() => Schema.GetOffset(0xF3FC60F55BDAD4C7), LazyThreadSafetyMode.None); + public ref float ProxyRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F55BDAD4C7)); + get => ref _Handle.AsRef(_ProxyRadiusOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0xF3FC60F5E88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F5E88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0xF3FC60F5D6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F5D6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _InputPixelVisFadeOffset = new(() => Schema.GetOffset(0xF3FC60F521E711C1), LazyThreadSafetyMode.None); + public ref float InputPixelVisFade { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F521E711C1)); + get => ref _Handle.AsRef(_InputPixelVisFadeOffset.Value); } + private static readonly Lazy _NoPixelVisibilityFallbackOffset = new(() => Schema.GetOffset(0xF3FC60F586460B8E), LazyThreadSafetyMode.None); + public ref float NoPixelVisibilityFallback { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F586460B8E)); + get => ref _Handle.AsRef(_NoPixelVisibilityFallbackOffset.Value); } + private static readonly Lazy _DistanceInputMinOffset = new(() => Schema.GetOffset(0xF3FC60F5D734ED90), LazyThreadSafetyMode.None); + public ref float DistanceInputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F5D734ED90)); + get => ref _Handle.AsRef(_DistanceInputMinOffset.Value); } + private static readonly Lazy _DistanceInputMaxOffset = new(() => Schema.GetOffset(0xF3FC60F5CD21561A), LazyThreadSafetyMode.None); + public ref float DistanceInputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F5CD21561A)); + get => ref _Handle.AsRef(_DistanceInputMaxOffset.Value); } + private static readonly Lazy _DotInputMinOffset = new(() => Schema.GetOffset(0xF3FC60F5AD21DD8A), LazyThreadSafetyMode.None); + public ref float DotInputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F5AD21DD8A)); + get => ref _Handle.AsRef(_DotInputMinOffset.Value); } + private static readonly Lazy _DotInputMaxOffset = new(() => Schema.GetOffset(0xF3FC60F5B7357500), LazyThreadSafetyMode.None); + public ref float DotInputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F5B7357500)); + get => ref _Handle.AsRef(_DotInputMaxOffset.Value); } + private static readonly Lazy _DotCPAnglesOffset = new(() => Schema.GetOffset(0xF3FC60F50D0315CB), LazyThreadSafetyMode.None); + public ref bool DotCPAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F50D0315CB)); + get => ref _Handle.AsRef(_DotCPAnglesOffset.Value); } + private static readonly Lazy _DotCameraAnglesOffset = new(() => Schema.GetOffset(0xF3FC60F5A84A80CF), LazyThreadSafetyMode.None); + public ref bool DotCameraAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F5A84A80CF)); + get => ref _Handle.AsRef(_DotCameraAnglesOffset.Value); } + private static readonly Lazy _AlphaScaleMinOffset = new(() => Schema.GetOffset(0xF3FC60F53AEC0597), LazyThreadSafetyMode.None); + public ref float AlphaScaleMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F53AEC0597)); + get => ref _Handle.AsRef(_AlphaScaleMinOffset.Value); } + private static readonly Lazy _AlphaScaleMaxOffset = new(() => Schema.GetOffset(0xF3FC60F548FFA359), LazyThreadSafetyMode.None); + public ref float AlphaScaleMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F548FFA359)); + get => ref _Handle.AsRef(_AlphaScaleMaxOffset.Value); } + private static readonly Lazy _RadiusScaleMinOffset = new(() => Schema.GetOffset(0xF3FC60F53A308DB3), LazyThreadSafetyMode.None); + public ref float RadiusScaleMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F53A308DB3)); + get => ref _Handle.AsRef(_RadiusScaleMinOffset.Value); } + private static readonly Lazy _RadiusScaleMaxOffset = new(() => Schema.GetOffset(0xF3FC60F55044380D), LazyThreadSafetyMode.None); + public ref float RadiusScaleMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F55044380D)); + get => ref _Handle.AsRef(_RadiusScaleMaxOffset.Value); } + private static readonly Lazy _RadiusScaleFOVBaseOffset = new(() => Schema.GetOffset(0xF3FC60F521D6B3D5), LazyThreadSafetyMode.None); + public ref float RadiusScaleFOVBase { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F521D6B3D5)); + get => ref _Handle.AsRef(_RadiusScaleFOVBaseOffset.Value); } + private static readonly Lazy _RightEyeOffset = new(() => Schema.GetOffset(0xF3FC60F5D4BB0DBA), LazyThreadSafetyMode.None); + public ref bool RightEye { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3FC60F5D4BB0DBA)); + get => ref _Handle.AsRef(_RightEyeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathAnimMotorUpdaterBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathAnimMotorUpdaterBaseImpl.cs index 90149adbf..7478b1439 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathAnimMotorUpdaterBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathAnimMotorUpdaterBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPathAnimMotorUpdaterBaseImpl : CAnimMotorUpdaterBaseImpl public CPathAnimMotorUpdaterBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _LockToPathOffset = new(() => Schema.GetOffset(0x165EE5771F2F0960), LazyThreadSafetyMode.None); + public ref bool LockToPath { - get => ref _Handle.AsRef(Schema.GetOffset(0x165EE5771F2F0960)); + get => ref _Handle.AsRef(_LockToPathOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathAnimMotorUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathAnimMotorUpdaterImpl.cs index 551f91030..92a93ff93 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathAnimMotorUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathAnimMotorUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathCornerCrashImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathCornerCrashImpl.cs index 49320ae76..a824e07dc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathCornerCrashImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathCornerCrashImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathCornerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathCornerImpl.cs index 954c49a4f..0211d791f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathCornerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathCornerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CPathCornerImpl : CPointEntityImpl, CPathCorner { public CPathCornerImpl(nint handle) : base(handle) { } + private static readonly Lazy _WaitOffset = new(() => Schema.GetOffset(0xF74EA45499A062B6), LazyThreadSafetyMode.None); + public ref float Wait { - get => ref _Handle.AsRef(Schema.GetOffset(0xF74EA45499A062B6)); + get => ref _Handle.AsRef(_WaitOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0xF74EA4545ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0xF74EA4545ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _OnPassOffset = new(() => Schema.GetOffset(0xF74EA4549B527249), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPass { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xF74EA4549B527249)); + get => new CEntityIOOutputImpl(_Handle + _OnPassOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathHelperUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathHelperUpdateNodeImpl.cs index 54b55d14d..eb9378e01 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathHelperUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathHelperUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPathHelperUpdateNodeImpl : CUnaryUpdateNodeImpl, CPathHe public CPathHelperUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _StoppingRadiusOffset = new(() => Schema.GetOffset(0xB24262C3172E3D9), LazyThreadSafetyMode.None); + public ref float StoppingRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xB24262C3172E3D9)); + get => ref _Handle.AsRef(_StoppingRadiusOffset.Value); } + private static readonly Lazy _StoppingSpeedScaleOffset = new(() => Schema.GetOffset(0xB24262CA2389D04), LazyThreadSafetyMode.None); + public ref float StoppingSpeedScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xB24262CA2389D04)); + get => ref _Handle.AsRef(_StoppingSpeedScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathKeyFrameImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathKeyFrameImpl.cs index ba134dfed..d3045c438 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathKeyFrameImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathKeyFrameImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,39 +17,55 @@ internal partial class CPathKeyFrameImpl : CLogicalEntityImpl, CPathKeyFrame { public CPathKeyFrameImpl(nint handle) : base(handle) { } + private static readonly Lazy _OriginOffset = new(() => Schema.GetOffset(0x34025185482052CF), LazyThreadSafetyMode.None); + public ref Vector Origin { - get => ref _Handle.AsRef(Schema.GetOffset(0x34025185482052CF)); + get => ref _Handle.AsRef(_OriginOffset.Value); } + private static readonly Lazy _AnglesOffset = new(() => Schema.GetOffset(0x34025185B5486CF1), LazyThreadSafetyMode.None); + public ref QAngle Angles { - get => ref _Handle.AsRef(Schema.GetOffset(0x34025185B5486CF1)); + get => ref _Handle.AsRef(_AnglesOffset.Value); } + private static readonly Lazy _AngleOffset = new(() => Schema.GetOffset(0x34025185CE339C27), LazyThreadSafetyMode.None); + public ref Quaternion Angle { - get => ref _Handle.AsRef(Schema.GetOffset(0x34025185CE339C27)); + get => ref _Handle.AsRef(_AngleOffset.Value); } + private static readonly Lazy _NextKeyOffset = new(() => Schema.GetOffset(0x340251858326E814), LazyThreadSafetyMode.None); + public string NextKey { get { - var ptr = _Handle.Read(Schema.GetOffset(0x340251858326E814)); + var ptr = _Handle.Read(_NextKeyOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x340251858326E814, value); + set => Schema.SetString(_Handle, _NextKeyOffset.Value, value); } + private static readonly Lazy _NextTimeOffset = new(() => Schema.GetOffset(0x340251854F129C67), LazyThreadSafetyMode.None); + public ref float NextTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x340251854F129C67)); + get => ref _Handle.AsRef(_NextTimeOffset.Value); } + private static readonly Lazy _NextKey1Offset = new(() => Schema.GetOffset(0x3402518585EE45D5), LazyThreadSafetyMode.None); + public CPathKeyFrame? NextKey1 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x3402518585EE45D5)); + var ptr = _Handle.Read(_NextKey1Offset.Value); return ptr.IsValidPtr() ? new CPathKeyFrameImpl(ptr) : null; } } + private static readonly Lazy _PrevKeyOffset = new(() => Schema.GetOffset(0x34025185B9327481), LazyThreadSafetyMode.None); + public CPathKeyFrame? PrevKey { get { - var ptr = _Handle.Read(Schema.GetOffset(0x34025185B9327481)); + var ptr = _Handle.Read(_PrevKeyOffset.Value); return ptr.IsValidPtr() ? new CPathKeyFrameImpl(ptr) : null; } } + private static readonly Lazy _MoveSpeedOffset = new(() => Schema.GetOffset(0x3402518566D18279), LazyThreadSafetyMode.None); + public ref float MoveSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x3402518566D18279)); + get => ref _Handle.AsRef(_MoveSpeedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathMetricEvaluatorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathMetricEvaluatorImpl.cs index e8854c563..49196fc78 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathMetricEvaluatorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathMetricEvaluatorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CPathMetricEvaluatorImpl : CMotionMetricEvaluatorImpl, CP public CPathMetricEvaluatorImpl(nint handle) : base(handle) { } + private static readonly Lazy _PathTimeSamplesOffset = new(() => Schema.GetOffset(0x6BF20F3A94DC552A), LazyThreadSafetyMode.None); + public ref CUtlVector PathTimeSamples { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6BF20F3A94DC552A)); + get => ref _Handle.AsRef>(_PathTimeSamplesOffset.Value); } + private static readonly Lazy _DistanceOffset = new(() => Schema.GetOffset(0x6BF20F3A00DC4A68), LazyThreadSafetyMode.None); + public ref float Distance { - get => ref _Handle.AsRef(Schema.GetOffset(0x6BF20F3A00DC4A68)); + get => ref _Handle.AsRef(_DistanceOffset.Value); } + private static readonly Lazy _ExtrapolateMovementOffset = new(() => Schema.GetOffset(0x6BF20F3ACBEE3025), LazyThreadSafetyMode.None); + public ref bool ExtrapolateMovement { - get => ref _Handle.AsRef(Schema.GetOffset(0x6BF20F3ACBEE3025)); + get => ref _Handle.AsRef(_ExtrapolateMovementOffset.Value); } + private static readonly Lazy _MinExtrapolationSpeedOffset = new(() => Schema.GetOffset(0x6BF20F3A9F6FB95C), LazyThreadSafetyMode.None); + public ref float MinExtrapolationSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x6BF20F3A9F6FB95C)); + get => ref _Handle.AsRef(_MinExtrapolationSpeedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathMoverImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathMoverImpl.cs index 752d022a6..96405a430 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathMoverImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathMoverImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CPathMoverImpl : CPathSimpleImpl, CPathMover { public CPathMoverImpl(nint handle) : base(handle) { } + private static readonly Lazy _PathNodesOffset = new(() => Schema.GetOffset(0x459CE4C6FD746CE3), LazyThreadSafetyMode.None); + public ref CUtlVector> PathNodes { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x459CE4C6FD746CE3)); + get => ref _Handle.AsRef>>(_PathNodesOffset.Value); } + private static readonly Lazy _MoversOffset = new(() => Schema.GetOffset(0x459CE4C65C9C4C93), LazyThreadSafetyMode.None); + public ref CUtlVector> Movers { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x459CE4C65C9C4C93)); + get => ref _Handle.AsRef>>(_MoversOffset.Value); } + private static readonly Lazy _XInitialPathWorldToLocalOffset = new(() => Schema.GetOffset(0x459CE4C6FE5D385E), LazyThreadSafetyMode.None); + public ref CTransform XInitialPathWorldToLocal { - get => ref _Handle.AsRef(Schema.GetOffset(0x459CE4C6FE5D385E)); + get => ref _Handle.AsRef(_XInitialPathWorldToLocalOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathParametersImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathParametersImpl.cs index 8e8cdbbde..e2afc89b3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathParametersImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathParametersImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CPathParametersImpl : SchemaClass, CPathParameters { public CPathParametersImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartControlPointNumberOffset = new(() => Schema.GetOffset(0xE2D8E825CA0E0087), LazyThreadSafetyMode.None); + public ref int StartControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xE2D8E825CA0E0087)); + get => ref _Handle.AsRef(_StartControlPointNumberOffset.Value); } + private static readonly Lazy _EndControlPointNumberOffset = new(() => Schema.GetOffset(0xE2D8E825A9FAEC22), LazyThreadSafetyMode.None); + public ref int EndControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xE2D8E825A9FAEC22)); + get => ref _Handle.AsRef(_EndControlPointNumberOffset.Value); } + private static readonly Lazy _BulgeControlOffset = new(() => Schema.GetOffset(0xE2D8E8257C6B6E5D), LazyThreadSafetyMode.None); + public ref int BulgeControl { - get => ref _Handle.AsRef(Schema.GetOffset(0xE2D8E8257C6B6E5D)); + get => ref _Handle.AsRef(_BulgeControlOffset.Value); } + private static readonly Lazy _BulgeOffset = new(() => Schema.GetOffset(0xE2D8E825E9AF7E9A), LazyThreadSafetyMode.None); + public ref float Bulge { - get => ref _Handle.AsRef(Schema.GetOffset(0xE2D8E825E9AF7E9A)); + get => ref _Handle.AsRef(_BulgeOffset.Value); } + private static readonly Lazy _MidPointOffset = new(() => Schema.GetOffset(0xE2D8E825427785A3), LazyThreadSafetyMode.None); + public ref float MidPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xE2D8E825427785A3)); + get => ref _Handle.AsRef(_MidPointOffset.Value); } + private static readonly Lazy _StartPointOffsetOffset = new(() => Schema.GetOffset(0xE2D8E82516897120), LazyThreadSafetyMode.None); + public ref Vector StartPointOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xE2D8E82516897120)); + get => ref _Handle.AsRef(_StartPointOffsetOffset.Value); } + private static readonly Lazy _MidPointOffsetOffset = new(() => Schema.GetOffset(0xE2D8E8252888EB92), LazyThreadSafetyMode.None); + public ref Vector MidPointOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xE2D8E8252888EB92)); + get => ref _Handle.AsRef(_MidPointOffsetOffset.Value); } + private static readonly Lazy _EndOffsetOffset = new(() => Schema.GetOffset(0xE2D8E8255BBD1959), LazyThreadSafetyMode.None); + public ref Vector EndOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xE2D8E8255BBD1959)); + get => ref _Handle.AsRef(_EndOffsetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathParticleRopeAlias_path_particle_rope_clientsideImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathParticleRopeAlias_path_particle_rope_clientsideImpl.cs index 86923095d..1e8b2ee99 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathParticleRopeAlias_path_particle_rope_clientsideImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathParticleRopeAlias_path_particle_rope_clientsideImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathParticleRopeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathParticleRopeImpl.cs index 1a84a9f7d..f6b385ae9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathParticleRopeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathParticleRopeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,57 +17,89 @@ internal partial class CPathParticleRopeImpl : CBaseEntityImpl, CPathParticleRop public CPathParticleRopeImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartActiveOffset = new(() => Schema.GetOffset(0xBC0C741B953CBC21), LazyThreadSafetyMode.None); + public ref bool StartActive { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC0C741B953CBC21)); + get => ref _Handle.AsRef(_StartActiveOffset.Value); } + private static readonly Lazy _MaxSimulationTimeOffset = new(() => Schema.GetOffset(0xBC0C741B80F036E5), LazyThreadSafetyMode.None); + public ref float MaxSimulationTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC0C741B80F036E5)); + get => ref _Handle.AsRef(_MaxSimulationTimeOffset.Value); } + private static readonly Lazy _EffectNameOffset = new(() => Schema.GetOffset(0xBC0C741B82D2BFC7), LazyThreadSafetyMode.None); + public string EffectName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xBC0C741B82D2BFC7)); + var ptr = _Handle.Read(_EffectNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xBC0C741B82D2BFC7, value); + set => Schema.SetString(_Handle, _EffectNameOffset.Value, value); } + private static readonly Lazy _PathNodes_NameOffset = new(() => Schema.GetOffset(0xBC0C741BFFAFA92F), LazyThreadSafetyMode.None); + public ref CUtlVector PathNodes_Name { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBC0C741BFFAFA92F)); + get => ref _Handle.AsRef>(_PathNodes_NameOffset.Value); } + private static readonly Lazy _ParticleSpacingOffset = new(() => Schema.GetOffset(0xBC0C741B66CCF542), LazyThreadSafetyMode.None); + public ref float ParticleSpacing { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC0C741B66CCF542)); + get => ref _Handle.AsRef(_ParticleSpacingOffset.Value); } + private static readonly Lazy _SlackOffset = new(() => Schema.GetOffset(0xBC0C741B183285C9), LazyThreadSafetyMode.None); + public ref float Slack { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC0C741B183285C9)); + get => ref _Handle.AsRef(_SlackOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0xBC0C741B5ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC0C741B5ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _ColorTintOffset = new(() => Schema.GetOffset(0xBC0C741BD55CDDFD), LazyThreadSafetyMode.None); + public ref Color ColorTint { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC0C741BD55CDDFD)); + get => ref _Handle.AsRef(_ColorTintOffset.Value); } + private static readonly Lazy _EffectStateOffset = new(() => Schema.GetOffset(0xBC0C741B4188A2AD), LazyThreadSafetyMode.None); + public ref int EffectState { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC0C741B4188A2AD)); + get => ref _Handle.AsRef(_EffectStateOffset.Value); } + private static readonly Lazy _EffectIndexOffset = new(() => Schema.GetOffset(0xBC0C741B3C93DC73), LazyThreadSafetyMode.None); + public ref CStrongHandle EffectIndex { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBC0C741B3C93DC73)); + get => ref _Handle.AsRef>(_EffectIndexOffset.Value); } + private static readonly Lazy _PathNodes_PositionOffset = new(() => Schema.GetOffset(0xBC0C741BC84253C7), LazyThreadSafetyMode.None); + public ref CUtlVector PathNodes_Position { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBC0C741BC84253C7)); + get => ref _Handle.AsRef>(_PathNodes_PositionOffset.Value); } + private static readonly Lazy _PathNodes_TangentInOffset = new(() => Schema.GetOffset(0xBC0C741B4CEA7F8E), LazyThreadSafetyMode.None); + public ref CUtlVector PathNodes_TangentIn { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBC0C741B4CEA7F8E)); + get => ref _Handle.AsRef>(_PathNodes_TangentInOffset.Value); } + private static readonly Lazy _PathNodes_TangentOutOffset = new(() => Schema.GetOffset(0xBC0C741B218FA6AF), LazyThreadSafetyMode.None); + public ref CUtlVector PathNodes_TangentOut { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBC0C741B218FA6AF)); + get => ref _Handle.AsRef>(_PathNodes_TangentOutOffset.Value); } + private static readonly Lazy _PathNodes_ColorOffset = new(() => Schema.GetOffset(0xBC0C741B6DB8C1DB), LazyThreadSafetyMode.None); + public ref CUtlVector PathNodes_Color { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBC0C741B6DB8C1DB)); + get => ref _Handle.AsRef>(_PathNodes_ColorOffset.Value); } + private static readonly Lazy _PathNodes_PinEnabledOffset = new(() => Schema.GetOffset(0xBC0C741B830E8AD8), LazyThreadSafetyMode.None); + public ref CUtlVector PathNodes_PinEnabled { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBC0C741B830E8AD8)); + get => ref _Handle.AsRef>(_PathNodes_PinEnabledOffset.Value); } + private static readonly Lazy _PathNodes_RadiusScaleOffset = new(() => Schema.GetOffset(0xBC0C741B593CB340), LazyThreadSafetyMode.None); + public ref CUtlVector PathNodes_RadiusScale { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBC0C741B593CB340)); + get => ref _Handle.AsRef>(_PathNodes_RadiusScaleOffset.Value); } public void ParticleSpacingUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathQueryComponentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathQueryComponentImpl.cs index 7f275f142..f9e072712 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathQueryComponentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathQueryComponentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathQueryUtilImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathQueryUtilImpl.cs index d3a152684..ba8735212 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathQueryUtilImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathQueryUtilImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CPathQueryUtilImpl : SchemaClass, CPathQueryUtil { public CPathQueryUtilImpl(nint handle) : base(handle) { } + private static readonly Lazy _PathToEntityTransformOffset = new(() => Schema.GetOffset(0x52D1B6431A6FA220), LazyThreadSafetyMode.None); + public ref CTransform PathToEntityTransform { - get => ref _Handle.AsRef(Schema.GetOffset(0x52D1B6431A6FA220)); + get => ref _Handle.AsRef(_PathToEntityTransformOffset.Value); } + private static readonly Lazy _PathSamplePositionsOffset = new(() => Schema.GetOffset(0x52D1B643099F5ECC), LazyThreadSafetyMode.None); + public ref CUtlVector PathSamplePositions { - get => ref _Handle.AsRef>(Schema.GetOffset(0x52D1B643099F5ECC)); + get => ref _Handle.AsRef>(_PathSamplePositionsOffset.Value); } + private static readonly Lazy _PathSampleParametersOffset = new(() => Schema.GetOffset(0x52D1B6431D6E0D08), LazyThreadSafetyMode.None); + public ref CUtlVector PathSampleParameters { - get => ref _Handle.AsRef>(Schema.GetOffset(0x52D1B6431D6E0D08)); + get => ref _Handle.AsRef>(_PathSampleParametersOffset.Value); } + private static readonly Lazy _PathSampleDistancesOffset = new(() => Schema.GetOffset(0x52D1B6435680B274), LazyThreadSafetyMode.None); + public ref CUtlVector PathSampleDistances { - get => ref _Handle.AsRef>(Schema.GetOffset(0x52D1B6435680B274)); + get => ref _Handle.AsRef>(_PathSampleDistancesOffset.Value); } + private static readonly Lazy _IsClosedLoopOffset = new(() => Schema.GetOffset(0x52D1B6430806319B), LazyThreadSafetyMode.None); + public ref bool IsClosedLoop { - get => ref _Handle.AsRef(Schema.GetOffset(0x52D1B6430806319B)); + get => ref _Handle.AsRef(_IsClosedLoopOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathSimpleAPIImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathSimpleAPIImpl.cs index 016a38a4f..6441690cb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathSimpleAPIImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathSimpleAPIImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathSimpleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathSimpleImpl.cs index ae45953a6..c01689336 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathSimpleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathSimpleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class CPathSimpleImpl : CBaseEntityImpl, CPathSimple { public CPathSimpleImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPathQueryComponentOffset = new(() => Schema.GetOffset(0x10936CB34513F542), LazyThreadSafetyMode.None); + public CPathQueryComponent CPathQueryComponent { - get => new CPathQueryComponentImpl(_Handle + Schema.GetOffset(0x10936CB34513F542)); + get => new CPathQueryComponentImpl(_Handle + _CPathQueryComponentOffset.Value); } + private static readonly Lazy _PathStringOffset = new(() => Schema.GetOffset(0x10936CB36EC51AA7), LazyThreadSafetyMode.None); + public string PathString { get { - var ptr = _Handle.Read(Schema.GetOffset(0x10936CB36EC51AA7)); + var ptr = _Handle.Read(_PathStringOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x10936CB36EC51AA7, value); + set => Schema.SetString(_Handle, _PathStringOffset.Value, value); } + private static readonly Lazy _ClosedLoopOffset = new(() => Schema.GetOffset(0x10936CB37C20D1AB), LazyThreadSafetyMode.None); + public ref bool ClosedLoop { - get => ref _Handle.AsRef(Schema.GetOffset(0x10936CB37C20D1AB)); + get => ref _Handle.AsRef(_ClosedLoopOffset.Value); } public void CPathQueryComponentUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathTrackImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathTrackImpl.cs index 5418ee61e..96ab22bba 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathTrackImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPathTrackImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,45 +17,63 @@ internal partial class CPathTrackImpl : CPointEntityImpl, CPathTrack { public CPathTrackImpl(nint handle) : base(handle) { } + private static readonly Lazy _PnextOffset = new(() => Schema.GetOffset(0xF86750E8B008D5EE), LazyThreadSafetyMode.None); + public CPathTrack? Pnext { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF86750E8B008D5EE)); + var ptr = _Handle.Read(_PnextOffset.Value); return ptr.IsValidPtr() ? new CPathTrackImpl(ptr) : null; } } + private static readonly Lazy _PpreviousOffset = new(() => Schema.GetOffset(0xF86750E8BD38AFD2), LazyThreadSafetyMode.None); + public CPathTrack? Pprevious { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF86750E8BD38AFD2)); + var ptr = _Handle.Read(_PpreviousOffset.Value); return ptr.IsValidPtr() ? new CPathTrackImpl(ptr) : null; } } + private static readonly Lazy _PaltpathOffset = new(() => Schema.GetOffset(0xF86750E868D10551), LazyThreadSafetyMode.None); + public CPathTrack? Paltpath { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF86750E868D10551)); + var ptr = _Handle.Read(_PaltpathOffset.Value); return ptr.IsValidPtr() ? new CPathTrackImpl(ptr) : null; } } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0xF86750E85ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0xF86750E85ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _LengthOffset = new(() => Schema.GetOffset(0xF86750E83AFED1B5), LazyThreadSafetyMode.None); + public ref float Length { - get => ref _Handle.AsRef(Schema.GetOffset(0xF86750E83AFED1B5)); + get => ref _Handle.AsRef(_LengthOffset.Value); } + private static readonly Lazy _AltNameOffset = new(() => Schema.GetOffset(0xF86750E8501CA457), LazyThreadSafetyMode.None); + public string AltName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF86750E8501CA457)); + var ptr = _Handle.Read(_AltNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF86750E8501CA457, value); + set => Schema.SetString(_Handle, _AltNameOffset.Value, value); } + private static readonly Lazy _IterValOffset = new(() => Schema.GetOffset(0xF86750E808061552), LazyThreadSafetyMode.None); + public ref int IterVal { - get => ref _Handle.AsRef(Schema.GetOffset(0xF86750E808061552)); + get => ref _Handle.AsRef(_IterValOffset.Value); } + private static readonly Lazy _OrientationTypeOffset = new(() => Schema.GetOffset(0xF86750E8468ECE0A), LazyThreadSafetyMode.None); + public ref TrackOrientationType_t OrientationType { - get => ref _Handle.AsRef(Schema.GetOffset(0xF86750E8468ECE0A)); + get => ref _Handle.AsRef(_OrientationTypeOffset.Value); } + private static readonly Lazy _OnPassOffset = new(() => Schema.GetOffset(0xF86750E89B527249), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPass { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xF86750E89B527249)); + get => new CEntityIOOutputImpl(_Handle + _OnPassOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPerParticleFloatInputImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPerParticleFloatInputImpl.cs index 6366dc346..8c7feeb5f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPerParticleFloatInputImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPerParticleFloatInputImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPerParticleVecInputImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPerParticleVecInputImpl.cs index cfab15086..f8ffb7cd7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPerParticleVecInputImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPerParticleVecInputImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysBallSocketImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysBallSocketImpl.cs index ee021383a..082e4495c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysBallSocketImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysBallSocketImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CPhysBallSocketImpl : CPhysConstraintImpl, CPhysBallSocke public CPhysBallSocketImpl(nint handle) : base(handle) { } + private static readonly Lazy _JointFrictionOffset = new(() => Schema.GetOffset(0xDE2408965CA9FD47), LazyThreadSafetyMode.None); + public ref float JointFriction { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE2408965CA9FD47)); + get => ref _Handle.AsRef(_JointFrictionOffset.Value); } + private static readonly Lazy _EnableSwingLimitOffset = new(() => Schema.GetOffset(0xDE240896DADAC14B), LazyThreadSafetyMode.None); + public ref bool EnableSwingLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE240896DADAC14B)); + get => ref _Handle.AsRef(_EnableSwingLimitOffset.Value); } + private static readonly Lazy _SwingLimitOffset = new(() => Schema.GetOffset(0xDE240896279A44C2), LazyThreadSafetyMode.None); + public ref float SwingLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE240896279A44C2)); + get => ref _Handle.AsRef(_SwingLimitOffset.Value); } + private static readonly Lazy _EnableTwistLimitOffset = new(() => Schema.GetOffset(0xDE2408967DBEA570), LazyThreadSafetyMode.None); + public ref bool EnableTwistLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE2408967DBEA570)); + get => ref _Handle.AsRef(_EnableTwistLimitOffset.Value); } + private static readonly Lazy _MinTwistAngleOffset = new(() => Schema.GetOffset(0xDE240896B6E6BB7F), LazyThreadSafetyMode.None); + public ref float MinTwistAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE240896B6E6BB7F)); + get => ref _Handle.AsRef(_MinTwistAngleOffset.Value); } + private static readonly Lazy _MaxTwistAngleOffset = new(() => Schema.GetOffset(0xDE24089690C63AD5), LazyThreadSafetyMode.None); + public ref float MaxTwistAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE24089690C63AD5)); + get => ref _Handle.AsRef(_MaxTwistAngleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysBoxImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysBoxImpl.cs index ce9e133ce..3871eab74 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysBoxImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysBoxImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,50 +17,80 @@ internal partial class CPhysBoxImpl : CBreakableImpl, CPhysBox { public CPhysBoxImpl(nint handle) : base(handle) { } + private static readonly Lazy _DamageTypeOffset = new(() => Schema.GetOffset(0x914B502B17488B28), LazyThreadSafetyMode.None); + public ref int DamageType { - get => ref _Handle.AsRef(Schema.GetOffset(0x914B502B17488B28)); + get => ref _Handle.AsRef(_DamageTypeOffset.Value); } + private static readonly Lazy _DamageToEnableMotionOffset = new(() => Schema.GetOffset(0x914B502B6A217278), LazyThreadSafetyMode.None); + public ref int DamageToEnableMotion { - get => ref _Handle.AsRef(Schema.GetOffset(0x914B502B6A217278)); + get => ref _Handle.AsRef(_DamageToEnableMotionOffset.Value); } + private static readonly Lazy _ForceToEnableMotionOffset = new(() => Schema.GetOffset(0x914B502B95BEED1A), LazyThreadSafetyMode.None); + public ref float ForceToEnableMotion { - get => ref _Handle.AsRef(Schema.GetOffset(0x914B502B95BEED1A)); + get => ref _Handle.AsRef(_ForceToEnableMotionOffset.Value); } + private static readonly Lazy _HoverPosePositionOffset = new(() => Schema.GetOffset(0x914B502BE70418E3), LazyThreadSafetyMode.None); + public ref Vector HoverPosePosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x914B502BE70418E3)); + get => ref _Handle.AsRef(_HoverPosePositionOffset.Value); } + private static readonly Lazy _HoverPoseAnglesOffset = new(() => Schema.GetOffset(0x914B502B086A1BC6), LazyThreadSafetyMode.None); + public ref QAngle HoverPoseAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0x914B502B086A1BC6)); + get => ref _Handle.AsRef(_HoverPoseAnglesOffset.Value); } + private static readonly Lazy _NotSolidToWorldOffset = new(() => Schema.GetOffset(0x914B502B13A06DE8), LazyThreadSafetyMode.None); + public ref bool NotSolidToWorld { - get => ref _Handle.AsRef(Schema.GetOffset(0x914B502B13A06DE8)); + get => ref _Handle.AsRef(_NotSolidToWorldOffset.Value); } + private static readonly Lazy _EnableUseOutputOffset = new(() => Schema.GetOffset(0x914B502B2426C360), LazyThreadSafetyMode.None); + public ref bool EnableUseOutput { - get => ref _Handle.AsRef(Schema.GetOffset(0x914B502B2426C360)); + get => ref _Handle.AsRef(_EnableUseOutputOffset.Value); } + private static readonly Lazy _HoverPoseFlagsOffset = new(() => Schema.GetOffset(0x914B502BE0BEF17B), LazyThreadSafetyMode.None); + public ref HoverPoseFlags_t HoverPoseFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0x914B502BE0BEF17B)); + get => ref _Handle.AsRef(_HoverPoseFlagsOffset.Value); } + private static readonly Lazy _TouchOutputPerEntityDelayOffset = new(() => Schema.GetOffset(0x914B502B0F1EF0C0), LazyThreadSafetyMode.None); + public ref float TouchOutputPerEntityDelay { - get => ref _Handle.AsRef(Schema.GetOffset(0x914B502B0F1EF0C0)); + get => ref _Handle.AsRef(_TouchOutputPerEntityDelayOffset.Value); } + private static readonly Lazy _OnDamagedOffset = new(() => Schema.GetOffset(0x914B502B1667F41F), LazyThreadSafetyMode.None); + public CEntityIOOutput OnDamaged { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x914B502B1667F41F)); + get => new CEntityIOOutputImpl(_Handle + _OnDamagedOffset.Value); } + private static readonly Lazy _OnAwakenedOffset = new(() => Schema.GetOffset(0x914B502B03EDBB66), LazyThreadSafetyMode.None); + public CEntityIOOutput OnAwakened { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x914B502B03EDBB66)); + get => new CEntityIOOutputImpl(_Handle + _OnAwakenedOffset.Value); } + private static readonly Lazy _OnMotionEnabledOffset = new(() => Schema.GetOffset(0x914B502BBB216C9F), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMotionEnabled { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x914B502BBB216C9F)); + get => new CEntityIOOutputImpl(_Handle + _OnMotionEnabledOffset.Value); } + private static readonly Lazy _OnPlayerUseOffset = new(() => Schema.GetOffset(0x914B502B611C9A14), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPlayerUse { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x914B502B611C9A14)); + get => new CEntityIOOutputImpl(_Handle + _OnPlayerUseOffset.Value); } + private static readonly Lazy _OnStartTouchOffset = new(() => Schema.GetOffset(0x914B502BB4E38193), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStartTouch { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x914B502BB4E38193)); + get => new CEntityIOOutputImpl(_Handle + _OnStartTouchOffset.Value); } + private static readonly Lazy _CarryingPlayerOffset = new(() => Schema.GetOffset(0x914B502B0491B86F), LazyThreadSafetyMode.None); + public ref CHandle CarryingPlayer { - get => ref _Handle.AsRef>(Schema.GetOffset(0x914B502B0491B86F)); + get => ref _Handle.AsRef>(_CarryingPlayerOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysConstraintImpl.cs index 0e5bf4f08..d8063661d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,64 +17,90 @@ internal partial class CPhysConstraintImpl : CLogicalEntityImpl, CPhysConstraint public CPhysConstraintImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameAttach1Offset = new(() => Schema.GetOffset(0xB17225456776530A), LazyThreadSafetyMode.None); + public string NameAttach1 { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB17225456776530A)); + var ptr = _Handle.Read(_NameAttach1Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB17225456776530A, value); + set => Schema.SetString(_Handle, _NameAttach1Offset.Value, value); } + private static readonly Lazy _NameAttach2Offset = new(() => Schema.GetOffset(0xB172254566765177), LazyThreadSafetyMode.None); + public string NameAttach2 { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB172254566765177)); + var ptr = _Handle.Read(_NameAttach2Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB172254566765177, value); + set => Schema.SetString(_Handle, _NameAttach2Offset.Value, value); } + private static readonly Lazy _Attach1Offset = new(() => Schema.GetOffset(0xB1722545384EDC59), LazyThreadSafetyMode.None); + public ref CHandle Attach1 { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB1722545384EDC59)); + get => ref _Handle.AsRef>(_Attach1Offset.Value); } + private static readonly Lazy _Attach2Offset = new(() => Schema.GetOffset(0xB1722545354ED7A0), LazyThreadSafetyMode.None); + public ref CHandle Attach2 { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB1722545354ED7A0)); + get => ref _Handle.AsRef>(_Attach2Offset.Value); } + private static readonly Lazy _NameAttachment1Offset = new(() => Schema.GetOffset(0xB172254517A81C36), LazyThreadSafetyMode.None); + public string NameAttachment1 { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB172254517A81C36)); + var ptr = _Handle.Read(_NameAttachment1Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB172254517A81C36, value); + set => Schema.SetString(_Handle, _NameAttachment1Offset.Value, value); } + private static readonly Lazy _NameAttachment2Offset = new(() => Schema.GetOffset(0xB172254516A81AA3), LazyThreadSafetyMode.None); + public string NameAttachment2 { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB172254516A81AA3)); + var ptr = _Handle.Read(_NameAttachment2Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB172254516A81AA3, value); + set => Schema.SetString(_Handle, _NameAttachment2Offset.Value, value); } + private static readonly Lazy _BreakSoundOffset = new(() => Schema.GetOffset(0xB17225456CFE49F7), LazyThreadSafetyMode.None); + public string BreakSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB17225456CFE49F7)); + var ptr = _Handle.Read(_BreakSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB17225456CFE49F7, value); + set => Schema.SetString(_Handle, _BreakSoundOffset.Value, value); } + private static readonly Lazy _ForceLimitOffset = new(() => Schema.GetOffset(0xB1722545BA45B8F7), LazyThreadSafetyMode.None); + public ref float ForceLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0xB1722545BA45B8F7)); + get => ref _Handle.AsRef(_ForceLimitOffset.Value); } + private static readonly Lazy _TorqueLimitOffset = new(() => Schema.GetOffset(0xB17225456D51FE3E), LazyThreadSafetyMode.None); + public ref float TorqueLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0xB17225456D51FE3E)); + get => ref _Handle.AsRef(_TorqueLimitOffset.Value); } + private static readonly Lazy _MinTeleportDistanceOffset = new(() => Schema.GetOffset(0xB172254512C704EB), LazyThreadSafetyMode.None); + public ref float MinTeleportDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xB172254512C704EB)); + get => ref _Handle.AsRef(_MinTeleportDistanceOffset.Value); } + private static readonly Lazy _SnapObjectPositionsOffset = new(() => Schema.GetOffset(0xB172254570EDFC5A), LazyThreadSafetyMode.None); + public ref bool SnapObjectPositions { - get => ref _Handle.AsRef(Schema.GetOffset(0xB172254570EDFC5A)); + get => ref _Handle.AsRef(_SnapObjectPositionsOffset.Value); } + private static readonly Lazy _TreatEntity1AsInfiniteMassOffset = new(() => Schema.GetOffset(0xB1722545216BB1E7), LazyThreadSafetyMode.None); + public ref bool TreatEntity1AsInfiniteMass { - get => ref _Handle.AsRef(Schema.GetOffset(0xB1722545216BB1E7)); + get => ref _Handle.AsRef(_TreatEntity1AsInfiniteMassOffset.Value); } + private static readonly Lazy _OnBreakOffset = new(() => Schema.GetOffset(0xB172254546BFEC4F), LazyThreadSafetyMode.None); + public CEntityIOOutput OnBreak { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xB172254546BFEC4F)); + get => new CEntityIOOutputImpl(_Handle + _OnBreakOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysExplosionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysExplosionImpl.cs index 2823e6726..f3721fbfa 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysExplosionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysExplosionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,39 +17,59 @@ internal partial class CPhysExplosionImpl : CPointEntityImpl, CPhysExplosion { public CPhysExplosionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExplodeOnSpawnOffset = new(() => Schema.GetOffset(0xACEBD741D4BEFD5A), LazyThreadSafetyMode.None); + public ref bool ExplodeOnSpawn { - get => ref _Handle.AsRef(Schema.GetOffset(0xACEBD741D4BEFD5A)); + get => ref _Handle.AsRef(_ExplodeOnSpawnOffset.Value); } + private static readonly Lazy _MagnitudeOffset = new(() => Schema.GetOffset(0xACEBD741ED0A1D8B), LazyThreadSafetyMode.None); + public ref float Magnitude { - get => ref _Handle.AsRef(Schema.GetOffset(0xACEBD741ED0A1D8B)); + get => ref _Handle.AsRef(_MagnitudeOffset.Value); } + private static readonly Lazy _DamageOffset = new(() => Schema.GetOffset(0xACEBD741DC60E53E), LazyThreadSafetyMode.None); + public ref float Damage { - get => ref _Handle.AsRef(Schema.GetOffset(0xACEBD741DC60E53E)); + get => ref _Handle.AsRef(_DamageOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0xACEBD741A921CA53), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0xACEBD741A921CA53)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _TargetEntityNameOffset = new(() => Schema.GetOffset(0xACEBD741F88EC878), LazyThreadSafetyMode.None); + public string TargetEntityName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xACEBD741F88EC878)); + var ptr = _Handle.Read(_TargetEntityNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xACEBD741F88EC878, value); + set => Schema.SetString(_Handle, _TargetEntityNameOffset.Value, value); } + private static readonly Lazy _InnerRadiusOffset = new(() => Schema.GetOffset(0xACEBD74132121407), LazyThreadSafetyMode.None); + public ref float InnerRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xACEBD74132121407)); + get => ref _Handle.AsRef(_InnerRadiusOffset.Value); } + private static readonly Lazy _PushScaleOffset = new(() => Schema.GetOffset(0xACEBD741BC279223), LazyThreadSafetyMode.None); + public ref float PushScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xACEBD741BC279223)); + get => ref _Handle.AsRef(_PushScaleOffset.Value); } + private static readonly Lazy _ConvertToDebrisWhenPossibleOffset = new(() => Schema.GetOffset(0xACEBD7416AD4D155), LazyThreadSafetyMode.None); + public ref bool ConvertToDebrisWhenPossible { - get => ref _Handle.AsRef(Schema.GetOffset(0xACEBD7416AD4D155)); + get => ref _Handle.AsRef(_ConvertToDebrisWhenPossibleOffset.Value); } + private static readonly Lazy _AffectInvulnerableEntsOffset = new(() => Schema.GetOffset(0xACEBD74196CF6FA5), LazyThreadSafetyMode.None); + public ref bool AffectInvulnerableEnts { - get => ref _Handle.AsRef(Schema.GetOffset(0xACEBD74196CF6FA5)); + get => ref _Handle.AsRef(_AffectInvulnerableEntsOffset.Value); } + private static readonly Lazy _OnPushedPlayerOffset = new(() => Schema.GetOffset(0xACEBD74165C28180), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPushedPlayer { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xACEBD74165C28180)); + get => new CEntityIOOutputImpl(_Handle + _OnPushedPlayerOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysFixedImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysFixedImpl.cs index ad92dcc32..83e1221be 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysFixedImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysFixedImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,37 +17,53 @@ internal partial class CPhysFixedImpl : CPhysConstraintImpl, CPhysFixed { public CPhysFixedImpl(nint handle) : base(handle) { } + private static readonly Lazy _LinearFrequencyOffset = new(() => Schema.GetOffset(0x8E8A38382FE6B034), LazyThreadSafetyMode.None); + public ref float LinearFrequency { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E8A38382FE6B034)); + get => ref _Handle.AsRef(_LinearFrequencyOffset.Value); } + private static readonly Lazy _LinearDampingRatioOffset = new(() => Schema.GetOffset(0x8E8A383882438FAF), LazyThreadSafetyMode.None); + public ref float LinearDampingRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E8A383882438FAF)); + get => ref _Handle.AsRef(_LinearDampingRatioOffset.Value); } + private static readonly Lazy _AngularFrequencyOffset = new(() => Schema.GetOffset(0x8E8A383836D56C7B), LazyThreadSafetyMode.None); + public ref float AngularFrequency { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E8A383836D56C7B)); + get => ref _Handle.AsRef(_AngularFrequencyOffset.Value); } + private static readonly Lazy _AngularDampingRatioOffset = new(() => Schema.GetOffset(0x8E8A3838689E74E2), LazyThreadSafetyMode.None); + public ref float AngularDampingRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E8A3838689E74E2)); + get => ref _Handle.AsRef(_AngularDampingRatioOffset.Value); } + private static readonly Lazy _EnableLinearConstraintOffset = new(() => Schema.GetOffset(0x8E8A383868F4518C), LazyThreadSafetyMode.None); + public ref bool EnableLinearConstraint { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E8A383868F4518C)); + get => ref _Handle.AsRef(_EnableLinearConstraintOffset.Value); } + private static readonly Lazy _EnableAngularConstraintOffset = new(() => Schema.GetOffset(0x8E8A3838F98A5C8B), LazyThreadSafetyMode.None); + public ref bool EnableAngularConstraint { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E8A3838F98A5C8B)); + get => ref _Handle.AsRef(_EnableAngularConstraintOffset.Value); } + private static readonly Lazy _BoneName1Offset = new(() => Schema.GetOffset(0x8E8A3838EA2A0C6A), LazyThreadSafetyMode.None); + public string BoneName1 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x8E8A3838EA2A0C6A)); + var ptr = _Handle.Read(_BoneName1Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x8E8A3838EA2A0C6A, value); + set => Schema.SetString(_Handle, _BoneName1Offset.Value, value); } + private static readonly Lazy _BoneName2Offset = new(() => Schema.GetOffset(0x8E8A3838E92A0AD7), LazyThreadSafetyMode.None); + public string BoneName2 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x8E8A3838E92A0AD7)); + var ptr = _Handle.Read(_BoneName2Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x8E8A3838E92A0AD7, value); + set => Schema.SetString(_Handle, _BoneName2Offset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysForceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysForceImpl.cs index e77fea92e..b5eb595a0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysForceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysForceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,27 +17,39 @@ internal partial class CPhysForceImpl : CPointEntityImpl, CPhysForce { public CPhysForceImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameAttachOffset = new(() => Schema.GetOffset(0x29E850D5BECAEF3F), LazyThreadSafetyMode.None); + public string NameAttach { get { - var ptr = _Handle.Read(Schema.GetOffset(0x29E850D5BECAEF3F)); + var ptr = _Handle.Read(_NameAttachOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x29E850D5BECAEF3F, value); + set => Schema.SetString(_Handle, _NameAttachOffset.Value, value); } + private static readonly Lazy _ForceOffset = new(() => Schema.GetOffset(0x29E850D5B9B6AFA4), LazyThreadSafetyMode.None); + public ref float Force { - get => ref _Handle.AsRef(Schema.GetOffset(0x29E850D5B9B6AFA4)); + get => ref _Handle.AsRef(_ForceOffset.Value); } + private static readonly Lazy _ForceTimeOffset = new(() => Schema.GetOffset(0x29E850D58835FD05), LazyThreadSafetyMode.None); + public ref float ForceTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x29E850D58835FD05)); + get => ref _Handle.AsRef(_ForceTimeOffset.Value); } + private static readonly Lazy _AttachedObjectOffset = new(() => Schema.GetOffset(0x29E850D51AE8F30A), LazyThreadSafetyMode.None); + public ref CHandle AttachedObject { - get => ref _Handle.AsRef>(Schema.GetOffset(0x29E850D51AE8F30A)); + get => ref _Handle.AsRef>(_AttachedObjectOffset.Value); } + private static readonly Lazy _WasRestoredOffset = new(() => Schema.GetOffset(0x29E850D500C1E774), LazyThreadSafetyMode.None); + public ref bool WasRestored { - get => ref _Handle.AsRef(Schema.GetOffset(0x29E850D500C1E774)); + get => ref _Handle.AsRef(_WasRestoredOffset.Value); } + private static readonly Lazy _IntegratorOffset = new(() => Schema.GetOffset(0x29E850D5BC2E3924), LazyThreadSafetyMode.None); + public CConstantForceController Integrator { - get => new CConstantForceControllerImpl(_Handle + Schema.GetOffset(0x29E850D5BC2E3924)); + get => new CConstantForceControllerImpl(_Handle + _IntegratorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysHingeAlias_phys_hinge_localImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysHingeAlias_phys_hinge_localImpl.cs index 388684a53..d859aef36 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysHingeAlias_phys_hinge_localImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysHingeAlias_phys_hinge_localImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysHingeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysHingeImpl.cs index a968821bb..8dbb3c40b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysHingeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysHingeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,59 +17,95 @@ internal partial class CPhysHingeImpl : CPhysConstraintImpl, CPhysHinge { public CPhysHingeImpl(nint handle) : base(handle) { } + private static readonly Lazy _SoundInfoOffset = new(() => Schema.GetOffset(0xFCB149B185F704E8), LazyThreadSafetyMode.None); + public ConstraintSoundInfo SoundInfo { - get => new ConstraintSoundInfoImpl(_Handle + Schema.GetOffset(0xFCB149B185F704E8)); + get => new ConstraintSoundInfoImpl(_Handle + _SoundInfoOffset.Value); } + private static readonly Lazy _NotifyMinLimitReachedOffset = new(() => Schema.GetOffset(0xFCB149B1CD28EA23), LazyThreadSafetyMode.None); + public CEntityIOOutput NotifyMinLimitReached { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xFCB149B1CD28EA23)); + get => new CEntityIOOutputImpl(_Handle + _NotifyMinLimitReachedOffset.Value); } + private static readonly Lazy _NotifyMaxLimitReachedOffset = new(() => Schema.GetOffset(0xFCB149B15B33E6AD), LazyThreadSafetyMode.None); + public CEntityIOOutput NotifyMaxLimitReached { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xFCB149B15B33E6AD)); + get => new CEntityIOOutputImpl(_Handle + _NotifyMaxLimitReachedOffset.Value); } + private static readonly Lazy _AtMinLimitOffset = new(() => Schema.GetOffset(0xFCB149B119CAC3B7), LazyThreadSafetyMode.None); + public ref bool AtMinLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCB149B119CAC3B7)); + get => ref _Handle.AsRef(_AtMinLimitOffset.Value); } + private static readonly Lazy _AtMaxLimitOffset = new(() => Schema.GetOffset(0xFCB149B153E2D225), LazyThreadSafetyMode.None); + public ref bool AtMaxLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCB149B153E2D225)); + get => ref _Handle.AsRef(_AtMaxLimitOffset.Value); } + private static readonly Lazy _HingeOffset = new(() => Schema.GetOffset(0xFCB149B13923C0AC), LazyThreadSafetyMode.None); + public constraint_hingeparams_t Hinge { - get => new constraint_hingeparams_tImpl(_Handle + Schema.GetOffset(0xFCB149B13923C0AC)); + get => new constraint_hingeparams_tImpl(_Handle + _HingeOffset.Value); } + private static readonly Lazy _HingeFrictionOffset = new(() => Schema.GetOffset(0xFCB149B11390591E), LazyThreadSafetyMode.None); + public ref float HingeFriction { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCB149B11390591E)); + get => ref _Handle.AsRef(_HingeFrictionOffset.Value); } + private static readonly Lazy _SystemLoadScaleOffset = new(() => Schema.GetOffset(0xFCB149B19C24DB62), LazyThreadSafetyMode.None); + public ref float SystemLoadScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCB149B19C24DB62)); + get => ref _Handle.AsRef(_SystemLoadScaleOffset.Value); } + private static readonly Lazy _IsAxisLocalOffset = new(() => Schema.GetOffset(0xFCB149B15A72A0AF), LazyThreadSafetyMode.None); + public ref bool IsAxisLocal { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCB149B15A72A0AF)); + get => ref _Handle.AsRef(_IsAxisLocalOffset.Value); } + private static readonly Lazy _MinRotationOffset = new(() => Schema.GetOffset(0xFCB149B124801DAB), LazyThreadSafetyMode.None); + public ref float MinRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCB149B124801DAB)); + get => ref _Handle.AsRef(_MinRotationOffset.Value); } + private static readonly Lazy _MaxRotationOffset = new(() => Schema.GetOffset(0xFCB149B1770EB7E9), LazyThreadSafetyMode.None); + public ref float MaxRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCB149B1770EB7E9)); + get => ref _Handle.AsRef(_MaxRotationOffset.Value); } + private static readonly Lazy _InitialRotationOffset = new(() => Schema.GetOffset(0xFCB149B1C9493687), LazyThreadSafetyMode.None); + public ref float InitialRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCB149B1C9493687)); + get => ref _Handle.AsRef(_InitialRotationOffset.Value); } + private static readonly Lazy _MotorFrequencyOffset = new(() => Schema.GetOffset(0xFCB149B156F7120A), LazyThreadSafetyMode.None); + public ref float MotorFrequency { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCB149B156F7120A)); + get => ref _Handle.AsRef(_MotorFrequencyOffset.Value); } + private static readonly Lazy _MotorDampingRatioOffset = new(() => Schema.GetOffset(0xFCB149B1D8669699), LazyThreadSafetyMode.None); + public ref float MotorDampingRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCB149B1D8669699)); + get => ref _Handle.AsRef(_MotorDampingRatioOffset.Value); } + private static readonly Lazy _AngleSpeedOffset = new(() => Schema.GetOffset(0xFCB149B18CA05599), LazyThreadSafetyMode.None); + public ref float AngleSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCB149B18CA05599)); + get => ref _Handle.AsRef(_AngleSpeedOffset.Value); } + private static readonly Lazy _AngleSpeedThresholdOffset = new(() => Schema.GetOffset(0xFCB149B141F77A9C), LazyThreadSafetyMode.None); + public ref float AngleSpeedThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCB149B141F77A9C)); + get => ref _Handle.AsRef(_AngleSpeedThresholdOffset.Value); } + private static readonly Lazy _OnStartMovingOffset = new(() => Schema.GetOffset(0xFCB149B1F38945EA), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStartMoving { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xFCB149B1F38945EA)); + get => new CEntityIOOutputImpl(_Handle + _OnStartMovingOffset.Value); } + private static readonly Lazy _OnStopMovingOffset = new(() => Schema.GetOffset(0xFCB149B1D3A538AE), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStopMoving { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xFCB149B1D3A538AE)); + get => new CEntityIOOutputImpl(_Handle + _OnStopMovingOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysImpactImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysImpactImpl.cs index 7dc5f2c1f..a61434d55 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysImpactImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysImpactImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class CPhysImpactImpl : CPointEntityImpl, CPhysImpact { public CPhysImpactImpl(nint handle) : base(handle) { } + private static readonly Lazy _DamageOffset = new(() => Schema.GetOffset(0x2C5E7E549C988CE0), LazyThreadSafetyMode.None); + public ref float Damage { - get => ref _Handle.AsRef(Schema.GetOffset(0x2C5E7E549C988CE0)); + get => ref _Handle.AsRef(_DamageOffset.Value); } + private static readonly Lazy _DistanceOffset = new(() => Schema.GetOffset(0x2C5E7E543CB20D02), LazyThreadSafetyMode.None); + public ref float Distance { - get => ref _Handle.AsRef(Schema.GetOffset(0x2C5E7E543CB20D02)); + get => ref _Handle.AsRef(_DistanceOffset.Value); } + private static readonly Lazy _DirectionEntityNameOffset = new(() => Schema.GetOffset(0x2C5E7E54329C8132), LazyThreadSafetyMode.None); + public string DirectionEntityName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x2C5E7E54329C8132)); + var ptr = _Handle.Read(_DirectionEntityNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x2C5E7E54329C8132, value); + set => Schema.SetString(_Handle, _DirectionEntityNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysLengthImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysLengthImpl.cs index 2b351faf5..3b80a4495 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysLengthImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysLengthImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,20 +20,30 @@ public CPhysLengthImpl(nint handle) : base(handle) { public ISchemaFixedArray Offset { get => new SchemaFixedArray(_Handle, 0x9203A50AF836806A, 2, 12, 4); } + private static readonly Lazy _AttachOffset = new(() => Schema.GetOffset(0x9203A50A4CAEA9A4), LazyThreadSafetyMode.None); + public ref Vector Attach { - get => ref _Handle.AsRef(Schema.GetOffset(0x9203A50A4CAEA9A4)); + get => ref _Handle.AsRef(_AttachOffset.Value); } + private static readonly Lazy _AddLengthOffset = new(() => Schema.GetOffset(0x9203A50AA30AA6D8), LazyThreadSafetyMode.None); + public ref float AddLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x9203A50AA30AA6D8)); + get => ref _Handle.AsRef(_AddLengthOffset.Value); } + private static readonly Lazy _MinLengthOffset = new(() => Schema.GetOffset(0x9203A50A8FD988D7), LazyThreadSafetyMode.None); + public ref float MinLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x9203A50A8FD988D7)); + get => ref _Handle.AsRef(_MinLengthOffset.Value); } + private static readonly Lazy _TotalLengthOffset = new(() => Schema.GetOffset(0x9203A50A6825671D), LazyThreadSafetyMode.None); + public ref float TotalLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x9203A50A6825671D)); + get => ref _Handle.AsRef(_TotalLengthOffset.Value); } + private static readonly Lazy _EnableCollisionOffset = new(() => Schema.GetOffset(0x9203A50A1E5412CE), LazyThreadSafetyMode.None); + public ref bool EnableCollision { - get => ref _Handle.AsRef(Schema.GetOffset(0x9203A50A1E5412CE)); + get => ref _Handle.AsRef(_EnableCollisionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysMagnetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysMagnetImpl.cs index 580b82d07..4a3755f40 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysMagnetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysMagnetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,65 @@ internal partial class CPhysMagnetImpl : CBaseAnimGraphImpl, CPhysMagnet { public CPhysMagnetImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnMagnetAttachOffset = new(() => Schema.GetOffset(0x5772891055B6907B), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMagnetAttach { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x5772891055B6907B)); + get => new CEntityIOOutputImpl(_Handle + _OnMagnetAttachOffset.Value); } + private static readonly Lazy _OnMagnetDetachOffset = new(() => Schema.GetOffset(0x57728910FA716045), LazyThreadSafetyMode.None); + public CEntityIOOutput OnMagnetDetach { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x57728910FA716045)); + get => new CEntityIOOutputImpl(_Handle + _OnMagnetDetachOffset.Value); } + private static readonly Lazy _MassScaleOffset = new(() => Schema.GetOffset(0x5772891001B9E905), LazyThreadSafetyMode.None); + public ref float MassScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x5772891001B9E905)); + get => ref _Handle.AsRef(_MassScaleOffset.Value); } + private static readonly Lazy _ForceLimitOffset = new(() => Schema.GetOffset(0x57728910BA45B8F7), LazyThreadSafetyMode.None); + public ref float ForceLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0x57728910BA45B8F7)); + get => ref _Handle.AsRef(_ForceLimitOffset.Value); } + private static readonly Lazy _TorqueLimitOffset = new(() => Schema.GetOffset(0x577289106D51FE3E), LazyThreadSafetyMode.None); + public ref float TorqueLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0x577289106D51FE3E)); + get => ref _Handle.AsRef(_TorqueLimitOffset.Value); } + private static readonly Lazy _MagnettedEntitiesOffset = new(() => Schema.GetOffset(0x57728910E39284F3), LazyThreadSafetyMode.None); + public ref CUtlVector MagnettedEntities { - get => ref _Handle.AsRef>(Schema.GetOffset(0x57728910E39284F3)); + get => ref _Handle.AsRef>(_MagnettedEntitiesOffset.Value); } + private static readonly Lazy _ActiveOffset = new(() => Schema.GetOffset(0x577289108334208F), LazyThreadSafetyMode.None); + public ref bool Active { - get => ref _Handle.AsRef(Schema.GetOffset(0x577289108334208F)); + get => ref _Handle.AsRef(_ActiveOffset.Value); } + private static readonly Lazy _HasHitSomethingOffset = new(() => Schema.GetOffset(0x577289109E7903E0), LazyThreadSafetyMode.None); + public ref bool HasHitSomething { - get => ref _Handle.AsRef(Schema.GetOffset(0x577289109E7903E0)); + get => ref _Handle.AsRef(_HasHitSomethingOffset.Value); } + private static readonly Lazy _TotalMassOffset = new(() => Schema.GetOffset(0x57728910A3F382DB), LazyThreadSafetyMode.None); + public ref float TotalMass { - get => ref _Handle.AsRef(Schema.GetOffset(0x57728910A3F382DB)); + get => ref _Handle.AsRef(_TotalMassOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x577289105ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x577289105ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _NextSuckTimeOffset = new(() => Schema.GetOffset(0x577289102E3592CD), LazyThreadSafetyMode.None); + public GameTime_t NextSuckTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x577289102E3592CD)); + get => new GameTime_tImpl(_Handle + _NextSuckTimeOffset.Value); } + private static readonly Lazy _MaxObjectsAttachedOffset = new(() => Schema.GetOffset(0x57728910326F6EB6), LazyThreadSafetyMode.None); + public ref int MaxObjectsAttached { - get => ref _Handle.AsRef(Schema.GetOffset(0x57728910326F6EB6)); + get => ref _Handle.AsRef(_MaxObjectsAttachedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysMotorAPIImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysMotorAPIImpl.cs index c3fc069fc..9cbd39d52 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysMotorAPIImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysMotorAPIImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysMotorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysMotorImpl.cs index a28fa6054..813857e25 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysMotorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysMotorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,52 +17,78 @@ internal partial class CPhysMotorImpl : CLogicalEntityImpl, CPhysMotor { public CPhysMotorImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameAttachOffset = new(() => Schema.GetOffset(0x88C095BFBECAEF3F), LazyThreadSafetyMode.None); + public string NameAttach { get { - var ptr = _Handle.Read(Schema.GetOffset(0x88C095BFBECAEF3F)); + var ptr = _Handle.Read(_NameAttachOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x88C095BFBECAEF3F, value); + set => Schema.SetString(_Handle, _NameAttachOffset.Value, value); } + private static readonly Lazy _NameAnchorOffset = new(() => Schema.GetOffset(0x88C095BFAD43DD27), LazyThreadSafetyMode.None); + public string NameAnchor { get { - var ptr = _Handle.Read(Schema.GetOffset(0x88C095BFAD43DD27)); + var ptr = _Handle.Read(_NameAnchorOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x88C095BFAD43DD27, value); + set => Schema.SetString(_Handle, _NameAnchorOffset.Value, value); } + private static readonly Lazy _AttachedObjectOffset = new(() => Schema.GetOffset(0x88C095BF5B0EDB58), LazyThreadSafetyMode.None); + public ref CHandle AttachedObject { - get => ref _Handle.AsRef>(Schema.GetOffset(0x88C095BF5B0EDB58)); + get => ref _Handle.AsRef>(_AttachedObjectOffset.Value); } + private static readonly Lazy _AnchorObjectOffset = new(() => Schema.GetOffset(0x88C095BFDE8F702D), LazyThreadSafetyMode.None); + public ref CHandle AnchorObject { - get => ref _Handle.AsRef>(Schema.GetOffset(0x88C095BFDE8F702D)); + get => ref _Handle.AsRef>(_AnchorObjectOffset.Value); } + private static readonly Lazy _SpinUpOffset = new(() => Schema.GetOffset(0x88C095BFB2CBE21C), LazyThreadSafetyMode.None); + public ref float SpinUp { - get => ref _Handle.AsRef(Schema.GetOffset(0x88C095BFB2CBE21C)); + get => ref _Handle.AsRef(_SpinUpOffset.Value); } + private static readonly Lazy _SpinDownOffset = new(() => Schema.GetOffset(0x88C095BF5AA77109), LazyThreadSafetyMode.None); + public ref float SpinDown { - get => ref _Handle.AsRef(Schema.GetOffset(0x88C095BF5AA77109)); + get => ref _Handle.AsRef(_SpinDownOffset.Value); } + private static readonly Lazy _MotorFrictionOffset = new(() => Schema.GetOffset(0x88C095BF36C3170E), LazyThreadSafetyMode.None); + public ref float MotorFriction { - get => ref _Handle.AsRef(Schema.GetOffset(0x88C095BF36C3170E)); + get => ref _Handle.AsRef(_MotorFrictionOffset.Value); } + private static readonly Lazy _AdditionalAccelerationOffset = new(() => Schema.GetOffset(0x88C095BF60106F50), LazyThreadSafetyMode.None); + public ref float AdditionalAcceleration { - get => ref _Handle.AsRef(Schema.GetOffset(0x88C095BF60106F50)); + get => ref _Handle.AsRef(_AdditionalAccelerationOffset.Value); } + private static readonly Lazy _AngularAccelerationOffset = new(() => Schema.GetOffset(0x88C095BFEB676AF1), LazyThreadSafetyMode.None); + public ref float AngularAcceleration { - get => ref _Handle.AsRef(Schema.GetOffset(0x88C095BFEB676AF1)); + get => ref _Handle.AsRef(_AngularAccelerationOffset.Value); } + private static readonly Lazy _TorqueScaleOffset = new(() => Schema.GetOffset(0x88C095BF50218E89), LazyThreadSafetyMode.None); + public ref float TorqueScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x88C095BF50218E89)); + get => ref _Handle.AsRef(_TorqueScaleOffset.Value); } + private static readonly Lazy _TargetSpeedOffset = new(() => Schema.GetOffset(0x88C095BF9C627845), LazyThreadSafetyMode.None); + public ref float TargetSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x88C095BF9C627845)); + get => ref _Handle.AsRef(_TargetSpeedOffset.Value); } + private static readonly Lazy _SpeedWhenSpinUpOrSpinDownStartedOffset = new(() => Schema.GetOffset(0x88C095BF86577537), LazyThreadSafetyMode.None); + public ref float SpeedWhenSpinUpOrSpinDownStarted { - get => ref _Handle.AsRef(Schema.GetOffset(0x88C095BF86577537)); + get => ref _Handle.AsRef(_SpeedWhenSpinUpOrSpinDownStartedOffset.Value); } + private static readonly Lazy _MotorOffset = new(() => Schema.GetOffset(0x88C095BF373E4F92), LazyThreadSafetyMode.None); + public CMotorController Motor { - get => new CMotorControllerImpl(_Handle + Schema.GetOffset(0x88C095BF373E4F92)); + get => new CMotorControllerImpl(_Handle + _MotorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysPulleyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysPulleyImpl.cs index f3568c2fc..e1ed7ddd2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysPulleyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysPulleyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,23 @@ internal partial class CPhysPulleyImpl : CPhysConstraintImpl, CPhysPulley { public CPhysPulleyImpl(nint handle) : base(handle) { } + private static readonly Lazy _Position2Offset = new(() => Schema.GetOffset(0xDCB3A22333568F48), LazyThreadSafetyMode.None); + public ref Vector Position2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xDCB3A22333568F48)); + get => ref _Handle.AsRef(_Position2Offset.Value); } public ISchemaFixedArray Offset { get => new SchemaFixedArray(_Handle, 0xDCB3A223F836806A, 2, 12, 4); } + private static readonly Lazy _AddLengthOffset = new(() => Schema.GetOffset(0xDCB3A223A30AA6D8), LazyThreadSafetyMode.None); + public ref float AddLength { - get => ref _Handle.AsRef(Schema.GetOffset(0xDCB3A223A30AA6D8)); + get => ref _Handle.AsRef(_AddLengthOffset.Value); } + private static readonly Lazy _GearRatioOffset = new(() => Schema.GetOffset(0xDCB3A223DF6EB135), LazyThreadSafetyMode.None); + public ref float GearRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0xDCB3A223DF6EB135)); + get => ref _Handle.AsRef(_GearRatioOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSlideConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSlideConstraintImpl.cs index 163aeaad5..0df842c24 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSlideConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSlideConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class CPhysSlideConstraintImpl : CPhysConstraintImpl, CPhysSlid public CPhysSlideConstraintImpl(nint handle) : base(handle) { } + private static readonly Lazy _AxisEndOffset = new(() => Schema.GetOffset(0xA91FF5D04F9CAA89), LazyThreadSafetyMode.None); + public ref Vector AxisEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0xA91FF5D04F9CAA89)); + get => ref _Handle.AsRef(_AxisEndOffset.Value); } + private static readonly Lazy _SlideFrictionOffset = new(() => Schema.GetOffset(0xA91FF5D0A21A9E94), LazyThreadSafetyMode.None); + public ref float SlideFriction { - get => ref _Handle.AsRef(Schema.GetOffset(0xA91FF5D0A21A9E94)); + get => ref _Handle.AsRef(_SlideFrictionOffset.Value); } + private static readonly Lazy _SystemLoadScaleOffset = new(() => Schema.GetOffset(0xA91FF5D09C24DB62), LazyThreadSafetyMode.None); + public ref float SystemLoadScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xA91FF5D09C24DB62)); + get => ref _Handle.AsRef(_SystemLoadScaleOffset.Value); } + private static readonly Lazy _InitialOffsetOffset = new(() => Schema.GetOffset(0xA91FF5D0A52C9850), LazyThreadSafetyMode.None); + public ref float InitialOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xA91FF5D0A52C9850)); + get => ref _Handle.AsRef(_InitialOffsetOffset.Value); } + private static readonly Lazy _EnableLinearConstraintOffset = new(() => Schema.GetOffset(0xA91FF5D068F4518C), LazyThreadSafetyMode.None); + public ref bool EnableLinearConstraint { - get => ref _Handle.AsRef(Schema.GetOffset(0xA91FF5D068F4518C)); + get => ref _Handle.AsRef(_EnableLinearConstraintOffset.Value); } + private static readonly Lazy _EnableAngularConstraintOffset = new(() => Schema.GetOffset(0xA91FF5D0F98A5C8B), LazyThreadSafetyMode.None); + public ref bool EnableAngularConstraint { - get => ref _Handle.AsRef(Schema.GetOffset(0xA91FF5D0F98A5C8B)); + get => ref _Handle.AsRef(_EnableAngularConstraintOffset.Value); } + private static readonly Lazy _MotorFrequencyOffset = new(() => Schema.GetOffset(0xA91FF5D056F7120A), LazyThreadSafetyMode.None); + public ref float MotorFrequency { - get => ref _Handle.AsRef(Schema.GetOffset(0xA91FF5D056F7120A)); + get => ref _Handle.AsRef(_MotorFrequencyOffset.Value); } + private static readonly Lazy _MotorDampingRatioOffset = new(() => Schema.GetOffset(0xA91FF5D0D8669699), LazyThreadSafetyMode.None); + public ref float MotorDampingRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0xA91FF5D0D8669699)); + get => ref _Handle.AsRef(_MotorDampingRatioOffset.Value); } + private static readonly Lazy _UseEntityPivotOffset = new(() => Schema.GetOffset(0xA91FF5D0240C4065), LazyThreadSafetyMode.None); + public ref bool UseEntityPivot { - get => ref _Handle.AsRef(Schema.GetOffset(0xA91FF5D0240C4065)); + get => ref _Handle.AsRef(_UseEntityPivotOffset.Value); } + private static readonly Lazy _SoundInfoOffset = new(() => Schema.GetOffset(0xA91FF5D085F704E8), LazyThreadSafetyMode.None); + public ConstraintSoundInfo SoundInfo { - get => new ConstraintSoundInfoImpl(_Handle + Schema.GetOffset(0xA91FF5D085F704E8)); + get => new ConstraintSoundInfoImpl(_Handle + _SoundInfoOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesAudioImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesAudioImpl.cs index 364e835fb..59eb6908d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesAudioImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesAudioImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CPhysSurfacePropertiesAudioImpl : SchemaClass, CPhysSurfa public CPhysSurfacePropertiesAudioImpl(nint handle) : base(handle) { } + private static readonly Lazy _ReflectivityOffset = new(() => Schema.GetOffset(0x7FD94D2E904671F3), LazyThreadSafetyMode.None); + public ref float Reflectivity { - get => ref _Handle.AsRef(Schema.GetOffset(0x7FD94D2E904671F3)); + get => ref _Handle.AsRef(_ReflectivityOffset.Value); } + private static readonly Lazy _HardnessFactorOffset = new(() => Schema.GetOffset(0x7FD94D2E376CBD68), LazyThreadSafetyMode.None); + public ref float HardnessFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0x7FD94D2E376CBD68)); + get => ref _Handle.AsRef(_HardnessFactorOffset.Value); } + private static readonly Lazy _RoughnessFactorOffset = new(() => Schema.GetOffset(0x7FD94D2E8F4C4316), LazyThreadSafetyMode.None); + public ref float RoughnessFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0x7FD94D2E8F4C4316)); + get => ref _Handle.AsRef(_RoughnessFactorOffset.Value); } + private static readonly Lazy _RoughThresholdOffset = new(() => Schema.GetOffset(0x7FD94D2EEB458AD9), LazyThreadSafetyMode.None); + public ref float RoughThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0x7FD94D2EEB458AD9)); + get => ref _Handle.AsRef(_RoughThresholdOffset.Value); } + private static readonly Lazy _HardThresholdOffset = new(() => Schema.GetOffset(0x7FD94D2EEE4B563F), LazyThreadSafetyMode.None); + public ref float HardThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0x7FD94D2EEE4B563F)); + get => ref _Handle.AsRef(_HardThresholdOffset.Value); } + private static readonly Lazy _HardVelocityThresholdOffset = new(() => Schema.GetOffset(0x7FD94D2E296B6B62), LazyThreadSafetyMode.None); + public ref float HardVelocityThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0x7FD94D2E296B6B62)); + get => ref _Handle.AsRef(_HardVelocityThresholdOffset.Value); } + private static readonly Lazy _StaticImpactVolumeOffset = new(() => Schema.GetOffset(0x7FD94D2E04124001), LazyThreadSafetyMode.None); + public ref float StaticImpactVolume { - get => ref _Handle.AsRef(Schema.GetOffset(0x7FD94D2E04124001)); + get => ref _Handle.AsRef(_StaticImpactVolumeOffset.Value); } + private static readonly Lazy _OcclusionFactorOffset = new(() => Schema.GetOffset(0x7FD94D2E2D764853), LazyThreadSafetyMode.None); + public ref float OcclusionFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0x7FD94D2E2D764853)); + get => ref _Handle.AsRef(_OcclusionFactorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesImpl.cs index 61ae72f02..6d0ccce9a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,40 +17,58 @@ internal partial class CPhysSurfacePropertiesImpl : SchemaClass, CPhysSurfacePro public CPhysSurfacePropertiesImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x682A31344D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x682A31344D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x682A31344D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _NameHashOffset = new(() => Schema.GetOffset(0x682A313474C2670A), LazyThreadSafetyMode.None); + public ref uint NameHash { - get => ref _Handle.AsRef(Schema.GetOffset(0x682A313474C2670A)); + get => ref _Handle.AsRef(_NameHashOffset.Value); } + private static readonly Lazy _BaseNameHashOffset = new(() => Schema.GetOffset(0x682A31347BCDC37B), LazyThreadSafetyMode.None); + public ref uint BaseNameHash { - get => ref _Handle.AsRef(Schema.GetOffset(0x682A31347BCDC37B)); + get => ref _Handle.AsRef(_BaseNameHashOffset.Value); } + private static readonly Lazy _HiddenOffset = new(() => Schema.GetOffset(0x682A313457D2DC99), LazyThreadSafetyMode.None); + public ref bool Hidden { - get => ref _Handle.AsRef(Schema.GetOffset(0x682A313457D2DC99)); + get => ref _Handle.AsRef(_HiddenOffset.Value); } + private static readonly Lazy _DescriptionOffset = new(() => Schema.GetOffset(0x682A313499F68389), LazyThreadSafetyMode.None); + public string Description { get { - var ptr = _Handle.Read(Schema.GetOffset(0x682A313499F68389)); + var ptr = _Handle.Read(_DescriptionOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x682A313499F68389, value); + set => Schema.SetString(_Handle, _DescriptionOffset.Value, value); } + private static readonly Lazy _PhysicsOffset = new(() => Schema.GetOffset(0x682A3134B4C7F5C2), LazyThreadSafetyMode.None); + public CPhysSurfacePropertiesPhysics Physics { - get => new CPhysSurfacePropertiesPhysicsImpl(_Handle + Schema.GetOffset(0x682A3134B4C7F5C2)); + get => new CPhysSurfacePropertiesPhysicsImpl(_Handle + _PhysicsOffset.Value); } + private static readonly Lazy _VehicleParamsOffset = new(() => Schema.GetOffset(0x682A3134FF85787D), LazyThreadSafetyMode.None); + public CPhysSurfacePropertiesVehicle VehicleParams { - get => new CPhysSurfacePropertiesVehicleImpl(_Handle + Schema.GetOffset(0x682A3134FF85787D)); + get => new CPhysSurfacePropertiesVehicleImpl(_Handle + _VehicleParamsOffset.Value); } + private static readonly Lazy _AudioSoundsOffset = new(() => Schema.GetOffset(0x682A3134F7E0C689), LazyThreadSafetyMode.None); + public CPhysSurfacePropertiesSoundNames AudioSounds { - get => new CPhysSurfacePropertiesSoundNamesImpl(_Handle + Schema.GetOffset(0x682A3134F7E0C689)); + get => new CPhysSurfacePropertiesSoundNamesImpl(_Handle + _AudioSoundsOffset.Value); } + private static readonly Lazy _AudioParamsOffset = new(() => Schema.GetOffset(0x682A3134BCDFAD3F), LazyThreadSafetyMode.None); + public CPhysSurfacePropertiesAudio AudioParams { - get => new CPhysSurfacePropertiesAudioImpl(_Handle + Schema.GetOffset(0x682A3134BCDFAD3F)); + get => new CPhysSurfacePropertiesAudioImpl(_Handle + _AudioParamsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesPhysicsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesPhysicsImpl.cs index 3fd398b97..629d2d598 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesPhysicsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesPhysicsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CPhysSurfacePropertiesPhysicsImpl : SchemaClass, CPhysSur public CPhysSurfacePropertiesPhysicsImpl(nint handle) : base(handle) { } + private static readonly Lazy _FrictionOffset = new(() => Schema.GetOffset(0xF44ED88D5DBDE05B), LazyThreadSafetyMode.None); + public ref float Friction { - get => ref _Handle.AsRef(Schema.GetOffset(0xF44ED88D5DBDE05B)); + get => ref _Handle.AsRef(_FrictionOffset.Value); } + private static readonly Lazy _ElasticityOffset = new(() => Schema.GetOffset(0xF44ED88DEFAD1ED4), LazyThreadSafetyMode.None); + public ref float Elasticity { - get => ref _Handle.AsRef(Schema.GetOffset(0xF44ED88DEFAD1ED4)); + get => ref _Handle.AsRef(_ElasticityOffset.Value); } + private static readonly Lazy _DensityOffset = new(() => Schema.GetOffset(0xF44ED88D870F96BB), LazyThreadSafetyMode.None); + public ref float Density { - get => ref _Handle.AsRef(Schema.GetOffset(0xF44ED88D870F96BB)); + get => ref _Handle.AsRef(_DensityOffset.Value); } + private static readonly Lazy _ThicknessOffset = new(() => Schema.GetOffset(0xF44ED88D5B5FCC35), LazyThreadSafetyMode.None); + public ref float Thickness { - get => ref _Handle.AsRef(Schema.GetOffset(0xF44ED88D5B5FCC35)); + get => ref _Handle.AsRef(_ThicknessOffset.Value); } + private static readonly Lazy _SoftContactFrequencyOffset = new(() => Schema.GetOffset(0xF44ED88D2103A65B), LazyThreadSafetyMode.None); + public ref float SoftContactFrequency { - get => ref _Handle.AsRef(Schema.GetOffset(0xF44ED88D2103A65B)); + get => ref _Handle.AsRef(_SoftContactFrequencyOffset.Value); } + private static readonly Lazy _SoftContactDampingRatioOffset = new(() => Schema.GetOffset(0xF44ED88D1FD70102), LazyThreadSafetyMode.None); + public ref float SoftContactDampingRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0xF44ED88D1FD70102)); + get => ref _Handle.AsRef(_SoftContactDampingRatioOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesSoundNamesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesSoundNamesImpl.cs index ede6a8d98..0920a6f5e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesSoundNamesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesSoundNamesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,89 +17,113 @@ internal partial class CPhysSurfacePropertiesSoundNamesImpl : SchemaClass, CPhys public CPhysSurfacePropertiesSoundNamesImpl(nint handle) : base(handle) { } + private static readonly Lazy _ImpactSoftOffset = new(() => Schema.GetOffset(0xF2658A3949E7237B), LazyThreadSafetyMode.None); + public string ImpactSoft { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF2658A3949E7237B)); + var ptr = _Handle.Read(_ImpactSoftOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF2658A3949E7237B, value); + set => Schema.SetString(_Handle, _ImpactSoftOffset.Value, value); } + private static readonly Lazy _ImpactHardOffset = new(() => Schema.GetOffset(0xF2658A3934A77BB2), LazyThreadSafetyMode.None); + public string ImpactHard { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF2658A3934A77BB2)); + var ptr = _Handle.Read(_ImpactHardOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF2658A3934A77BB2, value); + set => Schema.SetString(_Handle, _ImpactHardOffset.Value, value); } + private static readonly Lazy _ScrapeSmoothOffset = new(() => Schema.GetOffset(0xF2658A3902EA935F), LazyThreadSafetyMode.None); + public string ScrapeSmooth { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF2658A3902EA935F)); + var ptr = _Handle.Read(_ScrapeSmoothOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF2658A3902EA935F, value); + set => Schema.SetString(_Handle, _ScrapeSmoothOffset.Value, value); } + private static readonly Lazy _ScrapeRoughOffset = new(() => Schema.GetOffset(0xF2658A39CE764A7E), LazyThreadSafetyMode.None); + public string ScrapeRough { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF2658A39CE764A7E)); + var ptr = _Handle.Read(_ScrapeRoughOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF2658A39CE764A7E, value); + set => Schema.SetString(_Handle, _ScrapeRoughOffset.Value, value); } + private static readonly Lazy _BulletImpactOffset = new(() => Schema.GetOffset(0xF2658A3943E056BB), LazyThreadSafetyMode.None); + public string BulletImpact { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF2658A3943E056BB)); + var ptr = _Handle.Read(_BulletImpactOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF2658A3943E056BB, value); + set => Schema.SetString(_Handle, _BulletImpactOffset.Value, value); } + private static readonly Lazy _RollingOffset = new(() => Schema.GetOffset(0xF2658A39E0171912), LazyThreadSafetyMode.None); + public string Rolling { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF2658A39E0171912)); + var ptr = _Handle.Read(_RollingOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF2658A39E0171912, value); + set => Schema.SetString(_Handle, _RollingOffset.Value, value); } + private static readonly Lazy _BreakOffset = new(() => Schema.GetOffset(0xF2658A39382B2298), LazyThreadSafetyMode.None); + public string Break { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF2658A39382B2298)); + var ptr = _Handle.Read(_BreakOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF2658A39382B2298, value); + set => Schema.SetString(_Handle, _BreakOffset.Value, value); } + private static readonly Lazy _StrainOffset = new(() => Schema.GetOffset(0xF2658A397EDA2E10), LazyThreadSafetyMode.None); + public string Strain { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF2658A397EDA2E10)); + var ptr = _Handle.Read(_StrainOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF2658A397EDA2E10, value); + set => Schema.SetString(_Handle, _StrainOffset.Value, value); } + private static readonly Lazy _MeleeImpactOffset = new(() => Schema.GetOffset(0xF2658A3976A52491), LazyThreadSafetyMode.None); + public string MeleeImpact { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF2658A3976A52491)); + var ptr = _Handle.Read(_MeleeImpactOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF2658A3976A52491, value); + set => Schema.SetString(_Handle, _MeleeImpactOffset.Value, value); } + private static readonly Lazy _PushOffOffset = new(() => Schema.GetOffset(0xF2658A39C825B1A2), LazyThreadSafetyMode.None); + public string PushOff { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF2658A39C825B1A2)); + var ptr = _Handle.Read(_PushOffOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF2658A39C825B1A2, value); + set => Schema.SetString(_Handle, _PushOffOffset.Value, value); } + private static readonly Lazy _SkidStopOffset = new(() => Schema.GetOffset(0xF2658A3976C778AE), LazyThreadSafetyMode.None); + public string SkidStop { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF2658A3976C778AE)); + var ptr = _Handle.Read(_SkidStopOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF2658A3976C778AE, value); + set => Schema.SetString(_Handle, _SkidStopOffset.Value, value); } + private static readonly Lazy _ResonantOffset = new(() => Schema.GetOffset(0xF2658A396BA8FAF5), LazyThreadSafetyMode.None); + public string Resonant { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF2658A396BA8FAF5)); + var ptr = _Handle.Read(_ResonantOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF2658A396BA8FAF5, value); + set => Schema.SetString(_Handle, _ResonantOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesVehicleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesVehicleImpl.cs index 5c00d5645..0006023bf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesVehicleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysSurfacePropertiesVehicleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPhysSurfacePropertiesVehicleImpl : SchemaClass, CPhysSur public CPhysSurfacePropertiesVehicleImpl(nint handle) : base(handle) { } + private static readonly Lazy _WheelDragOffset = new(() => Schema.GetOffset(0x5B1104DCC04986AE), LazyThreadSafetyMode.None); + public ref float WheelDrag { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B1104DCC04986AE)); + get => ref _Handle.AsRef(_WheelDragOffset.Value); } + private static readonly Lazy _WheelFrictionScaleOffset = new(() => Schema.GetOffset(0x5B1104DC7A6D9A4C), LazyThreadSafetyMode.None); + public ref float WheelFrictionScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B1104DC7A6D9A4C)); + get => ref _Handle.AsRef(_WheelFrictionScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysThrusterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysThrusterImpl.cs index a8dd5bf7b..da9586806 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysThrusterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysThrusterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPhysThrusterImpl : CPhysForceImpl, CPhysThruster { public CPhysThrusterImpl(nint handle) : base(handle) { } + private static readonly Lazy _LocalOriginOffset = new(() => Schema.GetOffset(0xC6E190F75672584A), LazyThreadSafetyMode.None); + public ref Vector LocalOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0xC6E190F75672584A)); + get => ref _Handle.AsRef(_LocalOriginOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysTorqueImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysTorqueImpl.cs index 43b4fa935..f77d89581 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysTorqueImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysTorqueImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPhysTorqueImpl : CPhysForceImpl, CPhysTorque { public CPhysTorqueImpl(nint handle) : base(handle) { } + private static readonly Lazy _AxisOffset = new(() => Schema.GetOffset(0x6EADFD042B06DE94), LazyThreadSafetyMode.None); + public ref Vector Axis { - get => ref _Handle.AsRef(Schema.GetOffset(0x6EADFD042B06DE94)); + get => ref _Handle.AsRef(_AxisOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysWheelConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysWheelConstraintImpl.cs index 72d6df7eb..46806c227 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysWheelConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysWheelConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,65 @@ internal partial class CPhysWheelConstraintImpl : CPhysConstraintImpl, CPhysWhee public CPhysWheelConstraintImpl(nint handle) : base(handle) { } + private static readonly Lazy _SuspensionFrequencyOffset = new(() => Schema.GetOffset(0x597D72C29D467E68), LazyThreadSafetyMode.None); + public ref float SuspensionFrequency { - get => ref _Handle.AsRef(Schema.GetOffset(0x597D72C29D467E68)); + get => ref _Handle.AsRef(_SuspensionFrequencyOffset.Value); } + private static readonly Lazy _SuspensionDampingRatioOffset = new(() => Schema.GetOffset(0x597D72C2C2F8EAE3), LazyThreadSafetyMode.None); + public ref float SuspensionDampingRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0x597D72C2C2F8EAE3)); + get => ref _Handle.AsRef(_SuspensionDampingRatioOffset.Value); } + private static readonly Lazy _SuspensionHeightOffsetOffset = new(() => Schema.GetOffset(0x597D72C2B6CA3042), LazyThreadSafetyMode.None); + public ref float SuspensionHeightOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x597D72C2B6CA3042)); + get => ref _Handle.AsRef(_SuspensionHeightOffsetOffset.Value); } + private static readonly Lazy _EnableSuspensionLimitOffset = new(() => Schema.GetOffset(0x597D72C2B8A9BDC2), LazyThreadSafetyMode.None); + public ref bool EnableSuspensionLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0x597D72C2B8A9BDC2)); + get => ref _Handle.AsRef(_EnableSuspensionLimitOffset.Value); } + private static readonly Lazy _MinSuspensionOffsetOffset = new(() => Schema.GetOffset(0x597D72C2B94341AB), LazyThreadSafetyMode.None); + public ref float MinSuspensionOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x597D72C2B94341AB)); + get => ref _Handle.AsRef(_MinSuspensionOffsetOffset.Value); } + private static readonly Lazy _MaxSuspensionOffsetOffset = new(() => Schema.GetOffset(0x597D72C22EABFDE9), LazyThreadSafetyMode.None); + public ref float MaxSuspensionOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x597D72C22EABFDE9)); + get => ref _Handle.AsRef(_MaxSuspensionOffsetOffset.Value); } + private static readonly Lazy _EnableSteeringLimitOffset = new(() => Schema.GetOffset(0x597D72C25B75B454), LazyThreadSafetyMode.None); + public ref bool EnableSteeringLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0x597D72C25B75B454)); + get => ref _Handle.AsRef(_EnableSteeringLimitOffset.Value); } + private static readonly Lazy _MinSteeringAngleOffset = new(() => Schema.GetOffset(0x597D72C230EFC46D), LazyThreadSafetyMode.None); + public ref float MinSteeringAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0x597D72C230EFC46D)); + get => ref _Handle.AsRef(_MinSteeringAngleOffset.Value); } + private static readonly Lazy _MaxSteeringAngleOffset = new(() => Schema.GetOffset(0x597D72C2BA43F487), LazyThreadSafetyMode.None); + public ref float MaxSteeringAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0x597D72C2BA43F487)); + get => ref _Handle.AsRef(_MaxSteeringAngleOffset.Value); } + private static readonly Lazy _SteeringAxisFrictionOffset = new(() => Schema.GetOffset(0x597D72C24D13EF6B), LazyThreadSafetyMode.None); + public ref float SteeringAxisFriction { - get => ref _Handle.AsRef(Schema.GetOffset(0x597D72C24D13EF6B)); + get => ref _Handle.AsRef(_SteeringAxisFrictionOffset.Value); } + private static readonly Lazy _SpinAxisFrictionOffset = new(() => Schema.GetOffset(0x597D72C266B468FC), LazyThreadSafetyMode.None); + public ref float SpinAxisFriction { - get => ref _Handle.AsRef(Schema.GetOffset(0x597D72C266B468FC)); + get => ref _Handle.AsRef(_SpinAxisFrictionOffset.Value); } + private static readonly Lazy _SteeringMimicsEntityOffset = new(() => Schema.GetOffset(0x597D72C2CD5E886D), LazyThreadSafetyMode.None); + public ref CHandle SteeringMimicsEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x597D72C2CD5E886D)); + get => ref _Handle.AsRef>(_SteeringMimicsEntityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicalButtonImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicalButtonImpl.cs index 6eb024c05..6226099f2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicalButtonImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicalButtonImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsBodyGameMarkupDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsBodyGameMarkupDataImpl.cs index c589bbcf6..586793c5c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsBodyGameMarkupDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsBodyGameMarkupDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPhysicsBodyGameMarkupDataImpl : SchemaClass, CPhysicsBod public CPhysicsBodyGameMarkupDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _PhysicsBodyMarkupByBoneNameOffset = new(() => Schema.GetOffset(0x29262AE188A1FE22), LazyThreadSafetyMode.None); + public SchemaUntypedField PhysicsBodyMarkupByBoneName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x29262AE188A1FE22)); + get => new SchemaUntypedField(_Handle + _PhysicsBodyMarkupByBoneNameOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsBodyGameMarkupImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsBodyGameMarkupImpl.cs index 8fbc55f24..f1a69aec4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsBodyGameMarkupImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsBodyGameMarkupImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CPhysicsBodyGameMarkupImpl : SchemaClass, CPhysicsBodyGam public CPhysicsBodyGameMarkupImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetBodyOffset = new(() => Schema.GetOffset(0xA5257571F2C6B554), LazyThreadSafetyMode.None); + public string TargetBody { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA5257571F2C6B554)); + var ptr = _Handle.Read(_TargetBodyOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA5257571F2C6B554, value); + set => Schema.SetString(_Handle, _TargetBodyOffset.Value, value); } + private static readonly Lazy _TagOffset = new(() => Schema.GetOffset(0xA5257571218D8313), LazyThreadSafetyMode.None); + public ref CGlobalSymbol Tag { - get => ref _Handle.AsRef(Schema.GetOffset(0xA5257571218D8313)); + get => ref _Handle.AsRef(_TagOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsEntitySolverImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsEntitySolverImpl.cs index e51e37c11..6456e562c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsEntitySolverImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsEntitySolverImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CPhysicsEntitySolverImpl : CLogicalEntityImpl, CPhysicsEn public CPhysicsEntitySolverImpl(nint handle) : base(handle) { } + private static readonly Lazy _MovingEntityOffset = new(() => Schema.GetOffset(0x2948C36FC1DA080E), LazyThreadSafetyMode.None); + public ref CHandle MovingEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2948C36FC1DA080E)); + get => ref _Handle.AsRef>(_MovingEntityOffset.Value); } + private static readonly Lazy _PhysicsBlockerOffset = new(() => Schema.GetOffset(0x2948C36F3DD8AB5E), LazyThreadSafetyMode.None); + public ref CHandle PhysicsBlocker { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2948C36F3DD8AB5E)); + get => ref _Handle.AsRef>(_PhysicsBlockerOffset.Value); } + private static readonly Lazy _SeparationDurationOffset = new(() => Schema.GetOffset(0x2948C36F202FE0BD), LazyThreadSafetyMode.None); + public ref float SeparationDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x2948C36F202FE0BD)); + get => ref _Handle.AsRef(_SeparationDurationOffset.Value); } + private static readonly Lazy _CancelTimeOffset = new(() => Schema.GetOffset(0x2948C36F12944512), LazyThreadSafetyMode.None); + public GameTime_t CancelTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x2948C36F12944512)); + get => new GameTime_tImpl(_Handle + _CancelTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsPropImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsPropImpl.cs index fd11d83f5..ed4d706d7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsPropImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsPropImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,123 +17,197 @@ internal partial class CPhysicsPropImpl : CBreakablePropImpl, CPhysicsProp { public CPhysicsPropImpl(nint handle) : base(handle) { } + private static readonly Lazy _MotionEnabledOffset = new(() => Schema.GetOffset(0xC3FD37FE8956B83C), LazyThreadSafetyMode.None); + public CEntityIOOutput MotionEnabled { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xC3FD37FE8956B83C)); + get => new CEntityIOOutputImpl(_Handle + _MotionEnabledOffset.Value); } + private static readonly Lazy _OnAwakenedOffset = new(() => Schema.GetOffset(0xC3FD37FE03EDBB66), LazyThreadSafetyMode.None); + public CEntityIOOutput OnAwakened { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xC3FD37FE03EDBB66)); + get => new CEntityIOOutputImpl(_Handle + _OnAwakenedOffset.Value); } + private static readonly Lazy _OnAwakeOffset = new(() => Schema.GetOffset(0xC3FD37FEE3FE59B3), LazyThreadSafetyMode.None); + public CEntityIOOutput OnAwake { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xC3FD37FEE3FE59B3)); + get => new CEntityIOOutputImpl(_Handle + _OnAwakeOffset.Value); } + private static readonly Lazy _OnAsleepOffset = new(() => Schema.GetOffset(0xC3FD37FE8CFD4346), LazyThreadSafetyMode.None); + public CEntityIOOutput OnAsleep { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xC3FD37FE8CFD4346)); + get => new CEntityIOOutputImpl(_Handle + _OnAsleepOffset.Value); } + private static readonly Lazy _OnPlayerUseOffset = new(() => Schema.GetOffset(0xC3FD37FE611C9A14), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPlayerUse { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xC3FD37FE611C9A14)); + get => new CEntityIOOutputImpl(_Handle + _OnPlayerUseOffset.Value); } + private static readonly Lazy _OnOutOfWorldOffset = new(() => Schema.GetOffset(0xC3FD37FE3016DC53), LazyThreadSafetyMode.None); + public CEntityIOOutput OnOutOfWorld { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xC3FD37FE3016DC53)); + get => new CEntityIOOutputImpl(_Handle + _OnOutOfWorldOffset.Value); } + private static readonly Lazy _OnPlayerPickupOffset = new(() => Schema.GetOffset(0xC3FD37FEDE81BF25), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPlayerPickup { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xC3FD37FEDE81BF25)); + get => new CEntityIOOutputImpl(_Handle + _OnPlayerPickupOffset.Value); } + private static readonly Lazy _ForceNavIgnoreOffset = new(() => Schema.GetOffset(0xC3FD37FE5A6B880F), LazyThreadSafetyMode.None); + public ref bool ForceNavIgnore { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE5A6B880F)); + get => ref _Handle.AsRef(_ForceNavIgnoreOffset.Value); } + private static readonly Lazy _NoNavmeshBlockerOffset = new(() => Schema.GetOffset(0xC3FD37FEED423D60), LazyThreadSafetyMode.None); + public ref bool NoNavmeshBlocker { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FEED423D60)); + get => ref _Handle.AsRef(_NoNavmeshBlockerOffset.Value); } + private static readonly Lazy _ForceNpcExcludeOffset = new(() => Schema.GetOffset(0xC3FD37FE4194963F), LazyThreadSafetyMode.None); + public ref bool ForceNpcExclude { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE4194963F)); + get => ref _Handle.AsRef(_ForceNpcExcludeOffset.Value); } + private static readonly Lazy _MassScaleOffset = new(() => Schema.GetOffset(0xC3FD37FE01B9E905), LazyThreadSafetyMode.None); + public ref float MassScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE01B9E905)); + get => ref _Handle.AsRef(_MassScaleOffset.Value); } + private static readonly Lazy _BuoyancyScaleOffset = new(() => Schema.GetOffset(0xC3FD37FE296C36AB), LazyThreadSafetyMode.None); + public ref float BuoyancyScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE296C36AB)); + get => ref _Handle.AsRef(_BuoyancyScaleOffset.Value); } + private static readonly Lazy _DamageTypeOffset = new(() => Schema.GetOffset(0xC3FD37FE17488B28), LazyThreadSafetyMode.None); + public ref int DamageType { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE17488B28)); + get => ref _Handle.AsRef(_DamageTypeOffset.Value); } + private static readonly Lazy _DamageToEnableMotionOffset = new(() => Schema.GetOffset(0xC3FD37FE6A217278), LazyThreadSafetyMode.None); + public ref int DamageToEnableMotion { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE6A217278)); + get => ref _Handle.AsRef(_DamageToEnableMotionOffset.Value); } + private static readonly Lazy _ForceToEnableMotionOffset = new(() => Schema.GetOffset(0xC3FD37FE95BEED1A), LazyThreadSafetyMode.None); + public ref float ForceToEnableMotion { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE95BEED1A)); + get => ref _Handle.AsRef(_ForceToEnableMotionOffset.Value); } + private static readonly Lazy _ThrownByPlayerOffset = new(() => Schema.GetOffset(0xC3FD37FE313A0B97), LazyThreadSafetyMode.None); + public ref bool ThrownByPlayer { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE313A0B97)); + get => ref _Handle.AsRef(_ThrownByPlayerOffset.Value); } + private static readonly Lazy _DroppedByPlayerOffset = new(() => Schema.GetOffset(0xC3FD37FEAE58B7C9), LazyThreadSafetyMode.None); + public ref bool DroppedByPlayer { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FEAE58B7C9)); + get => ref _Handle.AsRef(_DroppedByPlayerOffset.Value); } + private static readonly Lazy _TouchedByPlayerOffset = new(() => Schema.GetOffset(0xC3FD37FE3D91E55D), LazyThreadSafetyMode.None); + public ref bool TouchedByPlayer { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE3D91E55D)); + get => ref _Handle.AsRef(_TouchedByPlayerOffset.Value); } + private static readonly Lazy _FirstCollisionAfterLaunchOffset = new(() => Schema.GetOffset(0xC3FD37FEC9D93EAC), LazyThreadSafetyMode.None); + public ref bool FirstCollisionAfterLaunch { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FEC9D93EAC)); + get => ref _Handle.AsRef(_FirstCollisionAfterLaunchOffset.Value); } + private static readonly Lazy _HasBeenAwakenedOffset = new(() => Schema.GetOffset(0xC3FD37FE93DAAC9B), LazyThreadSafetyMode.None); + public ref bool HasBeenAwakened { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE93DAAC9B)); + get => ref _Handle.AsRef(_HasBeenAwakenedOffset.Value); } + private static readonly Lazy _IsOverridePropOffset = new(() => Schema.GetOffset(0xC3FD37FE43F03A10), LazyThreadSafetyMode.None); + public ref bool IsOverrideProp { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE43F03A10)); + get => ref _Handle.AsRef(_IsOverridePropOffset.Value); } + private static readonly Lazy _LastBurnOffset = new(() => Schema.GetOffset(0xC3FD37FE7EF64B16), LazyThreadSafetyMode.None); + public GameTime_t LastBurn { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xC3FD37FE7EF64B16)); + get => new GameTime_tImpl(_Handle + _LastBurnOffset.Value); } + private static readonly Lazy _DynamicContinuousContactBehaviorOffset = new(() => Schema.GetOffset(0xC3FD37FE4846D0CD), LazyThreadSafetyMode.None); + public ref DynamicContinuousContactBehavior_t DynamicContinuousContactBehavior { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE4846D0CD)); + get => ref _Handle.AsRef(_DynamicContinuousContactBehaviorOffset.Value); } + private static readonly Lazy _NextCheckDisableMotionContactsTimeOffset = new(() => Schema.GetOffset(0xC3FD37FE50052C1A), LazyThreadSafetyMode.None); + public GameTime_t NextCheckDisableMotionContactsTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xC3FD37FE50052C1A)); + get => new GameTime_tImpl(_Handle + _NextCheckDisableMotionContactsTimeOffset.Value); } + private static readonly Lazy _InitialGlowStateOffset = new(() => Schema.GetOffset(0xC3FD37FE5260376A), LazyThreadSafetyMode.None); + public ref int InitialGlowState { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE5260376A)); + get => ref _Handle.AsRef(_InitialGlowStateOffset.Value); } + private static readonly Lazy _GlowRangeOffset = new(() => Schema.GetOffset(0xC3FD37FED03F97ED), LazyThreadSafetyMode.None); + public ref int GlowRange { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FED03F97ED)); + get => ref _Handle.AsRef(_GlowRangeOffset.Value); } + private static readonly Lazy _GlowRangeMinOffset = new(() => Schema.GetOffset(0xC3FD37FEA28EDB1F), LazyThreadSafetyMode.None); + public ref int GlowRangeMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FEA28EDB1F)); + get => ref _Handle.AsRef(_GlowRangeMinOffset.Value); } + private static readonly Lazy _GlowColorOffset = new(() => Schema.GetOffset(0xC3FD37FE74A5EE03), LazyThreadSafetyMode.None); + public ref Color GlowColor { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE74A5EE03)); + get => ref _Handle.AsRef(_GlowColorOffset.Value); } + private static readonly Lazy _ShouldAutoConvertBackFromDebrisOffset = new(() => Schema.GetOffset(0xC3FD37FE456AC920), LazyThreadSafetyMode.None); + public ref bool ShouldAutoConvertBackFromDebris { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE456AC920)); + get => ref _Handle.AsRef(_ShouldAutoConvertBackFromDebrisOffset.Value); } + private static readonly Lazy _MuteImpactEffectsOffset = new(() => Schema.GetOffset(0xC3FD37FE8D5DDE78), LazyThreadSafetyMode.None); + public ref bool MuteImpactEffects { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE8D5DDE78)); + get => ref _Handle.AsRef(_MuteImpactEffectsOffset.Value); } + private static readonly Lazy _AcceptDamageFromHeldObjectsOffset = new(() => Schema.GetOffset(0xC3FD37FE6B4982E1), LazyThreadSafetyMode.None); + public ref bool AcceptDamageFromHeldObjects { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE6B4982E1)); + get => ref _Handle.AsRef(_AcceptDamageFromHeldObjectsOffset.Value); } + private static readonly Lazy _EnableUseOutputOffset = new(() => Schema.GetOffset(0xC3FD37FE2426C360), LazyThreadSafetyMode.None); + public ref bool EnableUseOutput { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE2426C360)); + get => ref _Handle.AsRef(_EnableUseOutputOffset.Value); } + private static readonly Lazy _CrateTypeOffset = new(() => Schema.GetOffset(0xC3FD37FE5B05CA48), LazyThreadSafetyMode.None); + public ref CPhysicsProp__CrateType_t CrateType { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE5B05CA48)); + get => ref _Handle.AsRef(_CrateTypeOffset.Value); } + private static readonly Lazy _StrItemClassOffset = new(() => Schema.GetOffset(0xC3FD37FE35D963A1), LazyThreadSafetyMode.None); + public string StrItemClass { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC3FD37FE35D963A1)); + var ptr = _Handle.Read(_StrItemClassOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xC3FD37FE35D963A1, value); + set => Schema.SetString(_Handle, _StrItemClassOffset.Value, value); } public ISchemaFixedArray ItemCount { get => new SchemaFixedArray(_Handle, 0xC3FD37FEA5886501, 4, 4, 4); } + private static readonly Lazy _RemovableForAmmoBalancingOffset = new(() => Schema.GetOffset(0xC3FD37FEF629CF16), LazyThreadSafetyMode.None); + public ref bool RemovableForAmmoBalancing { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FEF629CF16)); + get => ref _Handle.AsRef(_RemovableForAmmoBalancingOffset.Value); } + private static readonly Lazy _AwakeOffset = new(() => Schema.GetOffset(0xC3FD37FE9A5C15BC), LazyThreadSafetyMode.None); + public ref bool Awake { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FE9A5C15BC)); + get => ref _Handle.AsRef(_AwakeOffset.Value); } + private static readonly Lazy _AttachedToReferenceFrameOffset = new(() => Schema.GetOffset(0xC3FD37FED2A5449A), LazyThreadSafetyMode.None); + public ref bool AttachedToReferenceFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3FD37FED2A5449A)); + get => ref _Handle.AsRef(_AttachedToReferenceFrameOffset.Value); } public void AwakeUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsPropMultiplayerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsPropMultiplayerImpl.cs index a93ba2903..40fbc68ad 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsPropMultiplayerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsPropMultiplayerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsPropOverrideImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsPropOverrideImpl.cs index c12d1df86..94d8c8c9c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsPropOverrideImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsPropOverrideImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsPropRespawnableImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsPropRespawnableImpl.cs index e32851b28..31a678612 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsPropRespawnableImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsPropRespawnableImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CPhysicsPropRespawnableImpl : CPhysicsPropImpl, CPhysicsP public CPhysicsPropRespawnableImpl(nint handle) : base(handle) { } + private static readonly Lazy _OriginalSpawnOriginOffset = new(() => Schema.GetOffset(0x6C5980BAB6F410AF), LazyThreadSafetyMode.None); + public ref Vector OriginalSpawnOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C5980BAB6F410AF)); + get => ref _Handle.AsRef(_OriginalSpawnOriginOffset.Value); } + private static readonly Lazy _OriginalSpawnAnglesOffset = new(() => Schema.GetOffset(0x6C5980BAF7A16BD1), LazyThreadSafetyMode.None); + public ref QAngle OriginalSpawnAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C5980BAF7A16BD1)); + get => ref _Handle.AsRef(_OriginalSpawnAnglesOffset.Value); } + private static readonly Lazy _OriginalMinsOffset = new(() => Schema.GetOffset(0x6C5980BAFBA3B1D3), LazyThreadSafetyMode.None); + public ref Vector OriginalMins { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C5980BAFBA3B1D3)); + get => ref _Handle.AsRef(_OriginalMinsOffset.Value); } + private static readonly Lazy _OriginalMaxsOffset = new(() => Schema.GetOffset(0x6C5980BAA4FDD991), LazyThreadSafetyMode.None); + public ref Vector OriginalMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C5980BAA4FDD991)); + get => ref _Handle.AsRef(_OriginalMaxsOffset.Value); } + private static readonly Lazy _RespawnDurationOffset = new(() => Schema.GetOffset(0x6C5980BA476C78ED), LazyThreadSafetyMode.None); + public ref float RespawnDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C5980BA476C78ED)); + get => ref _Handle.AsRef(_RespawnDurationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsShakeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsShakeImpl.cs index 39b87a34a..7fa36c3d9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsShakeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsShakeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPhysicsShakeImpl : SchemaClass, CPhysicsShake { public CPhysicsShakeImpl(nint handle) : base(handle) { } + private static readonly Lazy _ForceOffset = new(() => Schema.GetOffset(0x904CE6CFB9B6AFA4), LazyThreadSafetyMode.None); + public ref Vector Force { - get => ref _Handle.AsRef(Schema.GetOffset(0x904CE6CFB9B6AFA4)); + get => ref _Handle.AsRef(_ForceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsSpringImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsSpringImpl.cs index 1a7cfd4b5..48496ab67 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsSpringImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsSpringImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,37 +17,53 @@ internal partial class CPhysicsSpringImpl : CBaseEntityImpl, CPhysicsSpring { public CPhysicsSpringImpl(nint handle) : base(handle) { } + private static readonly Lazy _FrequencyOffset = new(() => Schema.GetOffset(0x5222EAAD2C16DD7), LazyThreadSafetyMode.None); + public ref float Frequency { - get => ref _Handle.AsRef(Schema.GetOffset(0x5222EAAD2C16DD7)); + get => ref _Handle.AsRef(_FrequencyOffset.Value); } + private static readonly Lazy _DampingRatioOffset = new(() => Schema.GetOffset(0x5222EAAB40C859E), LazyThreadSafetyMode.None); + public ref float DampingRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0x5222EAAB40C859E)); + get => ref _Handle.AsRef(_DampingRatioOffset.Value); } + private static readonly Lazy _RestLengthOffset = new(() => Schema.GetOffset(0x5222EAA93AC4079), LazyThreadSafetyMode.None); + public ref float RestLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x5222EAA93AC4079)); + get => ref _Handle.AsRef(_RestLengthOffset.Value); } + private static readonly Lazy _NameAttachStartOffset = new(() => Schema.GetOffset(0x5222EAAD19CEDD5), LazyThreadSafetyMode.None); + public string NameAttachStart { get { - var ptr = _Handle.Read(Schema.GetOffset(0x5222EAAD19CEDD5)); + var ptr = _Handle.Read(_NameAttachStartOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x5222EAAD19CEDD5, value); + set => Schema.SetString(_Handle, _NameAttachStartOffset.Value, value); } + private static readonly Lazy _NameAttachEndOffset = new(() => Schema.GetOffset(0x5222EAACF4DE50C), LazyThreadSafetyMode.None); + public string NameAttachEnd { get { - var ptr = _Handle.Read(Schema.GetOffset(0x5222EAACF4DE50C)); + var ptr = _Handle.Read(_NameAttachEndOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x5222EAACF4DE50C, value); + set => Schema.SetString(_Handle, _NameAttachEndOffset.Value, value); } + private static readonly Lazy _StartOffset = new(() => Schema.GetOffset(0x5222EAAA539BEFF), LazyThreadSafetyMode.None); + public ref Vector Start { - get => ref _Handle.AsRef(Schema.GetOffset(0x5222EAAA539BEFF)); + get => ref _Handle.AsRef(_StartOffset.Value); } + private static readonly Lazy _EndOffset = new(() => Schema.GetOffset(0x5222EAA5B29CFCA), LazyThreadSafetyMode.None); + public ref Vector End { - get => ref _Handle.AsRef(Schema.GetOffset(0x5222EAA5B29CFCA)); + get => ref _Handle.AsRef(_EndOffset.Value); } + private static readonly Lazy _TeleportTickOffset = new(() => Schema.GetOffset(0x5222EAA027C0C6B), LazyThreadSafetyMode.None); + public ref uint TeleportTick { - get => ref _Handle.AsRef(Schema.GetOffset(0x5222EAA027C0C6B)); + get => ref _Handle.AsRef(_TeleportTickOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsWireImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsWireImpl.cs index 88cb578f0..5fbe9cf0d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsWireImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPhysicsWireImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPhysicsWireImpl : CBaseEntityImpl, CPhysicsWire { public CPhysicsWireImpl(nint handle) : base(handle) { } + private static readonly Lazy _DensityOffset = new(() => Schema.GetOffset(0x455AFD76A65E630F), LazyThreadSafetyMode.None); + public ref int Density { - get => ref _Handle.AsRef(Schema.GetOffset(0x455AFD76A65E630F)); + get => ref _Handle.AsRef(_DensityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlantedC4Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlantedC4Impl.cs index 295784198..7c45d8894 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlantedC4Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlantedC4Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,86 +17,138 @@ internal partial class CPlantedC4Impl : CBaseAnimGraphImpl, CPlantedC4 { public CPlantedC4Impl(nint handle) : base(handle) { } + private static readonly Lazy _BombTickingOffset = new(() => Schema.GetOffset(0xE1614C81CA7488E0), LazyThreadSafetyMode.None); + public ref bool BombTicking { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1614C81CA7488E0)); + get => ref _Handle.AsRef(_BombTickingOffset.Value); } + private static readonly Lazy _C4BlowOffset = new(() => Schema.GetOffset(0xE1614C812C4CFDAC), LazyThreadSafetyMode.None); + public GameTime_t C4Blow { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xE1614C812C4CFDAC)); + get => new GameTime_tImpl(_Handle + _C4BlowOffset.Value); } + private static readonly Lazy _BombSiteOffset = new(() => Schema.GetOffset(0xE1614C81E027AC16), LazyThreadSafetyMode.None); + public ref int BombSite { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1614C81E027AC16)); + get => ref _Handle.AsRef(_BombSiteOffset.Value); } + private static readonly Lazy _SourceSoundscapeHashOffset = new(() => Schema.GetOffset(0xE1614C8185EE0527), LazyThreadSafetyMode.None); + public ref int SourceSoundscapeHash { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1614C8185EE0527)); + get => ref _Handle.AsRef(_SourceSoundscapeHashOffset.Value); } + private static readonly Lazy _AbortDetonationBecauseWorldIsFrozenOffset = new(() => Schema.GetOffset(0xE1614C812D71EDD6), LazyThreadSafetyMode.None); + public ref bool AbortDetonationBecauseWorldIsFrozen { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1614C812D71EDD6)); + get => ref _Handle.AsRef(_AbortDetonationBecauseWorldIsFrozenOffset.Value); } + private static readonly Lazy _AttributeManagerOffset = new(() => Schema.GetOffset(0xE1614C81537B0586), LazyThreadSafetyMode.None); + public CAttributeContainer AttributeManager { - get => new CAttributeContainerImpl(_Handle + Schema.GetOffset(0xE1614C81537B0586)); + get => new CAttributeContainerImpl(_Handle + _AttributeManagerOffset.Value); } + private static readonly Lazy _OnBombDefusedOffset = new(() => Schema.GetOffset(0xE1614C81BCDAD16E), LazyThreadSafetyMode.None); + public CEntityIOOutput OnBombDefused { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xE1614C81BCDAD16E)); + get => new CEntityIOOutputImpl(_Handle + _OnBombDefusedOffset.Value); } + private static readonly Lazy _OnBombBeginDefuseOffset = new(() => Schema.GetOffset(0xE1614C81CD3D21A7), LazyThreadSafetyMode.None); + public CEntityIOOutput OnBombBeginDefuse { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xE1614C81CD3D21A7)); + get => new CEntityIOOutputImpl(_Handle + _OnBombBeginDefuseOffset.Value); } + private static readonly Lazy _OnBombDefuseAbortedOffset = new(() => Schema.GetOffset(0xE1614C81DCF21D69), LazyThreadSafetyMode.None); + public CEntityIOOutput OnBombDefuseAborted { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xE1614C81DCF21D69)); + get => new CEntityIOOutputImpl(_Handle + _OnBombDefuseAbortedOffset.Value); } + private static readonly Lazy _CannotBeDefusedOffset = new(() => Schema.GetOffset(0xE1614C81AF7C9CFF), LazyThreadSafetyMode.None); + public ref bool CannotBeDefused { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1614C81AF7C9CFF)); + get => ref _Handle.AsRef(_CannotBeDefusedOffset.Value); } + private static readonly Lazy _EntitySpottedStateOffset = new(() => Schema.GetOffset(0xE1614C81032B547C), LazyThreadSafetyMode.None); + public EntitySpottedState_t EntitySpottedState { - get => new EntitySpottedState_tImpl(_Handle + Schema.GetOffset(0xE1614C81032B547C)); + get => new EntitySpottedState_tImpl(_Handle + _EntitySpottedStateOffset.Value); } + private static readonly Lazy _SpotRulesOffset = new(() => Schema.GetOffset(0xE1614C81776CCE44), LazyThreadSafetyMode.None); + public ref int SpotRules { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1614C81776CCE44)); + get => ref _Handle.AsRef(_SpotRulesOffset.Value); } + private static readonly Lazy _TrainingPlacedByPlayerOffset = new(() => Schema.GetOffset(0xE1614C818D8A976E), LazyThreadSafetyMode.None); + public ref bool TrainingPlacedByPlayer { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1614C818D8A976E)); + get => ref _Handle.AsRef(_TrainingPlacedByPlayerOffset.Value); } + private static readonly Lazy _HasExplodedOffset = new(() => Schema.GetOffset(0xE1614C814F35E7B0), LazyThreadSafetyMode.None); + public ref bool HasExploded { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1614C814F35E7B0)); + get => ref _Handle.AsRef(_HasExplodedOffset.Value); } + private static readonly Lazy _TimerLengthOffset = new(() => Schema.GetOffset(0xE1614C815758DBE8), LazyThreadSafetyMode.None); + public ref float TimerLength { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1614C815758DBE8)); + get => ref _Handle.AsRef(_TimerLengthOffset.Value); } + private static readonly Lazy _BeingDefusedOffset = new(() => Schema.GetOffset(0xE1614C81E52E1146), LazyThreadSafetyMode.None); + public ref bool BeingDefused { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1614C81E52E1146)); + get => ref _Handle.AsRef(_BeingDefusedOffset.Value); } + private static readonly Lazy _LastDefuseTimeOffset = new(() => Schema.GetOffset(0xE1614C81F3BD810E), LazyThreadSafetyMode.None); + public GameTime_t LastDefuseTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xE1614C81F3BD810E)); + get => new GameTime_tImpl(_Handle + _LastDefuseTimeOffset.Value); } + private static readonly Lazy _DefuseLengthOffset = new(() => Schema.GetOffset(0xE1614C8164CC4751), LazyThreadSafetyMode.None); + public ref float DefuseLength { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1614C8164CC4751)); + get => ref _Handle.AsRef(_DefuseLengthOffset.Value); } + private static readonly Lazy _DefuseCountDownOffset = new(() => Schema.GetOffset(0xE1614C81BCF3DB7C), LazyThreadSafetyMode.None); + public GameTime_t DefuseCountDown { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xE1614C81BCF3DB7C)); + get => new GameTime_tImpl(_Handle + _DefuseCountDownOffset.Value); } + private static readonly Lazy _BombDefusedOffset = new(() => Schema.GetOffset(0xE1614C81CA9F868D), LazyThreadSafetyMode.None); + public ref bool BombDefused { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1614C81CA9F868D)); + get => ref _Handle.AsRef(_BombDefusedOffset.Value); } + private static readonly Lazy _BombDefuserOffset = new(() => Schema.GetOffset(0xE1614C8174E01381), LazyThreadSafetyMode.None); + public ref CHandle BombDefuser { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE1614C8174E01381)); + get => ref _Handle.AsRef>(_BombDefuserOffset.Value); } + private static readonly Lazy _ProgressBarTimeOffset = new(() => Schema.GetOffset(0xE1614C81FFF19E89), LazyThreadSafetyMode.None); + public ref int ProgressBarTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1614C81FFF19E89)); + get => ref _Handle.AsRef(_ProgressBarTimeOffset.Value); } + private static readonly Lazy _VoiceAlertFiredOffset = new(() => Schema.GetOffset(0xE1614C8139790C5F), LazyThreadSafetyMode.None); + public ref bool VoiceAlertFired { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1614C8139790C5F)); + get => ref _Handle.AsRef(_VoiceAlertFiredOffset.Value); } public ISchemaFixedArray VoiceAlertPlayed { get => new SchemaFixedArray(_Handle, 0xE1614C812559EA7A, 4, 1, 1); } + private static readonly Lazy _NextBotBeepTimeOffset = new(() => Schema.GetOffset(0xE1614C81DCAF5642), LazyThreadSafetyMode.None); + public GameTime_t NextBotBeepTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xE1614C81DCAF5642)); + get => new GameTime_tImpl(_Handle + _NextBotBeepTimeOffset.Value); } + private static readonly Lazy _CatchUpToPlayerEyeOffset = new(() => Schema.GetOffset(0xE1614C816AE78258), LazyThreadSafetyMode.None); + public ref QAngle CatchUpToPlayerEye { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1614C816AE78258)); + get => ref _Handle.AsRef(_CatchUpToPlayerEyeOffset.Value); } + private static readonly Lazy _LastSpinDetectionTimeOffset = new(() => Schema.GetOffset(0xE1614C811BF3E683), LazyThreadSafetyMode.None); + public GameTime_t LastSpinDetectionTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xE1614C811BF3E683)); + get => new GameTime_tImpl(_Handle + _LastSpinDetectionTimeOffset.Value); } public void BombTickingUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlatTriggerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlatTriggerImpl.cs index be9855971..996cdeeaa 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlatTriggerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlatTriggerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPlatTriggerImpl : CBaseModelEntityImpl, CPlatTrigger { public CPlatTriggerImpl(nint handle) : base(handle) { } + private static readonly Lazy _PlatformOffset = new(() => Schema.GetOffset(0xE5D76A656D16AFF0), LazyThreadSafetyMode.None); + public ref CHandle Platform { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE5D76A656D16AFF0)); + get => ref _Handle.AsRef>(_PlatformOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerControllerComponentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerControllerComponentImpl.cs index 8db510f03..41c936dfa 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerControllerComponentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerControllerComponentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPlayerControllerComponentImpl : SchemaClass, CPlayerCont public CPlayerControllerComponentImpl(nint handle) : base(handle) { } + private static readonly Lazy ___m_pChainEntityOffset = new(() => Schema.GetOffset(0xC96CF122F63F0E7D), LazyThreadSafetyMode.None); + public ref CNetworkVarChainer __m_pChainEntity { - get => ref _Handle.AsRef(Schema.GetOffset(0xC96CF122F63F0E7D)); + get => ref _Handle.AsRef(___m_pChainEntityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerInputAnimMotorUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerInputAnimMotorUpdaterImpl.cs index f682a500d..b8525154a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerInputAnimMotorUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerInputAnimMotorUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CPlayerInputAnimMotorUpdaterImpl : CAnimMotorUpdaterBaseI public CPlayerInputAnimMotorUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _SampleTimesOffset = new(() => Schema.GetOffset(0xA117CC02471975DF), LazyThreadSafetyMode.None); + public ref CUtlVector SampleTimes { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA117CC02471975DF)); + get => ref _Handle.AsRef>(_SampleTimesOffset.Value); } + private static readonly Lazy _SpringConstantOffset = new(() => Schema.GetOffset(0xA117CC02CE2260BE), LazyThreadSafetyMode.None); + public ref float SpringConstant { - get => ref _Handle.AsRef(Schema.GetOffset(0xA117CC02CE2260BE)); + get => ref _Handle.AsRef(_SpringConstantOffset.Value); } + private static readonly Lazy _AnticipationDistanceOffset = new(() => Schema.GetOffset(0xA117CC0264273401), LazyThreadSafetyMode.None); + public ref float AnticipationDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xA117CC0264273401)); + get => ref _Handle.AsRef(_AnticipationDistanceOffset.Value); } + private static readonly Lazy _AnticipationPosParamOffset = new(() => Schema.GetOffset(0xA117CC0286389829), LazyThreadSafetyMode.None); + public CAnimParamHandle AnticipationPosParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xA117CC0286389829)); + get => new CAnimParamHandleImpl(_Handle + _AnticipationPosParamOffset.Value); } + private static readonly Lazy _AnticipationHeadingParamOffset = new(() => Schema.GetOffset(0xA117CC02095DAB6D), LazyThreadSafetyMode.None); + public CAnimParamHandle AnticipationHeadingParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xA117CC02095DAB6D)); + get => new CAnimParamHandleImpl(_Handle + _AnticipationHeadingParamOffset.Value); } + private static readonly Lazy _UseAccelerationOffset = new(() => Schema.GetOffset(0xA117CC02254F8B08), LazyThreadSafetyMode.None); + public ref bool UseAcceleration { - get => ref _Handle.AsRef(Schema.GetOffset(0xA117CC02254F8B08)); + get => ref _Handle.AsRef(_UseAccelerationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerPawnComponentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerPawnComponentImpl.cs index b83c85e3f..a0b0aecf9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerPawnComponentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerPawnComponentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPlayerPawnComponentImpl : SchemaClass, CPlayerPawnCompon public CPlayerPawnComponentImpl(nint handle) : base(handle) { } + private static readonly Lazy ___m_pChainEntityOffset = new(() => Schema.GetOffset(0x8B6AC9BCF63F0E7D), LazyThreadSafetyMode.None); + public ref CNetworkVarChainer __m_pChainEntity { - get => ref _Handle.AsRef(Schema.GetOffset(0x8B6AC9BCF63F0E7D)); + get => ref _Handle.AsRef(___m_pChainEntityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerPingImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerPingImpl.cs index 753eb141a..560b31169 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerPingImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerPingImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class CPlayerPingImpl : CBaseEntityImpl, CPlayerPing { public CPlayerPingImpl(nint handle) : base(handle) { } + private static readonly Lazy _PlayerOffset = new(() => Schema.GetOffset(0x5943E25F68856C16), LazyThreadSafetyMode.None); + public ref CHandle Player { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5943E25F68856C16)); + get => ref _Handle.AsRef>(_PlayerOffset.Value); } + private static readonly Lazy _PingedEntityOffset = new(() => Schema.GetOffset(0x5943E25F35D9D429), LazyThreadSafetyMode.None); + public ref CHandle PingedEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5943E25F35D9D429)); + get => ref _Handle.AsRef>(_PingedEntityOffset.Value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x5943E25FC932D7CC), LazyThreadSafetyMode.None); + public ref int Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x5943E25FC932D7CC)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _UrgentOffset = new(() => Schema.GetOffset(0x5943E25F4F5EE9D0), LazyThreadSafetyMode.None); + public ref bool Urgent { - get => ref _Handle.AsRef(Schema.GetOffset(0x5943E25F4F5EE9D0)); + get => ref _Handle.AsRef(_UrgentOffset.Value); } + private static readonly Lazy _PlaceNameOffset = new(() => Schema.GetOffset(0x5943E25F6039F660), LazyThreadSafetyMode.None); + public string PlaceName { get { - var ptr = _Handle + Schema.GetOffset(0x5943E25F6039F660); + var ptr = _Handle + _PlaceNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x5943E25F6039F660, value, 18); + set => Schema.SetFixedString(_Handle, _PlaceNameOffset.Value, value, 18); } public void PlayerUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerSprayDecalImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerSprayDecalImpl.cs index be6eaf118..fb452bd9b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerSprayDecalImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerSprayDecalImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,47 +17,75 @@ internal partial class CPlayerSprayDecalImpl : CModelPointEntityImpl, CPlayerSpr public CPlayerSprayDecalImpl(nint handle) : base(handle) { } + private static readonly Lazy _UniqueIDOffset = new(() => Schema.GetOffset(0x782380E1C7F9595F), LazyThreadSafetyMode.None); + public ref int UniqueID { - get => ref _Handle.AsRef(Schema.GetOffset(0x782380E1C7F9595F)); + get => ref _Handle.AsRef(_UniqueIDOffset.Value); } + private static readonly Lazy _AccountIDOffset = new(() => Schema.GetOffset(0x782380E15D6DC0F0), LazyThreadSafetyMode.None); + public ref uint AccountID { - get => ref _Handle.AsRef(Schema.GetOffset(0x782380E15D6DC0F0)); + get => ref _Handle.AsRef(_AccountIDOffset.Value); } + private static readonly Lazy _TraceIDOffset = new(() => Schema.GetOffset(0x782380E1D326AF6A), LazyThreadSafetyMode.None); + public ref uint TraceID { - get => ref _Handle.AsRef(Schema.GetOffset(0x782380E1D326AF6A)); + get => ref _Handle.AsRef(_TraceIDOffset.Value); } + private static readonly Lazy _RtGcTimeOffset = new(() => Schema.GetOffset(0x782380E1F2BA46AC), LazyThreadSafetyMode.None); + public ref uint RtGcTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x782380E1F2BA46AC)); + get => ref _Handle.AsRef(_RtGcTimeOffset.Value); } + private static readonly Lazy _EndPosOffset = new(() => Schema.GetOffset(0x782380E18DD24760), LazyThreadSafetyMode.None); + public ref Vector EndPos { - get => ref _Handle.AsRef(Schema.GetOffset(0x782380E18DD24760)); + get => ref _Handle.AsRef(_EndPosOffset.Value); } + private static readonly Lazy _StartOffset = new(() => Schema.GetOffset(0x782380E141EEE6BF), LazyThreadSafetyMode.None); + public ref Vector Start { - get => ref _Handle.AsRef(Schema.GetOffset(0x782380E141EEE6BF)); + get => ref _Handle.AsRef(_StartOffset.Value); } + private static readonly Lazy _LeftOffset = new(() => Schema.GetOffset(0x782380E1C965C1D0), LazyThreadSafetyMode.None); + public ref Vector Left { - get => ref _Handle.AsRef(Schema.GetOffset(0x782380E1C965C1D0)); + get => ref _Handle.AsRef(_LeftOffset.Value); } + private static readonly Lazy _NormalOffset = new(() => Schema.GetOffset(0x782380E1363057B2), LazyThreadSafetyMode.None); + public ref Vector Normal { - get => ref _Handle.AsRef(Schema.GetOffset(0x782380E1363057B2)); + get => ref _Handle.AsRef(_NormalOffset.Value); } + private static readonly Lazy _PlayerOffset = new(() => Schema.GetOffset(0x782380E1E30D6DFC), LazyThreadSafetyMode.None); + public ref int Player { - get => ref _Handle.AsRef(Schema.GetOffset(0x782380E1E30D6DFC)); + get => ref _Handle.AsRef(_PlayerOffset.Value); } + private static readonly Lazy _EntityOffset = new(() => Schema.GetOffset(0x782380E1A2D5FAD6), LazyThreadSafetyMode.None); + public ref int Entity { - get => ref _Handle.AsRef(Schema.GetOffset(0x782380E1A2D5FAD6)); + get => ref _Handle.AsRef(_EntityOffset.Value); } + private static readonly Lazy _HitboxOffset = new(() => Schema.GetOffset(0x782380E16D9A48B3), LazyThreadSafetyMode.None); + public ref int Hitbox { - get => ref _Handle.AsRef(Schema.GetOffset(0x782380E16D9A48B3)); + get => ref _Handle.AsRef(_HitboxOffset.Value); } + private static readonly Lazy _CreationTimeOffset = new(() => Schema.GetOffset(0x782380E1525557E7), LazyThreadSafetyMode.None); + public ref float CreationTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x782380E1525557E7)); + get => ref _Handle.AsRef(_CreationTimeOffset.Value); } + private static readonly Lazy _TintIDOffset = new(() => Schema.GetOffset(0x782380E12CA2D64D), LazyThreadSafetyMode.None); + public ref int TintID { - get => ref _Handle.AsRef(Schema.GetOffset(0x782380E12CA2D64D)); + get => ref _Handle.AsRef(_TintIDOffset.Value); } + private static readonly Lazy _VersionOffset = new(() => Schema.GetOffset(0x782380E1B0AB8B1B), LazyThreadSafetyMode.None); + public ref byte Version { - get => ref _Handle.AsRef(Schema.GetOffset(0x782380E1B0AB8B1B)); + get => ref _Handle.AsRef(_VersionOffset.Value); } public ISchemaFixedArray Signature { get => new SchemaFixedArray(_Handle, 0x782380E133A8D6DC, 128, 1, 1); diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerVisibilityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerVisibilityImpl.cs index 6c988111e..ae12568f7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerVisibilityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayerVisibilityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CPlayerVisibilityImpl : CBaseEntityImpl, CPlayerVisibilit public CPlayerVisibilityImpl(nint handle) : base(handle) { } + private static readonly Lazy _VisibilityStrengthOffset = new(() => Schema.GetOffset(0x695BAF9B9E8E4E), LazyThreadSafetyMode.None); + public ref float VisibilityStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x695BAF9B9E8E4E)); + get => ref _Handle.AsRef(_VisibilityStrengthOffset.Value); } + private static readonly Lazy _FogDistanceMultiplierOffset = new(() => Schema.GetOffset(0x695BAFDB1CD031), LazyThreadSafetyMode.None); + public ref float FogDistanceMultiplier { - get => ref _Handle.AsRef(Schema.GetOffset(0x695BAFDB1CD031)); + get => ref _Handle.AsRef(_FogDistanceMultiplierOffset.Value); } + private static readonly Lazy _FogMaxDensityMultiplierOffset = new(() => Schema.GetOffset(0x695BAF7F993C70), LazyThreadSafetyMode.None); + public ref float FogMaxDensityMultiplier { - get => ref _Handle.AsRef(Schema.GetOffset(0x695BAF7F993C70)); + get => ref _Handle.AsRef(_FogMaxDensityMultiplierOffset.Value); } + private static readonly Lazy _FadeTimeOffset = new(() => Schema.GetOffset(0x695BAF00BEDB08), LazyThreadSafetyMode.None); + public ref float FadeTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x695BAF00BEDB08)); + get => ref _Handle.AsRef(_FadeTimeOffset.Value); } + private static readonly Lazy _StartDisabledOffset = new(() => Schema.GetOffset(0x695BAF61ED0C4F), LazyThreadSafetyMode.None); + public ref bool StartDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x695BAF61ED0C4F)); + get => ref _Handle.AsRef(_StartDisabledOffset.Value); } + private static readonly Lazy _IsEnabledOffset = new(() => Schema.GetOffset(0x695BAF5360D70E), LazyThreadSafetyMode.None); + public ref bool IsEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x695BAF5360D70E)); + get => ref _Handle.AsRef(_IsEnabledOffset.Value); } public void VisibilityStrengthUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_AutoaimServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_AutoaimServicesImpl.cs index 3567f2adf..8d1457103 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_AutoaimServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_AutoaimServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_CameraServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_CameraServicesImpl.cs index e2a0afc02..d7ffe8648 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_CameraServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_CameraServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,65 @@ internal partial class CPlayer_CameraServicesImpl : CPlayerPawnComponentImpl, CP public CPlayer_CameraServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _CsViewPunchAngleOffset = new(() => Schema.GetOffset(0xCF1076771108E39), LazyThreadSafetyMode.None); + public ref QAngle CsViewPunchAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0xCF1076771108E39)); + get => ref _Handle.AsRef(_CsViewPunchAngleOffset.Value); } + private static readonly Lazy _CsViewPunchAngleTickOffset = new(() => Schema.GetOffset(0xCF10767832A08EC), LazyThreadSafetyMode.None); + public GameTick_t CsViewPunchAngleTick { - get => new GameTick_tImpl(_Handle + Schema.GetOffset(0xCF10767832A08EC)); + get => new GameTick_tImpl(_Handle + _CsViewPunchAngleTickOffset.Value); } + private static readonly Lazy _CsViewPunchAngleTickRatioOffset = new(() => Schema.GetOffset(0xCF1076709BF7629), LazyThreadSafetyMode.None); + public ref float CsViewPunchAngleTickRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0xCF1076709BF7629)); + get => ref _Handle.AsRef(_CsViewPunchAngleTickRatioOffset.Value); } + private static readonly Lazy _PlayerFogOffset = new(() => Schema.GetOffset(0xCF1076781FBA280), LazyThreadSafetyMode.None); + public fogplayerparams_t PlayerFog { - get => new fogplayerparams_tImpl(_Handle + Schema.GetOffset(0xCF1076781FBA280)); + get => new fogplayerparams_tImpl(_Handle + _PlayerFogOffset.Value); } + private static readonly Lazy _ColorCorrectionCtrlOffset = new(() => Schema.GetOffset(0xCF1076724DC833B), LazyThreadSafetyMode.None); + public ref CHandle ColorCorrectionCtrl { - get => ref _Handle.AsRef>(Schema.GetOffset(0xCF1076724DC833B)); + get => ref _Handle.AsRef>(_ColorCorrectionCtrlOffset.Value); } + private static readonly Lazy _ViewEntityOffset = new(() => Schema.GetOffset(0xCF107677FD940D1), LazyThreadSafetyMode.None); + public ref CHandle ViewEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0xCF107677FD940D1)); + get => ref _Handle.AsRef>(_ViewEntityOffset.Value); } + private static readonly Lazy _TonemapControllerOffset = new(() => Schema.GetOffset(0xCF10767F5E1A34F), LazyThreadSafetyMode.None); + public ref CHandle TonemapController { - get => ref _Handle.AsRef>(Schema.GetOffset(0xCF10767F5E1A34F)); + get => ref _Handle.AsRef>(_TonemapControllerOffset.Value); } + private static readonly Lazy _AudioOffset = new(() => Schema.GetOffset(0xCF1076722E8C9B9), LazyThreadSafetyMode.None); + public audioparams_t Audio { - get => new audioparams_tImpl(_Handle + Schema.GetOffset(0xCF1076722E8C9B9)); + get => new audioparams_tImpl(_Handle + _AudioOffset.Value); } + private static readonly Lazy _PostProcessingVolumesOffset = new(() => Schema.GetOffset(0xCF107674BEE60DF), LazyThreadSafetyMode.None); + public ref CUtlVector> PostProcessingVolumes { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xCF107674BEE60DF)); + get => ref _Handle.AsRef>>(_PostProcessingVolumesOffset.Value); } + private static readonly Lazy _OldPlayerZOffset = new(() => Schema.GetOffset(0xCF107677A9E373D), LazyThreadSafetyMode.None); + public ref float OldPlayerZ { - get => ref _Handle.AsRef(Schema.GetOffset(0xCF107677A9E373D)); + get => ref _Handle.AsRef(_OldPlayerZOffset.Value); } + private static readonly Lazy _OldPlayerViewOffsetZOffset = new(() => Schema.GetOffset(0xCF10767CA126E73), LazyThreadSafetyMode.None); + public ref float OldPlayerViewOffsetZ { - get => ref _Handle.AsRef(Schema.GetOffset(0xCF10767CA126E73)); + get => ref _Handle.AsRef(_OldPlayerViewOffsetZOffset.Value); } + private static readonly Lazy _TriggerSoundscapeListOffset = new(() => Schema.GetOffset(0xCF10767F74D6272), LazyThreadSafetyMode.None); + public ref CUtlVector> TriggerSoundscapeList { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xCF10767F74D6272)); + get => ref _Handle.AsRef>>(_TriggerSoundscapeListOffset.Value); } public void CsViewPunchAngleUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_FlashlightServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_FlashlightServicesImpl.cs index 1cca2d48b..fb246ed2f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_FlashlightServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_FlashlightServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_ItemServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_ItemServicesImpl.cs index d1a187bed..83d5b3c75 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_ItemServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_ItemServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_MovementServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_MovementServicesImpl.cs index 68f9607e4..f408577d3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_MovementServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_MovementServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,50 +17,76 @@ internal partial class CPlayer_MovementServicesImpl : CPlayerPawnComponentImpl, public CPlayer_MovementServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _ImpulseOffset = new(() => Schema.GetOffset(0xD5BDF2892107CA68), LazyThreadSafetyMode.None); + public ref int Impulse { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5BDF2892107CA68)); + get => ref _Handle.AsRef(_ImpulseOffset.Value); } + private static readonly Lazy _ButtonsOffset = new(() => Schema.GetOffset(0xD5BDF28998CCEF82), LazyThreadSafetyMode.None); + public CInButtonState Buttons { - get => new CInButtonStateImpl(_Handle + Schema.GetOffset(0xD5BDF28998CCEF82)); + get => new CInButtonStateImpl(_Handle + _ButtonsOffset.Value); } + private static readonly Lazy _QueuedButtonDownMaskOffset = new(() => Schema.GetOffset(0xD5BDF28939CFB260), LazyThreadSafetyMode.None); + public ref ulong QueuedButtonDownMask { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5BDF28939CFB260)); + get => ref _Handle.AsRef(_QueuedButtonDownMaskOffset.Value); } + private static readonly Lazy _QueuedButtonChangeMaskOffset = new(() => Schema.GetOffset(0xD5BDF289FC832F1C), LazyThreadSafetyMode.None); + public ref ulong QueuedButtonChangeMask { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5BDF289FC832F1C)); + get => ref _Handle.AsRef(_QueuedButtonChangeMaskOffset.Value); } + private static readonly Lazy _ButtonDoublePressedOffset = new(() => Schema.GetOffset(0xD5BDF289E6C8CA6E), LazyThreadSafetyMode.None); + public ref ulong ButtonDoublePressed { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5BDF289E6C8CA6E)); + get => ref _Handle.AsRef(_ButtonDoublePressedOffset.Value); } public ISchemaFixedArray ButtonPressedCmdNumber { get => new SchemaFixedArray(_Handle, 0xD5BDF289A7854580, 64, 4, 4); } + private static readonly Lazy _LastCommandNumberProcessedOffset = new(() => Schema.GetOffset(0xD5BDF2899927F73D), LazyThreadSafetyMode.None); + public ref uint LastCommandNumberProcessed { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5BDF2899927F73D)); + get => ref _Handle.AsRef(_LastCommandNumberProcessedOffset.Value); } + private static readonly Lazy _ToggleButtonDownMaskOffset = new(() => Schema.GetOffset(0xD5BDF28907E86F99), LazyThreadSafetyMode.None); + public ref ulong ToggleButtonDownMask { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5BDF28907E86F99)); + get => ref _Handle.AsRef(_ToggleButtonDownMaskOffset.Value); } + private static readonly Lazy _MaxspeedOffset = new(() => Schema.GetOffset(0xD5BDF289468F90F2), LazyThreadSafetyMode.None); + public ref float Maxspeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5BDF289468F90F2)); + get => ref _Handle.AsRef(_MaxspeedOffset.Value); } public ISchemaFixedArray ForceSubtickMoveWhen { get => new SchemaFixedArray(_Handle, 0xD5BDF28999115A07, 4, 4, 4); } + private static readonly Lazy _ForwardMoveOffset = new(() => Schema.GetOffset(0xD5BDF289806C78A9), LazyThreadSafetyMode.None); + public ref float ForwardMove { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5BDF289806C78A9)); + get => ref _Handle.AsRef(_ForwardMoveOffset.Value); } + private static readonly Lazy _LeftMoveOffset = new(() => Schema.GetOffset(0xD5BDF289C4CF0D13), LazyThreadSafetyMode.None); + public ref float LeftMove { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5BDF289C4CF0D13)); + get => ref _Handle.AsRef(_LeftMoveOffset.Value); } + private static readonly Lazy _UpMoveOffset = new(() => Schema.GetOffset(0xD5BDF289B1E2D2B7), LazyThreadSafetyMode.None); + public ref float UpMove { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5BDF289B1E2D2B7)); + get => ref _Handle.AsRef(_UpMoveOffset.Value); } + private static readonly Lazy _LastMovementImpulsesOffset = new(() => Schema.GetOffset(0xD5BDF2890B87214C), LazyThreadSafetyMode.None); + public ref Vector LastMovementImpulses { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5BDF2890B87214C)); + get => ref _Handle.AsRef(_LastMovementImpulsesOffset.Value); } + private static readonly Lazy _OldViewAnglesOffset = new(() => Schema.GetOffset(0xD5BDF28935A27A27), LazyThreadSafetyMode.None); + public ref QAngle OldViewAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0xD5BDF28935A27A27)); + get => ref _Handle.AsRef(_OldViewAnglesOffset.Value); } public void ToggleButtonDownMaskUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_MovementServices_HumanoidImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_MovementServices_HumanoidImpl.cs index f74630275..39827cc9e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_MovementServices_HumanoidImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_MovementServices_HumanoidImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,70 @@ internal partial class CPlayer_MovementServices_HumanoidImpl : CPlayer_MovementS public CPlayer_MovementServices_HumanoidImpl(nint handle) : base(handle) { } + private static readonly Lazy _StepSoundTimeOffset = new(() => Schema.GetOffset(0xB65FEA796DEC5F7D), LazyThreadSafetyMode.None); + public ref float StepSoundTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xB65FEA796DEC5F7D)); + get => ref _Handle.AsRef(_StepSoundTimeOffset.Value); } + private static readonly Lazy _FallVelocityOffset = new(() => Schema.GetOffset(0xB65FEA796D8D7D9D), LazyThreadSafetyMode.None); + public ref float FallVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xB65FEA796D8D7D9D)); + get => ref _Handle.AsRef(_FallVelocityOffset.Value); } + private static readonly Lazy _InCrouchOffset = new(() => Schema.GetOffset(0xB65FEA79CF28FE64), LazyThreadSafetyMode.None); + public ref bool InCrouch { - get => ref _Handle.AsRef(Schema.GetOffset(0xB65FEA79CF28FE64)); + get => ref _Handle.AsRef(_InCrouchOffset.Value); } + private static readonly Lazy _CrouchStateOffset = new(() => Schema.GetOffset(0xB65FEA7988282338), LazyThreadSafetyMode.None); + public ref uint CrouchState { - get => ref _Handle.AsRef(Schema.GetOffset(0xB65FEA7988282338)); + get => ref _Handle.AsRef(_CrouchStateOffset.Value); } + private static readonly Lazy _CrouchTransitionStartTimeOffset = new(() => Schema.GetOffset(0xB65FEA79E89CEC2B), LazyThreadSafetyMode.None); + public GameTime_t CrouchTransitionStartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xB65FEA79E89CEC2B)); + get => new GameTime_tImpl(_Handle + _CrouchTransitionStartTimeOffset.Value); } + private static readonly Lazy _DuckedOffset = new(() => Schema.GetOffset(0xB65FEA7914A05A59), LazyThreadSafetyMode.None); + public ref bool Ducked { - get => ref _Handle.AsRef(Schema.GetOffset(0xB65FEA7914A05A59)); + get => ref _Handle.AsRef(_DuckedOffset.Value); } + private static readonly Lazy _DuckingOffset = new(() => Schema.GetOffset(0xB65FEA798B221170), LazyThreadSafetyMode.None); + public ref bool Ducking { - get => ref _Handle.AsRef(Schema.GetOffset(0xB65FEA798B221170)); + get => ref _Handle.AsRef(_DuckingOffset.Value); } + private static readonly Lazy _InDuckJumpOffset = new(() => Schema.GetOffset(0xB65FEA7917ADB523), LazyThreadSafetyMode.None); + public ref bool InDuckJump { - get => ref _Handle.AsRef(Schema.GetOffset(0xB65FEA7917ADB523)); + get => ref _Handle.AsRef(_InDuckJumpOffset.Value); } + private static readonly Lazy _GroundNormalOffset = new(() => Schema.GetOffset(0xB65FEA79ED2C77CD), LazyThreadSafetyMode.None); + public ref Vector GroundNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0xB65FEA79ED2C77CD)); + get => ref _Handle.AsRef(_GroundNormalOffset.Value); } + private static readonly Lazy _SurfaceFrictionOffset = new(() => Schema.GetOffset(0xB65FEA792BCEE768), LazyThreadSafetyMode.None); + public ref float SurfaceFriction { - get => ref _Handle.AsRef(Schema.GetOffset(0xB65FEA792BCEE768)); + get => ref _Handle.AsRef(_SurfaceFrictionOffset.Value); } + private static readonly Lazy _SurfacePropsOffset = new(() => Schema.GetOffset(0xB65FEA7974007B42), LazyThreadSafetyMode.None); + public ref CUtlStringToken SurfaceProps { - get => ref _Handle.AsRef(Schema.GetOffset(0xB65FEA7974007B42)); + get => ref _Handle.AsRef(_SurfacePropsOffset.Value); } + private static readonly Lazy _StepsideOffset = new(() => Schema.GetOffset(0xB65FEA7919FC0520), LazyThreadSafetyMode.None); + public ref int Stepside { - get => ref _Handle.AsRef(Schema.GetOffset(0xB65FEA7919FC0520)); + get => ref _Handle.AsRef(_StepsideOffset.Value); } + private static readonly Lazy _SmoothedVelocityOffset = new(() => Schema.GetOffset(0xB65FEA7999186E1D), LazyThreadSafetyMode.None); + public ref Vector SmoothedVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xB65FEA7999186E1D)); + get => ref _Handle.AsRef(_SmoothedVelocityOffset.Value); } public void FallVelocityUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_ObserverServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_ObserverServicesImpl.cs index 994b6f408..9532d0fc9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_ObserverServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_ObserverServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CPlayer_ObserverServicesImpl : CPlayerPawnComponentImpl, public CPlayer_ObserverServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _ObserverModeOffset = new(() => Schema.GetOffset(0x1611315ADAB57B35), LazyThreadSafetyMode.None); + public ref byte ObserverMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x1611315ADAB57B35)); + get => ref _Handle.AsRef(_ObserverModeOffset.Value); } + private static readonly Lazy _ObserverTargetOffset = new(() => Schema.GetOffset(0x1611315A24779C4C), LazyThreadSafetyMode.None); + public ref CHandle ObserverTarget { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1611315A24779C4C)); + get => ref _Handle.AsRef>(_ObserverTargetOffset.Value); } + private static readonly Lazy _ObserverLastModeOffset = new(() => Schema.GetOffset(0x1611315A555EDA49), LazyThreadSafetyMode.None); + public ref ObserverMode_t ObserverLastMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x1611315A555EDA49)); + get => ref _Handle.AsRef(_ObserverLastModeOffset.Value); } + private static readonly Lazy _ForcedObserverModeOffset = new(() => Schema.GetOffset(0x1611315A276632E1), LazyThreadSafetyMode.None); + public ref bool ForcedObserverMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x1611315A276632E1)); + get => ref _Handle.AsRef(_ForcedObserverModeOffset.Value); } public void ObserverModeUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_UseServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_UseServicesImpl.cs index d6f84f87a..f019a620e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_UseServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_UseServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_WaterServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_WaterServicesImpl.cs index fccaadfc6..e7b7d0d54 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_WaterServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_WaterServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_WeaponServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_WeaponServicesImpl.cs index 9df599e08..0cbc15e10 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_WeaponServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPlayer_WeaponServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,28 @@ internal partial class CPlayer_WeaponServicesImpl : CPlayerPawnComponentImpl, CP public CPlayer_WeaponServicesImpl(nint handle) : base(handle) { } + private static readonly Lazy _MyWeaponsOffset = new(() => Schema.GetOffset(0x634D22804C8A13A6), LazyThreadSafetyMode.None); + public ref CUtlVector> MyWeapons { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x634D22804C8A13A6)); + get => ref _Handle.AsRef>>(_MyWeaponsOffset.Value); } + private static readonly Lazy _ActiveWeaponOffset = new(() => Schema.GetOffset(0x634D2280940131C5), LazyThreadSafetyMode.None); + public ref CHandle ActiveWeapon { - get => ref _Handle.AsRef>(Schema.GetOffset(0x634D2280940131C5)); + get => ref _Handle.AsRef>(_ActiveWeaponOffset.Value); } + private static readonly Lazy _LastWeaponOffset = new(() => Schema.GetOffset(0x634D2280EA5C9547), LazyThreadSafetyMode.None); + public ref CHandle LastWeapon { - get => ref _Handle.AsRef>(Schema.GetOffset(0x634D2280EA5C9547)); + get => ref _Handle.AsRef>(_LastWeaponOffset.Value); } public ISchemaFixedArray Ammo { get => new SchemaFixedArray(_Handle, 0x634D22800D59E6CA, 32, 2, 2); } + private static readonly Lazy _PreventWeaponPickupOffset = new(() => Schema.GetOffset(0x634D228093894029), LazyThreadSafetyMode.None); + public ref bool PreventWeaponPickup { - get => ref _Handle.AsRef(Schema.GetOffset(0x634D228093894029)); + get => ref _Handle.AsRef(_PreventWeaponPickupOffset.Value); } public void MyWeaponsUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointAngleSensorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointAngleSensorImpl.cs index ce9f301e2..4f9e1ab2a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointAngleSensorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointAngleSensorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,45 +17,69 @@ internal partial class CPointAngleSensorImpl : CPointEntityImpl, CPointAngleSens public CPointAngleSensorImpl(nint handle) : base(handle) { } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x1E4356013A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x1E4356013A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _LookAtNameOffset = new(() => Schema.GetOffset(0x1E435601A28C338C), LazyThreadSafetyMode.None); + public string LookAtName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1E435601A28C338C)); + var ptr = _Handle.Read(_LookAtNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1E435601A28C338C, value); + set => Schema.SetString(_Handle, _LookAtNameOffset.Value, value); } + private static readonly Lazy _TargetEntityOffset = new(() => Schema.GetOffset(0x1E43560125D042A9), LazyThreadSafetyMode.None); + public ref CHandle TargetEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E43560125D042A9)); + get => ref _Handle.AsRef>(_TargetEntityOffset.Value); } + private static readonly Lazy _LookAtEntityOffset = new(() => Schema.GetOffset(0x1E435601073CB5DE), LazyThreadSafetyMode.None); + public ref CHandle LookAtEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1E435601073CB5DE)); + get => ref _Handle.AsRef>(_LookAtEntityOffset.Value); } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0x1E435601BC5E3BAB), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0x1E435601BC5E3BAB)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _DotToleranceOffset = new(() => Schema.GetOffset(0x1E4356011A15A535), LazyThreadSafetyMode.None); + public ref float DotTolerance { - get => ref _Handle.AsRef(Schema.GetOffset(0x1E4356011A15A535)); + get => ref _Handle.AsRef(_DotToleranceOffset.Value); } + private static readonly Lazy _FacingTimeOffset = new(() => Schema.GetOffset(0x1E43560177B926C8), LazyThreadSafetyMode.None); + public GameTime_t FacingTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1E43560177B926C8)); + get => new GameTime_tImpl(_Handle + _FacingTimeOffset.Value); } + private static readonly Lazy _FiredOffset = new(() => Schema.GetOffset(0x1E435601E8E73267), LazyThreadSafetyMode.None); + public ref bool Fired { - get => ref _Handle.AsRef(Schema.GetOffset(0x1E435601E8E73267)); + get => ref _Handle.AsRef(_FiredOffset.Value); } + private static readonly Lazy _OnFacingLookatOffset = new(() => Schema.GetOffset(0x1E4356011F71721C), LazyThreadSafetyMode.None); + public CEntityIOOutput OnFacingLookat { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1E4356011F71721C)); + get => new CEntityIOOutputImpl(_Handle + _OnFacingLookatOffset.Value); } + private static readonly Lazy _OnNotFacingLookatOffset = new(() => Schema.GetOffset(0x1E435601A7B496D5), LazyThreadSafetyMode.None); + public CEntityIOOutput OnNotFacingLookat { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1E435601A7B496D5)); + get => new CEntityIOOutputImpl(_Handle + _OnNotFacingLookatOffset.Value); } + private static readonly Lazy _TargetDirOffset = new(() => Schema.GetOffset(0x1E435601946F7FDF), LazyThreadSafetyMode.None); + public SchemaUntypedField TargetDir { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x1E435601946F7FDF)); + get => new SchemaUntypedField(_Handle + _TargetDirOffset.Value); } + private static readonly Lazy _FacingPercentageOffset = new(() => Schema.GetOffset(0x1E4356018B451097), LazyThreadSafetyMode.None); + public SchemaUntypedField FacingPercentage { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x1E4356018B451097)); + get => new SchemaUntypedField(_Handle + _FacingPercentageOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointAngularVelocitySensorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointAngularVelocitySensorImpl.cs index 9c9414e30..c7f6b0da6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointAngularVelocitySensorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointAngularVelocitySensorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,53 +17,85 @@ internal partial class CPointAngularVelocitySensorImpl : CPointEntityImpl, CPoin public CPointAngularVelocitySensorImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetEntityOffset = new(() => Schema.GetOffset(0x5B09D8F25D042A9), LazyThreadSafetyMode.None); + public ref CHandle TargetEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5B09D8F25D042A9)); + get => ref _Handle.AsRef>(_TargetEntityOffset.Value); } + private static readonly Lazy _ThresholdOffset = new(() => Schema.GetOffset(0x5B09D8F7872FFEA), LazyThreadSafetyMode.None); + public ref float Threshold { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B09D8F7872FFEA)); + get => ref _Handle.AsRef(_ThresholdOffset.Value); } + private static readonly Lazy _LastCompareResultOffset = new(() => Schema.GetOffset(0x5B09D8F696B400D), LazyThreadSafetyMode.None); + public ref int LastCompareResult { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B09D8F696B400D)); + get => ref _Handle.AsRef(_LastCompareResultOffset.Value); } + private static readonly Lazy _LastFireResultOffset = new(() => Schema.GetOffset(0x5B09D8FBC50E238), LazyThreadSafetyMode.None); + public ref int LastFireResult { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B09D8FBC50E238)); + get => ref _Handle.AsRef(_LastFireResultOffset.Value); } + private static readonly Lazy _FireTimeOffset = new(() => Schema.GetOffset(0x5B09D8F873CD172), LazyThreadSafetyMode.None); + public GameTime_t FireTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x5B09D8F873CD172)); + get => new GameTime_tImpl(_Handle + _FireTimeOffset.Value); } + private static readonly Lazy _FireIntervalOffset = new(() => Schema.GetOffset(0x5B09D8F1B1AA6D2), LazyThreadSafetyMode.None); + public ref float FireInterval { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B09D8F1B1AA6D2)); + get => ref _Handle.AsRef(_FireIntervalOffset.Value); } + private static readonly Lazy _LastAngVelocityOffset = new(() => Schema.GetOffset(0x5B09D8F10D82166), LazyThreadSafetyMode.None); + public ref float LastAngVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B09D8F10D82166)); + get => ref _Handle.AsRef(_LastAngVelocityOffset.Value); } + private static readonly Lazy _LastOrientationOffset = new(() => Schema.GetOffset(0x5B09D8FBB4E87E5), LazyThreadSafetyMode.None); + public ref QAngle LastOrientation { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B09D8FBB4E87E5)); + get => ref _Handle.AsRef(_LastOrientationOffset.Value); } + private static readonly Lazy _AxisOffset = new(() => Schema.GetOffset(0x5B09D8F0AF9CE54), LazyThreadSafetyMode.None); + public ref Vector Axis { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B09D8F0AF9CE54)); + get => ref _Handle.AsRef(_AxisOffset.Value); } + private static readonly Lazy _UseHelperOffset = new(() => Schema.GetOffset(0x5B09D8F7370F54C), LazyThreadSafetyMode.None); + public ref bool UseHelper { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B09D8F7370F54C)); + get => ref _Handle.AsRef(_UseHelperOffset.Value); } + private static readonly Lazy _AngularVelocityOffset = new(() => Schema.GetOffset(0x5B09D8FA4D9E2BE), LazyThreadSafetyMode.None); + public SchemaUntypedField AngularVelocity { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x5B09D8FA4D9E2BE)); + get => new SchemaUntypedField(_Handle + _AngularVelocityOffset.Value); } + private static readonly Lazy _OnLessThanOffset = new(() => Schema.GetOffset(0x5B09D8FB6AC02FE), LazyThreadSafetyMode.None); + public CEntityIOOutput OnLessThan { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x5B09D8FB6AC02FE)); + get => new CEntityIOOutputImpl(_Handle + _OnLessThanOffset.Value); } + private static readonly Lazy _OnLessThanOrEqualToOffset = new(() => Schema.GetOffset(0x5B09D8F28E696D8), LazyThreadSafetyMode.None); + public CEntityIOOutput OnLessThanOrEqualTo { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x5B09D8F28E696D8)); + get => new CEntityIOOutputImpl(_Handle + _OnLessThanOrEqualToOffset.Value); } + private static readonly Lazy _OnGreaterThanOffset = new(() => Schema.GetOffset(0x5B09D8F50BD472D), LazyThreadSafetyMode.None); + public CEntityIOOutput OnGreaterThan { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x5B09D8F50BD472D)); + get => new CEntityIOOutputImpl(_Handle + _OnGreaterThanOffset.Value); } + private static readonly Lazy _OnGreaterThanOrEqualToOffset = new(() => Schema.GetOffset(0x5B09D8F6483CABD), LazyThreadSafetyMode.None); + public CEntityIOOutput OnGreaterThanOrEqualTo { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x5B09D8F6483CABD)); + get => new CEntityIOOutputImpl(_Handle + _OnGreaterThanOrEqualToOffset.Value); } + private static readonly Lazy _OnEqualToOffset = new(() => Schema.GetOffset(0x5B09D8F87EEC581), LazyThreadSafetyMode.None); + public CEntityIOOutput OnEqualTo { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x5B09D8F87EEC581)); + get => new CEntityIOOutputImpl(_Handle + _OnEqualToOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointBroadcastClientCommandImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointBroadcastClientCommandImpl.cs index 7cfce2385..5cd0d3bdd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointBroadcastClientCommandImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointBroadcastClientCommandImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointCameraImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointCameraImpl.cs index 9608e5b2e..b4e8fed1a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointCameraImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointCameraImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,84 +17,136 @@ internal partial class CPointCameraImpl : CBaseEntityImpl, CPointCamera { public CPointCameraImpl(nint handle) : base(handle) { } + private static readonly Lazy _FOVOffset = new(() => Schema.GetOffset(0x3E5CC0835C3A63DC), LazyThreadSafetyMode.None); + public ref float FOV { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC0835C3A63DC)); + get => ref _Handle.AsRef(_FOVOffset.Value); } + private static readonly Lazy _ResolutionOffset = new(() => Schema.GetOffset(0x3E5CC083B9351D0F), LazyThreadSafetyMode.None); + public ref float Resolution { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC083B9351D0F)); + get => ref _Handle.AsRef(_ResolutionOffset.Value); } + private static readonly Lazy _FogEnableOffset = new(() => Schema.GetOffset(0x3E5CC0837ED6A448), LazyThreadSafetyMode.None); + public ref bool FogEnable { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC0837ED6A448)); + get => ref _Handle.AsRef(_FogEnableOffset.Value); } + private static readonly Lazy _FogColorOffset = new(() => Schema.GetOffset(0x3E5CC083C5585AAE), LazyThreadSafetyMode.None); + public ref Color FogColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC083C5585AAE)); + get => ref _Handle.AsRef(_FogColorOffset.Value); } + private static readonly Lazy _FogStartOffset = new(() => Schema.GetOffset(0x3E5CC0832A8DE023), LazyThreadSafetyMode.None); + public ref float FogStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC0832A8DE023)); + get => ref _Handle.AsRef(_FogStartOffset.Value); } + private static readonly Lazy _FogEndOffset = new(() => Schema.GetOffset(0x3E5CC08334D4BC16), LazyThreadSafetyMode.None); + public ref float FogEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC08334D4BC16)); + get => ref _Handle.AsRef(_FogEndOffset.Value); } + private static readonly Lazy _FogMaxDensityOffset = new(() => Schema.GetOffset(0x3E5CC08343CD4C8B), LazyThreadSafetyMode.None); + public ref float FogMaxDensity { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC08343CD4C8B)); + get => ref _Handle.AsRef(_FogMaxDensityOffset.Value); } + private static readonly Lazy _ActiveOffset = new(() => Schema.GetOffset(0x3E5CC0838334208F), LazyThreadSafetyMode.None); + public ref bool Active { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC0838334208F)); + get => ref _Handle.AsRef(_ActiveOffset.Value); } + private static readonly Lazy _UseScreenAspectRatioOffset = new(() => Schema.GetOffset(0x3E5CC08353101AA3), LazyThreadSafetyMode.None); + public ref bool UseScreenAspectRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC08353101AA3)); + get => ref _Handle.AsRef(_UseScreenAspectRatioOffset.Value); } + private static readonly Lazy _AspectRatioOffset = new(() => Schema.GetOffset(0x3E5CC08381C7922E), LazyThreadSafetyMode.None); + public ref float AspectRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC08381C7922E)); + get => ref _Handle.AsRef(_AspectRatioOffset.Value); } + private static readonly Lazy _NoSkyOffset = new(() => Schema.GetOffset(0x3E5CC083760FF03B), LazyThreadSafetyMode.None); + public ref bool NoSky { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC083760FF03B)); + get => ref _Handle.AsRef(_NoSkyOffset.Value); } + private static readonly Lazy _BrightnessOffset = new(() => Schema.GetOffset(0x3E5CC0832E2B25BE), LazyThreadSafetyMode.None); + public ref float Brightness { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC0832E2B25BE)); + get => ref _Handle.AsRef(_BrightnessOffset.Value); } + private static readonly Lazy _ZFarOffset = new(() => Schema.GetOffset(0x3E5CC083578834A4), LazyThreadSafetyMode.None); + public ref float ZFar { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC083578834A4)); + get => ref _Handle.AsRef(_ZFarOffset.Value); } + private static readonly Lazy _ZNearOffset = new(() => Schema.GetOffset(0x3E5CC083C81DED31), LazyThreadSafetyMode.None); + public ref float ZNear { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC083C81DED31)); + get => ref _Handle.AsRef(_ZNearOffset.Value); } + private static readonly Lazy _CanHLTVUseOffset = new(() => Schema.GetOffset(0x3E5CC083EF15745A), LazyThreadSafetyMode.None); + public ref bool CanHLTVUse { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC083EF15745A)); + get => ref _Handle.AsRef(_CanHLTVUseOffset.Value); } + private static readonly Lazy _AlignWithParentOffset = new(() => Schema.GetOffset(0x3E5CC08371E0F322), LazyThreadSafetyMode.None); + public ref bool AlignWithParent { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC08371E0F322)); + get => ref _Handle.AsRef(_AlignWithParentOffset.Value); } + private static readonly Lazy _DofEnabledOffset = new(() => Schema.GetOffset(0x3E5CC083EDC8F923), LazyThreadSafetyMode.None); + public ref bool DofEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC083EDC8F923)); + get => ref _Handle.AsRef(_DofEnabledOffset.Value); } + private static readonly Lazy _DofNearBlurryOffset = new(() => Schema.GetOffset(0x3E5CC0837C69D002), LazyThreadSafetyMode.None); + public ref float DofNearBlurry { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC0837C69D002)); + get => ref _Handle.AsRef(_DofNearBlurryOffset.Value); } + private static readonly Lazy _DofNearCrispOffset = new(() => Schema.GetOffset(0x3E5CC083B0E97BC1), LazyThreadSafetyMode.None); + public ref float DofNearCrisp { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC083B0E97BC1)); + get => ref _Handle.AsRef(_DofNearCrispOffset.Value); } + private static readonly Lazy _DofFarCrispOffset = new(() => Schema.GetOffset(0x3E5CC0832EC98B88), LazyThreadSafetyMode.None); + public ref float DofFarCrisp { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC0832EC98B88)); + get => ref _Handle.AsRef(_DofFarCrispOffset.Value); } + private static readonly Lazy _DofFarBlurryOffset = new(() => Schema.GetOffset(0x3E5CC083312C6605), LazyThreadSafetyMode.None); + public ref float DofFarBlurry { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC083312C6605)); + get => ref _Handle.AsRef(_DofFarBlurryOffset.Value); } + private static readonly Lazy _DofTiltToGroundOffset = new(() => Schema.GetOffset(0x3E5CC0833DF50E81), LazyThreadSafetyMode.None); + public ref float DofTiltToGround { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC0833DF50E81)); + get => ref _Handle.AsRef(_DofTiltToGroundOffset.Value); } + private static readonly Lazy _TargetFOVOffset = new(() => Schema.GetOffset(0x3E5CC0835BA7ABEB), LazyThreadSafetyMode.None); + public ref float TargetFOV { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC0835BA7ABEB)); + get => ref _Handle.AsRef(_TargetFOVOffset.Value); } + private static readonly Lazy _DegreesPerSecondOffset = new(() => Schema.GetOffset(0x3E5CC083469C1605), LazyThreadSafetyMode.None); + public ref float DegreesPerSecond { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC083469C1605)); + get => ref _Handle.AsRef(_DegreesPerSecondOffset.Value); } + private static readonly Lazy _IsOnOffset = new(() => Schema.GetOffset(0x3E5CC0836387DB60), LazyThreadSafetyMode.None); + public ref bool IsOn { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E5CC0836387DB60)); + get => ref _Handle.AsRef(_IsOnOffset.Value); } + private static readonly Lazy _NextOffset = new(() => Schema.GetOffset(0x3E5CC08332B11E0E), LazyThreadSafetyMode.None); + public CPointCamera? Next { get { - var ptr = _Handle.Read(Schema.GetOffset(0x3E5CC08332B11E0E)); + var ptr = _Handle.Read(_NextOffset.Value); return ptr.IsValidPtr() ? new CPointCameraImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointCameraVFOVImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointCameraVFOVImpl.cs index db9f55db9..192c767fe 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointCameraVFOVImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointCameraVFOVImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPointCameraVFOVImpl : CPointCameraImpl, CPointCameraVFOV public CPointCameraVFOVImpl(nint handle) : base(handle) { } + private static readonly Lazy _VerticalFOVOffset = new(() => Schema.GetOffset(0xBDB1254E910A1908), LazyThreadSafetyMode.None); + public ref float VerticalFOV { - get => ref _Handle.AsRef(Schema.GetOffset(0xBDB1254E910A1908)); + get => ref _Handle.AsRef(_VerticalFOVOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointChildModifierImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointChildModifierImpl.cs index 9fe538e1e..5abe40a14 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointChildModifierImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointChildModifierImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPointChildModifierImpl : CPointEntityImpl, CPointChildMo public CPointChildModifierImpl(nint handle) : base(handle) { } + private static readonly Lazy _OrphanInsteadOfDeletingChildrenOnRemoveOffset = new(() => Schema.GetOffset(0xDA7544AF85891348), LazyThreadSafetyMode.None); + public ref bool OrphanInsteadOfDeletingChildrenOnRemove { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA7544AF85891348)); + get => ref _Handle.AsRef(_OrphanInsteadOfDeletingChildrenOnRemoveOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointClientCommandImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointClientCommandImpl.cs index a37d34317..cce89f3a0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointClientCommandImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointClientCommandImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointClientUIDialogImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointClientUIDialogImpl.cs index 6407efd68..d082959d3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointClientUIDialogImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointClientUIDialogImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPointClientUIDialogImpl : CBaseClientUIEntityImpl, CPoin public CPointClientUIDialogImpl(nint handle) : base(handle) { } + private static readonly Lazy _ActivatorOffset = new(() => Schema.GetOffset(0x1136C185AB093BB2), LazyThreadSafetyMode.None); + public ref CHandle Activator { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1136C185AB093BB2)); + get => ref _Handle.AsRef>(_ActivatorOffset.Value); } + private static readonly Lazy _StartEnabledOffset = new(() => Schema.GetOffset(0x1136C185500D5C24), LazyThreadSafetyMode.None); + public ref bool StartEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x1136C185500D5C24)); + get => ref _Handle.AsRef(_StartEnabledOffset.Value); } public void ActivatorUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointClientUIWorldPanelImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointClientUIWorldPanelImpl.cs index 12616f666..bee19116a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointClientUIWorldPanelImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointClientUIWorldPanelImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,77 +17,125 @@ internal partial class CPointClientUIWorldPanelImpl : CBaseClientUIEntityImpl, C public CPointClientUIWorldPanelImpl(nint handle) : base(handle) { } + private static readonly Lazy _IgnoreInputOffset = new(() => Schema.GetOffset(0xA4834E6F946EC6E1), LazyThreadSafetyMode.None); + public ref bool IgnoreInput { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6F946EC6E1)); + get => ref _Handle.AsRef(_IgnoreInputOffset.Value); } + private static readonly Lazy _LitOffset = new(() => Schema.GetOffset(0xA4834E6F68D14396), LazyThreadSafetyMode.None); + public ref bool Lit { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6F68D14396)); + get => ref _Handle.AsRef(_LitOffset.Value); } + private static readonly Lazy _FollowPlayerAcrossTeleportOffset = new(() => Schema.GetOffset(0xA4834E6F8C71E81F), LazyThreadSafetyMode.None); + public ref bool FollowPlayerAcrossTeleport { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6F8C71E81F)); + get => ref _Handle.AsRef(_FollowPlayerAcrossTeleportOffset.Value); } + private static readonly Lazy _WidthOffset = new(() => Schema.GetOffset(0xA4834E6FB91935E1), LazyThreadSafetyMode.None); + public ref float Width { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6FB91935E1)); + get => ref _Handle.AsRef(_WidthOffset.Value); } + private static readonly Lazy _HeightOffset = new(() => Schema.GetOffset(0xA4834E6FEADD7FB0), LazyThreadSafetyMode.None); + public ref float Height { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6FEADD7FB0)); + get => ref _Handle.AsRef(_HeightOffset.Value); } + private static readonly Lazy _DPIOffset = new(() => Schema.GetOffset(0xA4834E6FEB0B7A2E), LazyThreadSafetyMode.None); + public ref float DPI { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6FEB0B7A2E)); + get => ref _Handle.AsRef(_DPIOffset.Value); } + private static readonly Lazy _InteractDistanceOffset = new(() => Schema.GetOffset(0xA4834E6F47FBB4C2), LazyThreadSafetyMode.None); + public ref float InteractDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6F47FBB4C2)); + get => ref _Handle.AsRef(_InteractDistanceOffset.Value); } + private static readonly Lazy _DepthOffsetOffset = new(() => Schema.GetOffset(0xA4834E6F67D1DB9B), LazyThreadSafetyMode.None); + public ref float DepthOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6F67D1DB9B)); + get => ref _Handle.AsRef(_DepthOffsetOffset.Value); } + private static readonly Lazy _OwnerContextOffset = new(() => Schema.GetOffset(0xA4834E6FB5F5A8BC), LazyThreadSafetyMode.None); + public ref uint OwnerContext { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6FB5F5A8BC)); + get => ref _Handle.AsRef(_OwnerContextOffset.Value); } + private static readonly Lazy _HorizontalAlignOffset = new(() => Schema.GetOffset(0xA4834E6FF2F27A57), LazyThreadSafetyMode.None); + public ref uint HorizontalAlign { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6FF2F27A57)); + get => ref _Handle.AsRef(_HorizontalAlignOffset.Value); } + private static readonly Lazy _VerticalAlignOffset = new(() => Schema.GetOffset(0xA4834E6FC263FE8D), LazyThreadSafetyMode.None); + public ref uint VerticalAlign { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6FC263FE8D)); + get => ref _Handle.AsRef(_VerticalAlignOffset.Value); } + private static readonly Lazy _OrientationOffset = new(() => Schema.GetOffset(0xA4834E6FB9A99B4C), LazyThreadSafetyMode.None); + public ref uint Orientation { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6FB9A99B4C)); + get => ref _Handle.AsRef(_OrientationOffset.Value); } + private static readonly Lazy _AllowInteractionFromAllSceneWorldsOffset = new(() => Schema.GetOffset(0xA4834E6FB50077AE), LazyThreadSafetyMode.None); + public ref bool AllowInteractionFromAllSceneWorlds { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6FB50077AE)); + get => ref _Handle.AsRef(_AllowInteractionFromAllSceneWorldsOffset.Value); } + private static readonly Lazy _CSSClassesOffset = new(() => Schema.GetOffset(0xA4834E6FCB74D1DC), LazyThreadSafetyMode.None); + public ref CUtlVector CSSClasses { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA4834E6FCB74D1DC)); + get => ref _Handle.AsRef>(_CSSClassesOffset.Value); } + private static readonly Lazy _OpaqueOffset = new(() => Schema.GetOffset(0xA4834E6F718DB77E), LazyThreadSafetyMode.None); + public ref bool Opaque { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6F718DB77E)); + get => ref _Handle.AsRef(_OpaqueOffset.Value); } + private static readonly Lazy _NoDepthOffset = new(() => Schema.GetOffset(0xA4834E6F930402F3), LazyThreadSafetyMode.None); + public ref bool NoDepth { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6F930402F3)); + get => ref _Handle.AsRef(_NoDepthOffset.Value); } + private static readonly Lazy _VisibleWhenParentNoDrawOffset = new(() => Schema.GetOffset(0xA4834E6F894EBD44), LazyThreadSafetyMode.None); + public ref bool VisibleWhenParentNoDraw { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6F894EBD44)); + get => ref _Handle.AsRef(_VisibleWhenParentNoDrawOffset.Value); } + private static readonly Lazy _RenderBackfaceOffset = new(() => Schema.GetOffset(0xA4834E6F9150ED73), LazyThreadSafetyMode.None); + public ref bool RenderBackface { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6F9150ED73)); + get => ref _Handle.AsRef(_RenderBackfaceOffset.Value); } + private static readonly Lazy _UseOffScreenIndicatorOffset = new(() => Schema.GetOffset(0xA4834E6F83728A46), LazyThreadSafetyMode.None); + public ref bool UseOffScreenIndicator { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6F83728A46)); + get => ref _Handle.AsRef(_UseOffScreenIndicatorOffset.Value); } + private static readonly Lazy _ExcludeFromSaveGamesOffset = new(() => Schema.GetOffset(0xA4834E6FFC6043F7), LazyThreadSafetyMode.None); + public ref bool ExcludeFromSaveGames { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6FFC6043F7)); + get => ref _Handle.AsRef(_ExcludeFromSaveGamesOffset.Value); } + private static readonly Lazy _GrabbableOffset = new(() => Schema.GetOffset(0xA4834E6FFE2A8983), LazyThreadSafetyMode.None); + public ref bool Grabbable { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6FFE2A8983)); + get => ref _Handle.AsRef(_GrabbableOffset.Value); } + private static readonly Lazy _OnlyRenderToTextureOffset = new(() => Schema.GetOffset(0xA4834E6F52B95FF9), LazyThreadSafetyMode.None); + public ref bool OnlyRenderToTexture { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6F52B95FF9)); + get => ref _Handle.AsRef(_OnlyRenderToTextureOffset.Value); } + private static readonly Lazy _DisableMipGenOffset = new(() => Schema.GetOffset(0xA4834E6F0CB84487), LazyThreadSafetyMode.None); + public ref bool DisableMipGen { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6F0CB84487)); + get => ref _Handle.AsRef(_DisableMipGenOffset.Value); } + private static readonly Lazy _ExplicitImageLayoutOffset = new(() => Schema.GetOffset(0xA4834E6FAFAD513C), LazyThreadSafetyMode.None); + public ref int ExplicitImageLayout { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4834E6FAFAD513C)); + get => ref _Handle.AsRef(_ExplicitImageLayoutOffset.Value); } public void IgnoreInputUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointClientUIWorldTextPanelImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointClientUIWorldTextPanelImpl.cs index 4ac91ef36..b424f3e36 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointClientUIWorldTextPanelImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointClientUIWorldTextPanelImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CPointClientUIWorldTextPanelImpl : CPointClientUIWorldPan public CPointClientUIWorldTextPanelImpl(nint handle) : base(handle) { } + private static readonly Lazy _MessageTextOffset = new(() => Schema.GetOffset(0x9F10465EBA6E5D73), LazyThreadSafetyMode.None); + public string MessageText { get { - var ptr = _Handle + Schema.GetOffset(0x9F10465EBA6E5D73); + var ptr = _Handle + _MessageTextOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x9F10465EBA6E5D73, value, 512); + set => Schema.SetFixedString(_Handle, _MessageTextOffset.Value, value, 512); } public void MessageTextUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointCommentaryNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointCommentaryNodeImpl.cs index d3b7dd8a9..811076230 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointCommentaryNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointCommentaryNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,123 +17,183 @@ internal partial class CPointCommentaryNodeImpl : CBaseAnimGraphImpl, CPointComm public CPointCommentaryNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _PreCommandsOffset = new(() => Schema.GetOffset(0x1EE820D5A9BA18C4), LazyThreadSafetyMode.None); + public string PreCommands { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1EE820D5A9BA18C4)); + var ptr = _Handle.Read(_PreCommandsOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1EE820D5A9BA18C4, value); + set => Schema.SetString(_Handle, _PreCommandsOffset.Value, value); } + private static readonly Lazy _PostCommandsOffset = new(() => Schema.GetOffset(0x1EE820D52B9BBDED), LazyThreadSafetyMode.None); + public string PostCommands { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1EE820D52B9BBDED)); + var ptr = _Handle.Read(_PostCommandsOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1EE820D52B9BBDED, value); + set => Schema.SetString(_Handle, _PostCommandsOffset.Value, value); } + private static readonly Lazy _CommentaryFileOffset = new(() => Schema.GetOffset(0x1EE820D5996CE112), LazyThreadSafetyMode.None); + public string CommentaryFile { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1EE820D5996CE112)); + var ptr = _Handle.Read(_CommentaryFileOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1EE820D5996CE112, value); + set => Schema.SetString(_Handle, _CommentaryFileOffset.Value, value); } + private static readonly Lazy _ViewTargetOffset = new(() => Schema.GetOffset(0x1EE820D57F25C3A9), LazyThreadSafetyMode.None); + public string ViewTarget { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1EE820D57F25C3A9)); + var ptr = _Handle.Read(_ViewTargetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1EE820D57F25C3A9, value); + set => Schema.SetString(_Handle, _ViewTargetOffset.Value, value); } + private static readonly Lazy _ViewTarget1Offset = new(() => Schema.GetOffset(0x1EE820D5367DC4F3), LazyThreadSafetyMode.None); + public ref CHandle ViewTarget1 { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1EE820D5367DC4F3)); + get => ref _Handle.AsRef>(_ViewTarget1Offset.Value); } + private static readonly Lazy _ViewTargetAnglesOffset = new(() => Schema.GetOffset(0x1EE820D57036CBB3), LazyThreadSafetyMode.None); + public ref CHandle ViewTargetAngles { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1EE820D57036CBB3)); + get => ref _Handle.AsRef>(_ViewTargetAnglesOffset.Value); } + private static readonly Lazy _ViewPositionOffset = new(() => Schema.GetOffset(0x1EE820D5F077F9E3), LazyThreadSafetyMode.None); + public string ViewPosition { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1EE820D5F077F9E3)); + var ptr = _Handle.Read(_ViewPositionOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1EE820D5F077F9E3, value); + set => Schema.SetString(_Handle, _ViewPositionOffset.Value, value); } + private static readonly Lazy _ViewPosition2Offset = new(() => Schema.GetOffset(0x1EE820D50C900ACD), LazyThreadSafetyMode.None); + public ref CHandle ViewPosition2 { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1EE820D50C900ACD)); + get => ref _Handle.AsRef>(_ViewPosition2Offset.Value); } + private static readonly Lazy _ViewPositionMoverOffset = new(() => Schema.GetOffset(0x1EE820D596E47DAA), LazyThreadSafetyMode.None); + public ref CHandle ViewPositionMover { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1EE820D596E47DAA)); + get => ref _Handle.AsRef>(_ViewPositionMoverOffset.Value); } + private static readonly Lazy _PreventMovementOffset = new(() => Schema.GetOffset(0x1EE820D50513BCD8), LazyThreadSafetyMode.None); + public ref bool PreventMovement { - get => ref _Handle.AsRef(Schema.GetOffset(0x1EE820D50513BCD8)); + get => ref _Handle.AsRef(_PreventMovementOffset.Value); } + private static readonly Lazy _UnderCrosshairOffset = new(() => Schema.GetOffset(0x1EE820D53DF2740B), LazyThreadSafetyMode.None); + public ref bool UnderCrosshair { - get => ref _Handle.AsRef(Schema.GetOffset(0x1EE820D53DF2740B)); + get => ref _Handle.AsRef(_UnderCrosshairOffset.Value); } + private static readonly Lazy _UnstoppableOffset = new(() => Schema.GetOffset(0x1EE820D532F081DA), LazyThreadSafetyMode.None); + public ref bool Unstoppable { - get => ref _Handle.AsRef(Schema.GetOffset(0x1EE820D532F081DA)); + get => ref _Handle.AsRef(_UnstoppableOffset.Value); } + private static readonly Lazy _FinishedTimeOffset = new(() => Schema.GetOffset(0x1EE820D5E2616940), LazyThreadSafetyMode.None); + public GameTime_t FinishedTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1EE820D5E2616940)); + get => new GameTime_tImpl(_Handle + _FinishedTimeOffset.Value); } + private static readonly Lazy _FinishOriginOffset = new(() => Schema.GetOffset(0x1EE820D5343348F4), LazyThreadSafetyMode.None); + public ref Vector FinishOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0x1EE820D5343348F4)); + get => ref _Handle.AsRef(_FinishOriginOffset.Value); } + private static readonly Lazy _OriginalAnglesOffset = new(() => Schema.GetOffset(0x1EE820D53F12AD96), LazyThreadSafetyMode.None); + public ref QAngle OriginalAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0x1EE820D53F12AD96)); + get => ref _Handle.AsRef(_OriginalAnglesOffset.Value); } + private static readonly Lazy _FinishAnglesOffset = new(() => Schema.GetOffset(0x1EE820D58F00F976), LazyThreadSafetyMode.None); + public ref QAngle FinishAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0x1EE820D58F00F976)); + get => ref _Handle.AsRef(_FinishAnglesOffset.Value); } + private static readonly Lazy _PreventChangesWhileMovingOffset = new(() => Schema.GetOffset(0x1EE820D532F652B1), LazyThreadSafetyMode.None); + public ref bool PreventChangesWhileMoving { - get => ref _Handle.AsRef(Schema.GetOffset(0x1EE820D532F652B1)); + get => ref _Handle.AsRef(_PreventChangesWhileMovingOffset.Value); } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x1EE820D53A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x1EE820D53A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _TeleportOriginOffset = new(() => Schema.GetOffset(0x1EE820D52953C748), LazyThreadSafetyMode.None); + public ref Vector TeleportOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0x1EE820D52953C748)); + get => ref _Handle.AsRef(_TeleportOriginOffset.Value); } + private static readonly Lazy _AbortedPlaybackAtOffset = new(() => Schema.GetOffset(0x1EE820D5A444B332), LazyThreadSafetyMode.None); + public GameTime_t AbortedPlaybackAt { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1EE820D5A444B332)); + get => new GameTime_tImpl(_Handle + _AbortedPlaybackAtOffset.Value); } + private static readonly Lazy _OnCommentaryStartedOffset = new(() => Schema.GetOffset(0x1EE820D50D986100), LazyThreadSafetyMode.None); + public CEntityIOOutput OnCommentaryStarted { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1EE820D50D986100)); + get => new CEntityIOOutputImpl(_Handle + _OnCommentaryStartedOffset.Value); } + private static readonly Lazy _OnCommentaryStoppedOffset = new(() => Schema.GetOffset(0x1EE820D5C05AD020), LazyThreadSafetyMode.None); + public CEntityIOOutput OnCommentaryStopped { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1EE820D5C05AD020)); + get => new CEntityIOOutputImpl(_Handle + _OnCommentaryStoppedOffset.Value); } + private static readonly Lazy _ActiveOffset = new(() => Schema.GetOffset(0x1EE820D58334208F), LazyThreadSafetyMode.None); + public ref bool Active { - get => ref _Handle.AsRef(Schema.GetOffset(0x1EE820D58334208F)); + get => ref _Handle.AsRef(_ActiveOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0x1EE820D567FE9DC4), LazyThreadSafetyMode.None); + public GameTime_t StartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1EE820D567FE9DC4)); + get => new GameTime_tImpl(_Handle + _StartTimeOffset.Value); } + private static readonly Lazy _StartTimeInCommentaryOffset = new(() => Schema.GetOffset(0x1EE820D50E5851F2), LazyThreadSafetyMode.None); + public ref float StartTimeInCommentary { - get => ref _Handle.AsRef(Schema.GetOffset(0x1EE820D50E5851F2)); + get => ref _Handle.AsRef(_StartTimeInCommentaryOffset.Value); } + private static readonly Lazy _TitleOffset = new(() => Schema.GetOffset(0x1EE820D53337D6B1), LazyThreadSafetyMode.None); + public string Title { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1EE820D53337D6B1)); + var ptr = _Handle.Read(_TitleOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1EE820D53337D6B1, value); + set => Schema.SetString(_Handle, _TitleOffset.Value, value); } + private static readonly Lazy _SpeakersOffset = new(() => Schema.GetOffset(0x1EE820D5874211AB), LazyThreadSafetyMode.None); + public string Speakers { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1EE820D5874211AB)); + var ptr = _Handle.Read(_SpeakersOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1EE820D5874211AB, value); + set => Schema.SetString(_Handle, _SpeakersOffset.Value, value); } + private static readonly Lazy _NodeNumberOffset = new(() => Schema.GetOffset(0x1EE820D57BCFC491), LazyThreadSafetyMode.None); + public ref int NodeNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x1EE820D57BCFC491)); + get => ref _Handle.AsRef(_NodeNumberOffset.Value); } + private static readonly Lazy _NodeNumberMaxOffset = new(() => Schema.GetOffset(0x1EE820D5BFDF2335), LazyThreadSafetyMode.None); + public ref int NodeNumberMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x1EE820D5BFDF2335)); + get => ref _Handle.AsRef(_NodeNumberMaxOffset.Value); } + private static readonly Lazy _ListenedToOffset = new(() => Schema.GetOffset(0x1EE820D545A4FC32), LazyThreadSafetyMode.None); + public ref bool ListenedTo { - get => ref _Handle.AsRef(Schema.GetOffset(0x1EE820D545A4FC32)); + get => ref _Handle.AsRef(_ListenedToOffset.Value); } public void CommentaryFileUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointConstraintImpl.cs index 55ba11dc0..f57c9399c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointEntityFinderImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointEntityFinderImpl.cs index 3ce545b08..18cfe389f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointEntityFinderImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointEntityFinderImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,34 +17,48 @@ internal partial class CPointEntityFinderImpl : CBaseEntityImpl, CPointEntityFin public CPointEntityFinderImpl(nint handle) : base(handle) { } + private static readonly Lazy _EntityOffset = new(() => Schema.GetOffset(0xC59CB1336EBADCB0), LazyThreadSafetyMode.None); + public ref CHandle Entity { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC59CB1336EBADCB0)); + get => ref _Handle.AsRef>(_EntityOffset.Value); } + private static readonly Lazy _FilterNameOffset = new(() => Schema.GetOffset(0xC59CB13309C86445), LazyThreadSafetyMode.None); + public string FilterName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC59CB13309C86445)); + var ptr = _Handle.Read(_FilterNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xC59CB13309C86445, value); + set => Schema.SetString(_Handle, _FilterNameOffset.Value, value); } + private static readonly Lazy _FilterOffset = new(() => Schema.GetOffset(0xC59CB13345D9E0B1), LazyThreadSafetyMode.None); + public ref CHandle Filter { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC59CB13345D9E0B1)); + get => ref _Handle.AsRef>(_FilterOffset.Value); } + private static readonly Lazy _RefNameOffset = new(() => Schema.GetOffset(0xC59CB1339640D172), LazyThreadSafetyMode.None); + public string RefName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC59CB1339640D172)); + var ptr = _Handle.Read(_RefNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xC59CB1339640D172, value); + set => Schema.SetString(_Handle, _RefNameOffset.Value, value); } + private static readonly Lazy _ReferenceOffset = new(() => Schema.GetOffset(0xC59CB1338100A1A4), LazyThreadSafetyMode.None); + public ref CHandle Reference { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC59CB1338100A1A4)); + get => ref _Handle.AsRef>(_ReferenceOffset.Value); } + private static readonly Lazy _FindMethodOffset = new(() => Schema.GetOffset(0xC59CB1331B37C627), LazyThreadSafetyMode.None); + public ref EntFinderMethod_t FindMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0xC59CB1331B37C627)); + get => ref _Handle.AsRef(_FindMethodOffset.Value); } + private static readonly Lazy _OnFoundEntityOffset = new(() => Schema.GetOffset(0xC59CB133119B4E6F), LazyThreadSafetyMode.None); + public CEntityIOOutput OnFoundEntity { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xC59CB133119B4E6F)); + get => new CEntityIOOutputImpl(_Handle + _OnFoundEntityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointEntityImpl.cs index a968c4796..658df632e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointGamestatsCounterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointGamestatsCounterImpl.cs index 3ad9707be..5687debb1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointGamestatsCounterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointGamestatsCounterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CPointGamestatsCounterImpl : CPointEntityImpl, CPointGame public CPointGamestatsCounterImpl(nint handle) : base(handle) { } + private static readonly Lazy _StrStatisticNameOffset = new(() => Schema.GetOffset(0xDB27C27354212AB1), LazyThreadSafetyMode.None); + public string StrStatisticName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDB27C27354212AB1)); + var ptr = _Handle.Read(_StrStatisticNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDB27C27354212AB1, value); + set => Schema.SetString(_Handle, _StrStatisticNameOffset.Value, value); } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0xDB27C2733A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB27C2733A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointGiveAmmoImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointGiveAmmoImpl.cs index 2c6de2634..6b602ce2a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointGiveAmmoImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointGiveAmmoImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPointGiveAmmoImpl : CPointEntityImpl, CPointGiveAmmo { public CPointGiveAmmoImpl(nint handle) : base(handle) { } + private static readonly Lazy _ActivatorOffset = new(() => Schema.GetOffset(0x2A4FB25F9C480B5A), LazyThreadSafetyMode.None); + public ref CHandle Activator { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2A4FB25F9C480B5A)); + get => ref _Handle.AsRef>(_ActivatorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointHurtImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointHurtImpl.cs index f3e4f672d..4527ee82b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointHurtImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointHurtImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,27 +17,39 @@ internal partial class CPointHurtImpl : CPointEntityImpl, CPointHurt { public CPointHurtImpl(nint handle) : base(handle) { } + private static readonly Lazy _DamageOffset = new(() => Schema.GetOffset(0x4FEAE151C56D69C), LazyThreadSafetyMode.None); + public ref int Damage { - get => ref _Handle.AsRef(Schema.GetOffset(0x4FEAE151C56D69C)); + get => ref _Handle.AsRef(_DamageOffset.Value); } + private static readonly Lazy _BitsDamageTypeOffset = new(() => Schema.GetOffset(0x4FEAE15EEAC35FC), LazyThreadSafetyMode.None); + public ref DamageTypes_t BitsDamageType { - get => ref _Handle.AsRef(Schema.GetOffset(0x4FEAE15EEAC35FC)); + get => ref _Handle.AsRef(_BitsDamageTypeOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x4FEAE155ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x4FEAE155ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _DelayOffset = new(() => Schema.GetOffset(0x4FEAE157D68FD6E), LazyThreadSafetyMode.None); + public ref float Delay { - get => ref _Handle.AsRef(Schema.GetOffset(0x4FEAE157D68FD6E)); + get => ref _Handle.AsRef(_DelayOffset.Value); } + private static readonly Lazy _StrTargetOffset = new(() => Schema.GetOffset(0x4FEAE15B8F64879), LazyThreadSafetyMode.None); + public string StrTarget { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4FEAE15B8F64879)); + var ptr = _Handle.Read(_StrTargetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x4FEAE15B8F64879, value); + set => Schema.SetString(_Handle, _StrTargetOffset.Value, value); } + private static readonly Lazy _ActivatorOffset = new(() => Schema.GetOffset(0x4FEAE159C480B5A), LazyThreadSafetyMode.None); + public ref CHandle Activator { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4FEAE159C480B5A)); + get => ref _Handle.AsRef>(_ActivatorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointOrientImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointOrientImpl.cs index 74b1138a8..714f9ca0b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointOrientImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointOrientImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,30 +17,44 @@ internal partial class CPointOrientImpl : CBaseEntityImpl, CPointOrient { public CPointOrientImpl(nint handle) : base(handle) { } + private static readonly Lazy _SpawnTargetNameOffset = new(() => Schema.GetOffset(0x31E4EBC561780472), LazyThreadSafetyMode.None); + public string SpawnTargetName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x31E4EBC561780472)); + var ptr = _Handle.Read(_SpawnTargetNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x31E4EBC561780472, value); + set => Schema.SetString(_Handle, _SpawnTargetNameOffset.Value, value); } + private static readonly Lazy _TargetOffset = new(() => Schema.GetOffset(0x31E4EBC5CE35901A), LazyThreadSafetyMode.None); + public ref CHandle Target { - get => ref _Handle.AsRef>(Schema.GetOffset(0x31E4EBC5CE35901A)); + get => ref _Handle.AsRef>(_TargetOffset.Value); } + private static readonly Lazy _ActiveOffset = new(() => Schema.GetOffset(0x31E4EBC58334208F), LazyThreadSafetyMode.None); + public ref bool Active { - get => ref _Handle.AsRef(Schema.GetOffset(0x31E4EBC58334208F)); + get => ref _Handle.AsRef(_ActiveOffset.Value); } + private static readonly Lazy _GoalDirectionOffset = new(() => Schema.GetOffset(0x31E4EBC5EF8D5D0F), LazyThreadSafetyMode.None); + public ref PointOrientGoalDirectionType_t GoalDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0x31E4EBC5EF8D5D0F)); + get => ref _Handle.AsRef(_GoalDirectionOffset.Value); } + private static readonly Lazy _ConstraintOffset = new(() => Schema.GetOffset(0x31E4EBC5A20016CE), LazyThreadSafetyMode.None); + public ref PointOrientConstraint_t Constraint { - get => ref _Handle.AsRef(Schema.GetOffset(0x31E4EBC5A20016CE)); + get => ref _Handle.AsRef(_ConstraintOffset.Value); } + private static readonly Lazy _MaxTurnRateOffset = new(() => Schema.GetOffset(0x31E4EBC5860DD1C6), LazyThreadSafetyMode.None); + public ref float MaxTurnRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x31E4EBC5860DD1C6)); + get => ref _Handle.AsRef(_MaxTurnRateOffset.Value); } + private static readonly Lazy _LastGameTimeOffset = new(() => Schema.GetOffset(0x31E4EBC591D10404), LazyThreadSafetyMode.None); + public GameTime_t LastGameTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x31E4EBC591D10404)); + get => new GameTime_tImpl(_Handle + _LastGameTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointPrefabImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointPrefabImpl.cs index 91d1802b7..fdb69ce9c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointPrefabImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointPrefabImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,47 @@ internal partial class CPointPrefabImpl : CServerOnlyPointEntityImpl, CPointPref public CPointPrefabImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetMapNameOffset = new(() => Schema.GetOffset(0x2C6EB7C6129742FD), LazyThreadSafetyMode.None); + public string TargetMapName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x2C6EB7C6129742FD)); + var ptr = _Handle.Read(_TargetMapNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x2C6EB7C6129742FD, value); + set => Schema.SetString(_Handle, _TargetMapNameOffset.Value, value); } + private static readonly Lazy _ForceWorldGroupIDOffset = new(() => Schema.GetOffset(0x2C6EB7C61F55F68E), LazyThreadSafetyMode.None); + public string ForceWorldGroupID { get { - var ptr = _Handle.Read(Schema.GetOffset(0x2C6EB7C61F55F68E)); + var ptr = _Handle.Read(_ForceWorldGroupIDOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x2C6EB7C61F55F68E, value); + set => Schema.SetString(_Handle, _ForceWorldGroupIDOffset.Value, value); } + private static readonly Lazy _AssociatedRelayTargetNameOffset = new(() => Schema.GetOffset(0x2C6EB7C6A6960E7A), LazyThreadSafetyMode.None); + public string AssociatedRelayTargetName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x2C6EB7C6A6960E7A)); + var ptr = _Handle.Read(_AssociatedRelayTargetNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x2C6EB7C6A6960E7A, value); + set => Schema.SetString(_Handle, _AssociatedRelayTargetNameOffset.Value, value); } + private static readonly Lazy _FixupNamesOffset = new(() => Schema.GetOffset(0x2C6EB7C6821D8FCF), LazyThreadSafetyMode.None); + public ref bool FixupNames { - get => ref _Handle.AsRef(Schema.GetOffset(0x2C6EB7C6821D8FCF)); + get => ref _Handle.AsRef(_FixupNamesOffset.Value); } + private static readonly Lazy _LoadDynamicOffset = new(() => Schema.GetOffset(0x2C6EB7C6A3437F12), LazyThreadSafetyMode.None); + public ref bool LoadDynamic { - get => ref _Handle.AsRef(Schema.GetOffset(0x2C6EB7C6A3437F12)); + get => ref _Handle.AsRef(_LoadDynamicOffset.Value); } + private static readonly Lazy _AssociatedRelayEntityOffset = new(() => Schema.GetOffset(0x2C6EB7C683435943), LazyThreadSafetyMode.None); + public ref CHandle AssociatedRelayEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2C6EB7C683435943)); + get => ref _Handle.AsRef>(_AssociatedRelayEntityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointProximitySensorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointProximitySensorImpl.cs index e7a352c3f..0958dddd1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointProximitySensorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointProximitySensorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CPointProximitySensorImpl : CPointEntityImpl, CPointProxi public CPointProximitySensorImpl(nint handle) : base(handle) { } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x769A8B133A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x769A8B133A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _TargetEntityOffset = new(() => Schema.GetOffset(0x769A8B1325D042A9), LazyThreadSafetyMode.None); + public ref CHandle TargetEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x769A8B1325D042A9)); + get => ref _Handle.AsRef>(_TargetEntityOffset.Value); } + private static readonly Lazy _DistanceOffset = new(() => Schema.GetOffset(0x769A8B13978BC0E2), LazyThreadSafetyMode.None); + public SchemaUntypedField Distance { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x769A8B13978BC0E2)); + get => new SchemaUntypedField(_Handle + _DistanceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointPulseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointPulseImpl.cs index 0746699fe..87b1efb3e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointPulseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointPulseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointPushImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointPushImpl.cs index d144bd761..3b0265fa1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointPushImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointPushImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,30 +17,44 @@ internal partial class CPointPushImpl : CPointEntityImpl, CPointPush { public CPointPushImpl(nint handle) : base(handle) { } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0x282695C06154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x282695C06154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } + private static readonly Lazy _MagnitudeOffset = new(() => Schema.GetOffset(0x282695C0ED0A1D8B), LazyThreadSafetyMode.None); + public ref float Magnitude { - get => ref _Handle.AsRef(Schema.GetOffset(0x282695C0ED0A1D8B)); + get => ref _Handle.AsRef(_MagnitudeOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x282695C05ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x282695C05ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _InnerRadiusOffset = new(() => Schema.GetOffset(0x282695C032121407), LazyThreadSafetyMode.None); + public ref float InnerRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x282695C032121407)); + get => ref _Handle.AsRef(_InnerRadiusOffset.Value); } + private static readonly Lazy _ConeOfInfluenceOffset = new(() => Schema.GetOffset(0x282695C02EA47D9C), LazyThreadSafetyMode.None); + public ref float ConeOfInfluence { - get => ref _Handle.AsRef(Schema.GetOffset(0x282695C02EA47D9C)); + get => ref _Handle.AsRef(_ConeOfInfluenceOffset.Value); } + private static readonly Lazy _FilterNameOffset = new(() => Schema.GetOffset(0x282695C042E1968C), LazyThreadSafetyMode.None); + public string FilterName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x282695C042E1968C)); + var ptr = _Handle.Read(_FilterNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x282695C042E1968C, value); + set => Schema.SetString(_Handle, _FilterNameOffset.Value, value); } + private static readonly Lazy _FilterOffset = new(() => Schema.GetOffset(0x282695C045D9E0B1), LazyThreadSafetyMode.None); + public ref CHandle Filter { - get => ref _Handle.AsRef>(Schema.GetOffset(0x282695C045D9E0B1)); + get => ref _Handle.AsRef>(_FilterOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointServerCommandImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointServerCommandImpl.cs index 43a6fc3dd..9525c173c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointServerCommandImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointServerCommandImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointTeleportAPIImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointTeleportAPIImpl.cs index 30df2e467..125bc1459 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointTeleportAPIImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointTeleportAPIImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointTeleportImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointTeleportImpl.cs index c34bdbb97..3f42078a0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointTeleportImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointTeleportImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CPointTeleportImpl : CServerOnlyPointEntityImpl, CPointTe public CPointTeleportImpl(nint handle) : base(handle) { } + private static readonly Lazy _SaveOriginOffset = new(() => Schema.GetOffset(0x9AE1393FD9277FA6), LazyThreadSafetyMode.None); + public ref Vector SaveOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0x9AE1393FD9277FA6)); + get => ref _Handle.AsRef(_SaveOriginOffset.Value); } + private static readonly Lazy _SaveAnglesOffset = new(() => Schema.GetOffset(0x9AE1393FD68F48DC), LazyThreadSafetyMode.None); + public ref QAngle SaveAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0x9AE1393FD68F48DC)); + get => ref _Handle.AsRef(_SaveAnglesOffset.Value); } + private static readonly Lazy _TeleportParentedEntitiesOffset = new(() => Schema.GetOffset(0x9AE1393F20FFB18C), LazyThreadSafetyMode.None); + public ref bool TeleportParentedEntities { - get => ref _Handle.AsRef(Schema.GetOffset(0x9AE1393F20FFB18C)); + get => ref _Handle.AsRef(_TeleportParentedEntitiesOffset.Value); } + private static readonly Lazy _TeleportUseCurrentAngleOffset = new(() => Schema.GetOffset(0x9AE1393F528952CD), LazyThreadSafetyMode.None); + public ref bool TeleportUseCurrentAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0x9AE1393F528952CD)); + get => ref _Handle.AsRef(_TeleportUseCurrentAngleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointTemplateAPIImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointTemplateAPIImpl.cs index f2dc3a9dd..c7fb6e6f2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointTemplateAPIImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointTemplateAPIImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointTemplateImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointTemplateImpl.cs index 4ce808452..4170b4ea6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointTemplateImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointTemplateImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,50 +17,72 @@ internal partial class CPointTemplateImpl : CLogicalEntityImpl, CPointTemplate { public CPointTemplateImpl(nint handle) : base(handle) { } + private static readonly Lazy _WorldNameOffset = new(() => Schema.GetOffset(0x7085DB4EB1FC5B40), LazyThreadSafetyMode.None); + public string WorldName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7085DB4EB1FC5B40)); + var ptr = _Handle.Read(_WorldNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7085DB4EB1FC5B40, value); + set => Schema.SetString(_Handle, _WorldNameOffset.Value, value); } + private static readonly Lazy _Source2EntityLumpNameOffset = new(() => Schema.GetOffset(0x7085DB4EC0B648BC), LazyThreadSafetyMode.None); + public string Source2EntityLumpName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7085DB4EC0B648BC)); + var ptr = _Handle.Read(_Source2EntityLumpNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7085DB4EC0B648BC, value); + set => Schema.SetString(_Handle, _Source2EntityLumpNameOffset.Value, value); } + private static readonly Lazy _EntityFilterNameOffset = new(() => Schema.GetOffset(0x7085DB4E3BCB3E97), LazyThreadSafetyMode.None); + public string EntityFilterName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7085DB4E3BCB3E97)); + var ptr = _Handle.Read(_EntityFilterNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7085DB4E3BCB3E97, value); + set => Schema.SetString(_Handle, _EntityFilterNameOffset.Value, value); } + private static readonly Lazy _TimeoutIntervalOffset = new(() => Schema.GetOffset(0x7085DB4E354D6687), LazyThreadSafetyMode.None); + public ref float TimeoutInterval { - get => ref _Handle.AsRef(Schema.GetOffset(0x7085DB4E354D6687)); + get => ref _Handle.AsRef(_TimeoutIntervalOffset.Value); } + private static readonly Lazy _AsynchronouslySpawnEntitiesOffset = new(() => Schema.GetOffset(0x7085DB4E5371B8CE), LazyThreadSafetyMode.None); + public ref bool AsynchronouslySpawnEntities { - get => ref _Handle.AsRef(Schema.GetOffset(0x7085DB4E5371B8CE)); + get => ref _Handle.AsRef(_AsynchronouslySpawnEntitiesOffset.Value); } + private static readonly Lazy _ClientOnlyEntityBehaviorOffset = new(() => Schema.GetOffset(0x7085DB4EF26096D5), LazyThreadSafetyMode.None); + public ref PointTemplateClientOnlyEntityBehavior_t ClientOnlyEntityBehavior { - get => ref _Handle.AsRef(Schema.GetOffset(0x7085DB4EF26096D5)); + get => ref _Handle.AsRef(_ClientOnlyEntityBehaviorOffset.Value); } + private static readonly Lazy _OwnerSpawnGroupTypeOffset = new(() => Schema.GetOffset(0x7085DB4EFAC3C132), LazyThreadSafetyMode.None); + public ref PointTemplateOwnerSpawnGroupType_t OwnerSpawnGroupType { - get => ref _Handle.AsRef(Schema.GetOffset(0x7085DB4EFAC3C132)); + get => ref _Handle.AsRef(_OwnerSpawnGroupTypeOffset.Value); } + private static readonly Lazy _CreatedSpawnGroupHandlesOffset = new(() => Schema.GetOffset(0x7085DB4EF66F13E4), LazyThreadSafetyMode.None); + public ref CUtlVector CreatedSpawnGroupHandles { - get => ref _Handle.AsRef>(Schema.GetOffset(0x7085DB4EF66F13E4)); + get => ref _Handle.AsRef>(_CreatedSpawnGroupHandlesOffset.Value); } + private static readonly Lazy _SpawnedEntityHandlesOffset = new(() => Schema.GetOffset(0x7085DB4EAFF1C191), LazyThreadSafetyMode.None); + public ref CUtlVector> SpawnedEntityHandles { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x7085DB4EAFF1C191)); + get => ref _Handle.AsRef>>(_SpawnedEntityHandlesOffset.Value); } + private static readonly Lazy _ScriptSpawnCallbackOffset = new(() => Schema.GetOffset(0x7085DB4EAD74D892), LazyThreadSafetyMode.None); + public SchemaUntypedField ScriptSpawnCallback { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x7085DB4EAD74D892)); + get => new SchemaUntypedField(_Handle + _ScriptSpawnCallbackOffset.Value); } + private static readonly Lazy _ScriptCallbackScopeOffset = new(() => Schema.GetOffset(0x7085DB4E3B18B033), LazyThreadSafetyMode.None); + public SchemaUntypedField ScriptCallbackScope { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x7085DB4E3B18B033)); + get => new SchemaUntypedField(_Handle + _ScriptCallbackScopeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointValueRemapperImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointValueRemapperImpl.cs index a1d1de460..66162a01d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointValueRemapperImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointValueRemapperImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,181 +17,269 @@ internal partial class CPointValueRemapperImpl : CBaseEntityImpl, CPointValueRem public CPointValueRemapperImpl(nint handle) : base(handle) { } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0xA8CB433D3A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433D3A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _UpdateOnClientOffset = new(() => Schema.GetOffset(0xA8CB433DAF3BE806), LazyThreadSafetyMode.None); + public ref bool UpdateOnClient { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433DAF3BE806)); + get => ref _Handle.AsRef(_UpdateOnClientOffset.Value); } + private static readonly Lazy _InputTypeOffset = new(() => Schema.GetOffset(0xA8CB433DBFD8A33F), LazyThreadSafetyMode.None); + public ref ValueRemapperInputType_t InputType { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433DBFD8A33F)); + get => ref _Handle.AsRef(_InputTypeOffset.Value); } + private static readonly Lazy _RemapLineStartNameOffset = new(() => Schema.GetOffset(0xA8CB433DD35A8A1B), LazyThreadSafetyMode.None); + public string RemapLineStartName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA8CB433DD35A8A1B)); + var ptr = _Handle.Read(_RemapLineStartNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA8CB433DD35A8A1B, value); + set => Schema.SetString(_Handle, _RemapLineStartNameOffset.Value, value); } + private static readonly Lazy _RemapLineEndNameOffset = new(() => Schema.GetOffset(0xA8CB433D104A9202), LazyThreadSafetyMode.None); + public string RemapLineEndName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA8CB433D104A9202)); + var ptr = _Handle.Read(_RemapLineEndNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA8CB433D104A9202, value); + set => Schema.SetString(_Handle, _RemapLineEndNameOffset.Value, value); } + private static readonly Lazy _RemapLineStartOffset = new(() => Schema.GetOffset(0xA8CB433D5B4CD88A), LazyThreadSafetyMode.None); + public ref CHandle RemapLineStart { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8CB433D5B4CD88A)); + get => ref _Handle.AsRef>(_RemapLineStartOffset.Value); } + private static readonly Lazy _RemapLineEndOffset = new(() => Schema.GetOffset(0xA8CB433D696F1CDF), LazyThreadSafetyMode.None); + public ref CHandle RemapLineEnd { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8CB433D696F1CDF)); + get => ref _Handle.AsRef>(_RemapLineEndOffset.Value); } + private static readonly Lazy _MaximumChangePerSecondOffset = new(() => Schema.GetOffset(0xA8CB433D31BE784E), LazyThreadSafetyMode.None); + public ref float MaximumChangePerSecond { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433D31BE784E)); + get => ref _Handle.AsRef(_MaximumChangePerSecondOffset.Value); } + private static readonly Lazy _DisengageDistanceOffset = new(() => Schema.GetOffset(0xA8CB433D4FB62599), LazyThreadSafetyMode.None); + public ref float DisengageDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433D4FB62599)); + get => ref _Handle.AsRef(_DisengageDistanceOffset.Value); } + private static readonly Lazy _EngageDistanceOffset = new(() => Schema.GetOffset(0xA8CB433D79DA89F7), LazyThreadSafetyMode.None); + public ref float EngageDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433D79DA89F7)); + get => ref _Handle.AsRef(_EngageDistanceOffset.Value); } + private static readonly Lazy _RequiresUseKeyOffset = new(() => Schema.GetOffset(0xA8CB433D9780DD63), LazyThreadSafetyMode.None); + public ref bool RequiresUseKey { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433D9780DD63)); + get => ref _Handle.AsRef(_RequiresUseKeyOffset.Value); } + private static readonly Lazy _OutputTypeOffset = new(() => Schema.GetOffset(0xA8CB433DA9E2FFB0), LazyThreadSafetyMode.None); + public ref ValueRemapperOutputType_t OutputType { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433DA9E2FFB0)); + get => ref _Handle.AsRef(_OutputTypeOffset.Value); } + private static readonly Lazy _OutputEntityNameOffset = new(() => Schema.GetOffset(0xA8CB433D0F9F4D94), LazyThreadSafetyMode.None); + public string OutputEntityName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA8CB433D0F9F4D94)); + var ptr = _Handle.Read(_OutputEntityNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA8CB433D0F9F4D94, value); + set => Schema.SetString(_Handle, _OutputEntityNameOffset.Value, value); } + private static readonly Lazy _OutputEntity2NameOffset = new(() => Schema.GetOffset(0xA8CB433D8D3AC53C), LazyThreadSafetyMode.None); + public string OutputEntity2Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA8CB433D8D3AC53C)); + var ptr = _Handle.Read(_OutputEntity2NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA8CB433D8D3AC53C, value); + set => Schema.SetString(_Handle, _OutputEntity2NameOffset.Value, value); } + private static readonly Lazy _OutputEntity3NameOffset = new(() => Schema.GetOffset(0xA8CB433D8F43AAE7), LazyThreadSafetyMode.None); + public string OutputEntity3Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA8CB433D8F43AAE7)); + var ptr = _Handle.Read(_OutputEntity3NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA8CB433D8F43AAE7, value); + set => Schema.SetString(_Handle, _OutputEntity3NameOffset.Value, value); } + private static readonly Lazy _OutputEntity4NameOffset = new(() => Schema.GetOffset(0xA8CB433DCCF46672), LazyThreadSafetyMode.None); + public string OutputEntity4Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA8CB433DCCF46672)); + var ptr = _Handle.Read(_OutputEntity4NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA8CB433DCCF46672, value); + set => Schema.SetString(_Handle, _OutputEntity4NameOffset.Value, value); } + private static readonly Lazy _OutputEntitiesOffset = new(() => Schema.GetOffset(0xA8CB433D7E483685), LazyThreadSafetyMode.None); + public ref CUtlVector> OutputEntities { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xA8CB433D7E483685)); + get => ref _Handle.AsRef>>(_OutputEntitiesOffset.Value); } + private static readonly Lazy _HapticsTypeOffset = new(() => Schema.GetOffset(0xA8CB433D50735A5F), LazyThreadSafetyMode.None); + public ref ValueRemapperHapticsType_t HapticsType { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433D50735A5F)); + get => ref _Handle.AsRef(_HapticsTypeOffset.Value); } + private static readonly Lazy _MomentumTypeOffset = new(() => Schema.GetOffset(0xA8CB433D6875FE23), LazyThreadSafetyMode.None); + public ref ValueRemapperMomentumType_t MomentumType { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433D6875FE23)); + get => ref _Handle.AsRef(_MomentumTypeOffset.Value); } + private static readonly Lazy _MomentumModifierOffset = new(() => Schema.GetOffset(0xA8CB433DA9B3FFFC), LazyThreadSafetyMode.None); + public ref float MomentumModifier { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433DA9B3FFFC)); + get => ref _Handle.AsRef(_MomentumModifierOffset.Value); } + private static readonly Lazy _SnapValueOffset = new(() => Schema.GetOffset(0xA8CB433D6A65638C), LazyThreadSafetyMode.None); + public ref float SnapValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433D6A65638C)); + get => ref _Handle.AsRef(_SnapValueOffset.Value); } + private static readonly Lazy _CurrentMomentumOffset = new(() => Schema.GetOffset(0xA8CB433DBCCCE092), LazyThreadSafetyMode.None); + public ref float CurrentMomentum { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433DBCCCE092)); + get => ref _Handle.AsRef(_CurrentMomentumOffset.Value); } + private static readonly Lazy _RatchetTypeOffset = new(() => Schema.GetOffset(0xA8CB433DCAD3FF06), LazyThreadSafetyMode.None); + public ref ValueRemapperRatchetType_t RatchetType { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433DCAD3FF06)); + get => ref _Handle.AsRef(_RatchetTypeOffset.Value); } + private static readonly Lazy _RatchetOffsetOffset = new(() => Schema.GetOffset(0xA8CB433DDA07538B), LazyThreadSafetyMode.None); + public ref float RatchetOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433DDA07538B)); + get => ref _Handle.AsRef(_RatchetOffsetOffset.Value); } + private static readonly Lazy _InputOffsetOffset = new(() => Schema.GetOffset(0xA8CB433D857DD592), LazyThreadSafetyMode.None); + public ref float InputOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433D857DD592)); + get => ref _Handle.AsRef(_InputOffsetOffset.Value); } + private static readonly Lazy _EngagedOffset = new(() => Schema.GetOffset(0xA8CB433D25A9B25E), LazyThreadSafetyMode.None); + public ref bool Engaged { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433D25A9B25E)); + get => ref _Handle.AsRef(_EngagedOffset.Value); } + private static readonly Lazy _FirstUpdateOffset = new(() => Schema.GetOffset(0xA8CB433DE5EB2E80), LazyThreadSafetyMode.None); + public ref bool FirstUpdate { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433DE5EB2E80)); + get => ref _Handle.AsRef(_FirstUpdateOffset.Value); } + private static readonly Lazy _PreviousValueOffset = new(() => Schema.GetOffset(0xA8CB433DB5220A7B), LazyThreadSafetyMode.None); + public ref float PreviousValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433DB5220A7B)); + get => ref _Handle.AsRef(_PreviousValueOffset.Value); } + private static readonly Lazy _PreviousUpdateTickTimeOffset = new(() => Schema.GetOffset(0xA8CB433DB5083C83), LazyThreadSafetyMode.None); + public GameTime_t PreviousUpdateTickTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xA8CB433DB5083C83)); + get => new GameTime_tImpl(_Handle + _PreviousUpdateTickTimeOffset.Value); } + private static readonly Lazy _PreviousTestPointOffset = new(() => Schema.GetOffset(0xA8CB433DBD7D11C2), LazyThreadSafetyMode.None); + public ref Vector PreviousTestPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433DBD7D11C2)); + get => ref _Handle.AsRef(_PreviousTestPointOffset.Value); } + private static readonly Lazy _UsingPlayerOffset = new(() => Schema.GetOffset(0xA8CB433D048D4614), LazyThreadSafetyMode.None); + public ref CHandle UsingPlayer { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8CB433D048D4614)); + get => ref _Handle.AsRef>(_UsingPlayerOffset.Value); } + private static readonly Lazy _CustomOutputValueOffset = new(() => Schema.GetOffset(0xA8CB433D952E20FE), LazyThreadSafetyMode.None); + public ref float CustomOutputValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8CB433D952E20FE)); + get => ref _Handle.AsRef(_CustomOutputValueOffset.Value); } + private static readonly Lazy _SoundEngageOffset = new(() => Schema.GetOffset(0xA8CB433DA8AF4343), LazyThreadSafetyMode.None); + public string SoundEngage { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA8CB433DA8AF4343)); + var ptr = _Handle.Read(_SoundEngageOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA8CB433DA8AF4343, value); + set => Schema.SetString(_Handle, _SoundEngageOffset.Value, value); } + private static readonly Lazy _SoundDisengageOffset = new(() => Schema.GetOffset(0xA8CB433DC289956F), LazyThreadSafetyMode.None); + public string SoundDisengage { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA8CB433DC289956F)); + var ptr = _Handle.Read(_SoundDisengageOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA8CB433DC289956F, value); + set => Schema.SetString(_Handle, _SoundDisengageOffset.Value, value); } + private static readonly Lazy _SoundReachedValueZeroOffset = new(() => Schema.GetOffset(0xA8CB433D1C304389), LazyThreadSafetyMode.None); + public string SoundReachedValueZero { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA8CB433D1C304389)); + var ptr = _Handle.Read(_SoundReachedValueZeroOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA8CB433D1C304389, value); + set => Schema.SetString(_Handle, _SoundReachedValueZeroOffset.Value, value); } + private static readonly Lazy _SoundReachedValueOneOffset = new(() => Schema.GetOffset(0xA8CB433D685D5F85), LazyThreadSafetyMode.None); + public string SoundReachedValueOne { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA8CB433D685D5F85)); + var ptr = _Handle.Read(_SoundReachedValueOneOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA8CB433D685D5F85, value); + set => Schema.SetString(_Handle, _SoundReachedValueOneOffset.Value, value); } + private static readonly Lazy _SoundMovingLoopOffset = new(() => Schema.GetOffset(0xA8CB433D990A15C8), LazyThreadSafetyMode.None); + public string SoundMovingLoop { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA8CB433D990A15C8)); + var ptr = _Handle.Read(_SoundMovingLoopOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA8CB433D990A15C8, value); + set => Schema.SetString(_Handle, _SoundMovingLoopOffset.Value, value); } + private static readonly Lazy _PositionOffset = new(() => Schema.GetOffset(0xA8CB433DFC27FA8A), LazyThreadSafetyMode.None); + public SchemaUntypedField Position { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA8CB433DFC27FA8A)); + get => new SchemaUntypedField(_Handle + _PositionOffset.Value); } + private static readonly Lazy _PositionDeltaOffset = new(() => Schema.GetOffset(0xA8CB433DB249BB1C), LazyThreadSafetyMode.None); + public SchemaUntypedField PositionDelta { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA8CB433DB249BB1C)); + get => new SchemaUntypedField(_Handle + _PositionDeltaOffset.Value); } + private static readonly Lazy _OnReachedValueZeroOffset = new(() => Schema.GetOffset(0xA8CB433D8746DCB5), LazyThreadSafetyMode.None); + public CEntityIOOutput OnReachedValueZero { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xA8CB433D8746DCB5)); + get => new CEntityIOOutputImpl(_Handle + _OnReachedValueZeroOffset.Value); } + private static readonly Lazy _OnReachedValueOneOffset = new(() => Schema.GetOffset(0xA8CB433D40852301), LazyThreadSafetyMode.None); + public CEntityIOOutput OnReachedValueOne { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xA8CB433D40852301)); + get => new CEntityIOOutputImpl(_Handle + _OnReachedValueOneOffset.Value); } + private static readonly Lazy _OnReachedValueCustomOffset = new(() => Schema.GetOffset(0xA8CB433DD209F610), LazyThreadSafetyMode.None); + public CEntityIOOutput OnReachedValueCustom { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xA8CB433DD209F610)); + get => new CEntityIOOutputImpl(_Handle + _OnReachedValueCustomOffset.Value); } + private static readonly Lazy _OnEngageOffset = new(() => Schema.GetOffset(0xA8CB433DF404507F), LazyThreadSafetyMode.None); + public CEntityIOOutput OnEngage { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xA8CB433DF404507F)); + get => new CEntityIOOutputImpl(_Handle + _OnEngageOffset.Value); } + private static readonly Lazy _OnDisengageOffset = new(() => Schema.GetOffset(0xA8CB433D22E0E24B), LazyThreadSafetyMode.None); + public CEntityIOOutput OnDisengage { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xA8CB433D22E0E24B)); + get => new CEntityIOOutputImpl(_Handle + _OnDisengageOffset.Value); } public void DisabledUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointVelocitySensorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointVelocitySensorImpl.cs index 5129fd11f..a49b948f1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointVelocitySensorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointVelocitySensorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CPointVelocitySensorImpl : CPointEntityImpl, CPointVeloci public CPointVelocitySensorImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetEntityOffset = new(() => Schema.GetOffset(0x96CA232125D042A9), LazyThreadSafetyMode.None); + public ref CHandle TargetEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x96CA232125D042A9)); + get => ref _Handle.AsRef>(_TargetEntityOffset.Value); } + private static readonly Lazy _AxisOffset = new(() => Schema.GetOffset(0x96CA23210AF9CE54), LazyThreadSafetyMode.None); + public ref Vector Axis { - get => ref _Handle.AsRef(Schema.GetOffset(0x96CA23210AF9CE54)); + get => ref _Handle.AsRef(_AxisOffset.Value); } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0x96CA23216154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x96CA23216154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } + private static readonly Lazy _PrevVelocityOffset = new(() => Schema.GetOffset(0x96CA23211F9ACE5F), LazyThreadSafetyMode.None); + public ref float PrevVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0x96CA23211F9ACE5F)); + get => ref _Handle.AsRef(_PrevVelocityOffset.Value); } + private static readonly Lazy _AvgIntervalOffset = new(() => Schema.GetOffset(0x96CA2321D6693004), LazyThreadSafetyMode.None); + public ref float AvgInterval { - get => ref _Handle.AsRef(Schema.GetOffset(0x96CA2321D6693004)); + get => ref _Handle.AsRef(_AvgIntervalOffset.Value); } + private static readonly Lazy _VelocityOffset = new(() => Schema.GetOffset(0x96CA23219B4CC8B2), LazyThreadSafetyMode.None); + public SchemaUntypedField Velocity { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x96CA23219B4CC8B2)); + get => new SchemaUntypedField(_Handle + _VelocityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointWorldTextImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointWorldTextImpl.cs index a301d35dd..bba2352a3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointWorldTextImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPointWorldTextImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,65 +17,97 @@ internal partial class CPointWorldTextImpl : CModelPointEntityImpl, CPointWorldT public CPointWorldTextImpl(nint handle) : base(handle) { } + private static readonly Lazy _MessageTextOffset = new(() => Schema.GetOffset(0x5BF88697BA6E5D73), LazyThreadSafetyMode.None); + public string MessageText { get { - var ptr = _Handle + Schema.GetOffset(0x5BF88697BA6E5D73); + var ptr = _Handle + _MessageTextOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x5BF88697BA6E5D73, value, 512); + set => Schema.SetFixedString(_Handle, _MessageTextOffset.Value, value, 512); } + private static readonly Lazy _FontNameOffset = new(() => Schema.GetOffset(0x5BF88697C241C2B3), LazyThreadSafetyMode.None); + public string FontName { get { - var ptr = _Handle + Schema.GetOffset(0x5BF88697C241C2B3); + var ptr = _Handle + _FontNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x5BF88697C241C2B3, value, 64); + set => Schema.SetFixedString(_Handle, _FontNameOffset.Value, value, 64); } + private static readonly Lazy _BackgroundMaterialNameOffset = new(() => Schema.GetOffset(0x5BF88697ECF8A7AB), LazyThreadSafetyMode.None); + public string BackgroundMaterialName { get { - var ptr = _Handle + Schema.GetOffset(0x5BF88697ECF8A7AB); + var ptr = _Handle + _BackgroundMaterialNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x5BF88697ECF8A7AB, value, 64); + set => Schema.SetFixedString(_Handle, _BackgroundMaterialNameOffset.Value, value, 64); } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0x5BF886976154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BF886976154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } + private static readonly Lazy _FullbrightOffset = new(() => Schema.GetOffset(0x5BF8869765A288E8), LazyThreadSafetyMode.None); + public ref bool Fullbright { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BF8869765A288E8)); + get => ref _Handle.AsRef(_FullbrightOffset.Value); } + private static readonly Lazy _WorldUnitsPerPxOffset = new(() => Schema.GetOffset(0x5BF886971DA8EAAB), LazyThreadSafetyMode.None); + public ref float WorldUnitsPerPx { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BF886971DA8EAAB)); + get => ref _Handle.AsRef(_WorldUnitsPerPxOffset.Value); } + private static readonly Lazy _FontSizeOffset = new(() => Schema.GetOffset(0x5BF88697D5E19F97), LazyThreadSafetyMode.None); + public ref float FontSize { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BF88697D5E19F97)); + get => ref _Handle.AsRef(_FontSizeOffset.Value); } + private static readonly Lazy _DepthOffsetOffset = new(() => Schema.GetOffset(0x5BF8869767D1DB9B), LazyThreadSafetyMode.None); + public ref float DepthOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BF8869767D1DB9B)); + get => ref _Handle.AsRef(_DepthOffsetOffset.Value); } + private static readonly Lazy _DrawBackgroundOffset = new(() => Schema.GetOffset(0x5BF886978259FA8F), LazyThreadSafetyMode.None); + public ref bool DrawBackground { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BF886978259FA8F)); + get => ref _Handle.AsRef(_DrawBackgroundOffset.Value); } + private static readonly Lazy _BackgroundBorderWidthOffset = new(() => Schema.GetOffset(0x5BF886972A7C9A4F), LazyThreadSafetyMode.None); + public ref float BackgroundBorderWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BF886972A7C9A4F)); + get => ref _Handle.AsRef(_BackgroundBorderWidthOffset.Value); } + private static readonly Lazy _BackgroundBorderHeightOffset = new(() => Schema.GetOffset(0x5BF8869794198B72), LazyThreadSafetyMode.None); + public ref float BackgroundBorderHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BF8869794198B72)); + get => ref _Handle.AsRef(_BackgroundBorderHeightOffset.Value); } + private static readonly Lazy _BackgroundWorldToUVOffset = new(() => Schema.GetOffset(0x5BF88697ECA00D93), LazyThreadSafetyMode.None); + public ref float BackgroundWorldToUV { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BF88697ECA00D93)); + get => ref _Handle.AsRef(_BackgroundWorldToUVOffset.Value); } + private static readonly Lazy _ColorOffset = new(() => Schema.GetOffset(0x5BF88697D7D017D8), LazyThreadSafetyMode.None); + public ref Color Color { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BF88697D7D017D8)); + get => ref _Handle.AsRef(_ColorOffset.Value); } + private static readonly Lazy _JustifyHorizontalOffset = new(() => Schema.GetOffset(0x5BF8869730435253), LazyThreadSafetyMode.None); + public ref PointWorldTextJustifyHorizontal_t JustifyHorizontal { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BF8869730435253)); + get => ref _Handle.AsRef(_JustifyHorizontalOffset.Value); } + private static readonly Lazy _JustifyVerticalOffset = new(() => Schema.GetOffset(0x5BF88697CA04D41D), LazyThreadSafetyMode.None); + public ref PointWorldTextJustifyVertical_t JustifyVertical { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BF88697CA04D41D)); + get => ref _Handle.AsRef(_JustifyVerticalOffset.Value); } + private static readonly Lazy _ReorientModeOffset = new(() => Schema.GetOffset(0x5BF88697222D2502), LazyThreadSafetyMode.None); + public ref PointWorldTextReorientMode_t ReorientMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BF88697222D2502)); + get => ref _Handle.AsRef(_ReorientModeOffset.Value); } public void MessageTextUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPoseHandleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPoseHandleImpl.cs index fe09147ce..a72009b09 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPoseHandleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPoseHandleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPoseHandleImpl : SchemaClass, CPoseHandle { public CPoseHandleImpl(nint handle) : base(handle) { } + private static readonly Lazy _IndexOffset = new(() => Schema.GetOffset(0x2F05C439B73DBE67), LazyThreadSafetyMode.None); + public ref ushort Index { - get => ref _Handle.AsRef(Schema.GetOffset(0x2F05C439B73DBE67)); + get => ref _Handle.AsRef(_IndexOffset.Value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x2F05C43921B39888), LazyThreadSafetyMode.None); + public ref PoseType_t Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x2F05C43921B39888)); + get => ref _Handle.AsRef(_TypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPostProcessingVolumeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPostProcessingVolumeImpl.cs index 7084ef8a8..6b8ca4f6c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPostProcessingVolumeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPostProcessingVolumeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,65 @@ internal partial class CPostProcessingVolumeImpl : CBaseTriggerImpl, CPostProces public CPostProcessingVolumeImpl(nint handle) : base(handle) { } + private static readonly Lazy _PostSettingsOffset = new(() => Schema.GetOffset(0x5DBC28C1D2EB75A4), LazyThreadSafetyMode.None); + public ref CStrongHandle PostSettings { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5DBC28C1D2EB75A4)); + get => ref _Handle.AsRef>(_PostSettingsOffset.Value); } + private static readonly Lazy _FadeDurationOffset = new(() => Schema.GetOffset(0x5DBC28C1C4E6DEE1), LazyThreadSafetyMode.None); + public ref float FadeDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x5DBC28C1C4E6DEE1)); + get => ref _Handle.AsRef(_FadeDurationOffset.Value); } + private static readonly Lazy _MinLogExposureOffset = new(() => Schema.GetOffset(0x5DBC28C17457F7D0), LazyThreadSafetyMode.None); + public ref float MinLogExposure { - get => ref _Handle.AsRef(Schema.GetOffset(0x5DBC28C17457F7D0)); + get => ref _Handle.AsRef(_MinLogExposureOffset.Value); } + private static readonly Lazy _MaxLogExposureOffset = new(() => Schema.GetOffset(0x5DBC28C1DC5D3ED6), LazyThreadSafetyMode.None); + public ref float MaxLogExposure { - get => ref _Handle.AsRef(Schema.GetOffset(0x5DBC28C1DC5D3ED6)); + get => ref _Handle.AsRef(_MaxLogExposureOffset.Value); } + private static readonly Lazy _MinExposureOffset = new(() => Schema.GetOffset(0x5DBC28C122FAB634), LazyThreadSafetyMode.None); + public ref float MinExposure { - get => ref _Handle.AsRef(Schema.GetOffset(0x5DBC28C122FAB634)); + get => ref _Handle.AsRef(_MinExposureOffset.Value); } + private static readonly Lazy _MaxExposureOffset = new(() => Schema.GetOffset(0x5DBC28C15D4951D6), LazyThreadSafetyMode.None); + public ref float MaxExposure { - get => ref _Handle.AsRef(Schema.GetOffset(0x5DBC28C15D4951D6)); + get => ref _Handle.AsRef(_MaxExposureOffset.Value); } + private static readonly Lazy _ExposureCompensationOffset = new(() => Schema.GetOffset(0x5DBC28C16EC15498), LazyThreadSafetyMode.None); + public ref float ExposureCompensation { - get => ref _Handle.AsRef(Schema.GetOffset(0x5DBC28C16EC15498)); + get => ref _Handle.AsRef(_ExposureCompensationOffset.Value); } + private static readonly Lazy _ExposureFadeSpeedUpOffset = new(() => Schema.GetOffset(0x5DBC28C19789BBB6), LazyThreadSafetyMode.None); + public ref float ExposureFadeSpeedUp { - get => ref _Handle.AsRef(Schema.GetOffset(0x5DBC28C19789BBB6)); + get => ref _Handle.AsRef(_ExposureFadeSpeedUpOffset.Value); } + private static readonly Lazy _ExposureFadeSpeedDownOffset = new(() => Schema.GetOffset(0x5DBC28C154685D1F), LazyThreadSafetyMode.None); + public ref float ExposureFadeSpeedDown { - get => ref _Handle.AsRef(Schema.GetOffset(0x5DBC28C154685D1F)); + get => ref _Handle.AsRef(_ExposureFadeSpeedDownOffset.Value); } + private static readonly Lazy _TonemapEVSmoothingRangeOffset = new(() => Schema.GetOffset(0x5DBC28C19C2546CB), LazyThreadSafetyMode.None); + public ref float TonemapEVSmoothingRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x5DBC28C19C2546CB)); + get => ref _Handle.AsRef(_TonemapEVSmoothingRangeOffset.Value); } + private static readonly Lazy _MasterOffset = new(() => Schema.GetOffset(0x5DBC28C15AFF9193), LazyThreadSafetyMode.None); + public ref bool Master { - get => ref _Handle.AsRef(Schema.GetOffset(0x5DBC28C15AFF9193)); + get => ref _Handle.AsRef(_MasterOffset.Value); } + private static readonly Lazy _ExposureControlOffset = new(() => Schema.GetOffset(0x5DBC28C12C195925), LazyThreadSafetyMode.None); + public ref bool ExposureControl { - get => ref _Handle.AsRef(Schema.GetOffset(0x5DBC28C12C195925)); + get => ref _Handle.AsRef(_ExposureControlOffset.Value); } public void PostSettingsUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPrecipitationBlockerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPrecipitationBlockerImpl.cs index 995d325ad..d5e2b4b97 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPrecipitationBlockerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPrecipitationBlockerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPrecipitationImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPrecipitationImpl.cs index f25fc0cb7..08be0a062 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPrecipitationImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPrecipitationImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPrecipitationVDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPrecipitationVDataImpl.cs index e61132123..a09a251ab 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPrecipitationVDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPrecipitationVDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,30 +17,44 @@ internal partial class CPrecipitationVDataImpl : CEntitySubclassVDataBaseImpl, C public CPrecipitationVDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParticlePrecipitationEffectOffset = new(() => Schema.GetOffset(0x4F75C25D9E8770E0), LazyThreadSafetyMode.None); + public SchemaUntypedField ParticlePrecipitationEffect { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x4F75C25D9E8770E0)); + get => new SchemaUntypedField(_Handle + _ParticlePrecipitationEffectOffset.Value); } + private static readonly Lazy _InnerDistanceOffset = new(() => Schema.GetOffset(0x4F75C25D29845276), LazyThreadSafetyMode.None); + public ref float InnerDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F75C25D29845276)); + get => ref _Handle.AsRef(_InnerDistanceOffset.Value); } + private static readonly Lazy _AttachTypeOffset = new(() => Schema.GetOffset(0x4F75C25DC8613038), LazyThreadSafetyMode.None); + public ref ParticleAttachment_t AttachType { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F75C25DC8613038)); + get => ref _Handle.AsRef(_AttachTypeOffset.Value); } + private static readonly Lazy _BatchSameVolumeTypeOffset = new(() => Schema.GetOffset(0x4F75C25DDE7F21F7), LazyThreadSafetyMode.None); + public ref bool BatchSameVolumeType { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F75C25DDE7F21F7)); + get => ref _Handle.AsRef(_BatchSameVolumeTypeOffset.Value); } + private static readonly Lazy _RTEnvCPOffset = new(() => Schema.GetOffset(0x4F75C25D01881731), LazyThreadSafetyMode.None); + public ref int RTEnvCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F75C25D01881731)); + get => ref _Handle.AsRef(_RTEnvCPOffset.Value); } + private static readonly Lazy _RTEnvCPComponentOffset = new(() => Schema.GetOffset(0x4F75C25D968B054C), LazyThreadSafetyMode.None); + public ref int RTEnvCPComponent { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F75C25D968B054C)); + get => ref _Handle.AsRef(_RTEnvCPComponentOffset.Value); } + private static readonly Lazy _ModifierOffset = new(() => Schema.GetOffset(0x4F75C25D2742E611), LazyThreadSafetyMode.None); + public string Modifier { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4F75C25D2742E611)); + var ptr = _Handle.Read(_ModifierOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x4F75C25D2742E611, value); + set => Schema.SetString(_Handle, _ModifierOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CProductQuantizerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CProductQuantizerImpl.cs index facfd3c38..59ba02b44 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CProductQuantizerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CProductQuantizerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CProductQuantizerImpl : SchemaClass, CProductQuantizer { public CProductQuantizerImpl(nint handle) : base(handle) { } + private static readonly Lazy _SubQuantizersOffset = new(() => Schema.GetOffset(0x5B1A8128593CF0B5), LazyThreadSafetyMode.None); + public ref CUtlVector SubQuantizers { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5B1A8128593CF0B5)); + get => ref _Handle.AsRef>(_SubQuantizersOffset.Value); } + private static readonly Lazy _DimensionsOffset = new(() => Schema.GetOffset(0x5B1A81282D8795AC), LazyThreadSafetyMode.None); + public ref int Dimensions { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B1A81282D8795AC)); + get => ref _Handle.AsRef(_DimensionsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPropDataComponentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPropDataComponentImpl.cs index 3552f6f74..49be25d64 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPropDataComponentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPropDataComponentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,43 +17,63 @@ internal partial class CPropDataComponentImpl : CEntityComponentImpl, CPropDataC public CPropDataComponentImpl(nint handle) : base(handle) { } + private static readonly Lazy _DmgModBulletOffset = new(() => Schema.GetOffset(0x1CFE413EBB77495F), LazyThreadSafetyMode.None); + public ref float DmgModBullet { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE413EBB77495F)); + get => ref _Handle.AsRef(_DmgModBulletOffset.Value); } + private static readonly Lazy _DmgModClubOffset = new(() => Schema.GetOffset(0x1CFE413E1C404FB7), LazyThreadSafetyMode.None); + public ref float DmgModClub { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE413E1C404FB7)); + get => ref _Handle.AsRef(_DmgModClubOffset.Value); } + private static readonly Lazy _DmgModExplosiveOffset = new(() => Schema.GetOffset(0x1CFE413E0E90F97E), LazyThreadSafetyMode.None); + public ref float DmgModExplosive { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE413E0E90F97E)); + get => ref _Handle.AsRef(_DmgModExplosiveOffset.Value); } + private static readonly Lazy _DmgModFireOffset = new(() => Schema.GetOffset(0x1CFE413E7E842D23), LazyThreadSafetyMode.None); + public ref float DmgModFire { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE413E7E842D23)); + get => ref _Handle.AsRef(_DmgModFireOffset.Value); } + private static readonly Lazy _PhysicsDamageTableNameOffset = new(() => Schema.GetOffset(0x1CFE413E7A45F0E2), LazyThreadSafetyMode.None); + public string PhysicsDamageTableName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1CFE413E7A45F0E2)); + var ptr = _Handle.Read(_PhysicsDamageTableNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1CFE413E7A45F0E2, value); + set => Schema.SetString(_Handle, _PhysicsDamageTableNameOffset.Value, value); } + private static readonly Lazy _BasePropDataOffset = new(() => Schema.GetOffset(0x1CFE413EBF60E2A1), LazyThreadSafetyMode.None); + public string BasePropData { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1CFE413EBF60E2A1)); + var ptr = _Handle.Read(_BasePropDataOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1CFE413EBF60E2A1, value); + set => Schema.SetString(_Handle, _BasePropDataOffset.Value, value); } + private static readonly Lazy _InteractionsOffset = new(() => Schema.GetOffset(0x1CFE413EE8050E44), LazyThreadSafetyMode.None); + public ref int Interactions { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE413EE8050E44)); + get => ref _Handle.AsRef(_InteractionsOffset.Value); } + private static readonly Lazy _SpawnMotionDisabledOffset = new(() => Schema.GetOffset(0x1CFE413E87EB2E82), LazyThreadSafetyMode.None); + public ref bool SpawnMotionDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE413E87EB2E82)); + get => ref _Handle.AsRef(_SpawnMotionDisabledOffset.Value); } + private static readonly Lazy _DisableTakePhysicsDamageSpawnFlagOffset = new(() => Schema.GetOffset(0x1CFE413E5D3DCAE1), LazyThreadSafetyMode.None); + public ref int DisableTakePhysicsDamageSpawnFlag { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE413E5D3DCAE1)); + get => ref _Handle.AsRef(_DisableTakePhysicsDamageSpawnFlagOffset.Value); } + private static readonly Lazy _MotionDisabledSpawnFlagOffset = new(() => Schema.GetOffset(0x1CFE413ECBDEA450), LazyThreadSafetyMode.None); + public ref int MotionDisabledSpawnFlag { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CFE413ECBDEA450)); + get => ref _Handle.AsRef(_MotionDisabledSpawnFlagOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPropDoorRotatingBreakableImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPropDoorRotatingBreakableImpl.cs index 13fb097c5..a4add1b2b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPropDoorRotatingBreakableImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPropDoorRotatingBreakableImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CPropDoorRotatingBreakableImpl : CPropDoorRotatingImpl, C public CPropDoorRotatingBreakableImpl(nint handle) : base(handle) { } + private static readonly Lazy _BreakableOffset = new(() => Schema.GetOffset(0xCB925ACA549B5310), LazyThreadSafetyMode.None); + public ref bool Breakable { - get => ref _Handle.AsRef(Schema.GetOffset(0xCB925ACA549B5310)); + get => ref _Handle.AsRef(_BreakableOffset.Value); } + private static readonly Lazy _IsAbleToCloseAreaPortalsOffset = new(() => Schema.GetOffset(0xCB925ACAAC381C84), LazyThreadSafetyMode.None); + public ref bool IsAbleToCloseAreaPortals { - get => ref _Handle.AsRef(Schema.GetOffset(0xCB925ACAAC381C84)); + get => ref _Handle.AsRef(_IsAbleToCloseAreaPortalsOffset.Value); } + private static readonly Lazy _CurrentDamageStateOffset = new(() => Schema.GetOffset(0xCB925ACA29591458), LazyThreadSafetyMode.None); + public ref int CurrentDamageState { - get => ref _Handle.AsRef(Schema.GetOffset(0xCB925ACA29591458)); + get => ref _Handle.AsRef(_CurrentDamageStateOffset.Value); } + private static readonly Lazy _DamageStatesOffset = new(() => Schema.GetOffset(0xCB925ACA4FD16F52), LazyThreadSafetyMode.None); + public ref CUtlVector DamageStates { - get => ref _Handle.AsRef>(Schema.GetOffset(0xCB925ACA4FD16F52)); + get => ref _Handle.AsRef>(_DamageStatesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPropDoorRotatingImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPropDoorRotatingImpl.cs index a06d2bbde..321b7949d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPropDoorRotatingImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPropDoorRotatingImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,59 +17,95 @@ internal partial class CPropDoorRotatingImpl : CBasePropDoorImpl, CPropDoorRotat public CPropDoorRotatingImpl(nint handle) : base(handle) { } + private static readonly Lazy _AxisOffset = new(() => Schema.GetOffset(0x289EB6130AF9CE54), LazyThreadSafetyMode.None); + public ref Vector Axis { - get => ref _Handle.AsRef(Schema.GetOffset(0x289EB6130AF9CE54)); + get => ref _Handle.AsRef(_AxisOffset.Value); } + private static readonly Lazy _DistanceOffset = new(() => Schema.GetOffset(0x289EB61300DC4A68), LazyThreadSafetyMode.None); + public ref float Distance { - get => ref _Handle.AsRef(Schema.GetOffset(0x289EB61300DC4A68)); + get => ref _Handle.AsRef(_DistanceOffset.Value); } + private static readonly Lazy _SpawnPositionOffset = new(() => Schema.GetOffset(0x289EB613F5AD878C), LazyThreadSafetyMode.None); + public ref PropDoorRotatingSpawnPos_t SpawnPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x289EB613F5AD878C)); + get => ref _Handle.AsRef(_SpawnPositionOffset.Value); } + private static readonly Lazy _OpenDirectionOffset = new(() => Schema.GetOffset(0x289EB6134BC74739), LazyThreadSafetyMode.None); + public ref PropDoorRotatingOpenDirection_e OpenDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0x289EB6134BC74739)); + get => ref _Handle.AsRef(_OpenDirectionOffset.Value); } + private static readonly Lazy _CurrentOpenDirectionOffset = new(() => Schema.GetOffset(0x289EB6132BAD86EE), LazyThreadSafetyMode.None); + public ref PropDoorRotatingOpenDirection_e CurrentOpenDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0x289EB6132BAD86EE)); + get => ref _Handle.AsRef(_CurrentOpenDirectionOffset.Value); } + private static readonly Lazy _DefaultCheckDirectionOffset = new(() => Schema.GetOffset(0x289EB6134191E768), LazyThreadSafetyMode.None); + public ref doorCheck_e DefaultCheckDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0x289EB6134191E768)); + get => ref _Handle.AsRef(_DefaultCheckDirectionOffset.Value); } + private static readonly Lazy _AjarAngleOffset = new(() => Schema.GetOffset(0x289EB613CD456612), LazyThreadSafetyMode.None); + public ref float AjarAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0x289EB613CD456612)); + get => ref _Handle.AsRef(_AjarAngleOffset.Value); } + private static readonly Lazy _RotationAjarDeprecatedOffset = new(() => Schema.GetOffset(0x289EB6136AD5E768), LazyThreadSafetyMode.None); + public ref QAngle RotationAjarDeprecated { - get => ref _Handle.AsRef(Schema.GetOffset(0x289EB6136AD5E768)); + get => ref _Handle.AsRef(_RotationAjarDeprecatedOffset.Value); } + private static readonly Lazy _RotationClosedOffset = new(() => Schema.GetOffset(0x289EB6132A6472ED), LazyThreadSafetyMode.None); + public ref QAngle RotationClosed { - get => ref _Handle.AsRef(Schema.GetOffset(0x289EB6132A6472ED)); + get => ref _Handle.AsRef(_RotationClosedOffset.Value); } + private static readonly Lazy _RotationOpenForwardOffset = new(() => Schema.GetOffset(0x289EB6138F861A3E), LazyThreadSafetyMode.None); + public ref QAngle RotationOpenForward { - get => ref _Handle.AsRef(Schema.GetOffset(0x289EB6138F861A3E)); + get => ref _Handle.AsRef(_RotationOpenForwardOffset.Value); } + private static readonly Lazy _RotationOpenBackOffset = new(() => Schema.GetOffset(0x289EB61329E9297E), LazyThreadSafetyMode.None); + public ref QAngle RotationOpenBack { - get => ref _Handle.AsRef(Schema.GetOffset(0x289EB61329E9297E)); + get => ref _Handle.AsRef(_RotationOpenBackOffset.Value); } + private static readonly Lazy _GoalOffset = new(() => Schema.GetOffset(0x289EB6134D6AB03C), LazyThreadSafetyMode.None); + public ref QAngle Goal { - get => ref _Handle.AsRef(Schema.GetOffset(0x289EB6134D6AB03C)); + get => ref _Handle.AsRef(_GoalOffset.Value); } + private static readonly Lazy _ForwardBoundsMinOffset = new(() => Schema.GetOffset(0x289EB6138A35433D), LazyThreadSafetyMode.None); + public ref Vector ForwardBoundsMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x289EB6138A35433D)); + get => ref _Handle.AsRef(_ForwardBoundsMinOffset.Value); } + private static readonly Lazy _ForwardBoundsMaxOffset = new(() => Schema.GetOffset(0x289EB61394203843), LazyThreadSafetyMode.None); + public ref Vector ForwardBoundsMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x289EB61394203843)); + get => ref _Handle.AsRef(_ForwardBoundsMaxOffset.Value); } + private static readonly Lazy _BackBoundsMinOffset = new(() => Schema.GetOffset(0x289EB6136FC138A5), LazyThreadSafetyMode.None); + public ref Vector BackBoundsMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x289EB6136FC138A5)); + get => ref _Handle.AsRef(_BackBoundsMinOffset.Value); } + private static readonly Lazy _BackBoundsMaxOffset = new(() => Schema.GetOffset(0x289EB61379D4D01B), LazyThreadSafetyMode.None); + public ref Vector BackBoundsMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x289EB61379D4D01B)); + get => ref _Handle.AsRef(_BackBoundsMaxOffset.Value); } + private static readonly Lazy _AjarDoorShouldntAlwaysOpenOffset = new(() => Schema.GetOffset(0x289EB6138B1717E1), LazyThreadSafetyMode.None); + public ref bool AjarDoorShouldntAlwaysOpen { - get => ref _Handle.AsRef(Schema.GetOffset(0x289EB6138B1717E1)); + get => ref _Handle.AsRef(_AjarDoorShouldntAlwaysOpenOffset.Value); } + private static readonly Lazy _EntityBlockerOffset = new(() => Schema.GetOffset(0x289EB6139318939A), LazyThreadSafetyMode.None); + public ref CHandle EntityBlocker { - get => ref _Handle.AsRef>(Schema.GetOffset(0x289EB6139318939A)); + get => ref _Handle.AsRef>(_EntityBlockerOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseAnimFuncsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseAnimFuncsImpl.cs index adab19ac5..ca0861055 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseAnimFuncsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseAnimFuncsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseArraylibImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseArraylibImpl.cs index 8e64f01c8..b573b4804 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseArraylibImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseArraylibImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseFlowImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseFlowImpl.cs index 46293b368..dd7d7836a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseFlowImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseFlowImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseImpl.cs index 5104ab026..6bc74f69c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_BaseImpl : SchemaClass, CPulseCell_Base { public CPulseCell_BaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _EditorNodeIDOffset = new(() => Schema.GetOffset(0xA1B689158D964CBD), LazyThreadSafetyMode.None); + public PulseDocNodeID_t EditorNodeID { - get => new PulseDocNodeID_tImpl(_Handle + Schema.GetOffset(0xA1B689158D964CBD)); + get => new PulseDocNodeID_tImpl(_Handle + _EditorNodeIDOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseLerpImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseLerpImpl.cs index e6b4694da..10d42abbf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseLerpImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseLerpImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_BaseLerpImpl : CPulseCell_BaseYieldingInflowIm public CPulseCell_BaseLerpImpl(nint handle) : base(handle) { } + private static readonly Lazy _WakeResumeOffset = new(() => Schema.GetOffset(0x8AF2C31831F86DC2), LazyThreadSafetyMode.None); + public CPulse_ResumePoint WakeResume { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0x8AF2C31831F86DC2)); + get => new CPulse_ResumePointImpl(_Handle + _WakeResumeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseLerp__CursorState_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseLerp__CursorState_tImpl.cs index fee000b07..a031c30a9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseLerp__CursorState_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseLerp__CursorState_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPulseCell_BaseLerp__CursorState_tImpl : SchemaClass, CPu public CPulseCell_BaseLerp__CursorState_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0x1FAAE76897B5FA8E), LazyThreadSafetyMode.None); + public GameTime_t StartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1FAAE76897B5FA8E)); + get => new GameTime_tImpl(_Handle + _StartTimeOffset.Value); } + private static readonly Lazy _EndTimeOffset = new(() => Schema.GetOffset(0x1FAAE7687AA8F56B), LazyThreadSafetyMode.None); + public GameTime_t EndTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1FAAE7687AA8F56B)); + get => new GameTime_tImpl(_Handle + _EndTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseRequirementImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseRequirementImpl.cs index 5e139fa56..c6b97c6a8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseRequirementImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseRequirementImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseStateImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseStateImpl.cs index f5ee9a5c6..8d7ef9be1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseStateImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseStateImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseValueImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseValueImpl.cs index f3d32e3a1..6e7f6bd93 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseValueImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseValueImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseYieldingInflowImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseYieldingInflowImpl.cs index c8e56bd15..1b2ec526e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseYieldingInflowImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BaseYieldingInflowImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BooleanSwitchStateImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BooleanSwitchStateImpl.cs index a5b0d7333..33f608b5c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BooleanSwitchStateImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_BooleanSwitchStateImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CPulseCell_BooleanSwitchStateImpl : CPulseCell_BaseStateI public CPulseCell_BooleanSwitchStateImpl(nint handle) : base(handle) { } + private static readonly Lazy _ConditionOffset = new(() => Schema.GetOffset(0xB0380EFD5F2A883E), LazyThreadSafetyMode.None); + public PulseObservableBoolExpression_t Condition { - get => new PulseObservableBoolExpression_tImpl(_Handle + Schema.GetOffset(0xB0380EFD5F2A883E)); + get => new PulseObservableBoolExpression_tImpl(_Handle + _ConditionOffset.Value); } + private static readonly Lazy _SubGraphOffset = new(() => Schema.GetOffset(0xB0380EFD979BD817), LazyThreadSafetyMode.None); + public CPulse_OutflowConnection SubGraph { - get => new CPulse_OutflowConnectionImpl(_Handle + Schema.GetOffset(0xB0380EFD979BD817)); + get => new CPulse_OutflowConnectionImpl(_Handle + _SubGraphOffset.Value); } + private static readonly Lazy _WhenTrueOffset = new(() => Schema.GetOffset(0xB0380EFDB329ED61), LazyThreadSafetyMode.None); + public CPulse_OutflowConnection WhenTrue { - get => new CPulse_OutflowConnectionImpl(_Handle + Schema.GetOffset(0xB0380EFDB329ED61)); + get => new CPulse_OutflowConnectionImpl(_Handle + _WhenTrueOffset.Value); } + private static readonly Lazy _WhenFalseOffset = new(() => Schema.GetOffset(0xB0380EFD4DD1A01C), LazyThreadSafetyMode.None); + public CPulse_OutflowConnection WhenFalse { - get => new CPulse_OutflowConnectionImpl(_Handle + Schema.GetOffset(0xB0380EFD4DD1A01C)); + get => new CPulse_OutflowConnectionImpl(_Handle + _WhenFalseOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_CursorQueueImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_CursorQueueImpl.cs index 77170f61d..dce67191b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_CursorQueueImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_CursorQueueImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_CursorQueueImpl : CPulseCell_WaitForCursorsWit public CPulseCell_CursorQueueImpl(nint handle) : base(handle) { } + private static readonly Lazy _CursorsAllowedToRunParallelOffset = new(() => Schema.GetOffset(0xDAB7EC55AC04AAF9), LazyThreadSafetyMode.None); + public ref int CursorsAllowedToRunParallel { - get => ref _Handle.AsRef(Schema.GetOffset(0xDAB7EC55AC04AAF9)); + get => ref _Handle.AsRef(_CursorsAllowedToRunParallelOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_ExampleCriteriaImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_ExampleCriteriaImpl.cs index 7ecb26383..3e7c672f5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_ExampleCriteriaImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_ExampleCriteriaImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_ExampleCriteria__Criteria_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_ExampleCriteria__Criteria_tImpl.cs index cf050d0c3..4dea8a23a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_ExampleCriteria__Criteria_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_ExampleCriteria__Criteria_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CPulseCell_ExampleCriteria__Criteria_tImpl : SchemaClass, public CPulseCell_ExampleCriteria__Criteria_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FloatValue1Offset = new(() => Schema.GetOffset(0x9C86EC19138B644B), LazyThreadSafetyMode.None); + public ref float FloatValue1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C86EC19138B644B)); + get => ref _Handle.AsRef(_FloatValue1Offset.Value); } + private static readonly Lazy _FloatValue2Offset = new(() => Schema.GetOffset(0x9C86EC19148B65DE), LazyThreadSafetyMode.None); + public ref float FloatValue2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C86EC19148B65DE)); + get => ref _Handle.AsRef(_FloatValue2Offset.Value); } + private static readonly Lazy _MyBoolOffset = new(() => Schema.GetOffset(0x9C86EC19BAFBA8C7), LazyThreadSafetyMode.None); + public ref bool MyBool { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C86EC19BAFBA8C7)); + get => ref _Handle.AsRef(_MyBoolOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_ExampleSelectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_ExampleSelectorImpl.cs index 932e84f68..d6f5845ee 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_ExampleSelectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_ExampleSelectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_ExampleSelectorImpl : CPulseCell_BaseFlowImpl, public CPulseCell_ExampleSelectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _OutflowListOffset = new(() => Schema.GetOffset(0x97417F8B1461E743), LazyThreadSafetyMode.None); + public PulseSelectorOutflowList_t OutflowList { - get => new PulseSelectorOutflowList_tImpl(_Handle + Schema.GetOffset(0x97417F8B1461E743)); + get => new PulseSelectorOutflowList_tImpl(_Handle + _OutflowListOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_FireCursorsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_FireCursorsImpl.cs index 2fd7a5489..d2f942bb0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_FireCursorsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_FireCursorsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CPulseCell_FireCursorsImpl : CPulseCell_BaseYieldingInflo public CPulseCell_FireCursorsImpl(nint handle) : base(handle) { } + private static readonly Lazy _OutflowsOffset = new(() => Schema.GetOffset(0x9BFA034F8F0AFDF8), LazyThreadSafetyMode.None); + public ref CUtlVector Outflows { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9BFA034F8F0AFDF8)); + get => ref _Handle.AsRef>(_OutflowsOffset.Value); } + private static readonly Lazy _WaitForChildOutflowsOffset = new(() => Schema.GetOffset(0x9BFA034F3F8E29C6), LazyThreadSafetyMode.None); + public ref bool WaitForChildOutflows { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BFA034F3F8E29C6)); + get => ref _Handle.AsRef(_WaitForChildOutflowsOffset.Value); } + private static readonly Lazy _OnFinishedOffset = new(() => Schema.GetOffset(0x9BFA034F8D903E5E), LazyThreadSafetyMode.None); + public CPulse_ResumePoint OnFinished { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0x9BFA034F8D903E5E)); + get => new CPulse_ResumePointImpl(_Handle + _OnFinishedOffset.Value); } + private static readonly Lazy _OnCanceledOffset = new(() => Schema.GetOffset(0x9BFA034FF02162DB), LazyThreadSafetyMode.None); + public CPulse_ResumePoint OnCanceled { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0x9BFA034FF02162DB)); + get => new CPulse_ResumePointImpl(_Handle + _OnCanceledOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_BaseEntrypointImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_BaseEntrypointImpl.cs index 9499eae30..f14b2180f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_BaseEntrypointImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_BaseEntrypointImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPulseCell_Inflow_BaseEntrypointImpl : CPulseCell_BaseFlo public CPulseCell_Inflow_BaseEntrypointImpl(nint handle) : base(handle) { } + private static readonly Lazy _EntryChunkOffset = new(() => Schema.GetOffset(0x1747DEDF279F0A60), LazyThreadSafetyMode.None); + public PulseRuntimeChunkIndex_t EntryChunk { - get => new PulseRuntimeChunkIndex_tImpl(_Handle + Schema.GetOffset(0x1747DEDF279F0A60)); + get => new PulseRuntimeChunkIndex_tImpl(_Handle + _EntryChunkOffset.Value); } + private static readonly Lazy _RegisterMapOffset = new(() => Schema.GetOffset(0x1747DEDF7BD4CE96), LazyThreadSafetyMode.None); + public PulseRegisterMap_t RegisterMap { - get => new PulseRegisterMap_tImpl(_Handle + Schema.GetOffset(0x1747DEDF7BD4CE96)); + get => new PulseRegisterMap_tImpl(_Handle + _RegisterMapOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_EntOutputHandlerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_EntOutputHandlerImpl.cs index 9ae52dfc5..d24ece2e4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_EntOutputHandlerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_EntOutputHandlerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CPulseCell_Inflow_EntOutputHandlerImpl : CPulseCell_Inflo public CPulseCell_Inflow_EntOutputHandlerImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceEntityOffset = new(() => Schema.GetOffset(0x8C9310C4AD2DB063), LazyThreadSafetyMode.None); + public SchemaUntypedField SourceEntity { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8C9310C4AD2DB063)); + get => new SchemaUntypedField(_Handle + _SourceEntityOffset.Value); } + private static readonly Lazy _SourceOutputOffset = new(() => Schema.GetOffset(0x8C9310C42D46D7F5), LazyThreadSafetyMode.None); + public SchemaUntypedField SourceOutput { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8C9310C42D46D7F5)); + get => new SchemaUntypedField(_Handle + _SourceOutputOffset.Value); } + private static readonly Lazy _ExpectedParamTypeOffset = new(() => Schema.GetOffset(0x8C9310C41C1CB8A6), LazyThreadSafetyMode.None); + public SchemaUntypedField ExpectedParamType { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8C9310C41C1CB8A6)); + get => new SchemaUntypedField(_Handle + _ExpectedParamTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_EventHandlerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_EventHandlerImpl.cs index 2b964316e..226be3fa8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_EventHandlerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_EventHandlerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_Inflow_EventHandlerImpl : CPulseCell_Inflow_Ba public CPulseCell_Inflow_EventHandlerImpl(nint handle) : base(handle) { } + private static readonly Lazy _EventNameOffset = new(() => Schema.GetOffset(0x9BAF9AD81DFEB13C), LazyThreadSafetyMode.None); + public SchemaUntypedField EventName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x9BAF9AD81DFEB13C)); + get => new SchemaUntypedField(_Handle + _EventNameOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_GraphHookImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_GraphHookImpl.cs index c56368525..a56cdcf36 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_GraphHookImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_GraphHookImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_Inflow_GraphHookImpl : CPulseCell_Inflow_BaseE public CPulseCell_Inflow_GraphHookImpl(nint handle) : base(handle) { } + private static readonly Lazy _HookNameOffset = new(() => Schema.GetOffset(0xEA4B2E6FA19F4D11), LazyThreadSafetyMode.None); + public SchemaUntypedField HookName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xEA4B2E6FA19F4D11)); + get => new SchemaUntypedField(_Handle + _HookNameOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_MethodImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_MethodImpl.cs index 81f0d1f79..60d830862 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_MethodImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_MethodImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class CPulseCell_Inflow_MethodImpl : CPulseCell_Inflow_BaseEntr public CPulseCell_Inflow_MethodImpl(nint handle) : base(handle) { } + private static readonly Lazy _MethodNameOffset = new(() => Schema.GetOffset(0xFB5926557D863B13), LazyThreadSafetyMode.None); + public SchemaUntypedField MethodName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xFB5926557D863B13)); + get => new SchemaUntypedField(_Handle + _MethodNameOffset.Value); } + private static readonly Lazy _DescriptionOffset = new(() => Schema.GetOffset(0xFB592655678744E9), LazyThreadSafetyMode.None); + public string Description { get { - var ptr = _Handle.Read(Schema.GetOffset(0xFB592655678744E9)); + var ptr = _Handle.Read(_DescriptionOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xFB592655678744E9, value); + set => Schema.SetString(_Handle, _DescriptionOffset.Value, value); } + private static readonly Lazy _IsPublicOffset = new(() => Schema.GetOffset(0xFB592655BAE30B50), LazyThreadSafetyMode.None); + public ref bool IsPublic { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB592655BAE30B50)); + get => ref _Handle.AsRef(_IsPublicOffset.Value); } + private static readonly Lazy _ReturnTypeOffset = new(() => Schema.GetOffset(0xFB59265566333D67), LazyThreadSafetyMode.None); + public SchemaUntypedField ReturnType { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xFB59265566333D67)); + get => new SchemaUntypedField(_Handle + _ReturnTypeOffset.Value); } + private static readonly Lazy _ArgsOffset = new(() => Schema.GetOffset(0xFB592655DAB98BBC), LazyThreadSafetyMode.None); + public ref CUtlLeanVector Args { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFB592655DAB98BBC)); + get => ref _Handle.AsRef>(_ArgsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_ObservableVariableListenerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_ObservableVariableListenerImpl.cs index e8c35ddbb..f9911c64b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_ObservableVariableListenerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_ObservableVariableListenerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPulseCell_Inflow_ObservableVariableListenerImpl : CPulse public CPulseCell_Inflow_ObservableVariableListenerImpl(nint handle) : base(handle) { } + private static readonly Lazy _BlackboardReferenceOffset = new(() => Schema.GetOffset(0x6186DA17C5B268D), LazyThreadSafetyMode.None); + public PulseRuntimeBlackboardReferenceIndex_t BlackboardReference { - get => new PulseRuntimeBlackboardReferenceIndex_tImpl(_Handle + Schema.GetOffset(0x6186DA17C5B268D)); + get => new PulseRuntimeBlackboardReferenceIndex_tImpl(_Handle + _BlackboardReferenceOffset.Value); } + private static readonly Lazy _SelfReferenceOffset = new(() => Schema.GetOffset(0x6186DA14772CFC4), LazyThreadSafetyMode.None); + public ref bool SelfReference { - get => ref _Handle.AsRef(Schema.GetOffset(0x6186DA14772CFC4)); + get => ref _Handle.AsRef(_SelfReferenceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_WaitImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_WaitImpl.cs index b45b170bb..c1c07f040 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_WaitImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_WaitImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_Inflow_WaitImpl : CPulseCell_BaseYieldingInflo public CPulseCell_Inflow_WaitImpl(nint handle) : base(handle) { } + private static readonly Lazy _WakeResumeOffset = new(() => Schema.GetOffset(0x8A00D13D31F86DC2), LazyThreadSafetyMode.None); + public CPulse_ResumePoint WakeResume { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0x8A00D13D31F86DC2)); + get => new CPulse_ResumePointImpl(_Handle + _WakeResumeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_YieldImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_YieldImpl.cs index 5551cb7c4..64b4b940d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_YieldImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Inflow_YieldImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_Inflow_YieldImpl : CPulseCell_BaseYieldingInfl public CPulseCell_Inflow_YieldImpl(nint handle) : base(handle) { } + private static readonly Lazy _UnyieldResumeOffset = new(() => Schema.GetOffset(0x1A4BFE3D504DFCDC), LazyThreadSafetyMode.None); + public CPulse_ResumePoint UnyieldResume { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0x1A4BFE3D504DFCDC)); + get => new CPulse_ResumePointImpl(_Handle + _UnyieldResumeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_InlineNodeSkipSelectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_InlineNodeSkipSelectorImpl.cs index db9d2f2b2..bb431b75e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_InlineNodeSkipSelectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_InlineNodeSkipSelectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CPulseCell_InlineNodeSkipSelectorImpl : CPulseCell_BaseFl public CPulseCell_InlineNodeSkipSelectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _FlowNodeIDOffset = new(() => Schema.GetOffset(0x43AF14578ED47FBC), LazyThreadSafetyMode.None); + public PulseDocNodeID_t FlowNodeID { - get => new PulseDocNodeID_tImpl(_Handle + Schema.GetOffset(0x43AF14578ED47FBC)); + get => new PulseDocNodeID_tImpl(_Handle + _FlowNodeIDOffset.Value); } + private static readonly Lazy _AndOffset = new(() => Schema.GetOffset(0x43AF14573A289986), LazyThreadSafetyMode.None); + public ref bool And { - get => ref _Handle.AsRef(Schema.GetOffset(0x43AF14573A289986)); + get => ref _Handle.AsRef(_AndOffset.Value); } + private static readonly Lazy _PassOutflowOffset = new(() => Schema.GetOffset(0x43AF145724AA6434), LazyThreadSafetyMode.None); + public PulseSelectorOutflowList_t PassOutflow { - get => new PulseSelectorOutflowList_tImpl(_Handle + Schema.GetOffset(0x43AF145724AA6434)); + get => new PulseSelectorOutflowList_tImpl(_Handle + _PassOutflowOffset.Value); } + private static readonly Lazy _FailOutflowOffset = new(() => Schema.GetOffset(0x43AF1457AC90C0E3), LazyThreadSafetyMode.None); + public CPulse_OutflowConnection FailOutflow { - get => new CPulse_OutflowConnectionImpl(_Handle + Schema.GetOffset(0x43AF1457AC90C0E3)); + get => new CPulse_OutflowConnectionImpl(_Handle + _FailOutflowOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_IntervalTimerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_IntervalTimerImpl.cs index 8aa9796bd..c48d35242 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_IntervalTimerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_IntervalTimerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPulseCell_IntervalTimerImpl : CPulseCell_BaseYieldingInf public CPulseCell_IntervalTimerImpl(nint handle) : base(handle) { } + private static readonly Lazy _CompletedOffset = new(() => Schema.GetOffset(0x33EF5E76818C0E92), LazyThreadSafetyMode.None); + public CPulse_ResumePoint Completed { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0x33EF5E76818C0E92)); + get => new CPulse_ResumePointImpl(_Handle + _CompletedOffset.Value); } + private static readonly Lazy _OnIntervalOffset = new(() => Schema.GetOffset(0x33EF5E761A4FEF89), LazyThreadSafetyMode.None); + public SignatureOutflow_Continue OnInterval { - get => new SignatureOutflow_ContinueImpl(_Handle + Schema.GetOffset(0x33EF5E761A4FEF89)); + get => new SignatureOutflow_ContinueImpl(_Handle + _OnIntervalOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_IntervalTimer__CursorState_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_IntervalTimer__CursorState_tImpl.cs index f0eb6c4f9..0f9aba60c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_IntervalTimer__CursorState_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_IntervalTimer__CursorState_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CPulseCell_IntervalTimer__CursorState_tImpl : SchemaClass public CPulseCell_IntervalTimer__CursorState_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0x63BF122697B5FA8E), LazyThreadSafetyMode.None); + public GameTime_t StartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x63BF122697B5FA8E)); + get => new GameTime_tImpl(_Handle + _StartTimeOffset.Value); } + private static readonly Lazy _EndTimeOffset = new(() => Schema.GetOffset(0x63BF12267AA8F56B), LazyThreadSafetyMode.None); + public GameTime_t EndTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x63BF12267AA8F56B)); + get => new GameTime_tImpl(_Handle + _EndTimeOffset.Value); } + private static readonly Lazy _WaitIntervalOffset = new(() => Schema.GetOffset(0x63BF122677B6B563), LazyThreadSafetyMode.None); + public ref float WaitInterval { - get => ref _Handle.AsRef(Schema.GetOffset(0x63BF122677B6B563)); + get => ref _Handle.AsRef(_WaitIntervalOffset.Value); } + private static readonly Lazy _WaitIntervalHighOffset = new(() => Schema.GetOffset(0x63BF12267540534F), LazyThreadSafetyMode.None); + public ref float WaitIntervalHigh { - get => ref _Handle.AsRef(Schema.GetOffset(0x63BF12267540534F)); + get => ref _Handle.AsRef(_WaitIntervalHighOffset.Value); } + private static readonly Lazy _CompleteOnNextWakeOffset = new(() => Schema.GetOffset(0x63BF122684615952), LazyThreadSafetyMode.None); + public ref bool CompleteOnNextWake { - get => ref _Handle.AsRef(Schema.GetOffset(0x63BF122684615952)); + get => ref _Handle.AsRef(_CompleteOnNextWakeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_IsRequirementValidImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_IsRequirementValidImpl.cs index 37376c14a..1a3dd196c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_IsRequirementValidImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_IsRequirementValidImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_IsRequirementValid__Criteria_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_IsRequirementValid__Criteria_tImpl.cs index 2b388eb00..45792e5e5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_IsRequirementValid__Criteria_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_IsRequirementValid__Criteria_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_IsRequirementValid__Criteria_tImpl : SchemaCla public CPulseCell_IsRequirementValid__Criteria_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _IsValidOffset = new(() => Schema.GetOffset(0x4D71FFB90E4A2BC1), LazyThreadSafetyMode.None); + public ref bool IsValid { - get => ref _Handle.AsRef(Schema.GetOffset(0x4D71FFB90E4A2BC1)); + get => ref _Handle.AsRef(_IsValidOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LerpCameraSettingsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LerpCameraSettingsImpl.cs index 6e8f3d6af..7d8ead09e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LerpCameraSettingsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LerpCameraSettingsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CPulseCell_LerpCameraSettingsImpl : CPulseCell_BaseLerpIm public CPulseCell_LerpCameraSettingsImpl(nint handle) : base(handle) { } + private static readonly Lazy _SecondsOffset = new(() => Schema.GetOffset(0xA4A5850773C6938C), LazyThreadSafetyMode.None); + public ref float Seconds { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4A5850773C6938C)); + get => ref _Handle.AsRef(_SecondsOffset.Value); } + private static readonly Lazy _StartOffset = new(() => Schema.GetOffset(0xA4A58507FF7CBA5F), LazyThreadSafetyMode.None); + public PointCameraSettings_t Start { - get => new PointCameraSettings_tImpl(_Handle + Schema.GetOffset(0xA4A58507FF7CBA5F)); + get => new PointCameraSettings_tImpl(_Handle + _StartOffset.Value); } + private static readonly Lazy _EndOffset = new(() => Schema.GetOffset(0xA4A58507F624CF2A), LazyThreadSafetyMode.None); + public PointCameraSettings_t End { - get => new PointCameraSettings_tImpl(_Handle + Schema.GetOffset(0xA4A58507F624CF2A)); + get => new PointCameraSettings_tImpl(_Handle + _EndOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LerpCameraSettings__CursorState_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LerpCameraSettings__CursorState_tImpl.cs index b86683d97..dca191f27 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LerpCameraSettings__CursorState_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LerpCameraSettings__CursorState_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CPulseCell_LerpCameraSettings__CursorState_tImpl : CPulse public CPulseCell_LerpCameraSettings__CursorState_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CameraOffset = new(() => Schema.GetOffset(0x84AB53FD538EFB98), LazyThreadSafetyMode.None); + public ref CHandle Camera { - get => ref _Handle.AsRef>(Schema.GetOffset(0x84AB53FD538EFB98)); + get => ref _Handle.AsRef>(_CameraOffset.Value); } + private static readonly Lazy _OverlaidStartOffset = new(() => Schema.GetOffset(0x84AB53FD54E9A76F), LazyThreadSafetyMode.None); + public PointCameraSettings_t OverlaidStart { - get => new PointCameraSettings_tImpl(_Handle + Schema.GetOffset(0x84AB53FD54E9A76F)); + get => new PointCameraSettings_tImpl(_Handle + _OverlaidStartOffset.Value); } + private static readonly Lazy _OverlaidEndOffset = new(() => Schema.GetOffset(0x84AB53FD3CDFDEFA), LazyThreadSafetyMode.None); + public PointCameraSettings_t OverlaidEnd { - get => new PointCameraSettings_tImpl(_Handle + Schema.GetOffset(0x84AB53FD3CDFDEFA)); + get => new PointCameraSettings_tImpl(_Handle + _OverlaidEndOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LimitCountImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LimitCountImpl.cs index 11f47dd4d..5d5099976 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LimitCountImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LimitCountImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_LimitCountImpl : CPulseCell_BaseRequirementImp public CPulseCell_LimitCountImpl(nint handle) : base(handle) { } + private static readonly Lazy _LimitCountOffset = new(() => Schema.GetOffset(0x879D9892603807FF), LazyThreadSafetyMode.None); + public ref int LimitCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x879D9892603807FF)); + get => ref _Handle.AsRef(_LimitCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LimitCount__Criteria_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LimitCount__Criteria_tImpl.cs index abfc5f6de..d4c42990a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LimitCount__Criteria_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LimitCount__Criteria_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_LimitCount__Criteria_tImpl : SchemaClass, CPul public CPulseCell_LimitCount__Criteria_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _LimitCountPassesOffset = new(() => Schema.GetOffset(0x3B47B1B460A35826), LazyThreadSafetyMode.None); + public ref bool LimitCountPasses { - get => ref _Handle.AsRef(Schema.GetOffset(0x3B47B1B460A35826)); + get => ref _Handle.AsRef(_LimitCountPassesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LimitCount__InstanceState_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LimitCount__InstanceState_tImpl.cs index a7758f8ea..50000fdfa 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LimitCount__InstanceState_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_LimitCount__InstanceState_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_LimitCount__InstanceState_tImpl : SchemaClass, public CPulseCell_LimitCount__InstanceState_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CurrentCountOffset = new(() => Schema.GetOffset(0x8CD3F919BE40B2AD), LazyThreadSafetyMode.None); + public ref int CurrentCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x8CD3F919BE40B2AD)); + get => ref _Handle.AsRef(_CurrentCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleOrderedImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleOrderedImpl.cs index 5a41b5fce..dcc401b27 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleOrderedImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleOrderedImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_Outflow_CycleOrderedImpl : CPulseCell_BaseFlow public CPulseCell_Outflow_CycleOrderedImpl(nint handle) : base(handle) { } + private static readonly Lazy _OutputsOffset = new(() => Schema.GetOffset(0xAED1209EA38A89D5), LazyThreadSafetyMode.None); + public ref CUtlVector Outputs { - get => ref _Handle.AsRef>(Schema.GetOffset(0xAED1209EA38A89D5)); + get => ref _Handle.AsRef>(_OutputsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleOrdered__InstanceState_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleOrdered__InstanceState_tImpl.cs index e527edf7a..8e6f526c0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleOrdered__InstanceState_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleOrdered__InstanceState_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_Outflow_CycleOrdered__InstanceState_tImpl : Sc public CPulseCell_Outflow_CycleOrdered__InstanceState_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NextIndexOffset = new(() => Schema.GetOffset(0xB3EBE505EFEC0D98), LazyThreadSafetyMode.None); + public ref int NextIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xB3EBE505EFEC0D98)); + get => ref _Handle.AsRef(_NextIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleRandomImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleRandomImpl.cs index d9c589bca..712cb0fba 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleRandomImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleRandomImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_Outflow_CycleRandomImpl : CPulseCell_BaseFlowI public CPulseCell_Outflow_CycleRandomImpl(nint handle) : base(handle) { } + private static readonly Lazy _OutputsOffset = new(() => Schema.GetOffset(0xF24A555AA38A89D5), LazyThreadSafetyMode.None); + public ref CUtlVector Outputs { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF24A555AA38A89D5)); + get => ref _Handle.AsRef>(_OutputsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleShuffledImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleShuffledImpl.cs index 363821d39..74d69990a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleShuffledImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleShuffledImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_Outflow_CycleShuffledImpl : CPulseCell_BaseFlo public CPulseCell_Outflow_CycleShuffledImpl(nint handle) : base(handle) { } + private static readonly Lazy _OutputsOffset = new(() => Schema.GetOffset(0xA7823F26A38A89D5), LazyThreadSafetyMode.None); + public ref CUtlVector Outputs { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA7823F26A38A89D5)); + get => ref _Handle.AsRef>(_OutputsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleShuffled__InstanceState_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleShuffled__InstanceState_tImpl.cs index 2891d2d0b..ebf618a76 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleShuffled__InstanceState_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_CycleShuffled__InstanceState_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPulseCell_Outflow_CycleShuffled__InstanceState_tImpl : S public CPulseCell_Outflow_CycleShuffled__InstanceState_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ShuffleOffset = new(() => Schema.GetOffset(0xD33F67BD200E9ACE), LazyThreadSafetyMode.None); + public SchemaUntypedField Shuffle { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD33F67BD200E9ACE)); + get => new SchemaUntypedField(_Handle + _ShuffleOffset.Value); } + private static readonly Lazy _NextShuffleOffset = new(() => Schema.GetOffset(0xD33F67BD741282A5), LazyThreadSafetyMode.None); + public ref int NextShuffle { - get => ref _Handle.AsRef(Schema.GetOffset(0xD33F67BD741282A5)); + get => ref _Handle.AsRef(_NextShuffleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ListenForAnimgraphTagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ListenForAnimgraphTagImpl.cs index 2e6742a93..16213267c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ListenForAnimgraphTagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ListenForAnimgraphTagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CPulseCell_Outflow_ListenForAnimgraphTagImpl : CPulseCell public CPulseCell_Outflow_ListenForAnimgraphTagImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnStartOffset = new(() => Schema.GetOffset(0xAD79BF78C3FE848C), LazyThreadSafetyMode.None); + public CPulse_ResumePoint OnStart { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0xAD79BF78C3FE848C)); + get => new CPulse_ResumePointImpl(_Handle + _OnStartOffset.Value); } + private static readonly Lazy _OnEndOffset = new(() => Schema.GetOffset(0xAD79BF78B88A4375), LazyThreadSafetyMode.None); + public CPulse_ResumePoint OnEnd { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0xAD79BF78B88A4375)); + get => new CPulse_ResumePointImpl(_Handle + _OnEndOffset.Value); } + private static readonly Lazy _OnCanceledOffset = new(() => Schema.GetOffset(0xAD79BF78F02162DB), LazyThreadSafetyMode.None); + public CPulse_ResumePoint OnCanceled { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0xAD79BF78F02162DB)); + get => new CPulse_ResumePointImpl(_Handle + _OnCanceledOffset.Value); } + private static readonly Lazy _TagNameOffset = new(() => Schema.GetOffset(0xAD79BF78647DC278), LazyThreadSafetyMode.None); + public ref CGlobalSymbol TagName { - get => ref _Handle.AsRef(Schema.GetOffset(0xAD79BF78647DC278)); + get => ref _Handle.AsRef(_TagNameOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ListenForEntityOutputImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ListenForEntityOutputImpl.cs index 570ccbd3c..772bdcc51 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ListenForEntityOutputImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ListenForEntityOutputImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class CPulseCell_Outflow_ListenForEntityOutputImpl : CPulseCell public CPulseCell_Outflow_ListenForEntityOutputImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnFiredOffset = new(() => Schema.GetOffset(0xCB35163784825730), LazyThreadSafetyMode.None); + public SignatureOutflow_Resume OnFired { - get => new SignatureOutflow_ResumeImpl(_Handle + Schema.GetOffset(0xCB35163784825730)); + get => new SignatureOutflow_ResumeImpl(_Handle + _OnFiredOffset.Value); } + private static readonly Lazy _OnCanceledOffset = new(() => Schema.GetOffset(0xCB351637F02162DB), LazyThreadSafetyMode.None); + public CPulse_ResumePoint OnCanceled { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0xCB351637F02162DB)); + get => new CPulse_ResumePointImpl(_Handle + _OnCanceledOffset.Value); } + private static readonly Lazy _StrEntityOutputOffset = new(() => Schema.GetOffset(0xCB351637C8E70456), LazyThreadSafetyMode.None); + public ref CGlobalSymbol StrEntityOutput { - get => ref _Handle.AsRef(Schema.GetOffset(0xCB351637C8E70456)); + get => ref _Handle.AsRef(_StrEntityOutputOffset.Value); } + private static readonly Lazy _StrEntityOutputParamOffset = new(() => Schema.GetOffset(0xCB351637BB356637), LazyThreadSafetyMode.None); + public string StrEntityOutputParam { get { - var ptr = _Handle.Read(Schema.GetOffset(0xCB351637BB356637)); + var ptr = _Handle.Read(_StrEntityOutputParamOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xCB351637BB356637, value); + set => Schema.SetString(_Handle, _StrEntityOutputParamOffset.Value, value); } + private static readonly Lazy _ListenUntilCanceledOffset = new(() => Schema.GetOffset(0xCB351637C798285D), LazyThreadSafetyMode.None); + public ref bool ListenUntilCanceled { - get => ref _Handle.AsRef(Schema.GetOffset(0xCB351637C798285D)); + get => ref _Handle.AsRef(_ListenUntilCanceledOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ListenForEntityOutput__CursorState_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ListenForEntityOutput__CursorState_tImpl.cs index 1842ba751..b7040cc57 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ListenForEntityOutput__CursorState_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ListenForEntityOutput__CursorState_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_Outflow_ListenForEntityOutput__CursorState_tIm public CPulseCell_Outflow_ListenForEntityOutput__CursorState_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _EntityOffset = new(() => Schema.GetOffset(0xC31517AD2F3BEB7A), LazyThreadSafetyMode.None); + public ref CHandle Entity { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC31517AD2F3BEB7A)); + get => ref _Handle.AsRef>(_EntityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_PlaySceneBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_PlaySceneBaseImpl.cs index acb83ac2c..f2efedbb7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_PlaySceneBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_PlaySceneBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CPulseCell_Outflow_PlaySceneBaseImpl : CPulseCell_BaseYie public CPulseCell_Outflow_PlaySceneBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnFinishedOffset = new(() => Schema.GetOffset(0x647C41D08D903E5E), LazyThreadSafetyMode.None); + public CPulse_ResumePoint OnFinished { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0x647C41D08D903E5E)); + get => new CPulse_ResumePointImpl(_Handle + _OnFinishedOffset.Value); } + private static readonly Lazy _OnCanceledOffset = new(() => Schema.GetOffset(0x647C41D0F02162DB), LazyThreadSafetyMode.None); + public CPulse_ResumePoint OnCanceled { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0x647C41D0F02162DB)); + get => new CPulse_ResumePointImpl(_Handle + _OnCanceledOffset.Value); } + private static readonly Lazy _TriggersOffset = new(() => Schema.GetOffset(0x647C41D06E7B12D0), LazyThreadSafetyMode.None); + public ref CUtlVector Triggers { - get => ref _Handle.AsRef>(Schema.GetOffset(0x647C41D06E7B12D0)); + get => ref _Handle.AsRef>(_TriggersOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_PlaySceneBase__CursorState_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_PlaySceneBase__CursorState_tImpl.cs index fad9d6de7..68a1a3f26 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_PlaySceneBase__CursorState_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_PlaySceneBase__CursorState_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPulseCell_Outflow_PlaySceneBase__CursorState_tImpl : Sch public CPulseCell_Outflow_PlaySceneBase__CursorState_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SceneInstanceOffset = new(() => Schema.GetOffset(0x16AE3F0C967C210), LazyThreadSafetyMode.None); + public ref CHandle SceneInstance { - get => ref _Handle.AsRef>(Schema.GetOffset(0x16AE3F0C967C210)); + get => ref _Handle.AsRef>(_SceneInstanceOffset.Value); } + private static readonly Lazy _MainActorOffset = new(() => Schema.GetOffset(0x16AE3F0CCB20D99), LazyThreadSafetyMode.None); + public ref CHandle MainActor { - get => ref _Handle.AsRef>(Schema.GetOffset(0x16AE3F0CCB20D99)); + get => ref _Handle.AsRef>(_MainActorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_PlaySequenceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_PlaySequenceImpl.cs index 76d0ece91..1f40db3d2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_PlaySequenceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_PlaySequenceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CPulseCell_Outflow_PlaySequenceImpl : CPulseCell_Outflow_ public CPulseCell_Outflow_PlaySequenceImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParamSequenceNameOffset = new(() => Schema.GetOffset(0x9E1D42661D9365E0), LazyThreadSafetyMode.None); + public string ParamSequenceName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9E1D42661D9365E0)); + var ptr = _Handle.Read(_ParamSequenceNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9E1D42661D9365E0, value); + set => Schema.SetString(_Handle, _ParamSequenceNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_PlayVCDImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_PlayVCDImpl.cs index c401304c5..a41f3bc54 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_PlayVCDImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_PlayVCDImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_Outflow_PlayVCDImpl : CPulseCell_Outflow_PlayS public CPulseCell_Outflow_PlayVCDImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChoreoSceneOffset = new(() => Schema.GetOffset(0xB095B414AFC19AC7), LazyThreadSafetyMode.None); + public ref CStrongHandle ChoreoScene { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB095B414AFC19AC7)); + get => ref _Handle.AsRef>(_ChoreoSceneOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ScriptedSequenceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ScriptedSequenceImpl.cs index 623a91f48..310b5b8a9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ScriptedSequenceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ScriptedSequenceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,39 +17,59 @@ internal partial class CPulseCell_Outflow_ScriptedSequenceImpl : CPulseCell_Base public CPulseCell_Outflow_ScriptedSequenceImpl(nint handle) : base(handle) { } + private static readonly Lazy _SyncGroupOffset = new(() => Schema.GetOffset(0x462EA7DEF9E8183A), LazyThreadSafetyMode.None); + public string SyncGroup { get { - var ptr = _Handle.Read(Schema.GetOffset(0x462EA7DEF9E8183A)); + var ptr = _Handle.Read(_SyncGroupOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x462EA7DEF9E8183A, value); + set => Schema.SetString(_Handle, _SyncGroupOffset.Value, value); } + private static readonly Lazy _ExpectedNumSequencesInSyncGroupOffset = new(() => Schema.GetOffset(0x462EA7DE0C6AAD7A), LazyThreadSafetyMode.None); + public ref int ExpectedNumSequencesInSyncGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0x462EA7DE0C6AAD7A)); + get => ref _Handle.AsRef(_ExpectedNumSequencesInSyncGroupOffset.Value); } + private static readonly Lazy _EnsureOnNavmeshOnFinishOffset = new(() => Schema.GetOffset(0x462EA7DE802BA0B0), LazyThreadSafetyMode.None); + public ref bool EnsureOnNavmeshOnFinish { - get => ref _Handle.AsRef(Schema.GetOffset(0x462EA7DE802BA0B0)); + get => ref _Handle.AsRef(_EnsureOnNavmeshOnFinishOffset.Value); } + private static readonly Lazy _DontTeleportAtEndOffset = new(() => Schema.GetOffset(0x462EA7DE59E02641), LazyThreadSafetyMode.None); + public ref bool DontTeleportAtEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x462EA7DE59E02641)); + get => ref _Handle.AsRef(_DontTeleportAtEndOffset.Value); } + private static readonly Lazy _DisallowInterruptsOffset = new(() => Schema.GetOffset(0x462EA7DE939D3840), LazyThreadSafetyMode.None); + public ref bool DisallowInterrupts { - get => ref _Handle.AsRef(Schema.GetOffset(0x462EA7DE939D3840)); + get => ref _Handle.AsRef(_DisallowInterruptsOffset.Value); } + private static readonly Lazy _ScriptedSequenceDataMainOffset = new(() => Schema.GetOffset(0x462EA7DE03F2FF03), LazyThreadSafetyMode.None); + public PulseScriptedSequenceData_t ScriptedSequenceDataMain { - get => new PulseScriptedSequenceData_tImpl(_Handle + Schema.GetOffset(0x462EA7DE03F2FF03)); + get => new PulseScriptedSequenceData_tImpl(_Handle + _ScriptedSequenceDataMainOffset.Value); } + private static readonly Lazy _AdditionalActorsOffset = new(() => Schema.GetOffset(0x462EA7DE8E5DB532), LazyThreadSafetyMode.None); + public ref CUtlVector AdditionalActors { - get => ref _Handle.AsRef>(Schema.GetOffset(0x462EA7DE8E5DB532)); + get => ref _Handle.AsRef>(_AdditionalActorsOffset.Value); } + private static readonly Lazy _OnFinishedOffset = new(() => Schema.GetOffset(0x462EA7DE8D903E5E), LazyThreadSafetyMode.None); + public CPulse_ResumePoint OnFinished { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0x462EA7DE8D903E5E)); + get => new CPulse_ResumePointImpl(_Handle + _OnFinishedOffset.Value); } + private static readonly Lazy _OnCanceledOffset = new(() => Schema.GetOffset(0x462EA7DEF02162DB), LazyThreadSafetyMode.None); + public CPulse_ResumePoint OnCanceled { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0x462EA7DEF02162DB)); + get => new CPulse_ResumePointImpl(_Handle + _OnCanceledOffset.Value); } + private static readonly Lazy _TriggersOffset = new(() => Schema.GetOffset(0x462EA7DE6E7B12D0), LazyThreadSafetyMode.None); + public ref CUtlVector Triggers { - get => ref _Handle.AsRef>(Schema.GetOffset(0x462EA7DE6E7B12D0)); + get => ref _Handle.AsRef>(_TriggersOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ScriptedSequence__CursorState_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ScriptedSequence__CursorState_tImpl.cs index 6a0725f98..4ef08f50b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ScriptedSequence__CursorState_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_ScriptedSequence__CursorState_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_Outflow_ScriptedSequence__CursorState_tImpl : public CPulseCell_Outflow_ScriptedSequence__CursorState_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScriptedSequenceOffset = new(() => Schema.GetOffset(0xA508823E4DD9D67A), LazyThreadSafetyMode.None); + public ref CHandle ScriptedSequence { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA508823E4DD9D67A)); + get => ref _Handle.AsRef>(_ScriptedSequenceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_TestExplicitYesNoImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_TestExplicitYesNoImpl.cs index 52699a6c4..76cdce16a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_TestExplicitYesNoImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_TestExplicitYesNoImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPulseCell_Outflow_TestExplicitYesNoImpl : CPulseCell_Bas public CPulseCell_Outflow_TestExplicitYesNoImpl(nint handle) : base(handle) { } + private static readonly Lazy _YesOffset = new(() => Schema.GetOffset(0xA1B4A577DA358F10), LazyThreadSafetyMode.None); + public CPulse_OutflowConnection Yes { - get => new CPulse_OutflowConnectionImpl(_Handle + Schema.GetOffset(0xA1B4A577DA358F10)); + get => new CPulse_OutflowConnectionImpl(_Handle + _YesOffset.Value); } + private static readonly Lazy _NoOffset = new(() => Schema.GetOffset(0xA1B4A577E004A07A), LazyThreadSafetyMode.None); + public CPulse_OutflowConnection No { - get => new CPulse_OutflowConnectionImpl(_Handle + Schema.GetOffset(0xA1B4A577E004A07A)); + get => new CPulse_OutflowConnectionImpl(_Handle + _NoOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_TestRandomYesNoImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_TestRandomYesNoImpl.cs index dadb59e2f..9957b06e5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_TestRandomYesNoImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Outflow_TestRandomYesNoImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPulseCell_Outflow_TestRandomYesNoImpl : CPulseCell_BaseF public CPulseCell_Outflow_TestRandomYesNoImpl(nint handle) : base(handle) { } + private static readonly Lazy _YesOffset = new(() => Schema.GetOffset(0x9EA5F31EDA358F10), LazyThreadSafetyMode.None); + public CPulse_OutflowConnection Yes { - get => new CPulse_OutflowConnectionImpl(_Handle + Schema.GetOffset(0x9EA5F31EDA358F10)); + get => new CPulse_OutflowConnectionImpl(_Handle + _YesOffset.Value); } + private static readonly Lazy _NoOffset = new(() => Schema.GetOffset(0x9EA5F31EE004A07A), LazyThreadSafetyMode.None); + public CPulse_OutflowConnection No { - get => new CPulse_OutflowConnectionImpl(_Handle + Schema.GetOffset(0x9EA5F31EE004A07A)); + get => new CPulse_OutflowConnectionImpl(_Handle + _NoOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_PickBestOutflowSelectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_PickBestOutflowSelectorImpl.cs index b77098864..122ba6cbb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_PickBestOutflowSelectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_PickBestOutflowSelectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPulseCell_PickBestOutflowSelectorImpl : CPulseCell_BaseF public CPulseCell_PickBestOutflowSelectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _CheckTypeOffset = new(() => Schema.GetOffset(0x7239DF04A94C6E6B), LazyThreadSafetyMode.None); + public ref PulseBestOutflowRules_t CheckType { - get => ref _Handle.AsRef(Schema.GetOffset(0x7239DF04A94C6E6B)); + get => ref _Handle.AsRef(_CheckTypeOffset.Value); } + private static readonly Lazy _OutflowListOffset = new(() => Schema.GetOffset(0x7239DF041461E743), LazyThreadSafetyMode.None); + public PulseSelectorOutflowList_t OutflowList { - get => new PulseSelectorOutflowList_tImpl(_Handle + Schema.GetOffset(0x7239DF041461E743)); + get => new PulseSelectorOutflowList_tImpl(_Handle + _OutflowListOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_PlaySequenceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_PlaySequenceImpl.cs index 170533040..5415c6b43 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_PlaySequenceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_PlaySequenceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class CPulseCell_PlaySequenceImpl : CPulseCell_BaseYieldingInfl public CPulseCell_PlaySequenceImpl(nint handle) : base(handle) { } + private static readonly Lazy _SequenceNameOffset = new(() => Schema.GetOffset(0xE313765BA270F66B), LazyThreadSafetyMode.None); + public string SequenceName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE313765BA270F66B)); + var ptr = _Handle.Read(_SequenceNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xE313765BA270F66B, value); + set => Schema.SetString(_Handle, _SequenceNameOffset.Value, value); } + private static readonly Lazy _PulseAnimEventsOffset = new(() => Schema.GetOffset(0xE313765B10F0A082), LazyThreadSafetyMode.None); + public PulseNodeDynamicOutflows_t PulseAnimEvents { - get => new PulseNodeDynamicOutflows_tImpl(_Handle + Schema.GetOffset(0xE313765B10F0A082)); + get => new PulseNodeDynamicOutflows_tImpl(_Handle + _PulseAnimEventsOffset.Value); } + private static readonly Lazy _OnFinishedOffset = new(() => Schema.GetOffset(0xE313765B8D903E5E), LazyThreadSafetyMode.None); + public CPulse_ResumePoint OnFinished { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0xE313765B8D903E5E)); + get => new CPulse_ResumePointImpl(_Handle + _OnFinishedOffset.Value); } + private static readonly Lazy _OnCanceledOffset = new(() => Schema.GetOffset(0xE313765BF02162DB), LazyThreadSafetyMode.None); + public CPulse_ResumePoint OnCanceled { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0xE313765BF02162DB)); + get => new CPulse_ResumePointImpl(_Handle + _OnCanceledOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_PlaySequence__CursorState_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_PlaySequence__CursorState_tImpl.cs index e66e01394..0204bc987 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_PlaySequence__CursorState_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_PlaySequence__CursorState_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_PlaySequence__CursorState_tImpl : SchemaClass, public CPulseCell_PlaySequence__CursorState_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetOffset = new(() => Schema.GetOffset(0x2C22B771CE35901A), LazyThreadSafetyMode.None); + public ref CHandle Target { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2C22B771CE35901A)); + get => ref _Handle.AsRef>(_TargetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_SoundEventStartImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_SoundEventStartImpl.cs index 038886445..775072851 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_SoundEventStartImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_SoundEventStartImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_SoundEventStartImpl : CPulseCell_BaseFlowImpl, public CPulseCell_SoundEventStartImpl(nint handle) : base(handle) { } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x9CC546478ED6D5CD), LazyThreadSafetyMode.None); + public ref SoundEventStartType_t Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x9CC546478ED6D5CD)); + get => ref _Handle.AsRef(_TypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_CallExternalMethodImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_CallExternalMethodImpl.cs index bf5ba7831..f3eaee558 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_CallExternalMethodImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_CallExternalMethodImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CPulseCell_Step_CallExternalMethodImpl : CPulseCell_BaseY public CPulseCell_Step_CallExternalMethodImpl(nint handle) : base(handle) { } + private static readonly Lazy _MethodNameOffset = new(() => Schema.GetOffset(0x6A5B3EF57D863B13), LazyThreadSafetyMode.None); + public SchemaUntypedField MethodName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x6A5B3EF57D863B13)); + get => new SchemaUntypedField(_Handle + _MethodNameOffset.Value); } + private static readonly Lazy _GameBlackboardOffset = new(() => Schema.GetOffset(0x6A5B3EF536FB1236), LazyThreadSafetyMode.None); + public SchemaUntypedField GameBlackboard { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x6A5B3EF536FB1236)); + get => new SchemaUntypedField(_Handle + _GameBlackboardOffset.Value); } + private static readonly Lazy _ExpectedArgsOffset = new(() => Schema.GetOffset(0x6A5B3EF594EB10E8), LazyThreadSafetyMode.None); + public ref CUtlLeanVector ExpectedArgs { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6A5B3EF594EB10E8)); + get => ref _Handle.AsRef>(_ExpectedArgsOffset.Value); } + private static readonly Lazy _AsyncCallModeOffset = new(() => Schema.GetOffset(0x6A5B3EF535F27204), LazyThreadSafetyMode.None); + public ref PulseMethodCallMode_t AsyncCallMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A5B3EF535F27204)); + get => ref _Handle.AsRef(_AsyncCallModeOffset.Value); } + private static readonly Lazy _OnFinishedOffset = new(() => Schema.GetOffset(0x6A5B3EF58D903E5E), LazyThreadSafetyMode.None); + public CPulse_ResumePoint OnFinished { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0x6A5B3EF58D903E5E)); + get => new CPulse_ResumePointImpl(_Handle + _OnFinishedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_DebugLogImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_DebugLogImpl.cs index f4c2a9df3..394fb1f6a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_DebugLogImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_DebugLogImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_EntFireImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_EntFireImpl.cs index 43f6a7f3c..2b75d1e6e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_EntFireImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_EntFireImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CPulseCell_Step_EntFireImpl : CPulseCell_BaseFlowImpl, CP public CPulseCell_Step_EntFireImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputOffset = new(() => Schema.GetOffset(0xF0F9E958942A24FB), LazyThreadSafetyMode.None); + public string Input { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF0F9E958942A24FB)); + var ptr = _Handle.Read(_InputOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF0F9E958942A24FB, value); + set => Schema.SetString(_Handle, _InputOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_FollowEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_FollowEntityImpl.cs index 45b33ca6a..6d7bc73c4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_FollowEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_FollowEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,19 +17,23 @@ internal partial class CPulseCell_Step_FollowEntityImpl : CPulseCell_BaseFlowImp public CPulseCell_Step_FollowEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParamBoneOrAttachNameOffset = new(() => Schema.GetOffset(0x75FAF4A9B89867BB), LazyThreadSafetyMode.None); + public string ParamBoneOrAttachName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x75FAF4A9B89867BB)); + var ptr = _Handle.Read(_ParamBoneOrAttachNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x75FAF4A9B89867BB, value); + set => Schema.SetString(_Handle, _ParamBoneOrAttachNameOffset.Value, value); } + private static readonly Lazy _ParamBoneOrAttachNameChildOffset = new(() => Schema.GetOffset(0x75FAF4A902011093), LazyThreadSafetyMode.None); + public string ParamBoneOrAttachNameChild { get { - var ptr = _Handle.Read(Schema.GetOffset(0x75FAF4A902011093)); + var ptr = _Handle.Read(_ParamBoneOrAttachNameChildOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x75FAF4A902011093, value); + set => Schema.SetString(_Handle, _ParamBoneOrAttachNameChildOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_PublicOutputImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_PublicOutputImpl.cs index e4c7f9bd2..5aa546b8a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_PublicOutputImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_PublicOutputImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_Step_PublicOutputImpl : CPulseCell_BaseFlowImp public CPulseCell_Step_PublicOutputImpl(nint handle) : base(handle) { } + private static readonly Lazy _OutputIndexOffset = new(() => Schema.GetOffset(0x40053C931E4D5BA0), LazyThreadSafetyMode.None); + public PulseRuntimeOutputIndex_t OutputIndex { - get => new PulseRuntimeOutputIndex_tImpl(_Handle + Schema.GetOffset(0x40053C931E4D5BA0)); + get => new PulseRuntimeOutputIndex_tImpl(_Handle + _OutputIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_SetAnimGraphParamImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_SetAnimGraphParamImpl.cs index 4a092afeb..ad8f634b0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_SetAnimGraphParamImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_SetAnimGraphParamImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CPulseCell_Step_SetAnimGraphParamImpl : CPulseCell_BaseFl public CPulseCell_Step_SetAnimGraphParamImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParamNameOffset = new(() => Schema.GetOffset(0x7727698D230FDA59), LazyThreadSafetyMode.None); + public string ParamName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7727698D230FDA59)); + var ptr = _Handle.Read(_ParamNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7727698D230FDA59, value); + set => Schema.SetString(_Handle, _ParamNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_TestDomainCreateFakeEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_TestDomainCreateFakeEntityImpl.cs index 589440d83..f920991a7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_TestDomainCreateFakeEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_TestDomainCreateFakeEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_TestDomainDestroyFakeEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_TestDomainDestroyFakeEntityImpl.cs index 516579cfa..711a19cf6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_TestDomainDestroyFakeEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_TestDomainDestroyFakeEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_TestDomainEntFireImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_TestDomainEntFireImpl.cs index 44a8682df..925d43c1c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_TestDomainEntFireImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_TestDomainEntFireImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CPulseCell_Step_TestDomainEntFireImpl : CPulseCell_BaseFl public CPulseCell_Step_TestDomainEntFireImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputOffset = new(() => Schema.GetOffset(0x22A0E258942A24FB), LazyThreadSafetyMode.None); + public string Input { get { - var ptr = _Handle.Read(Schema.GetOffset(0x22A0E258942A24FB)); + var ptr = _Handle.Read(_InputOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x22A0E258942A24FB, value); + set => Schema.SetString(_Handle, _InputOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_TestDomainTracepointImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_TestDomainTracepointImpl.cs index 55421e67e..690c1f1cd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_TestDomainTracepointImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Step_TestDomainTracepointImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_TestWaitWithCursorStateImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_TestWaitWithCursorStateImpl.cs index d3fd53953..a9f70e957 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_TestWaitWithCursorStateImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_TestWaitWithCursorStateImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CPulseCell_TestWaitWithCursorStateImpl : CPulseCell_BaseY public CPulseCell_TestWaitWithCursorStateImpl(nint handle) : base(handle) { } + private static readonly Lazy _WakeResumeOffset = new(() => Schema.GetOffset(0xB1305BB431F86DC2), LazyThreadSafetyMode.None); + public CPulse_ResumePoint WakeResume { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0xB1305BB431F86DC2)); + get => new CPulse_ResumePointImpl(_Handle + _WakeResumeOffset.Value); } + private static readonly Lazy _WakeCancelOffset = new(() => Schema.GetOffset(0xB1305BB47C373223), LazyThreadSafetyMode.None); + public CPulse_ResumePoint WakeCancel { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0xB1305BB47C373223)); + get => new CPulse_ResumePointImpl(_Handle + _WakeCancelOffset.Value); } + private static readonly Lazy _WakeFailOffset = new(() => Schema.GetOffset(0xB1305BB4BE921FF5), LazyThreadSafetyMode.None); + public CPulse_ResumePoint WakeFail { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0xB1305BB4BE921FF5)); + get => new CPulse_ResumePointImpl(_Handle + _WakeFailOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_TestWaitWithCursorState__CursorState_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_TestWaitWithCursorState__CursorState_tImpl.cs index 9f9a076c5..2760bf848 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_TestWaitWithCursorState__CursorState_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_TestWaitWithCursorState__CursorState_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPulseCell_TestWaitWithCursorState__CursorState_tImpl : S public CPulseCell_TestWaitWithCursorState__CursorState_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _WaitValueOffset = new(() => Schema.GetOffset(0x9C2318A48BB02277), LazyThreadSafetyMode.None); + public ref float WaitValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C2318A48BB02277)); + get => ref _Handle.AsRef(_WaitValueOffset.Value); } + private static readonly Lazy _FailOnCancelOffset = new(() => Schema.GetOffset(0x9C2318A4BEE5ED52), LazyThreadSafetyMode.None); + public ref bool FailOnCancel { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C2318A4BEE5ED52)); + get => ref _Handle.AsRef(_FailOnCancelOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiInflow_NoDefaultImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiInflow_NoDefaultImpl.cs index 42d004e91..d8b7301cf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiInflow_NoDefaultImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiInflow_NoDefaultImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiInflow_WithDefaultImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiInflow_WithDefaultImpl.cs index cd0fbd3a1..b4e1d9a9b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiInflow_WithDefaultImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiInflow_WithDefaultImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiOutflow_WithParamsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiOutflow_WithParamsImpl.cs index 47c93c6a7..d7921b451 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiOutflow_WithParamsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiOutflow_WithParamsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPulseCell_Test_MultiOutflow_WithParamsImpl : CPulseCell_ public CPulseCell_Test_MultiOutflow_WithParamsImpl(nint handle) : base(handle) { } + private static readonly Lazy _Out1Offset = new(() => Schema.GetOffset(0x99BFB89905F293AA), LazyThreadSafetyMode.None); + public SignatureOutflow_Continue Out1 { - get => new SignatureOutflow_ContinueImpl(_Handle + Schema.GetOffset(0x99BFB89905F293AA)); + get => new SignatureOutflow_ContinueImpl(_Handle + _Out1Offset.Value); } + private static readonly Lazy _Out2Offset = new(() => Schema.GetOffset(0x99BFB89904F29217), LazyThreadSafetyMode.None); + public SignatureOutflow_Continue Out2 { - get => new SignatureOutflow_ContinueImpl(_Handle + Schema.GetOffset(0x99BFB89904F29217)); + get => new SignatureOutflow_ContinueImpl(_Handle + _Out2Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiOutflow_WithParams_YieldingImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiOutflow_WithParams_YieldingImpl.cs index 9a9ef484a..a2c4d8ed4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiOutflow_WithParams_YieldingImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiOutflow_WithParams_YieldingImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CPulseCell_Test_MultiOutflow_WithParams_YieldingImpl : CP public CPulseCell_Test_MultiOutflow_WithParams_YieldingImpl(nint handle) : base(handle) { } + private static readonly Lazy _Out1Offset = new(() => Schema.GetOffset(0xB412A25905F293AA), LazyThreadSafetyMode.None); + public SignatureOutflow_Continue Out1 { - get => new SignatureOutflow_ContinueImpl(_Handle + Schema.GetOffset(0xB412A25905F293AA)); + get => new SignatureOutflow_ContinueImpl(_Handle + _Out1Offset.Value); } + private static readonly Lazy _AsyncChild1Offset = new(() => Schema.GetOffset(0xB412A2592CEBF78A), LazyThreadSafetyMode.None); + public SignatureOutflow_Continue AsyncChild1 { - get => new SignatureOutflow_ContinueImpl(_Handle + Schema.GetOffset(0xB412A2592CEBF78A)); + get => new SignatureOutflow_ContinueImpl(_Handle + _AsyncChild1Offset.Value); } + private static readonly Lazy _AsyncChild2Offset = new(() => Schema.GetOffset(0xB412A2592BEBF5F7), LazyThreadSafetyMode.None); + public SignatureOutflow_Continue AsyncChild2 { - get => new SignatureOutflow_ContinueImpl(_Handle + Schema.GetOffset(0xB412A2592BEBF5F7)); + get => new SignatureOutflow_ContinueImpl(_Handle + _AsyncChild2Offset.Value); } + private static readonly Lazy _YieldResume1Offset = new(() => Schema.GetOffset(0xB412A2596063DFA8), LazyThreadSafetyMode.None); + public SignatureOutflow_Resume YieldResume1 { - get => new SignatureOutflow_ResumeImpl(_Handle + Schema.GetOffset(0xB412A2596063DFA8)); + get => new SignatureOutflow_ResumeImpl(_Handle + _YieldResume1Offset.Value); } + private static readonly Lazy _YieldResume2Offset = new(() => Schema.GetOffset(0xB412A2596363E461), LazyThreadSafetyMode.None); + public SignatureOutflow_Resume YieldResume2 { - get => new SignatureOutflow_ResumeImpl(_Handle + Schema.GetOffset(0xB412A2596363E461)); + get => new SignatureOutflow_ResumeImpl(_Handle + _YieldResume2Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiOutflow_WithParams_Yielding__CursorState_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiOutflow_WithParams_Yielding__CursorState_tImpl.cs index f65b0cd70..20ca1a037 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiOutflow_WithParams_Yielding__CursorState_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_MultiOutflow_WithParams_Yielding__CursorState_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_Test_MultiOutflow_WithParams_Yielding__CursorS public CPulseCell_Test_MultiOutflow_WithParams_Yielding__CursorState_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TestStepOffset = new(() => Schema.GetOffset(0xE579E02F4D61CC93), LazyThreadSafetyMode.None); + public ref int TestStep { - get => ref _Handle.AsRef(Schema.GetOffset(0xE579E02F4D61CC93)); + get => ref _Handle.AsRef(_TestStepOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_NoInflowImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_NoInflowImpl.cs index 11ffb5551..c9e221971 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_NoInflowImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Test_NoInflowImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_TimelineImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_TimelineImpl.cs index 9ad33d657..1e237cb82 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_TimelineImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_TimelineImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CPulseCell_TimelineImpl : CPulseCell_BaseYieldingInflowIm public CPulseCell_TimelineImpl(nint handle) : base(handle) { } + private static readonly Lazy _TimelineEventsOffset = new(() => Schema.GetOffset(0xF1185F93C91CDDC3), LazyThreadSafetyMode.None); + public ref CUtlVector TimelineEvents { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF1185F93C91CDDC3)); + get => ref _Handle.AsRef>(_TimelineEventsOffset.Value); } + private static readonly Lazy _WaitForChildOutflowsOffset = new(() => Schema.GetOffset(0xF1185F933F8E29C6), LazyThreadSafetyMode.None); + public ref bool WaitForChildOutflows { - get => ref _Handle.AsRef(Schema.GetOffset(0xF1185F933F8E29C6)); + get => ref _Handle.AsRef(_WaitForChildOutflowsOffset.Value); } + private static readonly Lazy _OnFinishedOffset = new(() => Schema.GetOffset(0xF1185F938D903E5E), LazyThreadSafetyMode.None); + public CPulse_ResumePoint OnFinished { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0xF1185F938D903E5E)); + get => new CPulse_ResumePointImpl(_Handle + _OnFinishedOffset.Value); } + private static readonly Lazy _OnCanceledOffset = new(() => Schema.GetOffset(0xF1185F93F02162DB), LazyThreadSafetyMode.None); + public CPulse_ResumePoint OnCanceled { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0xF1185F93F02162DB)); + get => new CPulse_ResumePointImpl(_Handle + _OnCanceledOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Timeline__TimelineEvent_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Timeline__TimelineEvent_tImpl.cs index b1821f2be..5cc7f85f1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Timeline__TimelineEvent_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Timeline__TimelineEvent_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPulseCell_Timeline__TimelineEvent_tImpl : SchemaClass, C public CPulseCell_Timeline__TimelineEvent_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TimeFromPreviousOffset = new(() => Schema.GetOffset(0x1CEAA89BD23FC4AF), LazyThreadSafetyMode.None); + public ref float TimeFromPrevious { - get => ref _Handle.AsRef(Schema.GetOffset(0x1CEAA89BD23FC4AF)); + get => ref _Handle.AsRef(_TimeFromPreviousOffset.Value); } + private static readonly Lazy _EventOutflowOffset = new(() => Schema.GetOffset(0x1CEAA89BC72D3231), LazyThreadSafetyMode.None); + public CPulse_OutflowConnection EventOutflow { - get => new CPulse_OutflowConnectionImpl(_Handle + Schema.GetOffset(0x1CEAA89BC72D3231)); + get => new CPulse_OutflowConnectionImpl(_Handle + _EventOutflowOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_UnknownImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_UnknownImpl.cs index 126caf6dc..e9d8d636d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_UnknownImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_UnknownImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_UnknownImpl : CPulseCell_BaseImpl, CPulseCell_ public CPulseCell_UnknownImpl(nint handle) : base(handle) { } + private static readonly Lazy _UnknownKeysOffset = new(() => Schema.GetOffset(0xEA868E8A1EC86FF9), LazyThreadSafetyMode.None); + public SchemaUntypedField UnknownKeys { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xEA868E8A1EC86FF9)); + get => new SchemaUntypedField(_Handle + _UnknownKeysOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Val_TestDomainFindEntityByNameImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Val_TestDomainFindEntityByNameImpl.cs index bdf90c797..bd76addd7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Val_TestDomainFindEntityByNameImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Val_TestDomainFindEntityByNameImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Val_TestDomainGetEntityNameImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Val_TestDomainGetEntityNameImpl.cs index e6c9830d2..13af02b19 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Val_TestDomainGetEntityNameImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Val_TestDomainGetEntityNameImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_CurveImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_CurveImpl.cs index 273b2b07d..26b8cc02f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_CurveImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_CurveImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_Value_CurveImpl : CPulseCell_BaseValueImpl, CP public CPulseCell_Value_CurveImpl(nint handle) : base(handle) { } + private static readonly Lazy _CurveOffset = new(() => Schema.GetOffset(0x63C5632D3389BB94), LazyThreadSafetyMode.None); + public SchemaUntypedField Curve { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x63C5632D3389BB94)); + get => new SchemaUntypedField(_Handle + _CurveOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_GradientImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_GradientImpl.cs index 0f3907401..44e182882 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_GradientImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_GradientImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_Value_GradientImpl : CPulseCell_BaseValueImpl, public CPulseCell_Value_GradientImpl(nint handle) : base(handle) { } + private static readonly Lazy _GradientOffset = new(() => Schema.GetOffset(0x67D602E05C95F25), LazyThreadSafetyMode.None); + public SchemaUntypedField Gradient { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x67D602E05C95F25)); + get => new SchemaUntypedField(_Handle + _GradientOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_RandomFloatImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_RandomFloatImpl.cs index 8124858ca..c5548df89 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_RandomFloatImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_RandomFloatImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_RandomIntImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_RandomIntImpl.cs index 69e3f5cd2..f1c0e5575 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_RandomIntImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_RandomIntImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_TestValue50Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_TestValue50Impl.cs index 61869cd58..56f1ed0b2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_TestValue50Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_Value_TestValue50Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_WaitForCursorsWithTagBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_WaitForCursorsWithTagBaseImpl.cs index c56c62302..ca4789cd2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_WaitForCursorsWithTagBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_WaitForCursorsWithTagBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPulseCell_WaitForCursorsWithTagBaseImpl : CPulseCell_Bas public CPulseCell_WaitForCursorsWithTagBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _CursorsAllowedToWaitOffset = new(() => Schema.GetOffset(0xA8108DB0236617EC), LazyThreadSafetyMode.None); + public ref int CursorsAllowedToWait { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8108DB0236617EC)); + get => ref _Handle.AsRef(_CursorsAllowedToWaitOffset.Value); } + private static readonly Lazy _WaitCompleteOffset = new(() => Schema.GetOffset(0xA8108DB02C41AD97), LazyThreadSafetyMode.None); + public CPulse_ResumePoint WaitComplete { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0xA8108DB02C41AD97)); + get => new CPulse_ResumePointImpl(_Handle + _WaitCompleteOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_WaitForCursorsWithTagBase__CursorState_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_WaitForCursorsWithTagBase__CursorState_tImpl.cs index f47dab2f7..cc82f6a00 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_WaitForCursorsWithTagBase__CursorState_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_WaitForCursorsWithTagBase__CursorState_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseCell_WaitForCursorsWithTagBase__CursorState_tImpl : public CPulseCell_WaitForCursorsWithTagBase__CursorState_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TagNameOffset = new(() => Schema.GetOffset(0x71EA6190647DC278), LazyThreadSafetyMode.None); + public SchemaUntypedField TagName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x71EA6190647DC278)); + get => new SchemaUntypedField(_Handle + _TagNameOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_WaitForCursorsWithTagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_WaitForCursorsWithTagImpl.cs index 0bce58e1d..fb75ddfed 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_WaitForCursorsWithTagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_WaitForCursorsWithTagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPulseCell_WaitForCursorsWithTagImpl : CPulseCell_WaitFor public CPulseCell_WaitForCursorsWithTagImpl(nint handle) : base(handle) { } + private static readonly Lazy _TagSelfWhenCompleteOffset = new(() => Schema.GetOffset(0x550BA6FDA17E8F0E), LazyThreadSafetyMode.None); + public ref bool TagSelfWhenComplete { - get => ref _Handle.AsRef(Schema.GetOffset(0x550BA6FDA17E8F0E)); + get => ref _Handle.AsRef(_TagSelfWhenCompleteOffset.Value); } + private static readonly Lazy _DesiredKillPriorityOffset = new(() => Schema.GetOffset(0x550BA6FD341BA991), LazyThreadSafetyMode.None); + public ref PulseCursorCancelPriority_t DesiredKillPriority { - get => ref _Handle.AsRef(Schema.GetOffset(0x550BA6FD341BA991)); + get => ref _Handle.AsRef(_DesiredKillPriorityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_WaitForObservableImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_WaitForObservableImpl.cs index 70d4e2a0e..7e68ee824 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_WaitForObservableImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCell_WaitForObservableImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPulseCell_WaitForObservableImpl : CPulseCell_BaseYieldin public CPulseCell_WaitForObservableImpl(nint handle) : base(handle) { } + private static readonly Lazy _ConditionOffset = new(() => Schema.GetOffset(0xE6EB02CD5F2A883E), LazyThreadSafetyMode.None); + public PulseObservableBoolExpression_t Condition { - get => new PulseObservableBoolExpression_tImpl(_Handle + Schema.GetOffset(0xE6EB02CD5F2A883E)); + get => new PulseObservableBoolExpression_tImpl(_Handle + _ConditionOffset.Value); } + private static readonly Lazy _OnTrueOffset = new(() => Schema.GetOffset(0xE6EB02CD6EAE5D88), LazyThreadSafetyMode.None); + public CPulse_ResumePoint OnTrue { - get => new CPulse_ResumePointImpl(_Handle + Schema.GetOffset(0xE6EB02CD6EAE5D88)); + get => new CPulse_ResumePointImpl(_Handle + _OnTrueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCursorFuncsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCursorFuncsImpl.cs index 10056870a..360c85c3d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCursorFuncsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseCursorFuncsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseExecCursorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseExecCursorImpl.cs index f7e124019..75b7e8609 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseExecCursorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseExecCursorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseFuncs_GameParticleManagerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseFuncs_GameParticleManagerImpl.cs index 01bb2ec4d..33796a86f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseFuncs_GameParticleManagerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseFuncs_GameParticleManagerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGameBlackboardImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGameBlackboardImpl.cs index 000f00c7b..243600a9a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGameBlackboardImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGameBlackboardImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,19 +17,23 @@ internal partial class CPulseGameBlackboardImpl : CBaseEntityImpl, CPulseGameBla public CPulseGameBlackboardImpl(nint handle) : base(handle) { } + private static readonly Lazy _StrGraphNameOffset = new(() => Schema.GetOffset(0xF9A17A20C99E48AF), LazyThreadSafetyMode.None); + public string StrGraphName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF9A17A20C99E48AF)); + var ptr = _Handle.Read(_StrGraphNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF9A17A20C99E48AF, value); + set => Schema.SetString(_Handle, _StrGraphNameOffset.Value, value); } + private static readonly Lazy _StrStateBlobOffset = new(() => Schema.GetOffset(0xF9A17A2046708C2A), LazyThreadSafetyMode.None); + public string StrStateBlob { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF9A17A2046708C2A)); + var ptr = _Handle.Read(_StrStateBlobOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF9A17A2046708C2A, value); + set => Schema.SetString(_Handle, _StrStateBlobOffset.Value, value); } public void StrGraphNameUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphDefImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphDefImpl.cs index 61d71f193..f041a5f1e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphDefImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphDefImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,47 +17,75 @@ internal partial class CPulseGraphDefImpl : SchemaClass, CPulseGraphDef { public CPulseGraphDefImpl(nint handle) : base(handle) { } + private static readonly Lazy _DomainIdentifierOffset = new(() => Schema.GetOffset(0x2A792CD89A57EDFA), LazyThreadSafetyMode.None); + public SchemaUntypedField DomainIdentifier { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x2A792CD89A57EDFA)); + get => new SchemaUntypedField(_Handle + _DomainIdentifierOffset.Value); } + private static readonly Lazy _DomainSubTypeOffset = new(() => Schema.GetOffset(0x2A792CD83A580FB9), LazyThreadSafetyMode.None); + public SchemaUntypedField DomainSubType { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x2A792CD83A580FB9)); + get => new SchemaUntypedField(_Handle + _DomainSubTypeOffset.Value); } + private static readonly Lazy _ParentMapNameOffset = new(() => Schema.GetOffset(0x2A792CD8A9A81AA2), LazyThreadSafetyMode.None); + public SchemaUntypedField ParentMapName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x2A792CD8A9A81AA2)); + get => new SchemaUntypedField(_Handle + _ParentMapNameOffset.Value); } + private static readonly Lazy _ParentXmlNameOffset = new(() => Schema.GetOffset(0x2A792CD80689878D), LazyThreadSafetyMode.None); + public SchemaUntypedField ParentXmlName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x2A792CD80689878D)); + get => new SchemaUntypedField(_Handle + _ParentXmlNameOffset.Value); } + private static readonly Lazy _ChunksOffset = new(() => Schema.GetOffset(0x2A792CD8CCAED623), LazyThreadSafetyMode.None); + public ref CUtlVector> Chunks { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x2A792CD8CCAED623)); + get => ref _Handle.AsRef>>(_ChunksOffset.Value); } + private static readonly Lazy _CellsOffset = new(() => Schema.GetOffset(0x2A792CD8739C8132), LazyThreadSafetyMode.None); + public ref CUtlVector> Cells { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x2A792CD8739C8132)); + get => ref _Handle.AsRef>>(_CellsOffset.Value); } + private static readonly Lazy _VarsOffset = new(() => Schema.GetOffset(0x2A792CD8845ACC37), LazyThreadSafetyMode.None); + public ref CUtlVector Vars { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2A792CD8845ACC37)); + get => ref _Handle.AsRef>(_VarsOffset.Value); } + private static readonly Lazy _PublicOutputsOffset = new(() => Schema.GetOffset(0x2A792CD8F0A9E7DA), LazyThreadSafetyMode.None); + public ref CUtlVector PublicOutputs { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2A792CD8F0A9E7DA)); + get => ref _Handle.AsRef>(_PublicOutputsOffset.Value); } + private static readonly Lazy _InvokeBindingsOffset = new(() => Schema.GetOffset(0x2A792CD8828E222B), LazyThreadSafetyMode.None); + public ref CUtlVector> InvokeBindings { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x2A792CD8828E222B)); + get => ref _Handle.AsRef>>(_InvokeBindingsOffset.Value); } + private static readonly Lazy _CallInfosOffset = new(() => Schema.GetOffset(0x2A792CD8EBB65CE6), LazyThreadSafetyMode.None); + public ref CUtlVector> CallInfos { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x2A792CD8EBB65CE6)); + get => ref _Handle.AsRef>>(_CallInfosOffset.Value); } + private static readonly Lazy _ConstantsOffset = new(() => Schema.GetOffset(0x2A792CD83ACB72E2), LazyThreadSafetyMode.None); + public ref CUtlVector Constants { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2A792CD83ACB72E2)); + get => ref _Handle.AsRef>(_ConstantsOffset.Value); } + private static readonly Lazy _DomainValuesOffset = new(() => Schema.GetOffset(0x2A792CD8AA783E57), LazyThreadSafetyMode.None); + public ref CUtlVector DomainValues { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2A792CD8AA783E57)); + get => ref _Handle.AsRef>(_DomainValuesOffset.Value); } + private static readonly Lazy _BlackboardReferencesOffset = new(() => Schema.GetOffset(0x2A792CD8AC9DF456), LazyThreadSafetyMode.None); + public ref CUtlVector BlackboardReferences { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2A792CD8AC9DF456)); + get => ref _Handle.AsRef>(_BlackboardReferencesOffset.Value); } + private static readonly Lazy _OutputConnectionsOffset = new(() => Schema.GetOffset(0x2A792CD843CD6C85), LazyThreadSafetyMode.None); + public ref CUtlVector> OutputConnections { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x2A792CD843CD6C85)); + get => ref _Handle.AsRef>>(_OutputConnectionsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphExecutionHistoryImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphExecutionHistoryImpl.cs index 5aa01bc7b..f52cd7156 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphExecutionHistoryImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphExecutionHistoryImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class CPulseGraphExecutionHistoryImpl : SchemaClass, CPulseGrap public CPulseGraphExecutionHistoryImpl(nint handle) : base(handle) { } + private static readonly Lazy _InstanceIDOffset = new(() => Schema.GetOffset(0x2DC54ABB24192813), LazyThreadSafetyMode.None); + public PulseGraphInstanceID_t InstanceID { - get => new PulseGraphInstanceID_tImpl(_Handle + Schema.GetOffset(0x2DC54ABB24192813)); + get => new PulseGraphInstanceID_tImpl(_Handle + _InstanceIDOffset.Value); } + private static readonly Lazy _StrFileNameOffset = new(() => Schema.GetOffset(0x2DC54ABB51B717E5), LazyThreadSafetyMode.None); + public string StrFileName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x2DC54ABB51B717E5)); + var ptr = _Handle.Read(_StrFileNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x2DC54ABB51B717E5, value); + set => Schema.SetString(_Handle, _StrFileNameOffset.Value, value); } + private static readonly Lazy _HistoryOffset = new(() => Schema.GetOffset(0x2DC54ABBCFBC2CBF), LazyThreadSafetyMode.None); + public ref CUtlVector> History { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x2DC54ABBCFBC2CBF)); + get => ref _Handle.AsRef>>(_HistoryOffset.Value); } + private static readonly Lazy _MapCellDescOffset = new(() => Schema.GetOffset(0x2DC54ABB7E9FEC74), LazyThreadSafetyMode.None); + public SchemaUntypedField MapCellDesc { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x2DC54ABB7E9FEC74)); + get => new SchemaUntypedField(_Handle + _MapCellDescOffset.Value); } + private static readonly Lazy _MapCursorDescOffset = new(() => Schema.GetOffset(0x2DC54ABBED035BB6), LazyThreadSafetyMode.None); + public SchemaUntypedField MapCursorDesc { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x2DC54ABBED035BB6)); + get => new SchemaUntypedField(_Handle + _MapCursorDescOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_GameBlackboardImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_GameBlackboardImpl.cs index 8f1f72fd2..2bb918a31 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_GameBlackboardImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_GameBlackboardImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_ServerEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_ServerEntityImpl.cs index e6f2a5c0d..c86bc13fe 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_ServerEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_ServerEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,39 +17,51 @@ internal partial class CPulseGraphInstance_ServerEntityImpl : CBasePulseGraphIns public CPulseGraphInstance_ServerEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _OwnerOffset = new(() => Schema.GetOffset(0x6DFF458BF6D89572), LazyThreadSafetyMode.None); + public ref CHandle Owner { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6DFF458BF6D89572)); + get => ref _Handle.AsRef>(_OwnerOffset.Value); } + private static readonly Lazy _ActivatedOffset = new(() => Schema.GetOffset(0x6DFF458BF8E37A5C), LazyThreadSafetyMode.None); + public ref bool Activated { - get => ref _Handle.AsRef(Schema.GetOffset(0x6DFF458BF8E37A5C)); + get => ref _Handle.AsRef(_ActivatedOffset.Value); } + private static readonly Lazy _NameFixupStaticPrefixOffset = new(() => Schema.GetOffset(0x6DFF458BFFD2D6AB), LazyThreadSafetyMode.None); + public string NameFixupStaticPrefix { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6DFF458BFFD2D6AB)); + var ptr = _Handle.Read(_NameFixupStaticPrefixOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6DFF458BFFD2D6AB, value); + set => Schema.SetString(_Handle, _NameFixupStaticPrefixOffset.Value, value); } + private static readonly Lazy _NameFixupParentOffset = new(() => Schema.GetOffset(0x6DFF458B7B08ECF1), LazyThreadSafetyMode.None); + public string NameFixupParent { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6DFF458B7B08ECF1)); + var ptr = _Handle.Read(_NameFixupParentOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6DFF458B7B08ECF1, value); + set => Schema.SetString(_Handle, _NameFixupParentOffset.Value, value); } + private static readonly Lazy _NameFixupLocalOffset = new(() => Schema.GetOffset(0x6DFF458B508F29A4), LazyThreadSafetyMode.None); + public string NameFixupLocal { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6DFF458B508F29A4)); + var ptr = _Handle.Read(_NameFixupLocalOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6DFF458B508F29A4, value); + set => Schema.SetString(_Handle, _NameFixupLocalOffset.Value, value); } + private static readonly Lazy _ProceduralWorldNameForRelaysOffset = new(() => Schema.GetOffset(0x6DFF458B05373F31), LazyThreadSafetyMode.None); + public string ProceduralWorldNameForRelays { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6DFF458B05373F31)); + var ptr = _Handle.Read(_ProceduralWorldNameForRelaysOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6DFF458B05373F31, value); + set => Schema.SetString(_Handle, _ProceduralWorldNameForRelaysOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TestDomainImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TestDomainImpl.cs index b2a8a009d..fbbf59f4d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TestDomainImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TestDomainImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class CPulseGraphInstance_TestDomainImpl : CBasePulseGraphInsta public CPulseGraphInstance_TestDomainImpl(nint handle) : base(handle) { } + private static readonly Lazy _IsRunningUnitTestsOffset = new(() => Schema.GetOffset(0x1731648B356A8543), LazyThreadSafetyMode.None); + public ref bool IsRunningUnitTests { - get => ref _Handle.AsRef(Schema.GetOffset(0x1731648B356A8543)); + get => ref _Handle.AsRef(_IsRunningUnitTestsOffset.Value); } + private static readonly Lazy _ExplicitTimeSteppingOffset = new(() => Schema.GetOffset(0x1731648BBDBCBA9A), LazyThreadSafetyMode.None); + public ref bool ExplicitTimeStepping { - get => ref _Handle.AsRef(Schema.GetOffset(0x1731648BBDBCBA9A)); + get => ref _Handle.AsRef(_ExplicitTimeSteppingOffset.Value); } + private static readonly Lazy _ExpectingToDestroyWithYieldedCursorsOffset = new(() => Schema.GetOffset(0x1731648B8134CF7A), LazyThreadSafetyMode.None); + public ref bool ExpectingToDestroyWithYieldedCursors { - get => ref _Handle.AsRef(Schema.GetOffset(0x1731648B8134CF7A)); + get => ref _Handle.AsRef(_ExpectingToDestroyWithYieldedCursorsOffset.Value); } + private static readonly Lazy _QuietTracepointsOffset = new(() => Schema.GetOffset(0x1731648B8C15006B), LazyThreadSafetyMode.None); + public ref bool QuietTracepoints { - get => ref _Handle.AsRef(Schema.GetOffset(0x1731648B8C15006B)); + get => ref _Handle.AsRef(_QuietTracepointsOffset.Value); } + private static readonly Lazy _ExpectingCursorTerminatedDueToMaxInstructionsOffset = new(() => Schema.GetOffset(0x1731648BF984A235), LazyThreadSafetyMode.None); + public ref bool ExpectingCursorTerminatedDueToMaxInstructions { - get => ref _Handle.AsRef(Schema.GetOffset(0x1731648BF984A235)); + get => ref _Handle.AsRef(_ExpectingCursorTerminatedDueToMaxInstructionsOffset.Value); } + private static readonly Lazy _CursorsTerminatedDueToMaxInstructionsOffset = new(() => Schema.GetOffset(0x1731648B8061C3CB), LazyThreadSafetyMode.None); + public ref int CursorsTerminatedDueToMaxInstructions { - get => ref _Handle.AsRef(Schema.GetOffset(0x1731648B8061C3CB)); + get => ref _Handle.AsRef(_CursorsTerminatedDueToMaxInstructionsOffset.Value); } + private static readonly Lazy _NextValidateIndexOffset = new(() => Schema.GetOffset(0x1731648B5AE2F20E), LazyThreadSafetyMode.None); + public ref int NextValidateIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x1731648B5AE2F20E)); + get => ref _Handle.AsRef(_NextValidateIndexOffset.Value); } + private static readonly Lazy _TracepointsOffset = new(() => Schema.GetOffset(0x1731648B04FCE4C9), LazyThreadSafetyMode.None); + public ref CUtlVector Tracepoints { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1731648B04FCE4C9)); + get => ref _Handle.AsRef>(_TracepointsOffset.Value); } + private static readonly Lazy _TestYesOrNoPathOffset = new(() => Schema.GetOffset(0x1731648B1322BA21), LazyThreadSafetyMode.None); + public ref bool TestYesOrNoPath { - get => ref _Handle.AsRef(Schema.GetOffset(0x1731648B1322BA21)); + get => ref _Handle.AsRef(_TestYesOrNoPathOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TestDomain_DerivedImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TestDomain_DerivedImpl.cs index 022929822..ba1ad3cd3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TestDomain_DerivedImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TestDomain_DerivedImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CPulseGraphInstance_TestDomain_DerivedImpl : CPulseGraphI public CPulseGraphInstance_TestDomain_DerivedImpl(nint handle) : base(handle) { } + private static readonly Lazy _InstanceValueXOffset = new(() => Schema.GetOffset(0x439D00CDD2DC0135), LazyThreadSafetyMode.None); + public ref int InstanceValueX { - get => ref _Handle.AsRef(Schema.GetOffset(0x439D00CDD2DC0135)); + get => ref _Handle.AsRef(_InstanceValueXOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TestDomain_FakeEntityOwnerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TestDomain_FakeEntityOwnerImpl.cs index 30f265a49..f3ab8186f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TestDomain_FakeEntityOwnerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TestDomain_FakeEntityOwnerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TestDomain_UseReadOnlyBlackboardViewImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TestDomain_UseReadOnlyBlackboardViewImpl.cs index df2326f5d..a151de04b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TestDomain_UseReadOnlyBlackboardViewImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TestDomain_UseReadOnlyBlackboardViewImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TurtleGraphicsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TurtleGraphicsImpl.cs index 89e622786..a0a4545fc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TurtleGraphicsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseGraphInstance_TurtleGraphicsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseMathlibImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseMathlibImpl.cs index 5474882d0..c115745a9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseMathlibImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseMathlibImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulsePhysicsConstraintsFuncsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulsePhysicsConstraintsFuncsImpl.cs index 833e95e1e..cf400c5da 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulsePhysicsConstraintsFuncsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulsePhysicsConstraintsFuncsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseRuntimeMethodArgImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseRuntimeMethodArgImpl.cs index 231f19b1c..8eb6d3d93 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseRuntimeMethodArgImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseRuntimeMethodArgImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class CPulseRuntimeMethodArgImpl : SchemaClass, CPulseRuntimeMe public CPulseRuntimeMethodArgImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xA8B175BCCAE8A266), LazyThreadSafetyMode.None); + public SchemaUntypedField Name { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA8B175BCCAE8A266)); + get => new SchemaUntypedField(_Handle + _NameOffset.Value); } + private static readonly Lazy _DescriptionOffset = new(() => Schema.GetOffset(0xA8B175BC678744E9), LazyThreadSafetyMode.None); + public string Description { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA8B175BC678744E9)); + var ptr = _Handle.Read(_DescriptionOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA8B175BC678744E9, value); + set => Schema.SetString(_Handle, _DescriptionOffset.Value, value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0xA8B175BC8ED6D5CD), LazyThreadSafetyMode.None); + public SchemaUntypedField Type { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA8B175BC8ED6D5CD)); + get => new SchemaUntypedField(_Handle + _TypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseServerCursorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseServerCursorImpl.cs index 0716fa269..eb40fbbd9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseServerCursorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseServerCursorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPulseServerCursorImpl : CPulseExecCursorImpl, CPulseServ public CPulseServerCursorImpl(nint handle) : base(handle) { } + private static readonly Lazy _ActivatorOffset = new(() => Schema.GetOffset(0x4FFA7BD2AB093BB2), LazyThreadSafetyMode.None); + public ref CHandle Activator { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4FFA7BD2AB093BB2)); + get => ref _Handle.AsRef>(_ActivatorOffset.Value); } + private static readonly Lazy _CallerOffset = new(() => Schema.GetOffset(0x4FFA7BD23F9735FC), LazyThreadSafetyMode.None); + public ref CHandle Caller { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4FFA7BD23F9735FC)); + get => ref _Handle.AsRef>(_CallerOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseServerFuncsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseServerFuncsImpl.cs index 31f26a433..eaa316cb8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseServerFuncsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseServerFuncsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseServerFuncs_SoundsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseServerFuncs_SoundsImpl.cs index f73557643..98ee16cf9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseServerFuncs_SoundsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseServerFuncs_SoundsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseTestFuncs_LibraryAImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseTestFuncs_LibraryAImpl.cs index 2d98b1d60..24fb7ff1e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseTestFuncs_LibraryAImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseTestFuncs_LibraryAImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseTestScriptLibImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseTestScriptLibImpl.cs index 75351392f..b7bb4d6cb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseTestScriptLibImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseTestScriptLibImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseTurtleGraphicsCursorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseTurtleGraphicsCursorImpl.cs index e1ba5124b..3b6458797 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseTurtleGraphicsCursorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulseTurtleGraphicsCursorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CPulseTurtleGraphicsCursorImpl : CPulseExecCursorImpl, CP public CPulseTurtleGraphicsCursorImpl(nint handle) : base(handle) { } + private static readonly Lazy _ColorOffset = new(() => Schema.GetOffset(0x6153058ED7D017D8), LazyThreadSafetyMode.None); + public ref Color Color { - get => ref _Handle.AsRef(Schema.GetOffset(0x6153058ED7D017D8)); + get => ref _Handle.AsRef(_ColorOffset.Value); } + private static readonly Lazy _PosOffset = new(() => Schema.GetOffset(0x6153058EDE9CFC5D), LazyThreadSafetyMode.None); + public ref Vector2D Pos { - get => ref _Handle.AsRef(Schema.GetOffset(0x6153058EDE9CFC5D)); + get => ref _Handle.AsRef(_PosOffset.Value); } + private static readonly Lazy _HeadingDegOffset = new(() => Schema.GetOffset(0x6153058E63288B7D), LazyThreadSafetyMode.None); + public ref float HeadingDeg { - get => ref _Handle.AsRef(Schema.GetOffset(0x6153058E63288B7D)); + get => ref _Handle.AsRef(_HeadingDegOffset.Value); } + private static readonly Lazy _PenUpOffset = new(() => Schema.GetOffset(0x6153058E2252C6FD), LazyThreadSafetyMode.None); + public ref bool PenUp { - get => ref _Handle.AsRef(Schema.GetOffset(0x6153058E2252C6FD)); + get => ref _Handle.AsRef(_PenUpOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_BlackboardReferenceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_BlackboardReferenceImpl.cs index e2c3e2e03..6ee0c6dbb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_BlackboardReferenceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_BlackboardReferenceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CPulse_BlackboardReferenceImpl : SchemaClass, CPulse_Blac public CPulse_BlackboardReferenceImpl(nint handle) : base(handle) { } + private static readonly Lazy _BlackboardResourceOffset = new(() => Schema.GetOffset(0xEF83970A45E704DE), LazyThreadSafetyMode.None); + public ref CStrongHandle BlackboardResource { - get => ref _Handle.AsRef>(Schema.GetOffset(0xEF83970A45E704DE)); + get => ref _Handle.AsRef>(_BlackboardResourceOffset.Value); } + private static readonly Lazy _BlackboardResource1Offset = new(() => Schema.GetOffset(0xEF83970A83127470), LazyThreadSafetyMode.None); + public SchemaUntypedField BlackboardResource1 { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xEF83970A83127470)); + get => new SchemaUntypedField(_Handle + _BlackboardResource1Offset.Value); } + private static readonly Lazy _NodeIDOffset = new(() => Schema.GetOffset(0xEF83970A0FD6755C), LazyThreadSafetyMode.None); + public PulseDocNodeID_t NodeID { - get => new PulseDocNodeID_tImpl(_Handle + Schema.GetOffset(0xEF83970A0FD6755C)); + get => new PulseDocNodeID_tImpl(_Handle + _NodeIDOffset.Value); } + private static readonly Lazy _NodeNameOffset = new(() => Schema.GetOffset(0xEF83970A3FB4DAAE), LazyThreadSafetyMode.None); + public ref CGlobalSymbol NodeName { - get => ref _Handle.AsRef(Schema.GetOffset(0xEF83970A3FB4DAAE)); + get => ref _Handle.AsRef(_NodeNameOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_CallInfoImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_CallInfoImpl.cs index 947f8fa15..cd420b1ba 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_CallInfoImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_CallInfoImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CPulse_CallInfoImpl : SchemaClass, CPulse_CallInfo { public CPulse_CallInfoImpl(nint handle) : base(handle) { } + private static readonly Lazy _PortNameOffset = new(() => Schema.GetOffset(0x6ADF88D807237B65), LazyThreadSafetyMode.None); + public SchemaUntypedField PortName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x6ADF88D807237B65)); + get => new SchemaUntypedField(_Handle + _PortNameOffset.Value); } + private static readonly Lazy _EditorNodeIDOffset = new(() => Schema.GetOffset(0x6ADF88D88D964CBD), LazyThreadSafetyMode.None); + public PulseDocNodeID_t EditorNodeID { - get => new PulseDocNodeID_tImpl(_Handle + Schema.GetOffset(0x6ADF88D88D964CBD)); + get => new PulseDocNodeID_tImpl(_Handle + _EditorNodeIDOffset.Value); } + private static readonly Lazy _RegisterMapOffset = new(() => Schema.GetOffset(0x6ADF88D87BD4CE96), LazyThreadSafetyMode.None); + public PulseRegisterMap_t RegisterMap { - get => new PulseRegisterMap_tImpl(_Handle + Schema.GetOffset(0x6ADF88D87BD4CE96)); + get => new PulseRegisterMap_tImpl(_Handle + _RegisterMapOffset.Value); } + private static readonly Lazy _CallMethodIDOffset = new(() => Schema.GetOffset(0x6ADF88D805714471), LazyThreadSafetyMode.None); + public PulseDocNodeID_t CallMethodID { - get => new PulseDocNodeID_tImpl(_Handle + Schema.GetOffset(0x6ADF88D805714471)); + get => new PulseDocNodeID_tImpl(_Handle + _CallMethodIDOffset.Value); } + private static readonly Lazy _SrcChunkOffset = new(() => Schema.GetOffset(0x6ADF88D8313F814A), LazyThreadSafetyMode.None); + public PulseRuntimeChunkIndex_t SrcChunk { - get => new PulseRuntimeChunkIndex_tImpl(_Handle + Schema.GetOffset(0x6ADF88D8313F814A)); + get => new PulseRuntimeChunkIndex_tImpl(_Handle + _SrcChunkOffset.Value); } + private static readonly Lazy _SrcInstructionOffset = new(() => Schema.GetOffset(0x6ADF88D899E09AE7), LazyThreadSafetyMode.None); + public ref int SrcInstruction { - get => ref _Handle.AsRef(Schema.GetOffset(0x6ADF88D899E09AE7)); + get => ref _Handle.AsRef(_SrcInstructionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_ChunkImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_ChunkImpl.cs index 64f2aa1bd..bc4d92da4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_ChunkImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_ChunkImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CPulse_ChunkImpl : SchemaClass, CPulse_Chunk { public CPulse_ChunkImpl(nint handle) : base(handle) { } + private static readonly Lazy _InstructionsOffset = new(() => Schema.GetOffset(0x816932094D358BC4), LazyThreadSafetyMode.None); + public ref CUtlLeanVector Instructions { - get => ref _Handle.AsRef>(Schema.GetOffset(0x816932094D358BC4)); + get => ref _Handle.AsRef>(_InstructionsOffset.Value); } + private static readonly Lazy _RegistersOffset = new(() => Schema.GetOffset(0x81693209BB828A49), LazyThreadSafetyMode.None); + public ref CUtlLeanVector Registers { - get => ref _Handle.AsRef>(Schema.GetOffset(0x81693209BB828A49)); + get => ref _Handle.AsRef>(_RegistersOffset.Value); } + private static readonly Lazy _InstructionEditorIDsOffset = new(() => Schema.GetOffset(0x81693209236D8B64), LazyThreadSafetyMode.None); + public ref CUtlLeanVector InstructionEditorIDs { - get => ref _Handle.AsRef>(Schema.GetOffset(0x81693209236D8B64)); + get => ref _Handle.AsRef>(_InstructionEditorIDsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_ConstantImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_ConstantImpl.cs index 1281122ba..39c9e2cbd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_ConstantImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_ConstantImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CPulse_ConstantImpl : SchemaClass, CPulse_Constant { public CPulse_ConstantImpl(nint handle) : base(handle) { } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x28B1B9F08ED6D5CD), LazyThreadSafetyMode.None); + public SchemaUntypedField Type { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x28B1B9F08ED6D5CD)); + get => new SchemaUntypedField(_Handle + _TypeOffset.Value); } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x28B1B9F0DCB0894A), LazyThreadSafetyMode.None); + public SchemaUntypedField Value { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x28B1B9F0DCB0894A)); + get => new SchemaUntypedField(_Handle + _ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_DomainValueImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_DomainValueImpl.cs index 2bee75dbf..5d1e88d5e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_DomainValueImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_DomainValueImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CPulse_DomainValueImpl : SchemaClass, CPulse_DomainValue public CPulse_DomainValueImpl(nint handle) : base(handle) { } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x8F29D60118853D59), LazyThreadSafetyMode.None); + public ref PulseDomainValueType_t Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F29D60118853D59)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x8F29D601DCB0894A), LazyThreadSafetyMode.None); + public ref CGlobalSymbol Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F29D601DCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } + private static readonly Lazy _RequiredRuntimeTypeOffset = new(() => Schema.GetOffset(0x8F29D6013355393C), LazyThreadSafetyMode.None); + public SchemaUntypedField RequiredRuntimeType { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8F29D6013355393C)); + get => new SchemaUntypedField(_Handle + _RequiredRuntimeTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_InvokeBindingImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_InvokeBindingImpl.cs index 7950c47a0..7c1c6aa65 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_InvokeBindingImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_InvokeBindingImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CPulse_InvokeBindingImpl : SchemaClass, CPulse_InvokeBind public CPulse_InvokeBindingImpl(nint handle) : base(handle) { } + private static readonly Lazy _RegisterMapOffset = new(() => Schema.GetOffset(0x3632DF0D7BD4CE96), LazyThreadSafetyMode.None); + public PulseRegisterMap_t RegisterMap { - get => new PulseRegisterMap_tImpl(_Handle + Schema.GetOffset(0x3632DF0D7BD4CE96)); + get => new PulseRegisterMap_tImpl(_Handle + _RegisterMapOffset.Value); } + private static readonly Lazy _FuncNameOffset = new(() => Schema.GetOffset(0x3632DF0D1B5BC2A4), LazyThreadSafetyMode.None); + public SchemaUntypedField FuncName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x3632DF0D1B5BC2A4)); + get => new SchemaUntypedField(_Handle + _FuncNameOffset.Value); } + private static readonly Lazy _CellIndexOffset = new(() => Schema.GetOffset(0x3632DF0DACE41A7F), LazyThreadSafetyMode.None); + public PulseRuntimeCellIndex_t CellIndex { - get => new PulseRuntimeCellIndex_tImpl(_Handle + Schema.GetOffset(0x3632DF0DACE41A7F)); + get => new PulseRuntimeCellIndex_tImpl(_Handle + _CellIndexOffset.Value); } + private static readonly Lazy _SrcChunkOffset = new(() => Schema.GetOffset(0x3632DF0D313F814A), LazyThreadSafetyMode.None); + public PulseRuntimeChunkIndex_t SrcChunk { - get => new PulseRuntimeChunkIndex_tImpl(_Handle + Schema.GetOffset(0x3632DF0D313F814A)); + get => new PulseRuntimeChunkIndex_tImpl(_Handle + _SrcChunkOffset.Value); } + private static readonly Lazy _SrcInstructionOffset = new(() => Schema.GetOffset(0x3632DF0D99E09AE7), LazyThreadSafetyMode.None); + public ref int SrcInstruction { - get => ref _Handle.AsRef(Schema.GetOffset(0x3632DF0D99E09AE7)); + get => ref _Handle.AsRef(_SrcInstructionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_OutflowConnectionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_OutflowConnectionImpl.cs index 2299eb395..11d614080 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_OutflowConnectionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_OutflowConnectionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CPulse_OutflowConnectionImpl : SchemaClass, CPulse_Outflo public CPulse_OutflowConnectionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceOutflowNameOffset = new(() => Schema.GetOffset(0x58023C685EA2FFCF), LazyThreadSafetyMode.None); + public SchemaUntypedField SourceOutflowName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x58023C685EA2FFCF)); + get => new SchemaUntypedField(_Handle + _SourceOutflowNameOffset.Value); } + private static readonly Lazy _DestChunkOffset = new(() => Schema.GetOffset(0x58023C68D6AC502E), LazyThreadSafetyMode.None); + public PulseRuntimeChunkIndex_t DestChunk { - get => new PulseRuntimeChunkIndex_tImpl(_Handle + Schema.GetOffset(0x58023C68D6AC502E)); + get => new PulseRuntimeChunkIndex_tImpl(_Handle + _DestChunkOffset.Value); } + private static readonly Lazy _InstructionOffset = new(() => Schema.GetOffset(0x58023C6890E63133), LazyThreadSafetyMode.None); + public ref int Instruction { - get => ref _Handle.AsRef(Schema.GetOffset(0x58023C6890E63133)); + get => ref _Handle.AsRef(_InstructionOffset.Value); } + private static readonly Lazy _OutflowRegisterMapOffset = new(() => Schema.GetOffset(0x58023C68F89A90F8), LazyThreadSafetyMode.None); + public PulseRegisterMap_t OutflowRegisterMap { - get => new PulseRegisterMap_tImpl(_Handle + Schema.GetOffset(0x58023C68F89A90F8)); + get => new PulseRegisterMap_tImpl(_Handle + _OutflowRegisterMapOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_OutputConnectionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_OutputConnectionImpl.cs index 1a6ee4723..1103a1449 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_OutputConnectionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_OutputConnectionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CPulse_OutputConnectionImpl : SchemaClass, CPulse_OutputC public CPulse_OutputConnectionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceOutputOffset = new(() => Schema.GetOffset(0x6DEBCD452D46D7F5), LazyThreadSafetyMode.None); + public SchemaUntypedField SourceOutput { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x6DEBCD452D46D7F5)); + get => new SchemaUntypedField(_Handle + _SourceOutputOffset.Value); } + private static readonly Lazy _TargetEntityOffset = new(() => Schema.GetOffset(0x6DEBCD45948B1533), LazyThreadSafetyMode.None); + public SchemaUntypedField TargetEntity { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x6DEBCD45948B1533)); + get => new SchemaUntypedField(_Handle + _TargetEntityOffset.Value); } + private static readonly Lazy _TargetInputOffset = new(() => Schema.GetOffset(0x6DEBCD45F1A0003C), LazyThreadSafetyMode.None); + public SchemaUntypedField TargetInput { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x6DEBCD45F1A0003C)); + get => new SchemaUntypedField(_Handle + _TargetInputOffset.Value); } + private static readonly Lazy _ParamOffset = new(() => Schema.GetOffset(0x6DEBCD45E85FEBB2), LazyThreadSafetyMode.None); + public SchemaUntypedField Param { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x6DEBCD45E85FEBB2)); + get => new SchemaUntypedField(_Handle + _ParamOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_PublicOutputImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_PublicOutputImpl.cs index 2cc5d32b2..acff8cfe7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_PublicOutputImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_PublicOutputImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class CPulse_PublicOutputImpl : SchemaClass, CPulse_PublicOutpu public CPulse_PublicOutputImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x74B3BCA4CAE8A266), LazyThreadSafetyMode.None); + public SchemaUntypedField Name { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x74B3BCA4CAE8A266)); + get => new SchemaUntypedField(_Handle + _NameOffset.Value); } + private static readonly Lazy _DescriptionOffset = new(() => Schema.GetOffset(0x74B3BCA4678744E9), LazyThreadSafetyMode.None); + public string Description { get { - var ptr = _Handle.Read(Schema.GetOffset(0x74B3BCA4678744E9)); + var ptr = _Handle.Read(_DescriptionOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x74B3BCA4678744E9, value); + set => Schema.SetString(_Handle, _DescriptionOffset.Value, value); } + private static readonly Lazy _ArgsOffset = new(() => Schema.GetOffset(0x74B3BCA4DAB98BBC), LazyThreadSafetyMode.None); + public ref CUtlLeanVector Args { - get => ref _Handle.AsRef>(Schema.GetOffset(0x74B3BCA4DAB98BBC)); + get => ref _Handle.AsRef>(_ArgsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_RegisterInfoImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_RegisterInfoImpl.cs index d9ee96171..383c0fe61 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_RegisterInfoImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_RegisterInfoImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CPulse_RegisterInfoImpl : SchemaClass, CPulse_RegisterInf public CPulse_RegisterInfoImpl(nint handle) : base(handle) { } + private static readonly Lazy _RegOffset = new(() => Schema.GetOffset(0x8D60BE3D464A7749), LazyThreadSafetyMode.None); + public PulseRuntimeRegisterIndex_t Reg { - get => new PulseRuntimeRegisterIndex_tImpl(_Handle + Schema.GetOffset(0x8D60BE3D464A7749)); + get => new PulseRuntimeRegisterIndex_tImpl(_Handle + _RegOffset.Value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x8D60BE3D8ED6D5CD), LazyThreadSafetyMode.None); + public SchemaUntypedField Type { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8D60BE3D8ED6D5CD)); + get => new SchemaUntypedField(_Handle + _TypeOffset.Value); } + private static readonly Lazy _OriginNameOffset = new(() => Schema.GetOffset(0x8D60BE3D745ADAEC), LazyThreadSafetyMode.None); + public SchemaUntypedField OriginName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8D60BE3D745ADAEC)); + get => new SchemaUntypedField(_Handle + _OriginNameOffset.Value); } + private static readonly Lazy _WrittenByInstructionOffset = new(() => Schema.GetOffset(0x8D60BE3D5311609B), LazyThreadSafetyMode.None); + public ref int WrittenByInstruction { - get => ref _Handle.AsRef(Schema.GetOffset(0x8D60BE3D5311609B)); + get => ref _Handle.AsRef(_WrittenByInstructionOffset.Value); } + private static readonly Lazy _LastReadByInstructionOffset = new(() => Schema.GetOffset(0x8D60BE3D9D1961CC), LazyThreadSafetyMode.None); + public ref int LastReadByInstruction { - get => ref _Handle.AsRef(Schema.GetOffset(0x8D60BE3D9D1961CC)); + get => ref _Handle.AsRef(_LastReadByInstructionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_ResumePointImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_ResumePointImpl.cs index 0f1bcece3..836cbebfb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_ResumePointImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_ResumePointImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_VariableImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_VariableImpl.cs index 40a2c965f..2539a6a18 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_VariableImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPulse_VariableImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,33 +17,49 @@ internal partial class CPulse_VariableImpl : SchemaClass, CPulse_Variable { public CPulse_VariableImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x598DEA5CCAE8A266), LazyThreadSafetyMode.None); + public SchemaUntypedField Name { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x598DEA5CCAE8A266)); + get => new SchemaUntypedField(_Handle + _NameOffset.Value); } + private static readonly Lazy _DescriptionOffset = new(() => Schema.GetOffset(0x598DEA5C678744E9), LazyThreadSafetyMode.None); + public string Description { get { - var ptr = _Handle.Read(Schema.GetOffset(0x598DEA5C678744E9)); + var ptr = _Handle.Read(_DescriptionOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x598DEA5C678744E9, value); + set => Schema.SetString(_Handle, _DescriptionOffset.Value, value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x598DEA5C8ED6D5CD), LazyThreadSafetyMode.None); + public SchemaUntypedField Type { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x598DEA5C8ED6D5CD)); + get => new SchemaUntypedField(_Handle + _TypeOffset.Value); } + private static readonly Lazy _DefaultValueOffset = new(() => Schema.GetOffset(0x598DEA5CC6E9593F), LazyThreadSafetyMode.None); + public SchemaUntypedField DefaultValue { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x598DEA5CC6E9593F)); + get => new SchemaUntypedField(_Handle + _DefaultValueOffset.Value); } + private static readonly Lazy _KeysSourceOffset = new(() => Schema.GetOffset(0x598DEA5CE4356F4C), LazyThreadSafetyMode.None); + public ref PulseVariableKeysSource_t KeysSource { - get => ref _Handle.AsRef(Schema.GetOffset(0x598DEA5CE4356F4C)); + get => ref _Handle.AsRef(_KeysSourceOffset.Value); } + private static readonly Lazy _IsPublicBlackboardVariableOffset = new(() => Schema.GetOffset(0x598DEA5C9CD44561), LazyThreadSafetyMode.None); + public ref bool IsPublicBlackboardVariable { - get => ref _Handle.AsRef(Schema.GetOffset(0x598DEA5C9CD44561)); + get => ref _Handle.AsRef(_IsPublicBlackboardVariableOffset.Value); } + private static readonly Lazy _IsObservableOffset = new(() => Schema.GetOffset(0x598DEA5C60684D58), LazyThreadSafetyMode.None); + public ref bool IsObservable { - get => ref _Handle.AsRef(Schema.GetOffset(0x598DEA5C60684D58)); + get => ref _Handle.AsRef(_IsObservableOffset.Value); } + private static readonly Lazy _EditorNodeIDOffset = new(() => Schema.GetOffset(0x598DEA5C8D964CBD), LazyThreadSafetyMode.None); + public PulseDocNodeID_t EditorNodeID { - get => new PulseDocNodeID_tImpl(_Handle + Schema.GetOffset(0x598DEA5C8D964CBD)); + get => new PulseDocNodeID_tImpl(_Handle + _EditorNodeIDOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPushableImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPushableImpl.cs index 0a27a8795..9c12468ab 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPushableImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CPushableImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CQuaternionAnimParameterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CQuaternionAnimParameterImpl.cs index c6f53d8a5..4b377cffa 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CQuaternionAnimParameterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CQuaternionAnimParameterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CQuaternionAnimParameterImpl : CConcreteAnimParameterImpl public CQuaternionAnimParameterImpl(nint handle) : base(handle) { } + private static readonly Lazy _DefaultValueOffset = new(() => Schema.GetOffset(0xFAFCCCCABBE0341F), LazyThreadSafetyMode.None); + public ref Quaternion DefaultValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xFAFCCCCABBE0341F)); + get => ref _Handle.AsRef(_DefaultValueOffset.Value); } + private static readonly Lazy _InterpolateOffset = new(() => Schema.GetOffset(0xFAFCCCCAF6607650), LazyThreadSafetyMode.None); + public ref bool Interpolate { - get => ref _Handle.AsRef(Schema.GetOffset(0xFAFCCCCAF6607650)); + get => ref _Handle.AsRef(_InterpolateOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRR_ResponseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRR_ResponseImpl.cs index 2264a9004..971682942 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRR_ResponseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRR_ResponseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,51 +17,71 @@ internal partial class CRR_ResponseImpl : SchemaClass, CRR_Response { public CRR_ResponseImpl(nint handle) : base(handle) { } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x7B8008788ED6D5CD), LazyThreadSafetyMode.None); + public ref byte Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x7B8008788ED6D5CD)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _ResponseNameOffset = new(() => Schema.GetOffset(0x7B800878C2716964), LazyThreadSafetyMode.None); + public string ResponseName { get { - var ptr = _Handle + Schema.GetOffset(0x7B800878C2716964); + var ptr = _Handle + _ResponseNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x7B800878C2716964, value, 192); + set => Schema.SetFixedString(_Handle, _ResponseNameOffset.Value, value, 192); } + private static readonly Lazy _MatchingRuleOffset = new(() => Schema.GetOffset(0x7B80087820850239), LazyThreadSafetyMode.None); + public string MatchingRule { get { - var ptr = _Handle + Schema.GetOffset(0x7B80087820850239); + var ptr = _Handle + _MatchingRuleOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x7B80087820850239, value, 128); + set => Schema.SetFixedString(_Handle, _MatchingRuleOffset.Value, value, 128); } + private static readonly Lazy _ParamsOffset = new(() => Schema.GetOffset(0x7B800878900020D3), LazyThreadSafetyMode.None); + public ResponseParams Params { - get => new ResponseParamsImpl(_Handle + Schema.GetOffset(0x7B800878900020D3)); + get => new ResponseParamsImpl(_Handle + _ParamsOffset.Value); } + private static readonly Lazy _MatchScoreOffset = new(() => Schema.GetOffset(0x7B80087861BE6F08), LazyThreadSafetyMode.None); + public ref float MatchScore { - get => ref _Handle.AsRef(Schema.GetOffset(0x7B80087861BE6F08)); + get => ref _Handle.AsRef(_MatchScoreOffset.Value); } + private static readonly Lazy _AnyMatchingRulesInCooldownOffset = new(() => Schema.GetOffset(0x7B800878579F1BE7), LazyThreadSafetyMode.None); + public ref bool AnyMatchingRulesInCooldown { - get => ref _Handle.AsRef(Schema.GetOffset(0x7B800878579F1BE7)); + get => ref _Handle.AsRef(_AnyMatchingRulesInCooldownOffset.Value); } + private static readonly Lazy _SpeakerContextOffset = new(() => Schema.GetOffset(0x7B80087877C70A38), LazyThreadSafetyMode.None); + public string SpeakerContext { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7B80087877C70A38)); + var ptr = _Handle.Read(_SpeakerContextOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7B80087877C70A38, value); + set => Schema.SetString(_Handle, _SpeakerContextOffset.Value, value); } + private static readonly Lazy _WorldContextOffset = new(() => Schema.GetOffset(0x7B8008781DC998DF), LazyThreadSafetyMode.None); + public string WorldContext { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7B8008781DC998DF)); + var ptr = _Handle.Read(_WorldContextOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7B8008781DC998DF, value); + set => Schema.SetString(_Handle, _WorldContextOffset.Value, value); } + private static readonly Lazy _FollowupOffset = new(() => Schema.GetOffset(0x7B800878B1F72BFD), LazyThreadSafetyMode.None); + public ResponseFollowup Followup { - get => new ResponseFollowupImpl(_Handle + Schema.GetOffset(0x7B800878B1F72BFD)); + get => new ResponseFollowupImpl(_Handle + _FollowupOffset.Value); } + private static readonly Lazy _RecipientFilterOffset = new(() => Schema.GetOffset(0x7B800878CC301E4A), LazyThreadSafetyMode.None); + public SchemaUntypedField RecipientFilter { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x7B800878CC301E4A)); + get => new SchemaUntypedField(_Handle + _RecipientFilterOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollAnimTagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollAnimTagImpl.cs index 5ba8af93e..5ac2e5387 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollAnimTagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollAnimTagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CRagdollAnimTagImpl : CAnimTagBaseImpl, CRagdollAnimTag { public CRagdollAnimTagImpl(nint handle) : base(handle) { } + private static readonly Lazy _ProfileNameOffset = new(() => Schema.GetOffset(0xC5917190285D878D), LazyThreadSafetyMode.None); + public ref CGlobalSymbol ProfileName { - get => ref _Handle.AsRef(Schema.GetOffset(0xC5917190285D878D)); + get => ref _Handle.AsRef(_ProfileNameOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollComponentUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollComponentUpdaterImpl.cs index f75c42c02..0df9c286a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollComponentUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollComponentUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class CRagdollComponentUpdaterImpl : CAnimComponentUpdaterImpl, public CRagdollComponentUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _RagdollNodePathsOffset = new(() => Schema.GetOffset(0xDD5F05A990E04B90), LazyThreadSafetyMode.None); + public ref CUtlVector RagdollNodePaths { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDD5F05A990E04B90)); + get => ref _Handle.AsRef>(_RagdollNodePathsOffset.Value); } + private static readonly Lazy _FollowAttachmentNodePathsOffset = new(() => Schema.GetOffset(0xDD5F05A95F8325EF), LazyThreadSafetyMode.None); + public ref CUtlVector FollowAttachmentNodePaths { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDD5F05A95F8325EF)); + get => ref _Handle.AsRef>(_FollowAttachmentNodePathsOffset.Value); } + private static readonly Lazy _BoneIndicesOffset = new(() => Schema.GetOffset(0xDD5F05A9E93AB60C), LazyThreadSafetyMode.None); + public ref CUtlVector BoneIndices { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDD5F05A9E93AB60C)); + get => ref _Handle.AsRef>(_BoneIndicesOffset.Value); } + private static readonly Lazy _BoneNamesOffset = new(() => Schema.GetOffset(0xDD5F05A93CC0D1ED), LazyThreadSafetyMode.None); + public ref CUtlVector BoneNames { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDD5F05A93CC0D1ED)); + get => ref _Handle.AsRef>(_BoneNamesOffset.Value); } + private static readonly Lazy _WeightListsOffset = new(() => Schema.GetOffset(0xDD5F05A9F50C4582), LazyThreadSafetyMode.None); + public ref CUtlVector WeightLists { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDD5F05A9F50C4582)); + get => ref _Handle.AsRef>(_WeightListsOffset.Value); } + private static readonly Lazy _BoneToWeightIndicesOffset = new(() => Schema.GetOffset(0xDD5F05A9CA322B97), LazyThreadSafetyMode.None); + public ref CUtlVector BoneToWeightIndices { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDD5F05A9CA322B97)); + get => ref _Handle.AsRef>(_BoneToWeightIndicesOffset.Value); } + private static readonly Lazy _SpringFrequencyMinOffset = new(() => Schema.GetOffset(0xDD5F05A937C769A4), LazyThreadSafetyMode.None); + public ref float SpringFrequencyMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xDD5F05A937C769A4)); + get => ref _Handle.AsRef(_SpringFrequencyMinOffset.Value); } + private static readonly Lazy _SpringFrequencyMaxOffset = new(() => Schema.GetOffset(0xDD5F05A945DB0766), LazyThreadSafetyMode.None); + public ref float SpringFrequencyMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xDD5F05A945DB0766)); + get => ref _Handle.AsRef(_SpringFrequencyMaxOffset.Value); } + private static readonly Lazy _MaxStretchOffset = new(() => Schema.GetOffset(0xDD5F05A9BCF894C4), LazyThreadSafetyMode.None); + public ref float MaxStretch { - get => ref _Handle.AsRef(Schema.GetOffset(0xDD5F05A9BCF894C4)); + get => ref _Handle.AsRef(_MaxStretchOffset.Value); } + private static readonly Lazy _SolidCollisionAtZeroWeightOffset = new(() => Schema.GetOffset(0xDD5F05A983AB44C3), LazyThreadSafetyMode.None); + public ref bool SolidCollisionAtZeroWeight { - get => ref _Handle.AsRef(Schema.GetOffset(0xDD5F05A983AB44C3)); + get => ref _Handle.AsRef(_SolidCollisionAtZeroWeightOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollConstraintImpl.cs index 425bb3ba9..89a7a4bf1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class CRagdollConstraintImpl : CPhysConstraintImpl, CRagdollCon public CRagdollConstraintImpl(nint handle) : base(handle) { } + private static readonly Lazy _XminOffset = new(() => Schema.GetOffset(0xF36946DA76E67DC1), LazyThreadSafetyMode.None); + public ref float Xmin { - get => ref _Handle.AsRef(Schema.GetOffset(0xF36946DA76E67DC1)); + get => ref _Handle.AsRef(_XminOffset.Value); } + private static readonly Lazy _XmaxOffset = new(() => Schema.GetOffset(0xF36946DA68F9EF6F), LazyThreadSafetyMode.None); + public ref float Xmax { - get => ref _Handle.AsRef(Schema.GetOffset(0xF36946DA68F9EF6F)); + get => ref _Handle.AsRef(_XmaxOffset.Value); } + private static readonly Lazy _YminOffset = new(() => Schema.GetOffset(0xF36946DACE2F1828), LazyThreadSafetyMode.None); + public ref float Ymin { - get => ref _Handle.AsRef(Schema.GetOffset(0xF36946DACE2F1828)); + get => ref _Handle.AsRef(_YminOffset.Value); } + private static readonly Lazy _YmaxOffset = new(() => Schema.GetOffset(0xF36946DAC4429022), LazyThreadSafetyMode.None); + public ref float Ymax { - get => ref _Handle.AsRef(Schema.GetOffset(0xF36946DAC4429022)); + get => ref _Handle.AsRef(_YmaxOffset.Value); } + private static readonly Lazy _ZminOffset = new(() => Schema.GetOffset(0xF36946DAC34E881F), LazyThreadSafetyMode.None); + public ref float Zmin { - get => ref _Handle.AsRef(Schema.GetOffset(0xF36946DAC34E881F)); + get => ref _Handle.AsRef(_ZminOffset.Value); } + private static readonly Lazy _ZmaxOffset = new(() => Schema.GetOffset(0xF36946DAD13B1671), LazyThreadSafetyMode.None); + public ref float Zmax { - get => ref _Handle.AsRef(Schema.GetOffset(0xF36946DAD13B1671)); + get => ref _Handle.AsRef(_ZmaxOffset.Value); } + private static readonly Lazy _XfrictionOffset = new(() => Schema.GetOffset(0xF36946DA08758E19), LazyThreadSafetyMode.None); + public ref float Xfriction { - get => ref _Handle.AsRef(Schema.GetOffset(0xF36946DA08758E19)); + get => ref _Handle.AsRef(_XfrictionOffset.Value); } + private static readonly Lazy _YfrictionOffset = new(() => Schema.GetOffset(0xF36946DAEFC8C6C6), LazyThreadSafetyMode.None); + public ref float Yfriction { - get => ref _Handle.AsRef(Schema.GetOffset(0xF36946DAEFC8C6C6)); + get => ref _Handle.AsRef(_YfrictionOffset.Value); } + private static readonly Lazy _ZfrictionOffset = new(() => Schema.GetOffset(0xF36946DA5587BDC3), LazyThreadSafetyMode.None); + public ref float Zfriction { - get => ref _Handle.AsRef(Schema.GetOffset(0xF36946DA5587BDC3)); + get => ref _Handle.AsRef(_ZfrictionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollMagnetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollMagnetImpl.cs index f49a280ec..12501d4c7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollMagnetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollMagnetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CRagdollMagnetImpl : CPointEntityImpl, CRagdollMagnet { public CRagdollMagnetImpl(nint handle) : base(handle) { } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x7C6BA43F3A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C6BA43F3A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x7C6BA43FA921CA53), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C6BA43FA921CA53)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _ForceOffset = new(() => Schema.GetOffset(0x7C6BA43FB9B6AFA4), LazyThreadSafetyMode.None); + public ref float Force { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C6BA43FB9B6AFA4)); + get => ref _Handle.AsRef(_ForceOffset.Value); } + private static readonly Lazy _AxisOffset = new(() => Schema.GetOffset(0x7C6BA43F2B06DE94), LazyThreadSafetyMode.None); + public ref Vector Axis { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C6BA43F2B06DE94)); + get => ref _Handle.AsRef(_AxisOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollManagerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollManagerImpl.cs index 5453b29bc..5f085406d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollManagerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollManagerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CRagdollManagerImpl : CBaseEntityImpl, CRagdollManager { public CRagdollManagerImpl(nint handle) : base(handle) { } + private static readonly Lazy _CurrentMaxRagdollCountOffset = new(() => Schema.GetOffset(0x3C67654C8544F4A7), LazyThreadSafetyMode.None); + public ref byte CurrentMaxRagdollCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x3C67654C8544F4A7)); + get => ref _Handle.AsRef(_CurrentMaxRagdollCountOffset.Value); } + private static readonly Lazy _MaxRagdollCountOffset = new(() => Schema.GetOffset(0x3C67654CC3A8C254), LazyThreadSafetyMode.None); + public ref int MaxRagdollCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x3C67654CC3A8C254)); + get => ref _Handle.AsRef(_MaxRagdollCountOffset.Value); } + private static readonly Lazy _SaveImportantOffset = new(() => Schema.GetOffset(0x3C67654CB7710746), LazyThreadSafetyMode.None); + public ref bool SaveImportant { - get => ref _Handle.AsRef(Schema.GetOffset(0x3C67654CB7710746)); + get => ref _Handle.AsRef(_SaveImportantOffset.Value); } + private static readonly Lazy _CanTakeDamageOffset = new(() => Schema.GetOffset(0x3C67654C64446233), LazyThreadSafetyMode.None); + public ref bool CanTakeDamage { - get => ref _Handle.AsRef(Schema.GetOffset(0x3C67654C64446233)); + get => ref _Handle.AsRef(_CanTakeDamageOffset.Value); } public void CurrentMaxRagdollCountUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollPropAlias_physics_prop_ragdollImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollPropAlias_physics_prop_ragdollImpl.cs index bd3b0dbd9..c65af7c4f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollPropAlias_physics_prop_ragdollImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollPropAlias_physics_prop_ragdollImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollPropAttachedImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollPropAttachedImpl.cs index 62abe62ef..2e784b290 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollPropAttachedImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollPropAttachedImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CRagdollPropAttachedImpl : CRagdollPropImpl, CRagdollProp public CRagdollPropAttachedImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneIndexAttachedOffset = new(() => Schema.GetOffset(0x4601EA84AECB2AA5), LazyThreadSafetyMode.None); + public ref uint BoneIndexAttached { - get => ref _Handle.AsRef(Schema.GetOffset(0x4601EA84AECB2AA5)); + get => ref _Handle.AsRef(_BoneIndexAttachedOffset.Value); } + private static readonly Lazy _RagdollAttachedObjectIndexOffset = new(() => Schema.GetOffset(0x4601EA84D09DB439), LazyThreadSafetyMode.None); + public ref uint RagdollAttachedObjectIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x4601EA84D09DB439)); + get => ref _Handle.AsRef(_RagdollAttachedObjectIndexOffset.Value); } + private static readonly Lazy _AttachmentPointBoneSpaceOffset = new(() => Schema.GetOffset(0x4601EA849ABB7B0E), LazyThreadSafetyMode.None); + public ref Vector AttachmentPointBoneSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x4601EA849ABB7B0E)); + get => ref _Handle.AsRef(_AttachmentPointBoneSpaceOffset.Value); } + private static readonly Lazy _AttachmentPointRagdollSpaceOffset = new(() => Schema.GetOffset(0x4601EA84AD8AE911), LazyThreadSafetyMode.None); + public ref Vector AttachmentPointRagdollSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x4601EA84AD8AE911)); + get => ref _Handle.AsRef(_AttachmentPointRagdollSpaceOffset.Value); } + private static readonly Lazy _ShouldDetachOffset = new(() => Schema.GetOffset(0x4601EA84ABADEB5D), LazyThreadSafetyMode.None); + public ref bool ShouldDetach { - get => ref _Handle.AsRef(Schema.GetOffset(0x4601EA84ABADEB5D)); + get => ref _Handle.AsRef(_ShouldDetachOffset.Value); } + private static readonly Lazy _ShouldDeleteAttachedActivationRecordOffset = new(() => Schema.GetOffset(0x4601EA84BCB3F894), LazyThreadSafetyMode.None); + public ref bool ShouldDeleteAttachedActivationRecord { - get => ref _Handle.AsRef(Schema.GetOffset(0x4601EA84BCB3F894)); + get => ref _Handle.AsRef(_ShouldDeleteAttachedActivationRecordOffset.Value); } public void BoneIndexAttachedUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollPropImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollPropImpl.cs index 8a473fab1..3d7c98388 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollPropImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollPropImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,91 +17,143 @@ internal partial class CRagdollPropImpl : CBaseAnimGraphImpl, CRagdollProp { public CRagdollPropImpl(nint handle) : base(handle) { } + private static readonly Lazy _RagdollOffset = new(() => Schema.GetOffset(0x9505BA78F62C6568), LazyThreadSafetyMode.None); + public ragdoll_t Ragdoll { - get => new ragdoll_tImpl(_Handle + Schema.GetOffset(0x9505BA78F62C6568)); + get => new ragdoll_tImpl(_Handle + _RagdollOffset.Value); } + private static readonly Lazy _StartDisabledOffset = new(() => Schema.GetOffset(0x9505BA7861ED0C4F), LazyThreadSafetyMode.None); + public ref bool StartDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x9505BA7861ED0C4F)); + get => ref _Handle.AsRef(_StartDisabledOffset.Value); } + private static readonly Lazy _RagEnabledOffset = new(() => Schema.GetOffset(0x9505BA78CD1FB84A), LazyThreadSafetyMode.None); + public ref CUtlVector RagEnabled { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9505BA78CD1FB84A)); + get => ref _Handle.AsRef>(_RagEnabledOffset.Value); } + private static readonly Lazy _RagPosOffset = new(() => Schema.GetOffset(0x9505BA7897C85315), LazyThreadSafetyMode.None); + public ref CUtlVector RagPos { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9505BA7897C85315)); + get => ref _Handle.AsRef>(_RagPosOffset.Value); } + private static readonly Lazy _RagAnglesOffset = new(() => Schema.GetOffset(0x9505BA78FD4E530D), LazyThreadSafetyMode.None); + public ref CUtlVector RagAngles { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9505BA78FD4E530D)); + get => ref _Handle.AsRef>(_RagAnglesOffset.Value); } + private static readonly Lazy _LastUpdateTickCountOffset = new(() => Schema.GetOffset(0x9505BA785A98C204), LazyThreadSafetyMode.None); + public ref uint LastUpdateTickCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x9505BA785A98C204)); + get => ref _Handle.AsRef(_LastUpdateTickCountOffset.Value); } + private static readonly Lazy _AllAsleepOffset = new(() => Schema.GetOffset(0x9505BA783DE13402), LazyThreadSafetyMode.None); + public ref bool AllAsleep { - get => ref _Handle.AsRef(Schema.GetOffset(0x9505BA783DE13402)); + get => ref _Handle.AsRef(_AllAsleepOffset.Value); } + private static readonly Lazy _FirstCollisionAfterLaunchOffset = new(() => Schema.GetOffset(0x9505BA78C9D93EAC), LazyThreadSafetyMode.None); + public ref bool FirstCollisionAfterLaunch { - get => ref _Handle.AsRef(Schema.GetOffset(0x9505BA78C9D93EAC)); + get => ref _Handle.AsRef(_FirstCollisionAfterLaunchOffset.Value); } + private static readonly Lazy _DamageEntityOffset = new(() => Schema.GetOffset(0x9505BA784C4C28C5), LazyThreadSafetyMode.None); + public ref CHandle DamageEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9505BA784C4C28C5)); + get => ref _Handle.AsRef>(_DamageEntityOffset.Value); } + private static readonly Lazy _KillerOffset = new(() => Schema.GetOffset(0x9505BA780F088B1C), LazyThreadSafetyMode.None); + public ref CHandle Killer { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9505BA780F088B1C)); + get => ref _Handle.AsRef>(_KillerOffset.Value); } + private static readonly Lazy _PhysicsAttackerOffset = new(() => Schema.GetOffset(0x9505BA787A5EB877), LazyThreadSafetyMode.None); + public ref CHandle PhysicsAttacker { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9505BA787A5EB877)); + get => ref _Handle.AsRef>(_PhysicsAttackerOffset.Value); } + private static readonly Lazy _LastPhysicsInfluenceTimeOffset = new(() => Schema.GetOffset(0x9505BA785B5C0E32), LazyThreadSafetyMode.None); + public GameTime_t LastPhysicsInfluenceTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x9505BA785B5C0E32)); + get => new GameTime_tImpl(_Handle + _LastPhysicsInfluenceTimeOffset.Value); } + private static readonly Lazy _FadeOutStartTimeOffset = new(() => Schema.GetOffset(0x9505BA78A63078C0), LazyThreadSafetyMode.None); + public GameTime_t FadeOutStartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x9505BA78A63078C0)); + get => new GameTime_tImpl(_Handle + _FadeOutStartTimeOffset.Value); } + private static readonly Lazy _FadeTimeOffset = new(() => Schema.GetOffset(0x9505BA7800BEDB08), LazyThreadSafetyMode.None); + public ref float FadeTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x9505BA7800BEDB08)); + get => ref _Handle.AsRef(_FadeTimeOffset.Value); } + private static readonly Lazy _LastOriginOffset = new(() => Schema.GetOffset(0x9505BA78F13D764B), LazyThreadSafetyMode.None); + public ref Vector LastOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0x9505BA78F13D764B)); + get => ref _Handle.AsRef(_LastOriginOffset.Value); } + private static readonly Lazy _AwakeTimeOffset = new(() => Schema.GetOffset(0x9505BA78D471FE9B), LazyThreadSafetyMode.None); + public GameTime_t AwakeTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x9505BA78D471FE9B)); + get => new GameTime_tImpl(_Handle + _AwakeTimeOffset.Value); } + private static readonly Lazy _LastOriginChangeTimeOffset = new(() => Schema.GetOffset(0x9505BA78B66C9A18), LazyThreadSafetyMode.None); + public GameTime_t LastOriginChangeTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x9505BA78B66C9A18)); + get => new GameTime_tImpl(_Handle + _LastOriginChangeTimeOffset.Value); } + private static readonly Lazy _StrOriginClassNameOffset = new(() => Schema.GetOffset(0x9505BA7809148529), LazyThreadSafetyMode.None); + public string StrOriginClassName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9505BA7809148529)); + var ptr = _Handle.Read(_StrOriginClassNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9505BA7809148529, value); + set => Schema.SetString(_Handle, _StrOriginClassNameOffset.Value, value); } + private static readonly Lazy _StrSourceClassNameOffset = new(() => Schema.GetOffset(0x9505BA78F3FD1A0C), LazyThreadSafetyMode.None); + public string StrSourceClassName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9505BA78F3FD1A0C)); + var ptr = _Handle.Read(_StrSourceClassNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9505BA78F3FD1A0C, value); + set => Schema.SetString(_Handle, _StrSourceClassNameOffset.Value, value); } + private static readonly Lazy _HasBeenPhysgunnedOffset = new(() => Schema.GetOffset(0x9505BA785058D154), LazyThreadSafetyMode.None); + public ref bool HasBeenPhysgunned { - get => ref _Handle.AsRef(Schema.GetOffset(0x9505BA785058D154)); + get => ref _Handle.AsRef(_HasBeenPhysgunnedOffset.Value); } + private static readonly Lazy _AllowStretchOffset = new(() => Schema.GetOffset(0x9505BA78F6CDF40F), LazyThreadSafetyMode.None); + public ref bool AllowStretch { - get => ref _Handle.AsRef(Schema.GetOffset(0x9505BA78F6CDF40F)); + get => ref _Handle.AsRef(_AllowStretchOffset.Value); } + private static readonly Lazy _BlendWeightOffset = new(() => Schema.GetOffset(0x9505BA78E5D6B9CE), LazyThreadSafetyMode.None); + public ref float BlendWeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x9505BA78E5D6B9CE)); + get => ref _Handle.AsRef(_BlendWeightOffset.Value); } + private static readonly Lazy _DefaultFadeScaleOffset = new(() => Schema.GetOffset(0x9505BA784DA9700C), LazyThreadSafetyMode.None); + public ref float DefaultFadeScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x9505BA784DA9700C)); + get => ref _Handle.AsRef(_DefaultFadeScaleOffset.Value); } + private static readonly Lazy _RagdollMinsOffset = new(() => Schema.GetOffset(0x9505BA78CD1755B5), LazyThreadSafetyMode.None); + public ref CUtlVector RagdollMins { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9505BA78CD1755B5)); + get => ref _Handle.AsRef>(_RagdollMinsOffset.Value); } + private static readonly Lazy _RagdollMaxsOffset = new(() => Schema.GetOffset(0x9505BA7833F9714F), LazyThreadSafetyMode.None); + public ref CUtlVector RagdollMaxs { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9505BA7833F9714F)); + get => ref _Handle.AsRef>(_RagdollMaxsOffset.Value); } + private static readonly Lazy _ShouldDeleteActivationRecordOffset = new(() => Schema.GetOffset(0x9505BA7838134064), LazyThreadSafetyMode.None); + public ref bool ShouldDeleteActivationRecord { - get => ref _Handle.AsRef(Schema.GetOffset(0x9505BA7838134064)); + get => ref _Handle.AsRef(_ShouldDeleteActivationRecordOffset.Value); } public void RagEnabledUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollUpdateNodeImpl.cs index c73b11ac8..5dd82931b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRagdollUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CRagdollUpdateNodeImpl : CUnaryUpdateNodeImpl, CRagdollUp public CRagdollUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _WeightListIndexOffset = new(() => Schema.GetOffset(0xB7502AF030288377), LazyThreadSafetyMode.None); + public ref int WeightListIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xB7502AF030288377)); + get => ref _Handle.AsRef(_WeightListIndexOffset.Value); } + private static readonly Lazy _PoseControlMethodOffset = new(() => Schema.GetOffset(0xB7502AF088DA12AC), LazyThreadSafetyMode.None); + public ref RagdollPoseControl PoseControlMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0xB7502AF088DA12AC)); + get => ref _Handle.AsRef(_PoseControlMethodOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRandSimTimerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRandSimTimerImpl.cs index 0fd8f8fb2..6e444fc87 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRandSimTimerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRandSimTimerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CRandSimTimerImpl : CSimpleSimTimerImpl, CRandSimTimer { public CRandSimTimerImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinIntervalOffset = new(() => Schema.GetOffset(0x6268F694BB35EE4), LazyThreadSafetyMode.None); + public ref float MinInterval { - get => ref _Handle.AsRef(Schema.GetOffset(0x6268F694BB35EE4)); + get => ref _Handle.AsRef(_MinIntervalOffset.Value); } + private static readonly Lazy _MaxIntervalOffset = new(() => Schema.GetOffset(0x6268F69400B2156), LazyThreadSafetyMode.None); + public ref float MaxInterval { - get => ref _Handle.AsRef(Schema.GetOffset(0x6268F69400B2156)); + get => ref _Handle.AsRef(_MaxIntervalOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRandStopwatchImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRandStopwatchImpl.cs index bd9565453..3bd43b4f2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRandStopwatchImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRandStopwatchImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CRandStopwatchImpl : CStopwatchBaseImpl, CRandStopwatch { public CRandStopwatchImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinIntervalOffset = new(() => Schema.GetOffset(0x538C26044BB35EE4), LazyThreadSafetyMode.None); + public ref float MinInterval { - get => ref _Handle.AsRef(Schema.GetOffset(0x538C26044BB35EE4)); + get => ref _Handle.AsRef(_MinIntervalOffset.Value); } + private static readonly Lazy _MaxIntervalOffset = new(() => Schema.GetOffset(0x538C2604400B2156), LazyThreadSafetyMode.None); + public ref float MaxInterval { - get => ref _Handle.AsRef(Schema.GetOffset(0x538C2604400B2156)); + get => ref _Handle.AsRef(_MaxIntervalOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRandomNumberGeneratorParametersImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRandomNumberGeneratorParametersImpl.cs index 87ae714a9..de576bc49 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRandomNumberGeneratorParametersImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRandomNumberGeneratorParametersImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CRandomNumberGeneratorParametersImpl : SchemaClass, CRand public CRandomNumberGeneratorParametersImpl(nint handle) : base(handle) { } + private static readonly Lazy _DistributeEvenlyOffset = new(() => Schema.GetOffset(0x60FDB8F9BED90721), LazyThreadSafetyMode.None); + public ref bool DistributeEvenly { - get => ref _Handle.AsRef(Schema.GetOffset(0x60FDB8F9BED90721)); + get => ref _Handle.AsRef(_DistributeEvenlyOffset.Value); } + private static readonly Lazy _SeedOffset = new(() => Schema.GetOffset(0x60FDB8F99A113550), LazyThreadSafetyMode.None); + public ref int Seed { - get => ref _Handle.AsRef(Schema.GetOffset(0x60FDB8F99A113550)); + get => ref _Handle.AsRef(_SeedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRangeFloatImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRangeFloatImpl.cs index 4c1209334..9e5e5d442 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRangeFloatImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRangeFloatImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRangeIntImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRangeIntImpl.cs index c333b6c6a..3011b3353 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRangeIntImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRangeIntImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRectLightImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRectLightImpl.cs index a381383d7..989dafe24 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRectLightImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRectLightImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CRectLightImpl : CBarnLightImpl, CRectLight { public CRectLightImpl(nint handle) : base(handle) { } + private static readonly Lazy _ShowLightOffset = new(() => Schema.GetOffset(0xF5C5D1F4D67BC720), LazyThreadSafetyMode.None); + public ref bool ShowLight { - get => ref _Handle.AsRef(Schema.GetOffset(0xF5C5D1F4D67BC720)); + get => ref _Handle.AsRef(_ShowLightOffset.Value); } public void ShowLightUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRegionSVMImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRegionSVMImpl.cs index 0a3afdd14..27dbcc648 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRegionSVMImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRegionSVMImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CRegionSVMImpl : SchemaClass, CRegionSVM { public CRegionSVMImpl(nint handle) : base(handle) { } + private static readonly Lazy _PlanesOffset = new(() => Schema.GetOffset(0xFC5717CAF831F452), LazyThreadSafetyMode.None); + public ref CUtlVector Planes { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFC5717CAF831F452)); + get => ref _Handle.AsRef>(_PlanesOffset.Value); } + private static readonly Lazy _NodesOffset = new(() => Schema.GetOffset(0xFC5717CAEBA045DA), LazyThreadSafetyMode.None); + public ref CUtlVector Nodes { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFC5717CAEBA045DA)); + get => ref _Handle.AsRef>(_NodesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRelativeLocationImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRelativeLocationImpl.cs index 861fbd782..1391f11f4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRelativeLocationImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRelativeLocationImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CRelativeLocationImpl : SchemaClass, CRelativeLocation { public CRelativeLocationImpl(nint handle) : base(handle) { } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0xA25CE2418ED6D5CD), LazyThreadSafetyMode.None); + public ref RelativeLocationType_t Type { - get => ref _Handle.AsRef(Schema.GetOffset(0xA25CE2418ED6D5CD)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _RelativeOffsetOffset = new(() => Schema.GetOffset(0xA25CE241B6F2D296), LazyThreadSafetyMode.None); + public ref Vector RelativeOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xA25CE241B6F2D296)); + get => ref _Handle.AsRef(_RelativeOffsetOffset.Value); } + private static readonly Lazy _WorldSpacePosOffset = new(() => Schema.GetOffset(0xA25CE2410A43E96B), LazyThreadSafetyMode.None); + public ref Vector WorldSpacePos { - get => ref _Handle.AsRef(Schema.GetOffset(0xA25CE2410A43E96B)); + get => ref _Handle.AsRef(_WorldSpacePosOffset.Value); } + private static readonly Lazy _EntityOffset = new(() => Schema.GetOffset(0xA25CE2416EBADCB0), LazyThreadSafetyMode.None); + public ref CHandle Entity { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA25CE2416EBADCB0)); + get => ref _Handle.AsRef>(_EntityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRemapFloatImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRemapFloatImpl.cs index 52896e63c..57c3e82f6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRemapFloatImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRemapFloatImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRemapValueComponentUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRemapValueComponentUpdaterImpl.cs index bb9f193de..c55f955d9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRemapValueComponentUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRemapValueComponentUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CRemapValueComponentUpdaterImpl : CAnimComponentUpdaterIm public CRemapValueComponentUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _ItemsOffset = new(() => Schema.GetOffset(0xA80D46C07A87EDAF), LazyThreadSafetyMode.None); + public ref CUtlVector Items { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA80D46C07A87EDAF)); + get => ref _Handle.AsRef>(_ItemsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRemapValueUpdateItemImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRemapValueUpdateItemImpl.cs index 5ea9bbec3..37b3a4ac9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRemapValueUpdateItemImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRemapValueUpdateItemImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CRemapValueUpdateItemImpl : SchemaClass, CRemapValueUpdat public CRemapValueUpdateItemImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParamInOffset = new(() => Schema.GetOffset(0x93C5E8D6ED40E37B), LazyThreadSafetyMode.None); + public CAnimParamHandle ParamIn { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x93C5E8D6ED40E37B)); + get => new CAnimParamHandleImpl(_Handle + _ParamInOffset.Value); } + private static readonly Lazy _ParamOutOffset = new(() => Schema.GetOffset(0x93C5E8D6AA5799A8), LazyThreadSafetyMode.None); + public CAnimParamHandle ParamOut { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x93C5E8D6AA5799A8)); + get => new CAnimParamHandleImpl(_Handle + _ParamOutOffset.Value); } + private static readonly Lazy _MinInputValueOffset = new(() => Schema.GetOffset(0x93C5E8D6BDB4BC64), LazyThreadSafetyMode.None); + public ref float MinInputValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x93C5E8D6BDB4BC64)); + get => ref _Handle.AsRef(_MinInputValueOffset.Value); } + private static readonly Lazy _MaxInputValueOffset = new(() => Schema.GetOffset(0x93C5E8D63EF75C2A), LazyThreadSafetyMode.None); + public ref float MaxInputValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x93C5E8D63EF75C2A)); + get => ref _Handle.AsRef(_MaxInputValueOffset.Value); } + private static readonly Lazy _MinOutputValueOffset = new(() => Schema.GetOffset(0x93C5E8D6F63C7011), LazyThreadSafetyMode.None); + public ref float MinOutputValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x93C5E8D6F63C7011)); + get => ref _Handle.AsRef(_MinOutputValueOffset.Value); } + private static readonly Lazy _MaxOutputValueOffset = new(() => Schema.GetOffset(0x93C5E8D6A91B71B3), LazyThreadSafetyMode.None); + public ref float MaxOutputValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x93C5E8D6A91B71B3)); + get => ref _Handle.AsRef(_MaxOutputValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderBufferBindingImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderBufferBindingImpl.cs index 015622167..e5914eeb2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderBufferBindingImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderBufferBindingImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CRenderBufferBindingImpl : SchemaClass, CRenderBufferBind public CRenderBufferBindingImpl(nint handle) : base(handle) { } + private static readonly Lazy _BufferOffset = new(() => Schema.GetOffset(0xFC8416C144D3898D), LazyThreadSafetyMode.None); + public ref ulong Buffer { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC8416C144D3898D)); + get => ref _Handle.AsRef(_BufferOffset.Value); } + private static readonly Lazy _BindOffsetBytesOffset = new(() => Schema.GetOffset(0xFC8416C1AD9A201C), LazyThreadSafetyMode.None); + public ref uint BindOffsetBytes { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC8416C1AD9A201C)); + get => ref _Handle.AsRef(_BindOffsetBytesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderComponentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderComponentImpl.cs index 52a8ffaef..c5f059b2a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderComponentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderComponentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CRenderComponentImpl : CEntityComponentImpl, CRenderCompo public CRenderComponentImpl(nint handle) : base(handle) { } + private static readonly Lazy ___m_pChainEntityOffset = new(() => Schema.GetOffset(0x8830FA5F63F0E7D), LazyThreadSafetyMode.None); + public ref CNetworkVarChainer __m_pChainEntity { - get => ref _Handle.AsRef(Schema.GetOffset(0x8830FA5F63F0E7D)); + get => ref _Handle.AsRef(___m_pChainEntityOffset.Value); } + private static readonly Lazy _IsRenderingWithViewModelsOffset = new(() => Schema.GetOffset(0x8830FA5700AA428), LazyThreadSafetyMode.None); + public ref bool IsRenderingWithViewModels { - get => ref _Handle.AsRef(Schema.GetOffset(0x8830FA5700AA428)); + get => ref _Handle.AsRef(_IsRenderingWithViewModelsOffset.Value); } + private static readonly Lazy _SplitscreenFlagsOffset = new(() => Schema.GetOffset(0x8830FA5CACF9032), LazyThreadSafetyMode.None); + public ref uint SplitscreenFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0x8830FA5CACF9032)); + get => ref _Handle.AsRef(_SplitscreenFlagsOffset.Value); } + private static readonly Lazy _EnableRenderingOffset = new(() => Schema.GetOffset(0x8830FA50FAC7C5E), LazyThreadSafetyMode.None); + public ref bool EnableRendering { - get => ref _Handle.AsRef(Schema.GetOffset(0x8830FA50FAC7C5E)); + get => ref _Handle.AsRef(_EnableRenderingOffset.Value); } + private static readonly Lazy _InterpolationReadyToDrawOffset = new(() => Schema.GetOffset(0x8830FA51A075A53), LazyThreadSafetyMode.None); + public ref bool InterpolationReadyToDraw { - get => ref _Handle.AsRef(Schema.GetOffset(0x8830FA51A075A53)); + get => ref _Handle.AsRef(_InterpolationReadyToDrawOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderGroomImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderGroomImpl.cs index e949d230a..d70fe5ab1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderGroomImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderGroomImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,47 +17,75 @@ internal partial class CRenderGroomImpl : SchemaClass, CRenderGroom { public CRenderGroomImpl(nint handle) : base(handle) { } + private static readonly Lazy _HairsOffset = new(() => Schema.GetOffset(0xC3F698B4E7C4901E), LazyThreadSafetyMode.None); + public ref CUtlVector Hairs { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC3F698B4E7C4901E)); + get => ref _Handle.AsRef>(_HairsOffset.Value); } + private static readonly Lazy _HairPositionOffsetsOffset = new(() => Schema.GetOffset(0xC3F698B40BA9FF3E), LazyThreadSafetyMode.None); + public ref CUtlVector HairPositionOffsets { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC3F698B40BA9FF3E)); + get => ref _Handle.AsRef>(_HairPositionOffsetsOffset.Value); } + private static readonly Lazy _SimParamsMatOffset = new(() => Schema.GetOffset(0xC3F698B4E9EE5886), LazyThreadSafetyMode.None); + public ref CStrongHandle SimParamsMat { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC3F698B4E9EE5886)); + get => ref _Handle.AsRef>(_SimParamsMatOffset.Value); } + private static readonly Lazy _StrandSegmentCountHistOffset = new(() => Schema.GetOffset(0xC3F698B4D2E373B9), LazyThreadSafetyMode.None); + public ref CUtlVector StrandSegmentCountHist { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC3F698B4D2E373B9)); + get => ref _Handle.AsRef>(_StrandSegmentCountHistOffset.Value); } + private static readonly Lazy _MaxSegmentsPerHairStrandOffset = new(() => Schema.GetOffset(0xC3F698B43675C4E2), LazyThreadSafetyMode.None); + public ref int MaxSegmentsPerHairStrand { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3F698B43675C4E2)); + get => ref _Handle.AsRef(_MaxSegmentsPerHairStrandOffset.Value); } + private static readonly Lazy _GuideHairCountOffset = new(() => Schema.GetOffset(0xC3F698B41D073EAE), LazyThreadSafetyMode.None); + public ref int GuideHairCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3F698B41D073EAE)); + get => ref _Handle.AsRef(_GuideHairCountOffset.Value); } + private static readonly Lazy _HairCountOffset = new(() => Schema.GetOffset(0xC3F698B498FBF2A4), LazyThreadSafetyMode.None); + public ref int HairCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3F698B498FBF2A4)); + get => ref _Handle.AsRef(_HairCountOffset.Value); } + private static readonly Lazy _TotalVertexCountOffset = new(() => Schema.GetOffset(0xC3F698B40CA035E2), LazyThreadSafetyMode.None); + public ref int TotalVertexCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3F698B40CA035E2)); + get => ref _Handle.AsRef(_TotalVertexCountOffset.Value); } + private static readonly Lazy _TotalSegmentCountOffset = new(() => Schema.GetOffset(0xC3F698B4AE009BD1), LazyThreadSafetyMode.None); + public ref int TotalSegmentCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3F698B4AE009BD1)); + get => ref _Handle.AsRef(_TotalSegmentCountOffset.Value); } + private static readonly Lazy _GroomGroupIDOffset = new(() => Schema.GetOffset(0xC3F698B4AD482815), LazyThreadSafetyMode.None); + public ref int GroomGroupID { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3F698B4AD482815)); + get => ref _Handle.AsRef(_GroomGroupIDOffset.Value); } + private static readonly Lazy _AttachBoneIdxOffset = new(() => Schema.GetOffset(0xC3F698B4466DE8A1), LazyThreadSafetyMode.None); + public ref int AttachBoneIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3F698B4466DE8A1)); + get => ref _Handle.AsRef(_AttachBoneIdxOffset.Value); } + private static readonly Lazy _AttachMeshIdxOffset = new(() => Schema.GetOffset(0xC3F698B4ABA5B148), LazyThreadSafetyMode.None); + public ref int AttachMeshIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3F698B4ABA5B148)); + get => ref _Handle.AsRef(_AttachMeshIdxOffset.Value); } + private static readonly Lazy _AttachMeshDrawCallIdxOffset = new(() => Schema.GetOffset(0xC3F698B4E3082962), LazyThreadSafetyMode.None); + public ref int AttachMeshDrawCallIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3F698B4E3082962)); + get => ref _Handle.AsRef(_AttachMeshDrawCallIdxOffset.Value); } + private static readonly Lazy _EnableSimulationOffset = new(() => Schema.GetOffset(0xC3F698B4AC53FD21), LazyThreadSafetyMode.None); + public ref bool EnableSimulation { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3F698B4AC53FD21)); + get => ref _Handle.AsRef(_EnableSimulationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderMeshImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderMeshImpl.cs index d9fd3c27a..4f55cb7a6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderMeshImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderMeshImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,27 +17,41 @@ internal partial class CRenderMeshImpl : SchemaClass, CRenderMesh { public CRenderMeshImpl(nint handle) : base(handle) { } + private static readonly Lazy _SceneObjectsOffset = new(() => Schema.GetOffset(0x8593C3BF332235A1), LazyThreadSafetyMode.None); + public SchemaUntypedField SceneObjects { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8593C3BF332235A1)); + get => new SchemaUntypedField(_Handle + _SceneObjectsOffset.Value); } + private static readonly Lazy _ConstraintsOffset = new(() => Schema.GetOffset(0x8593C3BF251CBAAB), LazyThreadSafetyMode.None); + public ref CUtlLeanVector, int> Constraints { - get => ref _Handle.AsRef, int>>(Schema.GetOffset(0x8593C3BF251CBAAB)); + get => ref _Handle.AsRef, int>>(_ConstraintsOffset.Value); } + private static readonly Lazy _SkeletonOffset = new(() => Schema.GetOffset(0x8593C3BFE77F030E), LazyThreadSafetyMode.None); + public CRenderSkeleton Skeleton { - get => new CRenderSkeletonImpl(_Handle + Schema.GetOffset(0x8593C3BFE77F030E)); + get => new CRenderSkeletonImpl(_Handle + _SkeletonOffset.Value); } + private static readonly Lazy _UseUV2ForChartingOffset = new(() => Schema.GetOffset(0x8593C3BFFE2DF46A), LazyThreadSafetyMode.None); + public ref bool UseUV2ForCharting { - get => ref _Handle.AsRef(Schema.GetOffset(0x8593C3BFFE2DF46A)); + get => ref _Handle.AsRef(_UseUV2ForChartingOffset.Value); } + private static readonly Lazy _EmbeddedMapMeshOffset = new(() => Schema.GetOffset(0x8593C3BF6E866052), LazyThreadSafetyMode.None); + public ref bool EmbeddedMapMesh { - get => ref _Handle.AsRef(Schema.GetOffset(0x8593C3BF6E866052)); + get => ref _Handle.AsRef(_EmbeddedMapMeshOffset.Value); } + private static readonly Lazy _MeshDeformParamsOffset = new(() => Schema.GetOffset(0x8593C3BF061DBB9B), LazyThreadSafetyMode.None); + public DynamicMeshDeformParams_t MeshDeformParams { - get => new DynamicMeshDeformParams_tImpl(_Handle + Schema.GetOffset(0x8593C3BF061DBB9B)); + get => new DynamicMeshDeformParams_tImpl(_Handle + _MeshDeformParamsOffset.Value); } + private static readonly Lazy _GroomDataOffset = new(() => Schema.GetOffset(0x8593C3BFCFCDEA93), LazyThreadSafetyMode.None); + public CRenderGroom? GroomData { get { - var ptr = _Handle.Read(Schema.GetOffset(0x8593C3BFCFCDEA93)); + var ptr = _Handle.Read(_GroomDataOffset.Value); return ptr.IsValidPtr() ? new CRenderGroomImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderSkeletonImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderSkeletonImpl.cs index 33b2a71cd..e1db990b6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderSkeletonImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRenderSkeletonImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CRenderSkeletonImpl : SchemaClass, CRenderSkeleton { public CRenderSkeletonImpl(nint handle) : base(handle) { } + private static readonly Lazy _BonesOffset = new(() => Schema.GetOffset(0xBF0A83950FDA60D4), LazyThreadSafetyMode.None); + public ref CUtlVector Bones { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBF0A83950FDA60D4)); + get => ref _Handle.AsRef>(_BonesOffset.Value); } + private static readonly Lazy _BoneParentsOffset = new(() => Schema.GetOffset(0xBF0A839571828F04), LazyThreadSafetyMode.None); + public ref CUtlVector BoneParents { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBF0A839571828F04)); + get => ref _Handle.AsRef>(_BoneParentsOffset.Value); } + private static readonly Lazy _BoneWeightCountOffset = new(() => Schema.GetOffset(0xBF0A839508029166), LazyThreadSafetyMode.None); + public ref int BoneWeightCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xBF0A839508029166)); + get => ref _Handle.AsRef(_BoneWeightCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CReplicationParametersImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CReplicationParametersImpl.cs index 53930bc22..5864752ab 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CReplicationParametersImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CReplicationParametersImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CReplicationParametersImpl : SchemaClass, CReplicationPar public CReplicationParametersImpl(nint handle) : base(handle) { } + private static readonly Lazy _ReplicationModeOffset = new(() => Schema.GetOffset(0xFA909F20C8967832), LazyThreadSafetyMode.None); + public ref ParticleReplicationMode_t ReplicationMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA909F20C8967832)); + get => ref _Handle.AsRef(_ReplicationModeOffset.Value); } + private static readonly Lazy _ScaleChildParticleRadiiOffset = new(() => Schema.GetOffset(0xFA909F207842F3CC), LazyThreadSafetyMode.None); + public ref bool ScaleChildParticleRadii { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA909F207842F3CC)); + get => ref _Handle.AsRef(_ScaleChildParticleRadiiOffset.Value); } + private static readonly Lazy _MinRandomRadiusScaleOffset = new(() => Schema.GetOffset(0xFA909F208CBF88EE), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput MinRandomRadiusScale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xFA909F208CBF88EE)); + get => new CParticleCollectionFloatInputImpl(_Handle + _MinRandomRadiusScaleOffset.Value); } + private static readonly Lazy _MaxRandomRadiusScaleOffset = new(() => Schema.GetOffset(0xFA909F2022697B5C), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput MaxRandomRadiusScale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xFA909F2022697B5C)); + get => new CParticleCollectionFloatInputImpl(_Handle + _MaxRandomRadiusScaleOffset.Value); } + private static readonly Lazy _MinRandomDisplacementOffset = new(() => Schema.GetOffset(0xFA909F20808FB77F), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput MinRandomDisplacement { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xFA909F20808FB77F)); + get => new CParticleCollectionVecInputImpl(_Handle + _MinRandomDisplacementOffset.Value); } + private static readonly Lazy _MaxRandomDisplacementOffset = new(() => Schema.GetOffset(0xFA909F20FF279F49), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput MaxRandomDisplacement { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xFA909F20FF279F49)); + get => new CParticleCollectionVecInputImpl(_Handle + _MaxRandomDisplacementOffset.Value); } + private static readonly Lazy _ModellingScaleOffset = new(() => Schema.GetOffset(0xFA909F20BE93B72A), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ModellingScale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xFA909F20BE93B72A)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ModellingScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CResponseCriteriaSetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CResponseCriteriaSetImpl.cs index 29167d8b4..ee35d44cb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CResponseCriteriaSetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CResponseCriteriaSetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CResponseCriteriaSetImpl : SchemaClass, CResponseCriteria public CResponseCriteriaSetImpl(nint handle) : base(handle) { } + private static readonly Lazy _NumPrefixedContextsOffset = new(() => Schema.GetOffset(0x96E39114B653ABCA), LazyThreadSafetyMode.None); + public ref int NumPrefixedContexts { - get => ref _Handle.AsRef(Schema.GetOffset(0x96E39114B653ABCA)); + get => ref _Handle.AsRef(_NumPrefixedContextsOffset.Value); } + private static readonly Lazy _OverrideOnAppendOffset = new(() => Schema.GetOffset(0x96E391140E1014F0), LazyThreadSafetyMode.None); + public ref bool OverrideOnAppend { - get => ref _Handle.AsRef(Schema.GetOffset(0x96E391140E1014F0)); + get => ref _Handle.AsRef(_OverrideOnAppendOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CResponseQueueImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CResponseQueueImpl.cs index 49a7495d9..3d6fb4e4e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CResponseQueueImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CResponseQueueImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CResponseQueueImpl : SchemaClass, CResponseQueue { public CResponseQueueImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExpresserTargetsOffset = new(() => Schema.GetOffset(0xBA9C485870CCA05A), LazyThreadSafetyMode.None); + public ref CUtlVector> ExpresserTargets { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xBA9C485870CCA05A)); + get => ref _Handle.AsRef>>(_ExpresserTargetsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRetakeGameRulesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRetakeGameRulesImpl.cs index b7b2d0e34..28e0ae9e3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRetakeGameRulesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRetakeGameRulesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CRetakeGameRulesImpl : SchemaClass, CRetakeGameRules { public CRetakeGameRulesImpl(nint handle) : base(handle) { } + private static readonly Lazy _MatchSeedOffset = new(() => Schema.GetOffset(0x34813D492DE0044B), LazyThreadSafetyMode.None); + public ref int MatchSeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x34813D492DE0044B)); + get => ref _Handle.AsRef(_MatchSeedOffset.Value); } + private static readonly Lazy _BlockersPresentOffset = new(() => Schema.GetOffset(0x34813D49BE2F2F2D), LazyThreadSafetyMode.None); + public ref bool BlockersPresent { - get => ref _Handle.AsRef(Schema.GetOffset(0x34813D49BE2F2F2D)); + get => ref _Handle.AsRef(_BlockersPresentOffset.Value); } + private static readonly Lazy _RoundInProgressOffset = new(() => Schema.GetOffset(0x34813D49AE69021B), LazyThreadSafetyMode.None); + public ref bool RoundInProgress { - get => ref _Handle.AsRef(Schema.GetOffset(0x34813D49AE69021B)); + get => ref _Handle.AsRef(_RoundInProgressOffset.Value); } + private static readonly Lazy _FirstSecondHalfRoundOffset = new(() => Schema.GetOffset(0x34813D49E229A099), LazyThreadSafetyMode.None); + public ref int FirstSecondHalfRound { - get => ref _Handle.AsRef(Schema.GetOffset(0x34813D49E229A099)); + get => ref _Handle.AsRef(_FirstSecondHalfRoundOffset.Value); } + private static readonly Lazy _BombSiteOffset = new(() => Schema.GetOffset(0x34813D49E7E88ECF), LazyThreadSafetyMode.None); + public ref int BombSite { - get => ref _Handle.AsRef(Schema.GetOffset(0x34813D49E7E88ECF)); + get => ref _Handle.AsRef(_BombSiteOffset.Value); } + private static readonly Lazy _BombPlanterOffset = new(() => Schema.GetOffset(0x34813D491A1306A3), LazyThreadSafetyMode.None); + public ref CHandle BombPlanter { - get => ref _Handle.AsRef>(Schema.GetOffset(0x34813D491A1306A3)); + get => ref _Handle.AsRef>(_BombPlanterOffset.Value); } public void MatchSeedUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRevertSavedImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRevertSavedImpl.cs index 38c242230..70ef34b28 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRevertSavedImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRevertSavedImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CRevertSavedImpl : CModelPointEntityImpl, CRevertSaved { public CRevertSavedImpl(nint handle) : base(handle) { } + private static readonly Lazy _LoadTimeOffset = new(() => Schema.GetOffset(0x8E0EAC0F9925A540), LazyThreadSafetyMode.None); + public ref float LoadTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E0EAC0F9925A540)); + get => ref _Handle.AsRef(_LoadTimeOffset.Value); } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0x8E0EAC0F9879A98D), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E0EAC0F9879A98D)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _HoldTimeOffset = new(() => Schema.GetOffset(0x8E0EAC0F105A1BF1), LazyThreadSafetyMode.None); + public ref float HoldTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E0EAC0F105A1BF1)); + get => ref _Handle.AsRef(_HoldTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRootUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRootUpdateNodeImpl.cs index 831bd4df8..c95e6485e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRootUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRootUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRopeKeyframeAlias_move_ropeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRopeKeyframeAlias_move_ropeImpl.cs index 926fea2d5..13eeacc57 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRopeKeyframeAlias_move_ropeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRopeKeyframeAlias_move_ropeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRopeKeyframeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRopeKeyframeImpl.cs index 0223d900b..5973047b5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRopeKeyframeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRopeKeyframeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,76 +17,118 @@ internal partial class CRopeKeyframeImpl : CBaseModelEntityImpl, CRopeKeyframe { public CRopeKeyframeImpl(nint handle) : base(handle) { } + private static readonly Lazy _RopeFlagsOffset = new(() => Schema.GetOffset(0x76EE758E2EF994F4), LazyThreadSafetyMode.None); + public ref ushort RopeFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0x76EE758E2EF994F4)); + get => ref _Handle.AsRef(_RopeFlagsOffset.Value); } + private static readonly Lazy _NextLinkNameOffset = new(() => Schema.GetOffset(0x76EE758EFD59AE1A), LazyThreadSafetyMode.None); + public string NextLinkName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x76EE758EFD59AE1A)); + var ptr = _Handle.Read(_NextLinkNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x76EE758EFD59AE1A, value); + set => Schema.SetString(_Handle, _NextLinkNameOffset.Value, value); } + private static readonly Lazy _SlackOffset = new(() => Schema.GetOffset(0x76EE758E84ECDEA7), LazyThreadSafetyMode.None); + public ref short Slack { - get => ref _Handle.AsRef(Schema.GetOffset(0x76EE758E84ECDEA7)); + get => ref _Handle.AsRef(_SlackOffset.Value); } + private static readonly Lazy _WidthOffset = new(() => Schema.GetOffset(0x76EE758E2FD9239F), LazyThreadSafetyMode.None); + public ref float Width { - get => ref _Handle.AsRef(Schema.GetOffset(0x76EE758E2FD9239F)); + get => ref _Handle.AsRef(_WidthOffset.Value); } + private static readonly Lazy _TextureScaleOffset = new(() => Schema.GetOffset(0x76EE758EA14A014E), LazyThreadSafetyMode.None); + public ref float TextureScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x76EE758EA14A014E)); + get => ref _Handle.AsRef(_TextureScaleOffset.Value); } + private static readonly Lazy _SegmentsOffset = new(() => Schema.GetOffset(0x76EE758E4878E17B), LazyThreadSafetyMode.None); + public ref byte Segments { - get => ref _Handle.AsRef(Schema.GetOffset(0x76EE758E4878E17B)); + get => ref _Handle.AsRef(_SegmentsOffset.Value); } + private static readonly Lazy _ConstrainBetweenEndpointsOffset = new(() => Schema.GetOffset(0x76EE758E05033E3C), LazyThreadSafetyMode.None); + public ref bool ConstrainBetweenEndpoints { - get => ref _Handle.AsRef(Schema.GetOffset(0x76EE758E05033E3C)); + get => ref _Handle.AsRef(_ConstrainBetweenEndpointsOffset.Value); } + private static readonly Lazy _StrRopeMaterialModelOffset = new(() => Schema.GetOffset(0x76EE758E7A58C07A), LazyThreadSafetyMode.None); + public string StrRopeMaterialModel { get { - var ptr = _Handle.Read(Schema.GetOffset(0x76EE758E7A58C07A)); + var ptr = _Handle.Read(_StrRopeMaterialModelOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x76EE758E7A58C07A, value); + set => Schema.SetString(_Handle, _StrRopeMaterialModelOffset.Value, value); } + private static readonly Lazy _RopeMaterialModelIndexOffset = new(() => Schema.GetOffset(0x76EE758E831DE452), LazyThreadSafetyMode.None); + public ref CStrongHandle RopeMaterialModelIndex { - get => ref _Handle.AsRef>(Schema.GetOffset(0x76EE758E831DE452)); + get => ref _Handle.AsRef>(_RopeMaterialModelIndexOffset.Value); } + private static readonly Lazy _SubdivOffset = new(() => Schema.GetOffset(0x76EE758E785F10D8), LazyThreadSafetyMode.None); + public ref byte Subdiv { - get => ref _Handle.AsRef(Schema.GetOffset(0x76EE758E785F10D8)); + get => ref _Handle.AsRef(_SubdivOffset.Value); } + private static readonly Lazy _ChangeCountOffset = new(() => Schema.GetOffset(0x76EE758E167C12A8), LazyThreadSafetyMode.None); + public ref byte ChangeCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x76EE758E167C12A8)); + get => ref _Handle.AsRef(_ChangeCountOffset.Value); } + private static readonly Lazy _RopeLengthOffset = new(() => Schema.GetOffset(0x76EE758EC27FC78D), LazyThreadSafetyMode.None); + public ref short RopeLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x76EE758EC27FC78D)); + get => ref _Handle.AsRef(_RopeLengthOffset.Value); } + private static readonly Lazy _LockedPointsOffset = new(() => Schema.GetOffset(0x76EE758ECE6446D4), LazyThreadSafetyMode.None); + public ref byte LockedPoints { - get => ref _Handle.AsRef(Schema.GetOffset(0x76EE758ECE6446D4)); + get => ref _Handle.AsRef(_LockedPointsOffset.Value); } + private static readonly Lazy _CreatedFromMapFileOffset = new(() => Schema.GetOffset(0x76EE758EB4684909), LazyThreadSafetyMode.None); + public ref bool CreatedFromMapFile { - get => ref _Handle.AsRef(Schema.GetOffset(0x76EE758EB4684909)); + get => ref _Handle.AsRef(_CreatedFromMapFileOffset.Value); } + private static readonly Lazy _ScrollSpeedOffset = new(() => Schema.GetOffset(0x76EE758E448C9F71), LazyThreadSafetyMode.None); + public ref float ScrollSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x76EE758E448C9F71)); + get => ref _Handle.AsRef(_ScrollSpeedOffset.Value); } + private static readonly Lazy _StartPointValidOffset = new(() => Schema.GetOffset(0x76EE758E949209D3), LazyThreadSafetyMode.None); + public ref bool StartPointValid { - get => ref _Handle.AsRef(Schema.GetOffset(0x76EE758E949209D3)); + get => ref _Handle.AsRef(_StartPointValidOffset.Value); } + private static readonly Lazy _EndPointValidOffset = new(() => Schema.GetOffset(0x76EE758E938F0CDE), LazyThreadSafetyMode.None); + public ref bool EndPointValid { - get => ref _Handle.AsRef(Schema.GetOffset(0x76EE758E938F0CDE)); + get => ref _Handle.AsRef(_EndPointValidOffset.Value); } + private static readonly Lazy _StartPointOffset = new(() => Schema.GetOffset(0x76EE758ECCE549A9), LazyThreadSafetyMode.None); + public ref CHandle StartPoint { - get => ref _Handle.AsRef>(Schema.GetOffset(0x76EE758ECCE549A9)); + get => ref _Handle.AsRef>(_StartPointOffset.Value); } + private static readonly Lazy _EndPointOffset = new(() => Schema.GetOffset(0x76EE758E5E8C8D3A), LazyThreadSafetyMode.None); + public ref CHandle EndPoint { - get => ref _Handle.AsRef>(Schema.GetOffset(0x76EE758E5E8C8D3A)); + get => ref _Handle.AsRef>(_EndPointOffset.Value); } + private static readonly Lazy _StartAttachmentOffset = new(() => Schema.GetOffset(0x76EE758E1022E6F5), LazyThreadSafetyMode.None); + public AttachmentHandle_t StartAttachment { - get => new AttachmentHandle_tImpl(_Handle + Schema.GetOffset(0x76EE758E1022E6F5)); + get => new AttachmentHandle_tImpl(_Handle + _StartAttachmentOffset.Value); } + private static readonly Lazy _EndAttachmentOffset = new(() => Schema.GetOffset(0x76EE758ED537713C), LazyThreadSafetyMode.None); + public AttachmentHandle_t EndAttachment { - get => new AttachmentHandle_tImpl(_Handle + Schema.GetOffset(0x76EE758ED537713C)); + get => new AttachmentHandle_tImpl(_Handle + _EndAttachmentOffset.Value); } public void RopeFlagsUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRopeOverlapHitImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRopeOverlapHitImpl.cs index b6eb0bd8a..ae2f2058f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRopeOverlapHitImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRopeOverlapHitImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CRopeOverlapHitImpl : SchemaClass, CRopeOverlapHit { public CRopeOverlapHitImpl(nint handle) : base(handle) { } + private static readonly Lazy _EntityOffset = new(() => Schema.GetOffset(0x9262EE3E6EBADCB0), LazyThreadSafetyMode.None); + public ref CHandle Entity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9262EE3E6EBADCB0)); + get => ref _Handle.AsRef>(_EntityOffset.Value); } + private static readonly Lazy _OverlappingLinksOffset = new(() => Schema.GetOffset(0x9262EE3E44D0B359), LazyThreadSafetyMode.None); + public ref CUtlVector OverlappingLinks { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9262EE3E44D0B359)); + get => ref _Handle.AsRef>(_OverlappingLinksOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRotButtonImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRotButtonImpl.cs index b46619375..9b68dd003 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRotButtonImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRotButtonImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRotDoorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRotDoorImpl.cs index 90a024491..5a79c8e2c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRotDoorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRotDoorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CRotDoorImpl : CBaseDoorImpl, CRotDoor { public CRotDoorImpl(nint handle) : base(handle) { } + private static readonly Lazy _SolidBspOffset = new(() => Schema.GetOffset(0x175D110BA50CEC89), LazyThreadSafetyMode.None); + public ref bool SolidBsp { - get => ref _Handle.AsRef(Schema.GetOffset(0x175D110BA50CEC89)); + get => ref _Handle.AsRef(_SolidBspOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRotatorTargetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRotatorTargetImpl.cs index a0aca6a84..c2e6dff17 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRotatorTargetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRotatorTargetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CRotatorTargetImpl : CPointEntityImpl, CRotatorTarget { public CRotatorTargetImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnArrivedAtOffset = new(() => Schema.GetOffset(0x448D6B2611C20554), LazyThreadSafetyMode.None); + public CEntityIOOutput OnArrivedAt { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x448D6B2611C20554)); + get => new CEntityIOOutputImpl(_Handle + _OnArrivedAtOffset.Value); } + private static readonly Lazy _SpaceOffset = new(() => Schema.GetOffset(0x448D6B26A8FD0676), LazyThreadSafetyMode.None); + public ref RotatorTargetSpace_t Space { - get => ref _Handle.AsRef(Schema.GetOffset(0x448D6B26A8FD0676)); + get => ref _Handle.AsRef(_SpaceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRuleBrushEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRuleBrushEntityImpl.cs index 74299f80c..e801ac69b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRuleBrushEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRuleBrushEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRuleEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRuleEntityImpl.cs index 83d84388f..f189aac98 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRuleEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRuleEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CRuleEntityImpl : CBaseModelEntityImpl, CRuleEntity { public CRuleEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _MasterOffset = new(() => Schema.GetOffset(0x5C9BFE2FAC57FE5B), LazyThreadSafetyMode.None); + public string Master { get { - var ptr = _Handle.Read(Schema.GetOffset(0x5C9BFE2FAC57FE5B)); + var ptr = _Handle.Read(_MasterOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x5C9BFE2FAC57FE5B, value); + set => Schema.SetString(_Handle, _MasterOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRulePointEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRulePointEntityImpl.cs index 205e1299b..2f873b463 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRulePointEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CRulePointEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CRulePointEntityImpl : CRuleEntityImpl, CRulePointEntity public CRulePointEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScoreOffset = new(() => Schema.GetOffset(0x9E2258396C814615), LazyThreadSafetyMode.None); + public ref int Score { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E2258396C814615)); + get => ref _Handle.AsRef(_ScoreOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSAdditionalMatchStats_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSAdditionalMatchStats_tImpl.cs index 7d609df6c..52f1ba40b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSAdditionalMatchStats_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSAdditionalMatchStats_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,65 @@ internal partial class CSAdditionalMatchStats_tImpl : CSAdditionalPerRoundStats_ public CSAdditionalMatchStats_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NumRoundsSurvivedOffset = new(() => Schema.GetOffset(0x22CBC1150E685E90), LazyThreadSafetyMode.None); + public ref int NumRoundsSurvived { - get => ref _Handle.AsRef(Schema.GetOffset(0x22CBC1150E685E90)); + get => ref _Handle.AsRef(_NumRoundsSurvivedOffset.Value); } + private static readonly Lazy _MaxNumRoundsSurvivedOffset = new(() => Schema.GetOffset(0x22CBC115C3CE99BC), LazyThreadSafetyMode.None); + public ref int MaxNumRoundsSurvived { - get => ref _Handle.AsRef(Schema.GetOffset(0x22CBC115C3CE99BC)); + get => ref _Handle.AsRef(_MaxNumRoundsSurvivedOffset.Value); } + private static readonly Lazy _NumRoundsSurvivedTotalOffset = new(() => Schema.GetOffset(0x22CBC1154AB60BAA), LazyThreadSafetyMode.None); + public ref int NumRoundsSurvivedTotal { - get => ref _Handle.AsRef(Schema.GetOffset(0x22CBC1154AB60BAA)); + get => ref _Handle.AsRef(_NumRoundsSurvivedTotalOffset.Value); } + private static readonly Lazy _RoundsWonWithoutPurchaseOffset = new(() => Schema.GetOffset(0x22CBC115AC7FF6C6), LazyThreadSafetyMode.None); + public ref int RoundsWonWithoutPurchase { - get => ref _Handle.AsRef(Schema.GetOffset(0x22CBC115AC7FF6C6)); + get => ref _Handle.AsRef(_RoundsWonWithoutPurchaseOffset.Value); } + private static readonly Lazy _RoundsWonWithoutPurchaseTotalOffset = new(() => Schema.GetOffset(0x22CBC1153AC9D3C8), LazyThreadSafetyMode.None); + public ref int RoundsWonWithoutPurchaseTotal { - get => ref _Handle.AsRef(Schema.GetOffset(0x22CBC1153AC9D3C8)); + get => ref _Handle.AsRef(_RoundsWonWithoutPurchaseTotalOffset.Value); } + private static readonly Lazy _NumFirstKillsOffset = new(() => Schema.GetOffset(0x22CBC115500366CC), LazyThreadSafetyMode.None); + public ref int NumFirstKills { - get => ref _Handle.AsRef(Schema.GetOffset(0x22CBC115500366CC)); + get => ref _Handle.AsRef(_NumFirstKillsOffset.Value); } + private static readonly Lazy _NumClutchKillsOffset = new(() => Schema.GetOffset(0x22CBC115875D8493), LazyThreadSafetyMode.None); + public ref int NumClutchKills { - get => ref _Handle.AsRef(Schema.GetOffset(0x22CBC115875D8493)); + get => ref _Handle.AsRef(_NumClutchKillsOffset.Value); } + private static readonly Lazy _NumPistolKillsOffset = new(() => Schema.GetOffset(0x22CBC115079C10BD), LazyThreadSafetyMode.None); + public ref int NumPistolKills { - get => ref _Handle.AsRef(Schema.GetOffset(0x22CBC115079C10BD)); + get => ref _Handle.AsRef(_NumPistolKillsOffset.Value); } + private static readonly Lazy _NumSniperKillsOffset = new(() => Schema.GetOffset(0x22CBC115FAE64E21), LazyThreadSafetyMode.None); + public ref int NumSniperKills { - get => ref _Handle.AsRef(Schema.GetOffset(0x22CBC115FAE64E21)); + get => ref _Handle.AsRef(_NumSniperKillsOffset.Value); } + private static readonly Lazy _NumSuicidesOffset = new(() => Schema.GetOffset(0x22CBC11545F754B9), LazyThreadSafetyMode.None); + public ref int NumSuicides { - get => ref _Handle.AsRef(Schema.GetOffset(0x22CBC11545F754B9)); + get => ref _Handle.AsRef(_NumSuicidesOffset.Value); } + private static readonly Lazy _NumTeamKillsOffset = new(() => Schema.GetOffset(0x22CBC115033A4DAE), LazyThreadSafetyMode.None); + public ref int NumTeamKills { - get => ref _Handle.AsRef(Schema.GetOffset(0x22CBC115033A4DAE)); + get => ref _Handle.AsRef(_NumTeamKillsOffset.Value); } + private static readonly Lazy _TeamDamageOffset = new(() => Schema.GetOffset(0x22CBC11530150C1B), LazyThreadSafetyMode.None); + public ref float TeamDamage { - get => ref _Handle.AsRef(Schema.GetOffset(0x22CBC11530150C1B)); + get => ref _Handle.AsRef(_TeamDamageOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSAdditionalPerRoundStats_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSAdditionalPerRoundStats_tImpl.cs index a897016fc..36e6b48cb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSAdditionalPerRoundStats_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSAdditionalPerRoundStats_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CSAdditionalPerRoundStats_tImpl : SchemaClass, CSAddition public CSAdditionalPerRoundStats_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NumChickensKilledOffset = new(() => Schema.GetOffset(0x719C617993548CDE), LazyThreadSafetyMode.None); + public ref int NumChickensKilled { - get => ref _Handle.AsRef(Schema.GetOffset(0x719C617993548CDE)); + get => ref _Handle.AsRef(_NumChickensKilledOffset.Value); } + private static readonly Lazy _KillsWhileBlindOffset = new(() => Schema.GetOffset(0x719C61794FEC6186), LazyThreadSafetyMode.None); + public ref int KillsWhileBlind { - get => ref _Handle.AsRef(Schema.GetOffset(0x719C61794FEC6186)); + get => ref _Handle.AsRef(_KillsWhileBlindOffset.Value); } + private static readonly Lazy _BombCarrierkillsOffset = new(() => Schema.GetOffset(0x719C617913457A30), LazyThreadSafetyMode.None); + public ref int BombCarrierkills { - get => ref _Handle.AsRef(Schema.GetOffset(0x719C617913457A30)); + get => ref _Handle.AsRef(_BombCarrierkillsOffset.Value); } + private static readonly Lazy _BurnDamageInflictedOffset = new(() => Schema.GetOffset(0x719C6179ADDF061F), LazyThreadSafetyMode.None); + public ref float BurnDamageInflicted { - get => ref _Handle.AsRef(Schema.GetOffset(0x719C6179ADDF061F)); + get => ref _Handle.AsRef(_BurnDamageInflictedOffset.Value); } + private static readonly Lazy _BlastDamageInflictedOffset = new(() => Schema.GetOffset(0x719C6179FDBAB060), LazyThreadSafetyMode.None); + public ref float BlastDamageInflicted { - get => ref _Handle.AsRef(Schema.GetOffset(0x719C6179FDBAB060)); + get => ref _Handle.AsRef(_BlastDamageInflictedOffset.Value); } + private static readonly Lazy _DinksOffset = new(() => Schema.GetOffset(0x719C617910BCE83D), LazyThreadSafetyMode.None); + public ref int Dinks { - get => ref _Handle.AsRef(Schema.GetOffset(0x719C617910BCE83D)); + get => ref _Handle.AsRef(_DinksOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSMatchStats_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSMatchStats_tImpl.cs index 7d95251fb..5efeb712b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSMatchStats_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSMatchStats_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,68 +17,110 @@ internal partial class CSMatchStats_tImpl : CSPerRoundStats_tImpl, CSMatchStats_ public CSMatchStats_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _Enemy5KsOffset = new(() => Schema.GetOffset(0x68F1494C51108145), LazyThreadSafetyMode.None); + public ref int Enemy5Ks { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494C51108145)); + get => ref _Handle.AsRef(_Enemy5KsOffset.Value); } + private static readonly Lazy _Enemy4KsOffset = new(() => Schema.GetOffset(0x68F1494CF438A94A), LazyThreadSafetyMode.None); + public ref int Enemy4Ks { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494CF438A94A)); + get => ref _Handle.AsRef(_Enemy4KsOffset.Value); } + private static readonly Lazy _Enemy3KsOffset = new(() => Schema.GetOffset(0x68F1494C874D3067), LazyThreadSafetyMode.None); + public ref int Enemy3Ks { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494C874D3067)); + get => ref _Handle.AsRef(_Enemy3KsOffset.Value); } + private static readonly Lazy _EnemyKnifeKillsOffset = new(() => Schema.GetOffset(0x68F1494CFB4AAF5A), LazyThreadSafetyMode.None); + public ref int EnemyKnifeKills { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494CFB4AAF5A)); + get => ref _Handle.AsRef(_EnemyKnifeKillsOffset.Value); } + private static readonly Lazy _EnemyTaserKillsOffset = new(() => Schema.GetOffset(0x68F1494CCB2A57E0), LazyThreadSafetyMode.None); + public ref int EnemyTaserKills { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494CCB2A57E0)); + get => ref _Handle.AsRef(_EnemyTaserKillsOffset.Value); } + private static readonly Lazy _Enemy2KsOffset = new(() => Schema.GetOffset(0x68F1494C18FBE094), LazyThreadSafetyMode.None); + public ref int Enemy2Ks { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494C18FBE094)); + get => ref _Handle.AsRef(_Enemy2KsOffset.Value); } + private static readonly Lazy _Utility_CountOffset = new(() => Schema.GetOffset(0x68F1494CF83A6B88), LazyThreadSafetyMode.None); + public ref int Utility_Count { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494CF83A6B88)); + get => ref _Handle.AsRef(_Utility_CountOffset.Value); } + private static readonly Lazy _Utility_SuccessesOffset = new(() => Schema.GetOffset(0x68F1494CEA9323D0), LazyThreadSafetyMode.None); + public ref int Utility_Successes { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494CEA9323D0)); + get => ref _Handle.AsRef(_Utility_SuccessesOffset.Value); } + private static readonly Lazy _Utility_EnemiesOffset = new(() => Schema.GetOffset(0x68F1494CE0BA0E47), LazyThreadSafetyMode.None); + public ref int Utility_Enemies { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494CE0BA0E47)); + get => ref _Handle.AsRef(_Utility_EnemiesOffset.Value); } + private static readonly Lazy _Flash_CountOffset = new(() => Schema.GetOffset(0x68F1494CD659ADFA), LazyThreadSafetyMode.None); + public ref int Flash_Count { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494CD659ADFA)); + get => ref _Handle.AsRef(_Flash_CountOffset.Value); } + private static readonly Lazy _Flash_SuccessesOffset = new(() => Schema.GetOffset(0x68F1494C278EEC8E), LazyThreadSafetyMode.None); + public ref int Flash_Successes { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494C278EEC8E)); + get => ref _Handle.AsRef(_Flash_SuccessesOffset.Value); } + private static readonly Lazy _HealthPointsRemovedTotalOffset = new(() => Schema.GetOffset(0x68F1494CE7E19AE8), LazyThreadSafetyMode.None); + public ref float HealthPointsRemovedTotal { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494CE7E19AE8)); + get => ref _Handle.AsRef(_HealthPointsRemovedTotalOffset.Value); } + private static readonly Lazy _HealthPointsDealtTotalOffset = new(() => Schema.GetOffset(0x68F1494C7A86EE3E), LazyThreadSafetyMode.None); + public ref float HealthPointsDealtTotal { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494C7A86EE3E)); + get => ref _Handle.AsRef(_HealthPointsDealtTotalOffset.Value); } + private static readonly Lazy _ShotsFiredTotalOffset = new(() => Schema.GetOffset(0x68F1494C791909D4), LazyThreadSafetyMode.None); + public ref int ShotsFiredTotal { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494C791909D4)); + get => ref _Handle.AsRef(_ShotsFiredTotalOffset.Value); } + private static readonly Lazy _ShotsOnTargetTotalOffset = new(() => Schema.GetOffset(0x68F1494CFC5B274C), LazyThreadSafetyMode.None); + public ref int ShotsOnTargetTotal { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494CFC5B274C)); + get => ref _Handle.AsRef(_ShotsOnTargetTotalOffset.Value); } + private static readonly Lazy _I1v1CountOffset = new(() => Schema.GetOffset(0x68F1494CEAC3EFFD), LazyThreadSafetyMode.None); + public ref int I1v1Count { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494CEAC3EFFD)); + get => ref _Handle.AsRef(_I1v1CountOffset.Value); } + private static readonly Lazy _I1v1WinsOffset = new(() => Schema.GetOffset(0x68F1494CF8124C11), LazyThreadSafetyMode.None); + public ref int I1v1Wins { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494CF8124C11)); + get => ref _Handle.AsRef(_I1v1WinsOffset.Value); } + private static readonly Lazy _I1v2CountOffset = new(() => Schema.GetOffset(0x68F1494C00CDD07A), LazyThreadSafetyMode.None); + public ref int I1v2Count { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494C00CDD07A)); + get => ref _Handle.AsRef(_I1v2CountOffset.Value); } + private static readonly Lazy _I1v2WinsOffset = new(() => Schema.GetOffset(0x68F1494C56062908), LazyThreadSafetyMode.None); + public ref int I1v2Wins { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494C56062908)); + get => ref _Handle.AsRef(_I1v2WinsOffset.Value); } + private static readonly Lazy _EntryCountOffset = new(() => Schema.GetOffset(0x68F1494CE6251007), LazyThreadSafetyMode.None); + public ref int EntryCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494CE6251007)); + get => ref _Handle.AsRef(_EntryCountOffset.Value); } + private static readonly Lazy _EntryWinsOffset = new(() => Schema.GetOffset(0x68F1494C81FCE62F), LazyThreadSafetyMode.None); + public ref int EntryWins { - get => ref _Handle.AsRef(Schema.GetOffset(0x68F1494C81FCE62F)); + get => ref _Handle.AsRef(_EntryWinsOffset.Value); } public void Enemy5KsUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSPerRoundStats_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSPerRoundStats_tImpl.cs index f8c23c45f..8ea5d9a2a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSPerRoundStats_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSPerRoundStats_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,70 @@ internal partial class CSPerRoundStats_tImpl : SchemaClass, CSPerRoundStats_t { public CSPerRoundStats_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _KillsOffset = new(() => Schema.GetOffset(0xA16B85EA0E456FE5), LazyThreadSafetyMode.None); + public ref int Kills { - get => ref _Handle.AsRef(Schema.GetOffset(0xA16B85EA0E456FE5)); + get => ref _Handle.AsRef(_KillsOffset.Value); } + private static readonly Lazy _DeathsOffset = new(() => Schema.GetOffset(0xA16B85EAAF18870F), LazyThreadSafetyMode.None); + public ref int Deaths { - get => ref _Handle.AsRef(Schema.GetOffset(0xA16B85EAAF18870F)); + get => ref _Handle.AsRef(_DeathsOffset.Value); } + private static readonly Lazy _AssistsOffset = new(() => Schema.GetOffset(0xA16B85EAB792DB50), LazyThreadSafetyMode.None); + public ref int Assists { - get => ref _Handle.AsRef(Schema.GetOffset(0xA16B85EAB792DB50)); + get => ref _Handle.AsRef(_AssistsOffset.Value); } + private static readonly Lazy _DamageOffset = new(() => Schema.GetOffset(0xA16B85EA0DEE4DB5), LazyThreadSafetyMode.None); + public ref int Damage { - get => ref _Handle.AsRef(Schema.GetOffset(0xA16B85EA0DEE4DB5)); + get => ref _Handle.AsRef(_DamageOffset.Value); } + private static readonly Lazy _EquipmentValueOffset = new(() => Schema.GetOffset(0xA16B85EA1B2CADDD), LazyThreadSafetyMode.None); + public ref int EquipmentValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xA16B85EA1B2CADDD)); + get => ref _Handle.AsRef(_EquipmentValueOffset.Value); } + private static readonly Lazy _MoneySavedOffset = new(() => Schema.GetOffset(0xA16B85EAC85DB77B), LazyThreadSafetyMode.None); + public ref int MoneySaved { - get => ref _Handle.AsRef(Schema.GetOffset(0xA16B85EAC85DB77B)); + get => ref _Handle.AsRef(_MoneySavedOffset.Value); } + private static readonly Lazy _KillRewardOffset = new(() => Schema.GetOffset(0xA16B85EA9C813A23), LazyThreadSafetyMode.None); + public ref int KillReward { - get => ref _Handle.AsRef(Schema.GetOffset(0xA16B85EA9C813A23)); + get => ref _Handle.AsRef(_KillRewardOffset.Value); } + private static readonly Lazy _LiveTimeOffset = new(() => Schema.GetOffset(0xA16B85EAD956D2F7), LazyThreadSafetyMode.None); + public ref int LiveTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xA16B85EAD956D2F7)); + get => ref _Handle.AsRef(_LiveTimeOffset.Value); } + private static readonly Lazy _HeadShotKillsOffset = new(() => Schema.GetOffset(0xA16B85EA2C61AFF3), LazyThreadSafetyMode.None); + public ref int HeadShotKills { - get => ref _Handle.AsRef(Schema.GetOffset(0xA16B85EA2C61AFF3)); + get => ref _Handle.AsRef(_HeadShotKillsOffset.Value); } + private static readonly Lazy _ObjectiveOffset = new(() => Schema.GetOffset(0xA16B85EA14FC52D7), LazyThreadSafetyMode.None); + public ref int Objective { - get => ref _Handle.AsRef(Schema.GetOffset(0xA16B85EA14FC52D7)); + get => ref _Handle.AsRef(_ObjectiveOffset.Value); } + private static readonly Lazy _CashEarnedOffset = new(() => Schema.GetOffset(0xA16B85EA8BEB3100), LazyThreadSafetyMode.None); + public ref int CashEarned { - get => ref _Handle.AsRef(Schema.GetOffset(0xA16B85EA8BEB3100)); + get => ref _Handle.AsRef(_CashEarnedOffset.Value); } + private static readonly Lazy _UtilityDamageOffset = new(() => Schema.GetOffset(0xA16B85EAC91A82E5), LazyThreadSafetyMode.None); + public ref int UtilityDamage { - get => ref _Handle.AsRef(Schema.GetOffset(0xA16B85EAC91A82E5)); + get => ref _Handle.AsRef(_UtilityDamageOffset.Value); } + private static readonly Lazy _EnemiesFlashedOffset = new(() => Schema.GetOffset(0xA16B85EA460AB70F), LazyThreadSafetyMode.None); + public ref int EnemiesFlashed { - get => ref _Handle.AsRef(Schema.GetOffset(0xA16B85EA460AB70F)); + get => ref _Handle.AsRef(_EnemiesFlashedOffset.Value); } public void KillsUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSEndFrameViewInfoImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSEndFrameViewInfoImpl.cs index a64ac8727..2d28aa7f4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSEndFrameViewInfoImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSEndFrameViewInfoImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CSSDSEndFrameViewInfoImpl : SchemaClass, CSSDSEndFrameVie public CSSDSEndFrameViewInfoImpl(nint handle) : base(handle) { } + private static readonly Lazy _ViewIdOffset = new(() => Schema.GetOffset(0xE2792496AE3CB1A1), LazyThreadSafetyMode.None); + public ref ulong ViewId { - get => ref _Handle.AsRef(Schema.GetOffset(0xE2792496AE3CB1A1)); + get => ref _Handle.AsRef(_ViewIdOffset.Value); } + private static readonly Lazy _ViewNameOffset = new(() => Schema.GetOffset(0xE2792496BA5BBDBB), LazyThreadSafetyMode.None); + public string ViewName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xE2792496BA5BBDBB)); + var ptr = _Handle.Read(_ViewNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xE2792496BA5BBDBB, value); + set => Schema.SetString(_Handle, _ViewNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_EndFrameImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_EndFrameImpl.cs index 83a5dce82..1df8fb230 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_EndFrameImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_EndFrameImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CSSDSMsg_EndFrameImpl : SchemaClass, CSSDSMsg_EndFrame { public CSSDSMsg_EndFrameImpl(nint handle) : base(handle) { } + private static readonly Lazy _ViewsOffset = new(() => Schema.GetOffset(0x6F265E19E9FEAC51), LazyThreadSafetyMode.None); + public ref CUtlVector Views { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6F265E19E9FEAC51)); + get => ref _Handle.AsRef>(_ViewsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_LayerBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_LayerBaseImpl.cs index 87a9f7baa..4cc418fe6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_LayerBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_LayerBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,42 @@ internal partial class CSSDSMsg_LayerBaseImpl : SchemaClass, CSSDSMsg_LayerBase public CSSDSMsg_LayerBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _ViewIdOffset = new(() => Schema.GetOffset(0x9F18C5E5E976CB25), LazyThreadSafetyMode.None); + public SceneViewId_t ViewId { - get => new SceneViewId_tImpl(_Handle + Schema.GetOffset(0x9F18C5E5E976CB25)); + get => new SceneViewId_tImpl(_Handle + _ViewIdOffset.Value); } + private static readonly Lazy _ViewNameOffset = new(() => Schema.GetOffset(0x9F18C5E5BA5BBDBB), LazyThreadSafetyMode.None); + public string ViewName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9F18C5E5BA5BBDBB)); + var ptr = _Handle.Read(_ViewNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9F18C5E5BA5BBDBB, value); + set => Schema.SetString(_Handle, _ViewNameOffset.Value, value); } + private static readonly Lazy _LayerIdOffset = new(() => Schema.GetOffset(0x9F18C5E531A19D87), LazyThreadSafetyMode.None); + public ref ulong LayerId { - get => ref _Handle.AsRef(Schema.GetOffset(0x9F18C5E531A19D87)); + get => ref _Handle.AsRef(_LayerIdOffset.Value); } + private static readonly Lazy _LayerNameOffset = new(() => Schema.GetOffset(0x9F18C5E55A7163B5), LazyThreadSafetyMode.None); + public string LayerName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9F18C5E55A7163B5)); + var ptr = _Handle.Read(_LayerNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9F18C5E55A7163B5, value); + set => Schema.SetString(_Handle, _LayerNameOffset.Value, value); } + private static readonly Lazy _DisplayTextOffset = new(() => Schema.GetOffset(0x9F18C5E5F59D71EE), LazyThreadSafetyMode.None); + public string DisplayText { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9F18C5E5F59D71EE)); + var ptr = _Handle.Read(_DisplayTextOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9F18C5E5F59D71EE, value); + set => Schema.SetString(_Handle, _DisplayTextOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_PostLayerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_PostLayerImpl.cs index 2e8c87b79..745f0c333 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_PostLayerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_PostLayerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_PreLayerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_PreLayerImpl.cs index 616d85566..95dca0900 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_PreLayerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_PreLayerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_ViewRenderImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_ViewRenderImpl.cs index 0d0df2d97..e166d3465 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_ViewRenderImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_ViewRenderImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CSSDSMsg_ViewRenderImpl : SchemaClass, CSSDSMsg_ViewRende public CSSDSMsg_ViewRenderImpl(nint handle) : base(handle) { } + private static readonly Lazy _ViewIdOffset = new(() => Schema.GetOffset(0x2CD48EEEE976CB25), LazyThreadSafetyMode.None); + public SceneViewId_t ViewId { - get => new SceneViewId_tImpl(_Handle + Schema.GetOffset(0x2CD48EEEE976CB25)); + get => new SceneViewId_tImpl(_Handle + _ViewIdOffset.Value); } + private static readonly Lazy _ViewNameOffset = new(() => Schema.GetOffset(0x2CD48EEEBA5BBDBB), LazyThreadSafetyMode.None); + public string ViewName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x2CD48EEEBA5BBDBB)); + var ptr = _Handle.Read(_ViewNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x2CD48EEEBA5BBDBB, value); + set => Schema.SetString(_Handle, _ViewNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_ViewTargetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_ViewTargetImpl.cs index 573bee019..43f7d4805 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_ViewTargetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_ViewTargetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,39 +17,59 @@ internal partial class CSSDSMsg_ViewTargetImpl : SchemaClass, CSSDSMsg_ViewTarge public CSSDSMsg_ViewTargetImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x4F31099BCAE8A266), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4F31099BCAE8A266)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x4F31099BCAE8A266, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _TextureIdOffset = new(() => Schema.GetOffset(0x4F31099B67AB25D9), LazyThreadSafetyMode.None); + public ref ulong TextureId { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F31099B67AB25D9)); + get => ref _Handle.AsRef(_TextureIdOffset.Value); } + private static readonly Lazy _WidthOffset = new(() => Schema.GetOffset(0x4F31099B119108BB), LazyThreadSafetyMode.None); + public ref int Width { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F31099B119108BB)); + get => ref _Handle.AsRef(_WidthOffset.Value); } + private static readonly Lazy _HeightOffset = new(() => Schema.GetOffset(0x4F31099BCAB61C56), LazyThreadSafetyMode.None); + public ref int Height { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F31099BCAB61C56)); + get => ref _Handle.AsRef(_HeightOffset.Value); } + private static readonly Lazy _RequestedWidthOffset = new(() => Schema.GetOffset(0x4F31099BCCA175E9), LazyThreadSafetyMode.None); + public ref int RequestedWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F31099BCCA175E9)); + get => ref _Handle.AsRef(_RequestedWidthOffset.Value); } + private static readonly Lazy _RequestedHeightOffset = new(() => Schema.GetOffset(0x4F31099B145278D8), LazyThreadSafetyMode.None); + public ref int RequestedHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F31099B145278D8)); + get => ref _Handle.AsRef(_RequestedHeightOffset.Value); } + private static readonly Lazy _NumMipLevelsOffset = new(() => Schema.GetOffset(0x4F31099BD64413AC), LazyThreadSafetyMode.None); + public ref int NumMipLevels { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F31099BD64413AC)); + get => ref _Handle.AsRef(_NumMipLevelsOffset.Value); } + private static readonly Lazy _DepthOffset = new(() => Schema.GetOffset(0x4F31099BB725DB96), LazyThreadSafetyMode.None); + public ref int Depth { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F31099BB725DB96)); + get => ref _Handle.AsRef(_DepthOffset.Value); } + private static readonly Lazy _MultisampleNumSamplesOffset = new(() => Schema.GetOffset(0x4F31099B1B468317), LazyThreadSafetyMode.None); + public ref int MultisampleNumSamples { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F31099B1B468317)); + get => ref _Handle.AsRef(_MultisampleNumSamplesOffset.Value); } + private static readonly Lazy _FormatOffset = new(() => Schema.GetOffset(0x4F31099BA87491AE), LazyThreadSafetyMode.None); + public ref int Format { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F31099BA87491AE)); + get => ref _Handle.AsRef(_FormatOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_ViewTargetListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_ViewTargetListImpl.cs index 68a94e6f6..bb7b6c6e3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_ViewTargetListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSSDSMsg_ViewTargetListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class CSSDSMsg_ViewTargetListImpl : SchemaClass, CSSDSMsg_ViewT public CSSDSMsg_ViewTargetListImpl(nint handle) : base(handle) { } + private static readonly Lazy _ViewIdOffset = new(() => Schema.GetOffset(0xD53B3083E976CB25), LazyThreadSafetyMode.None); + public SceneViewId_t ViewId { - get => new SceneViewId_tImpl(_Handle + Schema.GetOffset(0xD53B3083E976CB25)); + get => new SceneViewId_tImpl(_Handle + _ViewIdOffset.Value); } + private static readonly Lazy _ViewNameOffset = new(() => Schema.GetOffset(0xD53B3083BA5BBDBB), LazyThreadSafetyMode.None); + public string ViewName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD53B3083BA5BBDBB)); + var ptr = _Handle.Read(_ViewNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD53B3083BA5BBDBB, value); + set => Schema.SetString(_Handle, _ViewNameOffset.Value, value); } + private static readonly Lazy _TargetsOffset = new(() => Schema.GetOffset(0xD53B30832FF8E661), LazyThreadSafetyMode.None); + public ref CUtlVector Targets { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD53B30832FF8E661)); + get => ref _Handle.AsRef>(_TargetsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneEntityAlias_logic_choreographed_sceneImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneEntityAlias_logic_choreographed_sceneImpl.cs index aded08bae..63ac40e9e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneEntityAlias_logic_choreographed_sceneImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneEntityAlias_logic_choreographed_sceneImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneEntityImpl.cs index 75c565eda..f018d8c60 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,258 +17,392 @@ internal partial class CSceneEntityImpl : CPointEntityImpl, CSceneEntity { public CSceneEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _SceneFileOffset = new(() => Schema.GetOffset(0x1099B7011ED89EC5), LazyThreadSafetyMode.None); + public string SceneFile { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1099B7011ED89EC5)); + var ptr = _Handle.Read(_SceneFileOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1099B7011ED89EC5, value); + set => Schema.SetString(_Handle, _SceneFileOffset.Value, value); } + private static readonly Lazy _ResumeSceneFileOffset = new(() => Schema.GetOffset(0x1099B701B722F1C4), LazyThreadSafetyMode.None); + public string ResumeSceneFile { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1099B701B722F1C4)); + var ptr = _Handle.Read(_ResumeSceneFileOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1099B701B722F1C4, value); + set => Schema.SetString(_Handle, _ResumeSceneFileOffset.Value, value); } + private static readonly Lazy _Target1Offset = new(() => Schema.GetOffset(0x1099B701FC55D183), LazyThreadSafetyMode.None); + public string Target1 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1099B701FC55D183)); + var ptr = _Handle.Read(_Target1Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1099B701FC55D183, value); + set => Schema.SetString(_Handle, _Target1Offset.Value, value); } + private static readonly Lazy _Target2Offset = new(() => Schema.GetOffset(0x1099B701FD55D316), LazyThreadSafetyMode.None); + public string Target2 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1099B701FD55D316)); + var ptr = _Handle.Read(_Target2Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1099B701FD55D316, value); + set => Schema.SetString(_Handle, _Target2Offset.Value, value); } + private static readonly Lazy _Target3Offset = new(() => Schema.GetOffset(0x1099B701FE55D4A9), LazyThreadSafetyMode.None); + public string Target3 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1099B701FE55D4A9)); + var ptr = _Handle.Read(_Target3Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1099B701FE55D4A9, value); + set => Schema.SetString(_Handle, _Target3Offset.Value, value); } + private static readonly Lazy _Target4Offset = new(() => Schema.GetOffset(0x1099B701FF55D63C), LazyThreadSafetyMode.None); + public string Target4 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1099B701FF55D63C)); + var ptr = _Handle.Read(_Target4Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1099B701FF55D63C, value); + set => Schema.SetString(_Handle, _Target4Offset.Value, value); } + private static readonly Lazy _Target5Offset = new(() => Schema.GetOffset(0x1099B7010055D7CF), LazyThreadSafetyMode.None); + public string Target5 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1099B7010055D7CF)); + var ptr = _Handle.Read(_Target5Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1099B7010055D7CF, value); + set => Schema.SetString(_Handle, _Target5Offset.Value, value); } + private static readonly Lazy _Target6Offset = new(() => Schema.GetOffset(0x1099B7010155D962), LazyThreadSafetyMode.None); + public string Target6 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1099B7010155D962)); + var ptr = _Handle.Read(_Target6Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1099B7010155D962, value); + set => Schema.SetString(_Handle, _Target6Offset.Value, value); } + private static readonly Lazy _Target7Offset = new(() => Schema.GetOffset(0x1099B7010255DAF5), LazyThreadSafetyMode.None); + public string Target7 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1099B7010255DAF5)); + var ptr = _Handle.Read(_Target7Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1099B7010255DAF5, value); + set => Schema.SetString(_Handle, _Target7Offset.Value, value); } + private static readonly Lazy _Target8Offset = new(() => Schema.GetOffset(0x1099B7010355DC88), LazyThreadSafetyMode.None); + public string Target8 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1099B7010355DC88)); + var ptr = _Handle.Read(_Target8Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1099B7010355DC88, value); + set => Schema.SetString(_Handle, _Target8Offset.Value, value); } + private static readonly Lazy _Target11Offset = new(() => Schema.GetOffset(0x1099B701C951F3B1), LazyThreadSafetyMode.None); + public ref CHandle Target11 { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1099B701C951F3B1)); + get => ref _Handle.AsRef>(_Target11Offset.Value); } + private static readonly Lazy _Target22Offset = new(() => Schema.GetOffset(0x1099B701C651EEF8), LazyThreadSafetyMode.None); + public ref CHandle Target22 { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1099B701C651EEF8)); + get => ref _Handle.AsRef>(_Target22Offset.Value); } + private static readonly Lazy _Target33Offset = new(() => Schema.GetOffset(0x1099B701C751F08B), LazyThreadSafetyMode.None); + public ref CHandle Target33 { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1099B701C751F08B)); + get => ref _Handle.AsRef>(_Target33Offset.Value); } + private static readonly Lazy _Target44Offset = new(() => Schema.GetOffset(0x1099B701CC51F86A), LazyThreadSafetyMode.None); + public ref CHandle Target44 { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1099B701CC51F86A)); + get => ref _Handle.AsRef>(_Target44Offset.Value); } + private static readonly Lazy _Target55Offset = new(() => Schema.GetOffset(0x1099B701CD51F9FD), LazyThreadSafetyMode.None); + public ref CHandle Target55 { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1099B701CD51F9FD)); + get => ref _Handle.AsRef>(_Target55Offset.Value); } + private static readonly Lazy _Target66Offset = new(() => Schema.GetOffset(0x1099B701CA51F544), LazyThreadSafetyMode.None); + public ref CHandle Target66 { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1099B701CA51F544)); + get => ref _Handle.AsRef>(_Target66Offset.Value); } + private static readonly Lazy _Target77Offset = new(() => Schema.GetOffset(0x1099B701CB51F6D7), LazyThreadSafetyMode.None); + public ref CHandle Target77 { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1099B701CB51F6D7)); + get => ref _Handle.AsRef>(_Target77Offset.Value); } + private static readonly Lazy _Target88Offset = new(() => Schema.GetOffset(0x1099B701C051E586), LazyThreadSafetyMode.None); + public ref CHandle Target88 { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1099B701C051E586)); + get => ref _Handle.AsRef>(_Target88Offset.Value); } + private static readonly Lazy _TargetAttachmentOffset = new(() => Schema.GetOffset(0x1099B701FCD6246E), LazyThreadSafetyMode.None); + public string TargetAttachment { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1099B701FCD6246E)); + var ptr = _Handle.Read(_TargetAttachmentOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1099B701FCD6246E, value); + set => Schema.SetString(_Handle, _TargetAttachmentOffset.Value, value); } + private static readonly Lazy _IsPlayingBackOffset = new(() => Schema.GetOffset(0x1099B70133D9EB62), LazyThreadSafetyMode.None); + public ref bool IsPlayingBack { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B70133D9EB62)); + get => ref _Handle.AsRef(_IsPlayingBackOffset.Value); } + private static readonly Lazy _PausedOffset = new(() => Schema.GetOffset(0x1099B7016E4C592B), LazyThreadSafetyMode.None); + public ref bool Paused { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B7016E4C592B)); + get => ref _Handle.AsRef(_PausedOffset.Value); } + private static readonly Lazy _MultiplayerOffset = new(() => Schema.GetOffset(0x1099B70140E33A8B), LazyThreadSafetyMode.None); + public ref bool Multiplayer { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B70140E33A8B)); + get => ref _Handle.AsRef(_MultiplayerOffset.Value); } + private static readonly Lazy _AutogeneratedOffset = new(() => Schema.GetOffset(0x1099B701CD800D57), LazyThreadSafetyMode.None); + public ref bool Autogenerated { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B701CD800D57)); + get => ref _Handle.AsRef(_AutogeneratedOffset.Value); } + private static readonly Lazy _ForceClientTimeOffset = new(() => Schema.GetOffset(0x1099B7010AE43350), LazyThreadSafetyMode.None); + public ref float ForceClientTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B7010AE43350)); + get => ref _Handle.AsRef(_ForceClientTimeOffset.Value); } + private static readonly Lazy _CurrentTimeOffset = new(() => Schema.GetOffset(0x1099B701C4610999), LazyThreadSafetyMode.None); + public ref float CurrentTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B701C4610999)); + get => ref _Handle.AsRef(_CurrentTimeOffset.Value); } + private static readonly Lazy _FrameTimeOffset = new(() => Schema.GetOffset(0x1099B701659DF875), LazyThreadSafetyMode.None); + public ref float FrameTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B701659DF875)); + get => ref _Handle.AsRef(_FrameTimeOffset.Value); } + private static readonly Lazy _CancelAtNextInterruptOffset = new(() => Schema.GetOffset(0x1099B70136826B5E), LazyThreadSafetyMode.None); + public ref bool CancelAtNextInterrupt { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B70136826B5E)); + get => ref _Handle.AsRef(_CancelAtNextInterruptOffset.Value); } + private static readonly Lazy _PitchOffset = new(() => Schema.GetOffset(0x1099B701C2997925), LazyThreadSafetyMode.None); + public ref float Pitch { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B701C2997925)); + get => ref _Handle.AsRef(_PitchOffset.Value); } + private static readonly Lazy _AutomatedOffset = new(() => Schema.GetOffset(0x1099B7012F7E23ED), LazyThreadSafetyMode.None); + public ref bool Automated { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B7012F7E23ED)); + get => ref _Handle.AsRef(_AutomatedOffset.Value); } + private static readonly Lazy _AutomatedActionOffset = new(() => Schema.GetOffset(0x1099B701249A46FB), LazyThreadSafetyMode.None); + public ref int AutomatedAction { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B701249A46FB)); + get => ref _Handle.AsRef(_AutomatedActionOffset.Value); } + private static readonly Lazy _AutomationDelayOffset = new(() => Schema.GetOffset(0x1099B701DBCC1E77), LazyThreadSafetyMode.None); + public ref float AutomationDelay { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B701DBCC1E77)); + get => ref _Handle.AsRef(_AutomationDelayOffset.Value); } + private static readonly Lazy _AutomationTimeOffset = new(() => Schema.GetOffset(0x1099B70111D56B91), LazyThreadSafetyMode.None); + public ref float AutomationTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B70111D56B91)); + get => ref _Handle.AsRef(_AutomationTimeOffset.Value); } + private static readonly Lazy _SpeechPriorityOffset = new(() => Schema.GetOffset(0x1099B701A055E60B), LazyThreadSafetyMode.None); + public ref int SpeechPriority { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B701A055E60B)); + get => ref _Handle.AsRef(_SpeechPriorityOffset.Value); } + private static readonly Lazy _WaitingForThisResumeSceneOffset = new(() => Schema.GetOffset(0x1099B7011B4B617A), LazyThreadSafetyMode.None); + public ref CHandle WaitingForThisResumeScene { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1099B7011B4B617A)); + get => ref _Handle.AsRef>(_WaitingForThisResumeSceneOffset.Value); } + private static readonly Lazy _WaitingForResumeSceneOffset = new(() => Schema.GetOffset(0x1099B701F33D29C4), LazyThreadSafetyMode.None); + public ref bool WaitingForResumeScene { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B701F33D29C4)); + get => ref _Handle.AsRef(_WaitingForResumeSceneOffset.Value); } + private static readonly Lazy _PausedViaInputOffset = new(() => Schema.GetOffset(0x1099B70194DAAEC7), LazyThreadSafetyMode.None); + public ref bool PausedViaInput { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B70194DAAEC7)); + get => ref _Handle.AsRef(_PausedViaInputOffset.Value); } + private static readonly Lazy _PauseAtNextInterruptOffset = new(() => Schema.GetOffset(0x1099B7017110D1BC), LazyThreadSafetyMode.None); + public ref bool PauseAtNextInterrupt { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B7017110D1BC)); + get => ref _Handle.AsRef(_PauseAtNextInterruptOffset.Value); } + private static readonly Lazy _WaitingForActorOffset = new(() => Schema.GetOffset(0x1099B701A8A67CC4), LazyThreadSafetyMode.None); + public ref bool WaitingForActor { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B701A8A67CC4)); + get => ref _Handle.AsRef(_WaitingForActorOffset.Value); } + private static readonly Lazy _WaitingForInterruptOffset = new(() => Schema.GetOffset(0x1099B7015FF93F72), LazyThreadSafetyMode.None); + public ref bool WaitingForInterrupt { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B7015FF93F72)); + get => ref _Handle.AsRef(_WaitingForInterruptOffset.Value); } + private static readonly Lazy _InterruptedActorsScenesOffset = new(() => Schema.GetOffset(0x1099B7016CE93DF2), LazyThreadSafetyMode.None); + public ref bool InterruptedActorsScenes { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B7016CE93DF2)); + get => ref _Handle.AsRef(_InterruptedActorsScenesOffset.Value); } + private static readonly Lazy _BreakOnNonIdleOffset = new(() => Schema.GetOffset(0x1099B7012DF0ACFA), LazyThreadSafetyMode.None); + public ref bool BreakOnNonIdle { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B7012DF0ACFA)); + get => ref _Handle.AsRef(_BreakOnNonIdleOffset.Value); } + private static readonly Lazy _SceneFinishedOffset = new(() => Schema.GetOffset(0x1099B701B78EE50D), LazyThreadSafetyMode.None); + public ref bool SceneFinished { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B701B78EE50D)); + get => ref _Handle.AsRef(_SceneFinishedOffset.Value); } + private static readonly Lazy _ActorListOffset = new(() => Schema.GetOffset(0x1099B701ABF34ACC), LazyThreadSafetyMode.None); + public ref CUtlVector> ActorList { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x1099B701ABF34ACC)); + get => ref _Handle.AsRef>>(_ActorListOffset.Value); } + private static readonly Lazy _RemoveActorListOffset = new(() => Schema.GetOffset(0x1099B701C08C1458), LazyThreadSafetyMode.None); + public ref CUtlVector> RemoveActorList { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x1099B701C08C1458)); + get => ref _Handle.AsRef>>(_RemoveActorListOffset.Value); } + private static readonly Lazy _SceneFlushCounterOffset = new(() => Schema.GetOffset(0x1099B701E744BD85), LazyThreadSafetyMode.None); + public ref int SceneFlushCounter { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B701E744BD85)); + get => ref _Handle.AsRef(_SceneFlushCounterOffset.Value); } + private static readonly Lazy _SceneStringIndexOffset = new(() => Schema.GetOffset(0x1099B7014B743F7E), LazyThreadSafetyMode.None); + public ref ushort SceneStringIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B7014B743F7E)); + get => ref _Handle.AsRef(_SceneStringIndexOffset.Value); } + private static readonly Lazy _OnStartOffset = new(() => Schema.GetOffset(0x1099B701C3FE848C), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStart { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1099B701C3FE848C)); + get => new CEntityIOOutputImpl(_Handle + _OnStartOffset.Value); } + private static readonly Lazy _OnCompletionOffset = new(() => Schema.GetOffset(0x1099B7010EADA43E), LazyThreadSafetyMode.None); + public CEntityIOOutput OnCompletion { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1099B7010EADA43E)); + get => new CEntityIOOutputImpl(_Handle + _OnCompletionOffset.Value); } + private static readonly Lazy _OnCanceledOffset = new(() => Schema.GetOffset(0x1099B701F02162DB), LazyThreadSafetyMode.None); + public CEntityIOOutput OnCanceled { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1099B701F02162DB)); + get => new CEntityIOOutputImpl(_Handle + _OnCanceledOffset.Value); } + private static readonly Lazy _OnPausedOffset = new(() => Schema.GetOffset(0x1099B70191D78012), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPaused { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1099B70191D78012)); + get => new CEntityIOOutputImpl(_Handle + _OnPausedOffset.Value); } + private static readonly Lazy _OnResumedOffset = new(() => Schema.GetOffset(0x1099B701CCA87325), LazyThreadSafetyMode.None); + public CEntityIOOutput OnResumed { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x1099B701CCA87325)); + get => new CEntityIOOutputImpl(_Handle + _OnResumedOffset.Value); } + private static readonly Lazy _OnTriggerOffset = new(() => Schema.GetOffset(0x1099B70181E0BFEC), LazyThreadSafetyMode.None); + public SchemaUntypedField OnTrigger { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x1099B70181E0BFEC)); + get => new SchemaUntypedField(_Handle + _OnTriggerOffset.Value); } + private static readonly Lazy _InterruptSceneOffset = new(() => Schema.GetOffset(0x1099B7019B121B62), LazyThreadSafetyMode.None); + public ref CHandle InterruptScene { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1099B7019B121B62)); + get => ref _Handle.AsRef>(_InterruptSceneOffset.Value); } + private static readonly Lazy _InterruptCountOffset = new(() => Schema.GetOffset(0x1099B70114AAD933), LazyThreadSafetyMode.None); + public ref int InterruptCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B70114AAD933)); + get => ref _Handle.AsRef(_InterruptCountOffset.Value); } + private static readonly Lazy _SceneMissingOffset = new(() => Schema.GetOffset(0x1099B7018E7EBF31), LazyThreadSafetyMode.None); + public ref bool SceneMissing { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B7018E7EBF31)); + get => ref _Handle.AsRef(_SceneMissingOffset.Value); } + private static readonly Lazy _InterruptedOffset = new(() => Schema.GetOffset(0x1099B701ECF7A431), LazyThreadSafetyMode.None); + public ref bool Interrupted { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B701ECF7A431)); + get => ref _Handle.AsRef(_InterruptedOffset.Value); } + private static readonly Lazy _CompletedEarlyOffset = new(() => Schema.GetOffset(0x1099B701DDF4B191), LazyThreadSafetyMode.None); + public ref bool CompletedEarly { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B701DDF4B191)); + get => ref _Handle.AsRef(_CompletedEarlyOffset.Value); } + private static readonly Lazy _InterruptSceneFinishedOffset = new(() => Schema.GetOffset(0x1099B701FA6A4266), LazyThreadSafetyMode.None); + public ref bool InterruptSceneFinished { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B701FA6A4266)); + get => ref _Handle.AsRef(_InterruptSceneFinishedOffset.Value); } + private static readonly Lazy _RestoringOffset = new(() => Schema.GetOffset(0x1099B70103F03702), LazyThreadSafetyMode.None); + public ref bool Restoring { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B70103F03702)); + get => ref _Handle.AsRef(_RestoringOffset.Value); } + private static readonly Lazy _NotifySceneCompletionOffset = new(() => Schema.GetOffset(0x1099B70111F17358), LazyThreadSafetyMode.None); + public ref CUtlVector> NotifySceneCompletion { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x1099B70111F17358)); + get => ref _Handle.AsRef>>(_NotifySceneCompletionOffset.Value); } + private static readonly Lazy _ListManagersOffset = new(() => Schema.GetOffset(0x1099B701AD7882DF), LazyThreadSafetyMode.None); + public ref CUtlVector> ListManagers { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x1099B701AD7882DF)); + get => ref _Handle.AsRef>>(_ListManagersOffset.Value); } + private static readonly Lazy _SoundNameOffset = new(() => Schema.GetOffset(0x1099B701B17EB157), LazyThreadSafetyMode.None); + public string SoundName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1099B701B17EB157)); + var ptr = _Handle.Read(_SoundNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1099B701B17EB157, value); + set => Schema.SetString(_Handle, _SoundNameOffset.Value, value); } + private static readonly Lazy _SequenceNameOffset = new(() => Schema.GetOffset(0x1099B701A55BC593), LazyThreadSafetyMode.None); + public string SequenceName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1099B701A55BC593)); + var ptr = _Handle.Read(_SequenceNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1099B701A55BC593, value); + set => Schema.SetString(_Handle, _SequenceNameOffset.Value, value); } + private static readonly Lazy _ActorOffset = new(() => Schema.GetOffset(0x1099B701C0FFC404), LazyThreadSafetyMode.None); + public ref CHandle Actor { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1099B701C0FFC404)); + get => ref _Handle.AsRef>(_ActorOffset.Value); } + private static readonly Lazy _ActivatorOffset = new(() => Schema.GetOffset(0x1099B701AB093BB2), LazyThreadSafetyMode.None); + public ref CHandle Activator { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1099B701AB093BB2)); + get => ref _Handle.AsRef>(_ActivatorOffset.Value); } + private static readonly Lazy _BusyActorOffset = new(() => Schema.GetOffset(0x1099B70124F0E411), LazyThreadSafetyMode.None); + public ref int BusyActor { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B70124F0E411)); + get => ref _Handle.AsRef(_BusyActorOffset.Value); } + private static readonly Lazy _PlayerDeathBehaviorOffset = new(() => Schema.GetOffset(0x1099B701C6ECC93B), LazyThreadSafetyMode.None); + public ref SceneOnPlayerDeath_t PlayerDeathBehavior { - get => ref _Handle.AsRef(Schema.GetOffset(0x1099B701C6ECC93B)); + get => ref _Handle.AsRef(_PlayerDeathBehaviorOffset.Value); } public void IsPlayingBackUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneEventInfoImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneEventInfoImpl.cs index e59d22360..bc59ea8d6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneEventInfoImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneEventInfoImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,70 @@ internal partial class CSceneEventInfoImpl : SchemaClass, CSceneEventInfo { public CSceneEventInfoImpl(nint handle) : base(handle) { } + private static readonly Lazy _LayerOffset = new(() => Schema.GetOffset(0x38A9D25E0EDC14B1), LazyThreadSafetyMode.None); + public ref int Layer { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A9D25E0EDC14B1)); + get => ref _Handle.AsRef(_LayerOffset.Value); } + private static readonly Lazy _PriorityOffset = new(() => Schema.GetOffset(0x38A9D25E6224A30C), LazyThreadSafetyMode.None); + public ref int Priority { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A9D25E6224A30C)); + get => ref _Handle.AsRef(_PriorityOffset.Value); } + private static readonly Lazy _SequenceOffset = new(() => Schema.GetOffset(0x38A9D25EE0A0598E), LazyThreadSafetyMode.None); + public HSequence Sequence { - get => new HSequenceImpl(_Handle + Schema.GetOffset(0x38A9D25EE0A0598E)); + get => new HSequenceImpl(_Handle + _SequenceOffset.Value); } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0x38A9D25E7B81E7AB), LazyThreadSafetyMode.None); + public ref float Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A9D25E7B81E7AB)); + get => ref _Handle.AsRef(_WeightOffset.Value); } + private static readonly Lazy _HasArrivedOffset = new(() => Schema.GetOffset(0x38A9D25EB10E5904), LazyThreadSafetyMode.None); + public ref bool HasArrived { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A9D25EB10E5904)); + get => ref _Handle.AsRef(_HasArrivedOffset.Value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x38A9D25E18853D59), LazyThreadSafetyMode.None); + public ref int Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A9D25E18853D59)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _NextOffset = new(() => Schema.GetOffset(0x38A9D25E3BE2574E), LazyThreadSafetyMode.None); + public GameTime_t Next { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x38A9D25E3BE2574E)); + get => new GameTime_tImpl(_Handle + _NextOffset.Value); } + private static readonly Lazy _IsGestureOffset = new(() => Schema.GetOffset(0x38A9D25E4F82B044), LazyThreadSafetyMode.None); + public ref bool IsGesture { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A9D25E4F82B044)); + get => ref _Handle.AsRef(_IsGestureOffset.Value); } + private static readonly Lazy _ShouldRemoveOffset = new(() => Schema.GetOffset(0x38A9D25E3CD02C8E), LazyThreadSafetyMode.None); + public ref bool ShouldRemove { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A9D25E3CD02C8E)); + get => ref _Handle.AsRef(_ShouldRemoveOffset.Value); } + private static readonly Lazy _TargetOffset = new(() => Schema.GetOffset(0x38A9D25ECE35901A), LazyThreadSafetyMode.None); + public ref CHandle Target { - get => ref _Handle.AsRef>(Schema.GetOffset(0x38A9D25ECE35901A)); + get => ref _Handle.AsRef>(_TargetOffset.Value); } + private static readonly Lazy _SceneEventIdOffset = new(() => Schema.GetOffset(0x38A9D25EE76A0188), LazyThreadSafetyMode.None); + public SceneEventId_t SceneEventId { - get => new SceneEventId_tImpl(_Handle + Schema.GetOffset(0x38A9D25EE76A0188)); + get => new SceneEventId_tImpl(_Handle + _SceneEventIdOffset.Value); } + private static readonly Lazy _ClientSideOffset = new(() => Schema.GetOffset(0x38A9D25E6B28362D), LazyThreadSafetyMode.None); + public ref bool ClientSide { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A9D25E6B28362D)); + get => ref _Handle.AsRef(_ClientSideOffset.Value); } + private static readonly Lazy _StartedOffset = new(() => Schema.GetOffset(0x38A9D25E03CB4C7E), LazyThreadSafetyMode.None); + public ref bool Started { - get => ref _Handle.AsRef(Schema.GetOffset(0x38A9D25E03CB4C7E)); + get => ref _Handle.AsRef(_StartedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneListManagerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneListManagerImpl.cs index e7ac92fce..27eb030e8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneListManagerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneListManagerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CSceneListManagerImpl : CLogicalEntityImpl, CSceneListMan public CSceneListManagerImpl(nint handle) : base(handle) { } + private static readonly Lazy _ListManagersOffset = new(() => Schema.GetOffset(0x6DF51C6DAD7882DF), LazyThreadSafetyMode.None); + public ref CUtlVector> ListManagers { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x6DF51C6DAD7882DF)); + get => ref _Handle.AsRef>>(_ListManagersOffset.Value); } + private static readonly Lazy _ScenesOffset = new(() => Schema.GetOffset(0x6DF51C6D967363E8), LazyThreadSafetyMode.None); + public string Scenes { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6DF51C6D967363E8)); + var ptr = _Handle.Read(_ScenesOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6DF51C6D967363E8, value); + set => Schema.SetString(_Handle, _ScenesOffset.Value, value); } public ISchemaFixedArray> Scenes1 { get => new SchemaFixedArray>(_Handle, 0x6DF51C6D2B7EE872, 16, 4, 4); diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneObjectDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneObjectDataImpl.cs index f30257d33..91d06e52b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneObjectDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSceneObjectDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CSceneObjectDataImpl : SchemaClass, CSceneObjectData { public CSceneObjectDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinBoundsOffset = new(() => Schema.GetOffset(0x628AC6A9114799FE), LazyThreadSafetyMode.None); + public ref Vector MinBounds { - get => ref _Handle.AsRef(Schema.GetOffset(0x628AC6A9114799FE)); + get => ref _Handle.AsRef(_MinBoundsOffset.Value); } + private static readonly Lazy _MaxBoundsOffset = new(() => Schema.GetOffset(0x628AC6A9C0B4CE60), LazyThreadSafetyMode.None); + public ref Vector MaxBounds { - get => ref _Handle.AsRef(Schema.GetOffset(0x628AC6A9C0B4CE60)); + get => ref _Handle.AsRef(_MaxBoundsOffset.Value); } + private static readonly Lazy _DrawCallsOffset = new(() => Schema.GetOffset(0x628AC6A9CA953770), LazyThreadSafetyMode.None); + public ref CUtlLeanVector DrawCalls { - get => ref _Handle.AsRef>(Schema.GetOffset(0x628AC6A9CA953770)); + get => ref _Handle.AsRef>(_DrawCallsOffset.Value); } + private static readonly Lazy _DrawBoundsOffset = new(() => Schema.GetOffset(0x628AC6A96CBBD6CE), LazyThreadSafetyMode.None); + public ref CUtlLeanVector DrawBounds { - get => ref _Handle.AsRef>(Schema.GetOffset(0x628AC6A96CBBD6CE)); + get => ref _Handle.AsRef>(_DrawBoundsOffset.Value); } + private static readonly Lazy _MeshletsOffset = new(() => Schema.GetOffset(0x628AC6A928865C36), LazyThreadSafetyMode.None); + public ref CUtlLeanVector Meshlets { - get => ref _Handle.AsRef>(Schema.GetOffset(0x628AC6A928865C36)); + get => ref _Handle.AsRef>(_MeshletsOffset.Value); } + private static readonly Lazy _TintColorOffset = new(() => Schema.GetOffset(0x628AC6A950AFF21F), LazyThreadSafetyMode.None); + public ref Vector4D TintColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x628AC6A950AFF21F)); + get => ref _Handle.AsRef(_TintColorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSchemaSystemInternalRegistrationImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSchemaSystemInternalRegistrationImpl.cs index 4ee1f90a0..664520d90 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSchemaSystemInternalRegistrationImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSchemaSystemInternalRegistrationImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,81 +17,127 @@ internal partial class CSchemaSystemInternalRegistrationImpl : SchemaClass, CSch public CSchemaSystemInternalRegistrationImpl(nint handle) : base(handle) { } + private static readonly Lazy _Vector2DOffset = new(() => Schema.GetOffset(0xDDD6CA303570333C), LazyThreadSafetyMode.None); + public ref Vector2D Vector2D { - get => ref _Handle.AsRef(Schema.GetOffset(0xDDD6CA303570333C)); + get => ref _Handle.AsRef(_Vector2DOffset.Value); } + private static readonly Lazy _VectorOffset = new(() => Schema.GetOffset(0xDDD6CA30FE2AA082), LazyThreadSafetyMode.None); + public ref Vector Vector { - get => ref _Handle.AsRef(Schema.GetOffset(0xDDD6CA30FE2AA082)); + get => ref _Handle.AsRef(_VectorOffset.Value); } + private static readonly Lazy _VectorWSOffset = new(() => Schema.GetOffset(0xDDD6CA303CCB2914), LazyThreadSafetyMode.None); + public ref Vector VectorWS { - get => ref _Handle.AsRef(Schema.GetOffset(0xDDD6CA303CCB2914)); + get => ref _Handle.AsRef(_VectorWSOffset.Value); } + private static readonly Lazy _VectorAlignedOffset = new(() => Schema.GetOffset(0xDDD6CA3076A2F792), LazyThreadSafetyMode.None); + public ref Vector VectorAligned { - get => ref _Handle.AsRef(Schema.GetOffset(0xDDD6CA3076A2F792)); + get => ref _Handle.AsRef(_VectorAlignedOffset.Value); } + private static readonly Lazy _QuaternionOffset = new(() => Schema.GetOffset(0xDDD6CA308FFA070D), LazyThreadSafetyMode.None); + public ref Quaternion Quaternion { - get => ref _Handle.AsRef(Schema.GetOffset(0xDDD6CA308FFA070D)); + get => ref _Handle.AsRef(_QuaternionOffset.Value); } + private static readonly Lazy _QAngleOffset = new(() => Schema.GetOffset(0xDDD6CA30D3989847), LazyThreadSafetyMode.None); + public ref QAngle QAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0xDDD6CA30D3989847)); + get => ref _Handle.AsRef(_QAngleOffset.Value); } + private static readonly Lazy _RotationVectorOffset = new(() => Schema.GetOffset(0xDDD6CA30D5A2443C), LazyThreadSafetyMode.None); + public SchemaUntypedField RotationVector { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xDDD6CA30D5A2443C)); + get => new SchemaUntypedField(_Handle + _RotationVectorOffset.Value); } + private static readonly Lazy _RadianEulerOffset = new(() => Schema.GetOffset(0xDDD6CA30E6A91A09), LazyThreadSafetyMode.None); + public ref RadianEuler RadianEuler { - get => ref _Handle.AsRef(Schema.GetOffset(0xDDD6CA30E6A91A09)); + get => ref _Handle.AsRef(_RadianEulerOffset.Value); } + private static readonly Lazy _DegreeEulerOffset = new(() => Schema.GetOffset(0xDDD6CA30FCD6D92E), LazyThreadSafetyMode.None); + public SchemaUntypedField DegreeEuler { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xDDD6CA30FCD6D92E)); + get => new SchemaUntypedField(_Handle + _DegreeEulerOffset.Value); } + private static readonly Lazy _QuaternionStorageOffset = new(() => Schema.GetOffset(0xDDD6CA303C6C2D0E), LazyThreadSafetyMode.None); + public SchemaUntypedField QuaternionStorage { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xDDD6CA303C6C2D0E)); + get => new SchemaUntypedField(_Handle + _QuaternionStorageOffset.Value); } + private static readonly Lazy _Matrix3x4_tOffset = new(() => Schema.GetOffset(0xDDD6CA30EC15D3EA), LazyThreadSafetyMode.None); + public ref matrix3x4_t Matrix3x4_t { - get => ref _Handle.AsRef(Schema.GetOffset(0xDDD6CA30EC15D3EA)); + get => ref _Handle.AsRef(_Matrix3x4_tOffset.Value); } + private static readonly Lazy _Matrix3x4a_tOffset = new(() => Schema.GetOffset(0xDDD6CA30E298503B), LazyThreadSafetyMode.None); + public ref matrix3x4_t Matrix3x4a_t { - get => ref _Handle.AsRef(Schema.GetOffset(0xDDD6CA30E298503B)); + get => ref _Handle.AsRef(_Matrix3x4a_tOffset.Value); } + private static readonly Lazy _ColorOffset = new(() => Schema.GetOffset(0xDDD6CA30D7D017D8), LazyThreadSafetyMode.None); + public ref Color Color { - get => ref _Handle.AsRef(Schema.GetOffset(0xDDD6CA30D7D017D8)); + get => ref _Handle.AsRef(_ColorOffset.Value); } + private static readonly Lazy _Vector4DOffset = new(() => Schema.GetOffset(0xDDD6CA30197F11B2), LazyThreadSafetyMode.None); + public ref Vector4D Vector4D { - get => ref _Handle.AsRef(Schema.GetOffset(0xDDD6CA30197F11B2)); + get => ref _Handle.AsRef(_Vector4DOffset.Value); } + private static readonly Lazy _CTransformOffset = new(() => Schema.GetOffset(0xDDD6CA3045C7677A), LazyThreadSafetyMode.None); + public ref CTransform CTransform { - get => ref _Handle.AsRef(Schema.GetOffset(0xDDD6CA3045C7677A)); + get => ref _Handle.AsRef(_CTransformOffset.Value); } + private static readonly Lazy _KeyValuesOffset = new(() => Schema.GetOffset(0xDDD6CA3011F5FBEC), LazyThreadSafetyMode.None); + public SchemaUntypedField? KeyValues { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDDD6CA3011F5FBEC)); + var ptr = _Handle.Read(_KeyValuesOffset.Value); return ptr.IsValidPtr() ? new SchemaUntypedField(ptr) : null; } } + private static readonly Lazy _CUtlBinaryBlockOffset = new(() => Schema.GetOffset(0xDDD6CA307F63D33D), LazyThreadSafetyMode.None); + public ref CUtlBinaryBlock CUtlBinaryBlock { - get => ref _Handle.AsRef(Schema.GetOffset(0xDDD6CA307F63D33D)); + get => ref _Handle.AsRef(_CUtlBinaryBlockOffset.Value); } + private static readonly Lazy _CUtlStringOffset = new(() => Schema.GetOffset(0xDDD6CA3041577950), LazyThreadSafetyMode.None); + public string CUtlString { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDDD6CA3041577950)); + var ptr = _Handle.Read(_CUtlStringOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDDD6CA3041577950, value); + set => Schema.SetString(_Handle, _CUtlStringOffset.Value, value); } + private static readonly Lazy _CUtlSymbolOffset = new(() => Schema.GetOffset(0xDDD6CA30EA008FA9), LazyThreadSafetyMode.None); + public SchemaUntypedField CUtlSymbol { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xDDD6CA30EA008FA9)); + get => new SchemaUntypedField(_Handle + _CUtlSymbolOffset.Value); } + private static readonly Lazy _StringTokenOffset = new(() => Schema.GetOffset(0xDDD6CA3049D8C20D), LazyThreadSafetyMode.None); + public ref CUtlStringToken StringToken { - get => ref _Handle.AsRef(Schema.GetOffset(0xDDD6CA3049D8C20D)); + get => ref _Handle.AsRef(_StringTokenOffset.Value); } + private static readonly Lazy _StringTokenWithStorageOffset = new(() => Schema.GetOffset(0xDDD6CA30A8DD475A), LazyThreadSafetyMode.None); + public SchemaUntypedField StringTokenWithStorage { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xDDD6CA30A8DD475A)); + get => new SchemaUntypedField(_Handle + _StringTokenWithStorageOffset.Value); } + private static readonly Lazy _ResourceTypesOffset = new(() => Schema.GetOffset(0xDDD6CA30410F830A), LazyThreadSafetyMode.None); + public SchemaUntypedField ResourceTypes { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xDDD6CA30410F830A)); + get => new SchemaUntypedField(_Handle + _ResourceTypesOffset.Value); } + private static readonly Lazy _KV3Offset = new(() => Schema.GetOffset(0xDDD6CA302E1AEFC5), LazyThreadSafetyMode.None); + public SchemaUntypedField KV3 { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xDDD6CA302E1AEFC5)); + get => new SchemaUntypedField(_Handle + _KV3Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptComponentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptComponentImpl.cs index d92d05288..2f74e6657 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptComponentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptComponentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CScriptComponentImpl : CEntityComponentImpl, CScriptCompo public CScriptComponentImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScriptClassNameOffset = new(() => Schema.GetOffset(0xC922CE544F9B6681), LazyThreadSafetyMode.None); + public string ScriptClassName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC922CE544F9B6681)); + var ptr = _Handle.Read(_ScriptClassNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xC922CE544F9B6681, value); + set => Schema.SetString(_Handle, _ScriptClassNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptItemImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptItemImpl.cs index a3c00adb0..4286c10a7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptItemImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptItemImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CScriptItemImpl : CItemImpl, CScriptItem { public CScriptItemImpl(nint handle) : base(handle) { } + private static readonly Lazy _MoveTypeOverrideOffset = new(() => Schema.GetOffset(0x501D9DD2B4DC8A64), LazyThreadSafetyMode.None); + public ref MoveType_t MoveTypeOverride { - get => ref _Handle.AsRef(Schema.GetOffset(0x501D9DD2B4DC8A64)); + get => ref _Handle.AsRef(_MoveTypeOverrideOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptNavBlockerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptNavBlockerImpl.cs index 22015c25a..81b4b5e7f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptNavBlockerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptNavBlockerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CScriptNavBlockerImpl : CFuncNavBlockerImpl, CScriptNavBl public CScriptNavBlockerImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExtentOffset = new(() => Schema.GetOffset(0x50903EB87AB1ED15), LazyThreadSafetyMode.None); + public ref Vector Extent { - get => ref _Handle.AsRef(Schema.GetOffset(0x50903EB87AB1ED15)); + get => ref _Handle.AsRef(_ExtentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptTriggerHurtImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptTriggerHurtImpl.cs index 0776e1138..63b7c1360 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptTriggerHurtImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptTriggerHurtImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CScriptTriggerHurtImpl : CTriggerHurtImpl, CScriptTrigger public CScriptTriggerHurtImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExtentOffset = new(() => Schema.GetOffset(0xA813A9867AB1ED15), LazyThreadSafetyMode.None); + public ref Vector Extent { - get => ref _Handle.AsRef(Schema.GetOffset(0xA813A9867AB1ED15)); + get => ref _Handle.AsRef(_ExtentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptTriggerMultipleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptTriggerMultipleImpl.cs index e3d532da4..7a7822c52 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptTriggerMultipleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptTriggerMultipleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CScriptTriggerMultipleImpl : CTriggerMultipleImpl, CScrip public CScriptTriggerMultipleImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExtentOffset = new(() => Schema.GetOffset(0xE1F82C9B7AB1ED15), LazyThreadSafetyMode.None); + public ref Vector Extent { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1F82C9B7AB1ED15)); + get => ref _Handle.AsRef(_ExtentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptTriggerOnceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptTriggerOnceImpl.cs index e02517e29..aa0d2e14c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptTriggerOnceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptTriggerOnceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CScriptTriggerOnceImpl : CTriggerOnceImpl, CScriptTrigger public CScriptTriggerOnceImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExtentOffset = new(() => Schema.GetOffset(0x9714EBBA7AB1ED15), LazyThreadSafetyMode.None); + public ref Vector Extent { - get => ref _Handle.AsRef(Schema.GetOffset(0x9714EBBA7AB1ED15)); + get => ref _Handle.AsRef(_ExtentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptTriggerPushImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptTriggerPushImpl.cs index ec996d969..1ba9f04a5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptTriggerPushImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptTriggerPushImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CScriptTriggerPushImpl : CTriggerPushImpl, CScriptTrigger public CScriptTriggerPushImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExtentOffset = new(() => Schema.GetOffset(0x22B0DC1B7AB1ED15), LazyThreadSafetyMode.None); + public ref Vector Extent { - get => ref _Handle.AsRef(Schema.GetOffset(0x22B0DC1B7AB1ED15)); + get => ref _Handle.AsRef(_ExtentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptUniformRandomStreamImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptUniformRandomStreamImpl.cs index 83a3d1745..70bebc137 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptUniformRandomStreamImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptUniformRandomStreamImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CScriptUniformRandomStreamImpl : SchemaClass, CScriptUnif public CScriptUniformRandomStreamImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScriptScopeOffset = new(() => Schema.GetOffset(0xF6699588B14F90D4), LazyThreadSafetyMode.None); + public SchemaUntypedField ScriptScope { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xF6699588B14F90D4)); + get => new SchemaUntypedField(_Handle + _ScriptScopeOffset.Value); } + private static readonly Lazy _InitialSeedOffset = new(() => Schema.GetOffset(0xF6699588944D5EB2), LazyThreadSafetyMode.None); + public ref int InitialSeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6699588944D5EB2)); + get => ref _Handle.AsRef(_InitialSeedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptedSequenceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptedSequenceImpl.cs index 4c3f0f90c..5b885ea6f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptedSequenceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CScriptedSequenceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,268 +17,422 @@ internal partial class CScriptedSequenceImpl : CBaseEntityImpl, CScriptedSequenc public CScriptedSequenceImpl(nint handle) : base(handle) { } + private static readonly Lazy _EntryOffset = new(() => Schema.GetOffset(0xBB0C45EDE900465B), LazyThreadSafetyMode.None); + public string Entry { get { - var ptr = _Handle.Read(Schema.GetOffset(0xBB0C45EDE900465B)); + var ptr = _Handle.Read(_EntryOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xBB0C45EDE900465B, value); + set => Schema.SetString(_Handle, _EntryOffset.Value, value); } + private static readonly Lazy _PreIdleOffset = new(() => Schema.GetOffset(0xBB0C45EDF21548B8), LazyThreadSafetyMode.None); + public string PreIdle { get { - var ptr = _Handle.Read(Schema.GetOffset(0xBB0C45EDF21548B8)); + var ptr = _Handle.Read(_PreIdleOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xBB0C45EDF21548B8, value); + set => Schema.SetString(_Handle, _PreIdleOffset.Value, value); } + private static readonly Lazy _PlayOffset = new(() => Schema.GetOffset(0xBB0C45ED387C901B), LazyThreadSafetyMode.None); + public string Play { get { - var ptr = _Handle.Read(Schema.GetOffset(0xBB0C45ED387C901B)); + var ptr = _Handle.Read(_PlayOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xBB0C45ED387C901B, value); + set => Schema.SetString(_Handle, _PlayOffset.Value, value); } + private static readonly Lazy _PostIdleOffset = new(() => Schema.GetOffset(0xBB0C45EDD456723D), LazyThreadSafetyMode.None); + public string PostIdle { get { - var ptr = _Handle.Read(Schema.GetOffset(0xBB0C45EDD456723D)); + var ptr = _Handle.Read(_PostIdleOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xBB0C45EDD456723D, value); + set => Schema.SetString(_Handle, _PostIdleOffset.Value, value); } + private static readonly Lazy _ModifierToAddOnPlayOffset = new(() => Schema.GetOffset(0xBB0C45ED4B56AE97), LazyThreadSafetyMode.None); + public string ModifierToAddOnPlay { get { - var ptr = _Handle.Read(Schema.GetOffset(0xBB0C45ED4B56AE97)); + var ptr = _Handle.Read(_ModifierToAddOnPlayOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xBB0C45ED4B56AE97, value); + set => Schema.SetString(_Handle, _ModifierToAddOnPlayOffset.Value, value); } + private static readonly Lazy _NextScriptOffset = new(() => Schema.GetOffset(0xBB0C45ED484B7743), LazyThreadSafetyMode.None); + public string NextScript { get { - var ptr = _Handle.Read(Schema.GetOffset(0xBB0C45ED484B7743)); + var ptr = _Handle.Read(_NextScriptOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xBB0C45ED484B7743, value); + set => Schema.SetString(_Handle, _NextScriptOffset.Value, value); } + private static readonly Lazy _EntityOffset = new(() => Schema.GetOffset(0xBB0C45ED71B7E842), LazyThreadSafetyMode.None); + public string Entity { get { - var ptr = _Handle.Read(Schema.GetOffset(0xBB0C45ED71B7E842)); + var ptr = _Handle.Read(_EntityOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xBB0C45ED71B7E842, value); + set => Schema.SetString(_Handle, _EntityOffset.Value, value); } + private static readonly Lazy _SyncGroupOffset = new(() => Schema.GetOffset(0xBB0C45ED943A51A5), LazyThreadSafetyMode.None); + public string SyncGroup { get { - var ptr = _Handle.Read(Schema.GetOffset(0xBB0C45ED943A51A5)); + var ptr = _Handle.Read(_SyncGroupOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xBB0C45ED943A51A5, value); + set => Schema.SetString(_Handle, _SyncGroupOffset.Value, value); } + private static readonly Lazy _MoveToOffset = new(() => Schema.GetOffset(0xBB0C45EDA9282EB9), LazyThreadSafetyMode.None); + public ref ScriptedMoveTo_t MoveTo { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDA9282EB9)); + get => ref _Handle.AsRef(_MoveToOffset.Value); } + private static readonly Lazy _MoveToGaitOffset = new(() => Schema.GetOffset(0xBB0C45ED1217E084), LazyThreadSafetyMode.None); + public ref SharedMovementGait_t MoveToGait { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED1217E084)); + get => ref _Handle.AsRef(_MoveToGaitOffset.Value); } + private static readonly Lazy _HeldWeaponBehaviorOffset = new(() => Schema.GetOffset(0xBB0C45EDD545A524), LazyThreadSafetyMode.None); + public ref ScriptedHeldWeaponBehavior_t HeldWeaponBehavior { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDD545A524)); + get => ref _Handle.AsRef(_HeldWeaponBehaviorOffset.Value); } + private static readonly Lazy _ForcedCrouchStateOffset = new(() => Schema.GetOffset(0xBB0C45ED71B1ABC7), LazyThreadSafetyMode.None); + public ref ForcedCrouchState_t ForcedCrouchState { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED71B1ABC7)); + get => ref _Handle.AsRef(_ForcedCrouchStateOffset.Value); } + private static readonly Lazy _IsPlayingPreIdleOffset = new(() => Schema.GetOffset(0xBB0C45EDA6E93B90), LazyThreadSafetyMode.None); + public ref bool IsPlayingPreIdle { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDA6E93B90)); + get => ref _Handle.AsRef(_IsPlayingPreIdleOffset.Value); } + private static readonly Lazy _IsPlayingEntryOffset = new(() => Schema.GetOffset(0xBB0C45ED678DEF53), LazyThreadSafetyMode.None); + public ref bool IsPlayingEntry { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED678DEF53)); + get => ref _Handle.AsRef(_IsPlayingEntryOffset.Value); } + private static readonly Lazy _IsPlayingActionOffset = new(() => Schema.GetOffset(0xBB0C45ED74CACBBF), LazyThreadSafetyMode.None); + public ref bool IsPlayingAction { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED74CACBBF)); + get => ref _Handle.AsRef(_IsPlayingActionOffset.Value); } + private static readonly Lazy _IsPlayingPostIdleOffset = new(() => Schema.GetOffset(0xBB0C45EDF12D82B5), LazyThreadSafetyMode.None); + public ref bool IsPlayingPostIdle { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDF12D82B5)); + get => ref _Handle.AsRef(_IsPlayingPostIdleOffset.Value); } + private static readonly Lazy _DontRotateOtherOffset = new(() => Schema.GetOffset(0xBB0C45EDAF76EBED), LazyThreadSafetyMode.None); + public ref bool DontRotateOther { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDAF76EBED)); + get => ref _Handle.AsRef(_DontRotateOtherOffset.Value); } + private static readonly Lazy _IsRepeatableOffset = new(() => Schema.GetOffset(0xBB0C45ED779D5E9E), LazyThreadSafetyMode.None); + public ref bool IsRepeatable { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED779D5E9E)); + get => ref _Handle.AsRef(_IsRepeatableOffset.Value); } + private static readonly Lazy _ShouldLeaveCorpseOffset = new(() => Schema.GetOffset(0xBB0C45ED081B19B9), LazyThreadSafetyMode.None); + public ref bool ShouldLeaveCorpse { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED081B19B9)); + get => ref _Handle.AsRef(_ShouldLeaveCorpseOffset.Value); } + private static readonly Lazy _StartOnSpawnOffset = new(() => Schema.GetOffset(0xBB0C45EDDB2E6401), LazyThreadSafetyMode.None); + public ref bool StartOnSpawn { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDDB2E6401)); + get => ref _Handle.AsRef(_StartOnSpawnOffset.Value); } + private static readonly Lazy _DisallowInterruptsOffset = new(() => Schema.GetOffset(0xBB0C45ED939D3840), LazyThreadSafetyMode.None); + public ref bool DisallowInterrupts { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED939D3840)); + get => ref _Handle.AsRef(_DisallowInterruptsOffset.Value); } + private static readonly Lazy _CanOverrideNPCStateOffset = new(() => Schema.GetOffset(0xBB0C45ED5DE829CD), LazyThreadSafetyMode.None); + public ref bool CanOverrideNPCState { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED5DE829CD)); + get => ref _Handle.AsRef(_CanOverrideNPCStateOffset.Value); } + private static readonly Lazy _DontTeleportAtEndOffset = new(() => Schema.GetOffset(0xBB0C45ED59E02641), LazyThreadSafetyMode.None); + public ref bool DontTeleportAtEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED59E02641)); + get => ref _Handle.AsRef(_DontTeleportAtEndOffset.Value); } + private static readonly Lazy _HighPriorityOffset = new(() => Schema.GetOffset(0xBB0C45ED6207C781), LazyThreadSafetyMode.None); + public ref bool HighPriority { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED6207C781)); + get => ref _Handle.AsRef(_HighPriorityOffset.Value); } + private static readonly Lazy _HideDebugComplaintsOffset = new(() => Schema.GetOffset(0xBB0C45EDB3CC8816), LazyThreadSafetyMode.None); + public ref bool HideDebugComplaints { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDB3CC8816)); + get => ref _Handle.AsRef(_HideDebugComplaintsOffset.Value); } + private static readonly Lazy _ContinueOnDeathOffset = new(() => Schema.GetOffset(0xBB0C45ED0BF71FD5), LazyThreadSafetyMode.None); + public ref bool ContinueOnDeath { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED0BF71FD5)); + get => ref _Handle.AsRef(_ContinueOnDeathOffset.Value); } + private static readonly Lazy _LoopPreIdleSequenceOffset = new(() => Schema.GetOffset(0xBB0C45ED8649E65F), LazyThreadSafetyMode.None); + public ref bool LoopPreIdleSequence { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED8649E65F)); + get => ref _Handle.AsRef(_LoopPreIdleSequenceOffset.Value); } + private static readonly Lazy _LoopActionSequenceOffset = new(() => Schema.GetOffset(0xBB0C45ED42C7CFA4), LazyThreadSafetyMode.None); + public ref bool LoopActionSequence { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED42C7CFA4)); + get => ref _Handle.AsRef(_LoopActionSequenceOffset.Value); } + private static readonly Lazy _LoopPostIdleSequenceOffset = new(() => Schema.GetOffset(0xBB0C45EDC17036CA), LazyThreadSafetyMode.None); + public ref bool LoopPostIdleSequence { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDC17036CA)); + get => ref _Handle.AsRef(_LoopPostIdleSequenceOffset.Value); } + private static readonly Lazy _SynchPostIdlesOffset = new(() => Schema.GetOffset(0xBB0C45EDA62A28BB), LazyThreadSafetyMode.None); + public ref bool SynchPostIdles { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDA62A28BB)); + get => ref _Handle.AsRef(_SynchPostIdlesOffset.Value); } + private static readonly Lazy _IgnoreLookAtOffset = new(() => Schema.GetOffset(0xBB0C45EDECC380B5), LazyThreadSafetyMode.None); + public ref bool IgnoreLookAt { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDECC380B5)); + get => ref _Handle.AsRef(_IgnoreLookAtOffset.Value); } + private static readonly Lazy _IgnoreGravityOffset = new(() => Schema.GetOffset(0xBB0C45ED2195C43B), LazyThreadSafetyMode.None); + public ref bool IgnoreGravity { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED2195C43B)); + get => ref _Handle.AsRef(_IgnoreGravityOffset.Value); } + private static readonly Lazy _DisableNPCCollisionsOffset = new(() => Schema.GetOffset(0xBB0C45ED13A48FA3), LazyThreadSafetyMode.None); + public ref bool DisableNPCCollisions { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED13A48FA3)); + get => ref _Handle.AsRef(_DisableNPCCollisionsOffset.Value); } + private static readonly Lazy _KeepAnimgraphLockedPostOffset = new(() => Schema.GetOffset(0xBB0C45EDC663447B), LazyThreadSafetyMode.None); + public ref bool KeepAnimgraphLockedPost { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDC663447B)); + get => ref _Handle.AsRef(_KeepAnimgraphLockedPostOffset.Value); } + private static readonly Lazy _DontAddModifiersOffset = new(() => Schema.GetOffset(0xBB0C45EDC5EF5CF1), LazyThreadSafetyMode.None); + public ref bool DontAddModifiers { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDC5EF5CF1)); + get => ref _Handle.AsRef(_DontAddModifiersOffset.Value); } + private static readonly Lazy _DisableAimingWhileMovingOffset = new(() => Schema.GetOffset(0xBB0C45ED58207B6F), LazyThreadSafetyMode.None); + public ref bool DisableAimingWhileMoving { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED58207B6F)); + get => ref _Handle.AsRef(_DisableAimingWhileMovingOffset.Value); } + private static readonly Lazy _IgnoreRotationOffset = new(() => Schema.GetOffset(0xBB0C45EDC7A0F33D), LazyThreadSafetyMode.None); + public ref bool IgnoreRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDC7A0F33D)); + get => ref _Handle.AsRef(_IgnoreRotationOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0xBB0C45ED5ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED5ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _RepeatOffset = new(() => Schema.GetOffset(0xBB0C45ED25029808), LazyThreadSafetyMode.None); + public ref float Repeat { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED25029808)); + get => ref _Handle.AsRef(_RepeatOffset.Value); } + private static readonly Lazy _PlayAnimFadeInTimeOffset = new(() => Schema.GetOffset(0xBB0C45ED9547EBE8), LazyThreadSafetyMode.None); + public ref float PlayAnimFadeInTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED9547EBE8)); + get => ref _Handle.AsRef(_PlayAnimFadeInTimeOffset.Value); } + private static readonly Lazy _MoveInterpTimeOffset = new(() => Schema.GetOffset(0xBB0C45ED642EF5C5), LazyThreadSafetyMode.None); + public ref float MoveInterpTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED642EF5C5)); + get => ref _Handle.AsRef(_MoveInterpTimeOffset.Value); } + private static readonly Lazy _AngRateOffset = new(() => Schema.GetOffset(0xBB0C45ED25A03D83), LazyThreadSafetyMode.None); + public ref float AngRate { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED25A03D83)); + get => ref _Handle.AsRef(_AngRateOffset.Value); } + private static readonly Lazy _MoveSpeedOffset = new(() => Schema.GetOffset(0xBB0C45ED66D18279), LazyThreadSafetyMode.None); + public ref float MoveSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED66D18279)); + get => ref _Handle.AsRef(_MoveSpeedOffset.Value); } + private static readonly Lazy _WaitUntilMoveCompletesToStartAnimationOffset = new(() => Schema.GetOffset(0xBB0C45ED56798D2C), LazyThreadSafetyMode.None); + public ref bool WaitUntilMoveCompletesToStartAnimation { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED56798D2C)); + get => ref _Handle.AsRef(_WaitUntilMoveCompletesToStartAnimationOffset.Value); } + private static readonly Lazy _NotReadySequenceCountOffset = new(() => Schema.GetOffset(0xBB0C45ED75F15197), LazyThreadSafetyMode.None); + public ref int NotReadySequenceCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED75F15197)); + get => ref _Handle.AsRef(_NotReadySequenceCountOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0xBB0C45ED6330E7EE), LazyThreadSafetyMode.None); + public GameTime_t StartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xBB0C45ED6330E7EE)); + get => new GameTime_tImpl(_Handle + _StartTimeOffset.Value); } + private static readonly Lazy _WaitForBeginSequenceOffset = new(() => Schema.GetOffset(0xBB0C45ED5878D3AD), LazyThreadSafetyMode.None); + public ref bool WaitForBeginSequence { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED5878D3AD)); + get => ref _Handle.AsRef(_WaitForBeginSequenceOffset.Value); } + private static readonly Lazy _Saved_effectsOffset = new(() => Schema.GetOffset(0xBB0C45ED1E53C9F1), LazyThreadSafetyMode.None); + public ref int Saved_effects { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED1E53C9F1)); + get => ref _Handle.AsRef(_Saved_effectsOffset.Value); } + private static readonly Lazy _SavedFlagsOffset = new(() => Schema.GetOffset(0xBB0C45ED80756D77), LazyThreadSafetyMode.None); + public ref int SavedFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED80756D77)); + get => ref _Handle.AsRef(_SavedFlagsOffset.Value); } + private static readonly Lazy _SavedCollisionGroupOffset = new(() => Schema.GetOffset(0xBB0C45ED6A94000F), LazyThreadSafetyMode.None); + public ref int SavedCollisionGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED6A94000F)); + get => ref _Handle.AsRef(_SavedCollisionGroupOffset.Value); } + private static readonly Lazy _InterruptableOffset = new(() => Schema.GetOffset(0xBB0C45ED58175B38), LazyThreadSafetyMode.None); + public ref bool Interruptable { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED58175B38)); + get => ref _Handle.AsRef(_InterruptableOffset.Value); } + private static readonly Lazy _SequenceStartedOffset = new(() => Schema.GetOffset(0xBB0C45ED8F0ADD05), LazyThreadSafetyMode.None); + public ref bool SequenceStarted { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED8F0ADD05)); + get => ref _Handle.AsRef(_SequenceStartedOffset.Value); } + private static readonly Lazy _PositionRelativeToOtherEntityOffset = new(() => Schema.GetOffset(0xBB0C45ED8CBF8E64), LazyThreadSafetyMode.None); + public ref bool PositionRelativeToOtherEntity { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED8CBF8E64)); + get => ref _Handle.AsRef(_PositionRelativeToOtherEntityOffset.Value); } + private static readonly Lazy _TargetEntOffset = new(() => Schema.GetOffset(0xBB0C45ED2DD292D7), LazyThreadSafetyMode.None); + public ref CHandle TargetEnt { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBB0C45ED2DD292D7)); + get => ref _Handle.AsRef>(_TargetEntOffset.Value); } + private static readonly Lazy _NextCineOffset = new(() => Schema.GetOffset(0xBB0C45ED75574CC3), LazyThreadSafetyMode.None); + public ref CHandle NextCine { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBB0C45ED75574CC3)); + get => ref _Handle.AsRef>(_NextCineOffset.Value); } + private static readonly Lazy _ThinkingOffset = new(() => Schema.GetOffset(0xBB0C45ED2C33DE1D), LazyThreadSafetyMode.None); + public ref bool Thinking { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED2C33DE1D)); + get => ref _Handle.AsRef(_ThinkingOffset.Value); } + private static readonly Lazy _InitiatedSelfDeleteOffset = new(() => Schema.GetOffset(0xBB0C45ED0396E447), LazyThreadSafetyMode.None); + public ref bool InitiatedSelfDelete { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED0396E447)); + get => ref _Handle.AsRef(_InitiatedSelfDeleteOffset.Value); } + private static readonly Lazy _IsTeleportingDueToMoveToOffset = new(() => Schema.GetOffset(0xBB0C45EDDBC06EE1), LazyThreadSafetyMode.None); + public ref bool IsTeleportingDueToMoveTo { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDDBC06EE1)); + get => ref _Handle.AsRef(_IsTeleportingDueToMoveToOffset.Value); } + private static readonly Lazy _AllowCustomInterruptConditionsOffset = new(() => Schema.GetOffset(0xBB0C45EDA2069736), LazyThreadSafetyMode.None); + public ref bool AllowCustomInterruptConditions { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDA2069736)); + get => ref _Handle.AsRef(_AllowCustomInterruptConditionsOffset.Value); } + private static readonly Lazy _ForcedTargetOffset = new(() => Schema.GetOffset(0xBB0C45ED820DE873), LazyThreadSafetyMode.None); + public ref CHandle ForcedTarget { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBB0C45ED820DE873)); + get => ref _Handle.AsRef>(_ForcedTargetOffset.Value); } + private static readonly Lazy _DontCancelOtherSequencesOffset = new(() => Schema.GetOffset(0xBB0C45EDF5CD3DDC), LazyThreadSafetyMode.None); + public ref bool DontCancelOtherSequences { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDF5CD3DDC)); + get => ref _Handle.AsRef(_DontCancelOtherSequencesOffset.Value); } + private static readonly Lazy _ForceSynchOffset = new(() => Schema.GetOffset(0xBB0C45ED088C39BD), LazyThreadSafetyMode.None); + public ref bool ForceSynch { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED088C39BD)); + get => ref _Handle.AsRef(_ForceSynchOffset.Value); } + private static readonly Lazy _PreventUpdateYawOnFinishOffset = new(() => Schema.GetOffset(0xBB0C45EDFA160855), LazyThreadSafetyMode.None); + public ref bool PreventUpdateYawOnFinish { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDFA160855)); + get => ref _Handle.AsRef(_PreventUpdateYawOnFinishOffset.Value); } + private static readonly Lazy _EnsureOnNavmeshOnFinishOffset = new(() => Schema.GetOffset(0xBB0C45ED802BA0B0), LazyThreadSafetyMode.None); + public ref bool EnsureOnNavmeshOnFinish { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED802BA0B0)); + get => ref _Handle.AsRef(_EnsureOnNavmeshOnFinishOffset.Value); } + private static readonly Lazy _OnDeathBehaviorOffset = new(() => Schema.GetOffset(0xBB0C45EDC66B3E44), LazyThreadSafetyMode.None); + public ref ScriptedOnDeath_t OnDeathBehavior { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDC66B3E44)); + get => ref _Handle.AsRef(_OnDeathBehaviorOffset.Value); } + private static readonly Lazy _ConflictResponseOffset = new(() => Schema.GetOffset(0xBB0C45EDF6B5D53C), LazyThreadSafetyMode.None); + public ref ScriptedConflictResponse_t ConflictResponse { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDF6B5D53C)); + get => ref _Handle.AsRef(_ConflictResponseOffset.Value); } + private static readonly Lazy _OnBeginSequenceOffset = new(() => Schema.GetOffset(0xBB0C45ED4EFCFF18), LazyThreadSafetyMode.None); + public CEntityIOOutput OnBeginSequence { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xBB0C45ED4EFCFF18)); + get => new CEntityIOOutputImpl(_Handle + _OnBeginSequenceOffset.Value); } + private static readonly Lazy _OnActionStartOrLoopOffset = new(() => Schema.GetOffset(0xBB0C45ED709BE9C5), LazyThreadSafetyMode.None); + public CEntityIOOutput OnActionStartOrLoop { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xBB0C45ED709BE9C5)); + get => new CEntityIOOutputImpl(_Handle + _OnActionStartOrLoopOffset.Value); } + private static readonly Lazy _OnEndSequenceOffset = new(() => Schema.GetOffset(0xBB0C45ED1F7AD018), LazyThreadSafetyMode.None); + public CEntityIOOutput OnEndSequence { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xBB0C45ED1F7AD018)); + get => new CEntityIOOutputImpl(_Handle + _OnEndSequenceOffset.Value); } + private static readonly Lazy _OnPostIdleEndSequenceOffset = new(() => Schema.GetOffset(0xBB0C45ED7770824C), LazyThreadSafetyMode.None); + public CEntityIOOutput OnPostIdleEndSequence { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xBB0C45ED7770824C)); + get => new CEntityIOOutputImpl(_Handle + _OnPostIdleEndSequenceOffset.Value); } + private static readonly Lazy _OnCancelSequenceOffset = new(() => Schema.GetOffset(0xBB0C45ED3DF39D63), LazyThreadSafetyMode.None); + public CEntityIOOutput OnCancelSequence { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xBB0C45ED3DF39D63)); + get => new CEntityIOOutputImpl(_Handle + _OnCancelSequenceOffset.Value); } + private static readonly Lazy _OnCancelFailedSequenceOffset = new(() => Schema.GetOffset(0xBB0C45ED1885A91A), LazyThreadSafetyMode.None); + public CEntityIOOutput OnCancelFailedSequence { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xBB0C45ED1885A91A)); + get => new CEntityIOOutputImpl(_Handle + _OnCancelFailedSequenceOffset.Value); } + private static readonly Lazy _OnScriptEventOffset = new(() => Schema.GetOffset(0xBB0C45ED8A68F621), LazyThreadSafetyMode.None); + public SchemaUntypedField OnScriptEvent { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xBB0C45ED8A68F621)); + get => new SchemaUntypedField(_Handle + _OnScriptEventOffset.Value); } + private static readonly Lazy _MatOtherToMainOffset = new(() => Schema.GetOffset(0xBB0C45ED0E394D39), LazyThreadSafetyMode.None); + public ref CTransform MatOtherToMain { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45ED0E394D39)); + get => ref _Handle.AsRef(_MatOtherToMainOffset.Value); } + private static readonly Lazy _InteractionMainEntityOffset = new(() => Schema.GetOffset(0xBB0C45ED16430DA3), LazyThreadSafetyMode.None); + public ref CHandle InteractionMainEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBB0C45ED16430DA3)); + get => ref _Handle.AsRef>(_InteractionMainEntityOffset.Value); } + private static readonly Lazy _PlayerDeathBehaviorOffset = new(() => Schema.GetOffset(0xBB0C45EDC6ECC93B), LazyThreadSafetyMode.None); + public ref int PlayerDeathBehavior { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDC6ECC93B)); + get => ref _Handle.AsRef(_PlayerDeathBehaviorOffset.Value); } + private static readonly Lazy _SkipFadeInOffset = new(() => Schema.GetOffset(0xBB0C45EDD482183B), LazyThreadSafetyMode.None); + public ref bool SkipFadeIn { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB0C45EDD482183B)); + get => ref _Handle.AsRef(_SkipFadeInOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSelectorUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSelectorUpdateNodeImpl.cs index 8f92961bc..2e860e4b0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSelectorUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSelectorUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class CSelectorUpdateNodeImpl : CAnimUpdateNodeBaseImpl, CSelec public CSelectorUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildrenOffset = new(() => Schema.GetOffset(0x23CD95F27415FA72), LazyThreadSafetyMode.None); + public ref CUtlVector Children { - get => ref _Handle.AsRef>(Schema.GetOffset(0x23CD95F27415FA72)); + get => ref _Handle.AsRef>(_ChildrenOffset.Value); } + private static readonly Lazy _TagsOffset = new(() => Schema.GetOffset(0x23CD95F2B46C8540), LazyThreadSafetyMode.None); + public ref CUtlVector Tags { - get => ref _Handle.AsRef>(Schema.GetOffset(0x23CD95F2B46C8540)); + get => ref _Handle.AsRef>(_TagsOffset.Value); } + private static readonly Lazy _BlendCurveOffset = new(() => Schema.GetOffset(0x23CD95F291978183), LazyThreadSafetyMode.None); + public CBlendCurve BlendCurve { - get => new CBlendCurveImpl(_Handle + Schema.GetOffset(0x23CD95F291978183)); + get => new CBlendCurveImpl(_Handle + _BlendCurveOffset.Value); } + private static readonly Lazy _BlendTimeOffset = new(() => Schema.GetOffset(0x23CD95F2A6206E9F), LazyThreadSafetyMode.None); + public SchemaUntypedField BlendTime { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x23CD95F2A6206E9F)); + get => new SchemaUntypedField(_Handle + _BlendTimeOffset.Value); } + private static readonly Lazy _ParameterOffset = new(() => Schema.GetOffset(0x23CD95F20C7008F6), LazyThreadSafetyMode.None); + public CAnimParamHandle Parameter { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x23CD95F20C7008F6)); + get => new CAnimParamHandleImpl(_Handle + _ParameterOffset.Value); } + private static readonly Lazy _TagIndexOffset = new(() => Schema.GetOffset(0x23CD95F2C2026AAD), LazyThreadSafetyMode.None); + public ref int TagIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x23CD95F2C2026AAD)); + get => ref _Handle.AsRef(_TagIndexOffset.Value); } + private static readonly Lazy _TagBehaviorOffset = new(() => Schema.GetOffset(0x23CD95F2698EF70A), LazyThreadSafetyMode.None); + public ref SelectorTagBehavior_t TagBehavior { - get => ref _Handle.AsRef(Schema.GetOffset(0x23CD95F2698EF70A)); + get => ref _Handle.AsRef(_TagBehaviorOffset.Value); } + private static readonly Lazy _ResetOnChangeOffset = new(() => Schema.GetOffset(0x23CD95F2E8AD58E9), LazyThreadSafetyMode.None); + public ref bool ResetOnChange { - get => ref _Handle.AsRef(Schema.GetOffset(0x23CD95F2E8AD58E9)); + get => ref _Handle.AsRef(_ResetOnChangeOffset.Value); } + private static readonly Lazy _LockWhenWaningOffset = new(() => Schema.GetOffset(0x23CD95F2EED48004), LazyThreadSafetyMode.None); + public ref bool LockWhenWaning { - get => ref _Handle.AsRef(Schema.GetOffset(0x23CD95F2EED48004)); + get => ref _Handle.AsRef(_LockWhenWaningOffset.Value); } + private static readonly Lazy _SyncCyclesOnChangeOffset = new(() => Schema.GetOffset(0x23CD95F25DD67E78), LazyThreadSafetyMode.None); + public ref bool SyncCyclesOnChange { - get => ref _Handle.AsRef(Schema.GetOffset(0x23CD95F25DD67E78)); + get => ref _Handle.AsRef(_SyncCyclesOnChangeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqAutoLayerFlagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqAutoLayerFlagImpl.cs index c933dfe2e..5dd97ff10 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqAutoLayerFlagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqAutoLayerFlagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CSeqAutoLayerFlagImpl : SchemaClass, CSeqAutoLayerFlag { public CSeqAutoLayerFlagImpl(nint handle) : base(handle) { } + private static readonly Lazy _PostOffset = new(() => Schema.GetOffset(0x9E41A1515698A5A7), LazyThreadSafetyMode.None); + public ref bool Post { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E41A1515698A5A7)); + get => ref _Handle.AsRef(_PostOffset.Value); } + private static readonly Lazy _SplineOffset = new(() => Schema.GetOffset(0x9E41A1512F9204DC), LazyThreadSafetyMode.None); + public ref bool Spline { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E41A1512F9204DC)); + get => ref _Handle.AsRef(_SplineOffset.Value); } + private static readonly Lazy _XFadeOffset = new(() => Schema.GetOffset(0x9E41A1511DEAA5A9), LazyThreadSafetyMode.None); + public ref bool XFade { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E41A1511DEAA5A9)); + get => ref _Handle.AsRef(_XFadeOffset.Value); } + private static readonly Lazy _NoBlendOffset = new(() => Schema.GetOffset(0x9E41A15180E307E1), LazyThreadSafetyMode.None); + public ref bool NoBlend { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E41A15180E307E1)); + get => ref _Handle.AsRef(_NoBlendOffset.Value); } + private static readonly Lazy _LocalOffset = new(() => Schema.GetOffset(0x9E41A15130D5CDE8), LazyThreadSafetyMode.None); + public ref bool Local { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E41A15130D5CDE8)); + get => ref _Handle.AsRef(_LocalOffset.Value); } + private static readonly Lazy _PoseOffset = new(() => Schema.GetOffset(0x9E41A15145988AE4), LazyThreadSafetyMode.None); + public ref bool Pose { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E41A15145988AE4)); + get => ref _Handle.AsRef(_PoseOffset.Value); } + private static readonly Lazy _FetchFrameOffset = new(() => Schema.GetOffset(0x9E41A15118941788), LazyThreadSafetyMode.None); + public ref bool FetchFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E41A15118941788)); + get => ref _Handle.AsRef(_FetchFrameOffset.Value); } + private static readonly Lazy _SubtractOffset = new(() => Schema.GetOffset(0x9E41A1514F203AC1), LazyThreadSafetyMode.None); + public ref bool Subtract { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E41A1514F203AC1)); + get => ref _Handle.AsRef(_SubtractOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqAutoLayerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqAutoLayerImpl.cs index 840b21932..f3e5dbcfe 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqAutoLayerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqAutoLayerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CSeqAutoLayerImpl : SchemaClass, CSeqAutoLayer { public CSeqAutoLayerImpl(nint handle) : base(handle) { } + private static readonly Lazy _LocalReferenceOffset = new(() => Schema.GetOffset(0x1506328FC8D571D9), LazyThreadSafetyMode.None); + public ref short LocalReference { - get => ref _Handle.AsRef(Schema.GetOffset(0x1506328FC8D571D9)); + get => ref _Handle.AsRef(_LocalReferenceOffset.Value); } + private static readonly Lazy _LocalPoseOffset = new(() => Schema.GetOffset(0x1506328F70BF8111), LazyThreadSafetyMode.None); + public ref short LocalPose { - get => ref _Handle.AsRef(Schema.GetOffset(0x1506328F70BF8111)); + get => ref _Handle.AsRef(_LocalPoseOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x1506328FDC74A14C), LazyThreadSafetyMode.None); + public CSeqAutoLayerFlag Flags { - get => new CSeqAutoLayerFlagImpl(_Handle + Schema.GetOffset(0x1506328FDC74A14C)); + get => new CSeqAutoLayerFlagImpl(_Handle + _FlagsOffset.Value); } + private static readonly Lazy _StartOffset = new(() => Schema.GetOffset(0x1506328FA539BEFF), LazyThreadSafetyMode.None); + public ref float Start { - get => ref _Handle.AsRef(Schema.GetOffset(0x1506328FA539BEFF)); + get => ref _Handle.AsRef(_StartOffset.Value); } + private static readonly Lazy _PeakOffset = new(() => Schema.GetOffset(0x1506328F5BAE16B2), LazyThreadSafetyMode.None); + public ref float Peak { - get => ref _Handle.AsRef(Schema.GetOffset(0x1506328F5BAE16B2)); + get => ref _Handle.AsRef(_PeakOffset.Value); } + private static readonly Lazy _TailOffset = new(() => Schema.GetOffset(0x1506328FCF8F4203), LazyThreadSafetyMode.None); + public ref float Tail { - get => ref _Handle.AsRef(Schema.GetOffset(0x1506328FCF8F4203)); + get => ref _Handle.AsRef(_TailOffset.Value); } + private static readonly Lazy _EndOffset = new(() => Schema.GetOffset(0x1506328F5B29CFCA), LazyThreadSafetyMode.None); + public ref float End { - get => ref _Handle.AsRef(Schema.GetOffset(0x1506328F5B29CFCA)); + get => ref _Handle.AsRef(_EndOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqBoneMaskListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqBoneMaskListImpl.cs index 4d21461f5..b2029a5fa 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqBoneMaskListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqBoneMaskListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CSeqBoneMaskListImpl : SchemaClass, CSeqBoneMaskList { public CSeqBoneMaskListImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xCD7B4EF763D22D49), LazyThreadSafetyMode.None); + public ref CBufferString Name { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD7B4EF763D22D49)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _LocalBoneArrayOffset = new(() => Schema.GetOffset(0xCD7B4EF70B8EFD6B), LazyThreadSafetyMode.None); + public ref CUtlVector LocalBoneArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xCD7B4EF70B8EFD6B)); + get => ref _Handle.AsRef>(_LocalBoneArrayOffset.Value); } + private static readonly Lazy _BoneWeightArrayOffset = new(() => Schema.GetOffset(0xCD7B4EF747E1E612), LazyThreadSafetyMode.None); + public ref CUtlVector BoneWeightArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xCD7B4EF747E1E612)); + get => ref _Handle.AsRef>(_BoneWeightArrayOffset.Value); } + private static readonly Lazy _DefaultMorphCtrlWeightOffset = new(() => Schema.GetOffset(0xCD7B4EF7AA0F3843), LazyThreadSafetyMode.None); + public ref float DefaultMorphCtrlWeight { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD7B4EF7AA0F3843)); + get => ref _Handle.AsRef(_DefaultMorphCtrlWeightOffset.Value); } + private static readonly Lazy _MorphCtrlWeightArrayOffset = new(() => Schema.GetOffset(0xCD7B4EF72C45A089), LazyThreadSafetyMode.None); + public ref CUtlVector MorphCtrlWeightArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xCD7B4EF72C45A089)); + get => ref _Handle.AsRef>(_MorphCtrlWeightArrayOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqCmdLayerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqCmdLayerImpl.cs index 331043623..8c7e66c70 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqCmdLayerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqCmdLayerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class CSeqCmdLayerImpl : SchemaClass, CSeqCmdLayer { public CSeqCmdLayerImpl(nint handle) : base(handle) { } + private static readonly Lazy _CmdOffset = new(() => Schema.GetOffset(0xFD1F978E4B3490B), LazyThreadSafetyMode.None); + public ref short Cmd { - get => ref _Handle.AsRef(Schema.GetOffset(0xFD1F978E4B3490B)); + get => ref _Handle.AsRef(_CmdOffset.Value); } + private static readonly Lazy _LocalReferenceOffset = new(() => Schema.GetOffset(0xFD1F978C8D571D9), LazyThreadSafetyMode.None); + public ref short LocalReference { - get => ref _Handle.AsRef(Schema.GetOffset(0xFD1F978C8D571D9)); + get => ref _Handle.AsRef(_LocalReferenceOffset.Value); } + private static readonly Lazy _LocalBonemaskOffset = new(() => Schema.GetOffset(0xFD1F9782B0E5CB2), LazyThreadSafetyMode.None); + public ref short LocalBonemask { - get => ref _Handle.AsRef(Schema.GetOffset(0xFD1F9782B0E5CB2)); + get => ref _Handle.AsRef(_LocalBonemaskOffset.Value); } + private static readonly Lazy _DstResultOffset = new(() => Schema.GetOffset(0xFD1F978EC2D9DB9), LazyThreadSafetyMode.None); + public ref short DstResult { - get => ref _Handle.AsRef(Schema.GetOffset(0xFD1F978EC2D9DB9)); + get => ref _Handle.AsRef(_DstResultOffset.Value); } + private static readonly Lazy _SrcResultOffset = new(() => Schema.GetOffset(0xFD1F9782B5F4F1C), LazyThreadSafetyMode.None); + public ref short SrcResult { - get => ref _Handle.AsRef(Schema.GetOffset(0xFD1F9782B5F4F1C)); + get => ref _Handle.AsRef(_SrcResultOffset.Value); } + private static readonly Lazy _SplineOffset = new(() => Schema.GetOffset(0xFD1F9782F9204DC), LazyThreadSafetyMode.None); + public ref bool Spline { - get => ref _Handle.AsRef(Schema.GetOffset(0xFD1F9782F9204DC)); + get => ref _Handle.AsRef(_SplineOffset.Value); } + private static readonly Lazy _Var1Offset = new(() => Schema.GetOffset(0xFD1F978B9FADB9F), LazyThreadSafetyMode.None); + public ref float Var1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xFD1F978B9FADB9F)); + get => ref _Handle.AsRef(_Var1Offset.Value); } + private static readonly Lazy _Var2Offset = new(() => Schema.GetOffset(0xFD1F978BAFADD32), LazyThreadSafetyMode.None); + public ref float Var2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xFD1F978BAFADD32)); + get => ref _Handle.AsRef(_Var2Offset.Value); } + private static readonly Lazy _LineNumberOffset = new(() => Schema.GetOffset(0xFD1F978AD012A6A), LazyThreadSafetyMode.None); + public ref short LineNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xFD1F978AD012A6A)); + get => ref _Handle.AsRef(_LineNumberOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqCmdSeqDescImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqCmdSeqDescImpl.cs index 9df206f30..728afeb4f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqCmdSeqDescImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqCmdSeqDescImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,65 @@ internal partial class CSeqCmdSeqDescImpl : SchemaClass, CSeqCmdSeqDesc { public CSeqCmdSeqDescImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x8619E10F63D22D49), LazyThreadSafetyMode.None); + public ref CBufferString Name { - get => ref _Handle.AsRef(Schema.GetOffset(0x8619E10F63D22D49)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x8619E10FDC74A14C), LazyThreadSafetyMode.None); + public CSeqSeqDescFlag Flags { - get => new CSeqSeqDescFlagImpl(_Handle + Schema.GetOffset(0x8619E10FDC74A14C)); + get => new CSeqSeqDescFlagImpl(_Handle + _FlagsOffset.Value); } + private static readonly Lazy _TransitionOffset = new(() => Schema.GetOffset(0x8619E10F82B0A282), LazyThreadSafetyMode.None); + public CSeqTransition Transition { - get => new CSeqTransitionImpl(_Handle + Schema.GetOffset(0x8619E10F82B0A282)); + get => new CSeqTransitionImpl(_Handle + _TransitionOffset.Value); } + private static readonly Lazy _FrameRangeSequenceOffset = new(() => Schema.GetOffset(0x8619E10FAE2B7FB6), LazyThreadSafetyMode.None); + public ref short FrameRangeSequence { - get => ref _Handle.AsRef(Schema.GetOffset(0x8619E10FAE2B7FB6)); + get => ref _Handle.AsRef(_FrameRangeSequenceOffset.Value); } + private static readonly Lazy _FrameCountOffset = new(() => Schema.GetOffset(0x8619E10F1DBCD049), LazyThreadSafetyMode.None); + public ref short FrameCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x8619E10F1DBCD049)); + get => ref _Handle.AsRef(_FrameCountOffset.Value); } + private static readonly Lazy _FPSOffset = new(() => Schema.GetOffset(0x8619E10F38CAA4F6), LazyThreadSafetyMode.None); + public ref float FPS { - get => ref _Handle.AsRef(Schema.GetOffset(0x8619E10F38CAA4F6)); + get => ref _Handle.AsRef(_FPSOffset.Value); } + private static readonly Lazy _SubCyclesOffset = new(() => Schema.GetOffset(0x8619E10FBA8C5B82), LazyThreadSafetyMode.None); + public ref short SubCycles { - get => ref _Handle.AsRef(Schema.GetOffset(0x8619E10FBA8C5B82)); + get => ref _Handle.AsRef(_SubCyclesOffset.Value); } + private static readonly Lazy _NumLocalResultsOffset = new(() => Schema.GetOffset(0x8619E10FC4396DD8), LazyThreadSafetyMode.None); + public ref short NumLocalResults { - get => ref _Handle.AsRef(Schema.GetOffset(0x8619E10FC4396DD8)); + get => ref _Handle.AsRef(_NumLocalResultsOffset.Value); } + private static readonly Lazy _CmdLayerArrayOffset = new(() => Schema.GetOffset(0x8619E10FA7272079), LazyThreadSafetyMode.None); + public ref CUtlVector CmdLayerArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8619E10FA7272079)); + get => ref _Handle.AsRef>(_CmdLayerArrayOffset.Value); } + private static readonly Lazy _EventArrayOffset = new(() => Schema.GetOffset(0x8619E10FB9FB599C), LazyThreadSafetyMode.None); + public ref CUtlVector EventArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8619E10FB9FB599C)); + get => ref _Handle.AsRef>(_EventArrayOffset.Value); } + private static readonly Lazy _ActivityArrayOffset = new(() => Schema.GetOffset(0x8619E10F38F0ACE1), LazyThreadSafetyMode.None); + public ref CUtlVector ActivityArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8619E10F38F0ACE1)); + get => ref _Handle.AsRef>(_ActivityArrayOffset.Value); } + private static readonly Lazy _PoseSettingArrayOffset = new(() => Schema.GetOffset(0x8619E10FD257125D), LazyThreadSafetyMode.None); + public ref CUtlVector PoseSettingArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8619E10FD257125D)); + get => ref _Handle.AsRef>(_PoseSettingArrayOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqIKLockImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqIKLockImpl.cs index b11dde636..b6ab32b47 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqIKLockImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqIKLockImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CSeqIKLockImpl : SchemaClass, CSeqIKLock { public CSeqIKLockImpl(nint handle) : base(handle) { } + private static readonly Lazy _PosWeightOffset = new(() => Schema.GetOffset(0x9813F59E9CC6C04B), LazyThreadSafetyMode.None); + public ref float PosWeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x9813F59E9CC6C04B)); + get => ref _Handle.AsRef(_PosWeightOffset.Value); } + private static readonly Lazy _AngleWeightOffset = new(() => Schema.GetOffset(0x9813F59E51DFB6EE), LazyThreadSafetyMode.None); + public ref float AngleWeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x9813F59E51DFB6EE)); + get => ref _Handle.AsRef(_AngleWeightOffset.Value); } + private static readonly Lazy _LocalBoneOffset = new(() => Schema.GetOffset(0x9813F59EC2F7B8CA), LazyThreadSafetyMode.None); + public ref short LocalBone { - get => ref _Handle.AsRef(Schema.GetOffset(0x9813F59EC2F7B8CA)); + get => ref _Handle.AsRef(_LocalBoneOffset.Value); } + private static readonly Lazy _BonesOrientedAlongPositiveXOffset = new(() => Schema.GetOffset(0x9813F59ED3FDAB3A), LazyThreadSafetyMode.None); + public ref bool BonesOrientedAlongPositiveX { - get => ref _Handle.AsRef(Schema.GetOffset(0x9813F59ED3FDAB3A)); + get => ref _Handle.AsRef(_BonesOrientedAlongPositiveXOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqMultiFetchFlagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqMultiFetchFlagImpl.cs index 311a617f1..8681d0a82 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqMultiFetchFlagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqMultiFetchFlagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CSeqMultiFetchFlagImpl : SchemaClass, CSeqMultiFetchFlag public CSeqMultiFetchFlagImpl(nint handle) : base(handle) { } + private static readonly Lazy _RealtimeOffset = new(() => Schema.GetOffset(0xE7EB44FCB658139C), LazyThreadSafetyMode.None); + public ref bool Realtime { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7EB44FCB658139C)); + get => ref _Handle.AsRef(_RealtimeOffset.Value); } + private static readonly Lazy _CyleposeOffset = new(() => Schema.GetOffset(0xE7EB44FCCB757B6B), LazyThreadSafetyMode.None); + public ref bool Cylepose { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7EB44FCCB757B6B)); + get => ref _Handle.AsRef(_CyleposeOffset.Value); } + private static readonly Lazy _B0DOffset = new(() => Schema.GetOffset(0xE7EB44FC76DE6DB1), LazyThreadSafetyMode.None); + public ref bool B0D { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7EB44FC76DE6DB1)); + get => ref _Handle.AsRef(_B0DOffset.Value); } + private static readonly Lazy _B1DOffset = new(() => Schema.GetOffset(0xE7EB44FC50DBF348), LazyThreadSafetyMode.None); + public ref bool B1D { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7EB44FC50DBF348)); + get => ref _Handle.AsRef(_B1DOffset.Value); } + private static readonly Lazy _B2DOffset = new(() => Schema.GetOffset(0xE7EB44FC42E42C03), LazyThreadSafetyMode.None); + public ref bool B2D { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7EB44FC42E42C03)); + get => ref _Handle.AsRef(_B2DOffset.Value); } + private static readonly Lazy _B2D_TRIOffset = new(() => Schema.GetOffset(0xE7EB44FCC9FA6A0D), LazyThreadSafetyMode.None); + public ref bool B2D_TRI { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7EB44FCC9FA6A0D)); + get => ref _Handle.AsRef(_B2D_TRIOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqMultiFetchImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqMultiFetchImpl.cs index f16b232b5..d0baa37d3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqMultiFetchImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqMultiFetchImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CSeqMultiFetchImpl : SchemaClass, CSeqMultiFetch { public CSeqMultiFetchImpl(nint handle) : base(handle) { } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x3846FD62DC74A14C), LazyThreadSafetyMode.None); + public CSeqMultiFetchFlag Flags { - get => new CSeqMultiFetchFlagImpl(_Handle + Schema.GetOffset(0x3846FD62DC74A14C)); + get => new CSeqMultiFetchFlagImpl(_Handle + _FlagsOffset.Value); } + private static readonly Lazy _LocalReferenceArrayOffset = new(() => Schema.GetOffset(0x3846FD6290C98686), LazyThreadSafetyMode.None); + public ref CUtlVector LocalReferenceArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3846FD6290C98686)); + get => ref _Handle.AsRef>(_LocalReferenceArrayOffset.Value); } public ISchemaFixedArray GroupSize { get => new SchemaFixedArray(_Handle, 0x3846FD6258533CF9, 2, 4, 4); @@ -27,20 +33,30 @@ public ISchemaFixedArray GroupSize { public ISchemaFixedArray LocalPose { get => new SchemaFixedArray(_Handle, 0x3846FD6270BF8111, 2, 4, 4); } + private static readonly Lazy _PoseKeyArray0Offset = new(() => Schema.GetOffset(0x3846FD62E139B398), LazyThreadSafetyMode.None); + public ref CUtlVector PoseKeyArray0 { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3846FD62E139B398)); + get => ref _Handle.AsRef>(_PoseKeyArray0Offset.Value); } + private static readonly Lazy _PoseKeyArray1Offset = new(() => Schema.GetOffset(0x3846FD62E239B52B), LazyThreadSafetyMode.None); + public ref CUtlVector PoseKeyArray1 { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3846FD62E239B52B)); + get => ref _Handle.AsRef>(_PoseKeyArray1Offset.Value); } + private static readonly Lazy _LocalCyclePoseParameterOffset = new(() => Schema.GetOffset(0x3846FD62722CCD8E), LazyThreadSafetyMode.None); + public ref int LocalCyclePoseParameter { - get => ref _Handle.AsRef(Schema.GetOffset(0x3846FD62722CCD8E)); + get => ref _Handle.AsRef(_LocalCyclePoseParameterOffset.Value); } + private static readonly Lazy _CalculatePoseParametersOffset = new(() => Schema.GetOffset(0x3846FD6259BED3FE), LazyThreadSafetyMode.None); + public ref bool CalculatePoseParameters { - get => ref _Handle.AsRef(Schema.GetOffset(0x3846FD6259BED3FE)); + get => ref _Handle.AsRef(_CalculatePoseParametersOffset.Value); } + private static readonly Lazy _FixedBlendWeightOffset = new(() => Schema.GetOffset(0x3846FD626C68A6B4), LazyThreadSafetyMode.None); + public ref bool FixedBlendWeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x3846FD626C68A6B4)); + get => ref _Handle.AsRef(_FixedBlendWeightOffset.Value); } public ISchemaFixedArray FixedBlendWeightVals { get => new SchemaFixedArray(_Handle, 0x3846FD6221B3BB76, 2, 4, 4); diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqPoseParamDescImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqPoseParamDescImpl.cs index c0ded1deb..4f682404c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqPoseParamDescImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqPoseParamDescImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CSeqPoseParamDescImpl : SchemaClass, CSeqPoseParamDesc { public CSeqPoseParamDescImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x9276634463D22D49), LazyThreadSafetyMode.None); + public ref CBufferString Name { - get => ref _Handle.AsRef(Schema.GetOffset(0x9276634463D22D49)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _StartOffset = new(() => Schema.GetOffset(0x9276634405A20B85), LazyThreadSafetyMode.None); + public ref float Start { - get => ref _Handle.AsRef(Schema.GetOffset(0x9276634405A20B85)); + get => ref _Handle.AsRef(_StartOffset.Value); } + private static readonly Lazy _EndOffset = new(() => Schema.GetOffset(0x927663449616A27C), LazyThreadSafetyMode.None); + public ref float End { - get => ref _Handle.AsRef(Schema.GetOffset(0x927663449616A27C)); + get => ref _Handle.AsRef(_EndOffset.Value); } + private static readonly Lazy _LoopOffset = new(() => Schema.GetOffset(0x92766344DE666C85), LazyThreadSafetyMode.None); + public ref float Loop { - get => ref _Handle.AsRef(Schema.GetOffset(0x92766344DE666C85)); + get => ref _Handle.AsRef(_LoopOffset.Value); } + private static readonly Lazy _LoopingOffset = new(() => Schema.GetOffset(0x9276634425449B0D), LazyThreadSafetyMode.None); + public ref bool Looping { - get => ref _Handle.AsRef(Schema.GetOffset(0x9276634425449B0D)); + get => ref _Handle.AsRef(_LoopingOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqPoseSettingImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqPoseSettingImpl.cs index 37754f30d..ebda33e47 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqPoseSettingImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqPoseSettingImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CSeqPoseSettingImpl : SchemaClass, CSeqPoseSetting { public CSeqPoseSettingImpl(nint handle) : base(handle) { } + private static readonly Lazy _PoseParameterOffset = new(() => Schema.GetOffset(0x5EC3BE449DD21486), LazyThreadSafetyMode.None); + public ref CBufferString PoseParameter { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EC3BE449DD21486)); + get => ref _Handle.AsRef(_PoseParameterOffset.Value); } + private static readonly Lazy _AttachmentOffset = new(() => Schema.GetOffset(0x5EC3BE4439471F5F), LazyThreadSafetyMode.None); + public ref CBufferString Attachment { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EC3BE4439471F5F)); + get => ref _Handle.AsRef(_AttachmentOffset.Value); } + private static readonly Lazy _ReferenceSequenceOffset = new(() => Schema.GetOffset(0x5EC3BE44A84D180E), LazyThreadSafetyMode.None); + public ref CBufferString ReferenceSequence { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EC3BE44A84D180E)); + get => ref _Handle.AsRef(_ReferenceSequenceOffset.Value); } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x5EC3BE448DFCB984), LazyThreadSafetyMode.None); + public ref float Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EC3BE448DFCB984)); + get => ref _Handle.AsRef(_ValueOffset.Value); } + private static readonly Lazy _XOffset = new(() => Schema.GetOffset(0x5EC3BE44B2ABAD67), LazyThreadSafetyMode.None); + public ref bool X { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EC3BE44B2ABAD67)); + get => ref _Handle.AsRef(_XOffset.Value); } + private static readonly Lazy _YOffset = new(() => Schema.GetOffset(0x5EC3BE44B1ABABD4), LazyThreadSafetyMode.None); + public ref bool Y { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EC3BE44B1ABABD4)); + get => ref _Handle.AsRef(_YOffset.Value); } + private static readonly Lazy _ZOffset = new(() => Schema.GetOffset(0x5EC3BE44B4ABB08D), LazyThreadSafetyMode.None); + public ref bool Z { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EC3BE44B4ABB08D)); + get => ref _Handle.AsRef(_ZOffset.Value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x5EC3BE4421B39888), LazyThreadSafetyMode.None); + public ref int Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EC3BE4421B39888)); + get => ref _Handle.AsRef(_TypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqS1SeqDescImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqS1SeqDescImpl.cs index 3103ba828..e4c1a9ee0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqS1SeqDescImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqS1SeqDescImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class CSeqS1SeqDescImpl : SchemaClass, CSeqS1SeqDesc { public CSeqS1SeqDescImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x6EF8193563D22D49), LazyThreadSafetyMode.None); + public ref CBufferString Name { - get => ref _Handle.AsRef(Schema.GetOffset(0x6EF8193563D22D49)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x6EF81935DC74A14C), LazyThreadSafetyMode.None); + public CSeqSeqDescFlag Flags { - get => new CSeqSeqDescFlagImpl(_Handle + Schema.GetOffset(0x6EF81935DC74A14C)); + get => new CSeqSeqDescFlagImpl(_Handle + _FlagsOffset.Value); } + private static readonly Lazy _FetchOffset = new(() => Schema.GetOffset(0x6EF81935ED8BE703), LazyThreadSafetyMode.None); + public CSeqMultiFetch Fetch { - get => new CSeqMultiFetchImpl(_Handle + Schema.GetOffset(0x6EF81935ED8BE703)); + get => new CSeqMultiFetchImpl(_Handle + _FetchOffset.Value); } + private static readonly Lazy _LocalWeightlistOffset = new(() => Schema.GetOffset(0x6EF819356F64F49C), LazyThreadSafetyMode.None); + public ref int LocalWeightlist { - get => ref _Handle.AsRef(Schema.GetOffset(0x6EF819356F64F49C)); + get => ref _Handle.AsRef(_LocalWeightlistOffset.Value); } + private static readonly Lazy _AutoLayerArrayOffset = new(() => Schema.GetOffset(0x6EF81935834EB170), LazyThreadSafetyMode.None); + public ref CUtlVector AutoLayerArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6EF81935834EB170)); + get => ref _Handle.AsRef>(_AutoLayerArrayOffset.Value); } + private static readonly Lazy _IKLockArrayOffset = new(() => Schema.GetOffset(0x6EF81935BF1FEC6B), LazyThreadSafetyMode.None); + public ref CUtlVector IKLockArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6EF81935BF1FEC6B)); + get => ref _Handle.AsRef>(_IKLockArrayOffset.Value); } + private static readonly Lazy _TransitionOffset = new(() => Schema.GetOffset(0x6EF8193582B0A282), LazyThreadSafetyMode.None); + public CSeqTransition Transition { - get => new CSeqTransitionImpl(_Handle + Schema.GetOffset(0x6EF8193582B0A282)); + get => new CSeqTransitionImpl(_Handle + _TransitionOffset.Value); } + private static readonly Lazy _SequenceKeysOffset = new(() => Schema.GetOffset(0x6EF81935C7ACD18C), LazyThreadSafetyMode.None); + public SchemaUntypedField SequenceKeys { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x6EF81935C7ACD18C)); + get => new SchemaUntypedField(_Handle + _SequenceKeysOffset.Value); } + private static readonly Lazy _LegacyKeyValueTextOffset = new(() => Schema.GetOffset(0x6EF81935D12D4AC1), LazyThreadSafetyMode.None); + public ref CBufferString LegacyKeyValueText { - get => ref _Handle.AsRef(Schema.GetOffset(0x6EF81935D12D4AC1)); + get => ref _Handle.AsRef(_LegacyKeyValueTextOffset.Value); } + private static readonly Lazy _ActivityArrayOffset = new(() => Schema.GetOffset(0x6EF8193538F0ACE1), LazyThreadSafetyMode.None); + public ref CUtlVector ActivityArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6EF8193538F0ACE1)); + get => ref _Handle.AsRef>(_ActivityArrayOffset.Value); } + private static readonly Lazy _FootMotionOffset = new(() => Schema.GetOffset(0x6EF8193543CF70A3), LazyThreadSafetyMode.None); + public ref CUtlVector FootMotion { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6EF8193543CF70A3)); + get => ref _Handle.AsRef>(_FootMotionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqScaleSetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqScaleSetImpl.cs index de319d650..1423cc340 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqScaleSetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqScaleSetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CSeqScaleSetImpl : SchemaClass, CSeqScaleSet { public CSeqScaleSetImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x34C951AB63D22D49), LazyThreadSafetyMode.None); + public ref CBufferString Name { - get => ref _Handle.AsRef(Schema.GetOffset(0x34C951AB63D22D49)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _RootOffsetOffset = new(() => Schema.GetOffset(0x34C951ABEE69828A), LazyThreadSafetyMode.None); + public ref bool RootOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x34C951ABEE69828A)); + get => ref _Handle.AsRef(_RootOffsetOffset.Value); } + private static readonly Lazy _RootOffset1Offset = new(() => Schema.GetOffset(0x34C951ABA62E010E), LazyThreadSafetyMode.None); + public ref Vector RootOffset1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x34C951ABA62E010E)); + get => ref _Handle.AsRef(_RootOffset1Offset.Value); } + private static readonly Lazy _LocalBoneArrayOffset = new(() => Schema.GetOffset(0x34C951AB0B8EFD6B), LazyThreadSafetyMode.None); + public ref CUtlVector LocalBoneArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x34C951AB0B8EFD6B)); + get => ref _Handle.AsRef>(_LocalBoneArrayOffset.Value); } + private static readonly Lazy _BoneScaleArrayOffset = new(() => Schema.GetOffset(0x34C951ABC4BD868A), LazyThreadSafetyMode.None); + public ref CUtlVector BoneScaleArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x34C951ABC4BD868A)); + get => ref _Handle.AsRef>(_BoneScaleArrayOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqSeqDescFlagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqSeqDescFlagImpl.cs index fe5d44d60..3aac82874 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqSeqDescFlagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqSeqDescFlagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class CSeqSeqDescFlagImpl : SchemaClass, CSeqSeqDescFlag { public CSeqSeqDescFlagImpl(nint handle) : base(handle) { } + private static readonly Lazy _LoopingOffset = new(() => Schema.GetOffset(0xAEF7A80B25449B0D), LazyThreadSafetyMode.None); + public ref bool Looping { - get => ref _Handle.AsRef(Schema.GetOffset(0xAEF7A80B25449B0D)); + get => ref _Handle.AsRef(_LoopingOffset.Value); } + private static readonly Lazy _SnapOffset = new(() => Schema.GetOffset(0xAEF7A80B817324FD), LazyThreadSafetyMode.None); + public ref bool Snap { - get => ref _Handle.AsRef(Schema.GetOffset(0xAEF7A80B817324FD)); + get => ref _Handle.AsRef(_SnapOffset.Value); } + private static readonly Lazy _AutoplayOffset = new(() => Schema.GetOffset(0xAEF7A80BB136D8A8), LazyThreadSafetyMode.None); + public ref bool Autoplay { - get => ref _Handle.AsRef(Schema.GetOffset(0xAEF7A80BB136D8A8)); + get => ref _Handle.AsRef(_AutoplayOffset.Value); } + private static readonly Lazy _PostOffset = new(() => Schema.GetOffset(0xAEF7A80B5698A5A7), LazyThreadSafetyMode.None); + public ref bool Post { - get => ref _Handle.AsRef(Schema.GetOffset(0xAEF7A80B5698A5A7)); + get => ref _Handle.AsRef(_PostOffset.Value); } + private static readonly Lazy _HiddenOffset = new(() => Schema.GetOffset(0xAEF7A80B57D2DC99), LazyThreadSafetyMode.None); + public ref bool Hidden { - get => ref _Handle.AsRef(Schema.GetOffset(0xAEF7A80B57D2DC99)); + get => ref _Handle.AsRef(_HiddenOffset.Value); } + private static readonly Lazy _MultiOffset = new(() => Schema.GetOffset(0xAEF7A80B04A7F792), LazyThreadSafetyMode.None); + public ref bool Multi { - get => ref _Handle.AsRef(Schema.GetOffset(0xAEF7A80B04A7F792)); + get => ref _Handle.AsRef(_MultiOffset.Value); } + private static readonly Lazy _LegacyDeltaOffset = new(() => Schema.GetOffset(0xAEF7A80BADC37FD8), LazyThreadSafetyMode.None); + public ref bool LegacyDelta { - get => ref _Handle.AsRef(Schema.GetOffset(0xAEF7A80BADC37FD8)); + get => ref _Handle.AsRef(_LegacyDeltaOffset.Value); } + private static readonly Lazy _LegacyWorldspaceOffset = new(() => Schema.GetOffset(0xAEF7A80BE598BF5C), LazyThreadSafetyMode.None); + public ref bool LegacyWorldspace { - get => ref _Handle.AsRef(Schema.GetOffset(0xAEF7A80BE598BF5C)); + get => ref _Handle.AsRef(_LegacyWorldspaceOffset.Value); } + private static readonly Lazy _LegacyCycleposeOffset = new(() => Schema.GetOffset(0xAEF7A80B792D85FD), LazyThreadSafetyMode.None); + public ref bool LegacyCyclepose { - get => ref _Handle.AsRef(Schema.GetOffset(0xAEF7A80B792D85FD)); + get => ref _Handle.AsRef(_LegacyCycleposeOffset.Value); } + private static readonly Lazy _LegacyRealtimeOffset = new(() => Schema.GetOffset(0xAEF7A80B8D773F07), LazyThreadSafetyMode.None); + public ref bool LegacyRealtime { - get => ref _Handle.AsRef(Schema.GetOffset(0xAEF7A80B8D773F07)); + get => ref _Handle.AsRef(_LegacyRealtimeOffset.Value); } + private static readonly Lazy _ModelDocOffset = new(() => Schema.GetOffset(0xAEF7A80B815FEAE4), LazyThreadSafetyMode.None); + public ref bool ModelDoc { - get => ref _Handle.AsRef(Schema.GetOffset(0xAEF7A80B815FEAE4)); + get => ref _Handle.AsRef(_ModelDocOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqSynthAnimDescImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqSynthAnimDescImpl.cs index bdfd4d0d9..a00f15fff 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqSynthAnimDescImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqSynthAnimDescImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CSeqSynthAnimDescImpl : SchemaClass, CSeqSynthAnimDesc { public CSeqSynthAnimDescImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x7D8317C163D22D49), LazyThreadSafetyMode.None); + public ref CBufferString Name { - get => ref _Handle.AsRef(Schema.GetOffset(0x7D8317C163D22D49)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x7D8317C1DC74A14C), LazyThreadSafetyMode.None); + public CSeqSeqDescFlag Flags { - get => new CSeqSeqDescFlagImpl(_Handle + Schema.GetOffset(0x7D8317C1DC74A14C)); + get => new CSeqSeqDescFlagImpl(_Handle + _FlagsOffset.Value); } + private static readonly Lazy _TransitionOffset = new(() => Schema.GetOffset(0x7D8317C182B0A282), LazyThreadSafetyMode.None); + public CSeqTransition Transition { - get => new CSeqTransitionImpl(_Handle + Schema.GetOffset(0x7D8317C182B0A282)); + get => new CSeqTransitionImpl(_Handle + _TransitionOffset.Value); } + private static readonly Lazy _LocalBaseReferenceOffset = new(() => Schema.GetOffset(0x7D8317C1FE93178E), LazyThreadSafetyMode.None); + public ref short LocalBaseReference { - get => ref _Handle.AsRef(Schema.GetOffset(0x7D8317C1FE93178E)); + get => ref _Handle.AsRef(_LocalBaseReferenceOffset.Value); } + private static readonly Lazy _LocalBoneMaskOffset = new(() => Schema.GetOffset(0x7D8317C191EDF3D2), LazyThreadSafetyMode.None); + public ref short LocalBoneMask { - get => ref _Handle.AsRef(Schema.GetOffset(0x7D8317C191EDF3D2)); + get => ref _Handle.AsRef(_LocalBoneMaskOffset.Value); } + private static readonly Lazy _ActivityArrayOffset = new(() => Schema.GetOffset(0x7D8317C138F0ACE1), LazyThreadSafetyMode.None); + public ref CUtlVector ActivityArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0x7D8317C138F0ACE1)); + get => ref _Handle.AsRef>(_ActivityArrayOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqTransitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqTransitionImpl.cs index 083fea19a..acb84dcad 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqTransitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSeqTransitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CSeqTransitionImpl : SchemaClass, CSeqTransition { public CSeqTransitionImpl(nint handle) : base(handle) { } + private static readonly Lazy _FadeInTimeOffset = new(() => Schema.GetOffset(0xF641804E1F0255B3), LazyThreadSafetyMode.None); + public ref float FadeInTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xF641804E1F0255B3)); + get => ref _Handle.AsRef(_FadeInTimeOffset.Value); } + private static readonly Lazy _FadeOutTimeOffset = new(() => Schema.GetOffset(0xF641804EE86D2FC2), LazyThreadSafetyMode.None); + public ref float FadeOutTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xF641804EE86D2FC2)); + get => ref _Handle.AsRef(_FadeOutTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceFinishedAnimTagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceFinishedAnimTagImpl.cs index 95c744932..455ee5400 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceFinishedAnimTagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceFinishedAnimTagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CSequenceFinishedAnimTagImpl : CAnimTagBaseImpl, CSequenc public CSequenceFinishedAnimTagImpl(nint handle) : base(handle) { } + private static readonly Lazy _SequenceNameOffset = new(() => Schema.GetOffset(0x1B46C5202B4A24CB), LazyThreadSafetyMode.None); + public string SequenceName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1B46C5202B4A24CB)); + var ptr = _Handle.Read(_SequenceNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1B46C5202B4A24CB, value); + set => Schema.SetString(_Handle, _SequenceNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceGroupDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceGroupDataImpl.cs index 399d065da..37e0e2697 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceGroupDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceGroupDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,47 +17,75 @@ internal partial class CSequenceGroupDataImpl : SchemaClass, CSequenceGroupData public CSequenceGroupDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xF2F9B8263D22D49), LazyThreadSafetyMode.None); + public ref CBufferString Name { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2F9B8263D22D49)); + get => ref _Handle.AsRef(_NameOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0xF2F9B82CE6E9C28), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2F9B82CE6E9C28)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _LocalSequenceNameArrayOffset = new(() => Schema.GetOffset(0xF2F9B820E9F09FF), LazyThreadSafetyMode.None); + public ref CUtlVector LocalSequenceNameArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF2F9B820E9F09FF)); + get => ref _Handle.AsRef>(_LocalSequenceNameArrayOffset.Value); } + private static readonly Lazy _LocalS1SeqDescArrayOffset = new(() => Schema.GetOffset(0xF2F9B828BEF5ECB), LazyThreadSafetyMode.None); + public ref CUtlVector LocalS1SeqDescArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF2F9B828BEF5ECB)); + get => ref _Handle.AsRef>(_LocalS1SeqDescArrayOffset.Value); } + private static readonly Lazy _LocalMultiSeqDescArrayOffset = new(() => Schema.GetOffset(0xF2F9B82DC0E5EC6), LazyThreadSafetyMode.None); + public ref CUtlVector LocalMultiSeqDescArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF2F9B82DC0E5EC6)); + get => ref _Handle.AsRef>(_LocalMultiSeqDescArrayOffset.Value); } + private static readonly Lazy _LocalSynthAnimDescArrayOffset = new(() => Schema.GetOffset(0xF2F9B82BD6C1F83), LazyThreadSafetyMode.None); + public ref CUtlVector LocalSynthAnimDescArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF2F9B82BD6C1F83)); + get => ref _Handle.AsRef>(_LocalSynthAnimDescArrayOffset.Value); } + private static readonly Lazy _LocalCmdSeqDescArrayOffset = new(() => Schema.GetOffset(0xF2F9B822371FDAB), LazyThreadSafetyMode.None); + public ref CUtlVector LocalCmdSeqDescArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF2F9B822371FDAB)); + get => ref _Handle.AsRef>(_LocalCmdSeqDescArrayOffset.Value); } + private static readonly Lazy _LocalBoneMaskArrayOffset = new(() => Schema.GetOffset(0xF2F9B82C880268F), LazyThreadSafetyMode.None); + public ref CUtlVector LocalBoneMaskArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF2F9B82C880268F)); + get => ref _Handle.AsRef>(_LocalBoneMaskArrayOffset.Value); } + private static readonly Lazy _LocalScaleSetArrayOffset = new(() => Schema.GetOffset(0xF2F9B8241FDCDAB), LazyThreadSafetyMode.None); + public ref CUtlVector LocalScaleSetArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF2F9B8241FDCDAB)); + get => ref _Handle.AsRef>(_LocalScaleSetArrayOffset.Value); } + private static readonly Lazy _LocalBoneNameArrayOffset = new(() => Schema.GetOffset(0xF2F9B82B86CAC56), LazyThreadSafetyMode.None); + public ref CUtlVector LocalBoneNameArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF2F9B82B86CAC56)); + get => ref _Handle.AsRef>(_LocalBoneNameArrayOffset.Value); } + private static readonly Lazy _LocalNodeNameOffset = new(() => Schema.GetOffset(0xF2F9B82EDCB530F), LazyThreadSafetyMode.None); + public ref CBufferString LocalNodeName { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2F9B82EDCB530F)); + get => ref _Handle.AsRef(_LocalNodeNameOffset.Value); } + private static readonly Lazy _LocalPoseParamArrayOffset = new(() => Schema.GetOffset(0xF2F9B82FF654A73), LazyThreadSafetyMode.None); + public ref CUtlVector LocalPoseParamArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF2F9B82FF654A73)); + get => ref _Handle.AsRef>(_LocalPoseParamArrayOffset.Value); } + private static readonly Lazy _KeyValuesOffset = new(() => Schema.GetOffset(0xF2F9B8221578BC2), LazyThreadSafetyMode.None); + public SchemaUntypedField KeyValues { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xF2F9B8221578BC2)); + get => new SchemaUntypedField(_Handle + _KeyValuesOffset.Value); } + private static readonly Lazy _LocalIKAutoplayLockArrayOffset = new(() => Schema.GetOffset(0xF2F9B82AD4D3FFB), LazyThreadSafetyMode.None); + public ref CUtlVector LocalIKAutoplayLockArray { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF2F9B82AD4D3FFB)); + get => ref _Handle.AsRef>(_LocalIKAutoplayLockArrayOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceTagSpansImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceTagSpansImpl.cs index 4d673457f..b7f1a9a17 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceTagSpansImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceTagSpansImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CSequenceTagSpansImpl : SchemaClass, CSequenceTagSpans { public CSequenceTagSpansImpl(nint handle) : base(handle) { } + private static readonly Lazy _SequenceNameOffset = new(() => Schema.GetOffset(0x132BFE6A7462AF30), LazyThreadSafetyMode.None); + public ref CGlobalSymbol SequenceName { - get => ref _Handle.AsRef(Schema.GetOffset(0x132BFE6A7462AF30)); + get => ref _Handle.AsRef(_SequenceNameOffset.Value); } + private static readonly Lazy _TagsOffset = new(() => Schema.GetOffset(0x132BFE6AB46C8540), LazyThreadSafetyMode.None); + public ref CUtlVector Tags { - get => ref _Handle.AsRef>(Schema.GetOffset(0x132BFE6AB46C8540)); + get => ref _Handle.AsRef>(_TagsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceUpdateNodeBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceUpdateNodeBaseImpl.cs index 1dcbe488c..5e54ed894 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceUpdateNodeBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceUpdateNodeBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CSequenceUpdateNodeBaseImpl : CLeafUpdateNodeImpl, CSeque public CSequenceUpdateNodeBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _PlaybackSpeedOffset = new(() => Schema.GetOffset(0x6FCA4DDB1AFA7387), LazyThreadSafetyMode.None); + public ref float PlaybackSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x6FCA4DDB1AFA7387)); + get => ref _Handle.AsRef(_PlaybackSpeedOffset.Value); } + private static readonly Lazy _LoopOffset = new(() => Schema.GetOffset(0x6FCA4DDBC668A4CB), LazyThreadSafetyMode.None); + public ref bool Loop { - get => ref _Handle.AsRef(Schema.GetOffset(0x6FCA4DDBC668A4CB)); + get => ref _Handle.AsRef(_LoopOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceUpdateNodeImpl.cs index 65ac22b30..0cb1ee0b1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSequenceUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CSequenceUpdateNodeImpl : CSequenceUpdateNodeBaseImpl, CS public CSequenceUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _SequenceOffset = new(() => Schema.GetOffset(0xB5F91396E0A0598E), LazyThreadSafetyMode.None); + public HSequence Sequence { - get => new HSequenceImpl(_Handle + Schema.GetOffset(0xB5F91396E0A0598E)); + get => new HSequenceImpl(_Handle + _SequenceOffset.Value); } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0xB5F913963D9FF5AD), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5F913963D9FF5AD)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _ParamSpansOffset = new(() => Schema.GetOffset(0xB5F91396DAC91553), LazyThreadSafetyMode.None); + public CParamSpanUpdater ParamSpans { - get => new CParamSpanUpdaterImpl(_Handle + Schema.GetOffset(0xB5F91396DAC91553)); + get => new CParamSpanUpdaterImpl(_Handle + _ParamSpansOffset.Value); } + private static readonly Lazy _TagsOffset = new(() => Schema.GetOffset(0xB5F91396B46C8540), LazyThreadSafetyMode.None); + public ref CUtlVector Tags { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB5F91396B46C8540)); + get => ref _Handle.AsRef>(_TagsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CServerOnlyEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CServerOnlyEntityImpl.cs index 56e9628b3..c38468a82 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CServerOnlyEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CServerOnlyEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CServerOnlyModelEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CServerOnlyModelEntityImpl.cs index 2564b39f4..c7277d5e8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CServerOnlyModelEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CServerOnlyModelEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CServerOnlyPointEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CServerOnlyPointEntityImpl.cs index 63c37ce02..1282801cb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CServerOnlyPointEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CServerOnlyPointEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CServerRagdollTriggerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CServerRagdollTriggerImpl.cs index 81a88525a..150faf317 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CServerRagdollTriggerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CServerRagdollTriggerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSetParameterActionUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSetParameterActionUpdaterImpl.cs index d76478e3d..119587070 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSetParameterActionUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSetParameterActionUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CSetParameterActionUpdaterImpl : CAnimActionUpdaterImpl, public CSetParameterActionUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParamOffset = new(() => Schema.GetOffset(0x2CC56544679286A4), LazyThreadSafetyMode.None); + public CAnimParamHandle Param { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x2CC56544679286A4)); + get => new CAnimParamHandleImpl(_Handle + _ParamOffset.Value); } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x2CC565446B99AEEA), LazyThreadSafetyMode.None); + public SchemaUntypedField Value { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x2CC565446B99AEEA)); + get => new SchemaUntypedField(_Handle + _ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CShatterGlassShardImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CShatterGlassShardImpl.cs index 1601e3f80..9b06fba8d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CShatterGlassShardImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CShatterGlassShardImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,89 +17,145 @@ internal partial class CShatterGlassShardImpl : SchemaClass, CShatterGlassShard public CShatterGlassShardImpl(nint handle) : base(handle) { } + private static readonly Lazy _ShardHandleOffset = new(() => Schema.GetOffset(0x1350BEC3018E384F), LazyThreadSafetyMode.None); + public ref uint ShardHandle { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC3018E384F)); + get => ref _Handle.AsRef(_ShardHandleOffset.Value); } + private static readonly Lazy _PanelVerticesOffset = new(() => Schema.GetOffset(0x1350BEC349BB3ECE), LazyThreadSafetyMode.None); + public ref CUtlVector PanelVertices { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1350BEC349BB3ECE)); + get => ref _Handle.AsRef>(_PanelVerticesOffset.Value); } + private static readonly Lazy _LocalPanelSpaceOriginOffset = new(() => Schema.GetOffset(0x1350BEC3D2F782FE), LazyThreadSafetyMode.None); + public ref Vector2D LocalPanelSpaceOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC3D2F782FE)); + get => ref _Handle.AsRef(_LocalPanelSpaceOriginOffset.Value); } + private static readonly Lazy _ModelOffset = new(() => Schema.GetOffset(0x1350BEC3E100C814), LazyThreadSafetyMode.None); + public ref CStrongHandle Model { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1350BEC3E100C814)); + get => ref _Handle.AsRef>(_ModelOffset.Value); } + private static readonly Lazy _PhysicsEntityOffset = new(() => Schema.GetOffset(0x1350BEC396EA280F), LazyThreadSafetyMode.None); + public ref CHandle PhysicsEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1350BEC396EA280F)); + get => ref _Handle.AsRef>(_PhysicsEntityOffset.Value); } + private static readonly Lazy _ParentPanelOffset = new(() => Schema.GetOffset(0x1350BEC3385216AF), LazyThreadSafetyMode.None); + public ref CHandle ParentPanel { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1350BEC3385216AF)); + get => ref _Handle.AsRef>(_ParentPanelOffset.Value); } + private static readonly Lazy _ParentShardOffset = new(() => Schema.GetOffset(0x1350BEC3E3717B41), LazyThreadSafetyMode.None); + public ref uint ParentShard { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC3E3717B41)); + get => ref _Handle.AsRef(_ParentShardOffset.Value); } + private static readonly Lazy _ShatterStressTypeOffset = new(() => Schema.GetOffset(0x1350BEC300D3667A), LazyThreadSafetyMode.None); + public ref ShatterGlassStressType ShatterStressType { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC300D3667A)); + get => ref _Handle.AsRef(_ShatterStressTypeOffset.Value); } + private static readonly Lazy _StressVelocityOffset = new(() => Schema.GetOffset(0x1350BEC3A4B62C52), LazyThreadSafetyMode.None); + public ref Vector StressVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC3A4B62C52)); + get => ref _Handle.AsRef(_StressVelocityOffset.Value); } + private static readonly Lazy _CreatedModelOffset = new(() => Schema.GetOffset(0x1350BEC3CC206618), LazyThreadSafetyMode.None); + public ref bool CreatedModel { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC3CC206618)); + get => ref _Handle.AsRef(_CreatedModelOffset.Value); } + private static readonly Lazy _LongestEdgeOffset = new(() => Schema.GetOffset(0x1350BEC3B6906D8E), LazyThreadSafetyMode.None); + public ref float LongestEdge { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC3B6906D8E)); + get => ref _Handle.AsRef(_LongestEdgeOffset.Value); } + private static readonly Lazy _ShortestEdgeOffset = new(() => Schema.GetOffset(0x1350BEC30012FB38), LazyThreadSafetyMode.None); + public ref float ShortestEdge { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC30012FB38)); + get => ref _Handle.AsRef(_ShortestEdgeOffset.Value); } + private static readonly Lazy _LongestAcrossOffset = new(() => Schema.GetOffset(0x1350BEC398AEE1F6), LazyThreadSafetyMode.None); + public ref float LongestAcross { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC398AEE1F6)); + get => ref _Handle.AsRef(_LongestAcrossOffset.Value); } + private static readonly Lazy _ShortestAcrossOffset = new(() => Schema.GetOffset(0x1350BEC3A14E5348), LazyThreadSafetyMode.None); + public ref float ShortestAcross { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC3A14E5348)); + get => ref _Handle.AsRef(_ShortestAcrossOffset.Value); } + private static readonly Lazy _SumOfAllEdgesOffset = new(() => Schema.GetOffset(0x1350BEC31E8C597C), LazyThreadSafetyMode.None); + public ref float SumOfAllEdges { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC31E8C597C)); + get => ref _Handle.AsRef(_SumOfAllEdgesOffset.Value); } + private static readonly Lazy _AreaOffset = new(() => Schema.GetOffset(0x1350BEC3623D1622), LazyThreadSafetyMode.None); + public ref float Area { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC3623D1622)); + get => ref _Handle.AsRef(_AreaOffset.Value); } + private static readonly Lazy _OnFrameEdgeOffset = new(() => Schema.GetOffset(0x1350BEC34F0A3650), LazyThreadSafetyMode.None); + public ref OnFrame OnFrameEdge { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC34F0A3650)); + get => ref _Handle.AsRef(_OnFrameEdgeOffset.Value); } + private static readonly Lazy _SubShardGenerationOffset = new(() => Schema.GetOffset(0x1350BEC34106ACCD), LazyThreadSafetyMode.None); + public ref int SubShardGeneration { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC34106ACCD)); + get => ref _Handle.AsRef(_SubShardGenerationOffset.Value); } + private static readonly Lazy _AverageVertPositionOffset = new(() => Schema.GetOffset(0x1350BEC302B48078), LazyThreadSafetyMode.None); + public ref Vector2D AverageVertPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC302B48078)); + get => ref _Handle.AsRef(_AverageVertPositionOffset.Value); } + private static readonly Lazy _AverageVertPositionIsValidOffset = new(() => Schema.GetOffset(0x1350BEC33261C872), LazyThreadSafetyMode.None); + public ref bool AverageVertPositionIsValid { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC33261C872)); + get => ref _Handle.AsRef(_AverageVertPositionIsValidOffset.Value); } + private static readonly Lazy _PanelSpaceStressPositionAOffset = new(() => Schema.GetOffset(0x1350BEC34DFDAE31), LazyThreadSafetyMode.None); + public ref Vector2D PanelSpaceStressPositionA { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC34DFDAE31)); + get => ref _Handle.AsRef(_PanelSpaceStressPositionAOffset.Value); } + private static readonly Lazy _PanelSpaceStressPositionBOffset = new(() => Schema.GetOffset(0x1350BEC34AFDA978), LazyThreadSafetyMode.None); + public ref Vector2D PanelSpaceStressPositionB { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC34AFDA978)); + get => ref _Handle.AsRef(_PanelSpaceStressPositionBOffset.Value); } + private static readonly Lazy _StressPositionAIsValidOffset = new(() => Schema.GetOffset(0x1350BEC39B0D4BAD), LazyThreadSafetyMode.None); + public ref bool StressPositionAIsValid { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC39B0D4BAD)); + get => ref _Handle.AsRef(_StressPositionAIsValidOffset.Value); } + private static readonly Lazy _StressPositionBIsValidOffset = new(() => Schema.GetOffset(0x1350BEC32AC62BB2), LazyThreadSafetyMode.None); + public ref bool StressPositionBIsValid { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC32AC62BB2)); + get => ref _Handle.AsRef(_StressPositionBIsValidOffset.Value); } + private static readonly Lazy _FlaggedForRemovalOffset = new(() => Schema.GetOffset(0x1350BEC35D1816FC), LazyThreadSafetyMode.None); + public ref bool FlaggedForRemoval { - get => ref _Handle.AsRef(Schema.GetOffset(0x1350BEC35D1816FC)); + get => ref _Handle.AsRef(_FlaggedForRemovalOffset.Value); } + private static readonly Lazy _PhysicsEntitySpawnedAtTimeOffset = new(() => Schema.GetOffset(0x1350BEC3AA81B16F), LazyThreadSafetyMode.None); + public GameTime_t PhysicsEntitySpawnedAtTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x1350BEC3AA81B16F)); + get => new GameTime_tImpl(_Handle + _PhysicsEntitySpawnedAtTimeOffset.Value); } + private static readonly Lazy _EntityHittingMeOffset = new(() => Schema.GetOffset(0x1350BEC3820AF257), LazyThreadSafetyMode.None); + public ref CHandle EntityHittingMe { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1350BEC3820AF257)); + get => ref _Handle.AsRef>(_EntityHittingMeOffset.Value); } + private static readonly Lazy _NeighborsOffset = new(() => Schema.GetOffset(0x1350BEC3622F1068), LazyThreadSafetyMode.None); + public ref CUtlVector Neighbors { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1350BEC3622F1068)); + get => ref _Handle.AsRef>(_NeighborsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CShatterGlassShardPhysicsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CShatterGlassShardPhysicsImpl.cs index 6e76f0131..fb39d2242 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CShatterGlassShardPhysicsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CShatterGlassShardPhysicsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CShatterGlassShardPhysicsImpl : CPhysicsPropImpl, CShatte public CShatterGlassShardPhysicsImpl(nint handle) : base(handle) { } + private static readonly Lazy _DebrisOffset = new(() => Schema.GetOffset(0xC24E779865054BBA), LazyThreadSafetyMode.None); + public ref bool Debris { - get => ref _Handle.AsRef(Schema.GetOffset(0xC24E779865054BBA)); + get => ref _Handle.AsRef(_DebrisOffset.Value); } + private static readonly Lazy _ParentShardOffset = new(() => Schema.GetOffset(0xC24E7798E3717B41), LazyThreadSafetyMode.None); + public ref uint ParentShard { - get => ref _Handle.AsRef(Schema.GetOffset(0xC24E7798E3717B41)); + get => ref _Handle.AsRef(_ParentShardOffset.Value); } + private static readonly Lazy _ShardDescOffset = new(() => Schema.GetOffset(0xC24E77982CBF17C6), LazyThreadSafetyMode.None); + public shard_model_desc_t ShardDesc { - get => new shard_model_desc_tImpl(_Handle + Schema.GetOffset(0xC24E77982CBF17C6)); + get => new shard_model_desc_tImpl(_Handle + _ShardDescOffset.Value); } public void ShardDescUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CShowerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CShowerImpl.cs index 4b4e25400..52d62a9ff 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CShowerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CShowerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSimTimerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSimTimerImpl.cs index 4de192ef5..b912a6726 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSimTimerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSimTimerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CSimTimerImpl : CSimpleSimTimerImpl, CSimTimer { public CSimTimerImpl(nint handle) : base(handle) { } + private static readonly Lazy _IntervalOffset = new(() => Schema.GetOffset(0xB9B19F86320F7B8E), LazyThreadSafetyMode.None); + public ref float Interval { - get => ref _Handle.AsRef(Schema.GetOffset(0xB9B19F86320F7B8E)); + get => ref _Handle.AsRef(_IntervalOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSimpleMarkupVolumeTaggedImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSimpleMarkupVolumeTaggedImpl.cs index a3a8bcd01..2ad451a22 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSimpleMarkupVolumeTaggedImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSimpleMarkupVolumeTaggedImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSimpleSimTimerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSimpleSimTimerImpl.cs index 542155fa6..5cf4a23b3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSimpleSimTimerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSimpleSimTimerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CSimpleSimTimerImpl : SchemaClass, CSimpleSimTimer { public CSimpleSimTimerImpl(nint handle) : base(handle) { } + private static readonly Lazy _NextOffset = new(() => Schema.GetOffset(0x4169D31C3BE2574E), LazyThreadSafetyMode.None); + public GameTime_t Next { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x4169D31C3BE2574E)); + get => new GameTime_tImpl(_Handle + _NextOffset.Value); } + private static readonly Lazy _WorldGroupIdOffset = new(() => Schema.GetOffset(0x4169D31C7414B193), LazyThreadSafetyMode.None); + public ref uint WorldGroupId { - get => ref _Handle.AsRef(Schema.GetOffset(0x4169D31C7414B193)); + get => ref _Handle.AsRef(_WorldGroupIdOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSimpleStopwatchImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSimpleStopwatchImpl.cs index 8ad8d7b4f..9cca969b9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSimpleStopwatchImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSimpleStopwatchImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSingleFrameUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSingleFrameUpdateNodeImpl.cs index a263f1d4e..30bc64848 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSingleFrameUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSingleFrameUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CSingleFrameUpdateNodeImpl : CLeafUpdateNodeImpl, CSingle public CSingleFrameUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _ActionsOffset = new(() => Schema.GetOffset(0x5A65D6168D622684), LazyThreadSafetyMode.None); + public ref CUtlVector Actions { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5A65D6168D622684)); + get => ref _Handle.AsRef>(_ActionsOffset.Value); } + private static readonly Lazy _PoseCacheHandleOffset = new(() => Schema.GetOffset(0x5A65D6164719447A), LazyThreadSafetyMode.None); + public CPoseHandle PoseCacheHandle { - get => new CPoseHandleImpl(_Handle + Schema.GetOffset(0x5A65D6164719447A)); + get => new CPoseHandleImpl(_Handle + _PoseCacheHandleOffset.Value); } + private static readonly Lazy _SequenceOffset = new(() => Schema.GetOffset(0x5A65D616E0A0598E), LazyThreadSafetyMode.None); + public HSequence Sequence { - get => new HSequenceImpl(_Handle + Schema.GetOffset(0x5A65D616E0A0598E)); + get => new HSequenceImpl(_Handle + _SequenceOffset.Value); } + private static readonly Lazy _CycleOffset = new(() => Schema.GetOffset(0x5A65D6160C77829F), LazyThreadSafetyMode.None); + public ref float Cycle { - get => ref _Handle.AsRef(Schema.GetOffset(0x5A65D6160C77829F)); + get => ref _Handle.AsRef(_CycleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSingleplayRulesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSingleplayRulesImpl.cs index 816cfca24..ae81e7155 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSingleplayRulesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSingleplayRulesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CSingleplayRulesImpl : CGameRulesImpl, CSingleplayRules { public CSingleplayRulesImpl(nint handle) : base(handle) { } + private static readonly Lazy _SinglePlayerGameEndingOffset = new(() => Schema.GetOffset(0x633D071BAD9EAF1D), LazyThreadSafetyMode.None); + public ref bool SinglePlayerGameEnding { - get => ref _Handle.AsRef(Schema.GetOffset(0x633D071BAD9EAF1D)); + get => ref _Handle.AsRef(_SinglePlayerGameEndingOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkeletonAnimationControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkeletonAnimationControllerImpl.cs index abaeeb500..d5d958610 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkeletonAnimationControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkeletonAnimationControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,9 +17,11 @@ internal partial class CSkeletonAnimationControllerImpl : ISkeletonAnimationCont public CSkeletonAnimationControllerImpl(nint handle) : base(handle) { } + private static readonly Lazy _SkeletonInstanceOffset = new(() => Schema.GetOffset(0x47164D01F28853), LazyThreadSafetyMode.None); + public CSkeletonInstance? SkeletonInstance { get { - var ptr = _Handle.Read(Schema.GetOffset(0x47164D01F28853)); + var ptr = _Handle.Read(_SkeletonInstanceOffset.Value); return ptr.IsValidPtr() ? new CSkeletonInstanceImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkeletonInstanceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkeletonInstanceImpl.cs index e7c8327aa..ff5749455 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkeletonInstanceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkeletonInstanceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CSkeletonInstanceImpl : CGameSceneNodeImpl, CSkeletonInst public CSkeletonInstanceImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModelStateOffset = new(() => Schema.GetOffset(0xD6C6252E52AC8C4F), LazyThreadSafetyMode.None); + public CModelState ModelState { - get => new CModelStateImpl(_Handle + Schema.GetOffset(0xD6C6252E52AC8C4F)); + get => new CModelStateImpl(_Handle + _ModelStateOffset.Value); } + private static readonly Lazy _IsAnimationEnabledOffset = new(() => Schema.GetOffset(0xD6C6252E44F0C816), LazyThreadSafetyMode.None); + public ref bool IsAnimationEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6C6252E44F0C816)); + get => ref _Handle.AsRef(_IsAnimationEnabledOffset.Value); } + private static readonly Lazy _UseParentRenderBoundsOffset = new(() => Schema.GetOffset(0xD6C6252E15B8267D), LazyThreadSafetyMode.None); + public ref bool UseParentRenderBounds { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6C6252E15B8267D)); + get => ref _Handle.AsRef(_UseParentRenderBoundsOffset.Value); } + private static readonly Lazy _DisableSolidCollisionsForHierarchyOffset = new(() => Schema.GetOffset(0xD6C6252E50FCF465), LazyThreadSafetyMode.None); + public ref bool DisableSolidCollisionsForHierarchy { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6C6252E50FCF465)); + get => ref _Handle.AsRef(_DisableSolidCollisionsForHierarchyOffset.Value); } + private static readonly Lazy _DirtyMotionTypeOffset = new(() => Schema.GetOffset(0xD6C6252E6EB99391), LazyThreadSafetyMode.None); + public SchemaUntypedField DirtyMotionType { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD6C6252E6EB99391)); + get => new SchemaUntypedField(_Handle + _DirtyMotionTypeOffset.Value); } + private static readonly Lazy _IsGeneratingLatchedParentSpaceStateOffset = new(() => Schema.GetOffset(0xD6C6252ED0EFEAB7), LazyThreadSafetyMode.None); + public SchemaUntypedField IsGeneratingLatchedParentSpaceState { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD6C6252ED0EFEAB7)); + get => new SchemaUntypedField(_Handle + _IsGeneratingLatchedParentSpaceStateOffset.Value); } + private static readonly Lazy _MaterialGroupOffset = new(() => Schema.GetOffset(0xD6C6252E2B778F03), LazyThreadSafetyMode.None); + public ref CUtlStringToken MaterialGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6C6252E2B778F03)); + get => ref _Handle.AsRef(_MaterialGroupOffset.Value); } + private static readonly Lazy _HitboxSetOffset = new(() => Schema.GetOffset(0xD6C6252E80C42271), LazyThreadSafetyMode.None); + public ref byte HitboxSet { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6C6252E80C42271)); + get => ref _Handle.AsRef(_HitboxSetOffset.Value); } public void ModelStateUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkillDamageImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkillDamageImpl.cs index a92103aa5..24fc9296d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkillDamageImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkillDamageImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CSkillDamageImpl : SchemaClass, CSkillDamage { public CSkillDamageImpl(nint handle) : base(handle) { } + private static readonly Lazy _DamageOffset = new(() => Schema.GetOffset(0x6A323D82DC60E53E), LazyThreadSafetyMode.None); + public CSkillFloat Damage { - get => new CSkillFloatImpl(_Handle + Schema.GetOffset(0x6A323D82DC60E53E)); + get => new CSkillFloatImpl(_Handle + _DamageOffset.Value); } + private static readonly Lazy _NPCDamageScalarVsNPCOffset = new(() => Schema.GetOffset(0x6A323D82FD135437), LazyThreadSafetyMode.None); + public ref float NPCDamageScalarVsNPC { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A323D82FD135437)); + get => ref _Handle.AsRef(_NPCDamageScalarVsNPCOffset.Value); } + private static readonly Lazy _PhysicsForceDamageOffset = new(() => Schema.GetOffset(0x6A323D8219E7630E), LazyThreadSafetyMode.None); + public ref float PhysicsForceDamage { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A323D8219E7630E)); + get => ref _Handle.AsRef(_PhysicsForceDamageOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkillFloatImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkillFloatImpl.cs index f3927999e..d68559e8b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkillFloatImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkillFloatImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkillIntImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkillIntImpl.cs index 72023af36..56b78b6f6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkillIntImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkillIntImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkyCameraImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkyCameraImpl.cs index 998ac5691..35dd5b4c2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkyCameraImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkyCameraImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,26 @@ internal partial class CSkyCameraImpl : CBaseEntityImpl, CSkyCamera { public CSkyCameraImpl(nint handle) : base(handle) { } + private static readonly Lazy _SkyboxDataOffset = new(() => Schema.GetOffset(0xCD44EF44CDA0772B), LazyThreadSafetyMode.None); + public sky3dparams_t SkyboxData { - get => new sky3dparams_tImpl(_Handle + Schema.GetOffset(0xCD44EF44CDA0772B)); + get => new sky3dparams_tImpl(_Handle + _SkyboxDataOffset.Value); } + private static readonly Lazy _SkyboxSlotTokenOffset = new(() => Schema.GetOffset(0xCD44EF44413FD3A4), LazyThreadSafetyMode.None); + public ref CUtlStringToken SkyboxSlotToken { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD44EF44413FD3A4)); + get => ref _Handle.AsRef(_SkyboxSlotTokenOffset.Value); } + private static readonly Lazy _UseAnglesOffset = new(() => Schema.GetOffset(0xCD44EF44434C3DB4), LazyThreadSafetyMode.None); + public ref bool UseAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD44EF44434C3DB4)); + get => ref _Handle.AsRef(_UseAnglesOffset.Value); } + private static readonly Lazy _NextOffset = new(() => Schema.GetOffset(0xCD44EF4432B11E0E), LazyThreadSafetyMode.None); + public CSkyCamera? Next { get { - var ptr = _Handle.Read(Schema.GetOffset(0xCD44EF4432B11E0E)); + var ptr = _Handle.Read(_NextOffset.Value); return ptr.IsValidPtr() ? new CSkyCameraImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkyboxReferenceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkyboxReferenceImpl.cs index 52ee83e43..cd54deeaf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkyboxReferenceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSkyboxReferenceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CSkyboxReferenceImpl : CBaseEntityImpl, CSkyboxReference public CSkyboxReferenceImpl(nint handle) : base(handle) { } + private static readonly Lazy _WorldGroupIdOffset = new(() => Schema.GetOffset(0x98809790BECFAC7), LazyThreadSafetyMode.None); + public ref uint WorldGroupId { - get => ref _Handle.AsRef(Schema.GetOffset(0x98809790BECFAC7)); + get => ref _Handle.AsRef(_WorldGroupIdOffset.Value); } + private static readonly Lazy _SkyCameraOffset = new(() => Schema.GetOffset(0x988097906BB5B33), LazyThreadSafetyMode.None); + public ref CHandle SkyCamera { - get => ref _Handle.AsRef>(Schema.GetOffset(0x988097906BB5B33)); + get => ref _Handle.AsRef>(_SkyCameraOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSlopeComponentUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSlopeComponentUpdaterImpl.cs index 9d4712b67..8cbd9adfd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSlopeComponentUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSlopeComponentUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CSlopeComponentUpdaterImpl : CAnimComponentUpdaterImpl, C public CSlopeComponentUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _TraceDistanceOffset = new(() => Schema.GetOffset(0xC0FC4829B2F3B0F7), LazyThreadSafetyMode.None); + public ref float TraceDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0FC4829B2F3B0F7)); + get => ref _Handle.AsRef(_TraceDistanceOffset.Value); } + private static readonly Lazy _SlopeAngleOffset = new(() => Schema.GetOffset(0xC0FC4829ED49556D), LazyThreadSafetyMode.None); + public CAnimParamHandle SlopeAngle { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xC0FC4829ED49556D)); + get => new CAnimParamHandleImpl(_Handle + _SlopeAngleOffset.Value); } + private static readonly Lazy _SlopeAngleFrontOffset = new(() => Schema.GetOffset(0xC0FC48291ED54070), LazyThreadSafetyMode.None); + public CAnimParamHandle SlopeAngleFront { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xC0FC48291ED54070)); + get => new CAnimParamHandleImpl(_Handle + _SlopeAngleFrontOffset.Value); } + private static readonly Lazy _SlopeAngleSideOffset = new(() => Schema.GetOffset(0xC0FC4829E6ADA076), LazyThreadSafetyMode.None); + public CAnimParamHandle SlopeAngleSide { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xC0FC4829E6ADA076)); + get => new CAnimParamHandleImpl(_Handle + _SlopeAngleSideOffset.Value); } + private static readonly Lazy _SlopeHeadingOffset = new(() => Schema.GetOffset(0xC0FC482945A85028), LazyThreadSafetyMode.None); + public CAnimParamHandle SlopeHeading { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xC0FC482945A85028)); + get => new CAnimParamHandleImpl(_Handle + _SlopeHeadingOffset.Value); } + private static readonly Lazy _SlopeNormalOffset = new(() => Schema.GetOffset(0xC0FC48292A185DE5), LazyThreadSafetyMode.None); + public CAnimParamHandle SlopeNormal { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xC0FC48292A185DE5)); + get => new CAnimParamHandleImpl(_Handle + _SlopeNormalOffset.Value); } + private static readonly Lazy _SlopeNormal_WorldSpaceOffset = new(() => Schema.GetOffset(0xC0FC48290CCD648C), LazyThreadSafetyMode.None); + public CAnimParamHandle SlopeNormal_WorldSpace { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xC0FC48290CCD648C)); + get => new CAnimParamHandleImpl(_Handle + _SlopeNormal_WorldSpaceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSlowDownOnSlopesUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSlowDownOnSlopesUpdateNodeImpl.cs index b6f78a1ef..a07698dac 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSlowDownOnSlopesUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSlowDownOnSlopesUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CSlowDownOnSlopesUpdateNodeImpl : CUnaryUpdateNodeImpl, C public CSlowDownOnSlopesUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _SlowDownStrengthOffset = new(() => Schema.GetOffset(0x196FB4938D85E247), LazyThreadSafetyMode.None); + public ref float SlowDownStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x196FB4938D85E247)); + get => ref _Handle.AsRef(_SlowDownStrengthOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSmokeGrenadeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSmokeGrenadeImpl.cs index 158643292..3ea3e1416 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSmokeGrenadeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSmokeGrenadeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSmokeGrenadeProjectileImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSmokeGrenadeProjectileImpl.cs index 316024046..39a939c1c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSmokeGrenadeProjectileImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSmokeGrenadeProjectileImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,65 @@ internal partial class CSmokeGrenadeProjectileImpl : CBaseCSGrenadeProjectileImp public CSmokeGrenadeProjectileImpl(nint handle) : base(handle) { } + private static readonly Lazy _SmokeEffectTickBeginOffset = new(() => Schema.GetOffset(0xE31DC1B8F5A25253), LazyThreadSafetyMode.None); + public ref int SmokeEffectTickBegin { - get => ref _Handle.AsRef(Schema.GetOffset(0xE31DC1B8F5A25253)); + get => ref _Handle.AsRef(_SmokeEffectTickBeginOffset.Value); } + private static readonly Lazy _DidSmokeEffectOffset = new(() => Schema.GetOffset(0xE31DC1B881A8B092), LazyThreadSafetyMode.None); + public ref bool DidSmokeEffect { - get => ref _Handle.AsRef(Schema.GetOffset(0xE31DC1B881A8B092)); + get => ref _Handle.AsRef(_DidSmokeEffectOffset.Value); } + private static readonly Lazy _RandomSeedOffset = new(() => Schema.GetOffset(0xE31DC1B86388F067), LazyThreadSafetyMode.None); + public ref int RandomSeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xE31DC1B86388F067)); + get => ref _Handle.AsRef(_RandomSeedOffset.Value); } + private static readonly Lazy _SmokeColorOffset = new(() => Schema.GetOffset(0xE31DC1B87808EA9D), LazyThreadSafetyMode.None); + public ref Vector SmokeColor { - get => ref _Handle.AsRef(Schema.GetOffset(0xE31DC1B87808EA9D)); + get => ref _Handle.AsRef(_SmokeColorOffset.Value); } + private static readonly Lazy _SmokeDetonationPosOffset = new(() => Schema.GetOffset(0xE31DC1B8743595D7), LazyThreadSafetyMode.None); + public ref Vector SmokeDetonationPos { - get => ref _Handle.AsRef(Schema.GetOffset(0xE31DC1B8743595D7)); + get => ref _Handle.AsRef(_SmokeDetonationPosOffset.Value); } + private static readonly Lazy _VoxelFrameDataOffset = new(() => Schema.GetOffset(0xE31DC1B8E854C6C4), LazyThreadSafetyMode.None); + public ref CUtlVector VoxelFrameData { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE31DC1B8E854C6C4)); + get => ref _Handle.AsRef>(_VoxelFrameDataOffset.Value); } + private static readonly Lazy _VoxelFrameDataSizeOffset = new(() => Schema.GetOffset(0xE31DC1B8369FBFD9), LazyThreadSafetyMode.None); + public ref int VoxelFrameDataSize { - get => ref _Handle.AsRef(Schema.GetOffset(0xE31DC1B8369FBFD9)); + get => ref _Handle.AsRef(_VoxelFrameDataSizeOffset.Value); } + private static readonly Lazy _VoxelUpdateOffset = new(() => Schema.GetOffset(0xE31DC1B8EE30DA3A), LazyThreadSafetyMode.None); + public ref int VoxelUpdate { - get => ref _Handle.AsRef(Schema.GetOffset(0xE31DC1B8EE30DA3A)); + get => ref _Handle.AsRef(_VoxelUpdateOffset.Value); } + private static readonly Lazy _LastBounceOffset = new(() => Schema.GetOffset(0xE31DC1B8A4A556A7), LazyThreadSafetyMode.None); + public GameTime_t LastBounce { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xE31DC1B8A4A556A7)); + get => new GameTime_tImpl(_Handle + _LastBounceOffset.Value); } + private static readonly Lazy _FllastSimulationTimeOffset = new(() => Schema.GetOffset(0xE31DC1B8F56D1EED), LazyThreadSafetyMode.None); + public GameTime_t FllastSimulationTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xE31DC1B8F56D1EED)); + get => new GameTime_tImpl(_Handle + _FllastSimulationTimeOffset.Value); } + private static readonly Lazy _ExplodeFromInfernoOffset = new(() => Schema.GetOffset(0xE31DC1B879437D79), LazyThreadSafetyMode.None); + public ref bool ExplodeFromInferno { - get => ref _Handle.AsRef(Schema.GetOffset(0xE31DC1B879437D79)); + get => ref _Handle.AsRef(_ExplodeFromInfernoOffset.Value); } + private static readonly Lazy _DidGroundScorchOffset = new(() => Schema.GetOffset(0xE31DC1B80AD64DF5), LazyThreadSafetyMode.None); + public ref bool DidGroundScorch { - get => ref _Handle.AsRef(Schema.GetOffset(0xE31DC1B80AD64DF5)); + get => ref _Handle.AsRef(_DidGroundScorchOffset.Value); } public void SmokeEffectTickBeginUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSmoothFuncImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSmoothFuncImpl.cs index 0e8239b55..52e0ca59f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSmoothFuncImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSmoothFuncImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CSmoothFuncImpl : SchemaClass, CSmoothFunc { public CSmoothFuncImpl(nint handle) : base(handle) { } + private static readonly Lazy _SmoothAmplitudeOffset = new(() => Schema.GetOffset(0x4C3907DAAB831D3A), LazyThreadSafetyMode.None); + public ref float SmoothAmplitude { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C3907DAAB831D3A)); + get => ref _Handle.AsRef(_SmoothAmplitudeOffset.Value); } + private static readonly Lazy _SmoothBiasOffset = new(() => Schema.GetOffset(0x4C3907DA8DF7120C), LazyThreadSafetyMode.None); + public ref float SmoothBias { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C3907DA8DF7120C)); + get => ref _Handle.AsRef(_SmoothBiasOffset.Value); } + private static readonly Lazy _SmoothDurationOffset = new(() => Schema.GetOffset(0x4C3907DA62F4C0D5), LazyThreadSafetyMode.None); + public ref float SmoothDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C3907DA62F4C0D5)); + get => ref _Handle.AsRef(_SmoothDurationOffset.Value); } + private static readonly Lazy _SmoothRemainingTimeOffset = new(() => Schema.GetOffset(0x4C3907DAB4D54372), LazyThreadSafetyMode.None); + public ref float SmoothRemainingTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C3907DAB4D54372)); + get => ref _Handle.AsRef(_SmoothRemainingTimeOffset.Value); } + private static readonly Lazy _SmoothDirOffset = new(() => Schema.GetOffset(0x4C3907DAB90556AA), LazyThreadSafetyMode.None); + public ref int SmoothDir { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C3907DAB90556AA)); + get => ref _Handle.AsRef(_SmoothDirOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSolveIKChainUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSolveIKChainUpdateNodeImpl.cs index 5dd1d3ead..d3919e342 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSolveIKChainUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSolveIKChainUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CSolveIKChainUpdateNodeImpl : CUnaryUpdateNodeImpl, CSolv public CSolveIKChainUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetHandlesOffset = new(() => Schema.GetOffset(0xE78F1D1F98E248F7), LazyThreadSafetyMode.None); + public ref CUtlVector TargetHandles { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE78F1D1F98E248F7)); + get => ref _Handle.AsRef>(_TargetHandlesOffset.Value); } + private static readonly Lazy _OpFixedDataOffset = new(() => Schema.GetOffset(0xE78F1D1F6960AF8C), LazyThreadSafetyMode.None); + public SolveIKChainPoseOpFixedSettings_t OpFixedData { - get => new SolveIKChainPoseOpFixedSettings_tImpl(_Handle + Schema.GetOffset(0xE78F1D1F6960AF8C)); + get => new SolveIKChainPoseOpFixedSettings_tImpl(_Handle + _OpFixedDataOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSolveIKTargetHandle_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSolveIKTargetHandle_tImpl.cs index 56c08c84e..13f8346fb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSolveIKTargetHandle_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSolveIKTargetHandle_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CSolveIKTargetHandle_tImpl : SchemaClass, CSolveIKTargetH public CSolveIKTargetHandle_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _PositionHandleOffset = new(() => Schema.GetOffset(0xC2940485B066E3D4), LazyThreadSafetyMode.None); + public CAnimParamHandle PositionHandle { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xC2940485B066E3D4)); + get => new CAnimParamHandleImpl(_Handle + _PositionHandleOffset.Value); } + private static readonly Lazy _OrientationHandleOffset = new(() => Schema.GetOffset(0xC294048597E9518F), LazyThreadSafetyMode.None); + public CAnimParamHandle OrientationHandle { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xC294048597E9518F)); + get => new CAnimParamHandleImpl(_Handle + _OrientationHandleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionLimitSchemaImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionLimitSchemaImpl.cs index b81ecac88..26a924e26 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionLimitSchemaImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionLimitSchemaImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CSosGroupActionLimitSchemaImpl : CSosGroupActionSchemaImp public CSosGroupActionLimitSchemaImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaxCountOffset = new(() => Schema.GetOffset(0xE06D795E64BED864), LazyThreadSafetyMode.None); + public ref int MaxCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xE06D795E64BED864)); + get => ref _Handle.AsRef(_MaxCountOffset.Value); } + private static readonly Lazy _StopTypeOffset = new(() => Schema.GetOffset(0xE06D795E13397259), LazyThreadSafetyMode.None); + public ref SosActionStopType_t StopType { - get => ref _Handle.AsRef(Schema.GetOffset(0xE06D795E13397259)); + get => ref _Handle.AsRef(_StopTypeOffset.Value); } + private static readonly Lazy _SortTypeOffset = new(() => Schema.GetOffset(0xE06D795E2E0E44B5), LazyThreadSafetyMode.None); + public ref SosActionLimitSortType_t SortType { - get => ref _Handle.AsRef(Schema.GetOffset(0xE06D795E2E0E44B5)); + get => ref _Handle.AsRef(_SortTypeOffset.Value); } + private static readonly Lazy _StopImmediateOffset = new(() => Schema.GetOffset(0xE06D795E358D6B9A), LazyThreadSafetyMode.None); + public ref bool StopImmediate { - get => ref _Handle.AsRef(Schema.GetOffset(0xE06D795E358D6B9A)); + get => ref _Handle.AsRef(_StopImmediateOffset.Value); } + private static readonly Lazy _CountStoppedOffset = new(() => Schema.GetOffset(0xE06D795EF40B23D5), LazyThreadSafetyMode.None); + public ref bool CountStopped { - get => ref _Handle.AsRef(Schema.GetOffset(0xE06D795EF40B23D5)); + get => ref _Handle.AsRef(_CountStoppedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionMemberCountEnvelopeSchemaImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionMemberCountEnvelopeSchemaImpl.cs index 6d244049b..d12de8848 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionMemberCountEnvelopeSchemaImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionMemberCountEnvelopeSchemaImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,33 +17,49 @@ internal partial class CSosGroupActionMemberCountEnvelopeSchemaImpl : CSosGroupA public CSosGroupActionMemberCountEnvelopeSchemaImpl(nint handle) : base(handle) { } + private static readonly Lazy _BaseCountOffset = new(() => Schema.GetOffset(0x5C85206CE09342E3), LazyThreadSafetyMode.None); + public ref int BaseCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x5C85206CE09342E3)); + get => ref _Handle.AsRef(_BaseCountOffset.Value); } + private static readonly Lazy _TargetCountOffset = new(() => Schema.GetOffset(0x5C85206CFEA8571B), LazyThreadSafetyMode.None); + public ref int TargetCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x5C85206CFEA8571B)); + get => ref _Handle.AsRef(_TargetCountOffset.Value); } + private static readonly Lazy _BaseValueOffset = new(() => Schema.GetOffset(0x5C85206CB5B71A9B), LazyThreadSafetyMode.None); + public ref float BaseValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x5C85206CB5B71A9B)); + get => ref _Handle.AsRef(_BaseValueOffset.Value); } + private static readonly Lazy _TargetValueOffset = new(() => Schema.GetOffset(0x5C85206C1584D0BB), LazyThreadSafetyMode.None); + public ref float TargetValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x5C85206C1584D0BB)); + get => ref _Handle.AsRef(_TargetValueOffset.Value); } + private static readonly Lazy _AttackOffset = new(() => Schema.GetOffset(0x5C85206C0A6A5BE7), LazyThreadSafetyMode.None); + public ref float Attack { - get => ref _Handle.AsRef(Schema.GetOffset(0x5C85206C0A6A5BE7)); + get => ref _Handle.AsRef(_AttackOffset.Value); } + private static readonly Lazy _DecayOffset = new(() => Schema.GetOffset(0x5C85206CE24ABC67), LazyThreadSafetyMode.None); + public ref float Decay { - get => ref _Handle.AsRef(Schema.GetOffset(0x5C85206CE24ABC67)); + get => ref _Handle.AsRef(_DecayOffset.Value); } + private static readonly Lazy _ResultVarNameOffset = new(() => Schema.GetOffset(0x5C85206CF566E926), LazyThreadSafetyMode.None); + public string ResultVarName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x5C85206CF566E926)); + var ptr = _Handle.Read(_ResultVarNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x5C85206CF566E926, value); + set => Schema.SetString(_Handle, _ResultVarNameOffset.Value, value); } + private static readonly Lazy _SaveToGroupOffset = new(() => Schema.GetOffset(0x5C85206C6ED720F8), LazyThreadSafetyMode.None); + public ref bool SaveToGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0x5C85206C6ED720F8)); + get => ref _Handle.AsRef(_SaveToGroupOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSchemaImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSchemaImpl.cs index 761ae5e9e..daa5f44b0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSchemaImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSchemaImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSetSoundeventParameterSchemaImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSetSoundeventParameterSchemaImpl.cs index 068549c25..954e7ae71 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSetSoundeventParameterSchemaImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSetSoundeventParameterSchemaImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class CSosGroupActionSetSoundeventParameterSchemaImpl : CSosGro public CSosGroupActionSetSoundeventParameterSchemaImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaxCountOffset = new(() => Schema.GetOffset(0x40D29D8964BED864), LazyThreadSafetyMode.None); + public ref int MaxCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x40D29D8964BED864)); + get => ref _Handle.AsRef(_MaxCountOffset.Value); } + private static readonly Lazy _MinValueOffset = new(() => Schema.GetOffset(0x40D29D897C31AC56), LazyThreadSafetyMode.None); + public ref float MinValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x40D29D897C31AC56)); + get => ref _Handle.AsRef(_MinValueOffset.Value); } + private static readonly Lazy _MaxValueOffset = new(() => Schema.GetOffset(0x40D29D89D0A5C87C), LazyThreadSafetyMode.None); + public ref float MaxValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x40D29D89D0A5C87C)); + get => ref _Handle.AsRef(_MaxValueOffset.Value); } + private static readonly Lazy _OpvarNameOffset = new(() => Schema.GetOffset(0x40D29D894ECBF7E4), LazyThreadSafetyMode.None); + public string OpvarName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x40D29D894ECBF7E4)); + var ptr = _Handle.Read(_OpvarNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x40D29D894ECBF7E4, value); + set => Schema.SetString(_Handle, _OpvarNameOffset.Value, value); } + private static readonly Lazy _SortTypeOffset = new(() => Schema.GetOffset(0x40D29D892E0E44B5), LazyThreadSafetyMode.None); + public ref SosActionSetParamSortType_t SortType { - get => ref _Handle.AsRef(Schema.GetOffset(0x40D29D892E0E44B5)); + get => ref _Handle.AsRef(_SortTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSoundeventClusterSchemaImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSoundeventClusterSchemaImpl.cs index 2073e0635..08a55d9a4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSoundeventClusterSchemaImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSoundeventClusterSchemaImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,46 +17,60 @@ internal partial class CSosGroupActionSoundeventClusterSchemaImpl : CSosGroupAct public CSosGroupActionSoundeventClusterSchemaImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinNearbyOffset = new(() => Schema.GetOffset(0x7B0FC368DD207D3C), LazyThreadSafetyMode.None); + public ref int MinNearby { - get => ref _Handle.AsRef(Schema.GetOffset(0x7B0FC368DD207D3C)); + get => ref _Handle.AsRef(_MinNearbyOffset.Value); } + private static readonly Lazy _ClusterEpsilonOffset = new(() => Schema.GetOffset(0x7B0FC368D85674F7), LazyThreadSafetyMode.None); + public ref float ClusterEpsilon { - get => ref _Handle.AsRef(Schema.GetOffset(0x7B0FC368D85674F7)); + get => ref _Handle.AsRef(_ClusterEpsilonOffset.Value); } + private static readonly Lazy _ShouldPlayOpvarOffset = new(() => Schema.GetOffset(0x7B0FC368FFE71768), LazyThreadSafetyMode.None); + public string ShouldPlayOpvar { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7B0FC368FFE71768)); + var ptr = _Handle.Read(_ShouldPlayOpvarOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7B0FC368FFE71768, value); + set => Schema.SetString(_Handle, _ShouldPlayOpvarOffset.Value, value); } + private static readonly Lazy _ShouldPlayClusterChildOffset = new(() => Schema.GetOffset(0x7B0FC368F2A1690C), LazyThreadSafetyMode.None); + public string ShouldPlayClusterChild { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7B0FC368F2A1690C)); + var ptr = _Handle.Read(_ShouldPlayClusterChildOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7B0FC368F2A1690C, value); + set => Schema.SetString(_Handle, _ShouldPlayClusterChildOffset.Value, value); } + private static readonly Lazy _ClusterSizeOpvarOffset = new(() => Schema.GetOffset(0x7B0FC368153B8D78), LazyThreadSafetyMode.None); + public string ClusterSizeOpvar { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7B0FC368153B8D78)); + var ptr = _Handle.Read(_ClusterSizeOpvarOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7B0FC368153B8D78, value); + set => Schema.SetString(_Handle, _ClusterSizeOpvarOffset.Value, value); } + private static readonly Lazy _GroupBoundingBoxMinsOpvarOffset = new(() => Schema.GetOffset(0x7B0FC3686A214FB0), LazyThreadSafetyMode.None); + public string GroupBoundingBoxMinsOpvar { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7B0FC3686A214FB0)); + var ptr = _Handle.Read(_GroupBoundingBoxMinsOpvarOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7B0FC3686A214FB0, value); + set => Schema.SetString(_Handle, _GroupBoundingBoxMinsOpvarOffset.Value, value); } + private static readonly Lazy _GroupBoundingBoxMaxsOpvarOffset = new(() => Schema.GetOffset(0x7B0FC368B8AC7D92), LazyThreadSafetyMode.None); + public string GroupBoundingBoxMaxsOpvar { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7B0FC368B8AC7D92)); + var ptr = _Handle.Read(_GroupBoundingBoxMaxsOpvarOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7B0FC368B8AC7D92, value); + set => Schema.SetString(_Handle, _GroupBoundingBoxMaxsOpvarOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSoundeventCountSchemaImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSoundeventCountSchemaImpl.cs index fa311cf10..84734dbce 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSoundeventCountSchemaImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSoundeventCountSchemaImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CSosGroupActionSoundeventCountSchemaImpl : CSosGroupActio public CSosGroupActionSoundeventCountSchemaImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExcludeStoppedSoundsOffset = new(() => Schema.GetOffset(0x6A0D82691BDF6FB6), LazyThreadSafetyMode.None); + public ref bool ExcludeStoppedSounds { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A0D82691BDF6FB6)); + get => ref _Handle.AsRef(_ExcludeStoppedSoundsOffset.Value); } + private static readonly Lazy _StrCountKeyNameOffset = new(() => Schema.GetOffset(0x6A0D8269463A7AA5), LazyThreadSafetyMode.None); + public string StrCountKeyName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6A0D8269463A7AA5)); + var ptr = _Handle.Read(_StrCountKeyNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6A0D8269463A7AA5, value); + set => Schema.SetString(_Handle, _StrCountKeyNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSoundeventMinMaxValuesSchemaImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSoundeventMinMaxValuesSchemaImpl.cs index ea8dcb290..3242836c8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSoundeventMinMaxValuesSchemaImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSoundeventMinMaxValuesSchemaImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,51 +17,71 @@ internal partial class CSosGroupActionSoundeventMinMaxValuesSchemaImpl : CSosGro public CSosGroupActionSoundeventMinMaxValuesSchemaImpl(nint handle) : base(handle) { } + private static readonly Lazy _StrQueryPublicFieldNameOffset = new(() => Schema.GetOffset(0xDC3C5E1C40839714), LazyThreadSafetyMode.None); + public string StrQueryPublicFieldName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDC3C5E1C40839714)); + var ptr = _Handle.Read(_StrQueryPublicFieldNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDC3C5E1C40839714, value); + set => Schema.SetString(_Handle, _StrQueryPublicFieldNameOffset.Value, value); } + private static readonly Lazy _StrDelayPublicFieldNameOffset = new(() => Schema.GetOffset(0xDC3C5E1CC2E1170D), LazyThreadSafetyMode.None); + public string StrDelayPublicFieldName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDC3C5E1CC2E1170D)); + var ptr = _Handle.Read(_StrDelayPublicFieldNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDC3C5E1CC2E1170D, value); + set => Schema.SetString(_Handle, _StrDelayPublicFieldNameOffset.Value, value); } + private static readonly Lazy _ExcludeStoppedSoundsOffset = new(() => Schema.GetOffset(0xDC3C5E1C1BDF6FB6), LazyThreadSafetyMode.None); + public ref bool ExcludeStoppedSounds { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC3C5E1C1BDF6FB6)); + get => ref _Handle.AsRef(_ExcludeStoppedSoundsOffset.Value); } + private static readonly Lazy _ExcludeDelayedSoundsOffset = new(() => Schema.GetOffset(0xDC3C5E1CA849B37D), LazyThreadSafetyMode.None); + public ref bool ExcludeDelayedSounds { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC3C5E1CA849B37D)); + get => ref _Handle.AsRef(_ExcludeDelayedSoundsOffset.Value); } + private static readonly Lazy _ExcludeSoundsBelowThresholdOffset = new(() => Schema.GetOffset(0xDC3C5E1CBEF10829), LazyThreadSafetyMode.None); + public ref bool ExcludeSoundsBelowThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC3C5E1CBEF10829)); + get => ref _Handle.AsRef(_ExcludeSoundsBelowThresholdOffset.Value); } + private static readonly Lazy _ExcludeSoundsMinThresholdValueOffset = new(() => Schema.GetOffset(0xDC3C5E1CBAF64DF9), LazyThreadSafetyMode.None); + public ref float ExcludeSoundsMinThresholdValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC3C5E1CBAF64DF9)); + get => ref _Handle.AsRef(_ExcludeSoundsMinThresholdValueOffset.Value); } + private static readonly Lazy _ExcludSoundsAboveThresholdOffset = new(() => Schema.GetOffset(0xDC3C5E1CBD2BDEAE), LazyThreadSafetyMode.None); + public ref bool ExcludSoundsAboveThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC3C5E1CBD2BDEAE)); + get => ref _Handle.AsRef(_ExcludSoundsAboveThresholdOffset.Value); } + private static readonly Lazy _ExcludeSoundsMaxThresholdValueOffset = new(() => Schema.GetOffset(0xDC3C5E1C67D717C7), LazyThreadSafetyMode.None); + public ref float ExcludeSoundsMaxThresholdValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC3C5E1C67D717C7)); + get => ref _Handle.AsRef(_ExcludeSoundsMaxThresholdValueOffset.Value); } + private static readonly Lazy _StrMinValueNameOffset = new(() => Schema.GetOffset(0xDC3C5E1CCF654B06), LazyThreadSafetyMode.None); + public string StrMinValueName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDC3C5E1CCF654B06)); + var ptr = _Handle.Read(_StrMinValueNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDC3C5E1CCF654B06, value); + set => Schema.SetString(_Handle, _StrMinValueNameOffset.Value, value); } + private static readonly Lazy _StrMaxValueNameOffset = new(() => Schema.GetOffset(0xDC3C5E1CEF3A2D5C), LazyThreadSafetyMode.None); + public string StrMaxValueName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDC3C5E1CEF3A2D5C)); + var ptr = _Handle.Read(_StrMaxValueNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDC3C5E1CEF3A2D5C, value); + set => Schema.SetString(_Handle, _StrMaxValueNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSoundeventPrioritySchemaImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSoundeventPrioritySchemaImpl.cs index d771279aa..e4bf4db7b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSoundeventPrioritySchemaImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionSoundeventPrioritySchemaImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,33 +17,41 @@ internal partial class CSosGroupActionSoundeventPrioritySchemaImpl : CSosGroupAc public CSosGroupActionSoundeventPrioritySchemaImpl(nint handle) : base(handle) { } + private static readonly Lazy _PriorityValueOffset = new(() => Schema.GetOffset(0x1E84D860257F7BF6), LazyThreadSafetyMode.None); + public string PriorityValue { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1E84D860257F7BF6)); + var ptr = _Handle.Read(_PriorityValueOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1E84D860257F7BF6, value); + set => Schema.SetString(_Handle, _PriorityValueOffset.Value, value); } + private static readonly Lazy _PriorityVolumeScalarOffset = new(() => Schema.GetOffset(0x1E84D860F21824AF), LazyThreadSafetyMode.None); + public string PriorityVolumeScalar { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1E84D860F21824AF)); + var ptr = _Handle.Read(_PriorityVolumeScalarOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1E84D860F21824AF, value); + set => Schema.SetString(_Handle, _PriorityVolumeScalarOffset.Value, value); } + private static readonly Lazy _PriorityContributeButDontReadOffset = new(() => Schema.GetOffset(0x1E84D8608078C7B6), LazyThreadSafetyMode.None); + public string PriorityContributeButDontRead { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1E84D8608078C7B6)); + var ptr = _Handle.Read(_PriorityContributeButDontReadOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1E84D8608078C7B6, value); + set => Schema.SetString(_Handle, _PriorityContributeButDontReadOffset.Value, value); } + private static readonly Lazy _PriorityReadButDontContributeOffset = new(() => Schema.GetOffset(0x1E84D860112DDB84), LazyThreadSafetyMode.None); + public string PriorityReadButDontContribute { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1E84D860112DDB84)); + var ptr = _Handle.Read(_PriorityReadButDontContributeOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1E84D860112DDB84, value); + set => Schema.SetString(_Handle, _PriorityReadButDontContributeOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionTimeBlockLimitSchemaImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionTimeBlockLimitSchemaImpl.cs index 95c44a442..1efb1d454 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionTimeBlockLimitSchemaImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionTimeBlockLimitSchemaImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CSosGroupActionTimeBlockLimitSchemaImpl : CSosGroupAction public CSosGroupActionTimeBlockLimitSchemaImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaxCountOffset = new(() => Schema.GetOffset(0x79E8A1AC64BED864), LazyThreadSafetyMode.None); + public ref int MaxCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x79E8A1AC64BED864)); + get => ref _Handle.AsRef(_MaxCountOffset.Value); } + private static readonly Lazy _MaxDurationOffset = new(() => Schema.GetOffset(0x79E8A1AC39BAF9F3), LazyThreadSafetyMode.None); + public ref float MaxDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x79E8A1AC39BAF9F3)); + get => ref _Handle.AsRef(_MaxDurationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionTimeLimitSchemaImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionTimeLimitSchemaImpl.cs index cfd1cc33d..b2f51ff61 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionTimeLimitSchemaImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosGroupActionTimeLimitSchemaImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CSosGroupActionTimeLimitSchemaImpl : CSosGroupActionSchem public CSosGroupActionTimeLimitSchemaImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaxDurationOffset = new(() => Schema.GetOffset(0xB90F1DFD39BAF9F3), LazyThreadSafetyMode.None); + public ref float MaxDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0xB90F1DFD39BAF9F3)); + get => ref _Handle.AsRef(_MaxDurationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosSoundEventGroupSchemaImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosSoundEventGroupSchemaImpl.cs index 3ea71fbfc..64527b198 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosSoundEventGroupSchemaImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSosSoundEventGroupSchemaImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,65 +17,97 @@ internal partial class CSosSoundEventGroupSchemaImpl : SchemaClass, CSosSoundEve public CSosSoundEventGroupSchemaImpl(nint handle) : base(handle) { } + private static readonly Lazy _GroupTypeOffset = new(() => Schema.GetOffset(0x25BA87001A8E5A00), LazyThreadSafetyMode.None); + public ref SosGroupType_t GroupType { - get => ref _Handle.AsRef(Schema.GetOffset(0x25BA87001A8E5A00)); + get => ref _Handle.AsRef(_GroupTypeOffset.Value); } + private static readonly Lazy _BlocksEventsOffset = new(() => Schema.GetOffset(0x25BA8700E3632026), LazyThreadSafetyMode.None); + public ref bool BlocksEvents { - get => ref _Handle.AsRef(Schema.GetOffset(0x25BA8700E3632026)); + get => ref _Handle.AsRef(_BlocksEventsOffset.Value); } + private static readonly Lazy _BlockMaxCountOffset = new(() => Schema.GetOffset(0x25BA8700282E91F7), LazyThreadSafetyMode.None); + public ref int BlockMaxCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x25BA8700282E91F7)); + get => ref _Handle.AsRef(_BlockMaxCountOffset.Value); } + private static readonly Lazy _MemberLifespanTimeOffset = new(() => Schema.GetOffset(0x25BA8700C47B4DBA), LazyThreadSafetyMode.None); + public ref float MemberLifespanTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x25BA8700C47B4DBA)); + get => ref _Handle.AsRef(_MemberLifespanTimeOffset.Value); } + private static readonly Lazy _InvertMatchOffset = new(() => Schema.GetOffset(0x25BA87003C3CF99A), LazyThreadSafetyMode.None); + public ref bool InvertMatch { - get => ref _Handle.AsRef(Schema.GetOffset(0x25BA87003C3CF99A)); + get => ref _Handle.AsRef(_InvertMatchOffset.Value); } + private static readonly Lazy _Behavior_EventNameOffset = new(() => Schema.GetOffset(0x25BA870029F15E53), LazyThreadSafetyMode.None); + public ref SosGroupFieldBehavior_t Behavior_EventName { - get => ref _Handle.AsRef(Schema.GetOffset(0x25BA870029F15E53)); + get => ref _Handle.AsRef(_Behavior_EventNameOffset.Value); } + private static readonly Lazy _MatchSoundEventNameOffset = new(() => Schema.GetOffset(0x25BA87005E75165C), LazyThreadSafetyMode.None); + public string MatchSoundEventName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x25BA87005E75165C)); + var ptr = _Handle.Read(_MatchSoundEventNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x25BA87005E75165C, value); + set => Schema.SetString(_Handle, _MatchSoundEventNameOffset.Value, value); } + private static readonly Lazy _MatchEventSubStringOffset = new(() => Schema.GetOffset(0x25BA87001C020689), LazyThreadSafetyMode.None); + public ref bool MatchEventSubString { - get => ref _Handle.AsRef(Schema.GetOffset(0x25BA87001C020689)); + get => ref _Handle.AsRef(_MatchEventSubStringOffset.Value); } + private static readonly Lazy _MatchSoundEventSubStringOffset = new(() => Schema.GetOffset(0x25BA87002FBB6296), LazyThreadSafetyMode.None); + public string MatchSoundEventSubString { get { - var ptr = _Handle.Read(Schema.GetOffset(0x25BA87002FBB6296)); + var ptr = _Handle.Read(_MatchSoundEventSubStringOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x25BA87002FBB6296, value); + set => Schema.SetString(_Handle, _MatchSoundEventSubStringOffset.Value, value); } + private static readonly Lazy _Behavior_EntIndexOffset = new(() => Schema.GetOffset(0x25BA8700139C6983), LazyThreadSafetyMode.None); + public ref SosGroupFieldBehavior_t Behavior_EntIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x25BA8700139C6983)); + get => ref _Handle.AsRef(_Behavior_EntIndexOffset.Value); } + private static readonly Lazy _EntIndexOffset = new(() => Schema.GetOffset(0x25BA8700CD8F80C8), LazyThreadSafetyMode.None); + public ref float EntIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x25BA8700CD8F80C8)); + get => ref _Handle.AsRef(_EntIndexOffset.Value); } + private static readonly Lazy _Behavior_OpvarOffset = new(() => Schema.GetOffset(0x25BA8700C2EFBF94), LazyThreadSafetyMode.None); + public ref SosGroupFieldBehavior_t Behavior_Opvar { - get => ref _Handle.AsRef(Schema.GetOffset(0x25BA8700C2EFBF94)); + get => ref _Handle.AsRef(_Behavior_OpvarOffset.Value); } + private static readonly Lazy _OpvarOffset = new(() => Schema.GetOffset(0x25BA870054283361), LazyThreadSafetyMode.None); + public ref float Opvar { - get => ref _Handle.AsRef(Schema.GetOffset(0x25BA870054283361)); + get => ref _Handle.AsRef(_OpvarOffset.Value); } + private static readonly Lazy _Behavior_StringOffset = new(() => Schema.GetOffset(0x25BA87001D20B9B1), LazyThreadSafetyMode.None); + public ref SosGroupFieldBehavior_t Behavior_String { - get => ref _Handle.AsRef(Schema.GetOffset(0x25BA87001D20B9B1)); + get => ref _Handle.AsRef(_Behavior_StringOffset.Value); } + private static readonly Lazy _OpvarStringOffset = new(() => Schema.GetOffset(0x25BA8700528828B2), LazyThreadSafetyMode.None); + public string OpvarString { get { - var ptr = _Handle.Read(Schema.GetOffset(0x25BA8700528828B2)); + var ptr = _Handle.Read(_OpvarStringOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x25BA8700528828B2, value); + set => Schema.SetString(_Handle, _OpvarStringOffset.Value, value); } + private static readonly Lazy _ActionsOffset = new(() => Schema.GetOffset(0x25BA8700D36B7908), LazyThreadSafetyMode.None); + public ref CUtlVector> Actions { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x25BA8700D36B7908)); + get => ref _Handle.AsRef>>(_ActionsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundAreaEntityBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundAreaEntityBaseImpl.cs index cf0425f07..5bcb2fe12 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundAreaEntityBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundAreaEntityBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class CSoundAreaEntityBaseImpl : CBaseEntityImpl, CSoundAreaEnt public CSoundAreaEntityBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x15C90E163A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x15C90E163A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _SoundAreaTypeOffset = new(() => Schema.GetOffset(0x15C90E16227612E5), LazyThreadSafetyMode.None); + public string SoundAreaType { get { - var ptr = _Handle.Read(Schema.GetOffset(0x15C90E16227612E5)); + var ptr = _Handle.Read(_SoundAreaTypeOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x15C90E16227612E5, value); + set => Schema.SetString(_Handle, _SoundAreaTypeOffset.Value, value); } + private static readonly Lazy _PosOffset = new(() => Schema.GetOffset(0x15C90E16DE9CFC5D), LazyThreadSafetyMode.None); + public ref Vector Pos { - get => ref _Handle.AsRef(Schema.GetOffset(0x15C90E16DE9CFC5D)); + get => ref _Handle.AsRef(_PosOffset.Value); } public void DisabledUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundAreaEntityOrientedBoxImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundAreaEntityOrientedBoxImpl.cs index 4146a073d..a6661838e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundAreaEntityOrientedBoxImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundAreaEntityOrientedBoxImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CSoundAreaEntityOrientedBoxImpl : CSoundAreaEntityBaseImp public CSoundAreaEntityOrientedBoxImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinOffset = new(() => Schema.GetOffset(0x5D327060F4B0AA63), LazyThreadSafetyMode.None); + public ref Vector Min { - get => ref _Handle.AsRef(Schema.GetOffset(0x5D327060F4B0AA63)); + get => ref _Handle.AsRef(_MinOffset.Value); } + private static readonly Lazy _MaxOffset = new(() => Schema.GetOffset(0x5D327060EAC4225D), LazyThreadSafetyMode.None); + public ref Vector Max { - get => ref _Handle.AsRef(Schema.GetOffset(0x5D327060EAC4225D)); + get => ref _Handle.AsRef(_MaxOffset.Value); } public void MinUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundAreaEntitySphereImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundAreaEntitySphereImpl.cs index 568b8bae4..9275ab5e2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundAreaEntitySphereImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundAreaEntitySphereImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CSoundAreaEntitySphereImpl : CSoundAreaEntityBaseImpl, CS public CSoundAreaEntitySphereImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x2FF7C1D65ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x2FF7C1D65ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } public void RadiusUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundContainerReferenceArrayImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundContainerReferenceArrayImpl.cs index 8258c5e50..047073933 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundContainerReferenceArrayImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundContainerReferenceArrayImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CSoundContainerReferenceArrayImpl : SchemaClass, CSoundCo public CSoundContainerReferenceArrayImpl(nint handle) : base(handle) { } + private static readonly Lazy _UseReferenceOffset = new(() => Schema.GetOffset(0x80FA0E8A45BCD5C9), LazyThreadSafetyMode.None); + public ref bool UseReference { - get => ref _Handle.AsRef(Schema.GetOffset(0x80FA0E8A45BCD5C9)); + get => ref _Handle.AsRef(_UseReferenceOffset.Value); } + private static readonly Lazy _SoundsOffset = new(() => Schema.GetOffset(0x80FA0E8ABD919645), LazyThreadSafetyMode.None); + public ref CUtlVector> Sounds { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x80FA0E8ABD919645)); + get => ref _Handle.AsRef>>(_SoundsOffset.Value); } + private static readonly Lazy _Sounds1Offset = new(() => Schema.GetOffset(0x80FA0E8AAA82BE1F), LazyThreadSafetyMode.None); + public ref CUtlVector> Sounds1 { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x80FA0E8AAA82BE1F)); + get => ref _Handle.AsRef>>(_Sounds1Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundContainerReferenceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundContainerReferenceImpl.cs index d92704726..b7f52293f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundContainerReferenceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundContainerReferenceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,21 @@ internal partial class CSoundContainerReferenceImpl : SchemaClass, CSoundContain public CSoundContainerReferenceImpl(nint handle) : base(handle) { } + private static readonly Lazy _UseReferenceOffset = new(() => Schema.GetOffset(0x4663CCA145BCD5C9), LazyThreadSafetyMode.None); + public ref bool UseReference { - get => ref _Handle.AsRef(Schema.GetOffset(0x4663CCA145BCD5C9)); + get => ref _Handle.AsRef(_UseReferenceOffset.Value); } + private static readonly Lazy _SoundOffset = new(() => Schema.GetOffset(0x4663CCA14E1C4FB4), LazyThreadSafetyMode.None); + public ref CStrongHandle Sound { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4663CCA14E1C4FB4)); + get => ref _Handle.AsRef>(_SoundOffset.Value); } + private static readonly Lazy _Sound1Offset = new(() => Schema.GetOffset(0x4663CCA13D8D58B6), LazyThreadSafetyMode.None); + public CVoiceContainerBase? Sound1 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4663CCA13D8D58B6)); + var ptr = _Handle.Read(_Sound1Offset.Value); return ptr.IsValidPtr() ? new CVoiceContainerBaseImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEnvelopeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEnvelopeImpl.cs index 1a9a24863..00db5d16c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEnvelopeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEnvelopeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CSoundEnvelopeImpl : SchemaClass, CSoundEnvelope { public CSoundEnvelopeImpl(nint handle) : base(handle) { } + private static readonly Lazy _CurrentOffset = new(() => Schema.GetOffset(0xDF974C315AD334FA), LazyThreadSafetyMode.None); + public ref float Current { - get => ref _Handle.AsRef(Schema.GetOffset(0xDF974C315AD334FA)); + get => ref _Handle.AsRef(_CurrentOffset.Value); } + private static readonly Lazy _TargetOffset = new(() => Schema.GetOffset(0xDF974C31FA08A9E8), LazyThreadSafetyMode.None); + public ref float Target { - get => ref _Handle.AsRef(Schema.GetOffset(0xDF974C31FA08A9E8)); + get => ref _Handle.AsRef(_TargetOffset.Value); } + private static readonly Lazy _RateOffset = new(() => Schema.GetOffset(0xDF974C316C5ECD07), LazyThreadSafetyMode.None); + public ref float Rate { - get => ref _Handle.AsRef(Schema.GetOffset(0xDF974C316C5ECD07)); + get => ref _Handle.AsRef(_RateOffset.Value); } + private static readonly Lazy _ForceupdateOffset = new(() => Schema.GetOffset(0xDF974C3131B01C25), LazyThreadSafetyMode.None); + public ref bool Forceupdate { - get => ref _Handle.AsRef(Schema.GetOffset(0xDF974C3131B01C25)); + get => ref _Handle.AsRef(_ForceupdateOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventAABBEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventAABBEntityImpl.cs index a936fafc8..6f0fb7a74 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventAABBEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventAABBEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CSoundEventAABBEntityImpl : CSoundEventEntityImpl, CSound public CSoundEventAABBEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinsOffset = new(() => Schema.GetOffset(0x9E5B084A421BB730), LazyThreadSafetyMode.None); + public ref Vector Mins { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E5B084A421BB730)); + get => ref _Handle.AsRef(_MinsOffset.Value); } + private static readonly Lazy _MaxsOffset = new(() => Schema.GetOffset(0x9E5B084AC0C1CE6A), LazyThreadSafetyMode.None); + public ref Vector Maxs { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E5B084AC0C1CE6A)); + get => ref _Handle.AsRef(_MaxsOffset.Value); } public void MinsUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventEntityAlias_snd_event_pointImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventEntityAlias_snd_event_pointImpl.cs index d836eb760..27c2da4c2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventEntityAlias_snd_event_pointImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventEntityAlias_snd_event_pointImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventEntityImpl.cs index d1ba23b91..92737e32a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,59 +17,87 @@ internal partial class CSoundEventEntityImpl : CBaseEntityImpl, CSoundEventEntit public CSoundEventEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartOnSpawnOffset = new(() => Schema.GetOffset(0x85BC270CDB2E6401), LazyThreadSafetyMode.None); + public ref bool StartOnSpawn { - get => ref _Handle.AsRef(Schema.GetOffset(0x85BC270CDB2E6401)); + get => ref _Handle.AsRef(_StartOnSpawnOffset.Value); } + private static readonly Lazy _ToLocalPlayerOffset = new(() => Schema.GetOffset(0x85BC270CE46A0E6E), LazyThreadSafetyMode.None); + public ref bool ToLocalPlayer { - get => ref _Handle.AsRef(Schema.GetOffset(0x85BC270CE46A0E6E)); + get => ref _Handle.AsRef(_ToLocalPlayerOffset.Value); } + private static readonly Lazy _StopOnNewOffset = new(() => Schema.GetOffset(0x85BC270C87CBD5EE), LazyThreadSafetyMode.None); + public ref bool StopOnNew { - get => ref _Handle.AsRef(Schema.GetOffset(0x85BC270C87CBD5EE)); + get => ref _Handle.AsRef(_StopOnNewOffset.Value); } + private static readonly Lazy _SaveRestoreOffset = new(() => Schema.GetOffset(0x85BC270C329D644A), LazyThreadSafetyMode.None); + public ref bool SaveRestore { - get => ref _Handle.AsRef(Schema.GetOffset(0x85BC270C329D644A)); + get => ref _Handle.AsRef(_SaveRestoreOffset.Value); } + private static readonly Lazy _SavedIsPlayingOffset = new(() => Schema.GetOffset(0x85BC270CE283DF5A), LazyThreadSafetyMode.None); + public ref bool SavedIsPlaying { - get => ref _Handle.AsRef(Schema.GetOffset(0x85BC270CE283DF5A)); + get => ref _Handle.AsRef(_SavedIsPlayingOffset.Value); } + private static readonly Lazy _SavedElapsedTimeOffset = new(() => Schema.GetOffset(0x85BC270C581DEF93), LazyThreadSafetyMode.None); + public ref float SavedElapsedTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x85BC270C581DEF93)); + get => ref _Handle.AsRef(_SavedElapsedTimeOffset.Value); } + private static readonly Lazy _SourceEntityNameOffset = new(() => Schema.GetOffset(0x85BC270C6C1387C0), LazyThreadSafetyMode.None); + public string SourceEntityName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x85BC270C6C1387C0)); + var ptr = _Handle.Read(_SourceEntityNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x85BC270C6C1387C0, value); + set => Schema.SetString(_Handle, _SourceEntityNameOffset.Value, value); } + private static readonly Lazy _AttachmentNameOffset = new(() => Schema.GetOffset(0x85BC270C667A37F3), LazyThreadSafetyMode.None); + public string AttachmentName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x85BC270C667A37F3)); + var ptr = _Handle.Read(_AttachmentNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x85BC270C667A37F3, value); + set => Schema.SetString(_Handle, _AttachmentNameOffset.Value, value); } + private static readonly Lazy _OnGUIDChangedOffset = new(() => Schema.GetOffset(0x85BC270C2173B7A3), LazyThreadSafetyMode.None); + public SchemaUntypedField OnGUIDChanged { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x85BC270C2173B7A3)); + get => new SchemaUntypedField(_Handle + _OnGUIDChangedOffset.Value); } + private static readonly Lazy _OnSoundFinishedOffset = new(() => Schema.GetOffset(0x85BC270C35E97239), LazyThreadSafetyMode.None); + public CEntityIOOutput OnSoundFinished { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x85BC270C35E97239)); + get => new CEntityIOOutputImpl(_Handle + _OnSoundFinishedOffset.Value); } + private static readonly Lazy _ClientCullRadiusOffset = new(() => Schema.GetOffset(0x85BC270CEC099542), LazyThreadSafetyMode.None); + public ref float ClientCullRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x85BC270CEC099542)); + get => ref _Handle.AsRef(_ClientCullRadiusOffset.Value); } + private static readonly Lazy _SoundNameOffset = new(() => Schema.GetOffset(0x85BC270CB17EB157), LazyThreadSafetyMode.None); + public string SoundName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x85BC270CB17EB157)); + var ptr = _Handle.Read(_SoundNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x85BC270CB17EB157, value); + set => Schema.SetString(_Handle, _SoundNameOffset.Value, value); } + private static readonly Lazy _SourceOffset = new(() => Schema.GetOffset(0x85BC270C33D3CD82), LazyThreadSafetyMode.None); + public ref CHandle Source { - get => ref _Handle.AsRef>(Schema.GetOffset(0x85BC270C33D3CD82)); + get => ref _Handle.AsRef>(_SourceOffset.Value); } + private static readonly Lazy _EntityIndexSelectionOffset = new(() => Schema.GetOffset(0x85BC270CD23B423C), LazyThreadSafetyMode.None); + public ref int EntityIndexSelection { - get => ref _Handle.AsRef(Schema.GetOffset(0x85BC270CD23B423C)); + get => ref _Handle.AsRef(_EntityIndexSelectionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventMetaDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventMetaDataImpl.cs index a82140240..8bd102919 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventMetaDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventMetaDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CSoundEventMetaDataImpl : SchemaClass, CSoundEventMetaDat public CSoundEventMetaDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _SoundEventVMixOffset = new(() => Schema.GetOffset(0xE03E2D8ED7B83398), LazyThreadSafetyMode.None); + public ref CStrongHandle SoundEventVMix { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE03E2D8ED7B83398)); + get => ref _Handle.AsRef>(_SoundEventVMixOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventOBBEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventOBBEntityImpl.cs index 83a4ee462..fb57d75f5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventOBBEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventOBBEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CSoundEventOBBEntityImpl : CSoundEventEntityImpl, CSoundE public CSoundEventOBBEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinsOffset = new(() => Schema.GetOffset(0x470330BB421BB730), LazyThreadSafetyMode.None); + public ref Vector Mins { - get => ref _Handle.AsRef(Schema.GetOffset(0x470330BB421BB730)); + get => ref _Handle.AsRef(_MinsOffset.Value); } + private static readonly Lazy _MaxsOffset = new(() => Schema.GetOffset(0x470330BBC0C1CE6A), LazyThreadSafetyMode.None); + public ref Vector Maxs { - get => ref _Handle.AsRef(Schema.GetOffset(0x470330BBC0C1CE6A)); + get => ref _Handle.AsRef(_MaxsOffset.Value); } public void MinsUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventParameterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventParameterImpl.cs index 09c947686..a1e2c11ad 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventParameterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventParameterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CSoundEventParameterImpl : CBaseEntityImpl, CSoundEventPa public CSoundEventParameterImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParamNameOffset = new(() => Schema.GetOffset(0xEFEED49AFF6F4311), LazyThreadSafetyMode.None); + public string ParamName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xEFEED49AFF6F4311)); + var ptr = _Handle.Read(_ParamNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xEFEED49AFF6F4311, value); + set => Schema.SetString(_Handle, _ParamNameOffset.Value, value); } + private static readonly Lazy _FloatValueOffset = new(() => Schema.GetOffset(0xEFEED49A80BDA558), LazyThreadSafetyMode.None); + public ref float FloatValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xEFEED49A80BDA558)); + get => ref _Handle.AsRef(_FloatValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventPathCornerEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventPathCornerEntityImpl.cs index 54424dfc6..ba1e47352 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventPathCornerEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventPathCornerEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,30 +17,44 @@ internal partial class CSoundEventPathCornerEntityImpl : CSoundEventEntityImpl, public CSoundEventPathCornerEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _PathCornerOffset = new(() => Schema.GetOffset(0x9EED262E0243CF47), LazyThreadSafetyMode.None); + public string PathCorner { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9EED262E0243CF47)); + var ptr = _Handle.Read(_PathCornerOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9EED262E0243CF47, value); + set => Schema.SetString(_Handle, _PathCornerOffset.Value, value); } + private static readonly Lazy _CountMaxOffset = new(() => Schema.GetOffset(0x9EED262E6A1AD493), LazyThreadSafetyMode.None); + public ref int CountMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x9EED262E6A1AD493)); + get => ref _Handle.AsRef(_CountMaxOffset.Value); } + private static readonly Lazy _DistanceMaxOffset = new(() => Schema.GetOffset(0x9EED262EFDEBADA6), LazyThreadSafetyMode.None); + public ref float DistanceMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x9EED262EFDEBADA6)); + get => ref _Handle.AsRef(_DistanceMaxOffset.Value); } + private static readonly Lazy _DistMaxSqrOffset = new(() => Schema.GetOffset(0x9EED262E993EE3BF), LazyThreadSafetyMode.None); + public ref float DistMaxSqr { - get => ref _Handle.AsRef(Schema.GetOffset(0x9EED262E993EE3BF)); + get => ref _Handle.AsRef(_DistMaxSqrOffset.Value); } + private static readonly Lazy _DotProductMaxOffset = new(() => Schema.GetOffset(0x9EED262EF9DEDD1D), LazyThreadSafetyMode.None); + public ref float DotProductMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x9EED262EF9DEDD1D)); + get => ref _Handle.AsRef(_DotProductMaxOffset.Value); } + private static readonly Lazy _PlayingOffset = new(() => Schema.GetOffset(0x9EED262E4B594215), LazyThreadSafetyMode.None); + public ref bool Playing { - get => ref _Handle.AsRef(Schema.GetOffset(0x9EED262E4B594215)); + get => ref _Handle.AsRef(_PlayingOffset.Value); } + private static readonly Lazy _CornerPairsNetworkedOffset = new(() => Schema.GetOffset(0x9EED262E4C7A9B2C), LazyThreadSafetyMode.None); + public ref CUtlVector CornerPairsNetworked { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9EED262E4C7A9B2C)); + get => ref _Handle.AsRef>(_CornerPairsNetworkedOffset.Value); } public void CornerPairsNetworkedUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventSphereEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventSphereEntityImpl.cs index 60c8abdbe..81dd1ba67 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventSphereEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundEventSphereEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CSoundEventSphereEntityImpl : CSoundEventEntityImpl, CSou public CSoundEventSphereEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x12CB958D5ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x12CB958D5ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } public void RadiusUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundInfoHeaderImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundInfoHeaderImpl.cs index 6f6c84b6e..73b92bae5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundInfoHeaderImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundInfoHeaderImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetAABBEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetAABBEntityImpl.cs index 51e73df3d..2dde63fd8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetAABBEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetAABBEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class CSoundOpvarSetAABBEntityImpl : CSoundOpvarSetPointEntityI public CSoundOpvarSetAABBEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _DistanceInnerMinsOffset = new(() => Schema.GetOffset(0x9C9CB73CC7540883), LazyThreadSafetyMode.None); + public ref Vector DistanceInnerMins { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C9CB73CC7540883)); + get => ref _Handle.AsRef(_DistanceInnerMinsOffset.Value); } + private static readonly Lazy _DistanceInnerMaxsOffset = new(() => Schema.GetOffset(0x9C9CB73C705E7E61), LazyThreadSafetyMode.None); + public ref Vector DistanceInnerMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C9CB73C705E7E61)); + get => ref _Handle.AsRef(_DistanceInnerMaxsOffset.Value); } + private static readonly Lazy _DistanceOuterMinsOffset = new(() => Schema.GetOffset(0x9C9CB73C185EC6F4), LazyThreadSafetyMode.None); + public ref Vector DistanceOuterMins { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C9CB73C185EC6F4)); + get => ref _Handle.AsRef(_DistanceOuterMinsOffset.Value); } + private static readonly Lazy _DistanceOuterMaxsOffset = new(() => Schema.GetOffset(0x9C9CB73C99738B36), LazyThreadSafetyMode.None); + public ref Vector DistanceOuterMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C9CB73C99738B36)); + get => ref _Handle.AsRef(_DistanceOuterMaxsOffset.Value); } + private static readonly Lazy _AABBDirectionOffset = new(() => Schema.GetOffset(0x9C9CB73CE8CF552C), LazyThreadSafetyMode.None); + public ref int AABBDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C9CB73CE8CF552C)); + get => ref _Handle.AsRef(_AABBDirectionOffset.Value); } + private static readonly Lazy _InnerMinsOffset = new(() => Schema.GetOffset(0x9C9CB73C4C5EAC7A), LazyThreadSafetyMode.None); + public ref Vector InnerMins { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C9CB73C4C5EAC7A)); + get => ref _Handle.AsRef(_InnerMinsOffset.Value); } + private static readonly Lazy _InnerMaxsOffset = new(() => Schema.GetOffset(0x9C9CB73CCD68E360), LazyThreadSafetyMode.None); + public ref Vector InnerMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C9CB73CCD68E360)); + get => ref _Handle.AsRef(_InnerMaxsOffset.Value); } + private static readonly Lazy _OuterMinsOffset = new(() => Schema.GetOffset(0x9C9CB73C30928F3D), LazyThreadSafetyMode.None); + public ref Vector OuterMins { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C9CB73C30928F3D)); + get => ref _Handle.AsRef(_OuterMinsOffset.Value); } + private static readonly Lazy _OuterMaxsOffset = new(() => Schema.GetOffset(0x9C9CB73CC9A77947), LazyThreadSafetyMode.None); + public ref Vector OuterMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C9CB73CC9A77947)); + get => ref _Handle.AsRef(_OuterMaxsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetAutoRoomEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetAutoRoomEntityImpl.cs index 79eee4d03..d667afba0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetAutoRoomEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetAutoRoomEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CSoundOpvarSetAutoRoomEntityImpl : CSoundOpvarSetPointEnt public CSoundOpvarSetAutoRoomEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _TraceResultsOffset = new(() => Schema.GetOffset(0x13ABD76E24ADC8DC), LazyThreadSafetyMode.None); + public ref CUtlVector TraceResults { - get => ref _Handle.AsRef>(Schema.GetOffset(0x13ABD76E24ADC8DC)); + get => ref _Handle.AsRef>(_TraceResultsOffset.Value); } + private static readonly Lazy _DoorwayPairsOffset = new(() => Schema.GetOffset(0x13ABD76EFAD6453D), LazyThreadSafetyMode.None); + public ref CUtlVector DoorwayPairs { - get => ref _Handle.AsRef>(Schema.GetOffset(0x13ABD76EFAD6453D)); + get => ref _Handle.AsRef>(_DoorwayPairsOffset.Value); } + private static readonly Lazy _SizeOffset = new(() => Schema.GetOffset(0x13ABD76E4CF0EBC6), LazyThreadSafetyMode.None); + public ref float Size { - get => ref _Handle.AsRef(Schema.GetOffset(0x13ABD76E4CF0EBC6)); + get => ref _Handle.AsRef(_SizeOffset.Value); } + private static readonly Lazy _HeightToleranceOffset = new(() => Schema.GetOffset(0x13ABD76EB388225F), LazyThreadSafetyMode.None); + public ref float HeightTolerance { - get => ref _Handle.AsRef(Schema.GetOffset(0x13ABD76EB388225F)); + get => ref _Handle.AsRef(_HeightToleranceOffset.Value); } + private static readonly Lazy _SizeSqrOffset = new(() => Schema.GetOffset(0x13ABD76E063EF878), LazyThreadSafetyMode.None); + public ref float SizeSqr { - get => ref _Handle.AsRef(Schema.GetOffset(0x13ABD76E063EF878)); + get => ref _Handle.AsRef(_SizeSqrOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetEntityImpl.cs index 28c3705fa..79dc00a02 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,45 +17,61 @@ internal partial class CSoundOpvarSetEntityImpl : CBaseEntityImpl, CSoundOpvarSe public CSoundOpvarSetEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _StackNameOffset = new(() => Schema.GetOffset(0xAF468F963B3E9CD4), LazyThreadSafetyMode.None); + public string StackName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xAF468F963B3E9CD4)); + var ptr = _Handle.Read(_StackNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xAF468F963B3E9CD4, value); + set => Schema.SetString(_Handle, _StackNameOffset.Value, value); } + private static readonly Lazy _OperatorNameOffset = new(() => Schema.GetOffset(0xAF468F96F6140996), LazyThreadSafetyMode.None); + public string OperatorName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xAF468F96F6140996)); + var ptr = _Handle.Read(_OperatorNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xAF468F96F6140996, value); + set => Schema.SetString(_Handle, _OperatorNameOffset.Value, value); } + private static readonly Lazy _OpvarNameOffset = new(() => Schema.GetOffset(0xAF468F962CAEFF3C), LazyThreadSafetyMode.None); + public string OpvarName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xAF468F962CAEFF3C)); + var ptr = _Handle.Read(_OpvarNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xAF468F962CAEFF3C, value); + set => Schema.SetString(_Handle, _OpvarNameOffset.Value, value); } + private static readonly Lazy _OpvarTypeOffset = new(() => Schema.GetOffset(0xAF468F96752C1313), LazyThreadSafetyMode.None); + public ref int OpvarType { - get => ref _Handle.AsRef(Schema.GetOffset(0xAF468F96752C1313)); + get => ref _Handle.AsRef(_OpvarTypeOffset.Value); } + private static readonly Lazy _OpvarIndexOffset = new(() => Schema.GetOffset(0xAF468F962482CE01), LazyThreadSafetyMode.None); + public ref int OpvarIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xAF468F962482CE01)); + get => ref _Handle.AsRef(_OpvarIndexOffset.Value); } + private static readonly Lazy _OpvarValueOffset = new(() => Schema.GetOffset(0xAF468F96D0681AAE), LazyThreadSafetyMode.None); + public ref float OpvarValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xAF468F96D0681AAE)); + get => ref _Handle.AsRef(_OpvarValueOffset.Value); } + private static readonly Lazy _OpvarValueStringOffset = new(() => Schema.GetOffset(0xAF468F96D2422B1D), LazyThreadSafetyMode.None); + public string OpvarValueString { get { - var ptr = _Handle.Read(Schema.GetOffset(0xAF468F96D2422B1D)); + var ptr = _Handle.Read(_OpvarValueStringOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xAF468F96D2422B1D, value); + set => Schema.SetString(_Handle, _OpvarValueStringOffset.Value, value); } + private static readonly Lazy _SetOnSpawnOffset = new(() => Schema.GetOffset(0xAF468F96749B637D), LazyThreadSafetyMode.None); + public ref bool SetOnSpawn { - get => ref _Handle.AsRef(Schema.GetOffset(0xAF468F96749B637D)); + get => ref _Handle.AsRef(_SetOnSpawnOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetOBBEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetOBBEntityImpl.cs index 8795f3d65..777ea0f12 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetOBBEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetOBBEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetOBBWindEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetOBBWindEntityImpl.cs index ae2fe508e..406538ba9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetOBBWindEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetOBBWindEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CSoundOpvarSetOBBWindEntityImpl : CSoundOpvarSetPointBase public CSoundOpvarSetOBBWindEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinsOffset = new(() => Schema.GetOffset(0xEC8310EF421BB730), LazyThreadSafetyMode.None); + public ref Vector Mins { - get => ref _Handle.AsRef(Schema.GetOffset(0xEC8310EF421BB730)); + get => ref _Handle.AsRef(_MinsOffset.Value); } + private static readonly Lazy _MaxsOffset = new(() => Schema.GetOffset(0xEC8310EFC0C1CE6A), LazyThreadSafetyMode.None); + public ref Vector Maxs { - get => ref _Handle.AsRef(Schema.GetOffset(0xEC8310EFC0C1CE6A)); + get => ref _Handle.AsRef(_MaxsOffset.Value); } + private static readonly Lazy _DistanceMinsOffset = new(() => Schema.GetOffset(0xEC8310EF84189833), LazyThreadSafetyMode.None); + public ref Vector DistanceMins { - get => ref _Handle.AsRef(Schema.GetOffset(0xEC8310EF84189833)); + get => ref _Handle.AsRef(_DistanceMinsOffset.Value); } + private static readonly Lazy _DistanceMaxsOffset = new(() => Schema.GetOffset(0xEC8310EF2AF856F1), LazyThreadSafetyMode.None); + public ref Vector DistanceMaxs { - get => ref _Handle.AsRef(Schema.GetOffset(0xEC8310EF2AF856F1)); + get => ref _Handle.AsRef(_DistanceMaxsOffset.Value); } + private static readonly Lazy _WindMinOffset = new(() => Schema.GetOffset(0xEC8310EF24871B93), LazyThreadSafetyMode.None); + public ref float WindMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xEC8310EF24871B93)); + get => ref _Handle.AsRef(_WindMinOffset.Value); } + private static readonly Lazy _WindMaxOffset = new(() => Schema.GetOffset(0xEC8310EF3A9C58ED), LazyThreadSafetyMode.None); + public ref float WindMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xEC8310EF3A9C58ED)); + get => ref _Handle.AsRef(_WindMaxOffset.Value); } + private static readonly Lazy _WindMapMinOffset = new(() => Schema.GetOffset(0xEC8310EF2A2DE5A7), LazyThreadSafetyMode.None); + public ref float WindMapMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xEC8310EF2A2DE5A7)); + get => ref _Handle.AsRef(_WindMapMinOffset.Value); } + private static readonly Lazy _WindMapMaxOffset = new(() => Schema.GetOffset(0xEC8310EF1842E409), LazyThreadSafetyMode.None); + public ref float WindMapMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xEC8310EF1842E409)); + get => ref _Handle.AsRef(_WindMapMaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetPathCornerEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetPathCornerEntityImpl.cs index 059a6fd40..c7a05811e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetPathCornerEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetPathCornerEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class CSoundOpvarSetPathCornerEntityImpl : CSoundOpvarSetPointE public CSoundOpvarSetPathCornerEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _DistMinSqrOffset = new(() => Schema.GetOffset(0x368409543D1989CD), LazyThreadSafetyMode.None); + public ref float DistMinSqr { - get => ref _Handle.AsRef(Schema.GetOffset(0x368409543D1989CD)); + get => ref _Handle.AsRef(_DistMinSqrOffset.Value); } + private static readonly Lazy _DistMaxSqrOffset = new(() => Schema.GetOffset(0x36840954993EE3BF), LazyThreadSafetyMode.None); + public ref float DistMaxSqr { - get => ref _Handle.AsRef(Schema.GetOffset(0x36840954993EE3BF)); + get => ref _Handle.AsRef(_DistMaxSqrOffset.Value); } + private static readonly Lazy _PathCornerEntityNameOffset = new(() => Schema.GetOffset(0x36840954EF6D6403), LazyThreadSafetyMode.None); + public string PathCornerEntityName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x36840954EF6D6403)); + var ptr = _Handle.Read(_PathCornerEntityNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x36840954EF6D6403, value); + set => Schema.SetString(_Handle, _PathCornerEntityNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetPointBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetPointBaseImpl.cs index 60f46ccda..b4653cd1d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetPointBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetPointBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,48 +17,66 @@ internal partial class CSoundOpvarSetPointBaseImpl : CBaseEntityImpl, CSoundOpva public CSoundOpvarSetPointBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0x6C95A3E03A7C5965), LazyThreadSafetyMode.None); + public ref bool Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C95A3E03A7C5965)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _SourceOffset = new(() => Schema.GetOffset(0x6C95A3E033D3CD82), LazyThreadSafetyMode.None); + public ref CHandle Source { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6C95A3E033D3CD82)); + get => ref _Handle.AsRef>(_SourceOffset.Value); } + private static readonly Lazy _SourceEntityNameOffset = new(() => Schema.GetOffset(0x6C95A3E06C1387C0), LazyThreadSafetyMode.None); + public string SourceEntityName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6C95A3E06C1387C0)); + var ptr = _Handle.Read(_SourceEntityNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6C95A3E06C1387C0, value); + set => Schema.SetString(_Handle, _SourceEntityNameOffset.Value, value); } + private static readonly Lazy _LastPositionOffset = new(() => Schema.GetOffset(0x6C95A3E0A5B68002), LazyThreadSafetyMode.None); + public ref Vector LastPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C95A3E0A5B68002)); + get => ref _Handle.AsRef(_LastPositionOffset.Value); } + private static readonly Lazy _StackNameOffset = new(() => Schema.GetOffset(0x6C95A3E03B3E9CD4), LazyThreadSafetyMode.None); + public string StackName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6C95A3E03B3E9CD4)); + var ptr = _Handle.Read(_StackNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6C95A3E03B3E9CD4, value); + set => Schema.SetString(_Handle, _StackNameOffset.Value, value); } + private static readonly Lazy _OperatorNameOffset = new(() => Schema.GetOffset(0x6C95A3E0F6140996), LazyThreadSafetyMode.None); + public string OperatorName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6C95A3E0F6140996)); + var ptr = _Handle.Read(_OperatorNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6C95A3E0F6140996, value); + set => Schema.SetString(_Handle, _OperatorNameOffset.Value, value); } + private static readonly Lazy _OpvarNameOffset = new(() => Schema.GetOffset(0x6C95A3E02CAEFF3C), LazyThreadSafetyMode.None); + public string OpvarName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6C95A3E02CAEFF3C)); + var ptr = _Handle.Read(_OpvarNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6C95A3E02CAEFF3C, value); + set => Schema.SetString(_Handle, _OpvarNameOffset.Value, value); } + private static readonly Lazy _OpvarIndexOffset = new(() => Schema.GetOffset(0x6C95A3E0BC170C34), LazyThreadSafetyMode.None); + public ref int OpvarIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C95A3E0BC170C34)); + get => ref _Handle.AsRef(_OpvarIndexOffset.Value); } + private static readonly Lazy _UseAutoCompareOffset = new(() => Schema.GetOffset(0x6C95A3E0E8C88ED2), LazyThreadSafetyMode.None); + public ref bool UseAutoCompare { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C95A3E0E8C88ED2)); + get => ref _Handle.AsRef(_UseAutoCompareOffset.Value); } public void StackNameUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetPointEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetPointEntityImpl.cs index 19781adfa..d0dc98f89 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetPointEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundOpvarSetPointEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,81 +17,129 @@ internal partial class CSoundOpvarSetPointEntityImpl : CSoundOpvarSetPointBaseIm public CSoundOpvarSetPointEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnEnterOffset = new(() => Schema.GetOffset(0x20C7B9D2BEFE0C56), LazyThreadSafetyMode.None); + public CEntityIOOutput OnEnter { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x20C7B9D2BEFE0C56)); + get => new CEntityIOOutputImpl(_Handle + _OnEnterOffset.Value); } + private static readonly Lazy _OnExitOffset = new(() => Schema.GetOffset(0x20C7B9D2DBE3B800), LazyThreadSafetyMode.None); + public CEntityIOOutput OnExit { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x20C7B9D2DBE3B800)); + get => new CEntityIOOutputImpl(_Handle + _OnExitOffset.Value); } + private static readonly Lazy _AutoDisableOffset = new(() => Schema.GetOffset(0x20C7B9D2EB2D561E), LazyThreadSafetyMode.None); + public ref bool AutoDisable { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D2EB2D561E)); + get => ref _Handle.AsRef(_AutoDisableOffset.Value); } + private static readonly Lazy _DistanceMinOffset = new(() => Schema.GetOffset(0x20C7B9D2EFD80FE4), LazyThreadSafetyMode.None); + public ref float DistanceMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D2EFD80FE4)); + get => ref _Handle.AsRef(_DistanceMinOffset.Value); } + private static readonly Lazy _DistanceMaxOffset = new(() => Schema.GetOffset(0x20C7B9D2FDEBADA6), LazyThreadSafetyMode.None); + public ref float DistanceMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D2FDEBADA6)); + get => ref _Handle.AsRef(_DistanceMaxOffset.Value); } + private static readonly Lazy _DistanceMapMinOffset = new(() => Schema.GetOffset(0x20C7B9D20597EACA), LazyThreadSafetyMode.None); + public ref float DistanceMapMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D20597EACA)); + get => ref _Handle.AsRef(_DistanceMapMinOffset.Value); } + private static readonly Lazy _DistanceMapMaxOffset = new(() => Schema.GetOffset(0x20C7B9D20FAB8240), LazyThreadSafetyMode.None); + public ref float DistanceMapMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D20FAB8240)); + get => ref _Handle.AsRef(_DistanceMapMaxOffset.Value); } + private static readonly Lazy _OcclusionRadiusOffset = new(() => Schema.GetOffset(0x20C7B9D289718616), LazyThreadSafetyMode.None); + public ref float OcclusionRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D289718616)); + get => ref _Handle.AsRef(_OcclusionRadiusOffset.Value); } + private static readonly Lazy _OcclusionMinOffset = new(() => Schema.GetOffset(0x20C7B9D262E6EDCC), LazyThreadSafetyMode.None); + public ref float OcclusionMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D262E6EDCC)); + get => ref _Handle.AsRef(_OcclusionMinOffset.Value); } + private static readonly Lazy _OcclusionMaxOffset = new(() => Schema.GetOffset(0x20C7B9D270D37C1E), LazyThreadSafetyMode.None); + public ref float OcclusionMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D270D37C1E)); + get => ref _Handle.AsRef(_OcclusionMaxOffset.Value); } + private static readonly Lazy _ValSetOnDisableOffset = new(() => Schema.GetOffset(0x20C7B9D2B0981239), LazyThreadSafetyMode.None); + public ref float ValSetOnDisable { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D2B0981239)); + get => ref _Handle.AsRef(_ValSetOnDisableOffset.Value); } + private static readonly Lazy _SetValueOnDisableOffset = new(() => Schema.GetOffset(0x20C7B9D2C65C0E77), LazyThreadSafetyMode.None); + public ref bool SetValueOnDisable { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D2C65C0E77)); + get => ref _Handle.AsRef(_SetValueOnDisableOffset.Value); } + private static readonly Lazy _ReloadingOffset = new(() => Schema.GetOffset(0x20C7B9D2214BCD0C), LazyThreadSafetyMode.None); + public ref bool Reloading { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D2214BCD0C)); + get => ref _Handle.AsRef(_ReloadingOffset.Value); } + private static readonly Lazy _SimulationModeOffset = new(() => Schema.GetOffset(0x20C7B9D2F03B8CF9), LazyThreadSafetyMode.None); + public ref int SimulationMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D2F03B8CF9)); + get => ref _Handle.AsRef(_SimulationModeOffset.Value); } + private static readonly Lazy _VisibilitySamplesOffset = new(() => Schema.GetOffset(0x20C7B9D26F7CDB90), LazyThreadSafetyMode.None); + public ref int VisibilitySamples { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D26F7CDB90)); + get => ref _Handle.AsRef(_VisibilitySamplesOffset.Value); } + private static readonly Lazy _DynamicProxyPointOffset = new(() => Schema.GetOffset(0x20C7B9D27E7B7DE0), LazyThreadSafetyMode.None); + public ref Vector DynamicProxyPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D27E7B7DE0)); + get => ref _Handle.AsRef(_DynamicProxyPointOffset.Value); } + private static readonly Lazy _DynamicMaximumOcclusionOffset = new(() => Schema.GetOffset(0x20C7B9D22C356E6F), LazyThreadSafetyMode.None); + public ref float DynamicMaximumOcclusion { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D22C356E6F)); + get => ref _Handle.AsRef(_DynamicMaximumOcclusionOffset.Value); } + private static readonly Lazy _DynamicEntityOffset = new(() => Schema.GetOffset(0x20C7B9D235753447), LazyThreadSafetyMode.None); + public ref CHandle DynamicEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x20C7B9D235753447)); + get => ref _Handle.AsRef>(_DynamicEntityOffset.Value); } + private static readonly Lazy _DynamicEntityNameOffset = new(() => Schema.GetOffset(0x20C7B9D28FB78B06), LazyThreadSafetyMode.None); + public string DynamicEntityName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x20C7B9D28FB78B06)); + var ptr = _Handle.Read(_DynamicEntityNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x20C7B9D28FB78B06, value); + set => Schema.SetString(_Handle, _DynamicEntityNameOffset.Value, value); } + private static readonly Lazy _PathingDistanceNormFactorOffset = new(() => Schema.GetOffset(0x20C7B9D25735CE5A), LazyThreadSafetyMode.None); + public ref float PathingDistanceNormFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D25735CE5A)); + get => ref _Handle.AsRef(_PathingDistanceNormFactorOffset.Value); } + private static readonly Lazy _PathingSourcePosOffset = new(() => Schema.GetOffset(0x20C7B9D209C40953), LazyThreadSafetyMode.None); + public ref Vector PathingSourcePos { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D209C40953)); + get => ref _Handle.AsRef(_PathingSourcePosOffset.Value); } + private static readonly Lazy _PathingListenerPosOffset = new(() => Schema.GetOffset(0x20C7B9D271BDE848), LazyThreadSafetyMode.None); + public ref Vector PathingListenerPos { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D271BDE848)); + get => ref _Handle.AsRef(_PathingListenerPosOffset.Value); } + private static readonly Lazy _PathingDirectionOffset = new(() => Schema.GetOffset(0x20C7B9D2CFA4D6D3), LazyThreadSafetyMode.None); + public ref Vector PathingDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D2CFA4D6D3)); + get => ref _Handle.AsRef(_PathingDirectionOffset.Value); } + private static readonly Lazy _PathingSourceIndexOffset = new(() => Schema.GetOffset(0x20C7B9D2830DE611), LazyThreadSafetyMode.None); + public ref int PathingSourceIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x20C7B9D2830DE611)); + get => ref _Handle.AsRef(_PathingSourceIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundPatchImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundPatchImpl.cs index 837a7a23a..1c8714717 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundPatchImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundPatchImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,52 +17,78 @@ internal partial class CSoundPatchImpl : SchemaClass, CSoundPatch { public CSoundPatchImpl(nint handle) : base(handle) { } + private static readonly Lazy _PitchOffset = new(() => Schema.GetOffset(0xBE66ED3D12AC36D1), LazyThreadSafetyMode.None); + public CSoundEnvelope Pitch { - get => new CSoundEnvelopeImpl(_Handle + Schema.GetOffset(0xBE66ED3D12AC36D1)); + get => new CSoundEnvelopeImpl(_Handle + _PitchOffset.Value); } + private static readonly Lazy _VolumeOffset = new(() => Schema.GetOffset(0xBE66ED3DE3962F2F), LazyThreadSafetyMode.None); + public CSoundEnvelope Volume { - get => new CSoundEnvelopeImpl(_Handle + Schema.GetOffset(0xBE66ED3DE3962F2F)); + get => new CSoundEnvelopeImpl(_Handle + _VolumeOffset.Value); } + private static readonly Lazy _ShutdownTimeOffset = new(() => Schema.GetOffset(0xBE66ED3DFA135362), LazyThreadSafetyMode.None); + public ref float ShutdownTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE66ED3DFA135362)); + get => ref _Handle.AsRef(_ShutdownTimeOffset.Value); } + private static readonly Lazy _LastTimeOffset = new(() => Schema.GetOffset(0xBE66ED3D2E79549E), LazyThreadSafetyMode.None); + public ref float LastTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE66ED3D2E79549E)); + get => ref _Handle.AsRef(_LastTimeOffset.Value); } + private static readonly Lazy _SoundScriptNameOffset = new(() => Schema.GetOffset(0xBE66ED3D6486B844), LazyThreadSafetyMode.None); + public string SoundScriptName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xBE66ED3D6486B844)); + var ptr = _Handle.Read(_SoundScriptNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xBE66ED3D6486B844, value); + set => Schema.SetString(_Handle, _SoundScriptNameOffset.Value, value); } + private static readonly Lazy _EntOffset = new(() => Schema.GetOffset(0xBE66ED3D8BBDB334), LazyThreadSafetyMode.None); + public ref CHandle Ent { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBE66ED3D8BBDB334)); + get => ref _Handle.AsRef>(_EntOffset.Value); } + private static readonly Lazy _SoundEntityIndexOffset = new(() => Schema.GetOffset(0xBE66ED3DEC098195), LazyThreadSafetyMode.None); + public ref uint SoundEntityIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE66ED3DEC098195)); + get => ref _Handle.AsRef(_SoundEntityIndexOffset.Value); } + private static readonly Lazy _SoundOriginOffset = new(() => Schema.GetOffset(0xBE66ED3D384D083E), LazyThreadSafetyMode.None); + public ref Vector SoundOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE66ED3D384D083E)); + get => ref _Handle.AsRef(_SoundOriginOffset.Value); } + private static readonly Lazy _IsPlayingOffset = new(() => Schema.GetOffset(0xBE66ED3D71CADDE5), LazyThreadSafetyMode.None); + public ref int IsPlaying { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE66ED3D71CADDE5)); + get => ref _Handle.AsRef(_IsPlayingOffset.Value); } + private static readonly Lazy _FilterOffset = new(() => Schema.GetOffset(0xBE66ED3D368220F7), LazyThreadSafetyMode.None); + public CCopyRecipientFilter Filter { - get => new CCopyRecipientFilterImpl(_Handle + Schema.GetOffset(0xBE66ED3D368220F7)); + get => new CCopyRecipientFilterImpl(_Handle + _FilterOffset.Value); } + private static readonly Lazy _CloseCaptionDurationOffset = new(() => Schema.GetOffset(0xBE66ED3D71B7507D), LazyThreadSafetyMode.None); + public ref float CloseCaptionDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE66ED3D71B7507D)); + get => ref _Handle.AsRef(_CloseCaptionDurationOffset.Value); } + private static readonly Lazy _UpdatedSoundOriginOffset = new(() => Schema.GetOffset(0xBE66ED3DACCF22F1), LazyThreadSafetyMode.None); + public ref bool UpdatedSoundOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE66ED3DACCF22F1)); + get => ref _Handle.AsRef(_UpdatedSoundOriginOffset.Value); } + private static readonly Lazy _ClassNameOffset = new(() => Schema.GetOffset(0xBE66ED3D71BB2314), LazyThreadSafetyMode.None); + public string ClassName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xBE66ED3D71BB2314)); + var ptr = _Handle.Read(_ClassNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xBE66ED3D71BB2314, value); + set => Schema.SetString(_Handle, _ClassNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundStackSaveImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundStackSaveImpl.cs index b80a42999..ca0a79845 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundStackSaveImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSoundStackSaveImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class CSoundStackSaveImpl : CLogicalEntityImpl, CSoundStackSave public CSoundStackSaveImpl(nint handle) : base(handle) { } + private static readonly Lazy _StackNameOffset = new(() => Schema.GetOffset(0xF9E7A22E3B3E9CD4), LazyThreadSafetyMode.None); + public string StackName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF9E7A22E3B3E9CD4)); + var ptr = _Handle.Read(_StackNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF9E7A22E3B3E9CD4, value); + set => Schema.SetString(_Handle, _StackNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpeedScaleUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpeedScaleUpdateNodeImpl.cs index 7608d23af..c10800c90 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpeedScaleUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpeedScaleUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CSpeedScaleUpdateNodeImpl : CUnaryUpdateNodeImpl, CSpeedS public CSpeedScaleUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParamIndexOffset = new(() => Schema.GetOffset(0xD43012BC61990A86), LazyThreadSafetyMode.None); + public CAnimParamHandle ParamIndex { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xD43012BC61990A86)); + get => new CAnimParamHandleImpl(_Handle + _ParamIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpinUpdateBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpinUpdateBaseImpl.cs index 137bb9a89..36409e3f0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpinUpdateBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpinUpdateBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSplineConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSplineConstraintImpl.cs index d30db861d..d12818ecc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSplineConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSplineConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,47 +17,75 @@ internal partial class CSplineConstraintImpl : CPhysConstraintImpl, CSplineConst public CSplineConstraintImpl(nint handle) : base(handle) { } + private static readonly Lazy _AnchorOffsetRestoreOffset = new(() => Schema.GetOffset(0xC2DC06A0E08CAB0B), LazyThreadSafetyMode.None); + public ref Vector AnchorOffsetRestore { - get => ref _Handle.AsRef(Schema.GetOffset(0xC2DC06A0E08CAB0B)); + get => ref _Handle.AsRef(_AnchorOffsetRestoreOffset.Value); } + private static readonly Lazy _SplineEntityOffset = new(() => Schema.GetOffset(0xC2DC06A0C3BD15D5), LazyThreadSafetyMode.None); + public ref CHandle SplineEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC2DC06A0C3BD15D5)); + get => ref _Handle.AsRef>(_SplineEntityOffset.Value); } + private static readonly Lazy _EnableLateralConstraintOffset = new(() => Schema.GetOffset(0xC2DC06A0B19E8CC2), LazyThreadSafetyMode.None); + public ref bool EnableLateralConstraint { - get => ref _Handle.AsRef(Schema.GetOffset(0xC2DC06A0B19E8CC2)); + get => ref _Handle.AsRef(_EnableLateralConstraintOffset.Value); } + private static readonly Lazy _EnableVerticalConstraintOffset = new(() => Schema.GetOffset(0xC2DC06A0767B49F3), LazyThreadSafetyMode.None); + public ref bool EnableVerticalConstraint { - get => ref _Handle.AsRef(Schema.GetOffset(0xC2DC06A0767B49F3)); + get => ref _Handle.AsRef(_EnableVerticalConstraintOffset.Value); } + private static readonly Lazy _EnableAngularConstraintOffset = new(() => Schema.GetOffset(0xC2DC06A0F98A5C8B), LazyThreadSafetyMode.None); + public ref bool EnableAngularConstraint { - get => ref _Handle.AsRef(Schema.GetOffset(0xC2DC06A0F98A5C8B)); + get => ref _Handle.AsRef(_EnableAngularConstraintOffset.Value); } + private static readonly Lazy _EnableLimitOffset = new(() => Schema.GetOffset(0xC2DC06A044207D3D), LazyThreadSafetyMode.None); + public ref bool EnableLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0xC2DC06A044207D3D)); + get => ref _Handle.AsRef(_EnableLimitOffset.Value); } + private static readonly Lazy _FireEventsOnPathOffset = new(() => Schema.GetOffset(0xC2DC06A00576E172), LazyThreadSafetyMode.None); + public ref bool FireEventsOnPath { - get => ref _Handle.AsRef(Schema.GetOffset(0xC2DC06A00576E172)); + get => ref _Handle.AsRef(_FireEventsOnPathOffset.Value); } + private static readonly Lazy _LinearFrequencyOffset = new(() => Schema.GetOffset(0xC2DC06A02FE6B034), LazyThreadSafetyMode.None); + public ref float LinearFrequency { - get => ref _Handle.AsRef(Schema.GetOffset(0xC2DC06A02FE6B034)); + get => ref _Handle.AsRef(_LinearFrequencyOffset.Value); } + private static readonly Lazy _LinarDampingRatioOffset = new(() => Schema.GetOffset(0xC2DC06A0E8F28508), LazyThreadSafetyMode.None); + public ref float LinarDampingRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0xC2DC06A0E8F28508)); + get => ref _Handle.AsRef(_LinarDampingRatioOffset.Value); } + private static readonly Lazy _JointFrictionOffset = new(() => Schema.GetOffset(0xC2DC06A05CA9FD47), LazyThreadSafetyMode.None); + public ref float JointFriction { - get => ref _Handle.AsRef(Schema.GetOffset(0xC2DC06A05CA9FD47)); + get => ref _Handle.AsRef(_JointFrictionOffset.Value); } + private static readonly Lazy _TransitionTimeOffset = new(() => Schema.GetOffset(0xC2DC06A08D4BFC39), LazyThreadSafetyMode.None); + public ref float TransitionTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xC2DC06A08D4BFC39)); + get => ref _Handle.AsRef(_TransitionTimeOffset.Value); } + private static readonly Lazy _PreSolveAnchorPosOffset = new(() => Schema.GetOffset(0xC2DC06A0C7C3B9AE), LazyThreadSafetyMode.None); + public ref Vector PreSolveAnchorPos { - get => ref _Handle.AsRef(Schema.GetOffset(0xC2DC06A0C7C3B9AE)); + get => ref _Handle.AsRef(_PreSolveAnchorPosOffset.Value); } + private static readonly Lazy _StartTransitionTimeOffset = new(() => Schema.GetOffset(0xC2DC06A0527F6AA9), LazyThreadSafetyMode.None); + public GameTime_t StartTransitionTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xC2DC06A0527F6AA9)); + get => new GameTime_tImpl(_Handle + _StartTransitionTimeOffset.Value); } + private static readonly Lazy _TangentSpaceAnchorAtTransitionStartOffset = new(() => Schema.GetOffset(0xC2DC06A0743F2C75), LazyThreadSafetyMode.None); + public ref Vector TangentSpaceAnchorAtTransitionStart { - get => ref _Handle.AsRef(Schema.GetOffset(0xC2DC06A0743F2C75)); + get => ref _Handle.AsRef(_TangentSpaceAnchorAtTransitionStartOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpotlightEndImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpotlightEndImpl.cs index 27b6ce171..ee19994a0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpotlightEndImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpotlightEndImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CSpotlightEndImpl : CBaseModelEntityImpl, CSpotlightEnd { public CSpotlightEndImpl(nint handle) : base(handle) { } + private static readonly Lazy _LightScaleOffset = new(() => Schema.GetOffset(0x49085AA3E5A1295D), LazyThreadSafetyMode.None); + public ref float LightScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x49085AA3E5A1295D)); + get => ref _Handle.AsRef(_LightScaleOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x49085AA37C5B0533), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x49085AA37C5B0533)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _SpotlightDirOffset = new(() => Schema.GetOffset(0x49085AA3EE68984A), LazyThreadSafetyMode.None); + public ref Vector SpotlightDir { - get => ref _Handle.AsRef(Schema.GetOffset(0x49085AA3EE68984A)); + get => ref _Handle.AsRef(_SpotlightDirOffset.Value); } + private static readonly Lazy _SpotlightOrgOffset = new(() => Schema.GetOffset(0x49085AA34C84B367), LazyThreadSafetyMode.None); + public ref Vector SpotlightOrg { - get => ref _Handle.AsRef(Schema.GetOffset(0x49085AA34C84B367)); + get => ref _Handle.AsRef(_SpotlightOrgOffset.Value); } public void LightScaleUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpriteAlias_env_glowImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpriteAlias_env_glowImpl.cs index 5e9516e0b..0b3297eaf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpriteAlias_env_glowImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpriteAlias_env_glowImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpriteImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpriteImpl.cs index 6f3926a09..277613e2f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpriteImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpriteImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,74 +17,120 @@ internal partial class CSpriteImpl : CBaseModelEntityImpl, CSprite { public CSpriteImpl(nint handle) : base(handle) { } + private static readonly Lazy _SpriteMaterialOffset = new(() => Schema.GetOffset(0xAAF88CE378793443), LazyThreadSafetyMode.None); + public ref CStrongHandle SpriteMaterial { - get => ref _Handle.AsRef>(Schema.GetOffset(0xAAF88CE378793443)); + get => ref _Handle.AsRef>(_SpriteMaterialOffset.Value); } + private static readonly Lazy _AttachedToEntityOffset = new(() => Schema.GetOffset(0xAAF88CE3FDEAA64D), LazyThreadSafetyMode.None); + public ref CHandle AttachedToEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0xAAF88CE3FDEAA64D)); + get => ref _Handle.AsRef>(_AttachedToEntityOffset.Value); } + private static readonly Lazy _AttachmentOffset = new(() => Schema.GetOffset(0xAAF88CE3E3BF4024), LazyThreadSafetyMode.None); + public AttachmentHandle_t Attachment { - get => new AttachmentHandle_tImpl(_Handle + Schema.GetOffset(0xAAF88CE3E3BF4024)); + get => new AttachmentHandle_tImpl(_Handle + _AttachmentOffset.Value); } + private static readonly Lazy _SpriteFramerateOffset = new(() => Schema.GetOffset(0xAAF88CE3E156249D), LazyThreadSafetyMode.None); + public ref float SpriteFramerate { - get => ref _Handle.AsRef(Schema.GetOffset(0xAAF88CE3E156249D)); + get => ref _Handle.AsRef(_SpriteFramerateOffset.Value); } + private static readonly Lazy _FrameOffset = new(() => Schema.GetOffset(0xAAF88CE3F836C9F4), LazyThreadSafetyMode.None); + public ref float Frame { - get => ref _Handle.AsRef(Schema.GetOffset(0xAAF88CE3F836C9F4)); + get => ref _Handle.AsRef(_FrameOffset.Value); } + private static readonly Lazy _DieTimeOffset = new(() => Schema.GetOffset(0xAAF88CE361B33206), LazyThreadSafetyMode.None); + public GameTime_t DieTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xAAF88CE361B33206)); + get => new GameTime_tImpl(_Handle + _DieTimeOffset.Value); } + private static readonly Lazy _BrightnessOffset = new(() => Schema.GetOffset(0xAAF88CE3A4C26AE6), LazyThreadSafetyMode.None); + public ref uint Brightness { - get => ref _Handle.AsRef(Schema.GetOffset(0xAAF88CE3A4C26AE6)); + get => ref _Handle.AsRef(_BrightnessOffset.Value); } + private static readonly Lazy _BrightnessDurationOffset = new(() => Schema.GetOffset(0xAAF88CE36700BD7C), LazyThreadSafetyMode.None); + public ref float BrightnessDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0xAAF88CE36700BD7C)); + get => ref _Handle.AsRef(_BrightnessDurationOffset.Value); } + private static readonly Lazy _SpriteScaleOffset = new(() => Schema.GetOffset(0xAAF88CE3E39D2B84), LazyThreadSafetyMode.None); + public ref float SpriteScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xAAF88CE3E39D2B84)); + get => ref _Handle.AsRef(_SpriteScaleOffset.Value); } + private static readonly Lazy _ScaleDurationOffset = new(() => Schema.GetOffset(0xAAF88CE35F21994B), LazyThreadSafetyMode.None); + public ref float ScaleDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0xAAF88CE35F21994B)); + get => ref _Handle.AsRef(_ScaleDurationOffset.Value); } + private static readonly Lazy _WorldSpaceScaleOffset = new(() => Schema.GetOffset(0xAAF88CE37E045A3F), LazyThreadSafetyMode.None); + public ref bool WorldSpaceScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xAAF88CE37E045A3F)); + get => ref _Handle.AsRef(_WorldSpaceScaleOffset.Value); } + private static readonly Lazy _GlowProxySizeOffset = new(() => Schema.GetOffset(0xAAF88CE3C4210897), LazyThreadSafetyMode.None); + public ref float GlowProxySize { - get => ref _Handle.AsRef(Schema.GetOffset(0xAAF88CE3C4210897)); + get => ref _Handle.AsRef(_GlowProxySizeOffset.Value); } + private static readonly Lazy _HDRColorScaleOffset = new(() => Schema.GetOffset(0xAAF88CE3C930B3E8), LazyThreadSafetyMode.None); + public ref float HDRColorScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xAAF88CE3C930B3E8)); + get => ref _Handle.AsRef(_HDRColorScaleOffset.Value); } + private static readonly Lazy _LastTimeOffset = new(() => Schema.GetOffset(0xAAF88CE32E79549E), LazyThreadSafetyMode.None); + public GameTime_t LastTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xAAF88CE32E79549E)); + get => new GameTime_tImpl(_Handle + _LastTimeOffset.Value); } + private static readonly Lazy _MaxFrameOffset = new(() => Schema.GetOffset(0xAAF88CE397F185CC), LazyThreadSafetyMode.None); + public ref float MaxFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0xAAF88CE397F185CC)); + get => ref _Handle.AsRef(_MaxFrameOffset.Value); } + private static readonly Lazy _StartScaleOffset = new(() => Schema.GetOffset(0xAAF88CE3634567D1), LazyThreadSafetyMode.None); + public ref float StartScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xAAF88CE3634567D1)); + get => ref _Handle.AsRef(_StartScaleOffset.Value); } + private static readonly Lazy _DestScaleOffset = new(() => Schema.GetOffset(0xAAF88CE341A20F83), LazyThreadSafetyMode.None); + public ref float DestScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xAAF88CE341A20F83)); + get => ref _Handle.AsRef(_DestScaleOffset.Value); } + private static readonly Lazy _ScaleTimeStartOffset = new(() => Schema.GetOffset(0xAAF88CE303EA4A2E), LazyThreadSafetyMode.None); + public GameTime_t ScaleTimeStart { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xAAF88CE303EA4A2E)); + get => new GameTime_tImpl(_Handle + _ScaleTimeStartOffset.Value); } + private static readonly Lazy _StartBrightnessOffset = new(() => Schema.GetOffset(0xAAF88CE3A9C01268), LazyThreadSafetyMode.None); + public ref int StartBrightness { - get => ref _Handle.AsRef(Schema.GetOffset(0xAAF88CE3A9C01268)); + get => ref _Handle.AsRef(_StartBrightnessOffset.Value); } + private static readonly Lazy _DestBrightnessOffset = new(() => Schema.GetOffset(0xAAF88CE38627AE5E), LazyThreadSafetyMode.None); + public ref int DestBrightness { - get => ref _Handle.AsRef(Schema.GetOffset(0xAAF88CE38627AE5E)); + get => ref _Handle.AsRef(_DestBrightnessOffset.Value); } + private static readonly Lazy _BrightnessTimeStartOffset = new(() => Schema.GetOffset(0xAAF88CE3478AFDAF), LazyThreadSafetyMode.None); + public GameTime_t BrightnessTimeStart { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xAAF88CE3478AFDAF)); + get => new GameTime_tImpl(_Handle + _BrightnessTimeStartOffset.Value); } + private static readonly Lazy _SpriteWidthOffset = new(() => Schema.GetOffset(0xAAF88CE3F10EC104), LazyThreadSafetyMode.None); + public ref int SpriteWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0xAAF88CE3F10EC104)); + get => ref _Handle.AsRef(_SpriteWidthOffset.Value); } + private static readonly Lazy _SpriteHeightOffset = new(() => Schema.GetOffset(0xAAF88CE36BAED033), LazyThreadSafetyMode.None); + public ref int SpriteHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0xAAF88CE36BAED033)); + get => ref _Handle.AsRef(_SpriteHeightOffset.Value); } public void SpriteMaterialUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpriteOrientedImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpriteOrientedImpl.cs index b0e05ecc5..e90649865 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpriteOrientedImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSpriteOrientedImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStanceOverrideUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStanceOverrideUpdateNodeImpl.cs index 305df699d..8615a60ae 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStanceOverrideUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStanceOverrideUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CStanceOverrideUpdateNodeImpl : CUnaryUpdateNodeImpl, CSt public CStanceOverrideUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _FootStanceInfoOffset = new(() => Schema.GetOffset(0x322EE1B7D5687289), LazyThreadSafetyMode.None); + public ref CUtlVector FootStanceInfo { - get => ref _Handle.AsRef>(Schema.GetOffset(0x322EE1B7D5687289)); + get => ref _Handle.AsRef>(_FootStanceInfoOffset.Value); } + private static readonly Lazy _StanceSourceNodeOffset = new(() => Schema.GetOffset(0x322EE1B7D25DA07A), LazyThreadSafetyMode.None); + public CAnimUpdateNodeRef StanceSourceNode { - get => new CAnimUpdateNodeRefImpl(_Handle + Schema.GetOffset(0x322EE1B7D25DA07A)); + get => new CAnimUpdateNodeRefImpl(_Handle + _StanceSourceNodeOffset.Value); } + private static readonly Lazy _ParameterOffset = new(() => Schema.GetOffset(0x322EE1B70C7008F6), LazyThreadSafetyMode.None); + public CAnimParamHandle Parameter { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x322EE1B70C7008F6)); + get => new CAnimParamHandleImpl(_Handle + _ParameterOffset.Value); } + private static readonly Lazy _ModeOffset = new(() => Schema.GetOffset(0x322EE1B71050A633), LazyThreadSafetyMode.None); + public ref StanceOverrideMode Mode { - get => ref _Handle.AsRef(Schema.GetOffset(0x322EE1B71050A633)); + get => ref _Handle.AsRef(_ModeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStanceScaleUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStanceScaleUpdateNodeImpl.cs index 63b1ec290..9d3b8db8e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStanceScaleUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStanceScaleUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CStanceScaleUpdateNodeImpl : CUnaryUpdateNodeImpl, CStanc public CStanceScaleUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParamOffset = new(() => Schema.GetOffset(0xA2CC6975679286A4), LazyThreadSafetyMode.None); + public CAnimParamHandle Param { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xA2CC6975679286A4)); + get => new CAnimParamHandleImpl(_Handle + _ParamOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateActionUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateActionUpdaterImpl.cs index 05857b1a6..f2477e6ca 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateActionUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateActionUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CStateActionUpdaterImpl : SchemaClass, CStateActionUpdate public CStateActionUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _ActionOffset = new(() => Schema.GetOffset(0xCA33DCAAE9CB47D5), LazyThreadSafetyMode.None); + public SchemaUntypedField Action { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xCA33DCAAE9CB47D5)); + get => new SchemaUntypedField(_Handle + _ActionOffset.Value); } + private static readonly Lazy _BehaviorOffset = new(() => Schema.GetOffset(0xCA33DCAA436DB10A), LazyThreadSafetyMode.None); + public ref StateActionBehavior Behavior { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA33DCAA436DB10A)); + get => ref _Handle.AsRef(_BehaviorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateMachineComponentUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateMachineComponentUpdaterImpl.cs index 548f55fc1..de6effa63 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateMachineComponentUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateMachineComponentUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CStateMachineComponentUpdaterImpl : CAnimComponentUpdater public CStateMachineComponentUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _StateMachineOffset = new(() => Schema.GetOffset(0x25255200BB7EEF2F), LazyThreadSafetyMode.None); + public CAnimStateMachineUpdater StateMachine { - get => new CAnimStateMachineUpdaterImpl(_Handle + Schema.GetOffset(0x25255200BB7EEF2F)); + get => new CAnimStateMachineUpdaterImpl(_Handle + _StateMachineOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateMachineUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateMachineUpdateNodeImpl.cs index 93ab70aa3..332463e27 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateMachineUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateMachineUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CStateMachineUpdateNodeImpl : CAnimUpdateNodeBaseImpl, CS public CStateMachineUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _StateMachineOffset = new(() => Schema.GetOffset(0xE2E7B91DBB7EEF2F), LazyThreadSafetyMode.None); + public CAnimStateMachineUpdater StateMachine { - get => new CAnimStateMachineUpdaterImpl(_Handle + Schema.GetOffset(0xE2E7B91DBB7EEF2F)); + get => new CAnimStateMachineUpdaterImpl(_Handle + _StateMachineOffset.Value); } + private static readonly Lazy _StateDataOffset = new(() => Schema.GetOffset(0xE2E7B91D765EA6D6), LazyThreadSafetyMode.None); + public ref CUtlVector StateData { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE2E7B91D765EA6D6)); + get => ref _Handle.AsRef>(_StateDataOffset.Value); } + private static readonly Lazy _TransitionDataOffset = new(() => Schema.GetOffset(0xE2E7B91D730EEA72), LazyThreadSafetyMode.None); + public ref CUtlVector TransitionData { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE2E7B91D730EEA72)); + get => ref _Handle.AsRef>(_TransitionDataOffset.Value); } + private static readonly Lazy _BlockWaningTagsOffset = new(() => Schema.GetOffset(0xE2E7B91DB6999F75), LazyThreadSafetyMode.None); + public ref bool BlockWaningTags { - get => ref _Handle.AsRef(Schema.GetOffset(0xE2E7B91DB6999F75)); + get => ref _Handle.AsRef(_BlockWaningTagsOffset.Value); } + private static readonly Lazy _LockStateWhenWaningOffset = new(() => Schema.GetOffset(0xE2E7B91D105A8C95), LazyThreadSafetyMode.None); + public ref bool LockStateWhenWaning { - get => ref _Handle.AsRef(Schema.GetOffset(0xE2E7B91D105A8C95)); + get => ref _Handle.AsRef(_LockStateWhenWaningOffset.Value); } + private static readonly Lazy _ResetWhenActivatedOffset = new(() => Schema.GetOffset(0xE2E7B91DE7055CF7), LazyThreadSafetyMode.None); + public ref bool ResetWhenActivated { - get => ref _Handle.AsRef(Schema.GetOffset(0xE2E7B91DE7055CF7)); + get => ref _Handle.AsRef(_ResetWhenActivatedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateNodeStateDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateNodeStateDataImpl.cs index 882fe373d..26c242e3c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateNodeStateDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateNodeStateDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CStateNodeStateDataImpl : SchemaClass, CStateNodeStateDat public CStateNodeStateDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildOffset = new(() => Schema.GetOffset(0x6AB991A04A0B773F), LazyThreadSafetyMode.None); + public CAnimUpdateNodeRef Child { - get => new CAnimUpdateNodeRefImpl(_Handle + Schema.GetOffset(0x6AB991A04A0B773F)); + get => new CAnimUpdateNodeRefImpl(_Handle + _ChildOffset.Value); } + private static readonly Lazy _ExclusiveRootMotionOffset = new(() => Schema.GetOffset(0x6AB991A019C8014D), LazyThreadSafetyMode.None); + public SchemaUntypedField ExclusiveRootMotion { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x6AB991A019C8014D)); + get => new SchemaUntypedField(_Handle + _ExclusiveRootMotionOffset.Value); } + private static readonly Lazy _ExclusiveRootMotionFirstFrameOffset = new(() => Schema.GetOffset(0x6AB991A0220BA45A), LazyThreadSafetyMode.None); + public SchemaUntypedField ExclusiveRootMotionFirstFrame { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x6AB991A0220BA45A)); + get => new SchemaUntypedField(_Handle + _ExclusiveRootMotionFirstFrameOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateNodeTransitionDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateNodeTransitionDataImpl.cs index 0d56891da..e17ac419f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateNodeTransitionDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateNodeTransitionDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CStateNodeTransitionDataImpl : SchemaClass, CStateNodeTra public CStateNodeTransitionDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _CurveOffset = new(() => Schema.GetOffset(0xFC9FD460BFFA0B34), LazyThreadSafetyMode.None); + public CBlendCurve Curve { - get => new CBlendCurveImpl(_Handle + Schema.GetOffset(0xFC9FD460BFFA0B34)); + get => new CBlendCurveImpl(_Handle + _CurveOffset.Value); } + private static readonly Lazy _BlendDurationOffset = new(() => Schema.GetOffset(0xFC9FD460BC9B1228), LazyThreadSafetyMode.None); + public SchemaUntypedField BlendDuration { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xFC9FD460BC9B1228)); + get => new SchemaUntypedField(_Handle + _BlendDurationOffset.Value); } + private static readonly Lazy _ResetCycleValueOffset = new(() => Schema.GetOffset(0xFC9FD4609897AC3F), LazyThreadSafetyMode.None); + public SchemaUntypedField ResetCycleValue { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xFC9FD4609897AC3F)); + get => new SchemaUntypedField(_Handle + _ResetCycleValueOffset.Value); } + private static readonly Lazy _ResetOffset = new(() => Schema.GetOffset(0xFC9FD460F99F9AA0), LazyThreadSafetyMode.None); + public SchemaUntypedField Reset { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xFC9FD460F99F9AA0)); + get => new SchemaUntypedField(_Handle + _ResetOffset.Value); } + private static readonly Lazy _ResetCycleOptionOffset = new(() => Schema.GetOffset(0xFC9FD460A597A1E3), LazyThreadSafetyMode.None); + public SchemaUntypedField ResetCycleOption { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xFC9FD460A597A1E3)); + get => new SchemaUntypedField(_Handle + _ResetCycleOptionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateUpdateDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateUpdateDataImpl.cs index 9c9832c67..8584162c1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateUpdateDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStateUpdateDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,39 +17,59 @@ internal partial class CStateUpdateDataImpl : SchemaClass, CStateUpdateData { public CStateUpdateDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xD984C8C64D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD984C8C64D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD984C8C64D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _ScriptOffset = new(() => Schema.GetOffset(0xD984C8C629D70FB0), LazyThreadSafetyMode.None); + public AnimScriptHandle Script { - get => new AnimScriptHandleImpl(_Handle + Schema.GetOffset(0xD984C8C629D70FB0)); + get => new AnimScriptHandleImpl(_Handle + _ScriptOffset.Value); } + private static readonly Lazy _TransitionIndicesOffset = new(() => Schema.GetOffset(0xD984C8C689E40507), LazyThreadSafetyMode.None); + public ref CUtlVector TransitionIndices { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD984C8C689E40507)); + get => ref _Handle.AsRef>(_TransitionIndicesOffset.Value); } + private static readonly Lazy _ActionsOffset = new(() => Schema.GetOffset(0xD984C8C68D622684), LazyThreadSafetyMode.None); + public ref CUtlVector Actions { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD984C8C68D622684)); + get => ref _Handle.AsRef>(_ActionsOffset.Value); } + private static readonly Lazy _StateIDOffset = new(() => Schema.GetOffset(0xD984C8C65362B56B), LazyThreadSafetyMode.None); + public AnimStateID StateID { - get => new AnimStateIDImpl(_Handle + Schema.GetOffset(0xD984C8C65362B56B)); + get => new AnimStateIDImpl(_Handle + _StateIDOffset.Value); } + private static readonly Lazy _IsStartStateOffset = new(() => Schema.GetOffset(0xD984C8C6B4CEE040), LazyThreadSafetyMode.None); + public SchemaUntypedField IsStartState { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD984C8C6B4CEE040)); + get => new SchemaUntypedField(_Handle + _IsStartStateOffset.Value); } + private static readonly Lazy _IsEndStateOffset = new(() => Schema.GetOffset(0xD984C8C65C2338AF), LazyThreadSafetyMode.None); + public SchemaUntypedField IsEndState { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD984C8C65C2338AF)); + get => new SchemaUntypedField(_Handle + _IsEndStateOffset.Value); } + private static readonly Lazy _IsPassthroughOffset = new(() => Schema.GetOffset(0xD984C8C6F0AD9431), LazyThreadSafetyMode.None); + public SchemaUntypedField IsPassthrough { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD984C8C6F0AD9431)); + get => new SchemaUntypedField(_Handle + _IsPassthroughOffset.Value); } + private static readonly Lazy _IsPassthroughRootMotionOffset = new(() => Schema.GetOffset(0xD984C8C64B319C83), LazyThreadSafetyMode.None); + public SchemaUntypedField IsPassthroughRootMotion { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD984C8C64B319C83)); + get => new SchemaUntypedField(_Handle + _IsPassthroughRootMotionOffset.Value); } + private static readonly Lazy _PreEvaluatePassthroughTransitionPathOffset = new(() => Schema.GetOffset(0xD984C8C60DFCB92D), LazyThreadSafetyMode.None); + public SchemaUntypedField PreEvaluatePassthroughTransitionPath { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD984C8C60DFCB92D)); + get => new SchemaUntypedField(_Handle + _PreEvaluatePassthroughTransitionPathOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStaticPoseCacheBuilderImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStaticPoseCacheBuilderImpl.cs index 51e2e89eb..df7374b35 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStaticPoseCacheBuilderImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStaticPoseCacheBuilderImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStaticPoseCacheImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStaticPoseCacheImpl.cs index f8f132fc9..b7a6ed793 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStaticPoseCacheImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStaticPoseCacheImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CStaticPoseCacheImpl : SchemaClass, CStaticPoseCache { public CStaticPoseCacheImpl(nint handle) : base(handle) { } + private static readonly Lazy _PosesOffset = new(() => Schema.GetOffset(0x2223EF1DB851C9F5), LazyThreadSafetyMode.None); + public ref CUtlVector Poses { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2223EF1DB851C9F5)); + get => ref _Handle.AsRef>(_PosesOffset.Value); } + private static readonly Lazy _BoneCountOffset = new(() => Schema.GetOffset(0x2223EF1D71FE39A2), LazyThreadSafetyMode.None); + public ref int BoneCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x2223EF1D71FE39A2)); + get => ref _Handle.AsRef(_BoneCountOffset.Value); } + private static readonly Lazy _MorphCountOffset = new(() => Schema.GetOffset(0x2223EF1D32C62DD0), LazyThreadSafetyMode.None); + public ref int MorphCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x2223EF1D32C62DD0)); + get => ref _Handle.AsRef(_MorphCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStepsRemainingMetricEvaluatorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStepsRemainingMetricEvaluatorImpl.cs index ed4ab0f4a..cd4dc75ba 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStepsRemainingMetricEvaluatorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStepsRemainingMetricEvaluatorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CStepsRemainingMetricEvaluatorImpl : CMotionMetricEvaluat public CStepsRemainingMetricEvaluatorImpl(nint handle) : base(handle) { } + private static readonly Lazy _FootIndicesOffset = new(() => Schema.GetOffset(0xDDD8E3884C840316), LazyThreadSafetyMode.None); + public ref CUtlVector FootIndices { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDDD8E3884C840316)); + get => ref _Handle.AsRef>(_FootIndicesOffset.Value); } + private static readonly Lazy _MinStepsRemainingOffset = new(() => Schema.GetOffset(0xDDD8E388382CE1FC), LazyThreadSafetyMode.None); + public ref float MinStepsRemaining { - get => ref _Handle.AsRef(Schema.GetOffset(0xDDD8E388382CE1FC)); + get => ref _Handle.AsRef(_MinStepsRemainingOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStopAtGoalUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStopAtGoalUpdateNodeImpl.cs index 611f92d79..469c259f1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStopAtGoalUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStopAtGoalUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CStopAtGoalUpdateNodeImpl : CUnaryUpdateNodeImpl, CStopAt public CStopAtGoalUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _OuterRadiusOffset = new(() => Schema.GetOffset(0x4889F8297B66A818), LazyThreadSafetyMode.None); + public ref float OuterRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x4889F8297B66A818)); + get => ref _Handle.AsRef(_OuterRadiusOffset.Value); } + private static readonly Lazy _InnerRadiusOffset = new(() => Schema.GetOffset(0x4889F82932121407), LazyThreadSafetyMode.None); + public ref float InnerRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x4889F82932121407)); + get => ref _Handle.AsRef(_InnerRadiusOffset.Value); } + private static readonly Lazy _MaxScaleOffset = new(() => Schema.GetOffset(0x4889F829FF4EC8E7), LazyThreadSafetyMode.None); + public ref float MaxScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x4889F829FF4EC8E7)); + get => ref _Handle.AsRef(_MaxScaleOffset.Value); } + private static readonly Lazy _MinScaleOffset = new(() => Schema.GetOffset(0x4889F829D125D67D), LazyThreadSafetyMode.None); + public ref float MinScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x4889F829D125D67D)); + get => ref _Handle.AsRef(_MinScaleOffset.Value); } + private static readonly Lazy _DampingOffset = new(() => Schema.GetOffset(0x4889F82915440FB5), LazyThreadSafetyMode.None); + public CAnimInputDamping Damping { - get => new CAnimInputDampingImpl(_Handle + Schema.GetOffset(0x4889F82915440FB5)); + get => new CAnimInputDampingImpl(_Handle + _DampingOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStopwatchBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStopwatchBaseImpl.cs index 0459406d3..07f2257e5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStopwatchBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStopwatchBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CStopwatchBaseImpl : CSimpleSimTimerImpl, CStopwatchBase public CStopwatchBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _IsRunningOffset = new(() => Schema.GetOffset(0x80DA66DCF34F2570), LazyThreadSafetyMode.None); + public ref bool IsRunning { - get => ref _Handle.AsRef(Schema.GetOffset(0x80DA66DCF34F2570)); + get => ref _Handle.AsRef(_IsRunningOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStopwatchImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStopwatchImpl.cs index c45e2c304..ae5bb9bf9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStopwatchImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStopwatchImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CStopwatchImpl : CStopwatchBaseImpl, CStopwatch { public CStopwatchImpl(nint handle) : base(handle) { } + private static readonly Lazy _IntervalOffset = new(() => Schema.GetOffset(0x40B847F1320F7B8E), LazyThreadSafetyMode.None); + public ref float Interval { - get => ref _Handle.AsRef(Schema.GetOffset(0x40B847F1320F7B8E)); + get => ref _Handle.AsRef(_IntervalOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStringAnimTagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStringAnimTagImpl.cs index 585f89aba..2f3c8d421 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStringAnimTagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CStringAnimTagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSubtractUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSubtractUpdateNodeImpl.cs index 73d4a03bb..c21fc945d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSubtractUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSubtractUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CSubtractUpdateNodeImpl : CBinaryUpdateNodeImpl, CSubtrac public CSubtractUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _FootMotionTimingOffset = new(() => Schema.GetOffset(0x108B5B3FBB17F13D), LazyThreadSafetyMode.None); + public ref BinaryNodeChildOption FootMotionTiming { - get => ref _Handle.AsRef(Schema.GetOffset(0x108B5B3FBB17F13D)); + get => ref _Handle.AsRef(_FootMotionTimingOffset.Value); } + private static readonly Lazy _ApplyToFootMotionOffset = new(() => Schema.GetOffset(0x108B5B3F3D831E94), LazyThreadSafetyMode.None); + public ref bool ApplyToFootMotion { - get => ref _Handle.AsRef(Schema.GetOffset(0x108B5B3F3D831E94)); + get => ref _Handle.AsRef(_ApplyToFootMotionOffset.Value); } + private static readonly Lazy _ApplyChannelsSeparatelyOffset = new(() => Schema.GetOffset(0x108B5B3FFF2DBB45), LazyThreadSafetyMode.None); + public ref bool ApplyChannelsSeparately { - get => ref _Handle.AsRef(Schema.GetOffset(0x108B5B3FFF2DBB45)); + get => ref _Handle.AsRef(_ApplyChannelsSeparatelyOffset.Value); } + private static readonly Lazy _UseModelSpaceOffset = new(() => Schema.GetOffset(0x108B5B3F48863521), LazyThreadSafetyMode.None); + public ref bool UseModelSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x108B5B3F48863521)); + get => ref _Handle.AsRef(_UseModelSpaceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSymbolAnimParameterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSymbolAnimParameterImpl.cs index 99e5d47d6..966a80a7d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSymbolAnimParameterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CSymbolAnimParameterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CSymbolAnimParameterImpl : CConcreteAnimParameterImpl, CS public CSymbolAnimParameterImpl(nint handle) : base(handle) { } + private static readonly Lazy _DefaultValueOffset = new(() => Schema.GetOffset(0xA3486AA2BBE0341F), LazyThreadSafetyMode.None); + public ref CGlobalSymbol DefaultValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3486AA2BBE0341F)); + get => ref _Handle.AsRef(_DefaultValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTakeDamageInfoAPIImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTakeDamageInfoAPIImpl.cs index 26fd67557..0f2125d16 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTakeDamageInfoAPIImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTakeDamageInfoAPIImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTakeDamageSummaryScopeGuardImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTakeDamageSummaryScopeGuardImpl.cs index 1babc1bd4..5eedd6254 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTakeDamageSummaryScopeGuardImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTakeDamageSummaryScopeGuardImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CTakeDamageSummaryScopeGuardImpl : SchemaClass, CTakeDama public CTakeDamageSummaryScopeGuardImpl(nint handle) : base(handle) { } + private static readonly Lazy _SummariesOffset = new(() => Schema.GetOffset(0x1CAF012DD0AD2A53), LazyThreadSafetyMode.None); + public ref CUtlVector> Summaries { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x1CAF012DD0AD2A53)); + get => ref _Handle.AsRef>>(_SummariesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTankTargetChangeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTankTargetChangeImpl.cs index 66e983ad2..9a38a50ba 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTankTargetChangeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTankTargetChangeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CTankTargetChangeImpl : CPointEntityImpl, CTankTargetChan public CTankTargetChangeImpl(nint handle) : base(handle) { } + private static readonly Lazy _NewTargetOffset = new(() => Schema.GetOffset(0xC9633A4FC35D87C4), LazyThreadSafetyMode.None); + public SchemaUntypedField NewTarget { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC9633A4FC35D87C4)); + get => new SchemaUntypedField(_Handle + _NewTargetOffset.Value); } + private static readonly Lazy _NewTargetNameOffset = new(() => Schema.GetOffset(0xC9633A4FFCD3FD1F), LazyThreadSafetyMode.None); + public string NewTargetName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC9633A4FFCD3FD1F)); + var ptr = _Handle.Read(_NewTargetNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xC9633A4FFCD3FD1F, value); + set => Schema.SetString(_Handle, _NewTargetNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTankTrainAIImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTankTrainAIImpl.cs index 591d59871..08c61dfec 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTankTrainAIImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTankTrainAIImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,42 +17,56 @@ internal partial class CTankTrainAIImpl : CPointEntityImpl, CTankTrainAI { public CTankTrainAIImpl(nint handle) : base(handle) { } + private static readonly Lazy _TrainOffset = new(() => Schema.GetOffset(0x25820826D58EE22F), LazyThreadSafetyMode.None); + public ref CHandle Train { - get => ref _Handle.AsRef>(Schema.GetOffset(0x25820826D58EE22F)); + get => ref _Handle.AsRef>(_TrainOffset.Value); } + private static readonly Lazy _TargetEntityOffset = new(() => Schema.GetOffset(0x2582082625D042A9), LazyThreadSafetyMode.None); + public ref CHandle TargetEntity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2582082625D042A9)); + get => ref _Handle.AsRef>(_TargetEntityOffset.Value); } + private static readonly Lazy _SoundPlayingOffset = new(() => Schema.GetOffset(0x2582082658CF60D2), LazyThreadSafetyMode.None); + public ref int SoundPlaying { - get => ref _Handle.AsRef(Schema.GetOffset(0x2582082658CF60D2)); + get => ref _Handle.AsRef(_SoundPlayingOffset.Value); } + private static readonly Lazy _StartSoundNameOffset = new(() => Schema.GetOffset(0x258208263F1AB605), LazyThreadSafetyMode.None); + public string StartSoundName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x258208263F1AB605)); + var ptr = _Handle.Read(_StartSoundNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x258208263F1AB605, value); + set => Schema.SetString(_Handle, _StartSoundNameOffset.Value, value); } + private static readonly Lazy _EngineSoundNameOffset = new(() => Schema.GetOffset(0x2582082627E36CD1), LazyThreadSafetyMode.None); + public string EngineSoundName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x2582082627E36CD1)); + var ptr = _Handle.Read(_EngineSoundNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x2582082627E36CD1, value); + set => Schema.SetString(_Handle, _EngineSoundNameOffset.Value, value); } + private static readonly Lazy _MovementSoundNameOffset = new(() => Schema.GetOffset(0x25820826F2195774), LazyThreadSafetyMode.None); + public string MovementSoundName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x25820826F2195774)); + var ptr = _Handle.Read(_MovementSoundNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x25820826F2195774, value); + set => Schema.SetString(_Handle, _MovementSoundNameOffset.Value, value); } + private static readonly Lazy _TargetEntityNameOffset = new(() => Schema.GetOffset(0x25820826F88EC878), LazyThreadSafetyMode.None); + public string TargetEntityName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x25820826F88EC878)); + var ptr = _Handle.Read(_TargetEntityNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x25820826F88EC878, value); + set => Schema.SetString(_Handle, _TargetEntityNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTargetSelectorUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTargetSelectorUpdateNodeImpl.cs index 7c873787d..c8502ca09 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTargetSelectorUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTargetSelectorUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class CTargetSelectorUpdateNodeImpl : CAnimUpdateNodeBaseImpl, public CTargetSelectorUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _AngleModeOffset = new(() => Schema.GetOffset(0x37AB6CCBD21DC8BC), LazyThreadSafetyMode.None); + public ref TargetSelectorAngleMode_t AngleMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x37AB6CCBD21DC8BC)); + get => ref _Handle.AsRef(_AngleModeOffset.Value); } + private static readonly Lazy _ChildrenOffset = new(() => Schema.GetOffset(0x37AB6CCB7415FA72), LazyThreadSafetyMode.None); + public ref CUtlVector Children { - get => ref _Handle.AsRef>(Schema.GetOffset(0x37AB6CCB7415FA72)); + get => ref _Handle.AsRef>(_ChildrenOffset.Value); } + private static readonly Lazy _TargetPositionOffset = new(() => Schema.GetOffset(0x37AB6CCBD1F40125), LazyThreadSafetyMode.None); + public CAnimParamHandle TargetPosition { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x37AB6CCBD1F40125)); + get => new CAnimParamHandleImpl(_Handle + _TargetPositionOffset.Value); } + private static readonly Lazy _TargetFacePositionParameterOffset = new(() => Schema.GetOffset(0x37AB6CCB1102D56F), LazyThreadSafetyMode.None); + public CAnimParamHandle TargetFacePositionParameter { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x37AB6CCB1102D56F)); + get => new CAnimParamHandleImpl(_Handle + _TargetFacePositionParameterOffset.Value); } + private static readonly Lazy _MoveHeadingParameterOffset = new(() => Schema.GetOffset(0x37AB6CCB3A7267CF), LazyThreadSafetyMode.None); + public CAnimParamHandle MoveHeadingParameter { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x37AB6CCB3A7267CF)); + get => new CAnimParamHandleImpl(_Handle + _MoveHeadingParameterOffset.Value); } + private static readonly Lazy _DesiredMoveHeadingParameterOffset = new(() => Schema.GetOffset(0x37AB6CCBC6298DFB), LazyThreadSafetyMode.None); + public CAnimParamHandle DesiredMoveHeadingParameter { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x37AB6CCBC6298DFB)); + get => new CAnimParamHandleImpl(_Handle + _DesiredMoveHeadingParameterOffset.Value); } + private static readonly Lazy _TargetPositionIsWorldSpaceOffset = new(() => Schema.GetOffset(0x37AB6CCBABCF9ECD), LazyThreadSafetyMode.None); + public ref bool TargetPositionIsWorldSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x37AB6CCBABCF9ECD)); + get => ref _Handle.AsRef(_TargetPositionIsWorldSpaceOffset.Value); } + private static readonly Lazy _TargetFacePositionIsWorldSpaceOffset = new(() => Schema.GetOffset(0x37AB6CCB504B4258), LazyThreadSafetyMode.None); + public ref bool TargetFacePositionIsWorldSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x37AB6CCB504B4258)); + get => ref _Handle.AsRef(_TargetFacePositionIsWorldSpaceOffset.Value); } + private static readonly Lazy _EnablePhaseMatchingOffset = new(() => Schema.GetOffset(0x37AB6CCB6BC1372A), LazyThreadSafetyMode.None); + public ref bool EnablePhaseMatching { - get => ref _Handle.AsRef(Schema.GetOffset(0x37AB6CCB6BC1372A)); + get => ref _Handle.AsRef(_EnablePhaseMatchingOffset.Value); } + private static readonly Lazy _PhaseMatchingMaxRootMotionSkipOffset = new(() => Schema.GetOffset(0x37AB6CCB547A4008), LazyThreadSafetyMode.None); + public ref float PhaseMatchingMaxRootMotionSkip { - get => ref _Handle.AsRef(Schema.GetOffset(0x37AB6CCB547A4008)); + get => ref _Handle.AsRef(_PhaseMatchingMaxRootMotionSkipOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTargetWarpUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTargetWarpUpdateNodeImpl.cs index d83d3bc5f..93c8712f4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTargetWarpUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTargetWarpUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,47 +17,75 @@ internal partial class CTargetWarpUpdateNodeImpl : CUnaryUpdateNodeImpl, CTarget public CTargetWarpUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _AngleModeOffset = new(() => Schema.GetOffset(0xF411CC8D21DC8BC), LazyThreadSafetyMode.None); + public ref TargetWarpAngleMode_t AngleMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xF411CC8D21DC8BC)); + get => ref _Handle.AsRef(_AngleModeOffset.Value); } + private static readonly Lazy _TargetPositionParameterOffset = new(() => Schema.GetOffset(0xF411CC8A44B9050), LazyThreadSafetyMode.None); + public CAnimParamHandle TargetPositionParameter { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xF411CC8A44B9050)); + get => new CAnimParamHandleImpl(_Handle + _TargetPositionParameterOffset.Value); } + private static readonly Lazy _TargetUpVectorParameterOffset = new(() => Schema.GetOffset(0xF411CC85C2D7DCB), LazyThreadSafetyMode.None); + public CAnimParamHandle TargetUpVectorParameter { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xF411CC85C2D7DCB)); + get => new CAnimParamHandleImpl(_Handle + _TargetUpVectorParameterOffset.Value); } + private static readonly Lazy _TargetFacePositionParameterOffset = new(() => Schema.GetOffset(0xF411CC81102D56F), LazyThreadSafetyMode.None); + public CAnimParamHandle TargetFacePositionParameter { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xF411CC81102D56F)); + get => new CAnimParamHandleImpl(_Handle + _TargetFacePositionParameterOffset.Value); } + private static readonly Lazy _MoveHeadingParameterOffset = new(() => Schema.GetOffset(0xF411CC83A7267CF), LazyThreadSafetyMode.None); + public CAnimParamHandle MoveHeadingParameter { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xF411CC83A7267CF)); + get => new CAnimParamHandleImpl(_Handle + _MoveHeadingParameterOffset.Value); } + private static readonly Lazy _DesiredMoveHeadingParameterOffset = new(() => Schema.GetOffset(0xF411CC8C6298DFB), LazyThreadSafetyMode.None); + public CAnimParamHandle DesiredMoveHeadingParameter { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xF411CC8C6298DFB)); + get => new CAnimParamHandleImpl(_Handle + _DesiredMoveHeadingParameterOffset.Value); } + private static readonly Lazy _CorrectionMethodOffset = new(() => Schema.GetOffset(0xF411CC81E19BA51), LazyThreadSafetyMode.None); + public ref TargetWarpCorrectionMethod CorrectionMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0xF411CC81E19BA51)); + get => ref _Handle.AsRef(_CorrectionMethodOffset.Value); } + private static readonly Lazy _TargetWarpTimingMethodOffset = new(() => Schema.GetOffset(0xF411CC8EC684360), LazyThreadSafetyMode.None); + public ref TargetWarpTimingMethod TargetWarpTimingMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0xF411CC8EC684360)); + get => ref _Handle.AsRef(_TargetWarpTimingMethodOffset.Value); } + private static readonly Lazy _TargetFacePositionIsWorldSpaceOffset = new(() => Schema.GetOffset(0xF411CC8504B4258), LazyThreadSafetyMode.None); + public ref bool TargetFacePositionIsWorldSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0xF411CC8504B4258)); + get => ref _Handle.AsRef(_TargetFacePositionIsWorldSpaceOffset.Value); } + private static readonly Lazy _TargetPositionIsWorldSpaceOffset = new(() => Schema.GetOffset(0xF411CC8ABCF9ECD), LazyThreadSafetyMode.None); + public ref bool TargetPositionIsWorldSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0xF411CC8ABCF9ECD)); + get => ref _Handle.AsRef(_TargetPositionIsWorldSpaceOffset.Value); } + private static readonly Lazy _OnlyWarpWhenTagIsFoundOffset = new(() => Schema.GetOffset(0xF411CC84B577309), LazyThreadSafetyMode.None); + public ref bool OnlyWarpWhenTagIsFound { - get => ref _Handle.AsRef(Schema.GetOffset(0xF411CC84B577309)); + get => ref _Handle.AsRef(_OnlyWarpWhenTagIsFoundOffset.Value); } + private static readonly Lazy _WarpOrientationDuringTranslationOffset = new(() => Schema.GetOffset(0xF411CC85672A125), LazyThreadSafetyMode.None); + public ref bool WarpOrientationDuringTranslation { - get => ref _Handle.AsRef(Schema.GetOffset(0xF411CC85672A125)); + get => ref _Handle.AsRef(_WarpOrientationDuringTranslationOffset.Value); } + private static readonly Lazy _WarpAroundCenterOffset = new(() => Schema.GetOffset(0xF411CC8B19C474F), LazyThreadSafetyMode.None); + public ref bool WarpAroundCenter { - get => ref _Handle.AsRef(Schema.GetOffset(0xF411CC8B19C474F)); + get => ref _Handle.AsRef(_WarpAroundCenterOffset.Value); } + private static readonly Lazy _MaxAngleOffset = new(() => Schema.GetOffset(0xF411CC8A4B3D8AE), LazyThreadSafetyMode.None); + public ref float MaxAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0xF411CC8A4B3D8AE)); + get => ref _Handle.AsRef(_MaxAngleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTaskHandshakeAnimTagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTaskHandshakeAnimTagImpl.cs index a42408afa..9315570b3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTaskHandshakeAnimTagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTaskHandshakeAnimTagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTaskStatusAnimTagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTaskStatusAnimTagImpl.cs index 63eb853d2..dca7f7756 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTaskStatusAnimTagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTaskStatusAnimTagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTeamImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTeamImpl.cs index 8c195255c..d4cb9ff82 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTeamImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTeamImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class CTeamImpl : CBaseEntityImpl, CTeam { public CTeamImpl(nint handle) : base(handle) { } + private static readonly Lazy _PlayerControllersOffset = new(() => Schema.GetOffset(0xAF5A77E38933E302), LazyThreadSafetyMode.None); + public ref CUtlVector> PlayerControllers { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xAF5A77E38933E302)); + get => ref _Handle.AsRef>>(_PlayerControllersOffset.Value); } + private static readonly Lazy _PlayersOffset = new(() => Schema.GetOffset(0xAF5A77E307285116), LazyThreadSafetyMode.None); + public ref CUtlVector> Players { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xAF5A77E307285116)); + get => ref _Handle.AsRef>>(_PlayersOffset.Value); } + private static readonly Lazy _ScoreOffset = new(() => Schema.GetOffset(0xAF5A77E339E7DEAE), LazyThreadSafetyMode.None); + public ref int Score { - get => ref _Handle.AsRef(Schema.GetOffset(0xAF5A77E339E7DEAE)); + get => ref _Handle.AsRef(_ScoreOffset.Value); } + private static readonly Lazy _TeamnameOffset = new(() => Schema.GetOffset(0xAF5A77E3AA34880A), LazyThreadSafetyMode.None); + public string Teamname { get { - var ptr = _Handle + Schema.GetOffset(0xAF5A77E3AA34880A); + var ptr = _Handle + _TeamnameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xAF5A77E3AA34880A, value, 129); + set => Schema.SetFixedString(_Handle, _TeamnameOffset.Value, value, 129); } public void PlayerControllersUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTeamplayRulesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTeamplayRulesImpl.cs index 54f7eaab9..a91a82bd2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTeamplayRulesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTeamplayRulesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestBlendContainerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestBlendContainerImpl.cs index e63060f92..79d086562 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestBlendContainerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestBlendContainerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CTestBlendContainerImpl : CVoiceContainerBaseImpl, CTestB public CTestBlendContainerImpl(nint handle) : base(handle) { } + private static readonly Lazy _FirstSoundOffset = new(() => Schema.GetOffset(0x3E7BF53C666B0138), LazyThreadSafetyMode.None); + public ref CStrongHandle FirstSound { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3E7BF53C666B0138)); + get => ref _Handle.AsRef>(_FirstSoundOffset.Value); } + private static readonly Lazy _SecondSoundOffset = new(() => Schema.GetOffset(0x3E7BF53CA2BC3E5C), LazyThreadSafetyMode.None); + public ref CStrongHandle SecondSound { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3E7BF53CA2BC3E5C)); + get => ref _Handle.AsRef>(_SecondSoundOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestDomainDerived_CursorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestDomainDerived_CursorImpl.cs index 5e21a4b3e..77eac9acf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestDomainDerived_CursorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestDomainDerived_CursorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CTestDomainDerived_CursorImpl : CPulseExecCursorImpl, CTe public CTestDomainDerived_CursorImpl(nint handle) : base(handle) { } + private static readonly Lazy _CursorValueAOffset = new(() => Schema.GetOffset(0x7D1D938EF43E6EDB), LazyThreadSafetyMode.None); + public ref int CursorValueA { - get => ref _Handle.AsRef(Schema.GetOffset(0x7D1D938EF43E6EDB)); + get => ref _Handle.AsRef(_CursorValueAOffset.Value); } + private static readonly Lazy _CursorValueBOffset = new(() => Schema.GetOffset(0x7D1D938EF53E706E), LazyThreadSafetyMode.None); + public ref int CursorValueB { - get => ref _Handle.AsRef(Schema.GetOffset(0x7D1D938EF53E706E)); + get => ref _Handle.AsRef(_CursorValueBOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestEffectImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestEffectImpl.cs index 10e3d7bd2..8ad29fe1b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestEffectImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestEffectImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CTestEffectImpl : CBaseEntityImpl, CTestEffect { public CTestEffectImpl(nint handle) : base(handle) { } + private static readonly Lazy _LoopOffset = new(() => Schema.GetOffset(0xF4103FBFFFB6D07A), LazyThreadSafetyMode.None); + public ref int Loop { - get => ref _Handle.AsRef(Schema.GetOffset(0xF4103FBFFFB6D07A)); + get => ref _Handle.AsRef(_LoopOffset.Value); } + private static readonly Lazy _BeamOffset = new(() => Schema.GetOffset(0xF4103FBF54034EE3), LazyThreadSafetyMode.None); + public ref int Beam { - get => ref _Handle.AsRef(Schema.GetOffset(0xF4103FBF54034EE3)); + get => ref _Handle.AsRef(_BeamOffset.Value); } + private static readonly Lazy _Beam1Offset = new(() => Schema.GetOffset(0xF4103FBFC4017428), LazyThreadSafetyMode.None); + public SchemaUntypedField Beam1 { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xF4103FBFC4017428)); + get => new SchemaUntypedField(_Handle + _Beam1Offset.Value); } + private static readonly Lazy _BeamTimeOffset = new(() => Schema.GetOffset(0xF4103FBF60293F01), LazyThreadSafetyMode.None); + public SchemaUntypedField BeamTime { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xF4103FBF60293F01)); + get => new SchemaUntypedField(_Handle + _BeamTimeOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0xF4103FBF67FE9DC4), LazyThreadSafetyMode.None); + public GameTime_t StartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xF4103FBF67FE9DC4)); + get => new GameTime_tImpl(_Handle + _StartTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestPulseIOAPIImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestPulseIOAPIImpl.cs index a8100452a..ed2fd0980 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestPulseIOAPIImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestPulseIOAPIImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestPulseIOImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestPulseIOImpl.cs index 48426d848..7085563d7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestPulseIOImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTestPulseIOImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CTestPulseIOImpl : CLogicalEntityImpl, CTestPulseIO { public CTestPulseIOImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnVariantVoidOffset = new(() => Schema.GetOffset(0x3CAD66134B0C5D73), LazyThreadSafetyMode.None); + public CEntityIOOutput OnVariantVoid { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x3CAD66134B0C5D73)); + get => new CEntityIOOutputImpl(_Handle + _OnVariantVoidOffset.Value); } + private static readonly Lazy _OnVariantBoolOffset = new(() => Schema.GetOffset(0x3CAD66138350E481), LazyThreadSafetyMode.None); + public CEntityIOOutput OnVariantBool { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x3CAD66138350E481)); + get => new CEntityIOOutputImpl(_Handle + _OnVariantBoolOffset.Value); } + private static readonly Lazy _OnVariantIntOffset = new(() => Schema.GetOffset(0x3CAD66131C6BA682), LazyThreadSafetyMode.None); + public CEntityIOOutput OnVariantInt { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x3CAD66131C6BA682)); + get => new CEntityIOOutputImpl(_Handle + _OnVariantIntOffset.Value); } + private static readonly Lazy _OnVariantFloatOffset = new(() => Schema.GetOffset(0x3CAD661378E46379), LazyThreadSafetyMode.None); + public CEntityIOOutput OnVariantFloat { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x3CAD661378E46379)); + get => new CEntityIOOutputImpl(_Handle + _OnVariantFloatOffset.Value); } + private static readonly Lazy _OnVariantStringOffset = new(() => Schema.GetOffset(0x3CAD6613DE2E3E5C), LazyThreadSafetyMode.None); + public CEntityIOOutput OnVariantString { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x3CAD6613DE2E3E5C)); + get => new CEntityIOOutputImpl(_Handle + _OnVariantStringOffset.Value); } + private static readonly Lazy _OnVariantColorOffset = new(() => Schema.GetOffset(0x3CAD66139A1362C4), LazyThreadSafetyMode.None); + public CEntityIOOutput OnVariantColor { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x3CAD66139A1362C4)); + get => new CEntityIOOutputImpl(_Handle + _OnVariantColorOffset.Value); } + private static readonly Lazy _OnVariantVectorOffset = new(() => Schema.GetOffset(0x3CAD6613A6D8BE1E), LazyThreadSafetyMode.None); + public CEntityIOOutput OnVariantVector { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x3CAD6613A6D8BE1E)); + get => new CEntityIOOutputImpl(_Handle + _OnVariantVectorOffset.Value); } + private static readonly Lazy _AllowEmptyInputsOffset = new(() => Schema.GetOffset(0x3CAD661342A93BD2), LazyThreadSafetyMode.None); + public ref bool AllowEmptyInputs { - get => ref _Handle.AsRef(Schema.GetOffset(0x3CAD661342A93BD2)); + get => ref _Handle.AsRef(_AllowEmptyInputsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTextureBasedAnimatableImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTextureBasedAnimatableImpl.cs index a84ac0a59..cb106111e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTextureBasedAnimatableImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTextureBasedAnimatableImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CTextureBasedAnimatableImpl : CBaseModelEntityImpl, CText public CTextureBasedAnimatableImpl(nint handle) : base(handle) { } + private static readonly Lazy _LoopOffset = new(() => Schema.GetOffset(0xDB45ABACC668A4CB), LazyThreadSafetyMode.None); + public ref bool Loop { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB45ABACC668A4CB)); + get => ref _Handle.AsRef(_LoopOffset.Value); } + private static readonly Lazy _FPSOffset = new(() => Schema.GetOffset(0xDB45ABAC38CAA4F6), LazyThreadSafetyMode.None); + public ref float FPS { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB45ABAC38CAA4F6)); + get => ref _Handle.AsRef(_FPSOffset.Value); } + private static readonly Lazy _PositionKeysOffset = new(() => Schema.GetOffset(0xDB45ABACE6515850), LazyThreadSafetyMode.None); + public ref CStrongHandle PositionKeys { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDB45ABACE6515850)); + get => ref _Handle.AsRef>(_PositionKeysOffset.Value); } + private static readonly Lazy _RotationKeysOffset = new(() => Schema.GetOffset(0xDB45ABACDAC30C39), LazyThreadSafetyMode.None); + public ref CStrongHandle RotationKeys { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDB45ABACDAC30C39)); + get => ref _Handle.AsRef>(_RotationKeysOffset.Value); } + private static readonly Lazy _AnimationBoundsMinOffset = new(() => Schema.GetOffset(0xDB45ABAC8BDB4B58), LazyThreadSafetyMode.None); + public ref Vector AnimationBoundsMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB45ABAC8BDB4B58)); + get => ref _Handle.AsRef(_AnimationBoundsMinOffset.Value); } + private static readonly Lazy _AnimationBoundsMaxOffset = new(() => Schema.GetOffset(0xDB45ABACA1EEF5B2), LazyThreadSafetyMode.None); + public ref Vector AnimationBoundsMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB45ABACA1EEF5B2)); + get => ref _Handle.AsRef(_AnimationBoundsMaxOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0xDB45ABAC67FE9DC4), LazyThreadSafetyMode.None); + public ref float StartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB45ABAC67FE9DC4)); + get => ref _Handle.AsRef(_StartTimeOffset.Value); } + private static readonly Lazy _StartFrameOffset = new(() => Schema.GetOffset(0xDB45ABACB534B906), LazyThreadSafetyMode.None); + public ref float StartFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB45ABACB534B906)); + get => ref _Handle.AsRef(_StartFrameOffset.Value); } public void LoopUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTiltTwistConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTiltTwistConstraintImpl.cs index c22d36daf..78f11aa29 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTiltTwistConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTiltTwistConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CTiltTwistConstraintImpl : CBaseConstraintImpl, CTiltTwis public CTiltTwistConstraintImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetAxisOffset = new(() => Schema.GetOffset(0x4A56E4D341CC84D5), LazyThreadSafetyMode.None); + public ref int TargetAxis { - get => ref _Handle.AsRef(Schema.GetOffset(0x4A56E4D341CC84D5)); + get => ref _Handle.AsRef(_TargetAxisOffset.Value); } + private static readonly Lazy _SlaveAxisOffset = new(() => Schema.GetOffset(0x4A56E4D3CA99CDBD), LazyThreadSafetyMode.None); + public ref int SlaveAxis { - get => ref _Handle.AsRef(Schema.GetOffset(0x4A56E4D3CA99CDBD)); + get => ref _Handle.AsRef(_SlaveAxisOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTimeRemainingMetricEvaluatorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTimeRemainingMetricEvaluatorImpl.cs index 8fbb807cf..2f3cf4ada 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTimeRemainingMetricEvaluatorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTimeRemainingMetricEvaluatorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CTimeRemainingMetricEvaluatorImpl : CMotionMetricEvaluato public CTimeRemainingMetricEvaluatorImpl(nint handle) : base(handle) { } + private static readonly Lazy _MatchByTimeRemainingOffset = new(() => Schema.GetOffset(0xAB802C86BB70462E), LazyThreadSafetyMode.None); + public ref bool MatchByTimeRemaining { - get => ref _Handle.AsRef(Schema.GetOffset(0xAB802C86BB70462E)); + get => ref _Handle.AsRef(_MatchByTimeRemainingOffset.Value); } + private static readonly Lazy _MaxTimeRemainingOffset = new(() => Schema.GetOffset(0xAB802C8686818AD6), LazyThreadSafetyMode.None); + public ref float MaxTimeRemaining { - get => ref _Handle.AsRef(Schema.GetOffset(0xAB802C8686818AD6)); + get => ref _Handle.AsRef(_MaxTimeRemainingOffset.Value); } + private static readonly Lazy _FilterByTimeRemainingOffset = new(() => Schema.GetOffset(0xAB802C8668E9E5BD), LazyThreadSafetyMode.None); + public ref bool FilterByTimeRemaining { - get => ref _Handle.AsRef(Schema.GetOffset(0xAB802C8668E9E5BD)); + get => ref _Handle.AsRef(_FilterByTimeRemainingOffset.Value); } + private static readonly Lazy _MinTimeRemainingOffset = new(() => Schema.GetOffset(0xAB802C8604DD377C), LazyThreadSafetyMode.None); + public ref float MinTimeRemaining { - get => ref _Handle.AsRef(Schema.GetOffset(0xAB802C8604DD377C)); + get => ref _Handle.AsRef(_MinTimeRemainingOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTimelineImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTimelineImpl.cs index d494ce2cd..3a56d88a6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTimelineImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTimelineImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -21,20 +23,30 @@ public ISchemaFixedArray Values { public ISchemaFixedArray ValueCounts { get => new SchemaFixedArray(_Handle, 0x36D1E65961EF23CA, 64, 4, 4); } + private static readonly Lazy _BucketCountOffset = new(() => Schema.GetOffset(0x36D1E6596ACA5C8A), LazyThreadSafetyMode.None); + public ref int BucketCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x36D1E6596ACA5C8A)); + get => ref _Handle.AsRef(_BucketCountOffset.Value); } + private static readonly Lazy _IntervalOffset = new(() => Schema.GetOffset(0x36D1E659320F7B8E), LazyThreadSafetyMode.None); + public ref float Interval { - get => ref _Handle.AsRef(Schema.GetOffset(0x36D1E659320F7B8E)); + get => ref _Handle.AsRef(_IntervalOffset.Value); } + private static readonly Lazy _FinalValueOffset = new(() => Schema.GetOffset(0x36D1E659534A71BA), LazyThreadSafetyMode.None); + public ref float FinalValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x36D1E659534A71BA)); + get => ref _Handle.AsRef(_FinalValueOffset.Value); } + private static readonly Lazy _CompressionTypeOffset = new(() => Schema.GetOffset(0x36D1E6593FD9B909), LazyThreadSafetyMode.None); + public ref TimelineCompression_t CompressionType { - get => ref _Handle.AsRef(Schema.GetOffset(0x36D1E6593FD9B909)); + get => ref _Handle.AsRef(_CompressionTypeOffset.Value); } + private static readonly Lazy _StoppedOffset = new(() => Schema.GetOffset(0x36D1E6591C198C2E), LazyThreadSafetyMode.None); + public ref bool Stopped { - get => ref _Handle.AsRef(Schema.GetOffset(0x36D1E6591C198C2E)); + get => ref _Handle.AsRef(_StoppedOffset.Value); } public void ValuesUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTimerEntityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTimerEntityImpl.cs index 22f1c2e26..17a27d2b6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTimerEntityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTimerEntityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,70 @@ internal partial class CTimerEntityImpl : CLogicalEntityImpl, CTimerEntity { public CTimerEntityImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnTimerOffset = new(() => Schema.GetOffset(0xE96486ECF7551DA1), LazyThreadSafetyMode.None); + public CEntityIOOutput OnTimer { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xE96486ECF7551DA1)); + get => new CEntityIOOutputImpl(_Handle + _OnTimerOffset.Value); } + private static readonly Lazy _OnTimerHighOffset = new(() => Schema.GetOffset(0xE96486ECEAFE5EC1), LazyThreadSafetyMode.None); + public CEntityIOOutput OnTimerHigh { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xE96486ECEAFE5EC1)); + get => new CEntityIOOutputImpl(_Handle + _OnTimerHighOffset.Value); } + private static readonly Lazy _OnTimerLowOffset = new(() => Schema.GetOffset(0xE96486EC60BA6A4D), LazyThreadSafetyMode.None); + public CEntityIOOutput OnTimerLow { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xE96486EC60BA6A4D)); + get => new CEntityIOOutputImpl(_Handle + _OnTimerLowOffset.Value); } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0xE96486EC51B3CEAC), LazyThreadSafetyMode.None); + public ref int Disabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xE96486EC51B3CEAC)); + get => ref _Handle.AsRef(_DisabledOffset.Value); } + private static readonly Lazy _InitialDelayOffset = new(() => Schema.GetOffset(0xE96486ECE025AE70), LazyThreadSafetyMode.None); + public ref float InitialDelay { - get => ref _Handle.AsRef(Schema.GetOffset(0xE96486ECE025AE70)); + get => ref _Handle.AsRef(_InitialDelayOffset.Value); } + private static readonly Lazy _RefireTimeOffset = new(() => Schema.GetOffset(0xE96486ECEABAD29B), LazyThreadSafetyMode.None); + public ref float RefireTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xE96486ECEABAD29B)); + get => ref _Handle.AsRef(_RefireTimeOffset.Value); } + private static readonly Lazy _UpDownStateOffset = new(() => Schema.GetOffset(0xE96486EC42D72911), LazyThreadSafetyMode.None); + public ref bool UpDownState { - get => ref _Handle.AsRef(Schema.GetOffset(0xE96486EC42D72911)); + get => ref _Handle.AsRef(_UpDownStateOffset.Value); } + private static readonly Lazy _UseRandomTimeOffset = new(() => Schema.GetOffset(0xE96486ECEBBE5799), LazyThreadSafetyMode.None); + public ref int UseRandomTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xE96486ECEBBE5799)); + get => ref _Handle.AsRef(_UseRandomTimeOffset.Value); } + private static readonly Lazy _PauseAfterFiringOffset = new(() => Schema.GetOffset(0xE96486EC767C1C9E), LazyThreadSafetyMode.None); + public ref bool PauseAfterFiring { - get => ref _Handle.AsRef(Schema.GetOffset(0xE96486EC767C1C9E)); + get => ref _Handle.AsRef(_PauseAfterFiringOffset.Value); } + private static readonly Lazy _LowerRandomBoundOffset = new(() => Schema.GetOffset(0xE96486EC88350771), LazyThreadSafetyMode.None); + public ref float LowerRandomBound { - get => ref _Handle.AsRef(Schema.GetOffset(0xE96486EC88350771)); + get => ref _Handle.AsRef(_LowerRandomBoundOffset.Value); } + private static readonly Lazy _UpperRandomBoundOffset = new(() => Schema.GetOffset(0xE96486ECB238933E), LazyThreadSafetyMode.None); + public ref float UpperRandomBound { - get => ref _Handle.AsRef(Schema.GetOffset(0xE96486ECB238933E)); + get => ref _Handle.AsRef(_UpperRandomBoundOffset.Value); } + private static readonly Lazy _RemainingTimeOffset = new(() => Schema.GetOffset(0xE96486EC88B29520), LazyThreadSafetyMode.None); + public ref float RemainingTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xE96486EC88B29520)); + get => ref _Handle.AsRef(_RemainingTimeOffset.Value); } + private static readonly Lazy _PausedOffset = new(() => Schema.GetOffset(0xE96486EC6E4C592B), LazyThreadSafetyMode.None); + public ref bool Paused { - get => ref _Handle.AsRef(Schema.GetOffset(0xE96486EC6E4C592B)); + get => ref _Handle.AsRef(_PausedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CToggleComponentActionUpdaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CToggleComponentActionUpdaterImpl.cs index 44fc02583..04e1f57ef 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CToggleComponentActionUpdaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CToggleComponentActionUpdaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CToggleComponentActionUpdaterImpl : CAnimActionUpdaterImp public CToggleComponentActionUpdaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _ComponentIDOffset = new(() => Schema.GetOffset(0x4641AA28C1B9267D), LazyThreadSafetyMode.None); + public AnimComponentID ComponentID { - get => new AnimComponentIDImpl(_Handle + Schema.GetOffset(0x4641AA28C1B9267D)); + get => new AnimComponentIDImpl(_Handle + _ComponentIDOffset.Value); } + private static readonly Lazy _SetEnabledOffset = new(() => Schema.GetOffset(0x4641AA28BC6294B8), LazyThreadSafetyMode.None); + public ref bool SetEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x4641AA28BC6294B8)); + get => ref _Handle.AsRef(_SetEnabledOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTonemapController2Alias_env_tonemap_controller2Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTonemapController2Alias_env_tonemap_controller2Impl.cs index 20aa31e7a..3e28f3f73 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTonemapController2Alias_env_tonemap_controller2Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTonemapController2Alias_env_tonemap_controller2Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTonemapController2Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTonemapController2Impl.cs index e60dba3eb..0a89e92ea 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTonemapController2Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTonemapController2Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CTonemapController2Impl : CBaseEntityImpl, CTonemapContro public CTonemapController2Impl(nint handle) : base(handle) { } + private static readonly Lazy _AutoExposureMinOffset = new(() => Schema.GetOffset(0xD2B5E9D27D8FC60B), LazyThreadSafetyMode.None); + public ref float AutoExposureMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xD2B5E9D27D8FC60B)); + get => ref _Handle.AsRef(_AutoExposureMinOffset.Value); } + private static readonly Lazy _AutoExposureMaxOffset = new(() => Schema.GetOffset(0xD2B5E9D2937C60F5), LazyThreadSafetyMode.None); + public ref float AutoExposureMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xD2B5E9D2937C60F5)); + get => ref _Handle.AsRef(_AutoExposureMaxOffset.Value); } + private static readonly Lazy _ExposureAdaptationSpeedUpOffset = new(() => Schema.GetOffset(0xD2B5E9D2D587708B), LazyThreadSafetyMode.None); + public ref float ExposureAdaptationSpeedUp { - get => ref _Handle.AsRef(Schema.GetOffset(0xD2B5E9D2D587708B)); + get => ref _Handle.AsRef(_ExposureAdaptationSpeedUpOffset.Value); } + private static readonly Lazy _ExposureAdaptationSpeedDownOffset = new(() => Schema.GetOffset(0xD2B5E9D232DAF29E), LazyThreadSafetyMode.None); + public ref float ExposureAdaptationSpeedDown { - get => ref _Handle.AsRef(Schema.GetOffset(0xD2B5E9D232DAF29E)); + get => ref _Handle.AsRef(_ExposureAdaptationSpeedDownOffset.Value); } + private static readonly Lazy _TonemapEVSmoothingRangeOffset = new(() => Schema.GetOffset(0xD2B5E9D29C2546CB), LazyThreadSafetyMode.None); + public ref float TonemapEVSmoothingRange { - get => ref _Handle.AsRef(Schema.GetOffset(0xD2B5E9D29C2546CB)); + get => ref _Handle.AsRef(_TonemapEVSmoothingRangeOffset.Value); } public void AutoExposureMinUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTonemapTriggerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTonemapTriggerImpl.cs index ae0bb11c7..a15f68a32 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTonemapTriggerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTonemapTriggerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CTonemapTriggerImpl : CBaseTriggerImpl, CTonemapTrigger { public CTonemapTriggerImpl(nint handle) : base(handle) { } + private static readonly Lazy _TonemapControllerNameOffset = new(() => Schema.GetOffset(0x82562698C641A282), LazyThreadSafetyMode.None); + public string TonemapControllerName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x82562698C641A282)); + var ptr = _Handle.Read(_TonemapControllerNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x82562698C641A282, value); + set => Schema.SetString(_Handle, _TonemapControllerNameOffset.Value, value); } + private static readonly Lazy _TonemapControllerOffset = new(() => Schema.GetOffset(0x82562698F5E1A34F), LazyThreadSafetyMode.None); + public ref CHandle TonemapController { - get => ref _Handle.AsRef>(Schema.GetOffset(0x82562698F5E1A34F)); + get => ref _Handle.AsRef>(_TonemapControllerOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTouchExpansionComponentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTouchExpansionComponentImpl.cs index fa869a787..989c7de74 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTouchExpansionComponentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTouchExpansionComponentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTransitionUpdateDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTransitionUpdateDataImpl.cs index 171b7c585..f3e6921b4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTransitionUpdateDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTransitionUpdateDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CTransitionUpdateDataImpl : SchemaClass, CTransitionUpdat public CTransitionUpdateDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _SrcStateIndexOffset = new(() => Schema.GetOffset(0xF3F18D08D2AF559E), LazyThreadSafetyMode.None); + public ref byte SrcStateIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3F18D08D2AF559E)); + get => ref _Handle.AsRef(_SrcStateIndexOffset.Value); } + private static readonly Lazy _DestStateIndexOffset = new(() => Schema.GetOffset(0xF3F18D0876246C8A), LazyThreadSafetyMode.None); + public ref byte DestStateIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3F18D0876246C8A)); + get => ref _Handle.AsRef(_DestStateIndexOffset.Value); } + private static readonly Lazy _HandshakeMaskToDisableFirstOffset = new(() => Schema.GetOffset(0xF3F18D08E58422C5), LazyThreadSafetyMode.None); + public SchemaUntypedField HandshakeMaskToDisableFirst { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xF3F18D08E58422C5)); + get => new SchemaUntypedField(_Handle + _HandshakeMaskToDisableFirstOffset.Value); } + private static readonly Lazy _DisabledOffset = new(() => Schema.GetOffset(0xF3F18D083A7C5965), LazyThreadSafetyMode.None); + public SchemaUntypedField Disabled { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xF3F18D083A7C5965)); + get => new SchemaUntypedField(_Handle + _DisabledOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerActiveWeaponDetectImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerActiveWeaponDetectImpl.cs index af948249a..6bd2ec6a5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerActiveWeaponDetectImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerActiveWeaponDetectImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CTriggerActiveWeaponDetectImpl : CBaseTriggerImpl, CTrigg public CTriggerActiveWeaponDetectImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnTouchedActiveWeaponOffset = new(() => Schema.GetOffset(0x68F50CC727D5D394), LazyThreadSafetyMode.None); + public CEntityIOOutput OnTouchedActiveWeapon { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x68F50CC727D5D394)); + get => new CEntityIOOutputImpl(_Handle + _OnTouchedActiveWeaponOffset.Value); } + private static readonly Lazy _WeaponClassNameOffset = new(() => Schema.GetOffset(0x68F50CC7BD3D5B08), LazyThreadSafetyMode.None); + public string WeaponClassName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x68F50CC7BD3D5B08)); + var ptr = _Handle.Read(_WeaponClassNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x68F50CC7BD3D5B08, value); + set => Schema.SetString(_Handle, _WeaponClassNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerBombResetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerBombResetImpl.cs index b7115cb77..d2b60fee0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerBombResetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerBombResetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerBrushImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerBrushImpl.cs index 6b2a6bad8..5d3c119e5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerBrushImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerBrushImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CTriggerBrushImpl : CBaseModelEntityImpl, CTriggerBrush { public CTriggerBrushImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnStartTouchOffset = new(() => Schema.GetOffset(0xD9D3DFB2B4E38193), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStartTouch { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xD9D3DFB2B4E38193)); + get => new CEntityIOOutputImpl(_Handle + _OnStartTouchOffset.Value); } + private static readonly Lazy _OnEndTouchOffset = new(() => Schema.GetOffset(0xD9D3DFB25D181B48), LazyThreadSafetyMode.None); + public CEntityIOOutput OnEndTouch { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xD9D3DFB25D181B48)); + get => new CEntityIOOutputImpl(_Handle + _OnEndTouchOffset.Value); } + private static readonly Lazy _OnUseOffset = new(() => Schema.GetOffset(0xD9D3DFB2C3D50673), LazyThreadSafetyMode.None); + public CEntityIOOutput OnUse { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xD9D3DFB2C3D50673)); + get => new CEntityIOOutputImpl(_Handle + _OnUseOffset.Value); } + private static readonly Lazy _InputFilterOffset = new(() => Schema.GetOffset(0xD9D3DFB2D5B46E3A), LazyThreadSafetyMode.None); + public ref int InputFilter { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9D3DFB2D5B46E3A)); + get => ref _Handle.AsRef(_InputFilterOffset.Value); } + private static readonly Lazy _DontMessageParentOffset = new(() => Schema.GetOffset(0xD9D3DFB2EE2AF166), LazyThreadSafetyMode.None); + public ref int DontMessageParent { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9D3DFB2EE2AF166)); + get => ref _Handle.AsRef(_DontMessageParentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerBuoyancyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerBuoyancyImpl.cs index b11366365..81d35bdcf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerBuoyancyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerBuoyancyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CTriggerBuoyancyImpl : CBaseTriggerImpl, CTriggerBuoyancy public CTriggerBuoyancyImpl(nint handle) : base(handle) { } + private static readonly Lazy _BuoyancyHelperOffset = new(() => Schema.GetOffset(0xE9698D106BAFFEA7), LazyThreadSafetyMode.None); + public CBuoyancyHelper BuoyancyHelper { - get => new CBuoyancyHelperImpl(_Handle + Schema.GetOffset(0xE9698D106BAFFEA7)); + get => new CBuoyancyHelperImpl(_Handle + _BuoyancyHelperOffset.Value); } + private static readonly Lazy _FluidDensityOffset = new(() => Schema.GetOffset(0xE9698D10DABBC5A3), LazyThreadSafetyMode.None); + public ref float FluidDensity { - get => ref _Handle.AsRef(Schema.GetOffset(0xE9698D10DABBC5A3)); + get => ref _Handle.AsRef(_FluidDensityOffset.Value); } public void FluidDensityUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerCallbackImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerCallbackImpl.cs index d4aee6ca4..8e92767ec 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerCallbackImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerCallbackImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerDetectBulletFireImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerDetectBulletFireImpl.cs index c8e294ab6..4e3fe0bda 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerDetectBulletFireImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerDetectBulletFireImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CTriggerDetectBulletFireImpl : CBaseTriggerImpl, CTrigger public CTriggerDetectBulletFireImpl(nint handle) : base(handle) { } + private static readonly Lazy _PlayerFireOnlyOffset = new(() => Schema.GetOffset(0x93930A3D56D51CFE), LazyThreadSafetyMode.None); + public ref bool PlayerFireOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0x93930A3D56D51CFE)); + get => ref _Handle.AsRef(_PlayerFireOnlyOffset.Value); } + private static readonly Lazy _OnDetectedBulletFireOffset = new(() => Schema.GetOffset(0x93930A3D11D6C936), LazyThreadSafetyMode.None); + public CEntityIOOutput OnDetectedBulletFire { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x93930A3D11D6C936)); + get => new CEntityIOOutputImpl(_Handle + _OnDetectedBulletFireOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerDetectExplosionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerDetectExplosionImpl.cs index d58e28736..9bc5ce520 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerDetectExplosionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerDetectExplosionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CTriggerDetectExplosionImpl : CBaseTriggerImpl, CTriggerD public CTriggerDetectExplosionImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnDetectedExplosionOffset = new(() => Schema.GetOffset(0xEDC17DD03CDD7F71), LazyThreadSafetyMode.None); + public CEntityIOOutput OnDetectedExplosion { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0xEDC17DD03CDD7F71)); + get => new CEntityIOOutputImpl(_Handle + _OnDetectedExplosionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerFanImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerFanImpl.cs index 274e58bd0..62687b672 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerFanImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerFanImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,84 +17,134 @@ internal partial class CTriggerFanImpl : CBaseTriggerImpl, CTriggerFan { public CTriggerFanImpl(nint handle) : base(handle) { } + private static readonly Lazy _FanOriginOffsetOffset = new(() => Schema.GetOffset(0x6A8B5C2BAFB9770B), LazyThreadSafetyMode.None); + public ref Vector FanOriginOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2BAFB9770B)); + get => ref _Handle.AsRef(_FanOriginOffsetOffset.Value); } + private static readonly Lazy _DirectionOffset = new(() => Schema.GetOffset(0x6A8B5C2BDAE41DEE), LazyThreadSafetyMode.None); + public ref Vector Direction { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2BDAE41DEE)); + get => ref _Handle.AsRef(_DirectionOffset.Value); } + private static readonly Lazy _PushTowardsInfoTargetOffset = new(() => Schema.GetOffset(0x6A8B5C2BB6D3B4CE), LazyThreadSafetyMode.None); + public ref bool PushTowardsInfoTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2BB6D3B4CE)); + get => ref _Handle.AsRef(_PushTowardsInfoTargetOffset.Value); } + private static readonly Lazy _PushAwayFromInfoTargetOffset = new(() => Schema.GetOffset(0x6A8B5C2BF3F3D5EE), LazyThreadSafetyMode.None); + public ref bool PushAwayFromInfoTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2BF3F3D5EE)); + get => ref _Handle.AsRef(_PushAwayFromInfoTargetOffset.Value); } + private static readonly Lazy _NoiseDeltaOffset = new(() => Schema.GetOffset(0x6A8B5C2BDC0D2AE8), LazyThreadSafetyMode.None); + public ref Quaternion NoiseDelta { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2BDC0D2AE8)); + get => ref _Handle.AsRef(_NoiseDeltaOffset.Value); } + private static readonly Lazy _InfoFanOffset = new(() => Schema.GetOffset(0x6A8B5C2B423064AC), LazyThreadSafetyMode.None); + public ref CHandle InfoFan { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6A8B5C2B423064AC)); + get => ref _Handle.AsRef>(_InfoFanOffset.Value); } + private static readonly Lazy _ForceOffset = new(() => Schema.GetOffset(0x6A8B5C2BCA90E47A), LazyThreadSafetyMode.None); + public ref float Force { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2BCA90E47A)); + get => ref _Handle.AsRef(_ForceOffset.Value); } + private static readonly Lazy _FalloffOffset = new(() => Schema.GetOffset(0x6A8B5C2B76E955A5), LazyThreadSafetyMode.None); + public ref bool Falloff { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2B76E955A5)); + get => ref _Handle.AsRef(_FalloffOffset.Value); } + private static readonly Lazy _RampTimerOffset = new(() => Schema.GetOffset(0x6A8B5C2B21725ED6), LazyThreadSafetyMode.None); + public CountdownTimer RampTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x6A8B5C2B21725ED6)); + get => new CountdownTimerImpl(_Handle + _RampTimerOffset.Value); } + private static readonly Lazy _FanOriginWSOffset = new(() => Schema.GetOffset(0x6A8B5C2BB1BF460A), LazyThreadSafetyMode.None); + public ref Vector FanOriginWS { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2BB1BF460A)); + get => ref _Handle.AsRef(_FanOriginWSOffset.Value); } + private static readonly Lazy _FanOriginLSOffset = new(() => Schema.GetOffset(0x6A8B5C2BF1CC76BD), LazyThreadSafetyMode.None); + public ref Vector FanOriginLS { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2BF1CC76BD)); + get => ref _Handle.AsRef(_FanOriginLSOffset.Value); } + private static readonly Lazy _FanEndLSOffset = new(() => Schema.GetOffset(0x6A8B5C2B53F6BE42), LazyThreadSafetyMode.None); + public ref Vector FanEndLS { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2B53F6BE42)); + get => ref _Handle.AsRef(_FanEndLSOffset.Value); } + private static readonly Lazy _NoiseDirectionTargetOffset = new(() => Schema.GetOffset(0x6A8B5C2B59781ABB), LazyThreadSafetyMode.None); + public ref Vector NoiseDirectionTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2B59781ABB)); + get => ref _Handle.AsRef(_NoiseDirectionTargetOffset.Value); } + private static readonly Lazy _InfoFan1Offset = new(() => Schema.GetOffset(0x6A8B5C2B8E6431BA), LazyThreadSafetyMode.None); + public string InfoFan1 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6A8B5C2B8E6431BA)); + var ptr = _Handle.Read(_InfoFan1Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6A8B5C2B8E6431BA, value); + set => Schema.SetString(_Handle, _InfoFan1Offset.Value, value); } + private static readonly Lazy _RopeForceScaleOffset = new(() => Schema.GetOffset(0x6A8B5C2B08EB54C8), LazyThreadSafetyMode.None); + public ref float RopeForceScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2B08EB54C8)); + get => ref _Handle.AsRef(_RopeForceScaleOffset.Value); } + private static readonly Lazy _ParticleForceScaleOffset = new(() => Schema.GetOffset(0x6A8B5C2B8DB0C4D2), LazyThreadSafetyMode.None); + public ref float ParticleForceScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2B8DB0C4D2)); + get => ref _Handle.AsRef(_ParticleForceScaleOffset.Value); } + private static readonly Lazy _PlayerForceOffset = new(() => Schema.GetOffset(0x6A8B5C2B3081B6B5), LazyThreadSafetyMode.None); + public ref float PlayerForce { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2B3081B6B5)); + get => ref _Handle.AsRef(_PlayerForceOffset.Value); } + private static readonly Lazy _PlayerWindblockOffset = new(() => Schema.GetOffset(0x6A8B5C2B59B4AC7B), LazyThreadSafetyMode.None); + public ref bool PlayerWindblock { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2B59B4AC7B)); + get => ref _Handle.AsRef(_PlayerWindblockOffset.Value); } + private static readonly Lazy _NPCForceOffset = new(() => Schema.GetOffset(0x6A8B5C2B9BD16135), LazyThreadSafetyMode.None); + public ref float NPCForce { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2B9BD16135)); + get => ref _Handle.AsRef(_NPCForceOffset.Value); } + private static readonly Lazy _RampTimeOffset = new(() => Schema.GetOffset(0x6A8B5C2B7F655EF6), LazyThreadSafetyMode.None); + public ref float RampTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2B7F655EF6)); + get => ref _Handle.AsRef(_RampTimeOffset.Value); } + private static readonly Lazy _NoiseDegreesOffset = new(() => Schema.GetOffset(0x6A8B5C2BB9B3398E), LazyThreadSafetyMode.None); + public ref float NoiseDegrees { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2BB9B3398E)); + get => ref _Handle.AsRef(_NoiseDegreesOffset.Value); } + private static readonly Lazy _NoiseSpeedOffset = new(() => Schema.GetOffset(0x6A8B5C2B5C5BB620), LazyThreadSafetyMode.None); + public ref float NoiseSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2B5C5BB620)); + get => ref _Handle.AsRef(_NoiseSpeedOffset.Value); } + private static readonly Lazy _PushPlayerOffset = new(() => Schema.GetOffset(0x6A8B5C2B9DD4D118), LazyThreadSafetyMode.None); + public ref bool PushPlayer { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2B9DD4D118)); + get => ref _Handle.AsRef(_PushPlayerOffset.Value); } + private static readonly Lazy _RampDownOffset = new(() => Schema.GetOffset(0x6A8B5C2B16C1F4F9), LazyThreadSafetyMode.None); + public ref bool RampDown { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2B16C1F4F9)); + get => ref _Handle.AsRef(_RampDownOffset.Value); } + private static readonly Lazy _ManagerFanIdxOffset = new(() => Schema.GetOffset(0x6A8B5C2B2401CC88), LazyThreadSafetyMode.None); + public ref int ManagerFanIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8B5C2B2401CC88)); + get => ref _Handle.AsRef(_ManagerFanIdxOffset.Value); } public void FanOriginOffsetUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerGameEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerGameEventImpl.cs index 26c6b018d..afaf6226e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerGameEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerGameEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,32 @@ internal partial class CTriggerGameEventImpl : CBaseTriggerImpl, CTriggerGameEve public CTriggerGameEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _StrStartTouchEventNameOffset = new(() => Schema.GetOffset(0xF8B194884B1EB67A), LazyThreadSafetyMode.None); + public string StrStartTouchEventName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF8B194884B1EB67A)); + var ptr = _Handle.Read(_StrStartTouchEventNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF8B194884B1EB67A, value); + set => Schema.SetString(_Handle, _StrStartTouchEventNameOffset.Value, value); } + private static readonly Lazy _StrEndTouchEventNameOffset = new(() => Schema.GetOffset(0xF8B194886EDE6893), LazyThreadSafetyMode.None); + public string StrEndTouchEventName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF8B194886EDE6893)); + var ptr = _Handle.Read(_StrEndTouchEventNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF8B194886EDE6893, value); + set => Schema.SetString(_Handle, _StrEndTouchEventNameOffset.Value, value); } + private static readonly Lazy _StrTriggerIDOffset = new(() => Schema.GetOffset(0xF8B19488EA731D41), LazyThreadSafetyMode.None); + public string StrTriggerID { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF8B19488EA731D41)); + var ptr = _Handle.Read(_StrTriggerIDOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF8B19488EA731D41, value); + set => Schema.SetString(_Handle, _StrTriggerIDOffset.Value, value); } public void StrStartTouchEventNameUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerGravityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerGravityImpl.cs index 04891ac2d..b5d9b8aae 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerGravityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerGravityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerHostageResetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerHostageResetImpl.cs index dee01a933..3a09f70b8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerHostageResetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerHostageResetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerHurtImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerHurtImpl.cs index 27e7e0c64..969de7b29 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerHurtImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerHurtImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,47 +17,75 @@ internal partial class CTriggerHurtImpl : CBaseTriggerImpl, CTriggerHurt { public CTriggerHurtImpl(nint handle) : base(handle) { } + private static readonly Lazy _OriginalDamageOffset = new(() => Schema.GetOffset(0x8D02278785B50515), LazyThreadSafetyMode.None); + public ref float OriginalDamage { - get => ref _Handle.AsRef(Schema.GetOffset(0x8D02278785B50515)); + get => ref _Handle.AsRef(_OriginalDamageOffset.Value); } + private static readonly Lazy _DamageOffset = new(() => Schema.GetOffset(0x8D022787DC60E53E), LazyThreadSafetyMode.None); + public ref float Damage { - get => ref _Handle.AsRef(Schema.GetOffset(0x8D022787DC60E53E)); + get => ref _Handle.AsRef(_DamageOffset.Value); } + private static readonly Lazy _DamageCapOffset = new(() => Schema.GetOffset(0x8D022787AED58F86), LazyThreadSafetyMode.None); + public ref float DamageCap { - get => ref _Handle.AsRef(Schema.GetOffset(0x8D022787AED58F86)); + get => ref _Handle.AsRef(_DamageCapOffset.Value); } + private static readonly Lazy _LastDmgTimeOffset = new(() => Schema.GetOffset(0x8D022787BF3F1360), LazyThreadSafetyMode.None); + public GameTime_t LastDmgTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8D022787BF3F1360)); + get => new GameTime_tImpl(_Handle + _LastDmgTimeOffset.Value); } + private static readonly Lazy _ForgivenessDelayOffset = new(() => Schema.GetOffset(0x8D022787112B0E13), LazyThreadSafetyMode.None); + public ref float ForgivenessDelay { - get => ref _Handle.AsRef(Schema.GetOffset(0x8D022787112B0E13)); + get => ref _Handle.AsRef(_ForgivenessDelayOffset.Value); } + private static readonly Lazy _BitsDamageInflictOffset = new(() => Schema.GetOffset(0x8D0227876F0ADA0F), LazyThreadSafetyMode.None); + public ref DamageTypes_t BitsDamageInflict { - get => ref _Handle.AsRef(Schema.GetOffset(0x8D0227876F0ADA0F)); + get => ref _Handle.AsRef(_BitsDamageInflictOffset.Value); } + private static readonly Lazy _DamageModelOffset = new(() => Schema.GetOffset(0x8D022787076F74AD), LazyThreadSafetyMode.None); + public ref int DamageModel { - get => ref _Handle.AsRef(Schema.GetOffset(0x8D022787076F74AD)); + get => ref _Handle.AsRef(_DamageModelOffset.Value); } + private static readonly Lazy _NoDmgForceOffset = new(() => Schema.GetOffset(0x8D0227878236F03D), LazyThreadSafetyMode.None); + public ref bool NoDmgForce { - get => ref _Handle.AsRef(Schema.GetOffset(0x8D0227878236F03D)); + get => ref _Handle.AsRef(_NoDmgForceOffset.Value); } + private static readonly Lazy _DamageForceOffset = new(() => Schema.GetOffset(0x8D022787B66401B7), LazyThreadSafetyMode.None); + public ref Vector DamageForce { - get => ref _Handle.AsRef(Schema.GetOffset(0x8D022787B66401B7)); + get => ref _Handle.AsRef(_DamageForceOffset.Value); } + private static readonly Lazy _ThinkAlwaysOffset = new(() => Schema.GetOffset(0x8D02278776BDBDDA), LazyThreadSafetyMode.None); + public ref bool ThinkAlways { - get => ref _Handle.AsRef(Schema.GetOffset(0x8D02278776BDBDDA)); + get => ref _Handle.AsRef(_ThinkAlwaysOffset.Value); } + private static readonly Lazy _HurtThinkPeriodOffset = new(() => Schema.GetOffset(0x8D022787C98165F1), LazyThreadSafetyMode.None); + public ref float HurtThinkPeriod { - get => ref _Handle.AsRef(Schema.GetOffset(0x8D022787C98165F1)); + get => ref _Handle.AsRef(_HurtThinkPeriodOffset.Value); } + private static readonly Lazy _OnHurtOffset = new(() => Schema.GetOffset(0x8D022787361573C1), LazyThreadSafetyMode.None); + public CEntityIOOutput OnHurt { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x8D022787361573C1)); + get => new CEntityIOOutputImpl(_Handle + _OnHurtOffset.Value); } + private static readonly Lazy _OnHurtPlayerOffset = new(() => Schema.GetOffset(0x8D02278771C2F34C), LazyThreadSafetyMode.None); + public CEntityIOOutput OnHurtPlayer { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x8D02278771C2F34C)); + get => new CEntityIOOutputImpl(_Handle + _OnHurtPlayerOffset.Value); } + private static readonly Lazy _HurtEntitiesOffset = new(() => Schema.GetOffset(0x8D0227874E045AC3), LazyThreadSafetyMode.None); + public ref CUtlVector> HurtEntities { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x8D0227874E045AC3)); + get => ref _Handle.AsRef>>(_HurtEntitiesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerImpactImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerImpactImpl.cs index 681f6ad22..641598e26 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerImpactImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerImpactImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CTriggerImpactImpl : CTriggerMultipleImpl, CTriggerImpact public CTriggerImpactImpl(nint handle) : base(handle) { } + private static readonly Lazy _MagnitudeOffset = new(() => Schema.GetOffset(0x2A6A2B48ED0A1D8B), LazyThreadSafetyMode.None); + public ref float Magnitude { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A6A2B48ED0A1D8B)); + get => ref _Handle.AsRef(_MagnitudeOffset.Value); } + private static readonly Lazy _NoiseOffset = new(() => Schema.GetOffset(0x2A6A2B48C0E47FDB), LazyThreadSafetyMode.None); + public ref float Noise { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A6A2B48C0E47FDB)); + get => ref _Handle.AsRef(_NoiseOffset.Value); } + private static readonly Lazy _ViewkickOffset = new(() => Schema.GetOffset(0x2A6A2B48C8BC3FC4), LazyThreadSafetyMode.None); + public ref float Viewkick { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A6A2B48C8BC3FC4)); + get => ref _Handle.AsRef(_ViewkickOffset.Value); } + private static readonly Lazy _OutputForceOffset = new(() => Schema.GetOffset(0x2A6A2B488653AFA9), LazyThreadSafetyMode.None); + public SchemaUntypedField OutputForce { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x2A6A2B488653AFA9)); + get => new SchemaUntypedField(_Handle + _OutputForceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerLerpObjectImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerLerpObjectImpl.cs index 3dd8a00d8..d546540ca 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerLerpObjectImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerLerpObjectImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,66 +17,96 @@ internal partial class CTriggerLerpObjectImpl : CBaseTriggerImpl, CTriggerLerpOb public CTriggerLerpObjectImpl(nint handle) : base(handle) { } + private static readonly Lazy _LerpTargetOffset = new(() => Schema.GetOffset(0x42FE8EA4853F2479), LazyThreadSafetyMode.None); + public string LerpTarget { get { - var ptr = _Handle.Read(Schema.GetOffset(0x42FE8EA4853F2479)); + var ptr = _Handle.Read(_LerpTargetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x42FE8EA4853F2479, value); + set => Schema.SetString(_Handle, _LerpTargetOffset.Value, value); } + private static readonly Lazy _LerpTarget1Offset = new(() => Schema.GetOffset(0x42FE8EA4BAB18AEF), LazyThreadSafetyMode.None); + public ref CHandle LerpTarget1 { - get => ref _Handle.AsRef>(Schema.GetOffset(0x42FE8EA4BAB18AEF)); + get => ref _Handle.AsRef>(_LerpTarget1Offset.Value); } + private static readonly Lazy _LerpTargetAttachmentOffset = new(() => Schema.GetOffset(0x42FE8EA4C1E312BC), LazyThreadSafetyMode.None); + public string LerpTargetAttachment { get { - var ptr = _Handle.Read(Schema.GetOffset(0x42FE8EA4C1E312BC)); + var ptr = _Handle.Read(_LerpTargetAttachmentOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x42FE8EA4C1E312BC, value); + set => Schema.SetString(_Handle, _LerpTargetAttachmentOffset.Value, value); } + private static readonly Lazy _LerpTargetAttachment2Offset = new(() => Schema.GetOffset(0x42FE8EA4FC3162AA), LazyThreadSafetyMode.None); + public AttachmentHandle_t LerpTargetAttachment2 { - get => new AttachmentHandle_tImpl(_Handle + Schema.GetOffset(0x42FE8EA4FC3162AA)); + get => new AttachmentHandle_tImpl(_Handle + _LerpTargetAttachment2Offset.Value); } + private static readonly Lazy _LerpDurationOffset = new(() => Schema.GetOffset(0x42FE8EA4B5F8D70A), LazyThreadSafetyMode.None); + public ref float LerpDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x42FE8EA4B5F8D70A)); + get => ref _Handle.AsRef(_LerpDurationOffset.Value); } + private static readonly Lazy _LerpRestoreMoveTypeOffset = new(() => Schema.GetOffset(0x42FE8EA4C501C93F), LazyThreadSafetyMode.None); + public ref bool LerpRestoreMoveType { - get => ref _Handle.AsRef(Schema.GetOffset(0x42FE8EA4C501C93F)); + get => ref _Handle.AsRef(_LerpRestoreMoveTypeOffset.Value); } + private static readonly Lazy _SingleLerpObjectOffset = new(() => Schema.GetOffset(0x42FE8EA4EC72477B), LazyThreadSafetyMode.None); + public ref bool SingleLerpObject { - get => ref _Handle.AsRef(Schema.GetOffset(0x42FE8EA4EC72477B)); + get => ref _Handle.AsRef(_SingleLerpObjectOffset.Value); } + private static readonly Lazy _LerpingObjectsOffset = new(() => Schema.GetOffset(0x42FE8EA40128714C), LazyThreadSafetyMode.None); + public ref CUtlVector LerpingObjects { - get => ref _Handle.AsRef>(Schema.GetOffset(0x42FE8EA40128714C)); + get => ref _Handle.AsRef>(_LerpingObjectsOffset.Value); } + private static readonly Lazy _LerpEffectOffset = new(() => Schema.GetOffset(0x42FE8EA4EEECF881), LazyThreadSafetyMode.None); + public string LerpEffect { get { - var ptr = _Handle.Read(Schema.GetOffset(0x42FE8EA4EEECF881)); + var ptr = _Handle.Read(_LerpEffectOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x42FE8EA4EEECF881, value); + set => Schema.SetString(_Handle, _LerpEffectOffset.Value, value); } + private static readonly Lazy _LerpSoundOffset = new(() => Schema.GetOffset(0x42FE8EA46CA9EE5F), LazyThreadSafetyMode.None); + public string LerpSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0x42FE8EA46CA9EE5F)); + var ptr = _Handle.Read(_LerpSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x42FE8EA46CA9EE5F, value); + set => Schema.SetString(_Handle, _LerpSoundOffset.Value, value); } + private static readonly Lazy _AttachTouchingObjectOffset = new(() => Schema.GetOffset(0x42FE8EA4569C11D2), LazyThreadSafetyMode.None); + public ref bool AttachTouchingObject { - get => ref _Handle.AsRef(Schema.GetOffset(0x42FE8EA4569C11D2)); + get => ref _Handle.AsRef(_AttachTouchingObjectOffset.Value); } + private static readonly Lazy _EntityToWaitForDisconnectOffset = new(() => Schema.GetOffset(0x42FE8EA4E8928591), LazyThreadSafetyMode.None); + public ref CHandle EntityToWaitForDisconnect { - get => ref _Handle.AsRef>(Schema.GetOffset(0x42FE8EA4E8928591)); + get => ref _Handle.AsRef>(_EntityToWaitForDisconnectOffset.Value); } + private static readonly Lazy _OnLerpStartedOffset = new(() => Schema.GetOffset(0x42FE8EA4AE5EB5AA), LazyThreadSafetyMode.None); + public CEntityIOOutput OnLerpStarted { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x42FE8EA4AE5EB5AA)); + get => new CEntityIOOutputImpl(_Handle + _OnLerpStartedOffset.Value); } + private static readonly Lazy _OnLerpFinishedOffset = new(() => Schema.GetOffset(0x42FE8EA4FBCC57F7), LazyThreadSafetyMode.None); + public CEntityIOOutput OnLerpFinished { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x42FE8EA4FBCC57F7)); + get => new CEntityIOOutputImpl(_Handle + _OnLerpFinishedOffset.Value); } + private static readonly Lazy _OnDetachedOffset = new(() => Schema.GetOffset(0x42FE8EA465BAE906), LazyThreadSafetyMode.None); + public CEntityIOOutput OnDetached { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x42FE8EA465BAE906)); + get => new CEntityIOOutputImpl(_Handle + _OnDetachedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerLookImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerLookImpl.cs index 9ed67994c..bf40b3862 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerLookImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerLookImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,50 +17,80 @@ internal partial class CTriggerLookImpl : CTriggerOnceImpl, CTriggerLook { public CTriggerLookImpl(nint handle) : base(handle) { } + private static readonly Lazy _LookTargetOffset = new(() => Schema.GetOffset(0x400CA6913361F745), LazyThreadSafetyMode.None); + public ref CHandle LookTarget { - get => ref _Handle.AsRef>(Schema.GetOffset(0x400CA6913361F745)); + get => ref _Handle.AsRef>(_LookTargetOffset.Value); } + private static readonly Lazy _FieldOfViewOffset = new(() => Schema.GetOffset(0x400CA69157C8F26D), LazyThreadSafetyMode.None); + public ref float FieldOfView { - get => ref _Handle.AsRef(Schema.GetOffset(0x400CA69157C8F26D)); + get => ref _Handle.AsRef(_FieldOfViewOffset.Value); } + private static readonly Lazy _LookTimeOffset = new(() => Schema.GetOffset(0x400CA69104D9B055), LazyThreadSafetyMode.None); + public ref float LookTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x400CA69104D9B055)); + get => ref _Handle.AsRef(_LookTimeOffset.Value); } + private static readonly Lazy _LookTimeTotalOffset = new(() => Schema.GetOffset(0x400CA6910EF1464D), LazyThreadSafetyMode.None); + public ref float LookTimeTotal { - get => ref _Handle.AsRef(Schema.GetOffset(0x400CA6910EF1464D)); + get => ref _Handle.AsRef(_LookTimeTotalOffset.Value); } + private static readonly Lazy _LookTimeLastOffset = new(() => Schema.GetOffset(0x400CA691C3304509), LazyThreadSafetyMode.None); + public GameTime_t LookTimeLast { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x400CA691C3304509)); + get => new GameTime_tImpl(_Handle + _LookTimeLastOffset.Value); } + private static readonly Lazy _TimeoutDurationOffset = new(() => Schema.GetOffset(0x400CA6919AF6CDFE), LazyThreadSafetyMode.None); + public ref float TimeoutDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x400CA6919AF6CDFE)); + get => ref _Handle.AsRef(_TimeoutDurationOffset.Value); } + private static readonly Lazy _TimeoutFiredOffset = new(() => Schema.GetOffset(0x400CA69169DF01E8), LazyThreadSafetyMode.None); + public ref bool TimeoutFired { - get => ref _Handle.AsRef(Schema.GetOffset(0x400CA69169DF01E8)); + get => ref _Handle.AsRef(_TimeoutFiredOffset.Value); } + private static readonly Lazy _IsLookingOffset = new(() => Schema.GetOffset(0x400CA691983E8E2A), LazyThreadSafetyMode.None); + public ref bool IsLooking { - get => ref _Handle.AsRef(Schema.GetOffset(0x400CA691983E8E2A)); + get => ref _Handle.AsRef(_IsLookingOffset.Value); } + private static readonly Lazy _B2DFOVOffset = new(() => Schema.GetOffset(0x400CA6919C4430D2), LazyThreadSafetyMode.None); + public ref bool B2DFOV { - get => ref _Handle.AsRef(Schema.GetOffset(0x400CA6919C4430D2)); + get => ref _Handle.AsRef(_B2DFOVOffset.Value); } + private static readonly Lazy _UseVelocityOffset = new(() => Schema.GetOffset(0x400CA6915E806BAF), LazyThreadSafetyMode.None); + public ref bool UseVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0x400CA6915E806BAF)); + get => ref _Handle.AsRef(_UseVelocityOffset.Value); } + private static readonly Lazy _TestOcclusionOffset = new(() => Schema.GetOffset(0x400CA6912AB3E7C2), LazyThreadSafetyMode.None); + public ref bool TestOcclusion { - get => ref _Handle.AsRef(Schema.GetOffset(0x400CA6912AB3E7C2)); + get => ref _Handle.AsRef(_TestOcclusionOffset.Value); } + private static readonly Lazy _TestAllVisibleOcclusionOffset = new(() => Schema.GetOffset(0x400CA691FBAABAEB), LazyThreadSafetyMode.None); + public ref bool TestAllVisibleOcclusion { - get => ref _Handle.AsRef(Schema.GetOffset(0x400CA691FBAABAEB)); + get => ref _Handle.AsRef(_TestAllVisibleOcclusionOffset.Value); } + private static readonly Lazy _OnTimeoutOffset = new(() => Schema.GetOffset(0x400CA691C5301603), LazyThreadSafetyMode.None); + public CEntityIOOutput OnTimeout { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x400CA691C5301603)); + get => new CEntityIOOutputImpl(_Handle + _OnTimeoutOffset.Value); } + private static readonly Lazy _OnStartLookOffset = new(() => Schema.GetOffset(0x400CA6914E36D787), LazyThreadSafetyMode.None); + public CEntityIOOutput OnStartLook { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x400CA6914E36D787)); + get => new CEntityIOOutputImpl(_Handle + _OnStartLookOffset.Value); } + private static readonly Lazy _OnEndLookOffset = new(() => Schema.GetOffset(0x400CA6914D4626E6), LazyThreadSafetyMode.None); + public CEntityIOOutput OnEndLook { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x400CA6914D4626E6)); + get => new CEntityIOOutputImpl(_Handle + _OnEndLookOffset.Value); } public void TestOcclusionUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerMultipleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerMultipleImpl.cs index 6db05879d..f2bf4b468 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerMultipleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerMultipleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CTriggerMultipleImpl : CBaseTriggerImpl, CTriggerMultiple public CTriggerMultipleImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnTriggerOffset = new(() => Schema.GetOffset(0x327F607E81E0BFEC), LazyThreadSafetyMode.None); + public CEntityIOOutput OnTrigger { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x327F607E81E0BFEC)); + get => new CEntityIOOutputImpl(_Handle + _OnTriggerOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerOnceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerOnceImpl.cs index e4a130d44..39e8247d4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerOnceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerOnceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerPhysicsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerPhysicsImpl.cs index 34b507f64..d9fbb0c2c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerPhysicsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerPhysicsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,70 @@ internal partial class CTriggerPhysicsImpl : CBaseTriggerImpl, CTriggerPhysics { public CTriggerPhysicsImpl(nint handle) : base(handle) { } + private static readonly Lazy _GravityScaleOffset = new(() => Schema.GetOffset(0xD6C7C8D3F22682F1), LazyThreadSafetyMode.None); + public ref float GravityScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6C7C8D3F22682F1)); + get => ref _Handle.AsRef(_GravityScaleOffset.Value); } + private static readonly Lazy _LinearLimitOffset = new(() => Schema.GetOffset(0xD6C7C8D38455E743), LazyThreadSafetyMode.None); + public ref float LinearLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6C7C8D38455E743)); + get => ref _Handle.AsRef(_LinearLimitOffset.Value); } + private static readonly Lazy _LinearDampingOffset = new(() => Schema.GetOffset(0xD6C7C8D395E4E646), LazyThreadSafetyMode.None); + public ref float LinearDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6C7C8D395E4E646)); + get => ref _Handle.AsRef(_LinearDampingOffset.Value); } + private static readonly Lazy _AngularLimitOffset = new(() => Schema.GetOffset(0xD6C7C8D3497B8D18), LazyThreadSafetyMode.None); + public ref float AngularLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6C7C8D3497B8D18)); + get => ref _Handle.AsRef(_AngularLimitOffset.Value); } + private static readonly Lazy _AngularDampingOffset = new(() => Schema.GetOffset(0xD6C7C8D36F1B9C61), LazyThreadSafetyMode.None); + public ref float AngularDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6C7C8D36F1B9C61)); + get => ref _Handle.AsRef(_AngularDampingOffset.Value); } + private static readonly Lazy _LinearForceOffset = new(() => Schema.GetOffset(0xD6C7C8D32DAF4653), LazyThreadSafetyMode.None); + public ref float LinearForce { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6C7C8D32DAF4653)); + get => ref _Handle.AsRef(_LinearForceOffset.Value); } + private static readonly Lazy _FrequencyOffset = new(() => Schema.GetOffset(0xD6C7C8D3D2C16DD7), LazyThreadSafetyMode.None); + public ref float Frequency { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6C7C8D3D2C16DD7)); + get => ref _Handle.AsRef(_FrequencyOffset.Value); } + private static readonly Lazy _DampingRatioOffset = new(() => Schema.GetOffset(0xD6C7C8D3B40C859E), LazyThreadSafetyMode.None); + public ref float DampingRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6C7C8D3B40C859E)); + get => ref _Handle.AsRef(_DampingRatioOffset.Value); } + private static readonly Lazy _LinearForcePointAtOffset = new(() => Schema.GetOffset(0xD6C7C8D3C27DF46E), LazyThreadSafetyMode.None); + public ref Vector LinearForcePointAt { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6C7C8D3C27DF46E)); + get => ref _Handle.AsRef(_LinearForcePointAtOffset.Value); } + private static readonly Lazy _CollapseToForcePointOffset = new(() => Schema.GetOffset(0xD6C7C8D3EB895D00), LazyThreadSafetyMode.None); + public ref bool CollapseToForcePoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6C7C8D3EB895D00)); + get => ref _Handle.AsRef(_CollapseToForcePointOffset.Value); } + private static readonly Lazy _LinearForcePointAtWorldOffset = new(() => Schema.GetOffset(0xD6C7C8D3C80D3782), LazyThreadSafetyMode.None); + public ref Vector LinearForcePointAtWorld { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6C7C8D3C80D3782)); + get => ref _Handle.AsRef(_LinearForcePointAtWorldOffset.Value); } + private static readonly Lazy _LinearForceDirectionOffset = new(() => Schema.GetOffset(0xD6C7C8D36076B2FC), LazyThreadSafetyMode.None); + public ref Vector LinearForceDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6C7C8D36076B2FC)); + get => ref _Handle.AsRef(_LinearForceDirectionOffset.Value); } + private static readonly Lazy _ConvertToDebrisWhenPossibleOffset = new(() => Schema.GetOffset(0xD6C7C8D36AD4D155), LazyThreadSafetyMode.None); + public ref bool ConvertToDebrisWhenPossible { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6C7C8D36AD4D155)); + get => ref _Handle.AsRef(_ConvertToDebrisWhenPossibleOffset.Value); } public void GravityScaleUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerProximityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerProximityImpl.cs index 929edb1ae..31eec266c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerProximityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerProximityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class CTriggerProximityImpl : CBaseTriggerImpl, CTriggerProximi public CTriggerProximityImpl(nint handle) : base(handle) { } + private static readonly Lazy _MeasureTargetOffset = new(() => Schema.GetOffset(0x98F0621FF81BC1A8), LazyThreadSafetyMode.None); + public ref CHandle MeasureTarget { - get => ref _Handle.AsRef>(Schema.GetOffset(0x98F0621FF81BC1A8)); + get => ref _Handle.AsRef>(_MeasureTargetOffset.Value); } + private static readonly Lazy _MeasureTarget1Offset = new(() => Schema.GetOffset(0x98F0621F29C47B3A), LazyThreadSafetyMode.None); + public string MeasureTarget1 { get { - var ptr = _Handle.Read(Schema.GetOffset(0x98F0621F29C47B3A)); + var ptr = _Handle.Read(_MeasureTarget1Offset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x98F0621F29C47B3A, value); + set => Schema.SetString(_Handle, _MeasureTarget1Offset.Value, value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x98F0621F2E1F6E07), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x98F0621F2E1F6E07)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _TouchersOffset = new(() => Schema.GetOffset(0x98F0621FA0F3A2B0), LazyThreadSafetyMode.None); + public ref int Touchers { - get => ref _Handle.AsRef(Schema.GetOffset(0x98F0621FA0F3A2B0)); + get => ref _Handle.AsRef(_TouchersOffset.Value); } + private static readonly Lazy _NearestEntityDistanceOffset = new(() => Schema.GetOffset(0x98F0621F28AD73D5), LazyThreadSafetyMode.None); + public SchemaUntypedField NearestEntityDistance { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x98F0621F28AD73D5)); + get => new SchemaUntypedField(_Handle + _NearestEntityDistanceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerPushImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerPushImpl.cs index cfa6b2183..73947bdcc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerPushImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerPushImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,33 +17,47 @@ internal partial class CTriggerPushImpl : CBaseTriggerImpl, CTriggerPush { public CTriggerPushImpl(nint handle) : base(handle) { } + private static readonly Lazy _PushEntitySpaceOffset = new(() => Schema.GetOffset(0x92E0F2F21952BFD6), LazyThreadSafetyMode.None); + public ref QAngle PushEntitySpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x92E0F2F21952BFD6)); + get => ref _Handle.AsRef(_PushEntitySpaceOffset.Value); } + private static readonly Lazy _PushDirEntitySpaceOffset = new(() => Schema.GetOffset(0x92E0F2F2A3C4D4F3), LazyThreadSafetyMode.None); + public ref Vector PushDirEntitySpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x92E0F2F2A3C4D4F3)); + get => ref _Handle.AsRef(_PushDirEntitySpaceOffset.Value); } + private static readonly Lazy _TriggerOnStartTouchOffset = new(() => Schema.GetOffset(0x92E0F2F2365C0A51), LazyThreadSafetyMode.None); + public ref bool TriggerOnStartTouch { - get => ref _Handle.AsRef(Schema.GetOffset(0x92E0F2F2365C0A51)); + get => ref _Handle.AsRef(_TriggerOnStartTouchOffset.Value); } + private static readonly Lazy _UsePathSimpleOffset = new(() => Schema.GetOffset(0x92E0F2F21BFD6EF1), LazyThreadSafetyMode.None); + public ref bool UsePathSimple { - get => ref _Handle.AsRef(Schema.GetOffset(0x92E0F2F21BFD6EF1)); + get => ref _Handle.AsRef(_UsePathSimpleOffset.Value); } + private static readonly Lazy _PathSimpleNameOffset = new(() => Schema.GetOffset(0x92E0F2F2AB7E7D7F), LazyThreadSafetyMode.None); + public string PathSimpleName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x92E0F2F2AB7E7D7F)); + var ptr = _Handle.Read(_PathSimpleNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x92E0F2F2AB7E7D7F, value); + set => Schema.SetString(_Handle, _PathSimpleNameOffset.Value, value); } + private static readonly Lazy _PathSimpleOffset = new(() => Schema.GetOffset(0x92E0F2F2FA868DCC), LazyThreadSafetyMode.None); + public CPathSimple? PathSimple { get { - var ptr = _Handle.Read(Schema.GetOffset(0x92E0F2F2FA868DCC)); + var ptr = _Handle.Read(_PathSimpleOffset.Value); return ptr.IsValidPtr() ? new CPathSimpleImpl(ptr) : null; } } + private static readonly Lazy _SplinePushTypeOffset = new(() => Schema.GetOffset(0x92E0F2F229A29DE0), LazyThreadSafetyMode.None); + public ref uint SplinePushType { - get => ref _Handle.AsRef(Schema.GetOffset(0x92E0F2F229A29DE0)); + get => ref _Handle.AsRef(_SplinePushTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerRemoveImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerRemoveImpl.cs index 0779b6779..b04d671dc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerRemoveImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerRemoveImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CTriggerRemoveImpl : CBaseTriggerImpl, CTriggerRemove { public CTriggerRemoveImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnRemoveOffset = new(() => Schema.GetOffset(0x97A9D4D67DC268F8), LazyThreadSafetyMode.None); + public CEntityIOOutput OnRemove { - get => new CEntityIOOutputImpl(_Handle + Schema.GetOffset(0x97A9D4D67DC268F8)); + get => new CEntityIOOutputImpl(_Handle + _OnRemoveOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerSaveImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerSaveImpl.cs index e30ecaf0a..4cbc4b61b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerSaveImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerSaveImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CTriggerSaveImpl : CBaseTriggerImpl, CTriggerSave { public CTriggerSaveImpl(nint handle) : base(handle) { } + private static readonly Lazy _ForceNewLevelUnitOffset = new(() => Schema.GetOffset(0xFA0C03F1473BFDE), LazyThreadSafetyMode.None); + public ref bool ForceNewLevelUnit { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA0C03F1473BFDE)); + get => ref _Handle.AsRef(_ForceNewLevelUnitOffset.Value); } + private static readonly Lazy _DangerousTimerOffset = new(() => Schema.GetOffset(0xFA0C03F5CF80EC4), LazyThreadSafetyMode.None); + public ref float DangerousTimer { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA0C03F5CF80EC4)); + get => ref _Handle.AsRef(_DangerousTimerOffset.Value); } + private static readonly Lazy _MinHitPointsOffset = new(() => Schema.GetOffset(0xFA0C03F2C7E0C57), LazyThreadSafetyMode.None); + public ref int MinHitPoints { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA0C03F2C7E0C57)); + get => ref _Handle.AsRef(_MinHitPointsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerSndSosOpvarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerSndSosOpvarImpl.cs index 8a4d36783..a55ddba38 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerSndSosOpvarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerSndSosOpvarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,71 +17,99 @@ internal partial class CTriggerSndSosOpvarImpl : CBaseTriggerImpl, CTriggerSndSo public CTriggerSndSosOpvarImpl(nint handle) : base(handle) { } + private static readonly Lazy _TouchingPlayersOffset = new(() => Schema.GetOffset(0xD4B7BEBCD365BA28), LazyThreadSafetyMode.None); + public ref CUtlVector> TouchingPlayers { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xD4B7BEBCD365BA28)); + get => ref _Handle.AsRef>>(_TouchingPlayersOffset.Value); } + private static readonly Lazy _PositionOffset = new(() => Schema.GetOffset(0xD4B7BEBC4142D14C), LazyThreadSafetyMode.None); + public ref Vector Position { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4B7BEBC4142D14C)); + get => ref _Handle.AsRef(_PositionOffset.Value); } + private static readonly Lazy _CenterSizeOffset = new(() => Schema.GetOffset(0xD4B7BEBC253C84EB), LazyThreadSafetyMode.None); + public ref float CenterSize { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4B7BEBC253C84EB)); + get => ref _Handle.AsRef(_CenterSizeOffset.Value); } + private static readonly Lazy _MinValOffset = new(() => Schema.GetOffset(0xD4B7BEBC9A76F478), LazyThreadSafetyMode.None); + public ref float MinVal { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4B7BEBC9A76F478)); + get => ref _Handle.AsRef(_MinValOffset.Value); } + private static readonly Lazy _MaxValOffset = new(() => Schema.GetOffset(0xD4B7BEBC8CE3891E), LazyThreadSafetyMode.None); + public ref float MaxVal { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4B7BEBC8CE3891E)); + get => ref _Handle.AsRef(_MaxValOffset.Value); } + private static readonly Lazy _OpvarNameOffset = new(() => Schema.GetOffset(0xD4B7BEBC4ECBF7E4), LazyThreadSafetyMode.None); + public string OpvarName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD4B7BEBC4ECBF7E4)); + var ptr = _Handle.Read(_OpvarNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD4B7BEBC4ECBF7E4, value); + set => Schema.SetString(_Handle, _OpvarNameOffset.Value, value); } + private static readonly Lazy _StackNameOffset = new(() => Schema.GetOffset(0xD4B7BEBCC6D6063C), LazyThreadSafetyMode.None); + public string StackName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD4B7BEBCC6D6063C)); + var ptr = _Handle.Read(_StackNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD4B7BEBCC6D6063C, value); + set => Schema.SetString(_Handle, _StackNameOffset.Value, value); } + private static readonly Lazy _OperatorNameOffset = new(() => Schema.GetOffset(0xD4B7BEBCC4AA99BE), LazyThreadSafetyMode.None); + public string OperatorName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD4B7BEBCC4AA99BE)); + var ptr = _Handle.Read(_OperatorNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD4B7BEBCC4AA99BE, value); + set => Schema.SetString(_Handle, _OperatorNameOffset.Value, value); } + private static readonly Lazy _VolIs2DOffset = new(() => Schema.GetOffset(0xD4B7BEBC384D3350), LazyThreadSafetyMode.None); + public ref bool VolIs2D { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4B7BEBC384D3350)); + get => ref _Handle.AsRef(_VolIs2DOffset.Value); } + private static readonly Lazy _OpvarNameCharOffset = new(() => Schema.GetOffset(0xD4B7BEBC55F3CFF0), LazyThreadSafetyMode.None); + public string OpvarNameChar { get { - var ptr = _Handle + Schema.GetOffset(0xD4B7BEBC55F3CFF0); + var ptr = _Handle + _OpvarNameCharOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xD4B7BEBC55F3CFF0, value, 256); + set => Schema.SetFixedString(_Handle, _OpvarNameCharOffset.Value, value, 256); } + private static readonly Lazy _StackNameCharOffset = new(() => Schema.GetOffset(0xD4B7BEBC87998C38), LazyThreadSafetyMode.None); + public string StackNameChar { get { - var ptr = _Handle + Schema.GetOffset(0xD4B7BEBC87998C38); + var ptr = _Handle + _StackNameCharOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xD4B7BEBC87998C38, value, 256); + set => Schema.SetFixedString(_Handle, _StackNameCharOffset.Value, value, 256); } + private static readonly Lazy _OperatorNameCharOffset = new(() => Schema.GetOffset(0xD4B7BEBC9824CD12), LazyThreadSafetyMode.None); + public string OperatorNameChar { get { - var ptr = _Handle + Schema.GetOffset(0xD4B7BEBC9824CD12); + var ptr = _Handle + _OperatorNameCharOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xD4B7BEBC9824CD12, value, 256); + set => Schema.SetFixedString(_Handle, _OperatorNameCharOffset.Value, value, 256); } + private static readonly Lazy _VecNormPosOffset = new(() => Schema.GetOffset(0xD4B7BEBC66F7FECF), LazyThreadSafetyMode.None); + public ref Vector VecNormPos { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4B7BEBC66F7FECF)); + get => ref _Handle.AsRef(_VecNormPosOffset.Value); } + private static readonly Lazy _NormCenterSizeOffset = new(() => Schema.GetOffset(0xD4B7BEBC3245C335), LazyThreadSafetyMode.None); + public ref float NormCenterSize { - get => ref _Handle.AsRef(Schema.GetOffset(0xD4B7BEBC3245C335)); + get => ref _Handle.AsRef(_NormCenterSizeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerSoundscapeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerSoundscapeImpl.cs index 6c0e5d4af..0af3dffae 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerSoundscapeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerSoundscapeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class CTriggerSoundscapeImpl : CBaseTriggerImpl, CTriggerSounds public CTriggerSoundscapeImpl(nint handle) : base(handle) { } + private static readonly Lazy _SoundscapeOffset = new(() => Schema.GetOffset(0xA8ED7219EF1F0180), LazyThreadSafetyMode.None); + public ref CHandle Soundscape { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8ED7219EF1F0180)); + get => ref _Handle.AsRef>(_SoundscapeOffset.Value); } + private static readonly Lazy _SoundscapeNameOffset = new(() => Schema.GetOffset(0xA8ED7219BDF7AA81), LazyThreadSafetyMode.None); + public string SoundscapeName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA8ED7219BDF7AA81)); + var ptr = _Handle.Read(_SoundscapeNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA8ED7219BDF7AA81, value); + set => Schema.SetString(_Handle, _SoundscapeNameOffset.Value, value); } + private static readonly Lazy _SpectatorsOffset = new(() => Schema.GetOffset(0xA8ED7219149EB35B), LazyThreadSafetyMode.None); + public ref CUtlVector> Spectators { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xA8ED7219149EB35B)); + get => ref _Handle.AsRef>>(_SpectatorsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerTeleportImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerTeleportImpl.cs index 522acc25d..71bc07dcc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerTeleportImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerTeleportImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class CTriggerTeleportImpl : CBaseTriggerImpl, CTriggerTeleport public CTriggerTeleportImpl(nint handle) : base(handle) { } + private static readonly Lazy _LandmarkOffset = new(() => Schema.GetOffset(0xA6381755DF022EC4), LazyThreadSafetyMode.None); + public string Landmark { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA6381755DF022EC4)); + var ptr = _Handle.Read(_LandmarkOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA6381755DF022EC4, value); + set => Schema.SetString(_Handle, _LandmarkOffset.Value, value); } + private static readonly Lazy _UseLandmarkAnglesOffset = new(() => Schema.GetOffset(0xA638175528C3B2F4), LazyThreadSafetyMode.None); + public ref bool UseLandmarkAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0xA638175528C3B2F4)); + get => ref _Handle.AsRef(_UseLandmarkAnglesOffset.Value); } + private static readonly Lazy _MirrorPlayerOffset = new(() => Schema.GetOffset(0xA638175563293A1B), LazyThreadSafetyMode.None); + public ref bool MirrorPlayer { - get => ref _Handle.AsRef(Schema.GetOffset(0xA638175563293A1B)); + get => ref _Handle.AsRef(_MirrorPlayerOffset.Value); } + private static readonly Lazy _CheckDestIfClearForPlayerOffset = new(() => Schema.GetOffset(0xA638175514792115), LazyThreadSafetyMode.None); + public ref bool CheckDestIfClearForPlayer { - get => ref _Handle.AsRef(Schema.GetOffset(0xA638175514792115)); + get => ref _Handle.AsRef(_CheckDestIfClearForPlayerOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerToggleSaveImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerToggleSaveImpl.cs index 387e8c793..965c344e4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerToggleSaveImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerToggleSaveImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerVolumeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerVolumeImpl.cs index a656ad0f9..3590bbcaf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerVolumeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTriggerVolumeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CTriggerVolumeImpl : CBaseModelEntityImpl, CTriggerVolume public CTriggerVolumeImpl(nint handle) : base(handle) { } + private static readonly Lazy _FilterNameOffset = new(() => Schema.GetOffset(0x8A35845409C86445), LazyThreadSafetyMode.None); + public string FilterName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x8A35845409C86445)); + var ptr = _Handle.Read(_FilterNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x8A35845409C86445, value); + set => Schema.SetString(_Handle, _FilterNameOffset.Value, value); } + private static readonly Lazy _FilterOffset = new(() => Schema.GetOffset(0x8A35845445D9E0B1), LazyThreadSafetyMode.None); + public ref CHandle Filter { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8A35845445D9E0B1)); + get => ref _Handle.AsRef>(_FilterOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTurnHelperUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTurnHelperUpdateNodeImpl.cs index 7792fba0a..f3b5fda17 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTurnHelperUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTurnHelperUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CTurnHelperUpdateNodeImpl : CUnaryUpdateNodeImpl, CTurnHe public CTurnHelperUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _FacingTargetOffset = new(() => Schema.GetOffset(0xDEC0FADCED73C452), LazyThreadSafetyMode.None); + public ref AnimValueSource FacingTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0xDEC0FADCED73C452)); + get => ref _Handle.AsRef(_FacingTargetOffset.Value); } + private static readonly Lazy _TurnStartTimeOffsetOffset = new(() => Schema.GetOffset(0xDEC0FADC9A7910D0), LazyThreadSafetyMode.None); + public ref float TurnStartTimeOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xDEC0FADC9A7910D0)); + get => ref _Handle.AsRef(_TurnStartTimeOffsetOffset.Value); } + private static readonly Lazy _TurnDurationOffset = new(() => Schema.GetOffset(0xDEC0FADC879BD946), LazyThreadSafetyMode.None); + public ref float TurnDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0xDEC0FADC879BD946)); + get => ref _Handle.AsRef(_TurnDurationOffset.Value); } + private static readonly Lazy _MatchChildDurationOffset = new(() => Schema.GetOffset(0xDEC0FADC6B6788BC), LazyThreadSafetyMode.None); + public ref bool MatchChildDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0xDEC0FADC6B6788BC)); + get => ref _Handle.AsRef(_MatchChildDurationOffset.Value); } + private static readonly Lazy _ManualTurnOffsetOffset = new(() => Schema.GetOffset(0xDEC0FADC61F53BBB), LazyThreadSafetyMode.None); + public ref float ManualTurnOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xDEC0FADC61F53BBB)); + get => ref _Handle.AsRef(_ManualTurnOffsetOffset.Value); } + private static readonly Lazy _UseManualTurnOffsetOffset = new(() => Schema.GetOffset(0xDEC0FADC9290C2BE), LazyThreadSafetyMode.None); + public ref bool UseManualTurnOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xDEC0FADC9290C2BE)); + get => ref _Handle.AsRef(_UseManualTurnOffsetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTwistConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTwistConstraintImpl.cs index 274614761..f80276493 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTwistConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTwistConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CTwistConstraintImpl : CBaseConstraintImpl, CTwistConstra public CTwistConstraintImpl(nint handle) : base(handle) { } + private static readonly Lazy _InverseOffset = new(() => Schema.GetOffset(0xA3EC320A0DE8C163), LazyThreadSafetyMode.None); + public ref bool Inverse { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3EC320A0DE8C163)); + get => ref _Handle.AsRef(_InverseOffset.Value); } + private static readonly Lazy _ParentBindRotationOffset = new(() => Schema.GetOffset(0xA3EC320AE46C74E5), LazyThreadSafetyMode.None); + public ref Quaternion ParentBindRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3EC320AE46C74E5)); + get => ref _Handle.AsRef(_ParentBindRotationOffset.Value); } + private static readonly Lazy _ChildBindRotationOffset = new(() => Schema.GetOffset(0xA3EC320A0FCDDACB), LazyThreadSafetyMode.None); + public ref Quaternion ChildBindRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3EC320A0FCDDACB)); + get => ref _Handle.AsRef(_ChildBindRotationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTwoBoneIKUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTwoBoneIKUpdateNodeImpl.cs index 153c83102..d4dfb483a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTwoBoneIKUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CTwoBoneIKUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CTwoBoneIKUpdateNodeImpl : CUnaryUpdateNodeImpl, CTwoBone public CTwoBoneIKUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _OpFixedDataOffset = new(() => Schema.GetOffset(0x419F07E36960AF8C), LazyThreadSafetyMode.None); + public TwoBoneIKSettings_t OpFixedData { - get => new TwoBoneIKSettings_tImpl(_Handle + Schema.GetOffset(0x419F07E36960AF8C)); + get => new TwoBoneIKSettings_tImpl(_Handle + _OpFixedDataOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CUnaryUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CUnaryUpdateNodeImpl.cs index 9c0e6f092..b2506808d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CUnaryUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CUnaryUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CUnaryUpdateNodeImpl : CAnimUpdateNodeBaseImpl, CUnaryUpd public CUnaryUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildNodeOffset = new(() => Schema.GetOffset(0x7A35EAF8C0359CFF), LazyThreadSafetyMode.None); + public CAnimUpdateNodeRef ChildNode { - get => new CAnimUpdateNodeRefImpl(_Handle + Schema.GetOffset(0x7A35EAF8C0359CFF)); + get => new CAnimUpdateNodeRefImpl(_Handle + _ChildNodeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVPhysXSurfacePropertiesListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVPhysXSurfacePropertiesListImpl.cs index e9bb962ce..536c98ea3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVPhysXSurfacePropertiesListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVPhysXSurfacePropertiesListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CVPhysXSurfacePropertiesListImpl : SchemaClass, CVPhysXSu public CVPhysXSurfacePropertiesListImpl(nint handle) : base(handle) { } + private static readonly Lazy _SurfacePropertiesListOffset = new(() => Schema.GetOffset(0x46700CAAC149A2D), LazyThreadSafetyMode.None); + public ref CUtlVector> SurfacePropertiesList { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x46700CAAC149A2D)); + get => ref _Handle.AsRef>>(_SurfacePropertiesListOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVSoundImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVSoundImpl.cs index 9a2bb860a..5c2e17471 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVSoundImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVSoundImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class CVSoundImpl : SchemaClass, CVSound { public CVSoundImpl(nint handle) : base(handle) { } + private static readonly Lazy _RateOffset = new(() => Schema.GetOffset(0x478C987331106783), LazyThreadSafetyMode.None); + public ref int Rate { - get => ref _Handle.AsRef(Schema.GetOffset(0x478C987331106783)); + get => ref _Handle.AsRef(_RateOffset.Value); } + private static readonly Lazy _FormatOffset = new(() => Schema.GetOffset(0x478C9873A87491AE), LazyThreadSafetyMode.None); + public ref CVSoundFormat_t Format { - get => ref _Handle.AsRef(Schema.GetOffset(0x478C9873A87491AE)); + get => ref _Handle.AsRef(_FormatOffset.Value); } + private static readonly Lazy _ChannelsOffset = new(() => Schema.GetOffset(0x478C98735A815AD1), LazyThreadSafetyMode.None); + public ref uint Channels { - get => ref _Handle.AsRef(Schema.GetOffset(0x478C98735A815AD1)); + get => ref _Handle.AsRef(_ChannelsOffset.Value); } + private static readonly Lazy _LoopStartOffset = new(() => Schema.GetOffset(0x478C9873A12E4295), LazyThreadSafetyMode.None); + public ref int LoopStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x478C9873A12E4295)); + get => ref _Handle.AsRef(_LoopStartOffset.Value); } + private static readonly Lazy _SampleCountOffset = new(() => Schema.GetOffset(0x478C98732DEF676A), LazyThreadSafetyMode.None); + public ref uint SampleCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x478C98732DEF676A)); + get => ref _Handle.AsRef(_SampleCountOffset.Value); } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0x478C9873BC5E3BAB), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0x478C9873BC5E3BAB)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _SentencesOffset = new(() => Schema.GetOffset(0x478C98730FF1D785), LazyThreadSafetyMode.None); + public ref CUtlVector Sentences { - get => ref _Handle.AsRef>(Schema.GetOffset(0x478C98730FF1D785)); + get => ref _Handle.AsRef>(_SentencesOffset.Value); } + private static readonly Lazy _StreamingSizeOffset = new(() => Schema.GetOffset(0x478C9873CB44A8AE), LazyThreadSafetyMode.None); + public ref uint StreamingSize { - get => ref _Handle.AsRef(Schema.GetOffset(0x478C9873CB44A8AE)); + get => ref _Handle.AsRef(_StreamingSizeOffset.Value); } + private static readonly Lazy _SeekTableOffset = new(() => Schema.GetOffset(0x478C987388E17207), LazyThreadSafetyMode.None); + public ref CUtlVector SeekTable { - get => ref _Handle.AsRef>(Schema.GetOffset(0x478C987388E17207)); + get => ref _Handle.AsRef>(_SeekTableOffset.Value); } + private static readonly Lazy _LoopEndOffset = new(() => Schema.GetOffset(0x478C9873900B36CC), LazyThreadSafetyMode.None); + public ref int LoopEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x478C9873900B36CC)); + get => ref _Handle.AsRef(_LoopEndOffset.Value); } + private static readonly Lazy _EncodedHeaderOffset = new(() => Schema.GetOffset(0x478C9873BDA3C36C), LazyThreadSafetyMode.None); + public ref CUtlBinaryBlock EncodedHeader { - get => ref _Handle.AsRef(Schema.GetOffset(0x478C9873BDA3C36C)); + get => ref _Handle.AsRef(_EncodedHeaderOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVariantDefaultAllocatorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVariantDefaultAllocatorImpl.cs index b39ac26e4..2ff003380 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVariantDefaultAllocatorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVariantDefaultAllocatorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVectorAnimParameterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVectorAnimParameterImpl.cs index 19ddc8f58..28fd4e3e8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVectorAnimParameterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVectorAnimParameterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CVectorAnimParameterImpl : CConcreteAnimParameterImpl, CV public CVectorAnimParameterImpl(nint handle) : base(handle) { } + private static readonly Lazy _DefaultValueOffset = new(() => Schema.GetOffset(0x74346C8BBBE0341F), LazyThreadSafetyMode.None); + public ref Vector DefaultValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x74346C8BBBE0341F)); + get => ref _Handle.AsRef(_DefaultValueOffset.Value); } + private static readonly Lazy _InterpolateOffset = new(() => Schema.GetOffset(0x74346C8BF6607650), LazyThreadSafetyMode.None); + public ref bool Interpolate { - get => ref _Handle.AsRef(Schema.GetOffset(0x74346C8BF6607650)); + get => ref _Handle.AsRef(_InterpolateOffset.Value); } + private static readonly Lazy _VectorTypeOffset = new(() => Schema.GetOffset(0x74346C8BF251F9D2), LazyThreadSafetyMode.None); + public ref AnimParamVectorType_t VectorType { - get => ref _Handle.AsRef(Schema.GetOffset(0x74346C8BF251F9D2)); + get => ref _Handle.AsRef(_VectorTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVectorExponentialMovingAverageImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVectorExponentialMovingAverageImpl.cs index a1305060b..f22b9b828 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVectorExponentialMovingAverageImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVectorExponentialMovingAverageImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVectorMovingAverageImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVectorMovingAverageImpl.cs index 1c0475802..5b29d571c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVectorMovingAverageImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVectorMovingAverageImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVectorQuantizerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVectorQuantizerImpl.cs index 9181597d9..35d693515 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVectorQuantizerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVectorQuantizerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CVectorQuantizerImpl : SchemaClass, CVectorQuantizer { public CVectorQuantizerImpl(nint handle) : base(handle) { } + private static readonly Lazy _CentroidVectorsOffset = new(() => Schema.GetOffset(0x9E79F13089538103), LazyThreadSafetyMode.None); + public ref CUtlVector CentroidVectors { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9E79F13089538103)); + get => ref _Handle.AsRef>(_CentroidVectorsOffset.Value); } + private static readonly Lazy _CentroidsOffset = new(() => Schema.GetOffset(0x9E79F13064667B2E), LazyThreadSafetyMode.None); + public ref int Centroids { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E79F13064667B2E)); + get => ref _Handle.AsRef(_CentroidsOffset.Value); } + private static readonly Lazy _DimensionsOffset = new(() => Schema.GetOffset(0x9E79F1302D8795AC), LazyThreadSafetyMode.None); + public ref int Dimensions { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E79F1302D8795AC)); + get => ref _Handle.AsRef(_DimensionsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVirtualAnimParameterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVirtualAnimParameterImpl.cs index f763fb13f..83f054030 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVirtualAnimParameterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVirtualAnimParameterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class CVirtualAnimParameterImpl : CAnimParameterBaseImpl, CVirt public CVirtualAnimParameterImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExpressionStringOffset = new(() => Schema.GetOffset(0x3D45915B3039426E), LazyThreadSafetyMode.None); + public string ExpressionString { get { - var ptr = _Handle.Read(Schema.GetOffset(0x3D45915B3039426E)); + var ptr = _Handle.Read(_ExpressionStringOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x3D45915B3039426E, value); + set => Schema.SetString(_Handle, _ExpressionStringOffset.Value, value); } + private static readonly Lazy _ParamTypeOffset = new(() => Schema.GetOffset(0x3D45915BF05DFDD9), LazyThreadSafetyMode.None); + public ref AnimParamType_t ParamType { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D45915BF05DFDD9)); + get => ref _Handle.AsRef(_ParamTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerAmpedDecayingSineWaveImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerAmpedDecayingSineWaveImpl.cs index c117a4675..ce6f9f532 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerAmpedDecayingSineWaveImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerAmpedDecayingSineWaveImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CVoiceContainerAmpedDecayingSineWaveImpl : CVoiceContaine public CVoiceContainerAmpedDecayingSineWaveImpl(nint handle) : base(handle) { } + private static readonly Lazy _GainAmountOffset = new(() => Schema.GetOffset(0x312CFD9CB3BC88F4), LazyThreadSafetyMode.None); + public ref float GainAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0x312CFD9CB3BC88F4)); + get => ref _Handle.AsRef(_GainAmountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerAnalysisBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerAnalysisBaseImpl.cs index 2b15a1c82..81faee644 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerAnalysisBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerAnalysisBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CVoiceContainerAnalysisBaseImpl : SchemaClass, CVoiceCont public CVoiceContainerAnalysisBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _RegenerateCurveOnCompileOffset = new(() => Schema.GetOffset(0xC0BE2FE061AFA19C), LazyThreadSafetyMode.None); + public ref bool RegenerateCurveOnCompile { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0BE2FE061AFA19C)); + get => ref _Handle.AsRef(_RegenerateCurveOnCompileOffset.Value); } + private static readonly Lazy _CurveOffset = new(() => Schema.GetOffset(0xC0BE2FE0BFFA0B34), LazyThreadSafetyMode.None); + public SchemaUntypedField Curve { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC0BE2FE0BFFA0B34)); + get => new SchemaUntypedField(_Handle + _CurveOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerBaseImpl.cs index bff7f2876..42af98d2d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,16 @@ internal partial class CVoiceContainerBaseImpl : SchemaClass, CVoiceContainerBas public CVoiceContainerBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _SoundOffset = new(() => Schema.GetOffset(0x9D65DC3663C1A950), LazyThreadSafetyMode.None); + public CVSound Sound { - get => new CVSoundImpl(_Handle + Schema.GetOffset(0x9D65DC3663C1A950)); + get => new CVSoundImpl(_Handle + _SoundOffset.Value); } + private static readonly Lazy _EnvelopeAnalyzerOffset = new(() => Schema.GetOffset(0x9D65DC362102947D), LazyThreadSafetyMode.None); + public CVoiceContainerAnalysisBase? EnvelopeAnalyzer { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9D65DC362102947D)); + var ptr = _Handle.Read(_EnvelopeAnalyzerOffset.Value); return ptr.IsValidPtr() ? new CVoiceContainerAnalysisBaseImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerBlenderImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerBlenderImpl.cs index 9b444a79b..2a31d9efd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerBlenderImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerBlenderImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CVoiceContainerBlenderImpl : CVoiceContainerBaseImpl, CVo public CVoiceContainerBlenderImpl(nint handle) : base(handle) { } + private static readonly Lazy _FirstSoundOffset = new(() => Schema.GetOffset(0xB05752DD666B0138), LazyThreadSafetyMode.None); + public CSoundContainerReference FirstSound { - get => new CSoundContainerReferenceImpl(_Handle + Schema.GetOffset(0xB05752DD666B0138)); + get => new CSoundContainerReferenceImpl(_Handle + _FirstSoundOffset.Value); } + private static readonly Lazy _SecondSoundOffset = new(() => Schema.GetOffset(0xB05752DDA2BC3E5C), LazyThreadSafetyMode.None); + public CSoundContainerReference SecondSound { - get => new CSoundContainerReferenceImpl(_Handle + Schema.GetOffset(0xB05752DDA2BC3E5C)); + get => new CSoundContainerReferenceImpl(_Handle + _SecondSoundOffset.Value); } + private static readonly Lazy _BlendFactorOffset = new(() => Schema.GetOffset(0xB05752DDFF4DA451), LazyThreadSafetyMode.None); + public ref float BlendFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0xB05752DDFF4DA451)); + get => ref _Handle.AsRef(_BlendFactorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerDecayingSineWaveImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerDecayingSineWaveImpl.cs index f5dda1b0e..1d07aea6d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerDecayingSineWaveImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerDecayingSineWaveImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CVoiceContainerDecayingSineWaveImpl : CVoiceContainerBase public CVoiceContainerDecayingSineWaveImpl(nint handle) : base(handle) { } + private static readonly Lazy _FrequencyOffset = new(() => Schema.GetOffset(0x3383CD01D2C16DD7), LazyThreadSafetyMode.None); + public ref float Frequency { - get => ref _Handle.AsRef(Schema.GetOffset(0x3383CD01D2C16DD7)); + get => ref _Handle.AsRef(_FrequencyOffset.Value); } + private static readonly Lazy _DecayTimeOffset = new(() => Schema.GetOffset(0x3383CD01E94A0656), LazyThreadSafetyMode.None); + public ref float DecayTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x3383CD01E94A0656)); + get => ref _Handle.AsRef(_DecayTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerDefaultImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerDefaultImpl.cs index 86661ed04..eeb49e87e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerDefaultImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerDefaultImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerEnvelopeAnalyzerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerEnvelopeAnalyzerImpl.cs index d57576c8a..0fd95e1b7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerEnvelopeAnalyzerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerEnvelopeAnalyzerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CVoiceContainerEnvelopeAnalyzerImpl : CVoiceContainerAnal public CVoiceContainerEnvelopeAnalyzerImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModeOffset = new(() => Schema.GetOffset(0xC5D0FF1990FD5BB2), LazyThreadSafetyMode.None); + public ref EMode_t Mode { - get => ref _Handle.AsRef(Schema.GetOffset(0xC5D0FF1990FD5BB2)); + get => ref _Handle.AsRef(_ModeOffset.Value); } + private static readonly Lazy _AnalysisWindowMsOffset = new(() => Schema.GetOffset(0xC5D0FF198349BF07), LazyThreadSafetyMode.None); + public ref float AnalysisWindowMs { - get => ref _Handle.AsRef(Schema.GetOffset(0xC5D0FF198349BF07)); + get => ref _Handle.AsRef(_AnalysisWindowMsOffset.Value); } + private static readonly Lazy _ThresholdOffset = new(() => Schema.GetOffset(0xC5D0FF197872FFEA), LazyThreadSafetyMode.None); + public ref float Threshold { - get => ref _Handle.AsRef(Schema.GetOffset(0xC5D0FF197872FFEA)); + get => ref _Handle.AsRef(_ThresholdOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerEnvelopeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerEnvelopeImpl.cs index c0c9acbd2..295374976 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerEnvelopeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerEnvelopeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,16 @@ internal partial class CVoiceContainerEnvelopeImpl : CVoiceContainerBaseImpl, CV public CVoiceContainerEnvelopeImpl(nint handle) : base(handle) { } + private static readonly Lazy _SoundOffset = new(() => Schema.GetOffset(0x5CEF97E74E1C4FB4), LazyThreadSafetyMode.None); + public ref CStrongHandle Sound { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5CEF97E74E1C4FB4)); + get => ref _Handle.AsRef>(_SoundOffset.Value); } + private static readonly Lazy _AnalysisContainerOffset = new(() => Schema.GetOffset(0x5CEF97E74C85F50E), LazyThreadSafetyMode.None); + public CVoiceContainerAnalysisBase? AnalysisContainer { get { - var ptr = _Handle.Read(Schema.GetOffset(0x5CEF97E74C85F50E)); + var ptr = _Handle.Read(_AnalysisContainerOffset.Value); return ptr.IsValidPtr() ? new CVoiceContainerAnalysisBaseImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerGranulatorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerGranulatorImpl.cs index 6a872664c..4bd121e56 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerGranulatorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerGranulatorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CVoiceContainerGranulatorImpl : CVoiceContainerBaseImpl, public CVoiceContainerGranulatorImpl(nint handle) : base(handle) { } + private static readonly Lazy _GrainLengthOffset = new(() => Schema.GetOffset(0x30F273589D2BE672), LazyThreadSafetyMode.None); + public ref float GrainLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F273589D2BE672)); + get => ref _Handle.AsRef(_GrainLengthOffset.Value); } + private static readonly Lazy _GrainCrossfadeAmountOffset = new(() => Schema.GetOffset(0x30F27358AE31A7DC), LazyThreadSafetyMode.None); + public ref float GrainCrossfadeAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F27358AE31A7DC)); + get => ref _Handle.AsRef(_GrainCrossfadeAmountOffset.Value); } + private static readonly Lazy _StartJitterOffset = new(() => Schema.GetOffset(0x30F27358FBAD6833), LazyThreadSafetyMode.None); + public ref float StartJitter { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F27358FBAD6833)); + get => ref _Handle.AsRef(_StartJitterOffset.Value); } + private static readonly Lazy _PlaybackJitterOffset = new(() => Schema.GetOffset(0x30F273583904EEB8), LazyThreadSafetyMode.None); + public ref float PlaybackJitter { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F273583904EEB8)); + get => ref _Handle.AsRef(_PlaybackJitterOffset.Value); } + private static readonly Lazy _ShouldWraparoundOffset = new(() => Schema.GetOffset(0x30F273585F9E45A3), LazyThreadSafetyMode.None); + public ref bool ShouldWraparound { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F273585F9E45A3)); + get => ref _Handle.AsRef(_ShouldWraparoundOffset.Value); } + private static readonly Lazy _SourceAudioOffset = new(() => Schema.GetOffset(0x30F27358E5E00DE2), LazyThreadSafetyMode.None); + public ref CStrongHandle SourceAudio { - get => ref _Handle.AsRef>(Schema.GetOffset(0x30F27358E5E00DE2)); + get => ref _Handle.AsRef>(_SourceAudioOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerLoopTriggerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerLoopTriggerImpl.cs index 89412e0e9..3da8f344e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerLoopTriggerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerLoopTriggerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CVoiceContainerLoopTriggerImpl : CVoiceContainerBaseImpl, public CVoiceContainerLoopTriggerImpl(nint handle) : base(handle) { } + private static readonly Lazy _SoundOffset = new(() => Schema.GetOffset(0x1A1BEAF4E1C4FB4), LazyThreadSafetyMode.None); + public CSoundContainerReference Sound { - get => new CSoundContainerReferenceImpl(_Handle + Schema.GetOffset(0x1A1BEAF4E1C4FB4)); + get => new CSoundContainerReferenceImpl(_Handle + _SoundOffset.Value); } + private static readonly Lazy _RetriggerTimeMinOffset = new(() => Schema.GetOffset(0x1A1BEAFE6138381), LazyThreadSafetyMode.None); + public ref float RetriggerTimeMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A1BEAFE6138381)); + get => ref _Handle.AsRef(_RetriggerTimeMinOffset.Value); } + private static readonly Lazy _RetriggerTimeMaxOffset = new(() => Schema.GetOffset(0x1A1BEAFD828882F), LazyThreadSafetyMode.None); + public ref float RetriggerTimeMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A1BEAFD828882F)); + get => ref _Handle.AsRef(_RetriggerTimeMaxOffset.Value); } + private static readonly Lazy _FadeTimeOffset = new(() => Schema.GetOffset(0x1A1BEAF00BEDB08), LazyThreadSafetyMode.None); + public ref float FadeTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A1BEAF00BEDB08)); + get => ref _Handle.AsRef(_FadeTimeOffset.Value); } + private static readonly Lazy _CrossFadeOffset = new(() => Schema.GetOffset(0x1A1BEAF64BEC665), LazyThreadSafetyMode.None); + public ref bool CrossFade { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A1BEAF64BEC665)); + get => ref _Handle.AsRef(_CrossFadeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerNullImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerNullImpl.cs index e4d022f10..36aca7962 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerNullImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerNullImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerParameterBlenderImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerParameterBlenderImpl.cs index 0ce5e1308..d5212d52c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerParameterBlenderImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerParameterBlenderImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class CVoiceContainerParameterBlenderImpl : CVoiceContainerBase public CVoiceContainerParameterBlenderImpl(nint handle) : base(handle) { } + private static readonly Lazy _FirstSoundOffset = new(() => Schema.GetOffset(0xEC5F1A42666B0138), LazyThreadSafetyMode.None); + public CSoundContainerReference FirstSound { - get => new CSoundContainerReferenceImpl(_Handle + Schema.GetOffset(0xEC5F1A42666B0138)); + get => new CSoundContainerReferenceImpl(_Handle + _FirstSoundOffset.Value); } + private static readonly Lazy _SecondSoundOffset = new(() => Schema.GetOffset(0xEC5F1A42A2BC3E5C), LazyThreadSafetyMode.None); + public CSoundContainerReference SecondSound { - get => new CSoundContainerReferenceImpl(_Handle + Schema.GetOffset(0xEC5F1A42A2BC3E5C)); + get => new CSoundContainerReferenceImpl(_Handle + _SecondSoundOffset.Value); } + private static readonly Lazy _EnableOcclusionBlendOffset = new(() => Schema.GetOffset(0xEC5F1A42041C67C2), LazyThreadSafetyMode.None); + public ref bool EnableOcclusionBlend { - get => ref _Handle.AsRef(Schema.GetOffset(0xEC5F1A42041C67C2)); + get => ref _Handle.AsRef(_EnableOcclusionBlendOffset.Value); } + private static readonly Lazy _Curve1Offset = new(() => Schema.GetOffset(0xEC5F1A423B9F58DF), LazyThreadSafetyMode.None); + public SchemaUntypedField Curve1 { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xEC5F1A423B9F58DF)); + get => new SchemaUntypedField(_Handle + _Curve1Offset.Value); } + private static readonly Lazy _Curve2Offset = new(() => Schema.GetOffset(0xEC5F1A423C9F5A72), LazyThreadSafetyMode.None); + public SchemaUntypedField Curve2 { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xEC5F1A423C9F5A72)); + get => new SchemaUntypedField(_Handle + _Curve2Offset.Value); } + private static readonly Lazy _EnableDistanceBlendOffset = new(() => Schema.GetOffset(0xEC5F1A428EDC5388), LazyThreadSafetyMode.None); + public ref bool EnableDistanceBlend { - get => ref _Handle.AsRef(Schema.GetOffset(0xEC5F1A428EDC5388)); + get => ref _Handle.AsRef(_EnableDistanceBlendOffset.Value); } + private static readonly Lazy _Curve3Offset = new(() => Schema.GetOffset(0xEC5F1A423D9F5C05), LazyThreadSafetyMode.None); + public SchemaUntypedField Curve3 { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xEC5F1A423D9F5C05)); + get => new SchemaUntypedField(_Handle + _Curve3Offset.Value); } + private static readonly Lazy _Curve4Offset = new(() => Schema.GetOffset(0xEC5F1A42369F5100), LazyThreadSafetyMode.None); + public SchemaUntypedField Curve4 { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xEC5F1A42369F5100)); + get => new SchemaUntypedField(_Handle + _Curve4Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerRandomSamplerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerRandomSamplerImpl.cs index 6675154bb..33415aa2f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerRandomSamplerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerRandomSamplerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class CVoiceContainerRandomSamplerImpl : CVoiceContainerBaseImp public CVoiceContainerRandomSamplerImpl(nint handle) : base(handle) { } + private static readonly Lazy _AmplitudeOffset = new(() => Schema.GetOffset(0xDCA93E5CB44B0E18), LazyThreadSafetyMode.None); + public ref float Amplitude { - get => ref _Handle.AsRef(Schema.GetOffset(0xDCA93E5CB44B0E18)); + get => ref _Handle.AsRef(_AmplitudeOffset.Value); } + private static readonly Lazy _AmplitudeJitterOffset = new(() => Schema.GetOffset(0xDCA93E5C108296CE), LazyThreadSafetyMode.None); + public ref float AmplitudeJitter { - get => ref _Handle.AsRef(Schema.GetOffset(0xDCA93E5C108296CE)); + get => ref _Handle.AsRef(_AmplitudeJitterOffset.Value); } + private static readonly Lazy _TimeJitterOffset = new(() => Schema.GetOffset(0xDCA93E5C70047B44), LazyThreadSafetyMode.None); + public ref float TimeJitter { - get => ref _Handle.AsRef(Schema.GetOffset(0xDCA93E5C70047B44)); + get => ref _Handle.AsRef(_TimeJitterOffset.Value); } + private static readonly Lazy _MaxLengthOffset = new(() => Schema.GetOffset(0xDCA93E5C87A8B4C7), LazyThreadSafetyMode.None); + public ref float MaxLength { - get => ref _Handle.AsRef(Schema.GetOffset(0xDCA93E5C87A8B4C7)); + get => ref _Handle.AsRef(_MaxLengthOffset.Value); } + private static readonly Lazy _NumDelayVariationsOffset = new(() => Schema.GetOffset(0xDCA93E5C9356280C), LazyThreadSafetyMode.None); + public ref int NumDelayVariations { - get => ref _Handle.AsRef(Schema.GetOffset(0xDCA93E5C9356280C)); + get => ref _Handle.AsRef(_NumDelayVariationsOffset.Value); } + private static readonly Lazy _GrainResourcesOffset = new(() => Schema.GetOffset(0xDCA93E5C95692BB9), LazyThreadSafetyMode.None); + public ref CUtlVector> GrainResources { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xDCA93E5C95692BB9)); + get => ref _Handle.AsRef>>(_GrainResourcesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerRealtimeFMSineWaveImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerRealtimeFMSineWaveImpl.cs index d6660006a..8e6d237a5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerRealtimeFMSineWaveImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerRealtimeFMSineWaveImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CVoiceContainerRealtimeFMSineWaveImpl : CVoiceContainerBa public CVoiceContainerRealtimeFMSineWaveImpl(nint handle) : base(handle) { } + private static readonly Lazy _CarrierFrequencyOffset = new(() => Schema.GetOffset(0x3AB0D193041DC311), LazyThreadSafetyMode.None); + public ref float CarrierFrequency { - get => ref _Handle.AsRef(Schema.GetOffset(0x3AB0D193041DC311)); + get => ref _Handle.AsRef(_CarrierFrequencyOffset.Value); } + private static readonly Lazy _ModulatorFrequencyOffset = new(() => Schema.GetOffset(0x3AB0D193656A8FFE), LazyThreadSafetyMode.None); + public ref float ModulatorFrequency { - get => ref _Handle.AsRef(Schema.GetOffset(0x3AB0D193656A8FFE)); + get => ref _Handle.AsRef(_ModulatorFrequencyOffset.Value); } + private static readonly Lazy _ModulatorAmountOffset = new(() => Schema.GetOffset(0x3AB0D1939B320E5C), LazyThreadSafetyMode.None); + public ref float ModulatorAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0x3AB0D1939B320E5C)); + get => ref _Handle.AsRef(_ModulatorAmountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerSelectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerSelectorImpl.cs index eeb2e4744..af7eabb9d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerSelectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerSelectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CVoiceContainerSelectorImpl : CVoiceContainerBaseImpl, CV public CVoiceContainerSelectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModeOffset = new(() => Schema.GetOffset(0xF16C473A90FD5BB2), LazyThreadSafetyMode.None); + public ref PlayBackMode_t Mode { - get => ref _Handle.AsRef(Schema.GetOffset(0xF16C473A90FD5BB2)); + get => ref _Handle.AsRef(_ModeOffset.Value); } + private static readonly Lazy _SoundsToPlayOffset = new(() => Schema.GetOffset(0xF16C473ADCB5F70E), LazyThreadSafetyMode.None); + public CSoundContainerReferenceArray SoundsToPlay { - get => new CSoundContainerReferenceArrayImpl(_Handle + Schema.GetOffset(0xF16C473ADCB5F70E)); + get => new CSoundContainerReferenceArrayImpl(_Handle + _SoundsToPlayOffset.Value); } + private static readonly Lazy _ProbabilityWeightsOffset = new(() => Schema.GetOffset(0xF16C473A6DABFC99), LazyThreadSafetyMode.None); + public ref CUtlVector ProbabilityWeights { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF16C473A6DABFC99)); + get => ref _Handle.AsRef>(_ProbabilityWeightsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerSetElementImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerSetElementImpl.cs index 426515939..4c144dbff 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerSetElementImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerSetElementImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CVoiceContainerSetElementImpl : SchemaClass, CVoiceContai public CVoiceContainerSetElementImpl(nint handle) : base(handle) { } + private static readonly Lazy _SoundOffset = new(() => Schema.GetOffset(0x1280027B4E1C4FB4), LazyThreadSafetyMode.None); + public CSoundContainerReference Sound { - get => new CSoundContainerReferenceImpl(_Handle + Schema.GetOffset(0x1280027B4E1C4FB4)); + get => new CSoundContainerReferenceImpl(_Handle + _SoundOffset.Value); } + private static readonly Lazy _VolumeDBOffset = new(() => Schema.GetOffset(0x1280027B3197E3EF), LazyThreadSafetyMode.None); + public ref float VolumeDB { - get => ref _Handle.AsRef(Schema.GetOffset(0x1280027B3197E3EF)); + get => ref _Handle.AsRef(_VolumeDBOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerSetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerSetImpl.cs index ebdd458a3..8e685cdc1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerSetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerSetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CVoiceContainerSetImpl : CVoiceContainerBaseImpl, CVoiceC public CVoiceContainerSetImpl(nint handle) : base(handle) { } + private static readonly Lazy _SoundsToPlayOffset = new(() => Schema.GetOffset(0xA07D279DCB5F70E), LazyThreadSafetyMode.None); + public ref CUtlVector SoundsToPlay { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA07D279DCB5F70E)); + get => ref _Handle.AsRef>(_SoundsToPlayOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerShapedNoiseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerShapedNoiseImpl.cs index 1601fd85c..b3e6698dd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerShapedNoiseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerShapedNoiseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class CVoiceContainerShapedNoiseImpl : CVoiceContainerBaseImpl, public CVoiceContainerShapedNoiseImpl(nint handle) : base(handle) { } + private static readonly Lazy _UseCurveForFrequencyOffset = new(() => Schema.GetOffset(0xC58213629099DACC), LazyThreadSafetyMode.None); + public ref bool UseCurveForFrequency { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58213629099DACC)); + get => ref _Handle.AsRef(_UseCurveForFrequencyOffset.Value); } + private static readonly Lazy _FrequencyOffset = new(() => Schema.GetOffset(0xC5821362D2C16DD7), LazyThreadSafetyMode.None); + public ref float Frequency { - get => ref _Handle.AsRef(Schema.GetOffset(0xC5821362D2C16DD7)); + get => ref _Handle.AsRef(_FrequencyOffset.Value); } + private static readonly Lazy _FrequencySweepOffset = new(() => Schema.GetOffset(0xC5821362B670CD0F), LazyThreadSafetyMode.None); + public SchemaUntypedField FrequencySweep { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC5821362B670CD0F)); + get => new SchemaUntypedField(_Handle + _FrequencySweepOffset.Value); } + private static readonly Lazy _UseCurveForResonanceOffset = new(() => Schema.GetOffset(0xC582136265C91FBE), LazyThreadSafetyMode.None); + public ref bool UseCurveForResonance { - get => ref _Handle.AsRef(Schema.GetOffset(0xC582136265C91FBE)); + get => ref _Handle.AsRef(_UseCurveForResonanceOffset.Value); } + private static readonly Lazy _ResonanceOffset = new(() => Schema.GetOffset(0xC582136283BEE2DD), LazyThreadSafetyMode.None); + public ref float Resonance { - get => ref _Handle.AsRef(Schema.GetOffset(0xC582136283BEE2DD)); + get => ref _Handle.AsRef(_ResonanceOffset.Value); } + private static readonly Lazy _ResonanceSweepOffset = new(() => Schema.GetOffset(0xC582136250CFD679), LazyThreadSafetyMode.None); + public SchemaUntypedField ResonanceSweep { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC582136250CFD679)); + get => new SchemaUntypedField(_Handle + _ResonanceSweepOffset.Value); } + private static readonly Lazy _UseCurveForAmplitudeOffset = new(() => Schema.GetOffset(0xC5821362F8970DD3), LazyThreadSafetyMode.None); + public ref bool UseCurveForAmplitude { - get => ref _Handle.AsRef(Schema.GetOffset(0xC5821362F8970DD3)); + get => ref _Handle.AsRef(_UseCurveForAmplitudeOffset.Value); } + private static readonly Lazy _GainInDecibelsOffset = new(() => Schema.GetOffset(0xC5821362528C3F88), LazyThreadSafetyMode.None); + public ref float GainInDecibels { - get => ref _Handle.AsRef(Schema.GetOffset(0xC5821362528C3F88)); + get => ref _Handle.AsRef(_GainInDecibelsOffset.Value); } + private static readonly Lazy _GainSweepOffset = new(() => Schema.GetOffset(0xC582136246A13F7A), LazyThreadSafetyMode.None); + public SchemaUntypedField GainSweep { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC582136246A13F7A)); + get => new SchemaUntypedField(_Handle + _GainSweepOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerStaticAdditiveSynthImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerStaticAdditiveSynthImpl.cs index 284013a77..f7d7a2f29 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerStaticAdditiveSynthImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerStaticAdditiveSynthImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CVoiceContainerStaticAdditiveSynthImpl : CVoiceContainerB public CVoiceContainerStaticAdditiveSynthImpl(nint handle) : base(handle) { } + private static readonly Lazy _TonesOffset = new(() => Schema.GetOffset(0xE9663E55BAE6D716), LazyThreadSafetyMode.None); + public ref CUtlVector Tones { - get => ref _Handle.AsRef>(Schema.GetOffset(0xE9663E55BAE6D716)); + get => ref _Handle.AsRef>(_TonesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerStaticAdditiveSynth__CGainScalePerInstanceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerStaticAdditiveSynth__CGainScalePerInstanceImpl.cs index 5f101f35f..fc2f0514e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerStaticAdditiveSynth__CGainScalePerInstanceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerStaticAdditiveSynth__CGainScalePerInstanceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CVoiceContainerStaticAdditiveSynth__CGainScalePerInstance public CVoiceContainerStaticAdditiveSynth__CGainScalePerInstanceImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinVolumeOffset = new(() => Schema.GetOffset(0x9089F81B2CA4E2A3), LazyThreadSafetyMode.None); + public ref float MinVolume { - get => ref _Handle.AsRef(Schema.GetOffset(0x9089F81B2CA4E2A3)); + get => ref _Handle.AsRef(_MinVolumeOffset.Value); } + private static readonly Lazy _InstancesAtMinVolumeOffset = new(() => Schema.GetOffset(0x9089F81BBA3DF3B8), LazyThreadSafetyMode.None); + public ref int InstancesAtMinVolume { - get => ref _Handle.AsRef(Schema.GetOffset(0x9089F81BBA3DF3B8)); + get => ref _Handle.AsRef(_InstancesAtMinVolumeOffset.Value); } + private static readonly Lazy _MaxVolumeOffset = new(() => Schema.GetOffset(0x9089F81B25691B11), LazyThreadSafetyMode.None); + public ref float MaxVolume { - get => ref _Handle.AsRef(Schema.GetOffset(0x9089F81B25691B11)); + get => ref _Handle.AsRef(_MaxVolumeOffset.Value); } + private static readonly Lazy _InstancesAtMaxVolumeOffset = new(() => Schema.GetOffset(0x9089F81B18EB3E46), LazyThreadSafetyMode.None); + public ref int InstancesAtMaxVolume { - get => ref _Handle.AsRef(Schema.GetOffset(0x9089F81B18EB3E46)); + get => ref _Handle.AsRef(_InstancesAtMaxVolumeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerStaticAdditiveSynth__CHarmonicImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerStaticAdditiveSynth__CHarmonicImpl.cs index e0a8a533e..ea1ae2d0d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerStaticAdditiveSynth__CHarmonicImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerStaticAdditiveSynth__CHarmonicImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class CVoiceContainerStaticAdditiveSynth__CHarmonicImpl : Schem public CVoiceContainerStaticAdditiveSynth__CHarmonicImpl(nint handle) : base(handle) { } + private static readonly Lazy _WaveformOffset = new(() => Schema.GetOffset(0xC47956E906E0A8DE), LazyThreadSafetyMode.None); + public ref EWaveform Waveform { - get => ref _Handle.AsRef(Schema.GetOffset(0xC47956E906E0A8DE)); + get => ref _Handle.AsRef(_WaveformOffset.Value); } + private static readonly Lazy _FundamentalOffset = new(() => Schema.GetOffset(0xC47956E9C45D876C), LazyThreadSafetyMode.None); + public ref EMidiNote Fundamental { - get => ref _Handle.AsRef(Schema.GetOffset(0xC47956E9C45D876C)); + get => ref _Handle.AsRef(_FundamentalOffset.Value); } + private static readonly Lazy _OctaveOffset = new(() => Schema.GetOffset(0xC47956E937F03859), LazyThreadSafetyMode.None); + public ref int Octave { - get => ref _Handle.AsRef(Schema.GetOffset(0xC47956E937F03859)); + get => ref _Handle.AsRef(_OctaveOffset.Value); } + private static readonly Lazy _CentsOffset = new(() => Schema.GetOffset(0xC47956E98E027DCE), LazyThreadSafetyMode.None); + public ref float Cents { - get => ref _Handle.AsRef(Schema.GetOffset(0xC47956E98E027DCE)); + get => ref _Handle.AsRef(_CentsOffset.Value); } + private static readonly Lazy _PhaseOffset = new(() => Schema.GetOffset(0xC47956E93C22A9CA), LazyThreadSafetyMode.None); + public ref float Phase { - get => ref _Handle.AsRef(Schema.GetOffset(0xC47956E93C22A9CA)); + get => ref _Handle.AsRef(_PhaseOffset.Value); } + private static readonly Lazy _CurveOffset = new(() => Schema.GetOffset(0xC47956E9BFFA0B34), LazyThreadSafetyMode.None); + public SchemaUntypedField Curve { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xC47956E9BFFA0B34)); + get => new SchemaUntypedField(_Handle + _CurveOffset.Value); } + private static readonly Lazy _VolumeScalingOffset = new(() => Schema.GetOffset(0xC47956E9820320D8), LazyThreadSafetyMode.None); + public CVoiceContainerStaticAdditiveSynth__CGainScalePerInstance VolumeScaling { - get => new CVoiceContainerStaticAdditiveSynth__CGainScalePerInstanceImpl(_Handle + Schema.GetOffset(0xC47956E9820320D8)); + get => new CVoiceContainerStaticAdditiveSynth__CGainScalePerInstanceImpl(_Handle + _VolumeScalingOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerStaticAdditiveSynth__CToneImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerStaticAdditiveSynth__CToneImpl.cs index 1fc7d9c23..8985ce965 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerStaticAdditiveSynth__CToneImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerStaticAdditiveSynth__CToneImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class CVoiceContainerStaticAdditiveSynth__CToneImpl : SchemaCla public CVoiceContainerStaticAdditiveSynth__CToneImpl(nint handle) : base(handle) { } + private static readonly Lazy _HarmonicsOffset = new(() => Schema.GetOffset(0x1501082A3A08CDBF), LazyThreadSafetyMode.None); + public ref CUtlVector Harmonics { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1501082A3A08CDBF)); + get => ref _Handle.AsRef>(_HarmonicsOffset.Value); } + private static readonly Lazy _CurveOffset = new(() => Schema.GetOffset(0x1501082ABFFA0B34), LazyThreadSafetyMode.None); + public SchemaUntypedField Curve { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x1501082ABFFA0B34)); + get => new SchemaUntypedField(_Handle + _CurveOffset.Value); } + private static readonly Lazy _SyncInstancesOffset = new(() => Schema.GetOffset(0x1501082A21EE9902), LazyThreadSafetyMode.None); + public ref bool SyncInstances { - get => ref _Handle.AsRef(Schema.GetOffset(0x1501082A21EE9902)); + get => ref _Handle.AsRef(_SyncInstancesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerSwitchImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerSwitchImpl.cs index 20a21b6ec..c75055044 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerSwitchImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoiceContainerSwitchImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CVoiceContainerSwitchImpl : CVoiceContainerBaseImpl, CVoi public CVoiceContainerSwitchImpl(nint handle) : base(handle) { } + private static readonly Lazy _SoundsToPlayOffset = new(() => Schema.GetOffset(0x79EA569BDCB5F70E), LazyThreadSafetyMode.None); + public ref CUtlVector SoundsToPlay { - get => ref _Handle.AsRef>(Schema.GetOffset(0x79EA569BDCB5F70E)); + get => ref _Handle.AsRef>(_SoundsToPlayOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoteControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoteControllerImpl.cs index f8d4ec132..c0809715b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoteControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoteControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,47 +17,71 @@ internal partial class CVoteControllerImpl : CBaseEntityImpl, CVoteController { public CVoteControllerImpl(nint handle) : base(handle) { } + private static readonly Lazy _ActiveIssueIndexOffset = new(() => Schema.GetOffset(0x6F560B06D557A463), LazyThreadSafetyMode.None); + public ref int ActiveIssueIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F560B06D557A463)); + get => ref _Handle.AsRef(_ActiveIssueIndexOffset.Value); } + private static readonly Lazy _OnlyTeamToVoteOffset = new(() => Schema.GetOffset(0x6F560B06C957B8C6), LazyThreadSafetyMode.None); + public ref int OnlyTeamToVote { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F560B06C957B8C6)); + get => ref _Handle.AsRef(_OnlyTeamToVoteOffset.Value); } public ISchemaFixedArray VoteOptionCount { get => new SchemaFixedArray(_Handle, 0x6F560B0614DBD0DF, 5, 4, 4); } + private static readonly Lazy _PotentialVotesOffset = new(() => Schema.GetOffset(0x6F560B060198673E), LazyThreadSafetyMode.None); + public ref int PotentialVotes { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F560B060198673E)); + get => ref _Handle.AsRef(_PotentialVotesOffset.Value); } + private static readonly Lazy _IsYesNoVoteOffset = new(() => Schema.GetOffset(0x6F560B069A553B97), LazyThreadSafetyMode.None); + public ref bool IsYesNoVote { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F560B069A553B97)); + get => ref _Handle.AsRef(_IsYesNoVoteOffset.Value); } + private static readonly Lazy _AcceptingVotesTimerOffset = new(() => Schema.GetOffset(0x6F560B069E336B15), LazyThreadSafetyMode.None); + public CountdownTimer AcceptingVotesTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x6F560B069E336B15)); + get => new CountdownTimerImpl(_Handle + _AcceptingVotesTimerOffset.Value); } + private static readonly Lazy _ExecuteCommandTimerOffset = new(() => Schema.GetOffset(0x6F560B06CAF2ECEE), LazyThreadSafetyMode.None); + public CountdownTimer ExecuteCommandTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x6F560B06CAF2ECEE)); + get => new CountdownTimerImpl(_Handle + _ExecuteCommandTimerOffset.Value); } + private static readonly Lazy _ResetVoteTimerOffset = new(() => Schema.GetOffset(0x6F560B06B54CD305), LazyThreadSafetyMode.None); + public CountdownTimer ResetVoteTimer { - get => new CountdownTimerImpl(_Handle + Schema.GetOffset(0x6F560B06B54CD305)); + get => new CountdownTimerImpl(_Handle + _ResetVoteTimerOffset.Value); } public ISchemaFixedArray VotesCast { get => new SchemaFixedArray(_Handle, 0x6F560B060247527D, 64, 4, 4); } + private static readonly Lazy _PlayerHoldingVoteOffset = new(() => Schema.GetOffset(0x6F560B06C170B10B), LazyThreadSafetyMode.None); + public ref uint PlayerHoldingVote { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F560B06C170B10B)); + get => ref _Handle.AsRef(_PlayerHoldingVoteOffset.Value); } + private static readonly Lazy _PlayerOverrideForVoteOffset = new(() => Schema.GetOffset(0x6F560B06BF6B0097), LazyThreadSafetyMode.None); + public ref uint PlayerOverrideForVote { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F560B06BF6B0097)); + get => ref _Handle.AsRef(_PlayerOverrideForVoteOffset.Value); } + private static readonly Lazy _HighestCountIndexOffset = new(() => Schema.GetOffset(0x6F560B0602AF14EE), LazyThreadSafetyMode.None); + public ref int HighestCountIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x6F560B0602AF14EE)); + get => ref _Handle.AsRef(_HighestCountIndexOffset.Value); } + private static readonly Lazy _PotentialIssuesOffset = new(() => Schema.GetOffset(0x6F560B065742E1F9), LazyThreadSafetyMode.None); + public ref CUtlVector> PotentialIssues { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x6F560B065742E1F9)); + get => ref _Handle.AsRef>>(_PotentialIssuesOffset.Value); } + private static readonly Lazy _VoteOptionsOffset = new(() => Schema.GetOffset(0x6F560B0604D2BA55), LazyThreadSafetyMode.None); + public ref CUtlVector VoteOptions { - get => ref _Handle.AsRef>(Schema.GetOffset(0x6F560B0604D2BA55)); + get => ref _Handle.AsRef>(_VoteOptionsOffset.Value); } public void ActiveIssueIndexUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoxelVisibilityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoxelVisibilityImpl.cs index b66c597d3..a37dd21c3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoxelVisibilityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CVoxelVisibilityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,70 @@ internal partial class CVoxelVisibilityImpl : SchemaClass, CVoxelVisibility { public CVoxelVisibilityImpl(nint handle) : base(handle) { } + private static readonly Lazy _BaseClusterCountOffset = new(() => Schema.GetOffset(0xDA27CA12A16788C5), LazyThreadSafetyMode.None); + public ref uint BaseClusterCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA27CA12A16788C5)); + get => ref _Handle.AsRef(_BaseClusterCountOffset.Value); } + private static readonly Lazy _PVSBytesPerClusterOffset = new(() => Schema.GetOffset(0xDA27CA122C2340E0), LazyThreadSafetyMode.None); + public ref uint PVSBytesPerCluster { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA27CA122C2340E0)); + get => ref _Handle.AsRef(_PVSBytesPerClusterOffset.Value); } + private static readonly Lazy _MinBoundsOffset = new(() => Schema.GetOffset(0xDA27CA12114799FE), LazyThreadSafetyMode.None); + public ref Vector MinBounds { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA27CA12114799FE)); + get => ref _Handle.AsRef(_MinBoundsOffset.Value); } + private static readonly Lazy _MaxBoundsOffset = new(() => Schema.GetOffset(0xDA27CA12C0B4CE60), LazyThreadSafetyMode.None); + public ref Vector MaxBounds { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA27CA12C0B4CE60)); + get => ref _Handle.AsRef(_MaxBoundsOffset.Value); } + private static readonly Lazy _GridSizeOffset = new(() => Schema.GetOffset(0xDA27CA12975208C2), LazyThreadSafetyMode.None); + public ref float GridSize { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA27CA12975208C2)); + get => ref _Handle.AsRef(_GridSizeOffset.Value); } + private static readonly Lazy _SkyVisibilityClusterOffset = new(() => Schema.GetOffset(0xDA27CA12B43BF514), LazyThreadSafetyMode.None); + public ref uint SkyVisibilityCluster { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA27CA12B43BF514)); + get => ref _Handle.AsRef(_SkyVisibilityClusterOffset.Value); } + private static readonly Lazy _SunVisibilityClusterOffset = new(() => Schema.GetOffset(0xDA27CA12848C92AD), LazyThreadSafetyMode.None); + public ref uint SunVisibilityCluster { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA27CA12848C92AD)); + get => ref _Handle.AsRef(_SunVisibilityClusterOffset.Value); } + private static readonly Lazy _NodeBlockOffset = new(() => Schema.GetOffset(0xDA27CA12A64594EA), LazyThreadSafetyMode.None); + public VoxelVisBlockOffset_t NodeBlock { - get => new VoxelVisBlockOffset_tImpl(_Handle + Schema.GetOffset(0xDA27CA12A64594EA)); + get => new VoxelVisBlockOffset_tImpl(_Handle + _NodeBlockOffset.Value); } + private static readonly Lazy _RegionBlockOffset = new(() => Schema.GetOffset(0xDA27CA121918C67A), LazyThreadSafetyMode.None); + public VoxelVisBlockOffset_t RegionBlock { - get => new VoxelVisBlockOffset_tImpl(_Handle + Schema.GetOffset(0xDA27CA121918C67A)); + get => new VoxelVisBlockOffset_tImpl(_Handle + _RegionBlockOffset.Value); } + private static readonly Lazy _EnclosedClusterListBlockOffset = new(() => Schema.GetOffset(0xDA27CA121F5DD1A9), LazyThreadSafetyMode.None); + public VoxelVisBlockOffset_t EnclosedClusterListBlock { - get => new VoxelVisBlockOffset_tImpl(_Handle + Schema.GetOffset(0xDA27CA121F5DD1A9)); + get => new VoxelVisBlockOffset_tImpl(_Handle + _EnclosedClusterListBlockOffset.Value); } + private static readonly Lazy _EnclosedClustersBlockOffset = new(() => Schema.GetOffset(0xDA27CA12F75E07CE), LazyThreadSafetyMode.None); + public VoxelVisBlockOffset_t EnclosedClustersBlock { - get => new VoxelVisBlockOffset_tImpl(_Handle + Schema.GetOffset(0xDA27CA12F75E07CE)); + get => new VoxelVisBlockOffset_tImpl(_Handle + _EnclosedClustersBlockOffset.Value); } + private static readonly Lazy _MasksBlockOffset = new(() => Schema.GetOffset(0xDA27CA121853F2AB), LazyThreadSafetyMode.None); + public VoxelVisBlockOffset_t MasksBlock { - get => new VoxelVisBlockOffset_tImpl(_Handle + Schema.GetOffset(0xDA27CA121853F2AB)); + get => new VoxelVisBlockOffset_tImpl(_Handle + _MasksBlockOffset.Value); } + private static readonly Lazy _VisBlocksOffset = new(() => Schema.GetOffset(0xDA27CA128C69D893), LazyThreadSafetyMode.None); + public VoxelVisBlockOffset_t VisBlocks { - get => new VoxelVisBlockOffset_tImpl(_Handle + Schema.GetOffset(0xDA27CA128C69D893)); + get => new VoxelVisBlockOffset_tImpl(_Handle + _VisBlocksOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWarpSectionAnimTagBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWarpSectionAnimTagBaseImpl.cs index efac9bc65..2de3a4493 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWarpSectionAnimTagBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWarpSectionAnimTagBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWarpSectionAnimTagImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWarpSectionAnimTagImpl.cs index ff9c6e807..9b07b9b52 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWarpSectionAnimTagImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWarpSectionAnimTagImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CWarpSectionAnimTagImpl : CWarpSectionAnimTagBaseImpl, CW public CWarpSectionAnimTagImpl(nint handle) : base(handle) { } + private static readonly Lazy _WarpPositionOffset = new(() => Schema.GetOffset(0x4C7992E6A30D730C), LazyThreadSafetyMode.None); + public ref bool WarpPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C7992E6A30D730C)); + get => ref _Handle.AsRef(_WarpPositionOffset.Value); } + private static readonly Lazy _WarpOrientationOffset = new(() => Schema.GetOffset(0x4C7992E6613873F3), LazyThreadSafetyMode.None); + public ref bool WarpOrientation { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C7992E6613873F3)); + get => ref _Handle.AsRef(_WarpOrientationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWaterBulletImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWaterBulletImpl.cs index a22c39afd..0f29d568b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWaterBulletImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWaterBulletImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWayPointHelperUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWayPointHelperUpdateNodeImpl.cs index 6804976dd..13ab532cd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWayPointHelperUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWayPointHelperUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class CWayPointHelperUpdateNodeImpl : CUnaryUpdateNodeImpl, CWa public CWayPointHelperUpdateNodeImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartCycleOffset = new(() => Schema.GetOffset(0x109BD628ABB46051), LazyThreadSafetyMode.None); + public ref float StartCycle { - get => ref _Handle.AsRef(Schema.GetOffset(0x109BD628ABB46051)); + get => ref _Handle.AsRef(_StartCycleOffset.Value); } + private static readonly Lazy _EndCycleOffset = new(() => Schema.GetOffset(0x109BD628176E8F62), LazyThreadSafetyMode.None); + public ref float EndCycle { - get => ref _Handle.AsRef(Schema.GetOffset(0x109BD628176E8F62)); + get => ref _Handle.AsRef(_EndCycleOffset.Value); } + private static readonly Lazy _OnlyGoalsOffset = new(() => Schema.GetOffset(0x109BD6283526BA11), LazyThreadSafetyMode.None); + public ref bool OnlyGoals { - get => ref _Handle.AsRef(Schema.GetOffset(0x109BD6283526BA11)); + get => ref _Handle.AsRef(_OnlyGoalsOffset.Value); } + private static readonly Lazy _PreventOvershootOffset = new(() => Schema.GetOffset(0x109BD628B161EADA), LazyThreadSafetyMode.None); + public ref bool PreventOvershoot { - get => ref _Handle.AsRef(Schema.GetOffset(0x109BD628B161EADA)); + get => ref _Handle.AsRef(_PreventOvershootOffset.Value); } + private static readonly Lazy _PreventUndershootOffset = new(() => Schema.GetOffset(0x109BD628C22276F8), LazyThreadSafetyMode.None); + public ref bool PreventUndershoot { - get => ref _Handle.AsRef(Schema.GetOffset(0x109BD628C22276F8)); + get => ref _Handle.AsRef(_PreventUndershootOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponAWPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponAWPImpl.cs index 605d66cd5..4038ba590 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponAWPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponAWPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponAugImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponAugImpl.cs index d1c249ba0..4d13c9ac0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponAugImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponAugImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponBaseItemImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponBaseItemImpl.cs index 6f92b743f..ca91ad90a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponBaseItemImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponBaseItemImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CWeaponBaseItemImpl : CCSWeaponBaseImpl, CWeaponBaseItem public CWeaponBaseItemImpl(nint handle) : base(handle) { } + private static readonly Lazy _SequenceInProgressOffset = new(() => Schema.GetOffset(0xE4ECC3486DDA8858), LazyThreadSafetyMode.None); + public ref bool SequenceInProgress { - get => ref _Handle.AsRef(Schema.GetOffset(0xE4ECC3486DDA8858)); + get => ref _Handle.AsRef(_SequenceInProgressOffset.Value); } + private static readonly Lazy _RedrawOffset = new(() => Schema.GetOffset(0xE4ECC348612F4EB2), LazyThreadSafetyMode.None); + public ref bool Redraw { - get => ref _Handle.AsRef(Schema.GetOffset(0xE4ECC348612F4EB2)); + get => ref _Handle.AsRef(_RedrawOffset.Value); } public void SequenceInProgressUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponBizonImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponBizonImpl.cs index cad9aaa18..124bc2d2b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponBizonImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponBizonImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponCZ75aImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponCZ75aImpl.cs index cfe3c8c5f..d114777d9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponCZ75aImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponCZ75aImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CWeaponCZ75aImpl : CCSWeaponBaseGunImpl, CWeaponCZ75a { public CWeaponCZ75aImpl(nint handle) : base(handle) { } + private static readonly Lazy _MagazineRemovedOffset = new(() => Schema.GetOffset(0x5FFE9C69188A471), LazyThreadSafetyMode.None); + public ref bool MagazineRemoved { - get => ref _Handle.AsRef(Schema.GetOffset(0x5FFE9C69188A471)); + get => ref _Handle.AsRef(_MagazineRemovedOffset.Value); } public void MagazineRemovedUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponEliteImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponEliteImpl.cs index bd21fb563..0fc2f2eac 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponEliteImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponEliteImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponFamasImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponFamasImpl.cs index 5dd82ea47..e47ee0470 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponFamasImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponFamasImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponFiveSevenImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponFiveSevenImpl.cs index 1247d1acb..b350112d5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponFiveSevenImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponFiveSevenImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponG3SG1Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponG3SG1Impl.cs index 4519f2671..50d546b34 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponG3SG1Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponG3SG1Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponGalilARImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponGalilARImpl.cs index c52f08e8b..3d3d82859 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponGalilARImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponGalilARImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponGlockImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponGlockImpl.cs index c22ec722f..848c43de7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponGlockImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponGlockImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponHKP2000Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponHKP2000Impl.cs index 8a1b90780..1653ba55e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponHKP2000Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponHKP2000Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponM249Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponM249Impl.cs index 64cee8eaa..a1f23f8d0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponM249Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponM249Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponM4A1Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponM4A1Impl.cs index c24df961d..af21cf3bc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponM4A1Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponM4A1Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponM4A1SilencerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponM4A1SilencerImpl.cs index b4512e9b8..7ac895378 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponM4A1SilencerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponM4A1SilencerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMAC10Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMAC10Impl.cs index ce86ec6e8..1769675c1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMAC10Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMAC10Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMP5SDImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMP5SDImpl.cs index 4474b2461..8fd60657b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMP5SDImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMP5SDImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMP7Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMP7Impl.cs index 9c461d127..662267bd0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMP7Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMP7Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMP9Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMP9Impl.cs index 62447ffda..58405f785 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMP9Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMP9Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMag7Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMag7Impl.cs index 417d52894..afa5f4546 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMag7Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponMag7Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponNOVAImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponNOVAImpl.cs index 40b97eca7..a10151dee 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponNOVAImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponNOVAImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponNegevImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponNegevImpl.cs index f53f13022..b591bab9e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponNegevImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponNegevImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponP250Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponP250Impl.cs index 46de3eb3f..7ce7ec611 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponP250Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponP250Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponP90Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponP90Impl.cs index 985ba4b2a..eeaedb66c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponP90Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponP90Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponRevolverImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponRevolverImpl.cs index b13b6a37b..fd55a7ae0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponRevolverImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponRevolverImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponSCAR20Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponSCAR20Impl.cs index cf643b14e..65a652c6b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponSCAR20Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponSCAR20Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponSG556Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponSG556Impl.cs index 7bd07624d..e00741ed6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponSG556Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponSG556Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponSSG08Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponSSG08Impl.cs index fbc3eeb73..cd00e1bd6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponSSG08Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponSSG08Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponSawedoffImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponSawedoffImpl.cs index aa5bfdff1..ac4c40020 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponSawedoffImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponSawedoffImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponTaserImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponTaserImpl.cs index 8005a232d..faa8045f9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponTaserImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponTaserImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class CWeaponTaserImpl : CCSWeaponBaseGunImpl, CWeaponTaser { public CWeaponTaserImpl(nint handle) : base(handle) { } + private static readonly Lazy _FireTimeOffset = new(() => Schema.GetOffset(0xA91A6CB965DBC00C), LazyThreadSafetyMode.None); + public GameTime_t FireTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xA91A6CB965DBC00C)); + get => new GameTime_tImpl(_Handle + _FireTimeOffset.Value); } + private static readonly Lazy _LastAttackTickOffset = new(() => Schema.GetOffset(0xA91A6CB90BCAAD3C), LazyThreadSafetyMode.None); + public ref int LastAttackTick { - get => ref _Handle.AsRef(Schema.GetOffset(0xA91A6CB90BCAAD3C)); + get => ref _Handle.AsRef(_LastAttackTickOffset.Value); } public void FireTimeUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponTec9Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponTec9Impl.cs index afec59dbb..2370ea584 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponTec9Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponTec9Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponUMP45Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponUMP45Impl.cs index 051356f22..e279a97a1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponUMP45Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponUMP45Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponUSPSilencerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponUSPSilencerImpl.cs index fd689ddcd..84db03d5c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponUSPSilencerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponUSPSilencerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponXM1014Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponXM1014Impl.cs index b92dabff9..9ddc1d0f6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponXM1014Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWeaponXM1014Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWorldCompositionChunkReferenceElement_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWorldCompositionChunkReferenceElement_tImpl.cs index c7bb54c0b..649769671 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWorldCompositionChunkReferenceElement_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWorldCompositionChunkReferenceElement_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,19 +17,23 @@ internal partial class CWorldCompositionChunkReferenceElement_tImpl : SchemaClas public CWorldCompositionChunkReferenceElement_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _StrMapToLoadOffset = new(() => Schema.GetOffset(0x9B80004DE87F0C1B), LazyThreadSafetyMode.None); + public string StrMapToLoad { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9B80004DE87F0C1B)); + var ptr = _Handle.Read(_StrMapToLoadOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9B80004DE87F0C1B, value); + set => Schema.SetString(_Handle, _StrMapToLoadOffset.Value, value); } + private static readonly Lazy _StrLandmarkNameOffset = new(() => Schema.GetOffset(0x9B80004DE0BB30D3), LazyThreadSafetyMode.None); + public string StrLandmarkName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9B80004DE0BB30D3)); + var ptr = _Handle.Read(_StrLandmarkNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9B80004DE0BB30D3, value); + set => Schema.SetString(_Handle, _StrLandmarkNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWorldImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWorldImpl.cs index b75df5b17..5c39a3c77 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWorldImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CWorldImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CZeroPoseUpdateNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CZeroPoseUpdateNodeImpl.cs index 477f0da8d..f3a1bae7a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CZeroPoseUpdateNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CZeroPoseUpdateNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_AddVectorToVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_AddVectorToVectorImpl.cs index dbf9b8dcf..64fd6938b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_AddVectorToVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_AddVectorToVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_INIT_AddVectorToVectorImpl : CParticleFunctionInitializ public C_INIT_AddVectorToVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0xFBD8AC005F596B51), LazyThreadSafetyMode.None); + public ref Vector Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0xFBD8AC005F596B51)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xFBD8AC00E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xFBD8AC00E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _FieldInputOffset = new(() => Schema.GetOffset(0xFBD8AC00AE775669), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xFBD8AC00AE775669)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputOffset.Value); } + private static readonly Lazy _OffsetMinOffset = new(() => Schema.GetOffset(0xFBD8AC00ABED1082), LazyThreadSafetyMode.None); + public ref Vector OffsetMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xFBD8AC00ABED1082)); + get => ref _Handle.AsRef(_OffsetMinOffset.Value); } + private static readonly Lazy _OffsetMaxOffset = new(() => Schema.GetOffset(0xFBD8AC0095D96628), LazyThreadSafetyMode.None); + public ref Vector OffsetMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xFBD8AC0095D96628)); + get => ref _Handle.AsRef(_OffsetMaxOffset.Value); } + private static readonly Lazy _RandomnessParametersOffset = new(() => Schema.GetOffset(0xFBD8AC007EDF50AD), LazyThreadSafetyMode.None); + public CRandomNumberGeneratorParameters RandomnessParameters { - get => new CRandomNumberGeneratorParametersImpl(_Handle + Schema.GetOffset(0xFBD8AC007EDF50AD)); + get => new CRandomNumberGeneratorParametersImpl(_Handle + _RandomnessParametersOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_AgeNoiseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_AgeNoiseImpl.cs index a780baba6..fc47bf9f9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_AgeNoiseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_AgeNoiseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_INIT_AgeNoiseImpl : CParticleFunctionInitializerImpl, C public C_INIT_AgeNoiseImpl(nint handle) : base(handle) { } + private static readonly Lazy _AbsValOffset = new(() => Schema.GetOffset(0x7155D6E1AD2CCF0A), LazyThreadSafetyMode.None); + public ref bool AbsVal { - get => ref _Handle.AsRef(Schema.GetOffset(0x7155D6E1AD2CCF0A)); + get => ref _Handle.AsRef(_AbsValOffset.Value); } + private static readonly Lazy _AbsValInvOffset = new(() => Schema.GetOffset(0x7155D6E1024BCB79), LazyThreadSafetyMode.None); + public ref bool AbsValInv { - get => ref _Handle.AsRef(Schema.GetOffset(0x7155D6E1024BCB79)); + get => ref _Handle.AsRef(_AbsValInvOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0x7155D6E17F14BA34), LazyThreadSafetyMode.None); + public ref float Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0x7155D6E17F14BA34)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _AgeMinOffset = new(() => Schema.GetOffset(0x7155D6E11385AB42), LazyThreadSafetyMode.None); + public ref float AgeMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x7155D6E11385AB42)); + get => ref _Handle.AsRef(_AgeMinOffset.Value); } + private static readonly Lazy _AgeMaxOffset = new(() => Schema.GetOffset(0x7155D6E1FD7200E8), LazyThreadSafetyMode.None); + public ref float AgeMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x7155D6E1FD7200E8)); + get => ref _Handle.AsRef(_AgeMaxOffset.Value); } + private static readonly Lazy _NoiseScaleOffset = new(() => Schema.GetOffset(0x7155D6E132FE2EF3), LazyThreadSafetyMode.None); + public ref float NoiseScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x7155D6E132FE2EF3)); + get => ref _Handle.AsRef(_NoiseScaleOffset.Value); } + private static readonly Lazy _NoiseScaleLocOffset = new(() => Schema.GetOffset(0x7155D6E1A9F4B0DF), LazyThreadSafetyMode.None); + public ref float NoiseScaleLoc { - get => ref _Handle.AsRef(Schema.GetOffset(0x7155D6E1A9F4B0DF)); + get => ref _Handle.AsRef(_NoiseScaleLocOffset.Value); } + private static readonly Lazy _OffsetLocOffset = new(() => Schema.GetOffset(0x7155D6E1EFAB26AC), LazyThreadSafetyMode.None); + public ref Vector OffsetLoc { - get => ref _Handle.AsRef(Schema.GetOffset(0x7155D6E1EFAB26AC)); + get => ref _Handle.AsRef(_OffsetLocOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ChaoticAttractorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ChaoticAttractorImpl.cs index ab488ea47..e90a16ad0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ChaoticAttractorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ChaoticAttractorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class C_INIT_ChaoticAttractorImpl : CParticleFunctionInitialize public C_INIT_ChaoticAttractorImpl(nint handle) : base(handle) { } + private static readonly Lazy _AParmOffset = new(() => Schema.GetOffset(0x31993BA100370330), LazyThreadSafetyMode.None); + public ref float AParm { - get => ref _Handle.AsRef(Schema.GetOffset(0x31993BA100370330)); + get => ref _Handle.AsRef(_AParmOffset.Value); } + private static readonly Lazy _BParmOffset = new(() => Schema.GetOffset(0x31993BA13711CFD5), LazyThreadSafetyMode.None); + public ref float BParm { - get => ref _Handle.AsRef(Schema.GetOffset(0x31993BA13711CFD5)); + get => ref _Handle.AsRef(_BParmOffset.Value); } + private static readonly Lazy _CParmOffset = new(() => Schema.GetOffset(0x31993BA14C9F79E6), LazyThreadSafetyMode.None); + public ref float CParm { - get => ref _Handle.AsRef(Schema.GetOffset(0x31993BA14C9F79E6)); + get => ref _Handle.AsRef(_CParmOffset.Value); } + private static readonly Lazy _DParmOffset = new(() => Schema.GetOffset(0x31993BA175D11173), LazyThreadSafetyMode.None); + public ref float DParm { - get => ref _Handle.AsRef(Schema.GetOffset(0x31993BA175D11173)); + get => ref _Handle.AsRef(_DParmOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x31993BA1B731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0x31993BA1B731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _SpeedMinOffset = new(() => Schema.GetOffset(0x31993BA1B52776BE), LazyThreadSafetyMode.None); + public ref float SpeedMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x31993BA1B52776BE)); + get => ref _Handle.AsRef(_SpeedMinOffset.Value); } + private static readonly Lazy _SpeedMaxOffset = new(() => Schema.GetOffset(0x31993BA1C7140B5C), LazyThreadSafetyMode.None); + public ref float SpeedMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x31993BA1C7140B5C)); + get => ref _Handle.AsRef(_SpeedMaxOffset.Value); } + private static readonly Lazy _BaseCPOffset = new(() => Schema.GetOffset(0x31993BA1959440C7), LazyThreadSafetyMode.None); + public ref int BaseCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x31993BA1959440C7)); + get => ref _Handle.AsRef(_BaseCPOffset.Value); } + private static readonly Lazy _UniformSpeedOffset = new(() => Schema.GetOffset(0x31993BA117685F4E), LazyThreadSafetyMode.None); + public ref bool UniformSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x31993BA117685F4E)); + get => ref _Handle.AsRef(_UniformSpeedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CheckParticleForWaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CheckParticleForWaterImpl.cs index 4cb675c49..e1d5024b7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CheckParticleForWaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CheckParticleForWaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_INIT_CheckParticleForWaterImpl : CParticleFunctionIniti public C_INIT_CheckParticleForWaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x6829046A5ACFC08D), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Radius { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x6829046A5ACFC08D)); + get => new CPerParticleFloatInputImpl(_Handle + _RadiusOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x6829046AE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x6829046AE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _OutputRemapOffset = new(() => Schema.GetOffset(0x6829046A1239396F), LazyThreadSafetyMode.None); + public CParticleRemapFloatInput OutputRemap { - get => new CParticleRemapFloatInputImpl(_Handle + Schema.GetOffset(0x6829046A1239396F)); + get => new CParticleRemapFloatInputImpl(_Handle + _OutputRemapOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x6829046AFB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x6829046AFB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ColorLitPerParticleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ColorLitPerParticleImpl.cs index 2bae7e5d8..1521e3509 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ColorLitPerParticleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ColorLitPerParticleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_INIT_ColorLitPerParticleImpl : CParticleFunctionInitial public C_INIT_ColorLitPerParticleImpl(nint handle) : base(handle) { } + private static readonly Lazy _ColorMinOffset = new(() => Schema.GetOffset(0xA196BF87552A5834), LazyThreadSafetyMode.None); + public ref Color ColorMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xA196BF87552A5834)); + get => ref _Handle.AsRef(_ColorMinOffset.Value); } + private static readonly Lazy _ColorMaxOffset = new(() => Schema.GetOffset(0xA196BF87433DC396), LazyThreadSafetyMode.None); + public ref Color ColorMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xA196BF87433DC396)); + get => ref _Handle.AsRef(_ColorMaxOffset.Value); } + private static readonly Lazy _TintMinOffset = new(() => Schema.GetOffset(0xA196BF8750B36A60), LazyThreadSafetyMode.None); + public ref Color TintMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xA196BF8750B36A60)); + get => ref _Handle.AsRef(_TintMinOffset.Value); } + private static readonly Lazy _TintMaxOffset = new(() => Schema.GetOffset(0xA196BF8766A0054A), LazyThreadSafetyMode.None); + public ref Color TintMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xA196BF8766A0054A)); + get => ref _Handle.AsRef(_TintMaxOffset.Value); } + private static readonly Lazy _TintPercOffset = new(() => Schema.GetOffset(0xA196BF87E32BE3C6), LazyThreadSafetyMode.None); + public ref float TintPerc { - get => ref _Handle.AsRef(Schema.GetOffset(0xA196BF87E32BE3C6)); + get => ref _Handle.AsRef(_TintPercOffset.Value); } + private static readonly Lazy _TintBlendModeOffset = new(() => Schema.GetOffset(0xA196BF87B80E5314), LazyThreadSafetyMode.None); + public ref ParticleColorBlendMode_t TintBlendMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xA196BF87B80E5314)); + get => ref _Handle.AsRef(_TintBlendModeOffset.Value); } + private static readonly Lazy _LightAmplificationOffset = new(() => Schema.GetOffset(0xA196BF87C8D7C0AD), LazyThreadSafetyMode.None); + public ref float LightAmplification { - get => ref _Handle.AsRef(Schema.GetOffset(0xA196BF87C8D7C0AD)); + get => ref _Handle.AsRef(_LightAmplificationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateAlongPathImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateAlongPathImpl.cs index 285bfef51..e315ff09e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateAlongPathImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateAlongPathImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_INIT_CreateAlongPathImpl : CParticleFunctionInitializer public C_INIT_CreateAlongPathImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaxDistanceOffset = new(() => Schema.GetOffset(0x655F7B0C844E396A), LazyThreadSafetyMode.None); + public ref float MaxDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x655F7B0C844E396A)); + get => ref _Handle.AsRef(_MaxDistanceOffset.Value); } + private static readonly Lazy _PathParamsOffset = new(() => Schema.GetOffset(0x655F7B0C3C10092C), LazyThreadSafetyMode.None); + public CPathParameters PathParams { - get => new CPathParametersImpl(_Handle + Schema.GetOffset(0x655F7B0C3C10092C)); + get => new CPathParametersImpl(_Handle + _PathParamsOffset.Value); } + private static readonly Lazy _UseRandomCPsOffset = new(() => Schema.GetOffset(0x655F7B0CA15D9A41), LazyThreadSafetyMode.None); + public ref bool UseRandomCPs { - get => ref _Handle.AsRef(Schema.GetOffset(0x655F7B0CA15D9A41)); + get => ref _Handle.AsRef(_UseRandomCPsOffset.Value); } + private static readonly Lazy _EndOffsetOffset = new(() => Schema.GetOffset(0x655F7B0C5BBD1959), LazyThreadSafetyMode.None); + public ref Vector EndOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x655F7B0C5BBD1959)); + get => ref _Handle.AsRef(_EndOffsetOffset.Value); } + private static readonly Lazy _SaveOffsetOffset = new(() => Schema.GetOffset(0x655F7B0C43F64E5B), LazyThreadSafetyMode.None); + public ref bool SaveOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x655F7B0C43F64E5B)); + get => ref _Handle.AsRef(_SaveOffsetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateFromCPsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateFromCPsImpl.cs index 8c480ce82..a57b272a2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateFromCPsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateFromCPsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_INIT_CreateFromCPsImpl : CParticleFunctionInitializerIm public C_INIT_CreateFromCPsImpl(nint handle) : base(handle) { } + private static readonly Lazy _IncrementOffset = new(() => Schema.GetOffset(0x2593FF962359F182), LazyThreadSafetyMode.None); + public ref int Increment { - get => ref _Handle.AsRef(Schema.GetOffset(0x2593FF962359F182)); + get => ref _Handle.AsRef(_IncrementOffset.Value); } + private static readonly Lazy _MinCPOffset = new(() => Schema.GetOffset(0x2593FF9663AFBE98), LazyThreadSafetyMode.None); + public ref int MinCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x2593FF9663AFBE98)); + get => ref _Handle.AsRef(_MinCPOffset.Value); } + private static readonly Lazy _MaxCPOffset = new(() => Schema.GetOffset(0x2593FF964C307D96), LazyThreadSafetyMode.None); + public ref int MaxCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x2593FF964C307D96)); + get => ref _Handle.AsRef(_MaxCPOffset.Value); } + private static readonly Lazy _DynamicCPCountOffset = new(() => Schema.GetOffset(0x2593FF96DF30CE38), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput DynamicCPCount { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x2593FF96DF30CE38)); + get => new CParticleCollectionFloatInputImpl(_Handle + _DynamicCPCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateFromParentParticlesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateFromParentParticlesImpl.cs index 4136f618d..acc972965 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateFromParentParticlesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateFromParentParticlesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_INIT_CreateFromParentParticlesImpl : CParticleFunctionI public C_INIT_CreateFromParentParticlesImpl(nint handle) : base(handle) { } + private static readonly Lazy _VelocityScaleOffset = new(() => Schema.GetOffset(0x4AEA47CDE161DDAA), LazyThreadSafetyMode.None); + public ref float VelocityScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x4AEA47CDE161DDAA)); + get => ref _Handle.AsRef(_VelocityScaleOffset.Value); } + private static readonly Lazy _IncrementOffset = new(() => Schema.GetOffset(0x4AEA47CDB3721674), LazyThreadSafetyMode.None); + public ref float Increment { - get => ref _Handle.AsRef(Schema.GetOffset(0x4AEA47CDB3721674)); + get => ref _Handle.AsRef(_IncrementOffset.Value); } + private static readonly Lazy _RandomDistributionOffset = new(() => Schema.GetOffset(0x4AEA47CD830F6B38), LazyThreadSafetyMode.None); + public ref bool RandomDistribution { - get => ref _Handle.AsRef(Schema.GetOffset(0x4AEA47CD830F6B38)); + get => ref _Handle.AsRef(_RandomDistributionOffset.Value); } + private static readonly Lazy _RandomSeedOffset = new(() => Schema.GetOffset(0x4AEA47CD6388F067), LazyThreadSafetyMode.None); + public ref int RandomSeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x4AEA47CD6388F067)); + get => ref _Handle.AsRef(_RandomSeedOffset.Value); } + private static readonly Lazy _SubFrameOffset = new(() => Schema.GetOffset(0x4AEA47CD1BAEEAF6), LazyThreadSafetyMode.None); + public ref bool SubFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x4AEA47CD1BAEEAF6)); + get => ref _Handle.AsRef(_SubFrameOffset.Value); } + private static readonly Lazy _SetRopeSegmentIDOffset = new(() => Schema.GetOffset(0x4AEA47CDAEFC2399), LazyThreadSafetyMode.None); + public ref bool SetRopeSegmentID { - get => ref _Handle.AsRef(Schema.GetOffset(0x4AEA47CDAEFC2399)); + get => ref _Handle.AsRef(_SetRopeSegmentIDOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateFromPlaneCacheImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateFromPlaneCacheImpl.cs index eb32fbcb1..f193b3807 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateFromPlaneCacheImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateFromPlaneCacheImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_INIT_CreateFromPlaneCacheImpl : CParticleFunctionInitia public C_INIT_CreateFromPlaneCacheImpl(nint handle) : base(handle) { } + private static readonly Lazy _OffsetMinOffset = new(() => Schema.GetOffset(0x349002765EE9C8FE), LazyThreadSafetyMode.None); + public ref Vector OffsetMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x349002765EE9C8FE)); + get => ref _Handle.AsRef(_OffsetMinOffset.Value); } + private static readonly Lazy _OffsetMaxOffset = new(() => Schema.GetOffset(0x3490027670D65D9C), LazyThreadSafetyMode.None); + public ref Vector OffsetMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x3490027670D65D9C)); + get => ref _Handle.AsRef(_OffsetMaxOffset.Value); } + private static readonly Lazy _UseNormalOffset = new(() => Schema.GetOffset(0x349002769FA2D197), LazyThreadSafetyMode.None); + public ref bool UseNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0x349002769FA2D197)); + get => ref _Handle.AsRef(_UseNormalOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateInEpitrochoidImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateInEpitrochoidImpl.cs index e06fc4810..355f104db 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateInEpitrochoidImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateInEpitrochoidImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class C_INIT_CreateInEpitrochoidImpl : CParticleFunctionInitial public C_INIT_CreateInEpitrochoidImpl(nint handle) : base(handle) { } + private static readonly Lazy _Component1Offset = new(() => Schema.GetOffset(0x3B16C41F125ABCA7), LazyThreadSafetyMode.None); + public ref int Component1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x3B16C41F125ABCA7)); + get => ref _Handle.AsRef(_Component1Offset.Value); } + private static readonly Lazy _Component2Offset = new(() => Schema.GetOffset(0x3B16C41F135ABE3A), LazyThreadSafetyMode.None); + public ref int Component2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x3B16C41F135ABE3A)); + get => ref _Handle.AsRef(_Component2Offset.Value); } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0x3B16C41FB3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x3B16C41FB3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _ParticleDensityOffset = new(() => Schema.GetOffset(0x3B16C41FF720B9EF), LazyThreadSafetyMode.None); + public CPerParticleFloatInput ParticleDensity { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x3B16C41FF720B9EF)); + get => new CPerParticleFloatInputImpl(_Handle + _ParticleDensityOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0x3B16C41F7F14BA34), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Offset { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x3B16C41F7F14BA34)); + get => new CPerParticleFloatInputImpl(_Handle + _OffsetOffset.Value); } + private static readonly Lazy _Radius1Offset = new(() => Schema.GetOffset(0x3B16C41FB10C67F4), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Radius1 { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x3B16C41FB10C67F4)); + get => new CPerParticleFloatInputImpl(_Handle + _Radius1Offset.Value); } + private static readonly Lazy _Radius2Offset = new(() => Schema.GetOffset(0x3B16C41FB40C6CAD), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Radius2 { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x3B16C41FB40C6CAD)); + get => new CPerParticleFloatInputImpl(_Handle + _Radius2Offset.Value); } + private static readonly Lazy _UseCountOffset = new(() => Schema.GetOffset(0x3B16C41F8836B9AB), LazyThreadSafetyMode.None); + public ref bool UseCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x3B16C41F8836B9AB)); + get => ref _Handle.AsRef(_UseCountOffset.Value); } + private static readonly Lazy _UseLocalCoordsOffset = new(() => Schema.GetOffset(0x3B16C41F8AB11575), LazyThreadSafetyMode.None); + public ref bool UseLocalCoords { - get => ref _Handle.AsRef(Schema.GetOffset(0x3B16C41F8AB11575)); + get => ref _Handle.AsRef(_UseLocalCoordsOffset.Value); } + private static readonly Lazy _OffsetExistingPosOffset = new(() => Schema.GetOffset(0x3B16C41F79DD329B), LazyThreadSafetyMode.None); + public ref bool OffsetExistingPos { - get => ref _Handle.AsRef(Schema.GetOffset(0x3B16C41F79DD329B)); + get => ref _Handle.AsRef(_OffsetExistingPosOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateOnGridImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateOnGridImpl.cs index 2fe83d86f..e2ccfd805 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateOnGridImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateOnGridImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class C_INIT_CreateOnGridImpl : CParticleFunctionInitializerImp public C_INIT_CreateOnGridImpl(nint handle) : base(handle) { } + private static readonly Lazy _XCountOffset = new(() => Schema.GetOffset(0x2C82A08B6E80D4FA), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput XCount { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x2C82A08B6E80D4FA)); + get => new CParticleCollectionFloatInputImpl(_Handle + _XCountOffset.Value); } + private static readonly Lazy _YCountOffset = new(() => Schema.GetOffset(0x2C82A08B51D32897), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput YCount { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x2C82A08B51D32897)); + get => new CParticleCollectionFloatInputImpl(_Handle + _YCountOffset.Value); } + private static readonly Lazy _ZCountOffset = new(() => Schema.GetOffset(0x2C82A08BCCE7A908), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ZCount { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x2C82A08BCCE7A908)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ZCountOffset.Value); } + private static readonly Lazy _XSpacingOffset = new(() => Schema.GetOffset(0x2C82A08B374E0750), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput XSpacing { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x2C82A08B374E0750)); + get => new CParticleCollectionFloatInputImpl(_Handle + _XSpacingOffset.Value); } + private static readonly Lazy _YSpacingOffset = new(() => Schema.GetOffset(0x2C82A08B836B50C9), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput YSpacing { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x2C82A08B836B50C9)); + get => new CParticleCollectionFloatInputImpl(_Handle + _YSpacingOffset.Value); } + private static readonly Lazy _ZSpacingOffset = new(() => Schema.GetOffset(0x2C82A08BF78FF062), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ZSpacing { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x2C82A08BF78FF062)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ZSpacingOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x2C82A08B3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x2C82A08B3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _LocalSpaceOffset = new(() => Schema.GetOffset(0x2C82A08B62418E6E), LazyThreadSafetyMode.None); + public ref bool LocalSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x2C82A08B62418E6E)); + get => ref _Handle.AsRef(_LocalSpaceOffset.Value); } + private static readonly Lazy _CenterOffset = new(() => Schema.GetOffset(0x2C82A08B69BF05E4), LazyThreadSafetyMode.None); + public ref bool Center { - get => ref _Handle.AsRef(Schema.GetOffset(0x2C82A08B69BF05E4)); + get => ref _Handle.AsRef(_CenterOffset.Value); } + private static readonly Lazy _HollowOffset = new(() => Schema.GetOffset(0x2C82A08B22E4957E), LazyThreadSafetyMode.None); + public ref bool Hollow { - get => ref _Handle.AsRef(Schema.GetOffset(0x2C82A08B22E4957E)); + get => ref _Handle.AsRef(_HollowOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateOnModelAtHeightImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateOnModelAtHeightImpl.cs index d49ce7cd3..df6a47c29 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateOnModelAtHeightImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateOnModelAtHeightImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,51 +17,79 @@ internal partial class C_INIT_CreateOnModelAtHeightImpl : CParticleFunctionIniti public C_INIT_CreateOnModelAtHeightImpl(nint handle) : base(handle) { } + private static readonly Lazy _UseBonesOffset = new(() => Schema.GetOffset(0xBB8B79F610D1938B), LazyThreadSafetyMode.None); + public ref bool UseBones { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB8B79F610D1938B)); + get => ref _Handle.AsRef(_UseBonesOffset.Value); } + private static readonly Lazy _ForceZOffset = new(() => Schema.GetOffset(0xBB8B79F6A3DF359A), LazyThreadSafetyMode.None); + public ref bool ForceZ { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB8B79F6A3DF359A)); + get => ref _Handle.AsRef(_ForceZOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0xBB8B79F63F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB8B79F63F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _HeightCPOffset = new(() => Schema.GetOffset(0xBB8B79F6943E048D), LazyThreadSafetyMode.None); + public ref int HeightCP { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB8B79F6943E048D)); + get => ref _Handle.AsRef(_HeightCPOffset.Value); } + private static readonly Lazy _UseWaterHeightOffset = new(() => Schema.GetOffset(0xBB8B79F616CA1A0C), LazyThreadSafetyMode.None); + public ref bool UseWaterHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB8B79F616CA1A0C)); + get => ref _Handle.AsRef(_UseWaterHeightOffset.Value); } + private static readonly Lazy _DesiredHeightOffset = new(() => Schema.GetOffset(0xBB8B79F6D72286F4), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput DesiredHeight { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xBB8B79F6D72286F4)); + get => new CParticleCollectionFloatInputImpl(_Handle + _DesiredHeightOffset.Value); } + private static readonly Lazy _HitBoxScaleOffset = new(() => Schema.GetOffset(0xBB8B79F658EE3FB7), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput HitBoxScale { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xBB8B79F658EE3FB7)); + get => new CParticleCollectionVecInputImpl(_Handle + _HitBoxScaleOffset.Value); } + private static readonly Lazy _DirectionBiasOffset = new(() => Schema.GetOffset(0xBB8B79F65A1697CF), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput DirectionBias { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xBB8B79F65A1697CF)); + get => new CParticleCollectionVecInputImpl(_Handle + _DirectionBiasOffset.Value); } + private static readonly Lazy _BiasTypeOffset = new(() => Schema.GetOffset(0xBB8B79F65FAB0448), LazyThreadSafetyMode.None); + public ref ParticleHitboxBiasType_t BiasType { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB8B79F65FAB0448)); + get => ref _Handle.AsRef(_BiasTypeOffset.Value); } + private static readonly Lazy _LocalCoordsOffset = new(() => Schema.GetOffset(0xBB8B79F630E716DE), LazyThreadSafetyMode.None); + public ref bool LocalCoords { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB8B79F630E716DE)); + get => ref _Handle.AsRef(_LocalCoordsOffset.Value); } + private static readonly Lazy _PreferMovingBoxesOffset = new(() => Schema.GetOffset(0xBB8B79F68F1573EE), LazyThreadSafetyMode.None); + public ref bool PreferMovingBoxes { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB8B79F68F1573EE)); + get => ref _Handle.AsRef(_PreferMovingBoxesOffset.Value); } + private static readonly Lazy _HitboxSetNameOffset = new(() => Schema.GetOffset(0xBB8B79F66A21BB0E), LazyThreadSafetyMode.None); + public string HitboxSetName { get { - var ptr = _Handle + Schema.GetOffset(0xBB8B79F66A21BB0E); + var ptr = _Handle + _HitboxSetNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xBB8B79F66A21BB0E, value, 128); + set => Schema.SetFixedString(_Handle, _HitboxSetNameOffset.Value, value, 128); } + private static readonly Lazy _HitboxVelocityScaleOffset = new(() => Schema.GetOffset(0xBB8B79F65BE2EDCC), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput HitboxVelocityScale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xBB8B79F65BE2EDCC)); + get => new CParticleCollectionFloatInputImpl(_Handle + _HitboxVelocityScaleOffset.Value); } + private static readonly Lazy _MaxBoneVelocityOffset = new(() => Schema.GetOffset(0xBB8B79F660C6A35A), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput MaxBoneVelocity { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xBB8B79F660C6A35A)); + get => new CParticleCollectionFloatInputImpl(_Handle + _MaxBoneVelocityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateOnModelImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateOnModelImpl.cs index c21999d7b..441c1e1c3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateOnModelImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateOnModelImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,57 +17,89 @@ internal partial class C_INIT_CreateOnModelImpl : CParticleFunctionInitializerIm public C_INIT_CreateOnModelImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModelInputOffset = new(() => Schema.GetOffset(0xD7E11944EB74120E), LazyThreadSafetyMode.None); + public CParticleModelInput ModelInput { - get => new CParticleModelInputImpl(_Handle + Schema.GetOffset(0xD7E11944EB74120E)); + get => new CParticleModelInputImpl(_Handle + _ModelInputOffset.Value); } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0xD7E119443A9ED669), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0xD7E119443A9ED669)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _ForceInModelOffset = new(() => Schema.GetOffset(0xD7E11944A3C747AC), LazyThreadSafetyMode.None); + public ref int ForceInModel { - get => ref _Handle.AsRef(Schema.GetOffset(0xD7E11944A3C747AC)); + get => ref _Handle.AsRef(_ForceInModelOffset.Value); } + private static readonly Lazy _ScaleToVolumeOffset = new(() => Schema.GetOffset(0xD7E11944306BC482), LazyThreadSafetyMode.None); + public ref bool ScaleToVolume { - get => ref _Handle.AsRef(Schema.GetOffset(0xD7E11944306BC482)); + get => ref _Handle.AsRef(_ScaleToVolumeOffset.Value); } + private static readonly Lazy _EvenDistributionOffset = new(() => Schema.GetOffset(0xD7E1194484932067), LazyThreadSafetyMode.None); + public ref bool EvenDistribution { - get => ref _Handle.AsRef(Schema.GetOffset(0xD7E1194484932067)); + get => ref _Handle.AsRef(_EvenDistributionOffset.Value); } + private static readonly Lazy _DesiredHitboxOffset = new(() => Schema.GetOffset(0xD7E11944FD09531B), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput DesiredHitbox { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xD7E11944FD09531B)); + get => new CParticleCollectionFloatInputImpl(_Handle + _DesiredHitboxOffset.Value); } + private static readonly Lazy _HitboxValueFromControlPointIndexOffset = new(() => Schema.GetOffset(0xD7E11944885FF607), LazyThreadSafetyMode.None); + public ref int HitboxValueFromControlPointIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xD7E11944885FF607)); + get => ref _Handle.AsRef(_HitboxValueFromControlPointIndexOffset.Value); } + private static readonly Lazy _HitBoxScaleOffset = new(() => Schema.GetOffset(0xD7E1194458EE3FB7), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput HitBoxScale { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xD7E1194458EE3FB7)); + get => new CParticleCollectionVecInputImpl(_Handle + _HitBoxScaleOffset.Value); } + private static readonly Lazy _BoneVelocityOffset = new(() => Schema.GetOffset(0xD7E11944B06BD382), LazyThreadSafetyMode.None); + public ref float BoneVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xD7E11944B06BD382)); + get => ref _Handle.AsRef(_BoneVelocityOffset.Value); } + private static readonly Lazy _MaxBoneVelocityOffset = new(() => Schema.GetOffset(0xD7E1194460C6A35A), LazyThreadSafetyMode.None); + public ref float MaxBoneVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xD7E1194460C6A35A)); + get => ref _Handle.AsRef(_MaxBoneVelocityOffset.Value); } + private static readonly Lazy _DirectionBiasOffset = new(() => Schema.GetOffset(0xD7E119445A1697CF), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput DirectionBias { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xD7E119445A1697CF)); + get => new CParticleCollectionVecInputImpl(_Handle + _DirectionBiasOffset.Value); } + private static readonly Lazy _HitboxSetNameOffset = new(() => Schema.GetOffset(0xD7E119446A21BB0E), LazyThreadSafetyMode.None); + public string HitboxSetName { get { - var ptr = _Handle + Schema.GetOffset(0xD7E119446A21BB0E); + var ptr = _Handle + _HitboxSetNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xD7E119446A21BB0E, value, 128); + set => Schema.SetFixedString(_Handle, _HitboxSetNameOffset.Value, value, 128); } + private static readonly Lazy _LocalCoordsOffset = new(() => Schema.GetOffset(0xD7E1194430E716DE), LazyThreadSafetyMode.None); + public ref bool LocalCoords { - get => ref _Handle.AsRef(Schema.GetOffset(0xD7E1194430E716DE)); + get => ref _Handle.AsRef(_LocalCoordsOffset.Value); } + private static readonly Lazy _UseBonesOffset = new(() => Schema.GetOffset(0xD7E1194410D1938B), LazyThreadSafetyMode.None); + public ref bool UseBones { - get => ref _Handle.AsRef(Schema.GetOffset(0xD7E1194410D1938B)); + get => ref _Handle.AsRef(_UseBonesOffset.Value); } + private static readonly Lazy _UseMeshOffset = new(() => Schema.GetOffset(0xD7E11944ECDA3B19), LazyThreadSafetyMode.None); + public ref bool UseMesh { - get => ref _Handle.AsRef(Schema.GetOffset(0xD7E11944ECDA3B19)); + get => ref _Handle.AsRef(_UseMeshOffset.Value); } + private static readonly Lazy _ShellSizeOffset = new(() => Schema.GetOffset(0xD7E1194404D01B22), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ShellSize { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xD7E1194404D01B22)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ShellSizeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateParticleImpulseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateParticleImpulseImpl.cs index 9bbce61a5..13e416fd7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateParticleImpulseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateParticleImpulseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_INIT_CreateParticleImpulseImpl : CParticleFunctionIniti public C_INIT_CreateParticleImpulseImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputRadiusOffset = new(() => Schema.GetOffset(0x1617EF931F5CA2F9), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputRadius { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x1617EF931F5CA2F9)); + get => new CPerParticleFloatInputImpl(_Handle + _InputRadiusOffset.Value); } + private static readonly Lazy _InputMagnitudeOffset = new(() => Schema.GetOffset(0x1617EF938E8975B7), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputMagnitude { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x1617EF938E8975B7)); + get => new CPerParticleFloatInputImpl(_Handle + _InputMagnitudeOffset.Value); } + private static readonly Lazy _FalloffFunctionOffset = new(() => Schema.GetOffset(0x1617EF93A7D5FD7D), LazyThreadSafetyMode.None); + public ref ParticleFalloffFunction_t FalloffFunction { - get => ref _Handle.AsRef(Schema.GetOffset(0x1617EF93A7D5FD7D)); + get => ref _Handle.AsRef(_FalloffFunctionOffset.Value); } + private static readonly Lazy _InputFalloffExpOffset = new(() => Schema.GetOffset(0x1617EF9356063396), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputFalloffExp { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x1617EF9356063396)); + get => new CPerParticleFloatInputImpl(_Handle + _InputFalloffExpOffset.Value); } + private static readonly Lazy _ImpulseTypeOffset = new(() => Schema.GetOffset(0x1617EF9309B21020), LazyThreadSafetyMode.None); + public ref ParticleImpulseType_t ImpulseType { - get => ref _Handle.AsRef(Schema.GetOffset(0x1617EF9309B21020)); + get => ref _Handle.AsRef(_ImpulseTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreatePhyllotaxisImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreatePhyllotaxisImpl.cs index f0b5b5b4b..8019922bf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreatePhyllotaxisImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreatePhyllotaxisImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,47 +17,75 @@ internal partial class C_INIT_CreatePhyllotaxisImpl : CParticleFunctionInitializ public C_INIT_CreatePhyllotaxisImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x81F1ABBB3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x81F1ABBB3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _ScaleCPOffset = new(() => Schema.GetOffset(0x81F1ABBBDE3CC5E6), LazyThreadSafetyMode.None); + public ref int ScaleCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x81F1ABBBDE3CC5E6)); + get => ref _Handle.AsRef(_ScaleCPOffset.Value); } + private static readonly Lazy _ComponentOffset = new(() => Schema.GetOffset(0x81F1ABBBBFD0952C), LazyThreadSafetyMode.None); + public ref int Component { - get => ref _Handle.AsRef(Schema.GetOffset(0x81F1ABBBBFD0952C)); + get => ref _Handle.AsRef(_ComponentOffset.Value); } + private static readonly Lazy _RadCentCoreOffset = new(() => Schema.GetOffset(0x81F1ABBBFED9B635), LazyThreadSafetyMode.None); + public ref float RadCentCore { - get => ref _Handle.AsRef(Schema.GetOffset(0x81F1ABBBFED9B635)); + get => ref _Handle.AsRef(_RadCentCoreOffset.Value); } + private static readonly Lazy _RadPerPointOffset = new(() => Schema.GetOffset(0x81F1ABBBEA5B2E9B), LazyThreadSafetyMode.None); + public ref float RadPerPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x81F1ABBBEA5B2E9B)); + get => ref _Handle.AsRef(_RadPerPointOffset.Value); } + private static readonly Lazy _RadPerPointToOffset = new(() => Schema.GetOffset(0x81F1ABBB80529536), LazyThreadSafetyMode.None); + public ref float RadPerPointTo { - get => ref _Handle.AsRef(Schema.GetOffset(0x81F1ABBB80529536)); + get => ref _Handle.AsRef(_RadPerPointToOffset.Value); } + private static readonly Lazy _FpointAngleOffset = new(() => Schema.GetOffset(0x81F1ABBB762CD2A8), LazyThreadSafetyMode.None); + public ref float FpointAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0x81F1ABBB762CD2A8)); + get => ref _Handle.AsRef(_FpointAngleOffset.Value); } + private static readonly Lazy _FsizeOverallOffset = new(() => Schema.GetOffset(0x81F1ABBB0AF1CD99), LazyThreadSafetyMode.None); + public ref float FsizeOverall { - get => ref _Handle.AsRef(Schema.GetOffset(0x81F1ABBB0AF1CD99)); + get => ref _Handle.AsRef(_FsizeOverallOffset.Value); } + private static readonly Lazy _RadBiasOffset = new(() => Schema.GetOffset(0x81F1ABBB402F6151), LazyThreadSafetyMode.None); + public ref float RadBias { - get => ref _Handle.AsRef(Schema.GetOffset(0x81F1ABBB402F6151)); + get => ref _Handle.AsRef(_RadBiasOffset.Value); } + private static readonly Lazy _MinRadOffset = new(() => Schema.GetOffset(0x81F1ABBB5B44DED6), LazyThreadSafetyMode.None); + public ref float MinRad { - get => ref _Handle.AsRef(Schema.GetOffset(0x81F1ABBB5B44DED6)); + get => ref _Handle.AsRef(_MinRadOffset.Value); } + private static readonly Lazy _DistBiasOffset = new(() => Schema.GetOffset(0x81F1ABBB66C2666C), LazyThreadSafetyMode.None); + public ref float DistBias { - get => ref _Handle.AsRef(Schema.GetOffset(0x81F1ABBB66C2666C)); + get => ref _Handle.AsRef(_DistBiasOffset.Value); } + private static readonly Lazy _UseLocalCoordsOffset = new(() => Schema.GetOffset(0x81F1ABBB8AB11575), LazyThreadSafetyMode.None); + public ref bool UseLocalCoords { - get => ref _Handle.AsRef(Schema.GetOffset(0x81F1ABBB8AB11575)); + get => ref _Handle.AsRef(_UseLocalCoordsOffset.Value); } + private static readonly Lazy _UseWithContEmitOffset = new(() => Schema.GetOffset(0x81F1ABBB0A3190F7), LazyThreadSafetyMode.None); + public ref bool UseWithContEmit { - get => ref _Handle.AsRef(Schema.GetOffset(0x81F1ABBB0A3190F7)); + get => ref _Handle.AsRef(_UseWithContEmitOffset.Value); } + private static readonly Lazy _UseOrigRadiusOffset = new(() => Schema.GetOffset(0x81F1ABBB3FB513D3), LazyThreadSafetyMode.None); + public ref bool UseOrigRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x81F1ABBB3FB513D3)); + get => ref _Handle.AsRef(_UseOrigRadiusOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateSequentialPathImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateSequentialPathImpl.cs index db9a023b4..71213437a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateSequentialPathImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateSequentialPathImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_INIT_CreateSequentialPathImpl : CParticleFunctionInitia public C_INIT_CreateSequentialPathImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaxDistanceOffset = new(() => Schema.GetOffset(0xBCADEDE2844E396A), LazyThreadSafetyMode.None); + public ref float MaxDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xBCADEDE2844E396A)); + get => ref _Handle.AsRef(_MaxDistanceOffset.Value); } + private static readonly Lazy _NumToAssignOffset = new(() => Schema.GetOffset(0xBCADEDE2F73366BD), LazyThreadSafetyMode.None); + public ref float NumToAssign { - get => ref _Handle.AsRef(Schema.GetOffset(0xBCADEDE2F73366BD)); + get => ref _Handle.AsRef(_NumToAssignOffset.Value); } + private static readonly Lazy _LoopOffset = new(() => Schema.GetOffset(0xBCADEDE2C668A4CB), LazyThreadSafetyMode.None); + public ref bool Loop { - get => ref _Handle.AsRef(Schema.GetOffset(0xBCADEDE2C668A4CB)); + get => ref _Handle.AsRef(_LoopOffset.Value); } + private static readonly Lazy _CPPairsOffset = new(() => Schema.GetOffset(0xBCADEDE2A5D36D0F), LazyThreadSafetyMode.None); + public ref bool CPPairs { - get => ref _Handle.AsRef(Schema.GetOffset(0xBCADEDE2A5D36D0F)); + get => ref _Handle.AsRef(_CPPairsOffset.Value); } + private static readonly Lazy _SaveOffsetOffset = new(() => Schema.GetOffset(0xBCADEDE243F64E5B), LazyThreadSafetyMode.None); + public ref bool SaveOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xBCADEDE243F64E5B)); + get => ref _Handle.AsRef(_SaveOffsetOffset.Value); } + private static readonly Lazy _PathParamsOffset = new(() => Schema.GetOffset(0xBCADEDE23C10092C), LazyThreadSafetyMode.None); + public CPathParameters PathParams { - get => new CPathParametersImpl(_Handle + Schema.GetOffset(0xBCADEDE23C10092C)); + get => new CPathParametersImpl(_Handle + _PathParamsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateSequentialPathV2Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateSequentialPathV2Impl.cs index 8ba3cdc0f..31cd0a26a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateSequentialPathV2Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateSequentialPathV2Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_INIT_CreateSequentialPathV2Impl : CParticleFunctionInit public C_INIT_CreateSequentialPathV2Impl(nint handle) : base(handle) { } + private static readonly Lazy _MaxDistanceOffset = new(() => Schema.GetOffset(0xEC06632A844E396A), LazyThreadSafetyMode.None); + public CPerParticleFloatInput MaxDistance { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xEC06632A844E396A)); + get => new CPerParticleFloatInputImpl(_Handle + _MaxDistanceOffset.Value); } + private static readonly Lazy _NumToAssignOffset = new(() => Schema.GetOffset(0xEC06632AF73366BD), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput NumToAssign { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xEC06632AF73366BD)); + get => new CParticleCollectionFloatInputImpl(_Handle + _NumToAssignOffset.Value); } + private static readonly Lazy _LoopOffset = new(() => Schema.GetOffset(0xEC06632AC668A4CB), LazyThreadSafetyMode.None); + public ref bool Loop { - get => ref _Handle.AsRef(Schema.GetOffset(0xEC06632AC668A4CB)); + get => ref _Handle.AsRef(_LoopOffset.Value); } + private static readonly Lazy _CPPairsOffset = new(() => Schema.GetOffset(0xEC06632AA5D36D0F), LazyThreadSafetyMode.None); + public ref bool CPPairs { - get => ref _Handle.AsRef(Schema.GetOffset(0xEC06632AA5D36D0F)); + get => ref _Handle.AsRef(_CPPairsOffset.Value); } + private static readonly Lazy _SaveOffsetOffset = new(() => Schema.GetOffset(0xEC06632A43F64E5B), LazyThreadSafetyMode.None); + public ref bool SaveOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xEC06632A43F64E5B)); + get => ref _Handle.AsRef(_SaveOffsetOffset.Value); } + private static readonly Lazy _PathParamsOffset = new(() => Schema.GetOffset(0xEC06632A3C10092C), LazyThreadSafetyMode.None); + public CPathParameters PathParams { - get => new CPathParametersImpl(_Handle + Schema.GetOffset(0xEC06632A3C10092C)); + get => new CPathParametersImpl(_Handle + _PathParamsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateSpiralSphereImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateSpiralSphereImpl.cs index b7ee5bc0c..d40af9f34 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateSpiralSphereImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateSpiralSphereImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_INIT_CreateSpiralSphereImpl : CParticleFunctionInitiali public C_INIT_CreateSpiralSphereImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x97C2018A3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x97C2018A3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _OverrideCPOffset = new(() => Schema.GetOffset(0x97C2018ADD495162), LazyThreadSafetyMode.None); + public ref int OverrideCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x97C2018ADD495162)); + get => ref _Handle.AsRef(_OverrideCPOffset.Value); } + private static readonly Lazy _DensityOffset = new(() => Schema.GetOffset(0x97C2018AA65E630F), LazyThreadSafetyMode.None); + public ref int Density { - get => ref _Handle.AsRef(Schema.GetOffset(0x97C2018AA65E630F)); + get => ref _Handle.AsRef(_DensityOffset.Value); } + private static readonly Lazy _InitialRadiusOffset = new(() => Schema.GetOffset(0x97C2018A8B8AAB8B), LazyThreadSafetyMode.None); + public ref float InitialRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x97C2018A8B8AAB8B)); + get => ref _Handle.AsRef(_InitialRadiusOffset.Value); } + private static readonly Lazy _InitialSpeedMinOffset = new(() => Schema.GetOffset(0x97C2018AE36FD694), LazyThreadSafetyMode.None); + public ref float InitialSpeedMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x97C2018AE36FD694)); + get => ref _Handle.AsRef(_InitialSpeedMinOffset.Value); } + private static readonly Lazy _InitialSpeedMaxOffset = new(() => Schema.GetOffset(0x97C2018AD184D4F6), LazyThreadSafetyMode.None); + public ref float InitialSpeedMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x97C2018AD184D4F6)); + get => ref _Handle.AsRef(_InitialSpeedMaxOffset.Value); } + private static readonly Lazy _UseParticleCountOffset = new(() => Schema.GetOffset(0x97C2018AD4DA0515), LazyThreadSafetyMode.None); + public ref bool UseParticleCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x97C2018AD4DA0515)); + get => ref _Handle.AsRef(_UseParticleCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateWithinBoxImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateWithinBoxImpl.cs index faf7bdab9..b1385b861 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateWithinBoxImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateWithinBoxImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_INIT_CreateWithinBoxImpl : CParticleFunctionInitializer public C_INIT_CreateWithinBoxImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinOffset = new(() => Schema.GetOffset(0x331A2B22B0765F37), LazyThreadSafetyMode.None); + public CPerParticleVecInput Min { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x331A2B22B0765F37)); + get => new CPerParticleVecInputImpl(_Handle + _MinOffset.Value); } + private static readonly Lazy _MaxOffset = new(() => Schema.GetOffset(0x331A2B22BE89FCF9), LazyThreadSafetyMode.None); + public CPerParticleVecInput Max { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x331A2B22BE89FCF9)); + get => new CPerParticleVecInputImpl(_Handle + _MaxOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x331A2B223F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x331A2B223F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _LocalSpaceOffset = new(() => Schema.GetOffset(0x331A2B2262418E6E), LazyThreadSafetyMode.None); + public ref bool LocalSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x331A2B2262418E6E)); + get => ref _Handle.AsRef(_LocalSpaceOffset.Value); } + private static readonly Lazy _RandomnessParametersOffset = new(() => Schema.GetOffset(0x331A2B227EDF50AD), LazyThreadSafetyMode.None); + public CRandomNumberGeneratorParameters RandomnessParameters { - get => new CRandomNumberGeneratorParametersImpl(_Handle + Schema.GetOffset(0x331A2B227EDF50AD)); + get => new CRandomNumberGeneratorParametersImpl(_Handle + _RandomnessParametersOffset.Value); } + private static readonly Lazy _UseNewCodeOffset = new(() => Schema.GetOffset(0x331A2B227C6D1CDF), LazyThreadSafetyMode.None); + public ref bool UseNewCode { - get => ref _Handle.AsRef(Schema.GetOffset(0x331A2B227C6D1CDF)); + get => ref _Handle.AsRef(_UseNewCodeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateWithinCapsuleTransformImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateWithinCapsuleTransformImpl.cs index c5dd83453..5bab53d42 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateWithinCapsuleTransformImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateWithinCapsuleTransformImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class C_INIT_CreateWithinCapsuleTransformImpl : CParticleFuncti public C_INIT_CreateWithinCapsuleTransformImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusMinOffset = new(() => Schema.GetOffset(0xC088DBA85AD00941), LazyThreadSafetyMode.None); + public CPerParticleFloatInput RadiusMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xC088DBA85AD00941)); + get => new CPerParticleFloatInputImpl(_Handle + _RadiusMinOffset.Value); } + private static readonly Lazy _RadiusMaxOffset = new(() => Schema.GetOffset(0xC088DBA84CE37AEF), LazyThreadSafetyMode.None); + public CPerParticleFloatInput RadiusMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xC088DBA84CE37AEF)); + get => new CPerParticleFloatInputImpl(_Handle + _RadiusMaxOffset.Value); } + private static readonly Lazy _HeightOffset = new(() => Schema.GetOffset(0xC088DBA86631D40E), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Height { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xC088DBA86631D40E)); + get => new CPerParticleFloatInputImpl(_Handle + _HeightOffset.Value); } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0xC088DBA8B3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0xC088DBA8B3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _SpeedMinOffset = new(() => Schema.GetOffset(0xC088DBA8B989E1F8), LazyThreadSafetyMode.None); + public CPerParticleFloatInput SpeedMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xC088DBA8B989E1F8)); + get => new CPerParticleFloatInputImpl(_Handle + _SpeedMinOffset.Value); } + private static readonly Lazy _SpeedMaxOffset = new(() => Schema.GetOffset(0xC088DBA8CF9D8C52), LazyThreadSafetyMode.None); + public CPerParticleFloatInput SpeedMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xC088DBA8CF9D8C52)); + get => new CPerParticleFloatInputImpl(_Handle + _SpeedMaxOffset.Value); } + private static readonly Lazy _SpeedRandExpOffset = new(() => Schema.GetOffset(0xC088DBA83303A1AA), LazyThreadSafetyMode.None); + public ref float SpeedRandExp { - get => ref _Handle.AsRef(Schema.GetOffset(0xC088DBA83303A1AA)); + get => ref _Handle.AsRef(_SpeedRandExpOffset.Value); } + private static readonly Lazy _LocalCoordinateSystemSpeedMinOffset = new(() => Schema.GetOffset(0xC088DBA8A4A0F1AE), LazyThreadSafetyMode.None); + public CPerParticleVecInput LocalCoordinateSystemSpeedMin { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xC088DBA8A4A0F1AE)); + get => new CPerParticleVecInputImpl(_Handle + _LocalCoordinateSystemSpeedMinOffset.Value); } + private static readonly Lazy _LocalCoordinateSystemSpeedMaxOffset = new(() => Schema.GetOffset(0xC088DBA8968D53EC), LazyThreadSafetyMode.None); + public CPerParticleVecInput LocalCoordinateSystemSpeedMax { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xC088DBA8968D53EC)); + get => new CPerParticleVecInputImpl(_Handle + _LocalCoordinateSystemSpeedMaxOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xC088DBA8E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xC088DBA8E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _FieldVelocityOffset = new(() => Schema.GetOffset(0xC088DBA8852EBFAC), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldVelocity { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xC088DBA8852EBFAC)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldVelocityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateWithinSphereTransformImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateWithinSphereTransformImpl.cs index 57486c66c..11e368792 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateWithinSphereTransformImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreateWithinSphereTransformImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,70 @@ internal partial class C_INIT_CreateWithinSphereTransformImpl : CParticleFunctio public C_INIT_CreateWithinSphereTransformImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusMinOffset = new(() => Schema.GetOffset(0x97F9AC345AD00941), LazyThreadSafetyMode.None); + public CPerParticleFloatInput RadiusMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x97F9AC345AD00941)); + get => new CPerParticleFloatInputImpl(_Handle + _RadiusMinOffset.Value); } + private static readonly Lazy _RadiusMaxOffset = new(() => Schema.GetOffset(0x97F9AC344CE37AEF), LazyThreadSafetyMode.None); + public CPerParticleFloatInput RadiusMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x97F9AC344CE37AEF)); + get => new CPerParticleFloatInputImpl(_Handle + _RadiusMaxOffset.Value); } + private static readonly Lazy _DistanceBiasOffset = new(() => Schema.GetOffset(0x97F9AC34A7A33E17), LazyThreadSafetyMode.None); + public CPerParticleVecInput DistanceBias { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x97F9AC34A7A33E17)); + get => new CPerParticleVecInputImpl(_Handle + _DistanceBiasOffset.Value); } + private static readonly Lazy _DistanceBiasAbsOffset = new(() => Schema.GetOffset(0x97F9AC34FCBB3E09), LazyThreadSafetyMode.None); + public ref Vector DistanceBiasAbs { - get => ref _Handle.AsRef(Schema.GetOffset(0x97F9AC34FCBB3E09)); + get => ref _Handle.AsRef(_DistanceBiasAbsOffset.Value); } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0x97F9AC34B3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x97F9AC34B3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _SpeedMinOffset = new(() => Schema.GetOffset(0x97F9AC34B989E1F8), LazyThreadSafetyMode.None); + public CPerParticleFloatInput SpeedMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x97F9AC34B989E1F8)); + get => new CPerParticleFloatInputImpl(_Handle + _SpeedMinOffset.Value); } + private static readonly Lazy _SpeedMaxOffset = new(() => Schema.GetOffset(0x97F9AC34CF9D8C52), LazyThreadSafetyMode.None); + public CPerParticleFloatInput SpeedMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x97F9AC34CF9D8C52)); + get => new CPerParticleFloatInputImpl(_Handle + _SpeedMaxOffset.Value); } + private static readonly Lazy _SpeedRandExpOffset = new(() => Schema.GetOffset(0x97F9AC343303A1AA), LazyThreadSafetyMode.None); + public ref float SpeedRandExp { - get => ref _Handle.AsRef(Schema.GetOffset(0x97F9AC343303A1AA)); + get => ref _Handle.AsRef(_SpeedRandExpOffset.Value); } + private static readonly Lazy _LocalCoordsOffset = new(() => Schema.GetOffset(0x97F9AC3430E716DE), LazyThreadSafetyMode.None); + public ref bool LocalCoords { - get => ref _Handle.AsRef(Schema.GetOffset(0x97F9AC3430E716DE)); + get => ref _Handle.AsRef(_LocalCoordsOffset.Value); } + private static readonly Lazy _LocalCoordinateSystemSpeedMinOffset = new(() => Schema.GetOffset(0x97F9AC34A4A0F1AE), LazyThreadSafetyMode.None); + public CPerParticleVecInput LocalCoordinateSystemSpeedMin { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x97F9AC34A4A0F1AE)); + get => new CPerParticleVecInputImpl(_Handle + _LocalCoordinateSystemSpeedMinOffset.Value); } + private static readonly Lazy _LocalCoordinateSystemSpeedMaxOffset = new(() => Schema.GetOffset(0x97F9AC34968D53EC), LazyThreadSafetyMode.None); + public CPerParticleVecInput LocalCoordinateSystemSpeedMax { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x97F9AC34968D53EC)); + get => new CPerParticleVecInputImpl(_Handle + _LocalCoordinateSystemSpeedMaxOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x97F9AC34E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x97F9AC34E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _FieldVelocityOffset = new(() => Schema.GetOffset(0x97F9AC34852EBFAC), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldVelocity { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x97F9AC34852EBFAC)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldVelocityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreationNoiseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreationNoiseImpl.cs index 855679989..cf8d7b239 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreationNoiseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_CreationNoiseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class C_INIT_CreationNoiseImpl : CParticleFunctionInitializerIm public C_INIT_CreationNoiseImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x89BD0037E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x89BD0037E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _AbsValOffset = new(() => Schema.GetOffset(0x89BD0037AD2CCF0A), LazyThreadSafetyMode.None); + public ref bool AbsVal { - get => ref _Handle.AsRef(Schema.GetOffset(0x89BD0037AD2CCF0A)); + get => ref _Handle.AsRef(_AbsValOffset.Value); } + private static readonly Lazy _AbsValInvOffset = new(() => Schema.GetOffset(0x89BD0037024BCB79), LazyThreadSafetyMode.None); + public ref bool AbsValInv { - get => ref _Handle.AsRef(Schema.GetOffset(0x89BD0037024BCB79)); + get => ref _Handle.AsRef(_AbsValInvOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0x89BD00377F14BA34), LazyThreadSafetyMode.None); + public ref float Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0x89BD00377F14BA34)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x89BD00375F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x89BD00375F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x89BD003751A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x89BD003751A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _NoiseScaleOffset = new(() => Schema.GetOffset(0x89BD003732FE2EF3), LazyThreadSafetyMode.None); + public ref float NoiseScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x89BD003732FE2EF3)); + get => ref _Handle.AsRef(_NoiseScaleOffset.Value); } + private static readonly Lazy _NoiseScaleLocOffset = new(() => Schema.GetOffset(0x89BD0037A9F4B0DF), LazyThreadSafetyMode.None); + public ref float NoiseScaleLoc { - get => ref _Handle.AsRef(Schema.GetOffset(0x89BD0037A9F4B0DF)); + get => ref _Handle.AsRef(_NoiseScaleLocOffset.Value); } + private static readonly Lazy _OffsetLocOffset = new(() => Schema.GetOffset(0x89BD0037EFAB26AC), LazyThreadSafetyMode.None); + public ref Vector OffsetLoc { - get => ref _Handle.AsRef(Schema.GetOffset(0x89BD0037EFAB26AC)); + get => ref _Handle.AsRef(_OffsetLocOffset.Value); } + private static readonly Lazy _WorldTimeScaleOffset = new(() => Schema.GetOffset(0x89BD0037314F4986), LazyThreadSafetyMode.None); + public ref float WorldTimeScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x89BD0037314F4986)); + get => ref _Handle.AsRef(_WorldTimeScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_DistanceCullImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_DistanceCullImpl.cs index 1adb5e65b..38149589e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_DistanceCullImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_DistanceCullImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_INIT_DistanceCullImpl : CParticleFunctionInitializerImp public C_INIT_DistanceCullImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointOffset = new(() => Schema.GetOffset(0x78EE30C90D0DDF8C), LazyThreadSafetyMode.None); + public ref int ControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x78EE30C90D0DDF8C)); + get => ref _Handle.AsRef(_ControlPointOffset.Value); } + private static readonly Lazy _DistanceOffset = new(() => Schema.GetOffset(0x78EE30C900DC4A68), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Distance { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x78EE30C900DC4A68)); + get => new CParticleCollectionFloatInputImpl(_Handle + _DistanceOffset.Value); } + private static readonly Lazy _CullInsideOffset = new(() => Schema.GetOffset(0x78EE30C9293E00AD), LazyThreadSafetyMode.None); + public ref bool CullInside { - get => ref _Handle.AsRef(Schema.GetOffset(0x78EE30C9293E00AD)); + get => ref _Handle.AsRef(_CullInsideOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_DistanceToCPInitImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_DistanceToCPInitImpl.cs index 5db35e5ed..5437a50ce 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_DistanceToCPInitImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_DistanceToCPInitImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,54 +17,84 @@ internal partial class C_INIT_DistanceToCPInitImpl : CParticleFunctionInitialize public C_INIT_DistanceToCPInitImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x59C1B9D5E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x59C1B9D5E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x59C1B9D5E88A0D0F), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x59C1B9D5E88A0D0F)); + get => new CPerParticleFloatInputImpl(_Handle + _InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x59C1B9D5D6766901), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x59C1B9D5D6766901)); + get => new CPerParticleFloatInputImpl(_Handle + _InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x59C1B9D55F8D7716), LazyThreadSafetyMode.None); + public CPerParticleFloatInput OutputMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x59C1B9D55F8D7716)); + get => new CPerParticleFloatInputImpl(_Handle + _OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x59C1B9D551A0E8C4), LazyThreadSafetyMode.None); + public CPerParticleFloatInput OutputMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x59C1B9D551A0E8C4)); + get => new CPerParticleFloatInputImpl(_Handle + _OutputMaxOffset.Value); } + private static readonly Lazy _StartCPOffset = new(() => Schema.GetOffset(0x59C1B9D52C2FF970), LazyThreadSafetyMode.None); + public ref int StartCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x59C1B9D52C2FF970)); + get => ref _Handle.AsRef(_StartCPOffset.Value); } + private static readonly Lazy _LOSOffset = new(() => Schema.GetOffset(0x59C1B9D59C25C2ED), LazyThreadSafetyMode.None); + public ref bool LOS { - get => ref _Handle.AsRef(Schema.GetOffset(0x59C1B9D59C25C2ED)); + get => ref _Handle.AsRef(_LOSOffset.Value); } + private static readonly Lazy _CollisionGroupNameOffset = new(() => Schema.GetOffset(0x59C1B9D5D58A3195), LazyThreadSafetyMode.None); + public string CollisionGroupName { get { - var ptr = _Handle + Schema.GetOffset(0x59C1B9D5D58A3195); + var ptr = _Handle + _CollisionGroupNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x59C1B9D5D58A3195, value, 128); + set => Schema.SetFixedString(_Handle, _CollisionGroupNameOffset.Value, value, 128); } + private static readonly Lazy _TraceSetOffset = new(() => Schema.GetOffset(0x59C1B9D5BD26C5B2), LazyThreadSafetyMode.None); + public ref ParticleTraceSet_t TraceSet { - get => ref _Handle.AsRef(Schema.GetOffset(0x59C1B9D5BD26C5B2)); + get => ref _Handle.AsRef(_TraceSetOffset.Value); } + private static readonly Lazy _MaxTraceLengthOffset = new(() => Schema.GetOffset(0x59C1B9D5543C3798), LazyThreadSafetyMode.None); + public CPerParticleFloatInput MaxTraceLength { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x59C1B9D5543C3798)); + get => new CPerParticleFloatInputImpl(_Handle + _MaxTraceLengthOffset.Value); } + private static readonly Lazy _LOSScaleOffset = new(() => Schema.GetOffset(0x59C1B9D5259F6F3B), LazyThreadSafetyMode.None); + public ref float LOSScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x59C1B9D5259F6F3B)); + get => ref _Handle.AsRef(_LOSScaleOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x59C1B9D5FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x59C1B9D5FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _ActiveRangeOffset = new(() => Schema.GetOffset(0x59C1B9D53FA53B84), LazyThreadSafetyMode.None); + public ref bool ActiveRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x59C1B9D53FA53B84)); + get => ref _Handle.AsRef(_ActiveRangeOffset.Value); } + private static readonly Lazy _DistanceScaleOffset = new(() => Schema.GetOffset(0x59C1B9D5834BD798), LazyThreadSafetyMode.None); + public ref Vector DistanceScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x59C1B9D5834BD798)); + get => ref _Handle.AsRef(_DistanceScaleOffset.Value); } + private static readonly Lazy _RemapBiasOffset = new(() => Schema.GetOffset(0x59C1B9D5490D7325), LazyThreadSafetyMode.None); + public ref float RemapBias { - get => ref _Handle.AsRef(Schema.GetOffset(0x59C1B9D5490D7325)); + get => ref _Handle.AsRef(_RemapBiasOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_DistanceToNeighborCullImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_DistanceToNeighborCullImpl.cs index b11190039..1d4459ee1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_DistanceToNeighborCullImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_DistanceToNeighborCullImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_INIT_DistanceToNeighborCullImpl : CParticleFunctionInit public C_INIT_DistanceToNeighborCullImpl(nint handle) : base(handle) { } + private static readonly Lazy _DistanceOffset = new(() => Schema.GetOffset(0x9ADFD8BA00DC4A68), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Distance { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x9ADFD8BA00DC4A68)); + get => new CPerParticleFloatInputImpl(_Handle + _DistanceOffset.Value); } + private static readonly Lazy _IncludeRadiiOffset = new(() => Schema.GetOffset(0x9ADFD8BAC86BFED0), LazyThreadSafetyMode.None); + public ref bool IncludeRadii { - get => ref _Handle.AsRef(Schema.GetOffset(0x9ADFD8BAC86BFED0)); + get => ref _Handle.AsRef(_IncludeRadiiOffset.Value); } + private static readonly Lazy _LifespanOverlapOffset = new(() => Schema.GetOffset(0x9ADFD8BAB495428C), LazyThreadSafetyMode.None); + public CPerParticleFloatInput LifespanOverlap { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x9ADFD8BAB495428C)); + get => new CPerParticleFloatInputImpl(_Handle + _LifespanOverlapOffset.Value); } + private static readonly Lazy _FieldModifyOffset = new(() => Schema.GetOffset(0x9ADFD8BA7EAE1A51), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldModify { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x9ADFD8BA7EAE1A51)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldModifyOffset.Value); } + private static readonly Lazy _ModifyOffset = new(() => Schema.GetOffset(0x9ADFD8BA5C62D8D5), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Modify { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x9ADFD8BA5C62D8D5)); + get => new CPerParticleFloatInputImpl(_Handle + _ModifyOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x9ADFD8BAFB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x9ADFD8BAFB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _UseNeighborOffset = new(() => Schema.GetOffset(0x9ADFD8BAFBEB6DCE), LazyThreadSafetyMode.None); + public ref bool UseNeighbor { - get => ref _Handle.AsRef(Schema.GetOffset(0x9ADFD8BAFBEB6DCE)); + get => ref _Handle.AsRef(_UseNeighborOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_GlobalScaleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_GlobalScaleImpl.cs index 640d071bb..178871076 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_GlobalScaleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_GlobalScaleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_INIT_GlobalScaleImpl : CParticleFunctionInitializerImpl public C_INIT_GlobalScaleImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0xE0588671B731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0xE0588671B731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _ScaleControlPointNumberOffset = new(() => Schema.GetOffset(0xE05886719A649261), LazyThreadSafetyMode.None); + public ref int ScaleControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xE05886719A649261)); + get => ref _Handle.AsRef(_ScaleControlPointNumberOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0xE05886713F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xE05886713F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _ScaleRadiusOffset = new(() => Schema.GetOffset(0xE0588671714DF6EF), LazyThreadSafetyMode.None); + public ref bool ScaleRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xE0588671714DF6EF)); + get => ref _Handle.AsRef(_ScaleRadiusOffset.Value); } + private static readonly Lazy _ScalePositionOffset = new(() => Schema.GetOffset(0xE05886713AD08CD6), LazyThreadSafetyMode.None); + public ref bool ScalePosition { - get => ref _Handle.AsRef(Schema.GetOffset(0xE05886713AD08CD6)); + get => ref _Handle.AsRef(_ScalePositionOffset.Value); } + private static readonly Lazy _ScaleVelocityOffset = new(() => Schema.GetOffset(0xE058867117A59666), LazyThreadSafetyMode.None); + public ref bool ScaleVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xE058867117A59666)); + get => ref _Handle.AsRef(_ScaleVelocityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InheritFromParentParticlesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InheritFromParentParticlesImpl.cs index 3082e52cf..f22ca92f3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InheritFromParentParticlesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InheritFromParentParticlesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_INIT_InheritFromParentParticlesImpl : CParticleFunction public C_INIT_InheritFromParentParticlesImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0xF97C3548B731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0xF97C3548B731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xF97C3548E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xF97C3548E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _IncrementOffset = new(() => Schema.GetOffset(0xF97C35482359F182), LazyThreadSafetyMode.None); + public ref int Increment { - get => ref _Handle.AsRef(Schema.GetOffset(0xF97C35482359F182)); + get => ref _Handle.AsRef(_IncrementOffset.Value); } + private static readonly Lazy _RandomDistributionOffset = new(() => Schema.GetOffset(0xF97C3548830F6B38), LazyThreadSafetyMode.None); + public ref bool RandomDistribution { - get => ref _Handle.AsRef(Schema.GetOffset(0xF97C3548830F6B38)); + get => ref _Handle.AsRef(_RandomDistributionOffset.Value); } + private static readonly Lazy _RandomSeedOffset = new(() => Schema.GetOffset(0xF97C35486388F067), LazyThreadSafetyMode.None); + public ref int RandomSeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xF97C35486388F067)); + get => ref _Handle.AsRef(_RandomSeedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InheritVelocityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InheritVelocityImpl.cs index 5a1cec50d..c84d8ea72 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InheritVelocityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InheritVelocityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_INIT_InheritVelocityImpl : CParticleFunctionInitializer public C_INIT_InheritVelocityImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x227ECF463F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x227ECF463F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _VelocityScaleOffset = new(() => Schema.GetOffset(0x227ECF46E161DDAA), LazyThreadSafetyMode.None); + public ref float VelocityScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x227ECF46E161DDAA)); + get => ref _Handle.AsRef(_VelocityScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFloatCollectionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFloatCollectionImpl.cs index 3d3bd8207..e129781d5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFloatCollectionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFloatCollectionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_INIT_InitFloatCollectionImpl : CParticleFunctionInitial public C_INIT_InitFloatCollectionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueOffset = new(() => Schema.GetOffset(0x70773EFA34445438), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput InputValue { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x70773EFA34445438)); + get => new CParticleCollectionFloatInputImpl(_Handle + _InputValueOffset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0x70773EFA324F6F74), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t OutputField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x70773EFA324F6F74)); + get => new ParticleAttributeIndex_tImpl(_Handle + _OutputFieldOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFloatImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFloatImpl.cs index f49c14097..6a859bbc5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFloatImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFloatImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_INIT_InitFloatImpl : CParticleFunctionInitializerImpl, public C_INIT_InitFloatImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueOffset = new(() => Schema.GetOffset(0x6A1DAB2A34445438), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputValue { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x6A1DAB2A34445438)); + get => new CPerParticleFloatInputImpl(_Handle + _InputValueOffset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0x6A1DAB2A324F6F74), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t OutputField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x6A1DAB2A324F6F74)); + get => new ParticleAttributeIndex_tImpl(_Handle + _OutputFieldOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x6A1DAB2AFB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A1DAB2AFB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _InputStrengthOffset = new(() => Schema.GetOffset(0x6A1DAB2ABAC712FE), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputStrength { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x6A1DAB2ABAC712FE)); + get => new CPerParticleFloatInputImpl(_Handle + _InputStrengthOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFromCPSnapshotImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFromCPSnapshotImpl.cs index 3f228a954..7e7672917 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFromCPSnapshotImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFromCPSnapshotImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,42 +17,64 @@ internal partial class C_INIT_InitFromCPSnapshotImpl : CParticleFunctionInitiali public C_INIT_InitFromCPSnapshotImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x772EF71B3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x772EF71B3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _StrSnapshotSubsetOffset = new(() => Schema.GetOffset(0x772EF71BBD8A8E5E), LazyThreadSafetyMode.None); + public string StrSnapshotSubset { get { - var ptr = _Handle.Read(Schema.GetOffset(0x772EF71BBD8A8E5E)); + var ptr = _Handle.Read(_StrSnapshotSubsetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x772EF71BBD8A8E5E, value); + set => Schema.SetString(_Handle, _StrSnapshotSubsetOffset.Value, value); } + private static readonly Lazy _AttributeToReadOffset = new(() => Schema.GetOffset(0x772EF71BE0F61F9E), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t AttributeToRead { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x772EF71BE0F61F9E)); + get => new ParticleAttributeIndex_tImpl(_Handle + _AttributeToReadOffset.Value); } + private static readonly Lazy _AttributeToWriteOffset = new(() => Schema.GetOffset(0x772EF71B389A3CC1), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t AttributeToWrite { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x772EF71B389A3CC1)); + get => new ParticleAttributeIndex_tImpl(_Handle + _AttributeToWriteOffset.Value); } + private static readonly Lazy _LocalSpaceCPOffset = new(() => Schema.GetOffset(0x772EF71BC8E9CB31), LazyThreadSafetyMode.None); + public ref int LocalSpaceCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x772EF71BC8E9CB31)); + get => ref _Handle.AsRef(_LocalSpaceCPOffset.Value); } + private static readonly Lazy _RandomOffset = new(() => Schema.GetOffset(0x772EF71BD13B9DC2), LazyThreadSafetyMode.None); + public ref bool Random { - get => ref _Handle.AsRef(Schema.GetOffset(0x772EF71BD13B9DC2)); + get => ref _Handle.AsRef(_RandomOffset.Value); } + private static readonly Lazy _ReverseOffset = new(() => Schema.GetOffset(0x772EF71BEA4E22E5), LazyThreadSafetyMode.None); + public ref bool Reverse { - get => ref _Handle.AsRef(Schema.GetOffset(0x772EF71BEA4E22E5)); + get => ref _Handle.AsRef(_ReverseOffset.Value); } + private static readonly Lazy _SnapShotIncrementOffset = new(() => Schema.GetOffset(0x772EF71BC1AED602), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput SnapShotIncrement { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x772EF71BC1AED602)); + get => new CParticleCollectionFloatInputImpl(_Handle + _SnapShotIncrementOffset.Value); } + private static readonly Lazy _ManualSnapshotIndexOffset = new(() => Schema.GetOffset(0x772EF71BA02E904D), LazyThreadSafetyMode.None); + public CPerParticleFloatInput ManualSnapshotIndex { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x772EF71BA02E904D)); + get => new CPerParticleFloatInputImpl(_Handle + _ManualSnapshotIndexOffset.Value); } + private static readonly Lazy _RandomSeedOffset = new(() => Schema.GetOffset(0x772EF71B6388F067), LazyThreadSafetyMode.None); + public ref int RandomSeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x772EF71B6388F067)); + get => ref _Handle.AsRef(_RandomSeedOffset.Value); } + private static readonly Lazy _LocalSpaceAnglesOffset = new(() => Schema.GetOffset(0x772EF71BF571F352), LazyThreadSafetyMode.None); + public ref bool LocalSpaceAngles { - get => ref _Handle.AsRef(Schema.GetOffset(0x772EF71BF571F352)); + get => ref _Handle.AsRef(_LocalSpaceAnglesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFromParentKilledImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFromParentKilledImpl.cs index b7e35d457..ae1ac2f94 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFromParentKilledImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFromParentKilledImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_INIT_InitFromParentKilledImpl : CParticleFunctionInitia public C_INIT_InitFromParentKilledImpl(nint handle) : base(handle) { } + private static readonly Lazy _AttributeToCopyOffset = new(() => Schema.GetOffset(0x4CE3F9811953739B), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t AttributeToCopy { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x4CE3F9811953739B)); + get => new ParticleAttributeIndex_tImpl(_Handle + _AttributeToCopyOffset.Value); } + private static readonly Lazy _EventTypeOffset = new(() => Schema.GetOffset(0x4CE3F981E1F9AA93), LazyThreadSafetyMode.None); + public ref EventTypeSelection_t EventType { - get => ref _Handle.AsRef(Schema.GetOffset(0x4CE3F981E1F9AA93)); + get => ref _Handle.AsRef(_EventTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFromVectorFieldSnapshotImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFromVectorFieldSnapshotImpl.cs index 1dde257ef..e5d3a53bd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFromVectorFieldSnapshotImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitFromVectorFieldSnapshotImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_INIT_InitFromVectorFieldSnapshotImpl : CParticleFunctio public C_INIT_InitFromVectorFieldSnapshotImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x1F4AA8713F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x1F4AA8713F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _LocalSpaceCPOffset = new(() => Schema.GetOffset(0x1F4AA871C8E9CB31), LazyThreadSafetyMode.None); + public ref int LocalSpaceCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x1F4AA871C8E9CB31)); + get => ref _Handle.AsRef(_LocalSpaceCPOffset.Value); } + private static readonly Lazy _WeightUpdateCPOffset = new(() => Schema.GetOffset(0x1F4AA8712CCDE17F), LazyThreadSafetyMode.None); + public ref int WeightUpdateCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x1F4AA8712CCDE17F)); + get => ref _Handle.AsRef(_WeightUpdateCPOffset.Value); } + private static readonly Lazy _UseVerticalVelocityOffset = new(() => Schema.GetOffset(0x1F4AA8713C99C6FD), LazyThreadSafetyMode.None); + public ref bool UseVerticalVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0x1F4AA8713C99C6FD)); + get => ref _Handle.AsRef(_UseVerticalVelocityOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x1F4AA8715F596B51), LazyThreadSafetyMode.None); + public CPerParticleVecInput Scale { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x1F4AA8715F596B51)); + get => new CPerParticleVecInputImpl(_Handle + _ScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitSkinnedPositionFromCPSnapshotImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitSkinnedPositionFromCPSnapshotImpl.cs index 682f0574e..97f1c96d8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitSkinnedPositionFromCPSnapshotImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitSkinnedPositionFromCPSnapshotImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,62 +17,100 @@ internal partial class C_INIT_InitSkinnedPositionFromCPSnapshotImpl : CParticleF public C_INIT_InitSkinnedPositionFromCPSnapshotImpl(nint handle) : base(handle) { } + private static readonly Lazy _SnapshotControlPointNumberOffset = new(() => Schema.GetOffset(0xD1B6E41429D3EEDD), LazyThreadSafetyMode.None); + public ref int SnapshotControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1B6E41429D3EEDD)); + get => ref _Handle.AsRef(_SnapshotControlPointNumberOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0xD1B6E4143F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1B6E4143F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _RandomOffset = new(() => Schema.GetOffset(0xD1B6E414D13B9DC2), LazyThreadSafetyMode.None); + public ref bool Random { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1B6E414D13B9DC2)); + get => ref _Handle.AsRef(_RandomOffset.Value); } + private static readonly Lazy _RandomSeedOffset = new(() => Schema.GetOffset(0xD1B6E4146388F067), LazyThreadSafetyMode.None); + public ref int RandomSeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1B6E4146388F067)); + get => ref _Handle.AsRef(_RandomSeedOffset.Value); } + private static readonly Lazy _RigidOffset = new(() => Schema.GetOffset(0xD1B6E414F9ED9C8C), LazyThreadSafetyMode.None); + public ref bool Rigid { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1B6E414F9ED9C8C)); + get => ref _Handle.AsRef(_RigidOffset.Value); } + private static readonly Lazy _SetNormalOffset = new(() => Schema.GetOffset(0xD1B6E414542722AC), LazyThreadSafetyMode.None); + public ref bool SetNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1B6E414542722AC)); + get => ref _Handle.AsRef(_SetNormalOffset.Value); } + private static readonly Lazy _IgnoreDtOffset = new(() => Schema.GetOffset(0xD1B6E414330C0603), LazyThreadSafetyMode.None); + public ref bool IgnoreDt { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1B6E414330C0603)); + get => ref _Handle.AsRef(_IgnoreDtOffset.Value); } + private static readonly Lazy _MinNormalVelocityOffset = new(() => Schema.GetOffset(0xD1B6E414C1D5AB05), LazyThreadSafetyMode.None); + public ref float MinNormalVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1B6E414C1D5AB05)); + get => ref _Handle.AsRef(_MinNormalVelocityOffset.Value); } + private static readonly Lazy _MaxNormalVelocityOffset = new(() => Schema.GetOffset(0xD1B6E4147D5C16C3), LazyThreadSafetyMode.None); + public ref float MaxNormalVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1B6E4147D5C16C3)); + get => ref _Handle.AsRef(_MaxNormalVelocityOffset.Value); } + private static readonly Lazy _IndexTypeOffset = new(() => Schema.GetOffset(0xD1B6E414DEEB271F), LazyThreadSafetyMode.None); + public ref SnapshotIndexType_t IndexType { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1B6E414DEEB271F)); + get => ref _Handle.AsRef(_IndexTypeOffset.Value); } + private static readonly Lazy _ReadIndexOffset = new(() => Schema.GetOffset(0xD1B6E4147E9602C9), LazyThreadSafetyMode.None); + public CPerParticleFloatInput ReadIndex { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xD1B6E4147E9602C9)); + get => new CPerParticleFloatInputImpl(_Handle + _ReadIndexOffset.Value); } + private static readonly Lazy _IncrementOffset = new(() => Schema.GetOffset(0xD1B6E414B3721674), LazyThreadSafetyMode.None); + public ref float Increment { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1B6E414B3721674)); + get => ref _Handle.AsRef(_IncrementOffset.Value); } + private static readonly Lazy _FullLoopIncrementOffset = new(() => Schema.GetOffset(0xD1B6E414278D3497), LazyThreadSafetyMode.None); + public ref int FullLoopIncrement { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1B6E414278D3497)); + get => ref _Handle.AsRef(_FullLoopIncrementOffset.Value); } + private static readonly Lazy _SnapShotStartPointOffset = new(() => Schema.GetOffset(0xD1B6E414A7DF116B), LazyThreadSafetyMode.None); + public ref int SnapShotStartPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1B6E414A7DF116B)); + get => ref _Handle.AsRef(_SnapShotStartPointOffset.Value); } + private static readonly Lazy _BoneVelocityOffset = new(() => Schema.GetOffset(0xD1B6E414B06BD382), LazyThreadSafetyMode.None); + public ref float BoneVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1B6E414B06BD382)); + get => ref _Handle.AsRef(_BoneVelocityOffset.Value); } + private static readonly Lazy _BoneVelocityMaxOffset = new(() => Schema.GetOffset(0xD1B6E41434585F64), LazyThreadSafetyMode.None); + public ref float BoneVelocityMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1B6E41434585F64)); + get => ref _Handle.AsRef(_BoneVelocityMaxOffset.Value); } + private static readonly Lazy _CopyColorOffset = new(() => Schema.GetOffset(0xD1B6E41429F0EAEB), LazyThreadSafetyMode.None); + public ref bool CopyColor { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1B6E41429F0EAEB)); + get => ref _Handle.AsRef(_CopyColorOffset.Value); } + private static readonly Lazy _CopyAlphaOffset = new(() => Schema.GetOffset(0xD1B6E41443B2B278), LazyThreadSafetyMode.None); + public ref bool CopyAlpha { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1B6E41443B2B278)); + get => ref _Handle.AsRef(_CopyAlphaOffset.Value); } + private static readonly Lazy _SetRadiusOffset = new(() => Schema.GetOffset(0xD1B6E414918808D1), LazyThreadSafetyMode.None); + public ref bool SetRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1B6E414918808D1)); + get => ref _Handle.AsRef(_SetRadiusOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitVecCollectionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitVecCollectionImpl.cs index 665ecf9ce..dee2ffae7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitVecCollectionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitVecCollectionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_INIT_InitVecCollectionImpl : CParticleFunctionInitializ public C_INIT_InitVecCollectionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueOffset = new(() => Schema.GetOffset(0x2F5AD47234445438), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput InputValue { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x2F5AD47234445438)); + get => new CParticleCollectionVecInputImpl(_Handle + _InputValueOffset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0x2F5AD472324F6F74), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t OutputField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x2F5AD472324F6F74)); + get => new ParticleAttributeIndex_tImpl(_Handle + _OutputFieldOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitVecImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitVecImpl.cs index 6fd2c0fbd..65f6eb695 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitVecImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitVecImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_INIT_InitVecImpl : CParticleFunctionInitializerImpl, C_ public C_INIT_InitVecImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueOffset = new(() => Schema.GetOffset(0x60C95B0234445438), LazyThreadSafetyMode.None); + public CPerParticleVecInput InputValue { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x60C95B0234445438)); + get => new CPerParticleVecInputImpl(_Handle + _InputValueOffset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0x60C95B02324F6F74), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t OutputField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x60C95B02324F6F74)); + get => new ParticleAttributeIndex_tImpl(_Handle + _OutputFieldOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x60C95B02FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x60C95B02FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _NormalizedOutputOffset = new(() => Schema.GetOffset(0x60C95B020AA98C55), LazyThreadSafetyMode.None); + public ref bool NormalizedOutput { - get => ref _Handle.AsRef(Schema.GetOffset(0x60C95B020AA98C55)); + get => ref _Handle.AsRef(_NormalizedOutputOffset.Value); } + private static readonly Lazy _WritePreviousPositionOffset = new(() => Schema.GetOffset(0x60C95B02EA635776), LazyThreadSafetyMode.None); + public ref bool WritePreviousPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x60C95B02EA635776)); + get => ref _Handle.AsRef(_WritePreviousPositionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitialRepulsionVelocityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitialRepulsionVelocityImpl.cs index b41ec84ba..286b25d52 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitialRepulsionVelocityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitialRepulsionVelocityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,48 +17,74 @@ internal partial class C_INIT_InitialRepulsionVelocityImpl : CParticleFunctionIn public C_INIT_InitialRepulsionVelocityImpl(nint handle) : base(handle) { } + private static readonly Lazy _CollisionGroupNameOffset = new(() => Schema.GetOffset(0x562DB6BED58A3195), LazyThreadSafetyMode.None); + public string CollisionGroupName { get { - var ptr = _Handle + Schema.GetOffset(0x562DB6BED58A3195); + var ptr = _Handle + _CollisionGroupNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x562DB6BED58A3195, value, 128); + set => Schema.SetFixedString(_Handle, _CollisionGroupNameOffset.Value, value, 128); } + private static readonly Lazy _TraceSetOffset = new(() => Schema.GetOffset(0x562DB6BEBD26C5B2), LazyThreadSafetyMode.None); + public ref ParticleTraceSet_t TraceSet { - get => ref _Handle.AsRef(Schema.GetOffset(0x562DB6BEBD26C5B2)); + get => ref _Handle.AsRef(_TraceSetOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x562DB6BE2EFED678), LazyThreadSafetyMode.None); + public ref Vector OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x562DB6BE2EFED678)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x562DB6BE451280D2), LazyThreadSafetyMode.None); + public ref Vector OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x562DB6BE451280D2)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x562DB6BE3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x562DB6BE3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _PerParticleOffset = new(() => Schema.GetOffset(0x562DB6BE262A02D6), LazyThreadSafetyMode.None); + public ref bool PerParticle { - get => ref _Handle.AsRef(Schema.GetOffset(0x562DB6BE262A02D6)); + get => ref _Handle.AsRef(_PerParticleOffset.Value); } + private static readonly Lazy _TranslateOffset = new(() => Schema.GetOffset(0x562DB6BE3EBF32B5), LazyThreadSafetyMode.None); + public ref bool Translate { - get => ref _Handle.AsRef(Schema.GetOffset(0x562DB6BE3EBF32B5)); + get => ref _Handle.AsRef(_TranslateOffset.Value); } + private static readonly Lazy _ProportionalOffset = new(() => Schema.GetOffset(0x562DB6BE891F328A), LazyThreadSafetyMode.None); + public ref bool Proportional { - get => ref _Handle.AsRef(Schema.GetOffset(0x562DB6BE891F328A)); + get => ref _Handle.AsRef(_ProportionalOffset.Value); } + private static readonly Lazy _TraceLengthOffset = new(() => Schema.GetOffset(0x562DB6BEF5A5DE40), LazyThreadSafetyMode.None); + public ref float TraceLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x562DB6BEF5A5DE40)); + get => ref _Handle.AsRef(_TraceLengthOffset.Value); } + private static readonly Lazy _PerParticleTROffset = new(() => Schema.GetOffset(0x562DB6BE4B71761C), LazyThreadSafetyMode.None); + public ref bool PerParticleTR { - get => ref _Handle.AsRef(Schema.GetOffset(0x562DB6BE4B71761C)); + get => ref _Handle.AsRef(_PerParticleTROffset.Value); } + private static readonly Lazy _InheritOffset = new(() => Schema.GetOffset(0x562DB6BE286627C0), LazyThreadSafetyMode.None); + public ref bool Inherit { - get => ref _Handle.AsRef(Schema.GetOffset(0x562DB6BE286627C0)); + get => ref _Handle.AsRef(_InheritOffset.Value); } + private static readonly Lazy _ChildCPOffset = new(() => Schema.GetOffset(0x562DB6BE982ACC02), LazyThreadSafetyMode.None); + public ref int ChildCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x562DB6BE982ACC02)); + get => ref _Handle.AsRef(_ChildCPOffset.Value); } + private static readonly Lazy _ChildGroupIDOffset = new(() => Schema.GetOffset(0x562DB6BEE3F3C965), LazyThreadSafetyMode.None); + public ref int ChildGroupID { - get => ref _Handle.AsRef(Schema.GetOffset(0x562DB6BEE3F3C965)); + get => ref _Handle.AsRef(_ChildGroupIDOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitialSequenceFromModelImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitialSequenceFromModelImpl.cs index 9bf7b388f..96015419f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitialSequenceFromModelImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitialSequenceFromModelImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_INIT_InitialSequenceFromModelImpl : CParticleFunctionIn public C_INIT_InitialSequenceFromModelImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0xBA160A183F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xBA160A183F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xBA160A18E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xBA160A18E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _FieldOutputAnimOffset = new(() => Schema.GetOffset(0xBA160A1837BE767F), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutputAnim { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xBA160A1837BE767F)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputAnimOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0xBA160A18E88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xBA160A18E88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0xBA160A18D6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xBA160A18D6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0xBA160A185F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xBA160A185F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0xBA160A1851A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xBA160A1851A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0xBA160A18FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0xBA160A18FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitialVelocityFromHitboxImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitialVelocityFromHitboxImpl.cs index 2a5474ecc..29ecca7d2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitialVelocityFromHitboxImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitialVelocityFromHitboxImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class C_INIT_InitialVelocityFromHitboxImpl : CParticleFunctionI public C_INIT_InitialVelocityFromHitboxImpl(nint handle) : base(handle) { } + private static readonly Lazy _VelocityMinOffset = new(() => Schema.GetOffset(0x48F25F17FDB3D7E4), LazyThreadSafetyMode.None); + public ref float VelocityMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x48F25F17FDB3D7E4)); + get => ref _Handle.AsRef(_VelocityMinOffset.Value); } + private static readonly Lazy _VelocityMaxOffset = new(() => Schema.GetOffset(0x48F25F170BC775A6), LazyThreadSafetyMode.None); + public ref float VelocityMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x48F25F170BC775A6)); + get => ref _Handle.AsRef(_VelocityMaxOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x48F25F173F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x48F25F173F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _HitboxSetNameOffset = new(() => Schema.GetOffset(0x48F25F176A21BB0E), LazyThreadSafetyMode.None); + public string HitboxSetName { get { - var ptr = _Handle + Schema.GetOffset(0x48F25F176A21BB0E); + var ptr = _Handle + _HitboxSetNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x48F25F176A21BB0E, value, 128); + set => Schema.SetFixedString(_Handle, _HitboxSetNameOffset.Value, value, 128); } + private static readonly Lazy _UseBonesOffset = new(() => Schema.GetOffset(0x48F25F1710D1938B), LazyThreadSafetyMode.None); + public ref bool UseBones { - get => ref _Handle.AsRef(Schema.GetOffset(0x48F25F1710D1938B)); + get => ref _Handle.AsRef(_UseBonesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitialVelocityNoiseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitialVelocityNoiseImpl.cs index 418e51c4f..122a6bc03 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitialVelocityNoiseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_InitialVelocityNoiseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class C_INIT_InitialVelocityNoiseImpl : CParticleFunctionInitia public C_INIT_InitialVelocityNoiseImpl(nint handle) : base(handle) { } + private static readonly Lazy _AbsValOffset = new(() => Schema.GetOffset(0x4F8B7A615311700A), LazyThreadSafetyMode.None); + public ref Vector AbsVal { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F8B7A615311700A)); + get => ref _Handle.AsRef(_AbsValOffset.Value); } + private static readonly Lazy _AbsValInvOffset = new(() => Schema.GetOffset(0x4F8B7A611ED9F679), LazyThreadSafetyMode.None); + public ref Vector AbsValInv { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F8B7A611ED9F679)); + get => ref _Handle.AsRef(_AbsValInvOffset.Value); } + private static readonly Lazy _OffsetLocOffset = new(() => Schema.GetOffset(0x4F8B7A61EFAB26AC), LazyThreadSafetyMode.None); + public CPerParticleVecInput OffsetLoc { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x4F8B7A61EFAB26AC)); + get => new CPerParticleVecInputImpl(_Handle + _OffsetLocOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0x4F8B7A617F14BA34), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Offset { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x4F8B7A617F14BA34)); + get => new CPerParticleFloatInputImpl(_Handle + _OffsetOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x4F8B7A612EFED678), LazyThreadSafetyMode.None); + public CPerParticleVecInput OutputMin { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x4F8B7A612EFED678)); + get => new CPerParticleVecInputImpl(_Handle + _OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x4F8B7A61451280D2), LazyThreadSafetyMode.None); + public CPerParticleVecInput OutputMax { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x4F8B7A61451280D2)); + get => new CPerParticleVecInputImpl(_Handle + _OutputMaxOffset.Value); } + private static readonly Lazy _NoiseScaleOffset = new(() => Schema.GetOffset(0x4F8B7A6132FE2EF3), LazyThreadSafetyMode.None); + public CPerParticleFloatInput NoiseScale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x4F8B7A6132FE2EF3)); + get => new CPerParticleFloatInputImpl(_Handle + _NoiseScaleOffset.Value); } + private static readonly Lazy _NoiseScaleLocOffset = new(() => Schema.GetOffset(0x4F8B7A61A9F4B0DF), LazyThreadSafetyMode.None); + public CPerParticleFloatInput NoiseScaleLoc { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x4F8B7A61A9F4B0DF)); + get => new CPerParticleFloatInputImpl(_Handle + _NoiseScaleLocOffset.Value); } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0x4F8B7A61B3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x4F8B7A61B3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _IgnoreDtOffset = new(() => Schema.GetOffset(0x4F8B7A61330C0603), LazyThreadSafetyMode.None); + public ref bool IgnoreDt { - get => ref _Handle.AsRef(Schema.GetOffset(0x4F8B7A61330C0603)); + get => ref _Handle.AsRef(_IgnoreDtOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_LifespanFromVelocityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_LifespanFromVelocityImpl.cs index 9170e83b7..9d196c947 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_LifespanFromVelocityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_LifespanFromVelocityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,33 +17,49 @@ internal partial class C_INIT_LifespanFromVelocityImpl : CParticleFunctionInitia public C_INIT_LifespanFromVelocityImpl(nint handle) : base(handle) { } + private static readonly Lazy _ComponentScaleOffset = new(() => Schema.GetOffset(0x50DB3853B17954E2), LazyThreadSafetyMode.None); + public ref Vector ComponentScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x50DB3853B17954E2)); + get => ref _Handle.AsRef(_ComponentScaleOffset.Value); } + private static readonly Lazy _TraceOffsetOffset = new(() => Schema.GetOffset(0x50DB38537EF6C397), LazyThreadSafetyMode.None); + public ref float TraceOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x50DB38537EF6C397)); + get => ref _Handle.AsRef(_TraceOffsetOffset.Value); } + private static readonly Lazy _MaxTraceLengthOffset = new(() => Schema.GetOffset(0x50DB3853543C3798), LazyThreadSafetyMode.None); + public ref float MaxTraceLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x50DB3853543C3798)); + get => ref _Handle.AsRef(_MaxTraceLengthOffset.Value); } + private static readonly Lazy _TraceToleranceOffset = new(() => Schema.GetOffset(0x50DB38538AA4F663), LazyThreadSafetyMode.None); + public ref float TraceTolerance { - get => ref _Handle.AsRef(Schema.GetOffset(0x50DB38538AA4F663)); + get => ref _Handle.AsRef(_TraceToleranceOffset.Value); } + private static readonly Lazy _MaxPlanesOffset = new(() => Schema.GetOffset(0x50DB3853ADB06362), LazyThreadSafetyMode.None); + public ref int MaxPlanes { - get => ref _Handle.AsRef(Schema.GetOffset(0x50DB3853ADB06362)); + get => ref _Handle.AsRef(_MaxPlanesOffset.Value); } + private static readonly Lazy _CollisionGroupNameOffset = new(() => Schema.GetOffset(0x50DB3853D58A3195), LazyThreadSafetyMode.None); + public string CollisionGroupName { get { - var ptr = _Handle + Schema.GetOffset(0x50DB3853D58A3195); + var ptr = _Handle + _CollisionGroupNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x50DB3853D58A3195, value, 128); + set => Schema.SetFixedString(_Handle, _CollisionGroupNameOffset.Value, value, 128); } + private static readonly Lazy _TraceSetOffset = new(() => Schema.GetOffset(0x50DB3853BD26C5B2), LazyThreadSafetyMode.None); + public ref ParticleTraceSet_t TraceSet { - get => ref _Handle.AsRef(Schema.GetOffset(0x50DB3853BD26C5B2)); + get => ref _Handle.AsRef(_TraceSetOffset.Value); } + private static readonly Lazy _IncludeWaterOffset = new(() => Schema.GetOffset(0x50DB3853EB8D4646), LazyThreadSafetyMode.None); + public ref bool IncludeWater { - get => ref _Handle.AsRef(Schema.GetOffset(0x50DB3853EB8D4646)); + get => ref _Handle.AsRef(_IncludeWaterOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ModelCullImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ModelCullImpl.cs index 14be144f5..52eafc234 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ModelCullImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ModelCullImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class C_INIT_ModelCullImpl : CParticleFunctionInitializerImpl, public C_INIT_ModelCullImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0xE9ECCC6B3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xE9ECCC6B3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _BoundBoxOffset = new(() => Schema.GetOffset(0xE9ECCC6BAB65CDDC), LazyThreadSafetyMode.None); + public ref bool BoundBox { - get => ref _Handle.AsRef(Schema.GetOffset(0xE9ECCC6BAB65CDDC)); + get => ref _Handle.AsRef(_BoundBoxOffset.Value); } + private static readonly Lazy _CullOutsideOffset = new(() => Schema.GetOffset(0xE9ECCC6BA6EF9E04), LazyThreadSafetyMode.None); + public ref bool CullOutside { - get => ref _Handle.AsRef(Schema.GetOffset(0xE9ECCC6BA6EF9E04)); + get => ref _Handle.AsRef(_CullOutsideOffset.Value); } + private static readonly Lazy _UseBonesOffset = new(() => Schema.GetOffset(0xE9ECCC6B10D1938B), LazyThreadSafetyMode.None); + public ref bool UseBones { - get => ref _Handle.AsRef(Schema.GetOffset(0xE9ECCC6B10D1938B)); + get => ref _Handle.AsRef(_UseBonesOffset.Value); } + private static readonly Lazy _HitboxSetNameOffset = new(() => Schema.GetOffset(0xE9ECCC6B6A21BB0E), LazyThreadSafetyMode.None); + public string HitboxSetName { get { - var ptr = _Handle + Schema.GetOffset(0xE9ECCC6B6A21BB0E); + var ptr = _Handle + _HitboxSetNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xE9ECCC6B6A21BB0E, value, 128); + set => Schema.SetFixedString(_Handle, _HitboxSetNameOffset.Value, value, 128); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_MoveBetweenPointsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_MoveBetweenPointsImpl.cs index c67e3018e..aebe43ad9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_MoveBetweenPointsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_MoveBetweenPointsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_INIT_MoveBetweenPointsImpl : CParticleFunctionInitializ public C_INIT_MoveBetweenPointsImpl(nint handle) : base(handle) { } + private static readonly Lazy _SpeedMinOffset = new(() => Schema.GetOffset(0xE2F19642B52776BE), LazyThreadSafetyMode.None); + public CPerParticleFloatInput SpeedMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xE2F19642B52776BE)); + get => new CPerParticleFloatInputImpl(_Handle + _SpeedMinOffset.Value); } + private static readonly Lazy _SpeedMaxOffset = new(() => Schema.GetOffset(0xE2F19642C7140B5C), LazyThreadSafetyMode.None); + public CPerParticleFloatInput SpeedMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xE2F19642C7140B5C)); + get => new CPerParticleFloatInputImpl(_Handle + _SpeedMaxOffset.Value); } + private static readonly Lazy _EndSpreadOffset = new(() => Schema.GetOffset(0xE2F196423D9143DB), LazyThreadSafetyMode.None); + public CPerParticleFloatInput EndSpread { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xE2F196423D9143DB)); + get => new CPerParticleFloatInputImpl(_Handle + _EndSpreadOffset.Value); } + private static readonly Lazy _StartOffsetOffset = new(() => Schema.GetOffset(0xE2F1964269A449AA), LazyThreadSafetyMode.None); + public CPerParticleFloatInput StartOffset { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xE2F1964269A449AA)); + get => new CPerParticleFloatInputImpl(_Handle + _StartOffsetOffset.Value); } + private static readonly Lazy _EndOffsetOffset = new(() => Schema.GetOffset(0xE2F19642C863E027), LazyThreadSafetyMode.None); + public CPerParticleFloatInput EndOffset { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xE2F19642C863E027)); + get => new CPerParticleFloatInputImpl(_Handle + _EndOffsetOffset.Value); } + private static readonly Lazy _EndControlPointNumberOffset = new(() => Schema.GetOffset(0xE2F19642A9FAEC22), LazyThreadSafetyMode.None); + public ref int EndControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xE2F19642A9FAEC22)); + get => ref _Handle.AsRef(_EndControlPointNumberOffset.Value); } + private static readonly Lazy _TrailBiasOffset = new(() => Schema.GetOffset(0xE2F1964294C9A26A), LazyThreadSafetyMode.None); + public ref bool TrailBias { - get => ref _Handle.AsRef(Schema.GetOffset(0xE2F1964294C9A26A)); + get => ref _Handle.AsRef(_TrailBiasOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_NormalAlignToCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_NormalAlignToCPImpl.cs index 22161f3d5..d6613fe28 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_NormalAlignToCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_NormalAlignToCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_INIT_NormalAlignToCPImpl : CParticleFunctionInitializer public C_INIT_NormalAlignToCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0xFA0441643A9ED669), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0xFA0441643A9ED669)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _ControlPointAxisOffset = new(() => Schema.GetOffset(0xFA04416471763CFD), LazyThreadSafetyMode.None); + public ref ParticleControlPointAxis_t ControlPointAxis { - get => ref _Handle.AsRef(Schema.GetOffset(0xFA04416471763CFD)); + get => ref _Handle.AsRef(_ControlPointAxisOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_NormalOffsetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_NormalOffsetImpl.cs index ee22d539d..7c1d39b28 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_NormalOffsetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_NormalOffsetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_INIT_NormalOffsetImpl : CParticleFunctionInitializerImp public C_INIT_NormalOffsetImpl(nint handle) : base(handle) { } + private static readonly Lazy _OffsetMinOffset = new(() => Schema.GetOffset(0x79E80AD67E1ECBDE), LazyThreadSafetyMode.None); + public ref Vector OffsetMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x79E80AD67E1ECBDE)); + get => ref _Handle.AsRef(_OffsetMinOffset.Value); } + private static readonly Lazy _OffsetMaxOffset = new(() => Schema.GetOffset(0x79E80AD69009CD7C), LazyThreadSafetyMode.None); + public ref Vector OffsetMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x79E80AD69009CD7C)); + get => ref _Handle.AsRef(_OffsetMaxOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x79E80AD63F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x79E80AD63F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _LocalCoordsOffset = new(() => Schema.GetOffset(0x79E80AD630E716DE), LazyThreadSafetyMode.None); + public ref bool LocalCoords { - get => ref _Handle.AsRef(Schema.GetOffset(0x79E80AD630E716DE)); + get => ref _Handle.AsRef(_LocalCoordsOffset.Value); } + private static readonly Lazy _NormalizeOffset = new(() => Schema.GetOffset(0x79E80AD648BC424C), LazyThreadSafetyMode.None); + public ref bool Normalize { - get => ref _Handle.AsRef(Schema.GetOffset(0x79E80AD648BC424C)); + get => ref _Handle.AsRef(_NormalizeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_OffsetVectorToVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_OffsetVectorToVectorImpl.cs index 6a1fc3d7c..d9e73791a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_OffsetVectorToVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_OffsetVectorToVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_INIT_OffsetVectorToVectorImpl : CParticleFunctionInitia public C_INIT_OffsetVectorToVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldInputOffset = new(() => Schema.GetOffset(0x36502BDCAE775669), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x36502BDCAE775669)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x36502BDCE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x36502BDCE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x36502BDC2EFED678), LazyThreadSafetyMode.None); + public ref Vector OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x36502BDC2EFED678)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x36502BDC451280D2), LazyThreadSafetyMode.None); + public ref Vector OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x36502BDC451280D2)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _RandomnessParametersOffset = new(() => Schema.GetOffset(0x36502BDC7EDF50AD), LazyThreadSafetyMode.None); + public CRandomNumberGeneratorParameters RandomnessParameters { - get => new CRandomNumberGeneratorParametersImpl(_Handle + Schema.GetOffset(0x36502BDC7EDF50AD)); + get => new CRandomNumberGeneratorParametersImpl(_Handle + _RandomnessParametersOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_Orient2DRelToCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_Orient2DRelToCPImpl.cs index 439333722..99c9b34cc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_Orient2DRelToCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_Orient2DRelToCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_INIT_Orient2DRelToCPImpl : CParticleFunctionInitializer public C_INIT_Orient2DRelToCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPOffset = new(() => Schema.GetOffset(0x4B55AD02EB661472), LazyThreadSafetyMode.None); + public ref int CP { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B55AD02EB661472)); + get => ref _Handle.AsRef(_CPOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x4B55AD02E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x4B55AD02E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _RotOffsetOffset = new(() => Schema.GetOffset(0x4B55AD02D1EA9CDF), LazyThreadSafetyMode.None); + public ref float RotOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B55AD02D1EA9CDF)); + get => ref _Handle.AsRef(_RotOffsetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PlaneCullImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PlaneCullImpl.cs index 73e5ad0fe..976224ebf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PlaneCullImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PlaneCullImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_INIT_PlaneCullImpl : CParticleFunctionInitializerImpl, public C_INIT_PlaneCullImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointOffset = new(() => Schema.GetOffset(0xCFA7A1100D0DDF8C), LazyThreadSafetyMode.None); + public ref int ControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xCFA7A1100D0DDF8C)); + get => ref _Handle.AsRef(_ControlPointOffset.Value); } + private static readonly Lazy _DistanceOffset = new(() => Schema.GetOffset(0xCFA7A11000DC4A68), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Distance { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xCFA7A11000DC4A68)); + get => new CParticleCollectionFloatInputImpl(_Handle + _DistanceOffset.Value); } + private static readonly Lazy _CullInsideOffset = new(() => Schema.GetOffset(0xCFA7A110293E00AD), LazyThreadSafetyMode.None); + public ref bool CullInside { - get => ref _Handle.AsRef(Schema.GetOffset(0xCFA7A110293E00AD)); + get => ref _Handle.AsRef(_CullInsideOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PointListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PointListImpl.cs index 332ce2749..dbd84bf51 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PointListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PointListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_INIT_PointListImpl : CParticleFunctionInitializerImpl, public C_INIT_PointListImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x5E193E54E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x5E193E54E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _PointListOffset = new(() => Schema.GetOffset(0x5E193E54976AB4FD), LazyThreadSafetyMode.None); + public ref CUtlVector PointList { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5E193E54976AB4FD)); + get => ref _Handle.AsRef>(_PointListOffset.Value); } + private static readonly Lazy _PlaceAlongPathOffset = new(() => Schema.GetOffset(0x5E193E5481CF2E1A), LazyThreadSafetyMode.None); + public ref bool PlaceAlongPath { - get => ref _Handle.AsRef(Schema.GetOffset(0x5E193E5481CF2E1A)); + get => ref _Handle.AsRef(_PlaceAlongPathOffset.Value); } + private static readonly Lazy _ClosedLoopOffset = new(() => Schema.GetOffset(0x5E193E547C20D1AB), LazyThreadSafetyMode.None); + public ref bool ClosedLoop { - get => ref _Handle.AsRef(Schema.GetOffset(0x5E193E547C20D1AB)); + get => ref _Handle.AsRef(_ClosedLoopOffset.Value); } + private static readonly Lazy _NumPointsAlongPathOffset = new(() => Schema.GetOffset(0x5E193E54ACB5FC8A), LazyThreadSafetyMode.None); + public ref int NumPointsAlongPath { - get => ref _Handle.AsRef(Schema.GetOffset(0x5E193E54ACB5FC8A)); + get => ref _Handle.AsRef(_NumPointsAlongPathOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionOffsetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionOffsetImpl.cs index c87d47463..9dd093064 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionOffsetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionOffsetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_INIT_PositionOffsetImpl : CParticleFunctionInitializerI public C_INIT_PositionOffsetImpl(nint handle) : base(handle) { } + private static readonly Lazy _OffsetMinOffset = new(() => Schema.GetOffset(0x263FD76A7E1ECBDE), LazyThreadSafetyMode.None); + public CPerParticleVecInput OffsetMin { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x263FD76A7E1ECBDE)); + get => new CPerParticleVecInputImpl(_Handle + _OffsetMinOffset.Value); } + private static readonly Lazy _OffsetMaxOffset = new(() => Schema.GetOffset(0x263FD76A9009CD7C), LazyThreadSafetyMode.None); + public CPerParticleVecInput OffsetMax { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x263FD76A9009CD7C)); + get => new CPerParticleVecInputImpl(_Handle + _OffsetMaxOffset.Value); } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0x263FD76AB3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x263FD76AB3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _LocalCoordsOffset = new(() => Schema.GetOffset(0x263FD76A30E716DE), LazyThreadSafetyMode.None); + public ref bool LocalCoords { - get => ref _Handle.AsRef(Schema.GetOffset(0x263FD76A30E716DE)); + get => ref _Handle.AsRef(_LocalCoordsOffset.Value); } + private static readonly Lazy _ProportionalOffset = new(() => Schema.GetOffset(0x263FD76A891F328A), LazyThreadSafetyMode.None); + public ref bool Proportional { - get => ref _Handle.AsRef(Schema.GetOffset(0x263FD76A891F328A)); + get => ref _Handle.AsRef(_ProportionalOffset.Value); } + private static readonly Lazy _RandomnessParametersOffset = new(() => Schema.GetOffset(0x263FD76A7EDF50AD), LazyThreadSafetyMode.None); + public CRandomNumberGeneratorParameters RandomnessParameters { - get => new CRandomNumberGeneratorParametersImpl(_Handle + Schema.GetOffset(0x263FD76A7EDF50AD)); + get => new CRandomNumberGeneratorParametersImpl(_Handle + _RandomnessParametersOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionOffsetToCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionOffsetToCPImpl.cs index fcafc7509..d56671650 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionOffsetToCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionOffsetToCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_INIT_PositionOffsetToCPImpl : CParticleFunctionInitiali public C_INIT_PositionOffsetToCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberStartOffset = new(() => Schema.GetOffset(0x5976F1BC33DBA947), LazyThreadSafetyMode.None); + public ref int ControlPointNumberStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x5976F1BC33DBA947)); + get => ref _Handle.AsRef(_ControlPointNumberStartOffset.Value); } + private static readonly Lazy _ControlPointNumberEndOffset = new(() => Schema.GetOffset(0x5976F1BC6527E5A2), LazyThreadSafetyMode.None); + public ref int ControlPointNumberEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x5976F1BC6527E5A2)); + get => ref _Handle.AsRef(_ControlPointNumberEndOffset.Value); } + private static readonly Lazy _LocalCoordsOffset = new(() => Schema.GetOffset(0x5976F1BC30E716DE), LazyThreadSafetyMode.None); + public ref bool LocalCoords { - get => ref _Handle.AsRef(Schema.GetOffset(0x5976F1BC30E716DE)); + get => ref _Handle.AsRef(_LocalCoordsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionPlaceOnGroundImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionPlaceOnGroundImpl.cs index 469b7aba9..fa398eb15 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionPlaceOnGroundImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionPlaceOnGroundImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,54 +17,84 @@ internal partial class C_INIT_PositionPlaceOnGroundImpl : CParticleFunctionIniti public C_INIT_PositionPlaceOnGroundImpl(nint handle) : base(handle) { } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0xA022821E7F14BA34), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Offset { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xA022821E7F14BA34)); + get => new CPerParticleFloatInputImpl(_Handle + _OffsetOffset.Value); } + private static readonly Lazy _MaxTraceLengthOffset = new(() => Schema.GetOffset(0xA022821E543C3798), LazyThreadSafetyMode.None); + public CPerParticleFloatInput MaxTraceLength { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xA022821E543C3798)); + get => new CPerParticleFloatInputImpl(_Handle + _MaxTraceLengthOffset.Value); } + private static readonly Lazy _CollisionGroupNameOffset = new(() => Schema.GetOffset(0xA022821ED58A3195), LazyThreadSafetyMode.None); + public string CollisionGroupName { get { - var ptr = _Handle + Schema.GetOffset(0xA022821ED58A3195); + var ptr = _Handle + _CollisionGroupNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xA022821ED58A3195, value, 128); + set => Schema.SetFixedString(_Handle, _CollisionGroupNameOffset.Value, value, 128); } + private static readonly Lazy _TraceSetOffset = new(() => Schema.GetOffset(0xA022821EBD26C5B2), LazyThreadSafetyMode.None); + public ref ParticleTraceSet_t TraceSet { - get => ref _Handle.AsRef(Schema.GetOffset(0xA022821EBD26C5B2)); + get => ref _Handle.AsRef(_TraceSetOffset.Value); } + private static readonly Lazy _TraceMissBehaviorOffset = new(() => Schema.GetOffset(0xA022821E1F2C7BCC), LazyThreadSafetyMode.None); + public ref ParticleTraceMissBehavior_t TraceMissBehavior { - get => ref _Handle.AsRef(Schema.GetOffset(0xA022821E1F2C7BCC)); + get => ref _Handle.AsRef(_TraceMissBehaviorOffset.Value); } + private static readonly Lazy _IncludeWaterOffset = new(() => Schema.GetOffset(0xA022821EEB8D4646), LazyThreadSafetyMode.None); + public ref bool IncludeWater { - get => ref _Handle.AsRef(Schema.GetOffset(0xA022821EEB8D4646)); + get => ref _Handle.AsRef(_IncludeWaterOffset.Value); } + private static readonly Lazy _SetNormalOffset = new(() => Schema.GetOffset(0xA022821E542722AC), LazyThreadSafetyMode.None); + public ref bool SetNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0xA022821E542722AC)); + get => ref _Handle.AsRef(_SetNormalOffset.Value); } + private static readonly Lazy _AttributeOffset = new(() => Schema.GetOffset(0xA022821E7FE8DE0B), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t Attribute { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xA022821E7FE8DE0B)); + get => new ParticleAttributeIndex_tImpl(_Handle + _AttributeOffset.Value); } + private static readonly Lazy _SetPXYZOnlyOffset = new(() => Schema.GetOffset(0xA022821E93ED3336), LazyThreadSafetyMode.None); + public ref bool SetPXYZOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0xA022821E93ED3336)); + get => ref _Handle.AsRef(_SetPXYZOnlyOffset.Value); } + private static readonly Lazy _TraceAlongNormalOffset = new(() => Schema.GetOffset(0xA022821EF6E20144), LazyThreadSafetyMode.None); + public ref bool TraceAlongNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0xA022821EF6E20144)); + get => ref _Handle.AsRef(_TraceAlongNormalOffset.Value); } + private static readonly Lazy _TraceDirectionAttributeOffset = new(() => Schema.GetOffset(0xA022821E00E7482D), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t TraceDirectionAttribute { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xA022821E00E7482D)); + get => new ParticleAttributeIndex_tImpl(_Handle + _TraceDirectionAttributeOffset.Value); } + private static readonly Lazy _OffsetonColOnlyOffset = new(() => Schema.GetOffset(0xA022821E0720D19D), LazyThreadSafetyMode.None); + public ref bool OffsetonColOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0xA022821E0720D19D)); + get => ref _Handle.AsRef(_OffsetonColOnlyOffset.Value); } + private static readonly Lazy _OffsetByRadiusFactorOffset = new(() => Schema.GetOffset(0xA022821E61169F50), LazyThreadSafetyMode.None); + public ref float OffsetByRadiusFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0xA022821E61169F50)); + get => ref _Handle.AsRef(_OffsetByRadiusFactorOffset.Value); } + private static readonly Lazy _PreserveOffsetCPOffset = new(() => Schema.GetOffset(0xA022821E58AC51C1), LazyThreadSafetyMode.None); + public ref int PreserveOffsetCP { - get => ref _Handle.AsRef(Schema.GetOffset(0xA022821E58AC51C1)); + get => ref _Handle.AsRef(_PreserveOffsetCPOffset.Value); } + private static readonly Lazy _IgnoreCPOffset = new(() => Schema.GetOffset(0xA022821EF0DDC7AC), LazyThreadSafetyMode.None); + public ref int IgnoreCP { - get => ref _Handle.AsRef(Schema.GetOffset(0xA022821EF0DDC7AC)); + get => ref _Handle.AsRef(_IgnoreCPOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionWarpImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionWarpImpl.cs index 56a089f13..06ec4cfcc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionWarpImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionWarpImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class C_INIT_PositionWarpImpl : CParticleFunctionInitializerImp public C_INIT_PositionWarpImpl(nint handle) : base(handle) { } + private static readonly Lazy _WarpMinOffset = new(() => Schema.GetOffset(0x15BDD34F1B8A7F09), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput WarpMin { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x15BDD34F1B8A7F09)); + get => new CParticleCollectionVecInputImpl(_Handle + _WarpMinOffset.Value); } + private static readonly Lazy _WarpMaxOffset = new(() => Schema.GetOffset(0x15BDD34F0D76E147), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput WarpMax { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x15BDD34F0D76E147)); + get => new CParticleCollectionVecInputImpl(_Handle + _WarpMaxOffset.Value); } + private static readonly Lazy _ScaleControlPointNumberOffset = new(() => Schema.GetOffset(0x15BDD34F9A649261), LazyThreadSafetyMode.None); + public ref int ScaleControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x15BDD34F9A649261)); + get => ref _Handle.AsRef(_ScaleControlPointNumberOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x15BDD34F3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x15BDD34F3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _RadiusComponentOffset = new(() => Schema.GetOffset(0x15BDD34FFBFE904A), LazyThreadSafetyMode.None); + public ref int RadiusComponent { - get => ref _Handle.AsRef(Schema.GetOffset(0x15BDD34FFBFE904A)); + get => ref _Handle.AsRef(_RadiusComponentOffset.Value); } + private static readonly Lazy _WarpTimeOffset = new(() => Schema.GetOffset(0x15BDD34F34CDAE88), LazyThreadSafetyMode.None); + public ref float WarpTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x15BDD34F34CDAE88)); + get => ref _Handle.AsRef(_WarpTimeOffset.Value); } + private static readonly Lazy _WarpStartTimeOffset = new(() => Schema.GetOffset(0x15BDD34F4326267A), LazyThreadSafetyMode.None); + public ref float WarpStartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x15BDD34F4326267A)); + get => ref _Handle.AsRef(_WarpStartTimeOffset.Value); } + private static readonly Lazy _PrevPosScaleOffset = new(() => Schema.GetOffset(0x15BDD34F46CED122), LazyThreadSafetyMode.None); + public ref float PrevPosScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x15BDD34F46CED122)); + get => ref _Handle.AsRef(_PrevPosScaleOffset.Value); } + private static readonly Lazy _InvertWarpOffset = new(() => Schema.GetOffset(0x15BDD34F67E23133), LazyThreadSafetyMode.None); + public ref bool InvertWarp { - get => ref _Handle.AsRef(Schema.GetOffset(0x15BDD34F67E23133)); + get => ref _Handle.AsRef(_InvertWarpOffset.Value); } + private static readonly Lazy _UseCountOffset = new(() => Schema.GetOffset(0x15BDD34F8836B9AB), LazyThreadSafetyMode.None); + public ref bool UseCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x15BDD34F8836B9AB)); + get => ref _Handle.AsRef(_UseCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionWarpScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionWarpScalarImpl.cs index 80277d04b..c34919bfc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionWarpScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_PositionWarpScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_INIT_PositionWarpScalarImpl : CParticleFunctionInitiali public C_INIT_PositionWarpScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _WarpMinOffset = new(() => Schema.GetOffset(0x36E409431B8A7F09), LazyThreadSafetyMode.None); + public ref Vector WarpMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x36E409431B8A7F09)); + get => ref _Handle.AsRef(_WarpMinOffset.Value); } + private static readonly Lazy _WarpMaxOffset = new(() => Schema.GetOffset(0x36E409430D76E147), LazyThreadSafetyMode.None); + public ref Vector WarpMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x36E409430D76E147)); + get => ref _Handle.AsRef(_WarpMaxOffset.Value); } + private static readonly Lazy _InputValueOffset = new(() => Schema.GetOffset(0x36E4094334445438), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputValue { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x36E4094334445438)); + get => new CPerParticleFloatInputImpl(_Handle + _InputValueOffset.Value); } + private static readonly Lazy _PrevPosScaleOffset = new(() => Schema.GetOffset(0x36E4094346CED122), LazyThreadSafetyMode.None); + public ref float PrevPosScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x36E4094346CED122)); + get => ref _Handle.AsRef(_PrevPosScaleOffset.Value); } + private static readonly Lazy _ScaleControlPointNumberOffset = new(() => Schema.GetOffset(0x36E409439A649261), LazyThreadSafetyMode.None); + public ref int ScaleControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x36E409439A649261)); + get => ref _Handle.AsRef(_ScaleControlPointNumberOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x36E409433F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x36E409433F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_QuantizeFloatImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_QuantizeFloatImpl.cs index e9223e982..09d3d9758 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_QuantizeFloatImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_QuantizeFloatImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_INIT_QuantizeFloatImpl : CParticleFunctionInitializerIm public C_INIT_QuantizeFloatImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueOffset = new(() => Schema.GetOffset(0x1A8E56B534445438), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputValue { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x1A8E56B534445438)); + get => new CPerParticleFloatInputImpl(_Handle + _InputValueOffset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0x1A8E56B5324F6F74), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t OutputField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x1A8E56B5324F6F74)); + get => new ParticleAttributeIndex_tImpl(_Handle + _OutputFieldOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RadiusFromCPObjectImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RadiusFromCPObjectImpl.cs index 82ebf24c5..b30625eae 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RadiusFromCPObjectImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RadiusFromCPObjectImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_INIT_RadiusFromCPObjectImpl : CParticleFunctionInitiali public C_INIT_RadiusFromCPObjectImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointOffset = new(() => Schema.GetOffset(0xC79B0CC80D0DDF8C), LazyThreadSafetyMode.None); + public ref int ControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xC79B0CC80D0DDF8C)); + get => ref _Handle.AsRef(_ControlPointOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomAlphaImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomAlphaImpl.cs index 6fe27970d..c63e7bfb1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomAlphaImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomAlphaImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_INIT_RandomAlphaImpl : CParticleFunctionInitializerImpl public C_INIT_RandomAlphaImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x3D7FD5BE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x3D7FD5BE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _AlphaMinOffset = new(() => Schema.GetOffset(0x3D7FD5BD7670531), LazyThreadSafetyMode.None); + public ref int AlphaMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D7FD5BD7670531)); + get => ref _Handle.AsRef(_AlphaMinOffset.Value); } + private static readonly Lazy _AlphaMaxOffset = new(() => Schema.GetOffset(0x3D7FD5BE97AA93F), LazyThreadSafetyMode.None); + public ref int AlphaMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D7FD5BE97AA93F)); + get => ref _Handle.AsRef(_AlphaMaxOffset.Value); } + private static readonly Lazy _AlphaRandExponentOffset = new(() => Schema.GetOffset(0x3D7FD5BA2C243B5), LazyThreadSafetyMode.None); + public ref float AlphaRandExponent { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D7FD5BA2C243B5)); + get => ref _Handle.AsRef(_AlphaRandExponentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomAlphaWindowThresholdImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomAlphaWindowThresholdImpl.cs index 7bf2772ee..972fcf362 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomAlphaWindowThresholdImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomAlphaWindowThresholdImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_INIT_RandomAlphaWindowThresholdImpl : CParticleFunction public C_INIT_RandomAlphaWindowThresholdImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinOffset = new(() => Schema.GetOffset(0x68DB6A2E3B1A5649), LazyThreadSafetyMode.None); + public ref float Min { - get => ref _Handle.AsRef(Schema.GetOffset(0x68DB6A2E3B1A5649)); + get => ref _Handle.AsRef(_MinOffset.Value); } + private static readonly Lazy _MaxOffset = new(() => Schema.GetOffset(0x68DB6A2E2D06B887), LazyThreadSafetyMode.None); + public ref float Max { - get => ref _Handle.AsRef(Schema.GetOffset(0x68DB6A2E2D06B887)); + get => ref _Handle.AsRef(_MaxOffset.Value); } + private static readonly Lazy _ExponentOffset = new(() => Schema.GetOffset(0x68DB6A2E20A7BCBC), LazyThreadSafetyMode.None); + public ref float Exponent { - get => ref _Handle.AsRef(Schema.GetOffset(0x68DB6A2E20A7BCBC)); + get => ref _Handle.AsRef(_ExponentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomColorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomColorImpl.cs index 76d2813ee..9bfee9944 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomColorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomColorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class C_INIT_RandomColorImpl : CParticleFunctionInitializerImpl public C_INIT_RandomColorImpl(nint handle) : base(handle) { } + private static readonly Lazy _ColorMinOffset = new(() => Schema.GetOffset(0x90523A48552A5834), LazyThreadSafetyMode.None); + public ref Color ColorMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x90523A48552A5834)); + get => ref _Handle.AsRef(_ColorMinOffset.Value); } + private static readonly Lazy _ColorMaxOffset = new(() => Schema.GetOffset(0x90523A48433DC396), LazyThreadSafetyMode.None); + public ref Color ColorMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x90523A48433DC396)); + get => ref _Handle.AsRef(_ColorMaxOffset.Value); } + private static readonly Lazy _TintMinOffset = new(() => Schema.GetOffset(0x90523A4850B36A60), LazyThreadSafetyMode.None); + public ref Color TintMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x90523A4850B36A60)); + get => ref _Handle.AsRef(_TintMinOffset.Value); } + private static readonly Lazy _TintMaxOffset = new(() => Schema.GetOffset(0x90523A4866A0054A), LazyThreadSafetyMode.None); + public ref Color TintMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x90523A4866A0054A)); + get => ref _Handle.AsRef(_TintMaxOffset.Value); } + private static readonly Lazy _TintPercOffset = new(() => Schema.GetOffset(0x90523A48E32BE3C6), LazyThreadSafetyMode.None); + public ref float TintPerc { - get => ref _Handle.AsRef(Schema.GetOffset(0x90523A48E32BE3C6)); + get => ref _Handle.AsRef(_TintPercOffset.Value); } + private static readonly Lazy _UpdateThresholdOffset = new(() => Schema.GetOffset(0x90523A48A2303609), LazyThreadSafetyMode.None); + public ref float UpdateThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0x90523A48A2303609)); + get => ref _Handle.AsRef(_UpdateThresholdOffset.Value); } + private static readonly Lazy _TintCPOffset = new(() => Schema.GetOffset(0x90523A4854940ABB), LazyThreadSafetyMode.None); + public ref int TintCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x90523A4854940ABB)); + get => ref _Handle.AsRef(_TintCPOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x90523A48E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x90523A48E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _TintBlendModeOffset = new(() => Schema.GetOffset(0x90523A48B80E5314), LazyThreadSafetyMode.None); + public ref ParticleColorBlendMode_t TintBlendMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x90523A48B80E5314)); + get => ref _Handle.AsRef(_TintBlendModeOffset.Value); } + private static readonly Lazy _LightAmplificationOffset = new(() => Schema.GetOffset(0x90523A48C8D7C0AD), LazyThreadSafetyMode.None); + public ref float LightAmplification { - get => ref _Handle.AsRef(Schema.GetOffset(0x90523A48C8D7C0AD)); + get => ref _Handle.AsRef(_LightAmplificationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomLifeTimeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomLifeTimeImpl.cs index 1a49568d2..eb353a9ae 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomLifeTimeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomLifeTimeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_INIT_RandomLifeTimeImpl : CParticleFunctionInitializerI public C_INIT_RandomLifeTimeImpl(nint handle) : base(handle) { } + private static readonly Lazy _LifetimeMinOffset = new(() => Schema.GetOffset(0xC413CA5E5D0684A6), LazyThreadSafetyMode.None); + public ref float LifetimeMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xC413CA5E5D0684A6)); + get => ref _Handle.AsRef(_LifetimeMinOffset.Value); } + private static readonly Lazy _LifetimeMaxOffset = new(() => Schema.GetOffset(0xC413CA5E6F1BBBB4), LazyThreadSafetyMode.None); + public ref float LifetimeMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xC413CA5E6F1BBBB4)); + get => ref _Handle.AsRef(_LifetimeMaxOffset.Value); } + private static readonly Lazy _LifetimeRandExponentOffset = new(() => Schema.GetOffset(0xC413CA5E9B83919A), LazyThreadSafetyMode.None); + public ref float LifetimeRandExponent { - get => ref _Handle.AsRef(Schema.GetOffset(0xC413CA5E9B83919A)); + get => ref _Handle.AsRef(_LifetimeRandExponentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomModelSequenceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomModelSequenceImpl.cs index ee6244290..a17532f0c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomModelSequenceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomModelSequenceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,22 +17,28 @@ internal partial class C_INIT_RandomModelSequenceImpl : CParticleFunctionInitial public C_INIT_RandomModelSequenceImpl(nint handle) : base(handle) { } + private static readonly Lazy _ActivityNameOffset = new(() => Schema.GetOffset(0x2F450DC3BF0C5087), LazyThreadSafetyMode.None); + public string ActivityName { get { - var ptr = _Handle + Schema.GetOffset(0x2F450DC3BF0C5087); + var ptr = _Handle + _ActivityNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x2F450DC3BF0C5087, value, 256); + set => Schema.SetFixedString(_Handle, _ActivityNameOffset.Value, value, 256); } + private static readonly Lazy _SequenceNameOffset = new(() => Schema.GetOffset(0x2F450DC3A270F66B), LazyThreadSafetyMode.None); + public string SequenceName { get { - var ptr = _Handle + Schema.GetOffset(0x2F450DC3A270F66B); + var ptr = _Handle + _SequenceNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x2F450DC3A270F66B, value, 256); + set => Schema.SetFixedString(_Handle, _SequenceNameOffset.Value, value, 256); } + private static readonly Lazy _ModelOffset = new(() => Schema.GetOffset(0x2F450DC3E100C814), LazyThreadSafetyMode.None); + public ref CStrongHandle Model { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2F450DC3E100C814)); + get => ref _Handle.AsRef>(_ModelOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomNamedModelBodyPartImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomNamedModelBodyPartImpl.cs index 4460efd6b..c60d7b2ed 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomNamedModelBodyPartImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomNamedModelBodyPartImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomNamedModelElementImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomNamedModelElementImpl.cs index 85d013874..28f7f4d54 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomNamedModelElementImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomNamedModelElementImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_INIT_RandomNamedModelElementImpl : CParticleFunctionIni public C_INIT_RandomNamedModelElementImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModelOffset = new(() => Schema.GetOffset(0xA3E776D5E100C814), LazyThreadSafetyMode.None); + public ref CStrongHandle Model { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA3E776D5E100C814)); + get => ref _Handle.AsRef>(_ModelOffset.Value); } + private static readonly Lazy _NamesOffset = new(() => Schema.GetOffset(0xA3E776D50DA776AF), LazyThreadSafetyMode.None); + public ref CUtlVector Names { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA3E776D50DA776AF)); + get => ref _Handle.AsRef>(_NamesOffset.Value); } + private static readonly Lazy _ShuffleOffset = new(() => Schema.GetOffset(0xA3E776D528BD2B2E), LazyThreadSafetyMode.None); + public ref bool Shuffle { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3E776D528BD2B2E)); + get => ref _Handle.AsRef(_ShuffleOffset.Value); } + private static readonly Lazy _LinearOffset = new(() => Schema.GetOffset(0xA3E776D5B9313720), LazyThreadSafetyMode.None); + public ref bool Linear { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3E776D5B9313720)); + get => ref _Handle.AsRef(_LinearOffset.Value); } + private static readonly Lazy _ModelFromRendererOffset = new(() => Schema.GetOffset(0xA3E776D5AEBA1F25), LazyThreadSafetyMode.None); + public ref bool ModelFromRenderer { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3E776D5AEBA1F25)); + get => ref _Handle.AsRef(_ModelFromRendererOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xA3E776D5E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xA3E776D5E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomNamedModelMeshGroupImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomNamedModelMeshGroupImpl.cs index 28d13f46b..55aba043f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomNamedModelMeshGroupImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomNamedModelMeshGroupImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomNamedModelSequenceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomNamedModelSequenceImpl.cs index 60bd454f3..521b4f703 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomNamedModelSequenceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomNamedModelSequenceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomRadiusImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomRadiusImpl.cs index 8514cce5b..4dc6c0842 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomRadiusImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomRadiusImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_INIT_RandomRadiusImpl : CParticleFunctionInitializerImp public C_INIT_RandomRadiusImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusMinOffset = new(() => Schema.GetOffset(0xE9419C037AEB467F), LazyThreadSafetyMode.None); + public ref float RadiusMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xE9419C037AEB467F)); + get => ref _Handle.AsRef(_RadiusMinOffset.Value); } + private static readonly Lazy _RadiusMaxOffset = new(() => Schema.GetOffset(0xE9419C0388D641D1), LazyThreadSafetyMode.None); + public ref float RadiusMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xE9419C0388D641D1)); + get => ref _Handle.AsRef(_RadiusMaxOffset.Value); } + private static readonly Lazy _RadiusRandExponentOffset = new(() => Schema.GetOffset(0xE9419C03D4637A31), LazyThreadSafetyMode.None); + public ref float RadiusRandExponent { - get => ref _Handle.AsRef(Schema.GetOffset(0xE9419C03D4637A31)); + get => ref _Handle.AsRef(_RadiusRandExponentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomRotationImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomRotationImpl.cs index 2c4397610..58d12434d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomRotationImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomRotationImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomRotationSpeedImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomRotationSpeedImpl.cs index 614b02f5e..d6e7fe643 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomRotationSpeedImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomRotationSpeedImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomScalarImpl.cs index 8eb10189f..1a0c444a4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_INIT_RandomScalarImpl : CParticleFunctionInitializerImp public C_INIT_RandomScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinOffset = new(() => Schema.GetOffset(0x76660B0D3B1A5649), LazyThreadSafetyMode.None); + public ref float Min { - get => ref _Handle.AsRef(Schema.GetOffset(0x76660B0D3B1A5649)); + get => ref _Handle.AsRef(_MinOffset.Value); } + private static readonly Lazy _MaxOffset = new(() => Schema.GetOffset(0x76660B0D2D06B887), LazyThreadSafetyMode.None); + public ref float Max { - get => ref _Handle.AsRef(Schema.GetOffset(0x76660B0D2D06B887)); + get => ref _Handle.AsRef(_MaxOffset.Value); } + private static readonly Lazy _ExponentOffset = new(() => Schema.GetOffset(0x76660B0D20A7BCBC), LazyThreadSafetyMode.None); + public ref float Exponent { - get => ref _Handle.AsRef(Schema.GetOffset(0x76660B0D20A7BCBC)); + get => ref _Handle.AsRef(_ExponentOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x76660B0DE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x76660B0DE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomSecondSequenceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomSecondSequenceImpl.cs index fab6902c6..53e0d3e6c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomSecondSequenceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomSecondSequenceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_INIT_RandomSecondSequenceImpl : CParticleFunctionInitia public C_INIT_RandomSecondSequenceImpl(nint handle) : base(handle) { } + private static readonly Lazy _SequenceMinOffset = new(() => Schema.GetOffset(0xC1CE11E0D30682F0), LazyThreadSafetyMode.None); + public ref int SequenceMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xC1CE11E0D30682F0)); + get => ref _Handle.AsRef(_SequenceMinOffset.Value); } + private static readonly Lazy _SequenceMaxOffset = new(() => Schema.GetOffset(0xC1CE11E0C8F2EB7A), LazyThreadSafetyMode.None); + public ref int SequenceMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xC1CE11E0C8F2EB7A)); + get => ref _Handle.AsRef(_SequenceMaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomSequenceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomSequenceImpl.cs index 672eed217..429dd6dd9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomSequenceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomSequenceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_INIT_RandomSequenceImpl : CParticleFunctionInitializerI public C_INIT_RandomSequenceImpl(nint handle) : base(handle) { } + private static readonly Lazy _SequenceMinOffset = new(() => Schema.GetOffset(0x78382338D30682F0), LazyThreadSafetyMode.None); + public ref int SequenceMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x78382338D30682F0)); + get => ref _Handle.AsRef(_SequenceMinOffset.Value); } + private static readonly Lazy _SequenceMaxOffset = new(() => Schema.GetOffset(0x78382338C8F2EB7A), LazyThreadSafetyMode.None); + public ref int SequenceMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x78382338C8F2EB7A)); + get => ref _Handle.AsRef(_SequenceMaxOffset.Value); } + private static readonly Lazy _ShuffleOffset = new(() => Schema.GetOffset(0x7838233828BD2B2E), LazyThreadSafetyMode.None); + public ref bool Shuffle { - get => ref _Handle.AsRef(Schema.GetOffset(0x7838233828BD2B2E)); + get => ref _Handle.AsRef(_ShuffleOffset.Value); } + private static readonly Lazy _LinearOffset = new(() => Schema.GetOffset(0x78382338B9313720), LazyThreadSafetyMode.None); + public ref bool Linear { - get => ref _Handle.AsRef(Schema.GetOffset(0x78382338B9313720)); + get => ref _Handle.AsRef(_LinearOffset.Value); } + private static readonly Lazy _WeightedListOffset = new(() => Schema.GetOffset(0x783823385554D8B8), LazyThreadSafetyMode.None); + public ref CUtlVector WeightedList { - get => ref _Handle.AsRef>(Schema.GetOffset(0x783823385554D8B8)); + get => ref _Handle.AsRef>(_WeightedListOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomTrailLengthImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomTrailLengthImpl.cs index 94a422cc4..e29805077 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomTrailLengthImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomTrailLengthImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_INIT_RandomTrailLengthImpl : CParticleFunctionInitializ public C_INIT_RandomTrailLengthImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinLengthOffset = new(() => Schema.GetOffset(0x6418031B95FB8E51), LazyThreadSafetyMode.None); + public ref float MinLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x6418031B95FB8E51)); + get => ref _Handle.AsRef(_MinLengthOffset.Value); } + private static readonly Lazy _MaxLengthOffset = new(() => Schema.GetOffset(0x6418031B87A8B4C7), LazyThreadSafetyMode.None); + public ref float MaxLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x6418031B87A8B4C7)); + get => ref _Handle.AsRef(_MaxLengthOffset.Value); } + private static readonly Lazy _LengthRandExponentOffset = new(() => Schema.GetOffset(0x6418031B41B064A7), LazyThreadSafetyMode.None); + public ref float LengthRandExponent { - get => ref _Handle.AsRef(Schema.GetOffset(0x6418031B41B064A7)); + get => ref _Handle.AsRef(_LengthRandExponentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomVectorComponentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomVectorComponentImpl.cs index 6144b5e05..d6cd96163 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomVectorComponentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomVectorComponentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_INIT_RandomVectorComponentImpl : CParticleFunctionIniti public C_INIT_RandomVectorComponentImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinOffset = new(() => Schema.GetOffset(0xD6D670313B1A5649), LazyThreadSafetyMode.None); + public ref float Min { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6D670313B1A5649)); + get => ref _Handle.AsRef(_MinOffset.Value); } + private static readonly Lazy _MaxOffset = new(() => Schema.GetOffset(0xD6D670312D06B887), LazyThreadSafetyMode.None); + public ref float Max { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6D670312D06B887)); + get => ref _Handle.AsRef(_MaxOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xD6D67031E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xD6D67031E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _ComponentOffset = new(() => Schema.GetOffset(0xD6D67031BFD0952C), LazyThreadSafetyMode.None); + public ref int Component { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6D67031BFD0952C)); + get => ref _Handle.AsRef(_ComponentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomVectorImpl.cs index a7c2d8d26..a5afd821e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_INIT_RandomVectorImpl : CParticleFunctionInitializerImp public C_INIT_RandomVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinOffset = new(() => Schema.GetOffset(0x9B672752B0765F37), LazyThreadSafetyMode.None); + public ref Vector Min { - get => ref _Handle.AsRef(Schema.GetOffset(0x9B672752B0765F37)); + get => ref _Handle.AsRef(_MinOffset.Value); } + private static readonly Lazy _MaxOffset = new(() => Schema.GetOffset(0x9B672752BE89FCF9), LazyThreadSafetyMode.None); + public ref Vector Max { - get => ref _Handle.AsRef(Schema.GetOffset(0x9B672752BE89FCF9)); + get => ref _Handle.AsRef(_MaxOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x9B672752E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x9B672752E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _RandomnessParametersOffset = new(() => Schema.GetOffset(0x9B6727527EDF50AD), LazyThreadSafetyMode.None); + public CRandomNumberGeneratorParameters RandomnessParameters { - get => new CRandomNumberGeneratorParametersImpl(_Handle + Schema.GetOffset(0x9B6727527EDF50AD)); + get => new CRandomNumberGeneratorParametersImpl(_Handle + _RandomnessParametersOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomYawFlipImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomYawFlipImpl.cs index b75e44c52..48ab0bb65 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomYawFlipImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomYawFlipImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_INIT_RandomYawFlipImpl : CParticleFunctionInitializerIm public C_INIT_RandomYawFlipImpl(nint handle) : base(handle) { } + private static readonly Lazy _PercentOffset = new(() => Schema.GetOffset(0x86C3C253183D7FC4), LazyThreadSafetyMode.None); + public ref float Percent { - get => ref _Handle.AsRef(Schema.GetOffset(0x86C3C253183D7FC4)); + get => ref _Handle.AsRef(_PercentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomYawImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomYawImpl.cs index 0db9caf52..a3dcc671b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomYawImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RandomYawImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapInitialDirectionToTransformToVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapInitialDirectionToTransformToVectorImpl.cs index 249fcdfd7..9a3ca22cb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapInitialDirectionToTransformToVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapInitialDirectionToTransformToVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_INIT_RemapInitialDirectionToTransformToVectorImpl : CPa public C_INIT_RemapInitialDirectionToTransformToVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0xB8FCDAFFB3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0xB8FCDAFFB3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xB8FCDAFFE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xB8FCDAFFE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0xB8FCDAFFB731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8FCDAFFB731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _OffsetRotOffset = new(() => Schema.GetOffset(0xB8FCDAFFB414F849), LazyThreadSafetyMode.None); + public ref float OffsetRot { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8FCDAFFB414F849)); + get => ref _Handle.AsRef(_OffsetRotOffset.Value); } + private static readonly Lazy _OffsetAxisOffset = new(() => Schema.GetOffset(0xB8FCDAFFFAB4918F), LazyThreadSafetyMode.None); + public ref Vector OffsetAxis { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8FCDAFFFAB4918F)); + get => ref _Handle.AsRef(_OffsetAxisOffset.Value); } + private static readonly Lazy _NormalizeOffset = new(() => Schema.GetOffset(0xB8FCDAFF48BC424C), LazyThreadSafetyMode.None); + public ref bool Normalize { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8FCDAFF48BC424C)); + get => ref _Handle.AsRef(_NormalizeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapInitialTransformDirectionToRotationImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapInitialTransformDirectionToRotationImpl.cs index 7487adfaa..198691480 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapInitialTransformDirectionToRotationImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapInitialTransformDirectionToRotationImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_INIT_RemapInitialTransformDirectionToRotationImpl : CPa public C_INIT_RemapInitialTransformDirectionToRotationImpl(nint handle) : base(handle) { } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0x5301B477B3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x5301B477B3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x5301B477E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x5301B477E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _OffsetRotOffset = new(() => Schema.GetOffset(0x5301B477B414F849), LazyThreadSafetyMode.None); + public ref float OffsetRot { - get => ref _Handle.AsRef(Schema.GetOffset(0x5301B477B414F849)); + get => ref _Handle.AsRef(_OffsetRotOffset.Value); } + private static readonly Lazy _ComponentOffset = new(() => Schema.GetOffset(0x5301B477BFD0952C), LazyThreadSafetyMode.None); + public ref int Component { - get => ref _Handle.AsRef(Schema.GetOffset(0x5301B477BFD0952C)); + get => ref _Handle.AsRef(_ComponentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapInitialVisibilityScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapInitialVisibilityScalarImpl.cs index bd596591f..26fa69af8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapInitialVisibilityScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapInitialVisibilityScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_INIT_RemapInitialVisibilityScalarImpl : CParticleFuncti public C_INIT_RemapInitialVisibilityScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x6EA0C1DE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x6EA0C1DE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x6EA0C1DE88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x6EA0C1DE88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x6EA0C1DD6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x6EA0C1DD6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x6EA0C1D5F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x6EA0C1D5F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x6EA0C1D51A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x6EA0C1D51A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapNamedModelBodyPartToScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapNamedModelBodyPartToScalarImpl.cs index 25ac8afc2..b9f9d610b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapNamedModelBodyPartToScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapNamedModelBodyPartToScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapNamedModelElementToScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapNamedModelElementToScalarImpl.cs index df7053395..bf8857814 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapNamedModelElementToScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapNamedModelElementToScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_INIT_RemapNamedModelElementToScalarImpl : CParticleFunc public C_INIT_RemapNamedModelElementToScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModelOffset = new(() => Schema.GetOffset(0x4717248AE100C814), LazyThreadSafetyMode.None); + public ref CStrongHandle Model { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4717248AE100C814)); + get => ref _Handle.AsRef>(_ModelOffset.Value); } + private static readonly Lazy _NamesOffset = new(() => Schema.GetOffset(0x4717248A0DA776AF), LazyThreadSafetyMode.None); + public ref CUtlVector Names { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4717248A0DA776AF)); + get => ref _Handle.AsRef>(_NamesOffset.Value); } + private static readonly Lazy _ValuesOffset = new(() => Schema.GetOffset(0x4717248AFBEDDADB), LazyThreadSafetyMode.None); + public ref CUtlVector Values { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4717248AFBEDDADB)); + get => ref _Handle.AsRef>(_ValuesOffset.Value); } + private static readonly Lazy _FieldInputOffset = new(() => Schema.GetOffset(0x4717248AAE775669), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x4717248AAE775669)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x4717248AE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x4717248AE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x4717248AFB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x4717248AFB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _ModelFromRendererOffset = new(() => Schema.GetOffset(0x4717248AAEBA1F25), LazyThreadSafetyMode.None); + public ref bool ModelFromRenderer { - get => ref _Handle.AsRef(Schema.GetOffset(0x4717248AAEBA1F25)); + get => ref _Handle.AsRef(_ModelFromRendererOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapNamedModelMeshGroupToScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapNamedModelMeshGroupToScalarImpl.cs index f51714f7a..074d2350f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapNamedModelMeshGroupToScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapNamedModelMeshGroupToScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapNamedModelSequenceToScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapNamedModelSequenceToScalarImpl.cs index d1c72353e..dba1d5bba 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapNamedModelSequenceToScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapNamedModelSequenceToScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToNamedModelBodyPartScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToNamedModelBodyPartScalarImpl.cs index 92fa648a4..30e99a848 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToNamedModelBodyPartScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToNamedModelBodyPartScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToNamedModelElementScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToNamedModelElementScalarImpl.cs index 8bdd3c1c1..8c36b3af1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToNamedModelElementScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToNamedModelElementScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,25 +17,33 @@ internal partial class C_INIT_RemapParticleCountToNamedModelElementScalarImpl : public C_INIT_RemapParticleCountToNamedModelElementScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModelOffset = new(() => Schema.GetOffset(0xB011C761E100C814), LazyThreadSafetyMode.None); + public ref CStrongHandle Model { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB011C761E100C814)); + get => ref _Handle.AsRef>(_ModelOffset.Value); } + private static readonly Lazy _OutputMinNameOffset = new(() => Schema.GetOffset(0xB011C761CF5C20FB), LazyThreadSafetyMode.None); + public string OutputMinName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB011C761CF5C20FB)); + var ptr = _Handle.Read(_OutputMinNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB011C761CF5C20FB, value); + set => Schema.SetString(_Handle, _OutputMinNameOffset.Value, value); } + private static readonly Lazy _OutputMaxNameOffset = new(() => Schema.GetOffset(0xB011C761553184F9), LazyThreadSafetyMode.None); + public string OutputMaxName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB011C761553184F9)); + var ptr = _Handle.Read(_OutputMaxNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB011C761553184F9, value); + set => Schema.SetString(_Handle, _OutputMaxNameOffset.Value, value); } + private static readonly Lazy _ModelFromRendererOffset = new(() => Schema.GetOffset(0xB011C761AEBA1F25), LazyThreadSafetyMode.None); + public ref bool ModelFromRenderer { - get => ref _Handle.AsRef(Schema.GetOffset(0xB011C761AEBA1F25)); + get => ref _Handle.AsRef(_ModelFromRendererOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToNamedModelMeshGroupScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToNamedModelMeshGroupScalarImpl.cs index 919e42d24..e7a248a92 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToNamedModelMeshGroupScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToNamedModelMeshGroupScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToNamedModelSequenceScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToNamedModelSequenceScalarImpl.cs index 8260b907f..c0fb074a4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToNamedModelSequenceScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToNamedModelSequenceScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToScalarImpl.cs index 90df7cc59..2e4b759d3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapParticleCountToScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,65 @@ internal partial class C_INIT_RemapParticleCountToScalarImpl : CParticleFunction public C_INIT_RemapParticleCountToScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xC0411DA9E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xC0411DA9E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0xC0411DA985E92181), LazyThreadSafetyMode.None); + public ref int InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0411DA985E92181)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0xC0411DA977FE262F), LazyThreadSafetyMode.None); + public ref int InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0411DA977FE262F)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _ScaleControlPointOffset = new(() => Schema.GetOffset(0xC0411DA9B0577A70), LazyThreadSafetyMode.None); + public ref int ScaleControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0411DA9B0577A70)); + get => ref _Handle.AsRef(_ScaleControlPointOffset.Value); } + private static readonly Lazy _ScaleControlPointFieldOffset = new(() => Schema.GetOffset(0xC0411DA9360C613C), LazyThreadSafetyMode.None); + public ref int ScaleControlPointField { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0411DA9360C613C)); + get => ref _Handle.AsRef(_ScaleControlPointFieldOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0xC0411DA95F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0411DA95F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0xC0411DA951A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0411DA951A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0xC0411DA9FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0411DA9FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _ActiveRangeOffset = new(() => Schema.GetOffset(0xC0411DA93FA53B84), LazyThreadSafetyMode.None); + public ref bool ActiveRange { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0411DA93FA53B84)); + get => ref _Handle.AsRef(_ActiveRangeOffset.Value); } + private static readonly Lazy _InvertOffset = new(() => Schema.GetOffset(0xC0411DA9959F6101), LazyThreadSafetyMode.None); + public ref bool Invert { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0411DA9959F6101)); + get => ref _Handle.AsRef(_InvertOffset.Value); } + private static readonly Lazy _WrapOffset = new(() => Schema.GetOffset(0xC0411DA94C8CA005), LazyThreadSafetyMode.None); + public ref bool Wrap { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0411DA94C8CA005)); + get => ref _Handle.AsRef(_WrapOffset.Value); } + private static readonly Lazy _RemapBiasOffset = new(() => Schema.GetOffset(0xC0411DA9490D7325), LazyThreadSafetyMode.None); + public ref float RemapBias { - get => ref _Handle.AsRef(Schema.GetOffset(0xC0411DA9490D7325)); + get => ref _Handle.AsRef(_RemapBiasOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapQAnglesToRotationImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapQAnglesToRotationImpl.cs index 6df528c5d..71ed6ed8a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapQAnglesToRotationImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapQAnglesToRotationImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_INIT_RemapQAnglesToRotationImpl : CParticleFunctionInit public C_INIT_RemapQAnglesToRotationImpl(nint handle) : base(handle) { } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0xD24C8C15B3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0xD24C8C15B3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapScalarToVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapScalarToVectorImpl.cs index 0b9986a33..d480bda31 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapScalarToVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapScalarToVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,65 @@ internal partial class C_INIT_RemapScalarToVectorImpl : CParticleFunctionInitial public C_INIT_RemapScalarToVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldInputOffset = new(() => Schema.GetOffset(0x8CA3FD8DAE775669), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x8CA3FD8DAE775669)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x8CA3FD8DE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x8CA3FD8DE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x8CA3FD8DE88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x8CA3FD8DE88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x8CA3FD8DD6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x8CA3FD8DD6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x8CA3FD8D2EFED678), LazyThreadSafetyMode.None); + public ref Vector OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x8CA3FD8D2EFED678)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x8CA3FD8D451280D2), LazyThreadSafetyMode.None); + public ref Vector OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x8CA3FD8D451280D2)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0x8CA3FD8D67FE9DC4), LazyThreadSafetyMode.None); + public ref float StartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x8CA3FD8D67FE9DC4)); + get => ref _Handle.AsRef(_StartTimeOffset.Value); } + private static readonly Lazy _EndTimeOffset = new(() => Schema.GetOffset(0x8CA3FD8D2041DF9D), LazyThreadSafetyMode.None); + public ref float EndTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x8CA3FD8D2041DF9D)); + get => ref _Handle.AsRef(_EndTimeOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x8CA3FD8DFB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x8CA3FD8DFB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x8CA3FD8D3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x8CA3FD8D3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _LocalCoordsOffset = new(() => Schema.GetOffset(0x8CA3FD8D30E716DE), LazyThreadSafetyMode.None); + public ref bool LocalCoords { - get => ref _Handle.AsRef(Schema.GetOffset(0x8CA3FD8D30E716DE)); + get => ref _Handle.AsRef(_LocalCoordsOffset.Value); } + private static readonly Lazy _RemapBiasOffset = new(() => Schema.GetOffset(0x8CA3FD8D490D7325), LazyThreadSafetyMode.None); + public ref float RemapBias { - get => ref _Handle.AsRef(Schema.GetOffset(0x8CA3FD8D490D7325)); + get => ref _Handle.AsRef(_RemapBiasOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapTransformOrientationToRotationsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapTransformOrientationToRotationsImpl.cs index 3c40ea520..524208b45 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapTransformOrientationToRotationsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapTransformOrientationToRotationsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_INIT_RemapTransformOrientationToRotationsImpl : CPartic public C_INIT_RemapTransformOrientationToRotationsImpl(nint handle) : base(handle) { } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0x51F07293B3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x51F07293B3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _RotationOffset = new(() => Schema.GetOffset(0x51F072931992E6BF), LazyThreadSafetyMode.None); + public ref Vector Rotation { - get => ref _Handle.AsRef(Schema.GetOffset(0x51F072931992E6BF)); + get => ref _Handle.AsRef(_RotationOffset.Value); } + private static readonly Lazy _UseQuatOffset = new(() => Schema.GetOffset(0x51F0729343F0D4DB), LazyThreadSafetyMode.None); + public ref bool UseQuat { - get => ref _Handle.AsRef(Schema.GetOffset(0x51F0729343F0D4DB)); + get => ref _Handle.AsRef(_UseQuatOffset.Value); } + private static readonly Lazy _WriteNormalOffset = new(() => Schema.GetOffset(0x51F07293C2EF44FF), LazyThreadSafetyMode.None); + public ref bool WriteNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0x51F07293C2EF44FF)); + get => ref _Handle.AsRef(_WriteNormalOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapTransformToVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapTransformToVectorImpl.cs index dab705205..44219ccc6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapTransformToVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RemapTransformToVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,70 @@ internal partial class C_INIT_RemapTransformToVectorImpl : CParticleFunctionInit public C_INIT_RemapTransformToVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xED3971B7E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xED3971B7E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0xED3971B7367FBCC9), LazyThreadSafetyMode.None); + public ref Vector InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xED3971B7367FBCC9)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0xED3971B7286C1F07), LazyThreadSafetyMode.None); + public ref Vector InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xED3971B7286C1F07)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0xED3971B7A04D6C7C), LazyThreadSafetyMode.None); + public ref Vector OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xED3971B7A04D6C7C)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0xED3971B78E39C86E), LazyThreadSafetyMode.None); + public ref Vector OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xED3971B78E39C86E)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0xED3971B7B3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0xED3971B7B3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _LocalSpaceTransformOffset = new(() => Schema.GetOffset(0xED3971B733F99C86), LazyThreadSafetyMode.None); + public CParticleTransformInput LocalSpaceTransform { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0xED3971B733F99C86)); + get => new CParticleTransformInputImpl(_Handle + _LocalSpaceTransformOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0xED3971B767FE9DC4), LazyThreadSafetyMode.None); + public ref float StartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xED3971B767FE9DC4)); + get => ref _Handle.AsRef(_StartTimeOffset.Value); } + private static readonly Lazy _EndTimeOffset = new(() => Schema.GetOffset(0xED3971B72041DF9D), LazyThreadSafetyMode.None); + public ref float EndTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xED3971B72041DF9D)); + get => ref _Handle.AsRef(_EndTimeOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0xED3971B7FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0xED3971B7FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0xED3971B717412B2A), LazyThreadSafetyMode.None); + public ref bool Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0xED3971B717412B2A)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _AccelerateOffset = new(() => Schema.GetOffset(0xED3971B7A9BEFF50), LazyThreadSafetyMode.None); + public ref bool Accelerate { - get => ref _Handle.AsRef(Schema.GetOffset(0xED3971B7A9BEFF50)); + get => ref _Handle.AsRef(_AccelerateOffset.Value); } + private static readonly Lazy _RemapBiasOffset = new(() => Schema.GetOffset(0xED3971B7490D7325), LazyThreadSafetyMode.None); + public ref float RemapBias { - get => ref _Handle.AsRef(Schema.GetOffset(0xED3971B7490D7325)); + get => ref _Handle.AsRef(_RemapBiasOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RingWaveImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RingWaveImpl.cs index 9e6c434c2..debfb1875 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RingWaveImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RingWaveImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class C_INIT_RingWaveImpl : CParticleFunctionInitializerImpl, C public C_INIT_RingWaveImpl(nint handle) : base(handle) { } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0xA5DA0691B3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0xA5DA0691B3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _ParticlesPerOrbitOffset = new(() => Schema.GetOffset(0xA5DA069184EA503F), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ParticlesPerOrbit { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xA5DA069184EA503F)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ParticlesPerOrbitOffset.Value); } + private static readonly Lazy _InitialRadiusOffset = new(() => Schema.GetOffset(0xA5DA06918B8AAB8B), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InitialRadius { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xA5DA06918B8AAB8B)); + get => new CPerParticleFloatInputImpl(_Handle + _InitialRadiusOffset.Value); } + private static readonly Lazy _ThicknessOffset = new(() => Schema.GetOffset(0xA5DA0691DC7C1987), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Thickness { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xA5DA0691DC7C1987)); + get => new CPerParticleFloatInputImpl(_Handle + _ThicknessOffset.Value); } + private static readonly Lazy _InitialSpeedMinOffset = new(() => Schema.GetOffset(0xA5DA0691E36FD694), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InitialSpeedMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xA5DA0691E36FD694)); + get => new CPerParticleFloatInputImpl(_Handle + _InitialSpeedMinOffset.Value); } + private static readonly Lazy _InitialSpeedMaxOffset = new(() => Schema.GetOffset(0xA5DA0691D184D4F6), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InitialSpeedMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xA5DA0691D184D4F6)); + get => new CPerParticleFloatInputImpl(_Handle + _InitialSpeedMaxOffset.Value); } + private static readonly Lazy _RollOffset = new(() => Schema.GetOffset(0xA5DA069188F97A90), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Roll { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xA5DA069188F97A90)); + get => new CPerParticleFloatInputImpl(_Handle + _RollOffset.Value); } + private static readonly Lazy _PitchOffset = new(() => Schema.GetOffset(0xA5DA06911CBA22DB), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Pitch { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xA5DA06911CBA22DB)); + get => new CPerParticleFloatInputImpl(_Handle + _PitchOffset.Value); } + private static readonly Lazy _YawOffset = new(() => Schema.GetOffset(0xA5DA0691B40C1E8A), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Yaw { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xA5DA0691B40C1E8A)); + get => new CPerParticleFloatInputImpl(_Handle + _YawOffset.Value); } + private static readonly Lazy _EvenDistributionOffset = new(() => Schema.GetOffset(0xA5DA069184932067), LazyThreadSafetyMode.None); + public ref bool EvenDistribution { - get => ref _Handle.AsRef(Schema.GetOffset(0xA5DA069184932067)); + get => ref _Handle.AsRef(_EvenDistributionOffset.Value); } + private static readonly Lazy _XYVelocityOnlyOffset = new(() => Schema.GetOffset(0xA5DA0691A20CED5B), LazyThreadSafetyMode.None); + public ref bool XYVelocityOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0xA5DA0691A20CED5B)); + get => ref _Handle.AsRef(_XYVelocityOnlyOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RtEnvCullImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RtEnvCullImpl.cs index dfcdf1881..4c7282148 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RtEnvCullImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_RtEnvCullImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,33 +17,49 @@ internal partial class C_INIT_RtEnvCullImpl : CParticleFunctionInitializerImpl, public C_INIT_RtEnvCullImpl(nint handle) : base(handle) { } + private static readonly Lazy _TestDirOffset = new(() => Schema.GetOffset(0xEA96DD4FC17166B4), LazyThreadSafetyMode.None); + public ref Vector TestDir { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA96DD4FC17166B4)); + get => ref _Handle.AsRef(_TestDirOffset.Value); } + private static readonly Lazy _TestNormalOffset = new(() => Schema.GetOffset(0xEA96DD4FD4AC77F2), LazyThreadSafetyMode.None); + public ref Vector TestNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA96DD4FD4AC77F2)); + get => ref _Handle.AsRef(_TestNormalOffset.Value); } + private static readonly Lazy _UseVelocityOffset = new(() => Schema.GetOffset(0xEA96DD4F5E806BAF), LazyThreadSafetyMode.None); + public ref bool UseVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA96DD4F5E806BAF)); + get => ref _Handle.AsRef(_UseVelocityOffset.Value); } + private static readonly Lazy _CullOnMissOffset = new(() => Schema.GetOffset(0xEA96DD4F5E118398), LazyThreadSafetyMode.None); + public ref bool CullOnMiss { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA96DD4F5E118398)); + get => ref _Handle.AsRef(_CullOnMissOffset.Value); } + private static readonly Lazy _LifeAdjustOffset = new(() => Schema.GetOffset(0xEA96DD4FA38568F0), LazyThreadSafetyMode.None); + public ref bool LifeAdjust { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA96DD4FA38568F0)); + get => ref _Handle.AsRef(_LifeAdjustOffset.Value); } + private static readonly Lazy _RtEnvNameOffset = new(() => Schema.GetOffset(0xEA96DD4FC32A9775), LazyThreadSafetyMode.None); + public string RtEnvName { get { - var ptr = _Handle + Schema.GetOffset(0xEA96DD4FC32A9775); + var ptr = _Handle + _RtEnvNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xEA96DD4FC32A9775, value, 128); + set => Schema.SetFixedString(_Handle, _RtEnvNameOffset.Value, value, 128); } + private static readonly Lazy _RTEnvCPOffset = new(() => Schema.GetOffset(0xEA96DD4F01881731), LazyThreadSafetyMode.None); + public ref int RTEnvCP { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA96DD4F01881731)); + get => ref _Handle.AsRef(_RTEnvCPOffset.Value); } + private static readonly Lazy _ComponentOffset = new(() => Schema.GetOffset(0xEA96DD4FBFD0952C), LazyThreadSafetyMode.None); + public ref int Component { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA96DD4FBFD0952C)); + get => ref _Handle.AsRef(_ComponentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ScaleVelocityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ScaleVelocityImpl.cs index 6fb394541..f604a1ce0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ScaleVelocityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ScaleVelocityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_INIT_ScaleVelocityImpl : CParticleFunctionInitializerIm public C_INIT_ScaleVelocityImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0xF226CCC35F596B51), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput Scale { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xF226CCC35F596B51)); + get => new CParticleCollectionVecInputImpl(_Handle + _ScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ScreenSpacePositionOfTargetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ScreenSpacePositionOfTargetImpl.cs index b7c753eae..79affbe8d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ScreenSpacePositionOfTargetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_ScreenSpacePositionOfTargetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_INIT_ScreenSpacePositionOfTargetImpl : CParticleFunctio public C_INIT_ScreenSpacePositionOfTargetImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetPositionOffset = new(() => Schema.GetOffset(0xBA53E3F7554C563B), LazyThreadSafetyMode.None); + public CPerParticleVecInput TargetPosition { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xBA53E3F7554C563B)); + get => new CPerParticleVecInputImpl(_Handle + _TargetPositionOffset.Value); } + private static readonly Lazy _OututBehindnessOffset = new(() => Schema.GetOffset(0xBA53E3F7DB123D49), LazyThreadSafetyMode.None); + public ref bool OututBehindness { - get => ref _Handle.AsRef(Schema.GetOffset(0xBA53E3F7DB123D49)); + get => ref _Handle.AsRef(_OututBehindnessOffset.Value); } + private static readonly Lazy _BehindFieldOutputOffset = new(() => Schema.GetOffset(0xBA53E3F769F4F392), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t BehindFieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xBA53E3F769F4F392)); + get => new ParticleAttributeIndex_tImpl(_Handle + _BehindFieldOutputOffset.Value); } + private static readonly Lazy _BehindOutputRemapOffset = new(() => Schema.GetOffset(0xBA53E3F74B35FBF3), LazyThreadSafetyMode.None); + public CParticleRemapFloatInput BehindOutputRemap { - get => new CParticleRemapFloatInputImpl(_Handle + Schema.GetOffset(0xBA53E3F74B35FBF3)); + get => new CParticleRemapFloatInputImpl(_Handle + _BehindOutputRemapOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SequenceFromCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SequenceFromCPImpl.cs index 3919f5803..12bf20bf5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SequenceFromCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SequenceFromCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_INIT_SequenceFromCPImpl : CParticleFunctionInitializerI public C_INIT_SequenceFromCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _KillUnusedOffset = new(() => Schema.GetOffset(0xC62FB07C81506527), LazyThreadSafetyMode.None); + public ref bool KillUnused { - get => ref _Handle.AsRef(Schema.GetOffset(0xC62FB07C81506527)); + get => ref _Handle.AsRef(_KillUnusedOffset.Value); } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0xC62FB07CBBCB728B), LazyThreadSafetyMode.None); + public ref bool RadiusScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xC62FB07CBBCB728B)); + get => ref _Handle.AsRef(_RadiusScaleOffset.Value); } + private static readonly Lazy _CPOffset = new(() => Schema.GetOffset(0xC62FB07CEB661472), LazyThreadSafetyMode.None); + public ref int CP { - get => ref _Handle.AsRef(Schema.GetOffset(0xC62FB07CEB661472)); + get => ref _Handle.AsRef(_CPOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0xC62FB07CBD25CC2A), LazyThreadSafetyMode.None); + public ref Vector Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0xC62FB07CBD25CC2A)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SequenceLifeTimeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SequenceLifeTimeImpl.cs index 223659f9d..1a2e1667e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SequenceLifeTimeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SequenceLifeTimeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_INIT_SequenceLifeTimeImpl : CParticleFunctionInitialize public C_INIT_SequenceLifeTimeImpl(nint handle) : base(handle) { } + private static readonly Lazy _FramerateOffset = new(() => Schema.GetOffset(0xC4BD3FF8F4EAA666), LazyThreadSafetyMode.None); + public ref float Framerate { - get => ref _Handle.AsRef(Schema.GetOffset(0xC4BD3FF8F4EAA666)); + get => ref _Handle.AsRef(_FramerateOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetAttributeToScalarExpressionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetAttributeToScalarExpressionImpl.cs index fd506948b..9d135ef64 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetAttributeToScalarExpressionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetAttributeToScalarExpressionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_INIT_SetAttributeToScalarExpressionImpl : CParticleFunc public C_INIT_SetAttributeToScalarExpressionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExpressionOffset = new(() => Schema.GetOffset(0x7B168019160B2427), LazyThreadSafetyMode.None); + public ref ScalarExpressionType_t Expression { - get => ref _Handle.AsRef(Schema.GetOffset(0x7B168019160B2427)); + get => ref _Handle.AsRef(_ExpressionOffset.Value); } + private static readonly Lazy _Input1Offset = new(() => Schema.GetOffset(0x7B168019E9DA2E24), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Input1 { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x7B168019E9DA2E24)); + get => new CPerParticleFloatInputImpl(_Handle + _Input1Offset.Value); } + private static readonly Lazy _Input2Offset = new(() => Schema.GetOffset(0x7B168019ECDA32DD), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Input2 { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x7B168019ECDA32DD)); + get => new CPerParticleFloatInputImpl(_Handle + _Input2Offset.Value); } + private static readonly Lazy _OutputRemapOffset = new(() => Schema.GetOffset(0x7B1680191239396F), LazyThreadSafetyMode.None); + public CParticleRemapFloatInput OutputRemap { - get => new CParticleRemapFloatInputImpl(_Handle + Schema.GetOffset(0x7B1680191239396F)); + get => new CParticleRemapFloatInputImpl(_Handle + _OutputRemapOffset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0x7B168019324F6F74), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t OutputField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x7B168019324F6F74)); + get => new ParticleAttributeIndex_tImpl(_Handle + _OutputFieldOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x7B168019FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x7B168019FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetFloatAttributeToVectorExpressionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetFloatAttributeToVectorExpressionImpl.cs index 300c194db..5dc82d544 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetFloatAttributeToVectorExpressionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetFloatAttributeToVectorExpressionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_INIT_SetFloatAttributeToVectorExpressionImpl : CParticl public C_INIT_SetFloatAttributeToVectorExpressionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExpressionOffset = new(() => Schema.GetOffset(0x5985075C160B2427), LazyThreadSafetyMode.None); + public ref VectorFloatExpressionType_t Expression { - get => ref _Handle.AsRef(Schema.GetOffset(0x5985075C160B2427)); + get => ref _Handle.AsRef(_ExpressionOffset.Value); } + private static readonly Lazy _Input1Offset = new(() => Schema.GetOffset(0x5985075CE17F27DA), LazyThreadSafetyMode.None); + public CPerParticleVecInput Input1 { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x5985075CE17F27DA)); + get => new CPerParticleVecInputImpl(_Handle + _Input1Offset.Value); } + private static readonly Lazy _Input2Offset = new(() => Schema.GetOffset(0x5985075CE07F2647), LazyThreadSafetyMode.None); + public CPerParticleVecInput Input2 { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x5985075CE07F2647)); + get => new CPerParticleVecInputImpl(_Handle + _Input2Offset.Value); } + private static readonly Lazy _OutputRemapOffset = new(() => Schema.GetOffset(0x5985075C1239396F), LazyThreadSafetyMode.None); + public CParticleRemapFloatInput OutputRemap { - get => new CParticleRemapFloatInputImpl(_Handle + Schema.GetOffset(0x5985075C1239396F)); + get => new CParticleRemapFloatInputImpl(_Handle + _OutputRemapOffset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0x5985075C324F6F74), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t OutputField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x5985075C324F6F74)); + get => new ParticleAttributeIndex_tImpl(_Handle + _OutputFieldOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x5985075CFB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x5985075CFB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetHitboxToClosestImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetHitboxToClosestImpl.cs index 98863078f..b84a538e7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetHitboxToClosestImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetHitboxToClosestImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,36 +17,54 @@ internal partial class C_INIT_SetHitboxToClosestImpl : CParticleFunctionInitiali public C_INIT_SetHitboxToClosestImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x10F3322C3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x10F3322C3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _DesiredHitboxOffset = new(() => Schema.GetOffset(0x10F3322CFD09531B), LazyThreadSafetyMode.None); + public ref int DesiredHitbox { - get => ref _Handle.AsRef(Schema.GetOffset(0x10F3322CFD09531B)); + get => ref _Handle.AsRef(_DesiredHitboxOffset.Value); } + private static readonly Lazy _HitBoxScaleOffset = new(() => Schema.GetOffset(0x10F3322C58EE3FB7), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput HitBoxScale { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x10F3322C58EE3FB7)); + get => new CParticleCollectionVecInputImpl(_Handle + _HitBoxScaleOffset.Value); } + private static readonly Lazy _HitboxSetNameOffset = new(() => Schema.GetOffset(0x10F3322C6A21BB0E), LazyThreadSafetyMode.None); + public string HitboxSetName { get { - var ptr = _Handle + Schema.GetOffset(0x10F3322C6A21BB0E); + var ptr = _Handle + _HitboxSetNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x10F3322C6A21BB0E, value, 128); + set => Schema.SetFixedString(_Handle, _HitboxSetNameOffset.Value, value, 128); } + private static readonly Lazy _UseBonesOffset = new(() => Schema.GetOffset(0x10F3322C10D1938B), LazyThreadSafetyMode.None); + public ref bool UseBones { - get => ref _Handle.AsRef(Schema.GetOffset(0x10F3322C10D1938B)); + get => ref _Handle.AsRef(_UseBonesOffset.Value); } + private static readonly Lazy _UseClosestPointOnHitboxOffset = new(() => Schema.GetOffset(0x10F3322CA983A934), LazyThreadSafetyMode.None); + public ref bool UseClosestPointOnHitbox { - get => ref _Handle.AsRef(Schema.GetOffset(0x10F3322CA983A934)); + get => ref _Handle.AsRef(_UseClosestPointOnHitboxOffset.Value); } + private static readonly Lazy _TestTypeOffset = new(() => Schema.GetOffset(0x10F3322CEB021501), LazyThreadSafetyMode.None); + public ref ClosestPointTestType_t TestType { - get => ref _Handle.AsRef(Schema.GetOffset(0x10F3322CEB021501)); + get => ref _Handle.AsRef(_TestTypeOffset.Value); } + private static readonly Lazy _HybridRatioOffset = new(() => Schema.GetOffset(0x10F3322CC2A9455C), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput HybridRatio { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x10F3322CC2A9455C)); + get => new CParticleCollectionFloatInputImpl(_Handle + _HybridRatioOffset.Value); } + private static readonly Lazy _UpdatePositionOffset = new(() => Schema.GetOffset(0x10F3322C65B36E87), LazyThreadSafetyMode.None); + public ref bool UpdatePosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x10F3322C65B36E87)); + get => ref _Handle.AsRef(_UpdatePositionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetHitboxToModelImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetHitboxToModelImpl.cs index ae87af298..a60ffeafb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetHitboxToModelImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetHitboxToModelImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,39 +17,59 @@ internal partial class C_INIT_SetHitboxToModelImpl : CParticleFunctionInitialize public C_INIT_SetHitboxToModelImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x7129E7BA3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x7129E7BA3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _ForceInModelOffset = new(() => Schema.GetOffset(0x7129E7BAA3C747AC), LazyThreadSafetyMode.None); + public ref int ForceInModel { - get => ref _Handle.AsRef(Schema.GetOffset(0x7129E7BAA3C747AC)); + get => ref _Handle.AsRef(_ForceInModelOffset.Value); } + private static readonly Lazy _EvenDistributionOffset = new(() => Schema.GetOffset(0x7129E7BA84932067), LazyThreadSafetyMode.None); + public ref bool EvenDistribution { - get => ref _Handle.AsRef(Schema.GetOffset(0x7129E7BA84932067)); + get => ref _Handle.AsRef(_EvenDistributionOffset.Value); } + private static readonly Lazy _DesiredHitboxOffset = new(() => Schema.GetOffset(0x7129E7BAFD09531B), LazyThreadSafetyMode.None); + public ref int DesiredHitbox { - get => ref _Handle.AsRef(Schema.GetOffset(0x7129E7BAFD09531B)); + get => ref _Handle.AsRef(_DesiredHitboxOffset.Value); } + private static readonly Lazy _HitBoxScaleOffset = new(() => Schema.GetOffset(0x7129E7BA58EE3FB7), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput HitBoxScale { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x7129E7BA58EE3FB7)); + get => new CParticleCollectionVecInputImpl(_Handle + _HitBoxScaleOffset.Value); } + private static readonly Lazy _DirectionBiasOffset = new(() => Schema.GetOffset(0x7129E7BA5A1697CF), LazyThreadSafetyMode.None); + public ref Vector DirectionBias { - get => ref _Handle.AsRef(Schema.GetOffset(0x7129E7BA5A1697CF)); + get => ref _Handle.AsRef(_DirectionBiasOffset.Value); } + private static readonly Lazy _MaintainHitboxOffset = new(() => Schema.GetOffset(0x7129E7BAF2061926), LazyThreadSafetyMode.None); + public ref bool MaintainHitbox { - get => ref _Handle.AsRef(Schema.GetOffset(0x7129E7BAF2061926)); + get => ref _Handle.AsRef(_MaintainHitboxOffset.Value); } + private static readonly Lazy _UseBonesOffset = new(() => Schema.GetOffset(0x7129E7BA10D1938B), LazyThreadSafetyMode.None); + public ref bool UseBones { - get => ref _Handle.AsRef(Schema.GetOffset(0x7129E7BA10D1938B)); + get => ref _Handle.AsRef(_UseBonesOffset.Value); } + private static readonly Lazy _HitboxSetNameOffset = new(() => Schema.GetOffset(0x7129E7BA6A21BB0E), LazyThreadSafetyMode.None); + public string HitboxSetName { get { - var ptr = _Handle + Schema.GetOffset(0x7129E7BA6A21BB0E); + var ptr = _Handle + _HitboxSetNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x7129E7BA6A21BB0E, value, 128); + set => Schema.SetFixedString(_Handle, _HitboxSetNameOffset.Value, value, 128); } + private static readonly Lazy _ShellSizeOffset = new(() => Schema.GetOffset(0x7129E7BA04D01B22), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ShellSize { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x7129E7BA04D01B22)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ShellSizeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetRigidAttachmentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetRigidAttachmentImpl.cs index 9e31736a3..27cd9585b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetRigidAttachmentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetRigidAttachmentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_INIT_SetRigidAttachmentImpl : CParticleFunctionInitiali public C_INIT_SetRigidAttachmentImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0xF6F728143F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6F728143F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _FieldInputOffset = new(() => Schema.GetOffset(0xF6F72814AE775669), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xF6F72814AE775669)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xF6F72814E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xF6F72814E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _LocalSpaceOffset = new(() => Schema.GetOffset(0xF6F7281462418E6E), LazyThreadSafetyMode.None); + public ref bool LocalSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6F7281462418E6E)); + get => ref _Handle.AsRef(_LocalSpaceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetVectorAttributeToVectorExpressionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetVectorAttributeToVectorExpressionImpl.cs index 9259f8910..14cd16a5a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetVectorAttributeToVectorExpressionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_SetVectorAttributeToVectorExpressionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_INIT_SetVectorAttributeToVectorExpressionImpl : CPartic public C_INIT_SetVectorAttributeToVectorExpressionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExpressionOffset = new(() => Schema.GetOffset(0x71A0FB13160B2427), LazyThreadSafetyMode.None); + public ref VectorExpressionType_t Expression { - get => ref _Handle.AsRef(Schema.GetOffset(0x71A0FB13160B2427)); + get => ref _Handle.AsRef(_ExpressionOffset.Value); } + private static readonly Lazy _Input1Offset = new(() => Schema.GetOffset(0x71A0FB13E17F27DA), LazyThreadSafetyMode.None); + public CPerParticleVecInput Input1 { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x71A0FB13E17F27DA)); + get => new CPerParticleVecInputImpl(_Handle + _Input1Offset.Value); } + private static readonly Lazy _Input2Offset = new(() => Schema.GetOffset(0x71A0FB13E07F2647), LazyThreadSafetyMode.None); + public CPerParticleVecInput Input2 { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x71A0FB13E07F2647)); + get => new CPerParticleVecInputImpl(_Handle + _Input2Offset.Value); } + private static readonly Lazy _LerpOffset = new(() => Schema.GetOffset(0x71A0FB13622FAB06), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Lerp { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x71A0FB13622FAB06)); + get => new CPerParticleFloatInputImpl(_Handle + _LerpOffset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0x71A0FB13324F6F74), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t OutputField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x71A0FB13324F6F74)); + get => new ParticleAttributeIndex_tImpl(_Handle + _OutputFieldOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x71A0FB13FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x71A0FB13FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _NormalizedOutputOffset = new(() => Schema.GetOffset(0x71A0FB130AA98C55), LazyThreadSafetyMode.None); + public ref bool NormalizedOutput { - get => ref _Handle.AsRef(Schema.GetOffset(0x71A0FB130AA98C55)); + get => ref _Handle.AsRef(_NormalizedOutputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_StatusEffectCitadelImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_StatusEffectCitadelImpl.cs index db2b9f233..6eb24aa6f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_StatusEffectCitadelImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_StatusEffectCitadelImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,62 +17,100 @@ internal partial class C_INIT_StatusEffectCitadelImpl : CParticleFunctionInitial public C_INIT_StatusEffectCitadelImpl(nint handle) : base(handle) { } + private static readonly Lazy _SFXColorWarpAmountOffset = new(() => Schema.GetOffset(0x6420071B7AE5DF43), LazyThreadSafetyMode.None); + public ref float SFXColorWarpAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071B7AE5DF43)); + get => ref _Handle.AsRef(_SFXColorWarpAmountOffset.Value); } + private static readonly Lazy _SFXNormalAmountOffset = new(() => Schema.GetOffset(0x6420071BACB8EED5), LazyThreadSafetyMode.None); + public ref float SFXNormalAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071BACB8EED5)); + get => ref _Handle.AsRef(_SFXNormalAmountOffset.Value); } + private static readonly Lazy _SFXMetalnessAmountOffset = new(() => Schema.GetOffset(0x6420071B02A1BB5A), LazyThreadSafetyMode.None); + public ref float SFXMetalnessAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071B02A1BB5A)); + get => ref _Handle.AsRef(_SFXMetalnessAmountOffset.Value); } + private static readonly Lazy _SFXRoughnessAmountOffset = new(() => Schema.GetOffset(0x6420071BC6E86EA4), LazyThreadSafetyMode.None); + public ref float SFXRoughnessAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071BC6E86EA4)); + get => ref _Handle.AsRef(_SFXRoughnessAmountOffset.Value); } + private static readonly Lazy _SFXSelfIllumAmountOffset = new(() => Schema.GetOffset(0x6420071B7BD60AE5), LazyThreadSafetyMode.None); + public ref float SFXSelfIllumAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071B7BD60AE5)); + get => ref _Handle.AsRef(_SFXSelfIllumAmountOffset.Value); } + private static readonly Lazy _SFXSScaleOffset = new(() => Schema.GetOffset(0x6420071BCA52F1F3), LazyThreadSafetyMode.None); + public ref float SFXSScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071BCA52F1F3)); + get => ref _Handle.AsRef(_SFXSScaleOffset.Value); } + private static readonly Lazy _SFXSScrollXOffset = new(() => Schema.GetOffset(0x6420071BF8557E0E), LazyThreadSafetyMode.None); + public ref float SFXSScrollX { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071BF8557E0E)); + get => ref _Handle.AsRef(_SFXSScrollXOffset.Value); } + private static readonly Lazy _SFXSScrollYOffset = new(() => Schema.GetOffset(0x6420071BF9557FA1), LazyThreadSafetyMode.None); + public ref float SFXSScrollY { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071BF9557FA1)); + get => ref _Handle.AsRef(_SFXSScrollYOffset.Value); } + private static readonly Lazy _SFXSScrollZOffset = new(() => Schema.GetOffset(0x6420071BF6557AE8), LazyThreadSafetyMode.None); + public ref float SFXSScrollZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071BF6557AE8)); + get => ref _Handle.AsRef(_SFXSScrollZOffset.Value); } + private static readonly Lazy _SFXSOffsetXOffset = new(() => Schema.GetOffset(0x6420071BFA92D3C0), LazyThreadSafetyMode.None); + public ref float SFXSOffsetX { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071BFA92D3C0)); + get => ref _Handle.AsRef(_SFXSOffsetXOffset.Value); } + private static readonly Lazy _SFXSOffsetYOffset = new(() => Schema.GetOffset(0x6420071BFB92D553), LazyThreadSafetyMode.None); + public ref float SFXSOffsetY { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071BFB92D553)); + get => ref _Handle.AsRef(_SFXSOffsetYOffset.Value); } + private static readonly Lazy _SFXSOffsetZOffset = new(() => Schema.GetOffset(0x6420071BFC92D6E6), LazyThreadSafetyMode.None); + public ref float SFXSOffsetZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071BFC92D6E6)); + get => ref _Handle.AsRef(_SFXSOffsetZOffset.Value); } + private static readonly Lazy _DetailComboOffset = new(() => Schema.GetOffset(0x6420071B928C6606), LazyThreadSafetyMode.None); + public ref DetailCombo_t DetailCombo { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071B928C6606)); + get => ref _Handle.AsRef(_DetailComboOffset.Value); } + private static readonly Lazy _SFXSDetailAmountOffset = new(() => Schema.GetOffset(0x6420071B5B8C7946), LazyThreadSafetyMode.None); + public ref float SFXSDetailAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071B5B8C7946)); + get => ref _Handle.AsRef(_SFXSDetailAmountOffset.Value); } + private static readonly Lazy _SFXSDetailScaleOffset = new(() => Schema.GetOffset(0x6420071BCC4A4840), LazyThreadSafetyMode.None); + public ref float SFXSDetailScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071BCC4A4840)); + get => ref _Handle.AsRef(_SFXSDetailScaleOffset.Value); } + private static readonly Lazy _SFXSDetailScrollXOffset = new(() => Schema.GetOffset(0x6420071BF45EED31), LazyThreadSafetyMode.None); + public ref float SFXSDetailScrollX { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071BF45EED31)); + get => ref _Handle.AsRef(_SFXSDetailScrollXOffset.Value); } + private static readonly Lazy _SFXSDetailScrollYOffset = new(() => Schema.GetOffset(0x6420071BF35EEB9E), LazyThreadSafetyMode.None); + public ref float SFXSDetailScrollY { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071BF35EEB9E)); + get => ref _Handle.AsRef(_SFXSDetailScrollYOffset.Value); } + private static readonly Lazy _SFXSDetailScrollZOffset = new(() => Schema.GetOffset(0x6420071BF25EEA0B), LazyThreadSafetyMode.None); + public ref float SFXSDetailScrollZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071BF25EEA0B)); + get => ref _Handle.AsRef(_SFXSDetailScrollZOffset.Value); } + private static readonly Lazy _SFXSUseModelUVsOffset = new(() => Schema.GetOffset(0x6420071B8F106179), LazyThreadSafetyMode.None); + public ref float SFXSUseModelUVs { - get => ref _Handle.AsRef(Schema.GetOffset(0x6420071B8F106179)); + get => ref _Handle.AsRef(_SFXSUseModelUVsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_StatusEffectImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_StatusEffectImpl.cs index cd05ae422..52f2b4c74 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_StatusEffectImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_StatusEffectImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,59 +17,95 @@ internal partial class C_INIT_StatusEffectImpl : CParticleFunctionInitializerImp public C_INIT_StatusEffectImpl(nint handle) : base(handle) { } + private static readonly Lazy _Detail2ComboOffset = new(() => Schema.GetOffset(0x4B342FEDDABDBAA0), LazyThreadSafetyMode.None); + public ref Detail2Combo_t Detail2Combo { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B342FEDDABDBAA0)); + get => ref _Handle.AsRef(_Detail2ComboOffset.Value); } + private static readonly Lazy _Detail2RotationOffset = new(() => Schema.GetOffset(0x4B342FEDA43F4C72), LazyThreadSafetyMode.None); + public ref float Detail2Rotation { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B342FEDA43F4C72)); + get => ref _Handle.AsRef(_Detail2RotationOffset.Value); } + private static readonly Lazy _Detail2ScaleOffset = new(() => Schema.GetOffset(0x4B342FED408BC6AE), LazyThreadSafetyMode.None); + public ref float Detail2Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B342FED408BC6AE)); + get => ref _Handle.AsRef(_Detail2ScaleOffset.Value); } + private static readonly Lazy _Detail2BlendFactorOffset = new(() => Schema.GetOffset(0x4B342FEDC0666858), LazyThreadSafetyMode.None); + public ref float Detail2BlendFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B342FEDC0666858)); + get => ref _Handle.AsRef(_Detail2BlendFactorOffset.Value); } + private static readonly Lazy _ColorWarpIntensityOffset = new(() => Schema.GetOffset(0x4B342FED03BEB6ED), LazyThreadSafetyMode.None); + public ref float ColorWarpIntensity { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B342FED03BEB6ED)); + get => ref _Handle.AsRef(_ColorWarpIntensityOffset.Value); } + private static readonly Lazy _DiffuseWarpBlendToFullOffset = new(() => Schema.GetOffset(0x4B342FED74B5C4FC), LazyThreadSafetyMode.None); + public ref float DiffuseWarpBlendToFull { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B342FED74B5C4FC)); + get => ref _Handle.AsRef(_DiffuseWarpBlendToFullOffset.Value); } + private static readonly Lazy _EnvMapIntensityOffset = new(() => Schema.GetOffset(0x4B342FEDF3BE760D), LazyThreadSafetyMode.None); + public ref float EnvMapIntensity { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B342FEDF3BE760D)); + get => ref _Handle.AsRef(_EnvMapIntensityOffset.Value); } + private static readonly Lazy _AmbientScaleOffset = new(() => Schema.GetOffset(0x4B342FED7C839F9D), LazyThreadSafetyMode.None); + public ref float AmbientScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B342FED7C839F9D)); + get => ref _Handle.AsRef(_AmbientScaleOffset.Value); } + private static readonly Lazy _SpecularColorOffset = new(() => Schema.GetOffset(0x4B342FED524950B7), LazyThreadSafetyMode.None); + public ref Color SpecularColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B342FED524950B7)); + get => ref _Handle.AsRef(_SpecularColorOffset.Value); } + private static readonly Lazy _SpecularScaleOffset = new(() => Schema.GetOffset(0x4B342FED3444DCD4), LazyThreadSafetyMode.None); + public ref float SpecularScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B342FED3444DCD4)); + get => ref _Handle.AsRef(_SpecularScaleOffset.Value); } + private static readonly Lazy _SpecularExponentOffset = new(() => Schema.GetOffset(0x4B342FED08D42D79), LazyThreadSafetyMode.None); + public ref float SpecularExponent { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B342FED08D42D79)); + get => ref _Handle.AsRef(_SpecularExponentOffset.Value); } + private static readonly Lazy _SpecularExponentBlendToFullOffset = new(() => Schema.GetOffset(0x4B342FEDF9B144E4), LazyThreadSafetyMode.None); + public ref float SpecularExponentBlendToFull { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B342FEDF9B144E4)); + get => ref _Handle.AsRef(_SpecularExponentBlendToFullOffset.Value); } + private static readonly Lazy _SpecularBlendToFullOffset = new(() => Schema.GetOffset(0x4B342FEDD59D4FD9), LazyThreadSafetyMode.None); + public ref float SpecularBlendToFull { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B342FEDD59D4FD9)); + get => ref _Handle.AsRef(_SpecularBlendToFullOffset.Value); } + private static readonly Lazy _RimLightColorOffset = new(() => Schema.GetOffset(0x4B342FEDCBFCCC98), LazyThreadSafetyMode.None); + public ref Color RimLightColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B342FEDCBFCCC98)); + get => ref _Handle.AsRef(_RimLightColorOffset.Value); } + private static readonly Lazy _RimLightScaleOffset = new(() => Schema.GetOffset(0x4B342FED23E615CF), LazyThreadSafetyMode.None); + public ref float RimLightScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B342FED23E615CF)); + get => ref _Handle.AsRef(_RimLightScaleOffset.Value); } + private static readonly Lazy _ReflectionsTintByBaseBlendToNoneOffset = new(() => Schema.GetOffset(0x4B342FEDC354754A), LazyThreadSafetyMode.None); + public ref float ReflectionsTintByBaseBlendToNone { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B342FEDC354754A)); + get => ref _Handle.AsRef(_ReflectionsTintByBaseBlendToNoneOffset.Value); } + private static readonly Lazy _MetalnessBlendToFullOffset = new(() => Schema.GetOffset(0x4B342FED44B6A02C), LazyThreadSafetyMode.None); + public ref float MetalnessBlendToFull { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B342FED44B6A02C)); + get => ref _Handle.AsRef(_MetalnessBlendToFullOffset.Value); } + private static readonly Lazy _SelfIllumBlendToFullOffset = new(() => Schema.GetOffset(0x4B342FED0FCD5A19), LazyThreadSafetyMode.None); + public ref float SelfIllumBlendToFull { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B342FED0FCD5A19)); + get => ref _Handle.AsRef(_SelfIllumBlendToFullOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_VelocityFromCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_VelocityFromCPImpl.cs index 9c36ef819..f714731d4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_VelocityFromCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_VelocityFromCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_INIT_VelocityFromCPImpl : CParticleFunctionInitializerI public C_INIT_VelocityFromCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _VelocityInputOffset = new(() => Schema.GetOffset(0x1788D69A30C18956), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput VelocityInput { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x1788D69A30C18956)); + get => new CParticleCollectionVecInputImpl(_Handle + _VelocityInputOffset.Value); } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0x1788D69A3A9ED669), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x1788D69A3A9ED669)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _VelocityScaleOffset = new(() => Schema.GetOffset(0x1788D69AE161DDAA), LazyThreadSafetyMode.None); + public ref float VelocityScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x1788D69AE161DDAA)); + get => ref _Handle.AsRef(_VelocityScaleOffset.Value); } + private static readonly Lazy _DirectionOnlyOffset = new(() => Schema.GetOffset(0x1788D69A7F403B2C), LazyThreadSafetyMode.None); + public ref bool DirectionOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0x1788D69A7F403B2C)); + get => ref _Handle.AsRef(_DirectionOnlyOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_VelocityFromNormalImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_VelocityFromNormalImpl.cs index 4933ce89a..d4361949a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_VelocityFromNormalImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_VelocityFromNormalImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_INIT_VelocityFromNormalImpl : CParticleFunctionInitiali public C_INIT_VelocityFromNormalImpl(nint handle) : base(handle) { } + private static readonly Lazy _SpeedMinOffset = new(() => Schema.GetOffset(0x33D27066B989E1F8), LazyThreadSafetyMode.None); + public ref float SpeedMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x33D27066B989E1F8)); + get => ref _Handle.AsRef(_SpeedMinOffset.Value); } + private static readonly Lazy _SpeedMaxOffset = new(() => Schema.GetOffset(0x33D27066CF9D8C52), LazyThreadSafetyMode.None); + public ref float SpeedMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x33D27066CF9D8C52)); + get => ref _Handle.AsRef(_SpeedMaxOffset.Value); } + private static readonly Lazy _IgnoreDtOffset = new(() => Schema.GetOffset(0x33D27066330C0603), LazyThreadSafetyMode.None); + public ref bool IgnoreDt { - get => ref _Handle.AsRef(Schema.GetOffset(0x33D27066330C0603)); + get => ref _Handle.AsRef(_IgnoreDtOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_VelocityRadialRandomImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_VelocityRadialRandomImpl.cs index bf40c25b0..f9c69cb43 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_VelocityRadialRandomImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_VelocityRadialRandomImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_INIT_VelocityRadialRandomImpl : CParticleFunctionInitia public C_INIT_VelocityRadialRandomImpl(nint handle) : base(handle) { } + private static readonly Lazy _PerParticleCenterOffset = new(() => Schema.GetOffset(0x61A3C8D50314399B), LazyThreadSafetyMode.None); + public ref bool PerParticleCenter { - get => ref _Handle.AsRef(Schema.GetOffset(0x61A3C8D50314399B)); + get => ref _Handle.AsRef(_PerParticleCenterOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x61A3C8D53F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x61A3C8D53F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _PositionOffset = new(() => Schema.GetOffset(0x61A3C8D5E092EE6A), LazyThreadSafetyMode.None); + public CPerParticleVecInput Position { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x61A3C8D5E092EE6A)); + get => new CPerParticleVecInputImpl(_Handle + _PositionOffset.Value); } + private static readonly Lazy _FwdOffset = new(() => Schema.GetOffset(0x61A3C8D5974CB62A), LazyThreadSafetyMode.None); + public CPerParticleVecInput Fwd { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x61A3C8D5974CB62A)); + get => new CPerParticleVecInputImpl(_Handle + _FwdOffset.Value); } + private static readonly Lazy _SpeedMinOffset = new(() => Schema.GetOffset(0x61A3C8D5B989E1F8), LazyThreadSafetyMode.None); + public CPerParticleFloatInput SpeedMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x61A3C8D5B989E1F8)); + get => new CPerParticleFloatInputImpl(_Handle + _SpeedMinOffset.Value); } + private static readonly Lazy _SpeedMaxOffset = new(() => Schema.GetOffset(0x61A3C8D5CF9D8C52), LazyThreadSafetyMode.None); + public CPerParticleFloatInput SpeedMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x61A3C8D5CF9D8C52)); + get => new CPerParticleFloatInputImpl(_Handle + _SpeedMaxOffset.Value); } + private static readonly Lazy _LocalCoordinateSystemSpeedScaleOffset = new(() => Schema.GetOffset(0x61A3C8D5CEF062F0), LazyThreadSafetyMode.None); + public ref Vector LocalCoordinateSystemSpeedScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x61A3C8D5CEF062F0)); + get => ref _Handle.AsRef(_LocalCoordinateSystemSpeedScaleOffset.Value); } + private static readonly Lazy _IgnoreDeltaOffset = new(() => Schema.GetOffset(0x61A3C8D5A944B263), LazyThreadSafetyMode.None); + public ref bool IgnoreDelta { - get => ref _Handle.AsRef(Schema.GetOffset(0x61A3C8D5A944B263)); + get => ref _Handle.AsRef(_IgnoreDeltaOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_VelocityRandomImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_VelocityRandomImpl.cs index 524a12ba0..74d814aa1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_VelocityRandomImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_INIT_VelocityRandomImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_INIT_VelocityRandomImpl : CParticleFunctionInitializerI public C_INIT_VelocityRandomImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0xFCCBA9E3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCCBA9E3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _SpeedMinOffset = new(() => Schema.GetOffset(0xFCCBA9EB989E1F8), LazyThreadSafetyMode.None); + public CPerParticleFloatInput SpeedMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xFCCBA9EB989E1F8)); + get => new CPerParticleFloatInputImpl(_Handle + _SpeedMinOffset.Value); } + private static readonly Lazy _SpeedMaxOffset = new(() => Schema.GetOffset(0xFCCBA9ECF9D8C52), LazyThreadSafetyMode.None); + public CPerParticleFloatInput SpeedMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xFCCBA9ECF9D8C52)); + get => new CPerParticleFloatInputImpl(_Handle + _SpeedMaxOffset.Value); } + private static readonly Lazy _LocalCoordinateSystemSpeedMinOffset = new(() => Schema.GetOffset(0xFCCBA9EA4A0F1AE), LazyThreadSafetyMode.None); + public CPerParticleVecInput LocalCoordinateSystemSpeedMin { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xFCCBA9EA4A0F1AE)); + get => new CPerParticleVecInputImpl(_Handle + _LocalCoordinateSystemSpeedMinOffset.Value); } + private static readonly Lazy _LocalCoordinateSystemSpeedMaxOffset = new(() => Schema.GetOffset(0xFCCBA9E968D53EC), LazyThreadSafetyMode.None); + public CPerParticleVecInput LocalCoordinateSystemSpeedMax { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xFCCBA9E968D53EC)); + get => new CPerParticleVecInputImpl(_Handle + _LocalCoordinateSystemSpeedMaxOffset.Value); } + private static readonly Lazy _IgnoreDTOffset = new(() => Schema.GetOffset(0xFCCBA9E530C3863), LazyThreadSafetyMode.None); + public ref bool IgnoreDT { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCCBA9E530C3863)); + get => ref _Handle.AsRef(_IgnoreDTOffset.Value); } + private static readonly Lazy _RandomnessParametersOffset = new(() => Schema.GetOffset(0xFCCBA9E7EDF50AD), LazyThreadSafetyMode.None); + public CRandomNumberGeneratorParameters RandomnessParameters { - get => new CRandomNumberGeneratorParametersImpl(_Handle + Schema.GetOffset(0xFCCBA9E7EDF50AD)); + get => new CRandomNumberGeneratorParametersImpl(_Handle + _RandomnessParametersOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_AlphaDecayImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_AlphaDecayImpl.cs index 34656d444..5516d4d4d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_AlphaDecayImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_AlphaDecayImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_OP_AlphaDecayImpl : CParticleFunctionOperatorImpl, C_OP public C_OP_AlphaDecayImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinAlphaOffset = new(() => Schema.GetOffset(0x26EE2FFBEC24C4FF), LazyThreadSafetyMode.None); + public ref float MinAlpha { - get => ref _Handle.AsRef(Schema.GetOffset(0x26EE2FFBEC24C4FF)); + get => ref _Handle.AsRef(_MinAlphaOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_AttractToControlPointImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_AttractToControlPointImpl.cs index 95d250a43..d398ad6f2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_AttractToControlPointImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_AttractToControlPointImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_AttractToControlPointImpl : CParticleFunctionForceIm public C_OP_AttractToControlPointImpl(nint handle) : base(handle) { } + private static readonly Lazy _ComponentScaleOffset = new(() => Schema.GetOffset(0xBD30C24AB17954E2), LazyThreadSafetyMode.None); + public ref Vector ComponentScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xBD30C24AB17954E2)); + get => ref _Handle.AsRef(_ComponentScaleOffset.Value); } + private static readonly Lazy _ForceAmountOffset = new(() => Schema.GetOffset(0xBD30C24A70831A84), LazyThreadSafetyMode.None); + public CPerParticleFloatInput ForceAmount { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xBD30C24A70831A84)); + get => new CPerParticleFloatInputImpl(_Handle + _ForceAmountOffset.Value); } + private static readonly Lazy _FalloffPowerOffset = new(() => Schema.GetOffset(0xBD30C24AE3163382), LazyThreadSafetyMode.None); + public ref float FalloffPower { - get => ref _Handle.AsRef(Schema.GetOffset(0xBD30C24AE3163382)); + get => ref _Handle.AsRef(_FalloffPowerOffset.Value); } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0xBD30C24AB3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0xBD30C24AB3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _ForceAmountMinOffset = new(() => Schema.GetOffset(0xBD30C24AEBB56458), LazyThreadSafetyMode.None); + public CPerParticleFloatInput ForceAmountMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xBD30C24AEBB56458)); + get => new CPerParticleFloatInputImpl(_Handle + _ForceAmountMinOffset.Value); } + private static readonly Lazy _ApplyMinForceOffset = new(() => Schema.GetOffset(0xBD30C24AF72AC3CC), LazyThreadSafetyMode.None); + public ref bool ApplyMinForce { - get => ref _Handle.AsRef(Schema.GetOffset(0xBD30C24AF72AC3CC)); + get => ref _Handle.AsRef(_ApplyMinForceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_BasicMovementImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_BasicMovementImpl.cs index d6248660b..846c0e87f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_BasicMovementImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_BasicMovementImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_BasicMovementImpl : CParticleFunctionOperatorImpl, C public C_OP_BasicMovementImpl(nint handle) : base(handle) { } + private static readonly Lazy _GravityOffset = new(() => Schema.GetOffset(0xC8273B20790C70C5), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput Gravity { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xC8273B20790C70C5)); + get => new CParticleCollectionVecInputImpl(_Handle + _GravityOffset.Value); } + private static readonly Lazy _DragOffset = new(() => Schema.GetOffset(0xC8273B2050DA6497), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Drag { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xC8273B2050DA6497)); + get => new CParticleCollectionFloatInputImpl(_Handle + _DragOffset.Value); } + private static readonly Lazy _MassControlsOffset = new(() => Schema.GetOffset(0xC8273B2039CBEACB), LazyThreadSafetyMode.None); + public CParticleMassCalculationParameters MassControls { - get => new CParticleMassCalculationParametersImpl(_Handle + Schema.GetOffset(0xC8273B2039CBEACB)); + get => new CParticleMassCalculationParametersImpl(_Handle + _MassControlsOffset.Value); } + private static readonly Lazy _MaxConstraintPassesOffset = new(() => Schema.GetOffset(0xC8273B20D83D0CAB), LazyThreadSafetyMode.None); + public ref int MaxConstraintPasses { - get => ref _Handle.AsRef(Schema.GetOffset(0xC8273B20D83D0CAB)); + get => ref _Handle.AsRef(_MaxConstraintPassesOffset.Value); } + private static readonly Lazy _UseNewCodeOffset = new(() => Schema.GetOffset(0xC8273B207C6D1CDF), LazyThreadSafetyMode.None); + public ref bool UseNewCode { - get => ref _Handle.AsRef(Schema.GetOffset(0xC8273B207C6D1CDF)); + get => ref _Handle.AsRef(_UseNewCodeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_BoxConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_BoxConstraintImpl.cs index b94874f31..f43bb06f6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_BoxConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_BoxConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_BoxConstraintImpl : CParticleFunctionConstraintImpl, public C_OP_BoxConstraintImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinOffset = new(() => Schema.GetOffset(0x111EED71B0765F37), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput Min { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x111EED71B0765F37)); + get => new CParticleCollectionVecInputImpl(_Handle + _MinOffset.Value); } + private static readonly Lazy _MaxOffset = new(() => Schema.GetOffset(0x111EED71BE89FCF9), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput Max { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x111EED71BE89FCF9)); + get => new CParticleCollectionVecInputImpl(_Handle + _MaxOffset.Value); } + private static readonly Lazy _CPOffset = new(() => Schema.GetOffset(0x111EED71EB661472), LazyThreadSafetyMode.None); + public ref int CP { - get => ref _Handle.AsRef(Schema.GetOffset(0x111EED71EB661472)); + get => ref _Handle.AsRef(_CPOffset.Value); } + private static readonly Lazy _LocalSpaceOffset = new(() => Schema.GetOffset(0x111EED7162418E6E), LazyThreadSafetyMode.None); + public ref bool LocalSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x111EED7162418E6E)); + get => ref _Handle.AsRef(_LocalSpaceOffset.Value); } + private static readonly Lazy _AccountForRadiusOffset = new(() => Schema.GetOffset(0x111EED71E4DE9E21), LazyThreadSafetyMode.None); + public ref bool AccountForRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x111EED71E4DE9E21)); + get => ref _Handle.AsRef(_AccountForRadiusOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CPOffsetToPercentageBetweenCPsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CPOffsetToPercentageBetweenCPsImpl.cs index bd8738b09..c7faf3a75 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CPOffsetToPercentageBetweenCPsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CPOffsetToPercentageBetweenCPsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class C_OP_CPOffsetToPercentageBetweenCPsImpl : CParticleFuncti public C_OP_CPOffsetToPercentageBetweenCPsImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x93039DC8E88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x93039DC8E88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x93039DC8D6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x93039DC8D6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _InputBiasOffset = new(() => Schema.GetOffset(0x93039DC885F2736C), LazyThreadSafetyMode.None); + public ref float InputBias { - get => ref _Handle.AsRef(Schema.GetOffset(0x93039DC885F2736C)); + get => ref _Handle.AsRef(_InputBiasOffset.Value); } + private static readonly Lazy _StartCPOffset = new(() => Schema.GetOffset(0x93039DC82C2FF970), LazyThreadSafetyMode.None); + public ref int StartCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x93039DC82C2FF970)); + get => ref _Handle.AsRef(_StartCPOffset.Value); } + private static readonly Lazy _EndCPOffset = new(() => Schema.GetOffset(0x93039DC88C9B426D), LazyThreadSafetyMode.None); + public ref int EndCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x93039DC88C9B426D)); + get => ref _Handle.AsRef(_EndCPOffset.Value); } + private static readonly Lazy _OffsetCPOffset = new(() => Schema.GetOffset(0x93039DC8587E7DA5), LazyThreadSafetyMode.None); + public ref int OffsetCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x93039DC8587E7DA5)); + get => ref _Handle.AsRef(_OffsetCPOffset.Value); } + private static readonly Lazy _OuputCPOffset = new(() => Schema.GetOffset(0x93039DC8FCE2222D), LazyThreadSafetyMode.None); + public ref int OuputCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x93039DC8FCE2222D)); + get => ref _Handle.AsRef(_OuputCPOffset.Value); } + private static readonly Lazy _InputCPOffset = new(() => Schema.GetOffset(0x93039DC8F39A3C14), LazyThreadSafetyMode.None); + public ref int InputCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x93039DC8F39A3C14)); + get => ref _Handle.AsRef(_InputCPOffset.Value); } + private static readonly Lazy _RadialCheckOffset = new(() => Schema.GetOffset(0x93039DC8496187DE), LazyThreadSafetyMode.None); + public ref bool RadialCheck { - get => ref _Handle.AsRef(Schema.GetOffset(0x93039DC8496187DE)); + get => ref _Handle.AsRef(_RadialCheckOffset.Value); } + private static readonly Lazy _ScaleOffsetOffset = new(() => Schema.GetOffset(0x93039DC8AB39558E), LazyThreadSafetyMode.None); + public ref bool ScaleOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x93039DC8AB39558E)); + get => ref _Handle.AsRef(_ScaleOffsetOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0x93039DC8BD25CC2A), LazyThreadSafetyMode.None); + public ref Vector Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0x93039DC8BD25CC2A)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CPVelocityForceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CPVelocityForceImpl.cs index 00369cbd6..64f1ba260 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CPVelocityForceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CPVelocityForceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_CPVelocityForceImpl : CParticleFunctionForceImpl, C_ public C_OP_CPVelocityForceImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x4C04FC843F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C04FC843F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x4C04FC84B731A42F), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Scale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x4C04FC84B731A42F)); + get => new CPerParticleFloatInputImpl(_Handle + _ScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CalculateVectorAttributeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CalculateVectorAttributeImpl.cs index 755694764..b51d25e32 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CalculateVectorAttributeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CalculateVectorAttributeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class C_OP_CalculateVectorAttributeImpl : CParticleFunctionOper public C_OP_CalculateVectorAttributeImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartValueOffset = new(() => Schema.GetOffset(0x447A59BC56F9B8E8), LazyThreadSafetyMode.None); + public ref Vector StartValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x447A59BC56F9B8E8)); + get => ref _Handle.AsRef(_StartValueOffset.Value); } + private static readonly Lazy _FieldInput1Offset = new(() => Schema.GetOffset(0x447A59BCFDDCEC88), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput1 { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x447A59BCFDDCEC88)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInput1Offset.Value); } + private static readonly Lazy _InputScale1Offset = new(() => Schema.GetOffset(0x447A59BC66B56E68), LazyThreadSafetyMode.None); + public ref float InputScale1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x447A59BC66B56E68)); + get => ref _Handle.AsRef(_InputScale1Offset.Value); } + private static readonly Lazy _FieldInput2Offset = new(() => Schema.GetOffset(0x447A59BC00DCF141), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput2 { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x447A59BC00DCF141)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInput2Offset.Value); } + private static readonly Lazy _InputScale2Offset = new(() => Schema.GetOffset(0x447A59BC69B57321), LazyThreadSafetyMode.None); + public ref float InputScale2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x447A59BC69B57321)); + get => ref _Handle.AsRef(_InputScale2Offset.Value); } + private static readonly Lazy _ControlPointInput1Offset = new(() => Schema.GetOffset(0x447A59BC2FE852C3), LazyThreadSafetyMode.None); + public ControlPointReference_t ControlPointInput1 { - get => new ControlPointReference_tImpl(_Handle + Schema.GetOffset(0x447A59BC2FE852C3)); + get => new ControlPointReference_tImpl(_Handle + _ControlPointInput1Offset.Value); } + private static readonly Lazy _ControlPointScale1Offset = new(() => Schema.GetOffset(0x447A59BC863910DF), LazyThreadSafetyMode.None); + public ref float ControlPointScale1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x447A59BC863910DF)); + get => ref _Handle.AsRef(_ControlPointScale1Offset.Value); } + private static readonly Lazy _ControlPointInput2Offset = new(() => Schema.GetOffset(0x447A59BC30E85456), LazyThreadSafetyMode.None); + public ControlPointReference_t ControlPointInput2 { - get => new ControlPointReference_tImpl(_Handle + Schema.GetOffset(0x447A59BC30E85456)); + get => new ControlPointReference_tImpl(_Handle + _ControlPointInput2Offset.Value); } + private static readonly Lazy _ControlPointScale2Offset = new(() => Schema.GetOffset(0x447A59BC87391272), LazyThreadSafetyMode.None); + public ref float ControlPointScale2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x447A59BC87391272)); + get => ref _Handle.AsRef(_ControlPointScale2Offset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x447A59BCE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x447A59BCE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _FinalOutputScaleOffset = new(() => Schema.GetOffset(0x447A59BCADDD3664), LazyThreadSafetyMode.None); + public ref Vector FinalOutputScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x447A59BCADDD3664)); + get => ref _Handle.AsRef(_FinalOutputScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CallbackImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CallbackImpl.cs index ec2fdb4df..ea19ad3b5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CallbackImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CallbackImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ChladniWaveImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ChladniWaveImpl.cs index 3438f09be..d9f87a504 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ChladniWaveImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ChladniWaveImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class C_OP_ChladniWaveImpl : CParticleFunctionOperatorImpl, C_O public C_OP_ChladniWaveImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x5C575E1BE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x5C575E1BE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x5C575E1BE88A0D0F), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x5C575E1BE88A0D0F)); + get => new CPerParticleFloatInputImpl(_Handle + _InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x5C575E1BD6766901), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x5C575E1BD6766901)); + get => new CPerParticleFloatInputImpl(_Handle + _InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x5C575E1B5F8D7716), LazyThreadSafetyMode.None); + public CPerParticleFloatInput OutputMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x5C575E1B5F8D7716)); + get => new CPerParticleFloatInputImpl(_Handle + _OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x5C575E1B51A0E8C4), LazyThreadSafetyMode.None); + public CPerParticleFloatInput OutputMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x5C575E1B51A0E8C4)); + get => new CPerParticleFloatInputImpl(_Handle + _OutputMaxOffset.Value); } + private static readonly Lazy _WaveLengthOffset = new(() => Schema.GetOffset(0x5C575E1B33948038), LazyThreadSafetyMode.None); + public CPerParticleVecInput WaveLength { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x5C575E1B33948038)); + get => new CPerParticleVecInputImpl(_Handle + _WaveLengthOffset.Value); } + private static readonly Lazy _HarmonicsOffset = new(() => Schema.GetOffset(0x5C575E1B91D6B17F), LazyThreadSafetyMode.None); + public CPerParticleVecInput Harmonics { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x5C575E1B91D6B17F)); + get => new CPerParticleVecInputImpl(_Handle + _HarmonicsOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x5C575E1BFB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x5C575E1BFB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _LocalSpaceControlPointOffset = new(() => Schema.GetOffset(0x5C575E1B1656DBF7), LazyThreadSafetyMode.None); + public ref int LocalSpaceControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x5C575E1B1656DBF7)); + get => ref _Handle.AsRef(_LocalSpaceControlPointOffset.Value); } + private static readonly Lazy _B3DOffset = new(() => Schema.GetOffset(0x5C575E1B24E1BE32), LazyThreadSafetyMode.None); + public ref bool B3D { - get => ref _Handle.AsRef(Schema.GetOffset(0x5C575E1B24E1BE32)); + get => ref _Handle.AsRef(_B3DOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ChooseRandomChildrenInGroupImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ChooseRandomChildrenInGroupImpl.cs index 601920f34..aa308060e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ChooseRandomChildrenInGroupImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ChooseRandomChildrenInGroupImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_ChooseRandomChildrenInGroupImpl : CParticleFunctionP public C_OP_ChooseRandomChildrenInGroupImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildGroupIDOffset = new(() => Schema.GetOffset(0xF79CD816E3F3C965), LazyThreadSafetyMode.None); + public ref int ChildGroupID { - get => ref _Handle.AsRef(Schema.GetOffset(0xF79CD816E3F3C965)); + get => ref _Handle.AsRef(_ChildGroupIDOffset.Value); } + private static readonly Lazy _NumberOfChildrenOffset = new(() => Schema.GetOffset(0xF79CD8160275D868), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput NumberOfChildren { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xF79CD8160275D868)); + get => new CParticleCollectionFloatInputImpl(_Handle + _NumberOfChildrenOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ClampScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ClampScalarImpl.cs index 994f5fe19..d12c0e416 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ClampScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ClampScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_ClampScalarImpl : CParticleFunctionOperatorImpl, C_O public C_OP_ClampScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x2D8090A0E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x2D8090A0E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x2D8090A05F8D7716), LazyThreadSafetyMode.None); + public CPerParticleFloatInput OutputMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x2D8090A05F8D7716)); + get => new CPerParticleFloatInputImpl(_Handle + _OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x2D8090A051A0E8C4), LazyThreadSafetyMode.None); + public CPerParticleFloatInput OutputMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x2D8090A051A0E8C4)); + get => new CPerParticleFloatInputImpl(_Handle + _OutputMaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ClampVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ClampVectorImpl.cs index c5fc0ebeb..a0916d9fd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ClampVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ClampVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_ClampVectorImpl : CParticleFunctionOperatorImpl, C_O public C_OP_ClampVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x5977BF1BE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x5977BF1BE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x5977BF1B2EFED678), LazyThreadSafetyMode.None); + public CPerParticleVecInput OutputMin { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x5977BF1B2EFED678)); + get => new CPerParticleVecInputImpl(_Handle + _OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x5977BF1B451280D2), LazyThreadSafetyMode.None); + public CPerParticleVecInput OutputMax { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x5977BF1B451280D2)); + get => new CPerParticleVecInputImpl(_Handle + _OutputMaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ClientPhysicsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ClientPhysicsImpl.cs index f185735d3..9ddff40ef 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ClientPhysicsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ClientPhysicsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,48 +17,74 @@ internal partial class C_OP_ClientPhysicsImpl : CParticleFunctionRendererImpl, C public C_OP_ClientPhysicsImpl(nint handle) : base(handle) { } + private static readonly Lazy _StrPhysicsTypeOffset = new(() => Schema.GetOffset(0xD58F5C47820348D9), LazyThreadSafetyMode.None); + public string StrPhysicsType { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD58F5C47820348D9)); + var ptr = _Handle.Read(_StrPhysicsTypeOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD58F5C47820348D9, value); + set => Schema.SetString(_Handle, _StrPhysicsTypeOffset.Value, value); } + private static readonly Lazy _StartAsleepOffset = new(() => Schema.GetOffset(0xD58F5C4789BA22DD), LazyThreadSafetyMode.None); + public ref bool StartAsleep { - get => ref _Handle.AsRef(Schema.GetOffset(0xD58F5C4789BA22DD)); + get => ref _Handle.AsRef(_StartAsleepOffset.Value); } + private static readonly Lazy _PlayerWakeRadiusOffset = new(() => Schema.GetOffset(0xD58F5C47E624F15C), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput PlayerWakeRadius { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xD58F5C47E624F15C)); + get => new CParticleCollectionFloatInputImpl(_Handle + _PlayerWakeRadiusOffset.Value); } + private static readonly Lazy _VehicleWakeRadiusOffset = new(() => Schema.GetOffset(0xD58F5C4733A7C27B), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput VehicleWakeRadius { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xD58F5C4733A7C27B)); + get => new CParticleCollectionFloatInputImpl(_Handle + _VehicleWakeRadiusOffset.Value); } + private static readonly Lazy _UseHighQualitySimulationOffset = new(() => Schema.GetOffset(0xD58F5C47B0E917EA), LazyThreadSafetyMode.None); + public ref bool UseHighQualitySimulation { - get => ref _Handle.AsRef(Schema.GetOffset(0xD58F5C47B0E917EA)); + get => ref _Handle.AsRef(_UseHighQualitySimulationOffset.Value); } + private static readonly Lazy _MaxParticleCountOffset = new(() => Schema.GetOffset(0xD58F5C47FD3F82B6), LazyThreadSafetyMode.None); + public ref int MaxParticleCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xD58F5C47FD3F82B6)); + get => ref _Handle.AsRef(_MaxParticleCountOffset.Value); } + private static readonly Lazy _RespectExclusionVolumesOffset = new(() => Schema.GetOffset(0xD58F5C47BF981E2A), LazyThreadSafetyMode.None); + public ref bool RespectExclusionVolumes { - get => ref _Handle.AsRef(Schema.GetOffset(0xD58F5C47BF981E2A)); + get => ref _Handle.AsRef(_RespectExclusionVolumesOffset.Value); } + private static readonly Lazy _KillParticlesOffset = new(() => Schema.GetOffset(0xD58F5C47D2FD5948), LazyThreadSafetyMode.None); + public ref bool KillParticles { - get => ref _Handle.AsRef(Schema.GetOffset(0xD58F5C47D2FD5948)); + get => ref _Handle.AsRef(_KillParticlesOffset.Value); } + private static readonly Lazy _DeleteSimOffset = new(() => Schema.GetOffset(0xD58F5C478F438761), LazyThreadSafetyMode.None); + public ref bool DeleteSim { - get => ref _Handle.AsRef(Schema.GetOffset(0xD58F5C478F438761)); + get => ref _Handle.AsRef(_DeleteSimOffset.Value); } + private static readonly Lazy _ControlPointOffset = new(() => Schema.GetOffset(0xD58F5C470D0DDF8C), LazyThreadSafetyMode.None); + public ref int ControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xD58F5C470D0DDF8C)); + get => ref _Handle.AsRef(_ControlPointOffset.Value); } + private static readonly Lazy _ForcedSimIdOffset = new(() => Schema.GetOffset(0xD58F5C47998B388E), LazyThreadSafetyMode.None); + public ref int ForcedSimId { - get => ref _Handle.AsRef(Schema.GetOffset(0xD58F5C47998B388E)); + get => ref _Handle.AsRef(_ForcedSimIdOffset.Value); } + private static readonly Lazy _ColorBlendTypeOffset = new(() => Schema.GetOffset(0xD58F5C47DBC6EFCF), LazyThreadSafetyMode.None); + public ref ParticleColorBlendType_t ColorBlendType { - get => ref _Handle.AsRef(Schema.GetOffset(0xD58F5C47DBC6EFCF)); + get => ref _Handle.AsRef(_ColorBlendTypeOffset.Value); } + private static readonly Lazy _ForcedStatusEffectsOffset = new(() => Schema.GetOffset(0xD58F5C4712A659B8), LazyThreadSafetyMode.None); + public ref ParticleAttrBoxFlags_t ForcedStatusEffects { - get => ref _Handle.AsRef(Schema.GetOffset(0xD58F5C4712A659B8)); + get => ref _Handle.AsRef(_ForcedStatusEffectsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CollideWithParentParticlesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CollideWithParentParticlesImpl.cs index 84e050b98..e5b69da8d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CollideWithParentParticlesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CollideWithParentParticlesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_CollideWithParentParticlesImpl : CParticleFunctionCo public C_OP_CollideWithParentParticlesImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParentRadiusScaleOffset = new(() => Schema.GetOffset(0x73030DD0CD77EF69), LazyThreadSafetyMode.None); + public CPerParticleFloatInput ParentRadiusScale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x73030DD0CD77EF69)); + get => new CPerParticleFloatInputImpl(_Handle + _ParentRadiusScaleOffset.Value); } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0x73030DD0A7A20159), LazyThreadSafetyMode.None); + public CPerParticleFloatInput RadiusScale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x73030DD0A7A20159)); + get => new CPerParticleFloatInputImpl(_Handle + _RadiusScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CollideWithSelfImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CollideWithSelfImpl.cs index 06fd56677..f6f0f3b24 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CollideWithSelfImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CollideWithSelfImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_CollideWithSelfImpl : CParticleFunctionConstraintImp public C_OP_CollideWithSelfImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0xEF46C0CBA7A20159), LazyThreadSafetyMode.None); + public CPerParticleFloatInput RadiusScale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xEF46C0CBA7A20159)); + get => new CPerParticleFloatInputImpl(_Handle + _RadiusScaleOffset.Value); } + private static readonly Lazy _MinimumSpeedOffset = new(() => Schema.GetOffset(0xEF46C0CB2F9BEFCC), LazyThreadSafetyMode.None); + public CPerParticleFloatInput MinimumSpeed { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xEF46C0CB2F9BEFCC)); + get => new CPerParticleFloatInputImpl(_Handle + _MinimumSpeedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ColorAdjustHSLImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ColorAdjustHSLImpl.cs index 13e72ad6d..df7985664 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ColorAdjustHSLImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ColorAdjustHSLImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_ColorAdjustHSLImpl : CParticleFunctionOperatorImpl, public C_OP_ColorAdjustHSLImpl(nint handle) : base(handle) { } + private static readonly Lazy _HueAdjustOffset = new(() => Schema.GetOffset(0x34348E726B20DB80), LazyThreadSafetyMode.None); + public CPerParticleFloatInput HueAdjust { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x34348E726B20DB80)); + get => new CPerParticleFloatInputImpl(_Handle + _HueAdjustOffset.Value); } + private static readonly Lazy _SaturationAdjustOffset = new(() => Schema.GetOffset(0x34348E72D0C582F4), LazyThreadSafetyMode.None); + public CPerParticleFloatInput SaturationAdjust { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x34348E72D0C582F4)); + get => new CPerParticleFloatInputImpl(_Handle + _SaturationAdjustOffset.Value); } + private static readonly Lazy _LightnessAdjustOffset = new(() => Schema.GetOffset(0x34348E72DC0100D5), LazyThreadSafetyMode.None); + public CPerParticleFloatInput LightnessAdjust { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x34348E72DC0100D5)); + get => new CPerParticleFloatInputImpl(_Handle + _LightnessAdjustOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ColorInterpolateImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ColorInterpolateImpl.cs index 5c7ce2c65..b7d5ff015 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ColorInterpolateImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ColorInterpolateImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_ColorInterpolateImpl : CParticleFunctionOperatorImpl public C_OP_ColorInterpolateImpl(nint handle) : base(handle) { } + private static readonly Lazy _ColorFadeOffset = new(() => Schema.GetOffset(0x2F5E97470841572E), LazyThreadSafetyMode.None); + public ref Color ColorFade { - get => ref _Handle.AsRef(Schema.GetOffset(0x2F5E97470841572E)); + get => ref _Handle.AsRef(_ColorFadeOffset.Value); } + private static readonly Lazy _FadeStartTimeOffset = new(() => Schema.GetOffset(0x2F5E974786B28BFA), LazyThreadSafetyMode.None); + public ref float FadeStartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x2F5E974786B28BFA)); + get => ref _Handle.AsRef(_FadeStartTimeOffset.Value); } + private static readonly Lazy _FadeEndTimeOffset = new(() => Schema.GetOffset(0x2F5E974700D5CA4F), LazyThreadSafetyMode.None); + public ref float FadeEndTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x2F5E974700D5CA4F)); + get => ref _Handle.AsRef(_FadeEndTimeOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x2F5E9747E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x2F5E9747E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _EaseInOutOffset = new(() => Schema.GetOffset(0x2F5E97475172CF48), LazyThreadSafetyMode.None); + public ref bool EaseInOut { - get => ref _Handle.AsRef(Schema.GetOffset(0x2F5E97475172CF48)); + get => ref _Handle.AsRef(_EaseInOutOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ColorInterpolateRandomImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ColorInterpolateRandomImpl.cs index 7ba8233bc..2abea54b4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ColorInterpolateRandomImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ColorInterpolateRandomImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_ColorInterpolateRandomImpl : CParticleFunctionOperat public C_OP_ColorInterpolateRandomImpl(nint handle) : base(handle) { } + private static readonly Lazy _ColorFadeMinOffset = new(() => Schema.GetOffset(0x6185EEC8EFCBE55A), LazyThreadSafetyMode.None); + public ref Color ColorFadeMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x6185EEC8EFCBE55A)); + get => ref _Handle.AsRef(_ColorFadeMinOffset.Value); } + private static readonly Lazy _ColorFadeMaxOffset = new(() => Schema.GetOffset(0x6185EEC8D9DF4A70), LazyThreadSafetyMode.None); + public ref Color ColorFadeMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x6185EEC8D9DF4A70)); + get => ref _Handle.AsRef(_ColorFadeMaxOffset.Value); } + private static readonly Lazy _FadeStartTimeOffset = new(() => Schema.GetOffset(0x6185EEC886B28BFA), LazyThreadSafetyMode.None); + public ref float FadeStartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6185EEC886B28BFA)); + get => ref _Handle.AsRef(_FadeStartTimeOffset.Value); } + private static readonly Lazy _FadeEndTimeOffset = new(() => Schema.GetOffset(0x6185EEC800D5CA4F), LazyThreadSafetyMode.None); + public ref float FadeEndTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x6185EEC800D5CA4F)); + get => ref _Handle.AsRef(_FadeEndTimeOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x6185EEC8E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x6185EEC8E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _EaseInOutOffset = new(() => Schema.GetOffset(0x6185EEC85172CF48), LazyThreadSafetyMode.None); + public ref bool EaseInOut { - get => ref _Handle.AsRef(Schema.GetOffset(0x6185EEC85172CF48)); + get => ref _Handle.AsRef(_EaseInOutOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConnectParentParticleToNearestImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConnectParentParticleToNearestImpl.cs index 9f7156f51..18cbc3f34 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConnectParentParticleToNearestImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConnectParentParticleToNearestImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_ConnectParentParticleToNearestImpl : CParticleFuncti public C_OP_ConnectParentParticleToNearestImpl(nint handle) : base(handle) { } + private static readonly Lazy _FirstControlPointOffset = new(() => Schema.GetOffset(0x9C608BD072117650), LazyThreadSafetyMode.None); + public ref int FirstControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C608BD072117650)); + get => ref _Handle.AsRef(_FirstControlPointOffset.Value); } + private static readonly Lazy _SecondControlPointOffset = new(() => Schema.GetOffset(0x9C608BD04D8D2B44), LazyThreadSafetyMode.None); + public ref int SecondControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C608BD04D8D2B44)); + get => ref _Handle.AsRef(_SecondControlPointOffset.Value); } + private static readonly Lazy _UseRadiusOffset = new(() => Schema.GetOffset(0x9C608BD0B7D98E6A), LazyThreadSafetyMode.None); + public ref bool UseRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C608BD0B7D98E6A)); + get => ref _Handle.AsRef(_UseRadiusOffset.Value); } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0x9C608BD0A7A20159), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput RadiusScale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x9C608BD0A7A20159)); + get => new CParticleCollectionFloatInputImpl(_Handle + _RadiusScaleOffset.Value); } + private static readonly Lazy _ParentRadiusScaleOffset = new(() => Schema.GetOffset(0x9C608BD0CD77EF69), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ParentRadiusScale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x9C608BD0CD77EF69)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ParentRadiusScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConstrainDistanceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConstrainDistanceImpl.cs index 42628db0d..2af1461dd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConstrainDistanceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConstrainDistanceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_ConstrainDistanceImpl : CParticleFunctionConstraintI public C_OP_ConstrainDistanceImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinDistanceOffset = new(() => Schema.GetOffset(0xDF3E3FA1F016B7AC), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput MinDistance { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xDF3E3FA1F016B7AC)); + get => new CParticleCollectionFloatInputImpl(_Handle + _MinDistanceOffset.Value); } + private static readonly Lazy _MaxDistanceOffset = new(() => Schema.GetOffset(0xDF3E3FA1844E396A), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput MaxDistance { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xDF3E3FA1844E396A)); + get => new CParticleCollectionFloatInputImpl(_Handle + _MaxDistanceOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0xDF3E3FA13F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xDF3E3FA13F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _CenterOffsetOffset = new(() => Schema.GetOffset(0xDF3E3FA108F7D41F), LazyThreadSafetyMode.None); + public ref Vector CenterOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xDF3E3FA108F7D41F)); + get => ref _Handle.AsRef(_CenterOffsetOffset.Value); } + private static readonly Lazy _GlobalCenterOffset = new(() => Schema.GetOffset(0xDF3E3FA1196669C3), LazyThreadSafetyMode.None); + public ref bool GlobalCenter { - get => ref _Handle.AsRef(Schema.GetOffset(0xDF3E3FA1196669C3)); + get => ref _Handle.AsRef(_GlobalCenterOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConstrainDistanceToPathImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConstrainDistanceToPathImpl.cs index a26a30507..d198a34a8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConstrainDistanceToPathImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConstrainDistanceToPathImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_ConstrainDistanceToPathImpl : CParticleFunctionConst public C_OP_ConstrainDistanceToPathImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinDistanceOffset = new(() => Schema.GetOffset(0x8146F787F016B7AC), LazyThreadSafetyMode.None); + public ref float MinDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x8146F787F016B7AC)); + get => ref _Handle.AsRef(_MinDistanceOffset.Value); } + private static readonly Lazy _MaxDistance0Offset = new(() => Schema.GetOffset(0x8146F7876FFBC6F0), LazyThreadSafetyMode.None); + public ref float MaxDistance0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x8146F7876FFBC6F0)); + get => ref _Handle.AsRef(_MaxDistance0Offset.Value); } + private static readonly Lazy _MaxDistanceMidOffset = new(() => Schema.GetOffset(0x8146F7872D2B1E5A), LazyThreadSafetyMode.None); + public ref float MaxDistanceMid { - get => ref _Handle.AsRef(Schema.GetOffset(0x8146F7872D2B1E5A)); + get => ref _Handle.AsRef(_MaxDistanceMidOffset.Value); } + private static readonly Lazy _MaxDistance1Offset = new(() => Schema.GetOffset(0x8146F78770FBC883), LazyThreadSafetyMode.None); + public ref float MaxDistance1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x8146F78770FBC883)); + get => ref _Handle.AsRef(_MaxDistance1Offset.Value); } + private static readonly Lazy _PathParametersOffset = new(() => Schema.GetOffset(0x8146F7878C111646), LazyThreadSafetyMode.None); + public CPathParameters PathParameters { - get => new CPathParametersImpl(_Handle + Schema.GetOffset(0x8146F7878C111646)); + get => new CPathParametersImpl(_Handle + _PathParametersOffset.Value); } + private static readonly Lazy _TravelTimeOffset = new(() => Schema.GetOffset(0x8146F7870228B67A), LazyThreadSafetyMode.None); + public ref float TravelTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x8146F7870228B67A)); + get => ref _Handle.AsRef(_TravelTimeOffset.Value); } + private static readonly Lazy _FieldScaleOffset = new(() => Schema.GetOffset(0x8146F787BE94CE93), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldScale { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x8146F787BE94CE93)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldScaleOffset.Value); } + private static readonly Lazy _ManualTFieldOffset = new(() => Schema.GetOffset(0x8146F7871190C51B), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t ManualTField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x8146F7871190C51B)); + get => new ParticleAttributeIndex_tImpl(_Handle + _ManualTFieldOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConstrainDistanceToUserSpecifiedPathImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConstrainDistanceToUserSpecifiedPathImpl.cs index bf871f7d4..727d55796 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConstrainDistanceToUserSpecifiedPathImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConstrainDistanceToUserSpecifiedPathImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_ConstrainDistanceToUserSpecifiedPathImpl : CParticle public C_OP_ConstrainDistanceToUserSpecifiedPathImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinDistanceOffset = new(() => Schema.GetOffset(0x42F2CE28F016B7AC), LazyThreadSafetyMode.None); + public ref float MinDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x42F2CE28F016B7AC)); + get => ref _Handle.AsRef(_MinDistanceOffset.Value); } + private static readonly Lazy _MaxDistanceOffset = new(() => Schema.GetOffset(0x42F2CE2898893360), LazyThreadSafetyMode.None); + public ref float MaxDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x42F2CE2898893360)); + get => ref _Handle.AsRef(_MaxDistanceOffset.Value); } + private static readonly Lazy _TimeScaleOffset = new(() => Schema.GetOffset(0x42F2CE28B49D735C), LazyThreadSafetyMode.None); + public ref float TimeScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x42F2CE28B49D735C)); + get => ref _Handle.AsRef(_TimeScaleOffset.Value); } + private static readonly Lazy _LoopedPathOffset = new(() => Schema.GetOffset(0x42F2CE284D64C459), LazyThreadSafetyMode.None); + public ref bool LoopedPath { - get => ref _Handle.AsRef(Schema.GetOffset(0x42F2CE284D64C459)); + get => ref _Handle.AsRef(_LoopedPathOffset.Value); } + private static readonly Lazy _PointListOffset = new(() => Schema.GetOffset(0x42F2CE28976AB4FD), LazyThreadSafetyMode.None); + public ref CUtlVector PointList { - get => ref _Handle.AsRef>(Schema.GetOffset(0x42F2CE28976AB4FD)); + get => ref _Handle.AsRef>(_PointListOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConstrainLineLengthImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConstrainLineLengthImpl.cs index 6200d5839..c57209419 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConstrainLineLengthImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ConstrainLineLengthImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_ConstrainLineLengthImpl : CParticleFunctionConstrain public C_OP_ConstrainLineLengthImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinDistanceOffset = new(() => Schema.GetOffset(0x50EFFC4492BCAD06), LazyThreadSafetyMode.None); + public ref float MinDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x50EFFC4492BCAD06)); + get => ref _Handle.AsRef(_MinDistanceOffset.Value); } + private static readonly Lazy _MaxDistanceOffset = new(() => Schema.GetOffset(0x50EFFC4498893360), LazyThreadSafetyMode.None); + public ref float MaxDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x50EFFC4498893360)); + get => ref _Handle.AsRef(_MaxDistanceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ContinuousEmitterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ContinuousEmitterImpl.cs index 786e63f44..5d4cdc5af 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ContinuousEmitterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ContinuousEmitterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,45 +17,69 @@ internal partial class C_OP_ContinuousEmitterImpl : CParticleFunctionEmitterImpl public C_OP_ContinuousEmitterImpl(nint handle) : base(handle) { } + private static readonly Lazy _EmissionDurationOffset = new(() => Schema.GetOffset(0x6B2A982090181C90), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput EmissionDuration { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x6B2A982090181C90)); + get => new CParticleCollectionFloatInputImpl(_Handle + _EmissionDurationOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0x6B2A982067FE9DC4), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput StartTime { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x6B2A982067FE9DC4)); + get => new CParticleCollectionFloatInputImpl(_Handle + _StartTimeOffset.Value); } + private static readonly Lazy _EmitRateOffset = new(() => Schema.GetOffset(0x6B2A982062DC20CE), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput EmitRate { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x6B2A982062DC20CE)); + get => new CParticleCollectionFloatInputImpl(_Handle + _EmitRateOffset.Value); } + private static readonly Lazy _EmissionScaleOffset = new(() => Schema.GetOffset(0x6B2A982053003112), LazyThreadSafetyMode.None); + public ref float EmissionScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x6B2A982053003112)); + get => ref _Handle.AsRef(_EmissionScaleOffset.Value); } + private static readonly Lazy _ScalePerParentParticleOffset = new(() => Schema.GetOffset(0x6B2A98206A172D20), LazyThreadSafetyMode.None); + public ref float ScalePerParentParticle { - get => ref _Handle.AsRef(Schema.GetOffset(0x6B2A98206A172D20)); + get => ref _Handle.AsRef(_ScalePerParentParticleOffset.Value); } + private static readonly Lazy _InitFromKilledParentParticlesOffset = new(() => Schema.GetOffset(0x6B2A98204B2E40E9), LazyThreadSafetyMode.None); + public ref bool InitFromKilledParentParticles { - get => ref _Handle.AsRef(Schema.GetOffset(0x6B2A98204B2E40E9)); + get => ref _Handle.AsRef(_InitFromKilledParentParticlesOffset.Value); } + private static readonly Lazy _EventTypeOffset = new(() => Schema.GetOffset(0x6B2A9820E1F9AA93), LazyThreadSafetyMode.None); + public ref EventTypeSelection_t EventType { - get => ref _Handle.AsRef(Schema.GetOffset(0x6B2A9820E1F9AA93)); + get => ref _Handle.AsRef(_EventTypeOffset.Value); } + private static readonly Lazy _SnapshotControlPointOffset = new(() => Schema.GetOffset(0x6B2A9820192638EC), LazyThreadSafetyMode.None); + public ref int SnapshotControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x6B2A9820192638EC)); + get => ref _Handle.AsRef(_SnapshotControlPointOffset.Value); } + private static readonly Lazy _StrSnapshotSubsetOffset = new(() => Schema.GetOffset(0x6B2A9820BD8A8E5E), LazyThreadSafetyMode.None); + public string StrSnapshotSubset { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6B2A9820BD8A8E5E)); + var ptr = _Handle.Read(_StrSnapshotSubsetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6B2A9820BD8A8E5E, value); + set => Schema.SetString(_Handle, _StrSnapshotSubsetOffset.Value, value); } + private static readonly Lazy _LimitPerUpdateOffset = new(() => Schema.GetOffset(0x6B2A98204975B526), LazyThreadSafetyMode.None); + public ref int LimitPerUpdate { - get => ref _Handle.AsRef(Schema.GetOffset(0x6B2A98204975B526)); + get => ref _Handle.AsRef(_LimitPerUpdateOffset.Value); } + private static readonly Lazy _ForceEmitOnFirstUpdateOffset = new(() => Schema.GetOffset(0x6B2A98206532DDA9), LazyThreadSafetyMode.None); + public ref bool ForceEmitOnFirstUpdate { - get => ref _Handle.AsRef(Schema.GetOffset(0x6B2A98206532DDA9)); + get => ref _Handle.AsRef(_ForceEmitOnFirstUpdateOffset.Value); } + private static readonly Lazy _ForceEmitOnLastUpdateOffset = new(() => Schema.GetOffset(0x6B2A98206498635F), LazyThreadSafetyMode.None); + public ref bool ForceEmitOnLastUpdate { - get => ref _Handle.AsRef(Schema.GetOffset(0x6B2A98206498635F)); + get => ref _Handle.AsRef(_ForceEmitOnLastUpdateOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ControlPointToRadialScreenSpaceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ControlPointToRadialScreenSpaceImpl.cs index ce73a4486..0c6a2b4c3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ControlPointToRadialScreenSpaceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ControlPointToRadialScreenSpaceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_ControlPointToRadialScreenSpaceImpl : CParticleFunct public C_OP_ControlPointToRadialScreenSpaceImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPInOffset = new(() => Schema.GetOffset(0xF5E82FE8CAF7E91D), LazyThreadSafetyMode.None); + public ref int CPIn { - get => ref _Handle.AsRef(Schema.GetOffset(0xF5E82FE8CAF7E91D)); + get => ref _Handle.AsRef(_CPInOffset.Value); } + private static readonly Lazy _CP1PosOffset = new(() => Schema.GetOffset(0xF5E82FE8408288D9), LazyThreadSafetyMode.None); + public ref Vector CP1Pos { - get => ref _Handle.AsRef(Schema.GetOffset(0xF5E82FE8408288D9)); + get => ref _Handle.AsRef(_CP1PosOffset.Value); } + private static readonly Lazy _CPOutOffset = new(() => Schema.GetOffset(0xF5E82FE8BAE50826), LazyThreadSafetyMode.None); + public ref int CPOut { - get => ref _Handle.AsRef(Schema.GetOffset(0xF5E82FE8BAE50826)); + get => ref _Handle.AsRef(_CPOutOffset.Value); } + private static readonly Lazy _CPOutFieldOffset = new(() => Schema.GetOffset(0xF5E82FE8A29393C2), LazyThreadSafetyMode.None); + public ref int CPOutField { - get => ref _Handle.AsRef(Schema.GetOffset(0xF5E82FE8A29393C2)); + get => ref _Handle.AsRef(_CPOutFieldOffset.Value); } + private static readonly Lazy _CPSSPosOutOffset = new(() => Schema.GetOffset(0xF5E82FE881CD01AE), LazyThreadSafetyMode.None); + public ref int CPSSPosOut { - get => ref _Handle.AsRef(Schema.GetOffset(0xF5E82FE881CD01AE)); + get => ref _Handle.AsRef(_CPSSPosOutOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ControlpointLightImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ControlpointLightImpl.cs index 8b3a6cb7b..5aa141a7c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ControlpointLightImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ControlpointLightImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,104 +17,170 @@ internal partial class C_OP_ControlpointLightImpl : CParticleFunctionOperatorImp public C_OP_ControlpointLightImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x53983694B731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694B731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _ControlPoint1Offset = new(() => Schema.GetOffset(0x5398369449D73687), LazyThreadSafetyMode.None); + public ref int ControlPoint1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x5398369449D73687)); + get => ref _Handle.AsRef(_ControlPoint1Offset.Value); } + private static readonly Lazy _ControlPoint2Offset = new(() => Schema.GetOffset(0x539836944AD7381A), LazyThreadSafetyMode.None); + public ref int ControlPoint2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x539836944AD7381A)); + get => ref _Handle.AsRef(_ControlPoint2Offset.Value); } + private static readonly Lazy _ControlPoint3Offset = new(() => Schema.GetOffset(0x539836944BD739AD), LazyThreadSafetyMode.None); + public ref int ControlPoint3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x539836944BD739AD)); + get => ref _Handle.AsRef(_ControlPoint3Offset.Value); } + private static readonly Lazy _ControlPoint4Offset = new(() => Schema.GetOffset(0x5398369444D72EA8), LazyThreadSafetyMode.None); + public ref int ControlPoint4 { - get => ref _Handle.AsRef(Schema.GetOffset(0x5398369444D72EA8)); + get => ref _Handle.AsRef(_ControlPoint4Offset.Value); } + private static readonly Lazy _CPOffset1Offset = new(() => Schema.GetOffset(0x53983694EC8B6090), LazyThreadSafetyMode.None); + public ref Vector CPOffset1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694EC8B6090)); + get => ref _Handle.AsRef(_CPOffset1Offset.Value); } + private static readonly Lazy _CPOffset2Offset = new(() => Schema.GetOffset(0x53983694EF8B6549), LazyThreadSafetyMode.None); + public ref Vector CPOffset2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694EF8B6549)); + get => ref _Handle.AsRef(_CPOffset2Offset.Value); } + private static readonly Lazy _CPOffset3Offset = new(() => Schema.GetOffset(0x53983694EE8B63B6), LazyThreadSafetyMode.None); + public ref Vector CPOffset3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694EE8B63B6)); + get => ref _Handle.AsRef(_CPOffset3Offset.Value); } + private static readonly Lazy _CPOffset4Offset = new(() => Schema.GetOffset(0x53983694F18B686F), LazyThreadSafetyMode.None); + public ref Vector CPOffset4 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694F18B686F)); + get => ref _Handle.AsRef(_CPOffset4Offset.Value); } + private static readonly Lazy _LightFiftyDist1Offset = new(() => Schema.GetOffset(0x539836942E21760A), LazyThreadSafetyMode.None); + public ref float LightFiftyDist1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x539836942E21760A)); + get => ref _Handle.AsRef(_LightFiftyDist1Offset.Value); } + private static readonly Lazy _LightZeroDist1Offset = new(() => Schema.GetOffset(0x53983694F929281C), LazyThreadSafetyMode.None); + public ref float LightZeroDist1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694F929281C)); + get => ref _Handle.AsRef(_LightZeroDist1Offset.Value); } + private static readonly Lazy _LightFiftyDist2Offset = new(() => Schema.GetOffset(0x539836942D217477), LazyThreadSafetyMode.None); + public ref float LightFiftyDist2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x539836942D217477)); + get => ref _Handle.AsRef(_LightFiftyDist2Offset.Value); } + private static readonly Lazy _LightZeroDist2Offset = new(() => Schema.GetOffset(0x53983694FC292CD5), LazyThreadSafetyMode.None); + public ref float LightZeroDist2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694FC292CD5)); + get => ref _Handle.AsRef(_LightZeroDist2Offset.Value); } + private static readonly Lazy _LightFiftyDist3Offset = new(() => Schema.GetOffset(0x539836942C2172E4), LazyThreadSafetyMode.None); + public ref float LightFiftyDist3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x539836942C2172E4)); + get => ref _Handle.AsRef(_LightFiftyDist3Offset.Value); } + private static readonly Lazy _LightZeroDist3Offset = new(() => Schema.GetOffset(0x53983694FB292B42), LazyThreadSafetyMode.None); + public ref float LightZeroDist3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694FB292B42)); + get => ref _Handle.AsRef(_LightZeroDist3Offset.Value); } + private static readonly Lazy _LightFiftyDist4Offset = new(() => Schema.GetOffset(0x539836942B217151), LazyThreadSafetyMode.None); + public ref float LightFiftyDist4 { - get => ref _Handle.AsRef(Schema.GetOffset(0x539836942B217151)); + get => ref _Handle.AsRef(_LightFiftyDist4Offset.Value); } + private static readonly Lazy _LightZeroDist4Offset = new(() => Schema.GetOffset(0x53983694F6292363), LazyThreadSafetyMode.None); + public ref float LightZeroDist4 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694F6292363)); + get => ref _Handle.AsRef(_LightZeroDist4Offset.Value); } + private static readonly Lazy _LightColor1Offset = new(() => Schema.GetOffset(0x5398369417353AFD), LazyThreadSafetyMode.None); + public ref Color LightColor1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x5398369417353AFD)); + get => ref _Handle.AsRef(_LightColor1Offset.Value); } + private static readonly Lazy _LightColor2Offset = new(() => Schema.GetOffset(0x5398369414353644), LazyThreadSafetyMode.None); + public ref Color LightColor2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x5398369414353644)); + get => ref _Handle.AsRef(_LightColor2Offset.Value); } + private static readonly Lazy _LightColor3Offset = new(() => Schema.GetOffset(0x53983694153537D7), LazyThreadSafetyMode.None); + public ref Color LightColor3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694153537D7)); + get => ref _Handle.AsRef(_LightColor3Offset.Value); } + private static readonly Lazy _LightColor4Offset = new(() => Schema.GetOffset(0x539836941235331E), LazyThreadSafetyMode.None); + public ref Color LightColor4 { - get => ref _Handle.AsRef(Schema.GetOffset(0x539836941235331E)); + get => ref _Handle.AsRef(_LightColor4Offset.Value); } + private static readonly Lazy _LightType1Offset = new(() => Schema.GetOffset(0x53983694DE9E9CD2), LazyThreadSafetyMode.None); + public ref bool LightType1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694DE9E9CD2)); + get => ref _Handle.AsRef(_LightType1Offset.Value); } + private static readonly Lazy _LightType2Offset = new(() => Schema.GetOffset(0x53983694DD9E9B3F), LazyThreadSafetyMode.None); + public ref bool LightType2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694DD9E9B3F)); + get => ref _Handle.AsRef(_LightType2Offset.Value); } + private static readonly Lazy _LightType3Offset = new(() => Schema.GetOffset(0x53983694DC9E99AC), LazyThreadSafetyMode.None); + public ref bool LightType3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694DC9E99AC)); + get => ref _Handle.AsRef(_LightType3Offset.Value); } + private static readonly Lazy _LightType4Offset = new(() => Schema.GetOffset(0x53983694DB9E9819), LazyThreadSafetyMode.None); + public ref bool LightType4 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694DB9E9819)); + get => ref _Handle.AsRef(_LightType4Offset.Value); } + private static readonly Lazy _LightDynamic1Offset = new(() => Schema.GetOffset(0x53983694B9DD5AAF), LazyThreadSafetyMode.None); + public ref bool LightDynamic1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694B9DD5AAF)); + get => ref _Handle.AsRef(_LightDynamic1Offset.Value); } + private static readonly Lazy _LightDynamic2Offset = new(() => Schema.GetOffset(0x53983694BADD5C42), LazyThreadSafetyMode.None); + public ref bool LightDynamic2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694BADD5C42)); + get => ref _Handle.AsRef(_LightDynamic2Offset.Value); } + private static readonly Lazy _LightDynamic3Offset = new(() => Schema.GetOffset(0x53983694BBDD5DD5), LazyThreadSafetyMode.None); + public ref bool LightDynamic3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694BBDD5DD5)); + get => ref _Handle.AsRef(_LightDynamic3Offset.Value); } + private static readonly Lazy _LightDynamic4Offset = new(() => Schema.GetOffset(0x53983694B4DD52D0), LazyThreadSafetyMode.None); + public ref bool LightDynamic4 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694B4DD52D0)); + get => ref _Handle.AsRef(_LightDynamic4Offset.Value); } + private static readonly Lazy _UseNormalOffset = new(() => Schema.GetOffset(0x539836949FA2D197), LazyThreadSafetyMode.None); + public ref bool UseNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0x539836949FA2D197)); + get => ref _Handle.AsRef(_UseNormalOffset.Value); } + private static readonly Lazy _UseHLambertOffset = new(() => Schema.GetOffset(0x53983694916889E9), LazyThreadSafetyMode.None); + public ref bool UseHLambert { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694916889E9)); + get => ref _Handle.AsRef(_UseHLambertOffset.Value); } + private static readonly Lazy _ClampLowerRangeOffset = new(() => Schema.GetOffset(0x539836940F690326), LazyThreadSafetyMode.None); + public ref bool ClampLowerRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x539836940F690326)); + get => ref _Handle.AsRef(_ClampLowerRangeOffset.Value); } + private static readonly Lazy _ClampUpperRangeOffset = new(() => Schema.GetOffset(0x53983694815873B5), LazyThreadSafetyMode.None); + public ref bool ClampUpperRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x53983694815873B5)); + get => ref _Handle.AsRef(_ClampUpperRangeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CreateParticleSystemRendererImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CreateParticleSystemRendererImpl.cs index 07af1411a..7240d4397 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CreateParticleSystemRendererImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CreateParticleSystemRendererImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class C_OP_CreateParticleSystemRendererImpl : CParticleFunction public C_OP_CreateParticleSystemRendererImpl(nint handle) : base(handle) { } + private static readonly Lazy _EffectOffset = new(() => Schema.GetOffset(0xB86C827DC5CEB052), LazyThreadSafetyMode.None); + public ref CStrongHandle Effect { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB86C827DC5CEB052)); + get => ref _Handle.AsRef>(_EffectOffset.Value); } + private static readonly Lazy _EventTypeOffset = new(() => Schema.GetOffset(0xB86C827DE1F9AA93), LazyThreadSafetyMode.None); + public ref EventTypeSelection_t EventType { - get => ref _Handle.AsRef(Schema.GetOffset(0xB86C827DE1F9AA93)); + get => ref _Handle.AsRef(_EventTypeOffset.Value); } + private static readonly Lazy _CPsOffset = new(() => Schema.GetOffset(0xB86C827DE280356F), LazyThreadSafetyMode.None); + public ref CUtlLeanVector CPs { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB86C827DE280356F)); + get => ref _Handle.AsRef>(_CPsOffset.Value); } + private static readonly Lazy _ParticleConfigOffset = new(() => Schema.GetOffset(0xB86C827D467A5C4C), LazyThreadSafetyMode.None); + public string ParticleConfig { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB86C827D467A5C4C)); + var ptr = _Handle.Read(_ParticleConfigOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB86C827D467A5C4C, value); + set => Schema.SetString(_Handle, _ParticleConfigOffset.Value, value); } + private static readonly Lazy _AggregationPosOffset = new(() => Schema.GetOffset(0xB86C827D49456289), LazyThreadSafetyMode.None); + public CPerParticleVecInput AggregationPos { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xB86C827D49456289)); + get => new CPerParticleVecInputImpl(_Handle + _AggregationPosOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CullImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CullImpl.cs index 673fbef11..2524b33a3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CullImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CullImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_CullImpl : CParticleFunctionOperatorImpl, C_OP_Cull public C_OP_CullImpl(nint handle) : base(handle) { } + private static readonly Lazy _CullPercOffset = new(() => Schema.GetOffset(0xD1E3C83568069ED3), LazyThreadSafetyMode.None); + public ref float CullPerc { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1E3C83568069ED3)); + get => ref _Handle.AsRef(_CullPercOffset.Value); } + private static readonly Lazy _CullStartOffset = new(() => Schema.GetOffset(0xD1E3C835AB265851), LazyThreadSafetyMode.None); + public ref float CullStart { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1E3C835AB265851)); + get => ref _Handle.AsRef(_CullStartOffset.Value); } + private static readonly Lazy _CullEndOffset = new(() => Schema.GetOffset(0xD1E3C835B8217F50), LazyThreadSafetyMode.None); + public ref float CullEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1E3C835B8217F50)); + get => ref _Handle.AsRef(_CullEndOffset.Value); } + private static readonly Lazy _CullExpOffset = new(() => Schema.GetOffset(0xD1E3C835BFF46C4A), LazyThreadSafetyMode.None); + public ref float CullExp { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1E3C835BFF46C4A)); + get => ref _Handle.AsRef(_CullExpOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CurlNoiseForceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CurlNoiseForceImpl.cs index a6967b02b..41db3677f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CurlNoiseForceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CurlNoiseForceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_CurlNoiseForceImpl : CParticleFunctionForceImpl, C_O public C_OP_CurlNoiseForceImpl(nint handle) : base(handle) { } + private static readonly Lazy _NoiseTypeOffset = new(() => Schema.GetOffset(0xC8D644B26758ED35), LazyThreadSafetyMode.None); + public ref ParticleDirectionNoiseType_t NoiseType { - get => ref _Handle.AsRef(Schema.GetOffset(0xC8D644B26758ED35)); + get => ref _Handle.AsRef(_NoiseTypeOffset.Value); } + private static readonly Lazy _NoiseFreqOffset = new(() => Schema.GetOffset(0xC8D644B20A299A63), LazyThreadSafetyMode.None); + public CPerParticleVecInput NoiseFreq { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xC8D644B20A299A63)); + get => new CPerParticleVecInputImpl(_Handle + _NoiseFreqOffset.Value); } + private static readonly Lazy _NoiseScaleOffset = new(() => Schema.GetOffset(0xC8D644B29CE92E45), LazyThreadSafetyMode.None); + public CPerParticleVecInput NoiseScale { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xC8D644B29CE92E45)); + get => new CPerParticleVecInputImpl(_Handle + _NoiseScaleOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0xC8D644B2BD25CC2A), LazyThreadSafetyMode.None); + public CPerParticleVecInput Offset { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xC8D644B2BD25CC2A)); + get => new CPerParticleVecInputImpl(_Handle + _OffsetOffset.Value); } + private static readonly Lazy _OffsetRateOffset = new(() => Schema.GetOffset(0xC8D644B23D58FFB8), LazyThreadSafetyMode.None); + public CPerParticleVecInput OffsetRate { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xC8D644B23D58FFB8)); + get => new CPerParticleVecInputImpl(_Handle + _OffsetRateOffset.Value); } + private static readonly Lazy _WorleySeedOffset = new(() => Schema.GetOffset(0xC8D644B2D6881198), LazyThreadSafetyMode.None); + public CPerParticleFloatInput WorleySeed { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xC8D644B2D6881198)); + get => new CPerParticleFloatInputImpl(_Handle + _WorleySeedOffset.Value); } + private static readonly Lazy _WorleyJitterOffset = new(() => Schema.GetOffset(0xC8D644B2C7509CCF), LazyThreadSafetyMode.None); + public CPerParticleFloatInput WorleyJitter { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xC8D644B2C7509CCF)); + get => new CPerParticleFloatInputImpl(_Handle + _WorleyJitterOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CycleScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CycleScalarImpl.cs index c78d3287c..f490eb470 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CycleScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CycleScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class C_OP_CycleScalarImpl : CParticleFunctionOperatorImpl, C_O public C_OP_CycleScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _DestFieldOffset = new(() => Schema.GetOffset(0x8E3188612E3589F3), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t DestField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x8E3188612E3589F3)); + get => new ParticleAttributeIndex_tImpl(_Handle + _DestFieldOffset.Value); } + private static readonly Lazy _StartValueOffset = new(() => Schema.GetOffset(0x8E31886151C82C2A), LazyThreadSafetyMode.None); + public ref float StartValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E31886151C82C2A)); + get => ref _Handle.AsRef(_StartValueOffset.Value); } + private static readonly Lazy _EndValueOffset = new(() => Schema.GetOffset(0x8E3188616EDBBCD5), LazyThreadSafetyMode.None); + public ref float EndValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E3188616EDBBCD5)); + get => ref _Handle.AsRef(_EndValueOffset.Value); } + private static readonly Lazy _CycleTimeOffset = new(() => Schema.GetOffset(0x8E3188619EE036CE), LazyThreadSafetyMode.None); + public ref float CycleTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E3188619EE036CE)); + get => ref _Handle.AsRef(_CycleTimeOffset.Value); } + private static readonly Lazy _DoNotRepeatCycleOffset = new(() => Schema.GetOffset(0x8E318861B2E181D4), LazyThreadSafetyMode.None); + public ref bool DoNotRepeatCycle { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E318861B2E181D4)); + get => ref _Handle.AsRef(_DoNotRepeatCycleOffset.Value); } + private static readonly Lazy _SynchronizeParticlesOffset = new(() => Schema.GetOffset(0x8E31886132C4244C), LazyThreadSafetyMode.None); + public ref bool SynchronizeParticles { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E31886132C4244C)); + get => ref _Handle.AsRef(_SynchronizeParticlesOffset.Value); } + private static readonly Lazy _CPScaleOffset = new(() => Schema.GetOffset(0x8E318861048A0408), LazyThreadSafetyMode.None); + public ref int CPScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E318861048A0408)); + get => ref _Handle.AsRef(_CPScaleOffset.Value); } + private static readonly Lazy _CPFieldMinOffset = new(() => Schema.GetOffset(0x8E3188613B60DFC2), LazyThreadSafetyMode.None); + public ref int CPFieldMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E3188613B60DFC2)); + get => ref _Handle.AsRef(_CPFieldMinOffset.Value); } + private static readonly Lazy _CPFieldMaxOffset = new(() => Schema.GetOffset(0x8E318861254D3568), LazyThreadSafetyMode.None); + public ref int CPFieldMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E318861254D3568)); + get => ref _Handle.AsRef(_CPFieldMaxOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x8E318861FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E318861FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CylindricalDistanceToTransformImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CylindricalDistanceToTransformImpl.cs index ce722a3f7..d5dafad54 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CylindricalDistanceToTransformImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_CylindricalDistanceToTransformImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class C_OP_CylindricalDistanceToTransformImpl : CParticleFuncti public C_OP_CylindricalDistanceToTransformImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x3B99017E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x3B99017E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x3B99017E88A0D0F), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x3B99017E88A0D0F)); + get => new CPerParticleFloatInputImpl(_Handle + _InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x3B99017D6766901), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x3B99017D6766901)); + get => new CPerParticleFloatInputImpl(_Handle + _InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x3B990175F8D7716), LazyThreadSafetyMode.None); + public CPerParticleFloatInput OutputMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x3B990175F8D7716)); + get => new CPerParticleFloatInputImpl(_Handle + _OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x3B9901751A0E8C4), LazyThreadSafetyMode.None); + public CPerParticleFloatInput OutputMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x3B9901751A0E8C4)); + get => new CPerParticleFloatInputImpl(_Handle + _OutputMaxOffset.Value); } + private static readonly Lazy _TransformStartOffset = new(() => Schema.GetOffset(0x3B99017D94FA7F9), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformStart { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x3B99017D94FA7F9)); + get => new CParticleTransformInputImpl(_Handle + _TransformStartOffset.Value); } + private static readonly Lazy _TransformEndOffset = new(() => Schema.GetOffset(0x3B990170C3277C8), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformEnd { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x3B990170C3277C8)); + get => new CParticleTransformInputImpl(_Handle + _TransformEndOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x3B99017FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x3B99017FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _ActiveRangeOffset = new(() => Schema.GetOffset(0x3B990173FA53B84), LazyThreadSafetyMode.None); + public ref bool ActiveRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x3B990173FA53B84)); + get => ref _Handle.AsRef(_ActiveRangeOffset.Value); } + private static readonly Lazy _AdditiveOffset = new(() => Schema.GetOffset(0x3B990170FA86105), LazyThreadSafetyMode.None); + public ref bool Additive { - get => ref _Handle.AsRef(Schema.GetOffset(0x3B990170FA86105)); + get => ref _Handle.AsRef(_AdditiveOffset.Value); } + private static readonly Lazy _CapsuleOffset = new(() => Schema.GetOffset(0x3B99017F8D8D1AC), LazyThreadSafetyMode.None); + public ref bool Capsule { - get => ref _Handle.AsRef(Schema.GetOffset(0x3B99017F8D8D1AC)); + get => ref _Handle.AsRef(_CapsuleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DampenToCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DampenToCPImpl.cs index 4cad0969c..dfd074455 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DampenToCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DampenToCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_DampenToCPImpl : CParticleFunctionOperatorImpl, C_OP public C_OP_DampenToCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0xB04699CE3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xB04699CE3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _RangeOffset = new(() => Schema.GetOffset(0xB04699CE3FC92844), LazyThreadSafetyMode.None); + public ref float Range { - get => ref _Handle.AsRef(Schema.GetOffset(0xB04699CE3FC92844)); + get => ref _Handle.AsRef(_RangeOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0xB04699CEB731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0xB04699CEB731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DecayClampCountImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DecayClampCountImpl.cs index 88445f2aa..99cdaeba0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DecayClampCountImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DecayClampCountImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_OP_DecayClampCountImpl : CParticleFunctionOperatorImpl, public C_OP_DecayClampCountImpl(nint handle) : base(handle) { } + private static readonly Lazy _CountOffset = new(() => Schema.GetOffset(0xBBD38E0B7D31AC08), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Count { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xBBD38E0B7D31AC08)); + get => new CParticleCollectionFloatInputImpl(_Handle + _CountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DecayImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DecayImpl.cs index 3d0b0c89f..759206950 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DecayImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DecayImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_DecayImpl : CParticleFunctionOperatorImpl, C_OP_Deca public C_OP_DecayImpl(nint handle) : base(handle) { } + private static readonly Lazy _RopeDecayOffset = new(() => Schema.GetOffset(0x9342606D2A5D2225), LazyThreadSafetyMode.None); + public ref bool RopeDecay { - get => ref _Handle.AsRef(Schema.GetOffset(0x9342606D2A5D2225)); + get => ref _Handle.AsRef(_RopeDecayOffset.Value); } + private static readonly Lazy _ForcePreserveParticleOrderOffset = new(() => Schema.GetOffset(0x9342606DFEB98B86), LazyThreadSafetyMode.None); + public ref bool ForcePreserveParticleOrder { - get => ref _Handle.AsRef(Schema.GetOffset(0x9342606DFEB98B86)); + get => ref _Handle.AsRef(_ForcePreserveParticleOrderOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DecayMaintainCountImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DecayMaintainCountImpl.cs index 160675f8c..a976ee874 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DecayMaintainCountImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DecayMaintainCountImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,30 +17,44 @@ internal partial class C_OP_DecayMaintainCountImpl : CParticleFunctionOperatorIm public C_OP_DecayMaintainCountImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParticlesToMaintainOffset = new(() => Schema.GetOffset(0x168E27F3537AE378), LazyThreadSafetyMode.None); + public ref int ParticlesToMaintain { - get => ref _Handle.AsRef(Schema.GetOffset(0x168E27F3537AE378)); + get => ref _Handle.AsRef(_ParticlesToMaintainOffset.Value); } + private static readonly Lazy _DecayDelayOffset = new(() => Schema.GetOffset(0x168E27F38D6DD836), LazyThreadSafetyMode.None); + public ref float DecayDelay { - get => ref _Handle.AsRef(Schema.GetOffset(0x168E27F38D6DD836)); + get => ref _Handle.AsRef(_DecayDelayOffset.Value); } + private static readonly Lazy _SnapshotControlPointOffset = new(() => Schema.GetOffset(0x168E27F3192638EC), LazyThreadSafetyMode.None); + public ref int SnapshotControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x168E27F3192638EC)); + get => ref _Handle.AsRef(_SnapshotControlPointOffset.Value); } + private static readonly Lazy _StrSnapshotSubsetOffset = new(() => Schema.GetOffset(0x168E27F3BD8A8E5E), LazyThreadSafetyMode.None); + public string StrSnapshotSubset { get { - var ptr = _Handle.Read(Schema.GetOffset(0x168E27F3BD8A8E5E)); + var ptr = _Handle.Read(_StrSnapshotSubsetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x168E27F3BD8A8E5E, value); + set => Schema.SetString(_Handle, _StrSnapshotSubsetOffset.Value, value); } + private static readonly Lazy _LifespanDecayOffset = new(() => Schema.GetOffset(0x168E27F39642CC6B), LazyThreadSafetyMode.None); + public ref bool LifespanDecay { - get => ref _Handle.AsRef(Schema.GetOffset(0x168E27F39642CC6B)); + get => ref _Handle.AsRef(_LifespanDecayOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x168E27F3B731A42F), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Scale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x168E27F3B731A42F)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ScaleOffset.Value); } + private static readonly Lazy _KillNewestOffset = new(() => Schema.GetOffset(0x168E27F3B8EA2EC7), LazyThreadSafetyMode.None); + public ref bool KillNewest { - get => ref _Handle.AsRef(Schema.GetOffset(0x168E27F3B8EA2EC7)); + get => ref _Handle.AsRef(_KillNewestOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DecayOffscreenImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DecayOffscreenImpl.cs index 54841b856..6b3fd36bd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DecayOffscreenImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DecayOffscreenImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_OP_DecayOffscreenImpl : CParticleFunctionOperatorImpl, public C_OP_DecayOffscreenImpl(nint handle) : base(handle) { } + private static readonly Lazy _OffscreenTimeOffset = new(() => Schema.GetOffset(0xA253F9AEB096E1F1), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput OffscreenTime { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xA253F9AEB096E1F1)); + get => new CParticleCollectionFloatInputImpl(_Handle + _OffscreenTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DensityForceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DensityForceImpl.cs index 339a71680..7364345eb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DensityForceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DensityForceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_DensityForceImpl : CParticleFunctionForceImpl, C_OP_ public C_OP_DensityForceImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0x7846D656A7A20159), LazyThreadSafetyMode.None); + public ref float RadiusScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x7846D656A7A20159)); + get => ref _Handle.AsRef(_RadiusScaleOffset.Value); } + private static readonly Lazy _ForceScaleOffset = new(() => Schema.GetOffset(0x7846D6564817F390), LazyThreadSafetyMode.None); + public ref float ForceScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x7846D6564817F390)); + get => ref _Handle.AsRef(_ForceScaleOffset.Value); } + private static readonly Lazy _TargetDensityOffset = new(() => Schema.GetOffset(0x7846D656157E0796), LazyThreadSafetyMode.None); + public ref float TargetDensity { - get => ref _Handle.AsRef(Schema.GetOffset(0x7846D656157E0796)); + get => ref _Handle.AsRef(_TargetDensityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DifferencePreviousParticleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DifferencePreviousParticleImpl.cs index 4e15fbe00..d8a01607b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DifferencePreviousParticleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DifferencePreviousParticleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class C_OP_DifferencePreviousParticleImpl : CParticleFunctionOp public C_OP_DifferencePreviousParticleImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldInputOffset = new(() => Schema.GetOffset(0xD626A7A9AE775669), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xD626A7A9AE775669)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xD626A7A9E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xD626A7A9E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0xD626A7A9E88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xD626A7A9E88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0xD626A7A9D6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xD626A7A9D6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0xD626A7A95F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xD626A7A95F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0xD626A7A951A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xD626A7A951A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0xD626A7A9FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0xD626A7A9FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _ActiveRangeOffset = new(() => Schema.GetOffset(0xD626A7A93FA53B84), LazyThreadSafetyMode.None); + public ref bool ActiveRange { - get => ref _Handle.AsRef(Schema.GetOffset(0xD626A7A93FA53B84)); + get => ref _Handle.AsRef(_ActiveRangeOffset.Value); } + private static readonly Lazy _SetPreviousParticleOffset = new(() => Schema.GetOffset(0xD626A7A9BDC03798), LazyThreadSafetyMode.None); + public ref bool SetPreviousParticle { - get => ref _Handle.AsRef(Schema.GetOffset(0xD626A7A9BDC03798)); + get => ref _Handle.AsRef(_SetPreviousParticleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DiffusionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DiffusionImpl.cs index b1676fad9..e395e74ce 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DiffusionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DiffusionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_DiffusionImpl : CParticleFunctionOperatorImpl, C_OP_ public C_OP_DiffusionImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0x2D5ABEF4A7A20159), LazyThreadSafetyMode.None); + public ref float RadiusScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D5ABEF4A7A20159)); + get => ref _Handle.AsRef(_RadiusScaleOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x2D5ABEF4E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x2D5ABEF4E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _VoxelGridResolutionOffset = new(() => Schema.GetOffset(0x2D5ABEF45AA7D7ED), LazyThreadSafetyMode.None); + public ref int VoxelGridResolution { - get => ref _Handle.AsRef(Schema.GetOffset(0x2D5ABEF45AA7D7ED)); + get => ref _Handle.AsRef(_VoxelGridResolutionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DirectionBetweenVecsToVecImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DirectionBetweenVecsToVecImpl.cs index a058d1fd9..58dcdc43b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DirectionBetweenVecsToVecImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DirectionBetweenVecsToVecImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_DirectionBetweenVecsToVecImpl : CParticleFunctionOpe public C_OP_DirectionBetweenVecsToVecImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x6022BA82E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x6022BA82E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _Point1Offset = new(() => Schema.GetOffset(0x6022BA8204AD2BC0), LazyThreadSafetyMode.None); + public CPerParticleVecInput Point1 { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x6022BA8204AD2BC0)); + get => new CPerParticleVecInputImpl(_Handle + _Point1Offset.Value); } + private static readonly Lazy _Point2Offset = new(() => Schema.GetOffset(0x6022BA8207AD3079), LazyThreadSafetyMode.None); + public CPerParticleVecInput Point2 { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x6022BA8207AD3079)); + get => new CPerParticleVecInputImpl(_Handle + _Point2Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceBetweenCPsToCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceBetweenCPsToCPImpl.cs index e83df0912..4b0920735 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceBetweenCPsToCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceBetweenCPsToCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,54 +17,84 @@ internal partial class C_OP_DistanceBetweenCPsToCPImpl : CParticleFunctionPreEmi public C_OP_DistanceBetweenCPsToCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartCPOffset = new(() => Schema.GetOffset(0x379849D82C2FF970), LazyThreadSafetyMode.None); + public ref int StartCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x379849D82C2FF970)); + get => ref _Handle.AsRef(_StartCPOffset.Value); } + private static readonly Lazy _EndCPOffset = new(() => Schema.GetOffset(0x379849D88C9B426D), LazyThreadSafetyMode.None); + public ref int EndCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x379849D88C9B426D)); + get => ref _Handle.AsRef(_EndCPOffset.Value); } + private static readonly Lazy _OutputCPOffset = new(() => Schema.GetOffset(0x379849D850DF5703), LazyThreadSafetyMode.None); + public ref int OutputCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x379849D850DF5703)); + get => ref _Handle.AsRef(_OutputCPOffset.Value); } + private static readonly Lazy _OutputCPFieldOffset = new(() => Schema.GetOffset(0x379849D86F275D5D), LazyThreadSafetyMode.None); + public ref int OutputCPField { - get => ref _Handle.AsRef(Schema.GetOffset(0x379849D86F275D5D)); + get => ref _Handle.AsRef(_OutputCPFieldOffset.Value); } + private static readonly Lazy _SetOnceOffset = new(() => Schema.GetOffset(0x379849D86B261086), LazyThreadSafetyMode.None); + public ref bool SetOnce { - get => ref _Handle.AsRef(Schema.GetOffset(0x379849D86B261086)); + get => ref _Handle.AsRef(_SetOnceOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x379849D8E88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x379849D8E88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x379849D8D6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x379849D8D6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x379849D85F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x379849D85F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x379849D851A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x379849D851A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _MaxTraceLengthOffset = new(() => Schema.GetOffset(0x379849D8543C3798), LazyThreadSafetyMode.None); + public ref float MaxTraceLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x379849D8543C3798)); + get => ref _Handle.AsRef(_MaxTraceLengthOffset.Value); } + private static readonly Lazy _LOSScaleOffset = new(() => Schema.GetOffset(0x379849D8259F6F3B), LazyThreadSafetyMode.None); + public ref float LOSScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x379849D8259F6F3B)); + get => ref _Handle.AsRef(_LOSScaleOffset.Value); } + private static readonly Lazy _LOSOffset = new(() => Schema.GetOffset(0x379849D89C25C2ED), LazyThreadSafetyMode.None); + public ref bool LOS { - get => ref _Handle.AsRef(Schema.GetOffset(0x379849D89C25C2ED)); + get => ref _Handle.AsRef(_LOSOffset.Value); } + private static readonly Lazy _CollisionGroupNameOffset = new(() => Schema.GetOffset(0x379849D8D58A3195), LazyThreadSafetyMode.None); + public string CollisionGroupName { get { - var ptr = _Handle + Schema.GetOffset(0x379849D8D58A3195); + var ptr = _Handle + _CollisionGroupNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x379849D8D58A3195, value, 128); + set => Schema.SetFixedString(_Handle, _CollisionGroupNameOffset.Value, value, 128); } + private static readonly Lazy _TraceSetOffset = new(() => Schema.GetOffset(0x379849D8BD26C5B2), LazyThreadSafetyMode.None); + public ref ParticleTraceSet_t TraceSet { - get => ref _Handle.AsRef(Schema.GetOffset(0x379849D8BD26C5B2)); + get => ref _Handle.AsRef(_TraceSetOffset.Value); } + private static readonly Lazy _SetParentOffset = new(() => Schema.GetOffset(0x379849D82D8246B7), LazyThreadSafetyMode.None); + public ref ParticleParentSetMode_t SetParent { - get => ref _Handle.AsRef(Schema.GetOffset(0x379849D82D8246B7)); + get => ref _Handle.AsRef(_SetParentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceBetweenTransformsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceBetweenTransformsImpl.cs index 2a3e1f501..14cf1fdd8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceBetweenTransformsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceBetweenTransformsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,48 +17,74 @@ internal partial class C_OP_DistanceBetweenTransformsImpl : CParticleFunctionOpe public C_OP_DistanceBetweenTransformsImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x60A44933E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x60A44933E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _TransformStartOffset = new(() => Schema.GetOffset(0x60A44933D94FA7F9), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformStart { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x60A44933D94FA7F9)); + get => new CParticleTransformInputImpl(_Handle + _TransformStartOffset.Value); } + private static readonly Lazy _TransformEndOffset = new(() => Schema.GetOffset(0x60A449330C3277C8), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformEnd { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x60A449330C3277C8)); + get => new CParticleTransformInputImpl(_Handle + _TransformEndOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x60A44933E88A0D0F), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x60A44933E88A0D0F)); + get => new CPerParticleFloatInputImpl(_Handle + _InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x60A44933D6766901), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x60A44933D6766901)); + get => new CPerParticleFloatInputImpl(_Handle + _InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x60A449335F8D7716), LazyThreadSafetyMode.None); + public CPerParticleFloatInput OutputMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x60A449335F8D7716)); + get => new CPerParticleFloatInputImpl(_Handle + _OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x60A4493351A0E8C4), LazyThreadSafetyMode.None); + public CPerParticleFloatInput OutputMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x60A4493351A0E8C4)); + get => new CPerParticleFloatInputImpl(_Handle + _OutputMaxOffset.Value); } + private static readonly Lazy _MaxTraceLengthOffset = new(() => Schema.GetOffset(0x60A44933543C3798), LazyThreadSafetyMode.None); + public ref float MaxTraceLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x60A44933543C3798)); + get => ref _Handle.AsRef(_MaxTraceLengthOffset.Value); } + private static readonly Lazy _LOSScaleOffset = new(() => Schema.GetOffset(0x60A44933259F6F3B), LazyThreadSafetyMode.None); + public ref float LOSScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x60A44933259F6F3B)); + get => ref _Handle.AsRef(_LOSScaleOffset.Value); } + private static readonly Lazy _CollisionGroupNameOffset = new(() => Schema.GetOffset(0x60A44933D58A3195), LazyThreadSafetyMode.None); + public string CollisionGroupName { get { - var ptr = _Handle + Schema.GetOffset(0x60A44933D58A3195); + var ptr = _Handle + _CollisionGroupNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x60A44933D58A3195, value, 128); + set => Schema.SetFixedString(_Handle, _CollisionGroupNameOffset.Value, value, 128); } + private static readonly Lazy _TraceSetOffset = new(() => Schema.GetOffset(0x60A44933BD26C5B2), LazyThreadSafetyMode.None); + public ref ParticleTraceSet_t TraceSet { - get => ref _Handle.AsRef(Schema.GetOffset(0x60A44933BD26C5B2)); + get => ref _Handle.AsRef(_TraceSetOffset.Value); } + private static readonly Lazy _LOSOffset = new(() => Schema.GetOffset(0x60A449339C25C2ED), LazyThreadSafetyMode.None); + public ref bool LOS { - get => ref _Handle.AsRef(Schema.GetOffset(0x60A449339C25C2ED)); + get => ref _Handle.AsRef(_LOSOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x60A44933FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x60A44933FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceBetweenVecsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceBetweenVecsImpl.cs index ba3701151..c9432a964 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceBetweenVecsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceBetweenVecsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class C_OP_DistanceBetweenVecsImpl : CParticleFunctionOperatorI public C_OP_DistanceBetweenVecsImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xA94A9A29E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xA94A9A29E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _Point1Offset = new(() => Schema.GetOffset(0xA94A9A2904AD2BC0), LazyThreadSafetyMode.None); + public CPerParticleVecInput Point1 { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xA94A9A2904AD2BC0)); + get => new CPerParticleVecInputImpl(_Handle + _Point1Offset.Value); } + private static readonly Lazy _Point2Offset = new(() => Schema.GetOffset(0xA94A9A2907AD3079), LazyThreadSafetyMode.None); + public CPerParticleVecInput Point2 { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xA94A9A2907AD3079)); + get => new CPerParticleVecInputImpl(_Handle + _Point2Offset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0xA94A9A29E88A0D0F), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xA94A9A29E88A0D0F)); + get => new CPerParticleFloatInputImpl(_Handle + _InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0xA94A9A29D6766901), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xA94A9A29D6766901)); + get => new CPerParticleFloatInputImpl(_Handle + _InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0xA94A9A295F8D7716), LazyThreadSafetyMode.None); + public CPerParticleFloatInput OutputMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xA94A9A295F8D7716)); + get => new CPerParticleFloatInputImpl(_Handle + _OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0xA94A9A2951A0E8C4), LazyThreadSafetyMode.None); + public CPerParticleFloatInput OutputMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xA94A9A2951A0E8C4)); + get => new CPerParticleFloatInputImpl(_Handle + _OutputMaxOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0xA94A9A29FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0xA94A9A29FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _DeltaTimeOffset = new(() => Schema.GetOffset(0xA94A9A29464DB858), LazyThreadSafetyMode.None); + public ref bool DeltaTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xA94A9A29464DB858)); + get => ref _Handle.AsRef(_DeltaTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceCullImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceCullImpl.cs index a9cdfb58a..5f17ab02f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceCullImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceCullImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_DistanceCullImpl : CParticleFunctionOperatorImpl, C_ public C_OP_DistanceCullImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointOffset = new(() => Schema.GetOffset(0x7252AA520D0DDF8C), LazyThreadSafetyMode.None); + public ref int ControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x7252AA520D0DDF8C)); + get => ref _Handle.AsRef(_ControlPointOffset.Value); } + private static readonly Lazy _PointOffsetOffset = new(() => Schema.GetOffset(0x7252AA52300E046E), LazyThreadSafetyMode.None); + public ref Vector PointOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x7252AA52300E046E)); + get => ref _Handle.AsRef(_PointOffsetOffset.Value); } + private static readonly Lazy _DistanceOffset = new(() => Schema.GetOffset(0x7252AA5200DC4A68), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Distance { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x7252AA5200DC4A68)); + get => new CParticleCollectionFloatInputImpl(_Handle + _DistanceOffset.Value); } + private static readonly Lazy _CullInsideOffset = new(() => Schema.GetOffset(0x7252AA52293E00AD), LazyThreadSafetyMode.None); + public ref bool CullInside { - get => ref _Handle.AsRef(Schema.GetOffset(0x7252AA52293E00AD)); + get => ref _Handle.AsRef(_CullInsideOffset.Value); } + private static readonly Lazy _AttributeOffset = new(() => Schema.GetOffset(0x7252AA527FE8DE0B), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t Attribute { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x7252AA527FE8DE0B)); + get => new ParticleAttributeIndex_tImpl(_Handle + _AttributeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceToTransformImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceToTransformImpl.cs index 558ef51bd..fd3448ed1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceToTransformImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DistanceToTransformImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,54 +17,84 @@ internal partial class C_OP_DistanceToTransformImpl : CParticleFunctionOperatorI public C_OP_DistanceToTransformImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x4E442549E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x4E442549E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x4E442549E88A0D0F), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x4E442549E88A0D0F)); + get => new CPerParticleFloatInputImpl(_Handle + _InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x4E442549D6766901), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x4E442549D6766901)); + get => new CPerParticleFloatInputImpl(_Handle + _InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x4E4425495F8D7716), LazyThreadSafetyMode.None); + public CPerParticleFloatInput OutputMin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x4E4425495F8D7716)); + get => new CPerParticleFloatInputImpl(_Handle + _OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x4E44254951A0E8C4), LazyThreadSafetyMode.None); + public CPerParticleFloatInput OutputMax { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x4E44254951A0E8C4)); + get => new CPerParticleFloatInputImpl(_Handle + _OutputMaxOffset.Value); } + private static readonly Lazy _TransformStartOffset = new(() => Schema.GetOffset(0x4E442549D94FA7F9), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformStart { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x4E442549D94FA7F9)); + get => new CParticleTransformInputImpl(_Handle + _TransformStartOffset.Value); } + private static readonly Lazy _LOSOffset = new(() => Schema.GetOffset(0x4E4425499C25C2ED), LazyThreadSafetyMode.None); + public ref bool LOS { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E4425499C25C2ED)); + get => ref _Handle.AsRef(_LOSOffset.Value); } + private static readonly Lazy _CollisionGroupNameOffset = new(() => Schema.GetOffset(0x4E442549D58A3195), LazyThreadSafetyMode.None); + public string CollisionGroupName { get { - var ptr = _Handle + Schema.GetOffset(0x4E442549D58A3195); + var ptr = _Handle + _CollisionGroupNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x4E442549D58A3195, value, 128); + set => Schema.SetFixedString(_Handle, _CollisionGroupNameOffset.Value, value, 128); } + private static readonly Lazy _TraceSetOffset = new(() => Schema.GetOffset(0x4E442549BD26C5B2), LazyThreadSafetyMode.None); + public ref ParticleTraceSet_t TraceSet { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E442549BD26C5B2)); + get => ref _Handle.AsRef(_TraceSetOffset.Value); } + private static readonly Lazy _MaxTraceLengthOffset = new(() => Schema.GetOffset(0x4E442549543C3798), LazyThreadSafetyMode.None); + public ref float MaxTraceLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E442549543C3798)); + get => ref _Handle.AsRef(_MaxTraceLengthOffset.Value); } + private static readonly Lazy _LOSScaleOffset = new(() => Schema.GetOffset(0x4E442549259F6F3B), LazyThreadSafetyMode.None); + public ref float LOSScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E442549259F6F3B)); + get => ref _Handle.AsRef(_LOSScaleOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x4E442549FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E442549FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _ActiveRangeOffset = new(() => Schema.GetOffset(0x4E4425493FA53B84), LazyThreadSafetyMode.None); + public ref bool ActiveRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E4425493FA53B84)); + get => ref _Handle.AsRef(_ActiveRangeOffset.Value); } + private static readonly Lazy _AdditiveOffset = new(() => Schema.GetOffset(0x4E4425490FA86105), LazyThreadSafetyMode.None); + public ref bool Additive { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E4425490FA86105)); + get => ref _Handle.AsRef(_AdditiveOffset.Value); } + private static readonly Lazy _ComponentScaleOffset = new(() => Schema.GetOffset(0x4E442549B17954E2), LazyThreadSafetyMode.None); + public CPerParticleVecInput ComponentScale { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x4E442549B17954E2)); + get => new CPerParticleVecInputImpl(_Handle + _ComponentScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DragRelativeToPlaneImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DragRelativeToPlaneImpl.cs index 979cfedc6..4feb296cc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DragRelativeToPlaneImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DragRelativeToPlaneImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_DragRelativeToPlaneImpl : CParticleFunctionOperatorI public C_OP_DragRelativeToPlaneImpl(nint handle) : base(handle) { } + private static readonly Lazy _DragAtPlaneOffset = new(() => Schema.GetOffset(0x9D049848176259A2), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput DragAtPlane { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x9D049848176259A2)); + get => new CParticleCollectionFloatInputImpl(_Handle + _DragAtPlaneOffset.Value); } + private static readonly Lazy _FalloffOffset = new(() => Schema.GetOffset(0x9D049848FA143DCB), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Falloff { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x9D049848FA143DCB)); + get => new CParticleCollectionFloatInputImpl(_Handle + _FalloffOffset.Value); } + private static readonly Lazy _DirectionalOffset = new(() => Schema.GetOffset(0x9D0498484C2A43E7), LazyThreadSafetyMode.None); + public ref bool Directional { - get => ref _Handle.AsRef(Schema.GetOffset(0x9D0498484C2A43E7)); + get => ref _Handle.AsRef(_DirectionalOffset.Value); } + private static readonly Lazy _PlaneNormalOffset = new(() => Schema.GetOffset(0x9D04984821103682), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput PlaneNormal { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x9D04984821103682)); + get => new CParticleCollectionVecInputImpl(_Handle + _PlaneNormalOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x9D0498483F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x9D0498483F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DriveCPFromGlobalSoundFloatImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DriveCPFromGlobalSoundFloatImpl.cs index 1e5feb8c6..e1451a25e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DriveCPFromGlobalSoundFloatImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_DriveCPFromGlobalSoundFloatImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,62 @@ internal partial class C_OP_DriveCPFromGlobalSoundFloatImpl : CParticleFunctionP public C_OP_DriveCPFromGlobalSoundFloatImpl(nint handle) : base(handle) { } + private static readonly Lazy _OutputControlPointOffset = new(() => Schema.GetOffset(0x1E3FE630266B0FD9), LazyThreadSafetyMode.None); + public ref int OutputControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x1E3FE630266B0FD9)); + get => ref _Handle.AsRef(_OutputControlPointOffset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0x1E3FE630324F6F74), LazyThreadSafetyMode.None); + public ref int OutputField { - get => ref _Handle.AsRef(Schema.GetOffset(0x1E3FE630324F6F74)); + get => ref _Handle.AsRef(_OutputFieldOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x1E3FE630E88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x1E3FE630E88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x1E3FE630D6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x1E3FE630D6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x1E3FE6305F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x1E3FE6305F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x1E3FE63051A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x1E3FE63051A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _StackNameOffset = new(() => Schema.GetOffset(0x1E3FE6308C81C05C), LazyThreadSafetyMode.None); + public string StackName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1E3FE6308C81C05C)); + var ptr = _Handle.Read(_StackNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1E3FE6308C81C05C, value); + set => Schema.SetString(_Handle, _StackNameOffset.Value, value); } + private static readonly Lazy _OperatorNameOffset = new(() => Schema.GetOffset(0x1E3FE63091CAF75E), LazyThreadSafetyMode.None); + public string OperatorName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1E3FE63091CAF75E)); + var ptr = _Handle.Read(_OperatorNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1E3FE63091CAF75E, value); + set => Schema.SetString(_Handle, _OperatorNameOffset.Value, value); } + private static readonly Lazy _FieldNameOffset = new(() => Schema.GetOffset(0x1E3FE6300A25F4C4), LazyThreadSafetyMode.None); + public string FieldName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1E3FE6300A25F4C4)); + var ptr = _Handle.Read(_FieldNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1E3FE6300A25F4C4, value); + set => Schema.SetString(_Handle, _FieldNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_EnableChildrenFromParentParticleCountImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_EnableChildrenFromParentParticleCountImpl.cs index ad9ba539b..6ad4ea75e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_EnableChildrenFromParentParticleCountImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_EnableChildrenFromParentParticleCountImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_EnableChildrenFromParentParticleCountImpl : CParticl public C_OP_EnableChildrenFromParentParticleCountImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildGroupIDOffset = new(() => Schema.GetOffset(0xDF13D5F2E3F3C965), LazyThreadSafetyMode.None); + public ref int ChildGroupID { - get => ref _Handle.AsRef(Schema.GetOffset(0xDF13D5F2E3F3C965)); + get => ref _Handle.AsRef(_ChildGroupIDOffset.Value); } + private static readonly Lazy _FirstChildOffset = new(() => Schema.GetOffset(0xDF13D5F22DF4A8BD), LazyThreadSafetyMode.None); + public ref int FirstChild { - get => ref _Handle.AsRef(Schema.GetOffset(0xDF13D5F22DF4A8BD)); + get => ref _Handle.AsRef(_FirstChildOffset.Value); } + private static readonly Lazy _NumChildrenToEnableOffset = new(() => Schema.GetOffset(0xDF13D5F28039247A), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput NumChildrenToEnable { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xDF13D5F28039247A)); + get => new CParticleCollectionFloatInputImpl(_Handle + _NumChildrenToEnableOffset.Value); } + private static readonly Lazy _DisableChildrenOffset = new(() => Schema.GetOffset(0xDF13D5F2F13DBFCC), LazyThreadSafetyMode.None); + public ref bool DisableChildren { - get => ref _Handle.AsRef(Schema.GetOffset(0xDF13D5F2F13DBFCC)); + get => ref _Handle.AsRef(_DisableChildrenOffset.Value); } + private static readonly Lazy _PlayEndcapOnStopOffset = new(() => Schema.GetOffset(0xDF13D5F2CEC82FA1), LazyThreadSafetyMode.None); + public ref bool PlayEndcapOnStop { - get => ref _Handle.AsRef(Schema.GetOffset(0xDF13D5F2CEC82FA1)); + get => ref _Handle.AsRef(_PlayEndcapOnStopOffset.Value); } + private static readonly Lazy _DestroyImmediatelyOffset = new(() => Schema.GetOffset(0xDF13D5F275F43101), LazyThreadSafetyMode.None); + public ref bool DestroyImmediately { - get => ref _Handle.AsRef(Schema.GetOffset(0xDF13D5F275F43101)); + get => ref _Handle.AsRef(_DestroyImmediatelyOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_EndCapDecayImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_EndCapDecayImpl.cs index f55b23a3b..09f5c54ec 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_EndCapDecayImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_EndCapDecayImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_EndCapTimedDecayImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_EndCapTimedDecayImpl.cs index df6ac202b..3031e4289 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_EndCapTimedDecayImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_EndCapTimedDecayImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_OP_EndCapTimedDecayImpl : CParticleFunctionOperatorImpl public C_OP_EndCapTimedDecayImpl(nint handle) : base(handle) { } + private static readonly Lazy _DecayTimeOffset = new(() => Schema.GetOffset(0x2866C865E94A0656), LazyThreadSafetyMode.None); + public ref float DecayTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x2866C865E94A0656)); + get => ref _Handle.AsRef(_DecayTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_EndCapTimedFreezeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_EndCapTimedFreezeImpl.cs index a689c088d..86365f4e5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_EndCapTimedFreezeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_EndCapTimedFreezeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_OP_EndCapTimedFreezeImpl : CParticleFunctionOperatorImp public C_OP_EndCapTimedFreezeImpl(nint handle) : base(handle) { } + private static readonly Lazy _FreezeTimeOffset = new(() => Schema.GetOffset(0xE8E243ACEAB1B29), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput FreezeTime { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xE8E243ACEAB1B29)); + get => new CParticleCollectionFloatInputImpl(_Handle + _FreezeTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ExternalGameImpulseForceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ExternalGameImpulseForceImpl.cs index 77f86a6ab..2f6f6c80e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ExternalGameImpulseForceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ExternalGameImpulseForceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_ExternalGameImpulseForceImpl : CParticleFunctionForc public C_OP_ExternalGameImpulseForceImpl(nint handle) : base(handle) { } + private static readonly Lazy _ForceScaleOffset = new(() => Schema.GetOffset(0x9579EDD64817F390), LazyThreadSafetyMode.None); + public CPerParticleFloatInput ForceScale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x9579EDD64817F390)); + get => new CPerParticleFloatInputImpl(_Handle + _ForceScaleOffset.Value); } + private static readonly Lazy _RopesOffset = new(() => Schema.GetOffset(0x9579EDD63A651EDA), LazyThreadSafetyMode.None); + public ref bool Ropes { - get => ref _Handle.AsRef(Schema.GetOffset(0x9579EDD63A651EDA)); + get => ref _Handle.AsRef(_RopesOffset.Value); } + private static readonly Lazy _RopesZOnlyOffset = new(() => Schema.GetOffset(0x9579EDD686709BB2), LazyThreadSafetyMode.None); + public ref bool RopesZOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0x9579EDD686709BB2)); + get => ref _Handle.AsRef(_RopesZOnlyOffset.Value); } + private static readonly Lazy _ExplosionsOffset = new(() => Schema.GetOffset(0x9579EDD64CD39BC9), LazyThreadSafetyMode.None); + public ref bool Explosions { - get => ref _Handle.AsRef(Schema.GetOffset(0x9579EDD64CD39BC9)); + get => ref _Handle.AsRef(_ExplosionsOffset.Value); } + private static readonly Lazy _ParticlesOffset = new(() => Schema.GetOffset(0x9579EDD6B287A104), LazyThreadSafetyMode.None); + public ref bool Particles { - get => ref _Handle.AsRef(Schema.GetOffset(0x9579EDD6B287A104)); + get => ref _Handle.AsRef(_ParticlesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ExternalWindForceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ExternalWindForceImpl.cs index 833a2eb0e..8da65c39c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ExternalWindForceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ExternalWindForceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class C_OP_ExternalWindForceImpl : CParticleFunctionForceImpl, public C_OP_ExternalWindForceImpl(nint handle) : base(handle) { } + private static readonly Lazy _SamplePositionOffset = new(() => Schema.GetOffset(0xFE6646FBC3F6C534), LazyThreadSafetyMode.None); + public CPerParticleVecInput SamplePosition { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xFE6646FBC3F6C534)); + get => new CPerParticleVecInputImpl(_Handle + _SamplePositionOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0xFE6646FB5F596B51), LazyThreadSafetyMode.None); + public CPerParticleVecInput Scale { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xFE6646FB5F596B51)); + get => new CPerParticleVecInputImpl(_Handle + _ScaleOffset.Value); } + private static readonly Lazy _SampleWindOffset = new(() => Schema.GetOffset(0xFE6646FB3C2A72D1), LazyThreadSafetyMode.None); + public ref bool SampleWind { - get => ref _Handle.AsRef(Schema.GetOffset(0xFE6646FB3C2A72D1)); + get => ref _Handle.AsRef(_SampleWindOffset.Value); } + private static readonly Lazy _SampleWaterOffset = new(() => Schema.GetOffset(0xFE6646FB97B80806), LazyThreadSafetyMode.None); + public ref bool SampleWater { - get => ref _Handle.AsRef(Schema.GetOffset(0xFE6646FB97B80806)); + get => ref _Handle.AsRef(_SampleWaterOffset.Value); } + private static readonly Lazy _DampenNearWaterPlaneOffset = new(() => Schema.GetOffset(0xFE6646FB974DA031), LazyThreadSafetyMode.None); + public ref bool DampenNearWaterPlane { - get => ref _Handle.AsRef(Schema.GetOffset(0xFE6646FB974DA031)); + get => ref _Handle.AsRef(_DampenNearWaterPlaneOffset.Value); } + private static readonly Lazy _SampleGravityOffset = new(() => Schema.GetOffset(0xFE6646FB805373EF), LazyThreadSafetyMode.None); + public ref bool SampleGravity { - get => ref _Handle.AsRef(Schema.GetOffset(0xFE6646FB805373EF)); + get => ref _Handle.AsRef(_SampleGravityOffset.Value); } + private static readonly Lazy _GravityForceOffset = new(() => Schema.GetOffset(0xFE6646FB2E2EF2C4), LazyThreadSafetyMode.None); + public CPerParticleVecInput GravityForce { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xFE6646FB2E2EF2C4)); + get => new CPerParticleVecInputImpl(_Handle + _GravityForceOffset.Value); } + private static readonly Lazy _UseBasicMovementGravityOffset = new(() => Schema.GetOffset(0xFE6646FBC84E3D7B), LazyThreadSafetyMode.None); + public ref bool UseBasicMovementGravity { - get => ref _Handle.AsRef(Schema.GetOffset(0xFE6646FBC84E3D7B)); + get => ref _Handle.AsRef(_UseBasicMovementGravityOffset.Value); } + private static readonly Lazy _LocalGravityScaleOffset = new(() => Schema.GetOffset(0xFE6646FBD7EB148E), LazyThreadSafetyMode.None); + public CPerParticleFloatInput LocalGravityScale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xFE6646FBD7EB148E)); + get => new CPerParticleFloatInputImpl(_Handle + _LocalGravityScaleOffset.Value); } + private static readonly Lazy _LocalBuoyancyScaleOffset = new(() => Schema.GetOffset(0xFE6646FBC6A6171E), LazyThreadSafetyMode.None); + public CPerParticleFloatInput LocalBuoyancyScale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xFE6646FBC6A6171E)); + get => new CPerParticleFloatInputImpl(_Handle + _LocalBuoyancyScaleOffset.Value); } + private static readonly Lazy _BuoyancyForceOffset = new(() => Schema.GetOffset(0xFE6646FBCA7F361E), LazyThreadSafetyMode.None); + public CPerParticleVecInput BuoyancyForce { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xFE6646FBCA7F361E)); + get => new CPerParticleVecInputImpl(_Handle + _BuoyancyForceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeAndKillForTracersImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeAndKillForTracersImpl.cs index 252f77067..3d1ec8ccb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeAndKillForTracersImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeAndKillForTracersImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_FadeAndKillForTracersImpl : CParticleFunctionOperato public C_OP_FadeAndKillForTracersImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartFadeInTimeOffset = new(() => Schema.GetOffset(0x776267EF39639779), LazyThreadSafetyMode.None); + public ref float StartFadeInTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x776267EF39639779)); + get => ref _Handle.AsRef(_StartFadeInTimeOffset.Value); } + private static readonly Lazy _EndFadeInTimeOffset = new(() => Schema.GetOffset(0x776267EF36A35C84), LazyThreadSafetyMode.None); + public ref float EndFadeInTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x776267EF36A35C84)); + get => ref _Handle.AsRef(_EndFadeInTimeOffset.Value); } + private static readonly Lazy _StartFadeOutTimeOffset = new(() => Schema.GetOffset(0x776267EF6ABCF324), LazyThreadSafetyMode.None); + public ref float StartFadeOutTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x776267EF6ABCF324)); + get => ref _Handle.AsRef(_StartFadeOutTimeOffset.Value); } + private static readonly Lazy _EndFadeOutTimeOffset = new(() => Schema.GetOffset(0x776267EFFE87D7E7), LazyThreadSafetyMode.None); + public ref float EndFadeOutTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x776267EFFE87D7E7)); + get => ref _Handle.AsRef(_EndFadeOutTimeOffset.Value); } + private static readonly Lazy _StartAlphaOffset = new(() => Schema.GetOffset(0x776267EF6A7A5D0B), LazyThreadSafetyMode.None); + public ref float StartAlpha { - get => ref _Handle.AsRef(Schema.GetOffset(0x776267EF6A7A5D0B)); + get => ref _Handle.AsRef(_StartAlphaOffset.Value); } + private static readonly Lazy _EndAlphaOffset = new(() => Schema.GetOffset(0x776267EF7A639CC0), LazyThreadSafetyMode.None); + public ref float EndAlpha { - get => ref _Handle.AsRef(Schema.GetOffset(0x776267EF7A639CC0)); + get => ref _Handle.AsRef(_EndAlphaOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeAndKillImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeAndKillImpl.cs index 811688d2c..2918a7b35 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeAndKillImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeAndKillImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_FadeAndKillImpl : CParticleFunctionOperatorImpl, C_O public C_OP_FadeAndKillImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartFadeInTimeOffset = new(() => Schema.GetOffset(0x66AFC90439639779), LazyThreadSafetyMode.None); + public ref float StartFadeInTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x66AFC90439639779)); + get => ref _Handle.AsRef(_StartFadeInTimeOffset.Value); } + private static readonly Lazy _EndFadeInTimeOffset = new(() => Schema.GetOffset(0x66AFC90436A35C84), LazyThreadSafetyMode.None); + public ref float EndFadeInTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x66AFC90436A35C84)); + get => ref _Handle.AsRef(_EndFadeInTimeOffset.Value); } + private static readonly Lazy _StartFadeOutTimeOffset = new(() => Schema.GetOffset(0x66AFC9046ABCF324), LazyThreadSafetyMode.None); + public ref float StartFadeOutTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x66AFC9046ABCF324)); + get => ref _Handle.AsRef(_StartFadeOutTimeOffset.Value); } + private static readonly Lazy _EndFadeOutTimeOffset = new(() => Schema.GetOffset(0x66AFC904FE87D7E7), LazyThreadSafetyMode.None); + public ref float EndFadeOutTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x66AFC904FE87D7E7)); + get => ref _Handle.AsRef(_EndFadeOutTimeOffset.Value); } + private static readonly Lazy _StartAlphaOffset = new(() => Schema.GetOffset(0x66AFC9046A7A5D0B), LazyThreadSafetyMode.None); + public ref float StartAlpha { - get => ref _Handle.AsRef(Schema.GetOffset(0x66AFC9046A7A5D0B)); + get => ref _Handle.AsRef(_StartAlphaOffset.Value); } + private static readonly Lazy _EndAlphaOffset = new(() => Schema.GetOffset(0x66AFC9047A639CC0), LazyThreadSafetyMode.None); + public ref float EndAlpha { - get => ref _Handle.AsRef(Schema.GetOffset(0x66AFC9047A639CC0)); + get => ref _Handle.AsRef(_EndAlphaOffset.Value); } + private static readonly Lazy _ForcePreserveParticleOrderOffset = new(() => Schema.GetOffset(0x66AFC904FEB98B86), LazyThreadSafetyMode.None); + public ref bool ForcePreserveParticleOrder { - get => ref _Handle.AsRef(Schema.GetOffset(0x66AFC904FEB98B86)); + get => ref _Handle.AsRef(_ForcePreserveParticleOrderOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeInImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeInImpl.cs index e4af697bf..1c37ab170 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeInImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeInImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_FadeInImpl : CParticleFunctionOperatorImpl, C_OP_Fad public C_OP_FadeInImpl(nint handle) : base(handle) { } + private static readonly Lazy _FadeInTimeMinOffset = new(() => Schema.GetOffset(0xA8B59B1091A2EFE5), LazyThreadSafetyMode.None); + public ref float FadeInTimeMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8B59B1091A2EFE5)); + get => ref _Handle.AsRef(_FadeInTimeMinOffset.Value); } + private static readonly Lazy _FadeInTimeMaxOffset = new(() => Schema.GetOffset(0xA8B59B109BB6875B), LazyThreadSafetyMode.None); + public ref float FadeInTimeMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8B59B109BB6875B)); + get => ref _Handle.AsRef(_FadeInTimeMaxOffset.Value); } + private static readonly Lazy _FadeInTimeExpOffset = new(() => Schema.GetOffset(0xA8B59B1046BA449A), LazyThreadSafetyMode.None); + public ref float FadeInTimeExp { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8B59B1046BA449A)); + get => ref _Handle.AsRef(_FadeInTimeExpOffset.Value); } + private static readonly Lazy _ProportionalOffset = new(() => Schema.GetOffset(0xA8B59B10891F328A), LazyThreadSafetyMode.None); + public ref bool Proportional { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8B59B10891F328A)); + get => ref _Handle.AsRef(_ProportionalOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeInSimpleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeInSimpleImpl.cs index ad103495a..5ab6a7151 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeInSimpleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeInSimpleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_FadeInSimpleImpl : CParticleFunctionOperatorImpl, C_ public C_OP_FadeInSimpleImpl(nint handle) : base(handle) { } + private static readonly Lazy _FadeInTimeOffset = new(() => Schema.GetOffset(0x31D1B5A1F0255B3), LazyThreadSafetyMode.None); + public ref float FadeInTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x31D1B5A1F0255B3)); + get => ref _Handle.AsRef(_FadeInTimeOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x31D1B5AE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x31D1B5AE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeOutImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeOutImpl.cs index d41a595c5..af15e171f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeOutImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeOutImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_FadeOutImpl : CParticleFunctionOperatorImpl, C_OP_Fa public C_OP_FadeOutImpl(nint handle) : base(handle) { } + private static readonly Lazy _FadeOutTimeMinOffset = new(() => Schema.GetOffset(0xDB3026B50D900CF6), LazyThreadSafetyMode.None); + public ref float FadeOutTimeMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB3026B50D900CF6)); + get => ref _Handle.AsRef(_FadeOutTimeMinOffset.Value); } + private static readonly Lazy _FadeOutTimeMaxOffset = new(() => Schema.GetOffset(0xDB3026B5FFA37EA4), LazyThreadSafetyMode.None); + public ref float FadeOutTimeMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB3026B5FFA37EA4)); + get => ref _Handle.AsRef(_FadeOutTimeMaxOffset.Value); } + private static readonly Lazy _FadeOutTimeExpOffset = new(() => Schema.GetOffset(0xDB3026B596AB9995), LazyThreadSafetyMode.None); + public ref float FadeOutTimeExp { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB3026B596AB9995)); + get => ref _Handle.AsRef(_FadeOutTimeExpOffset.Value); } + private static readonly Lazy _FadeBiasOffset = new(() => Schema.GetOffset(0xDB3026B5D35FA840), LazyThreadSafetyMode.None); + public ref float FadeBias { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB3026B5D35FA840)); + get => ref _Handle.AsRef(_FadeBiasOffset.Value); } + private static readonly Lazy _ProportionalOffset = new(() => Schema.GetOffset(0xDB3026B5891F328A), LazyThreadSafetyMode.None); + public ref bool Proportional { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB3026B5891F328A)); + get => ref _Handle.AsRef(_ProportionalOffset.Value); } + private static readonly Lazy _EaseInAndOutOffset = new(() => Schema.GetOffset(0xDB3026B5D14612BF), LazyThreadSafetyMode.None); + public ref bool EaseInAndOut { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB3026B5D14612BF)); + get => ref _Handle.AsRef(_EaseInAndOutOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeOutSimpleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeOutSimpleImpl.cs index d0ae55d09..01f9aee23 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeOutSimpleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_FadeOutSimpleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_FadeOutSimpleImpl : CParticleFunctionOperatorImpl, C public C_OP_FadeOutSimpleImpl(nint handle) : base(handle) { } + private static readonly Lazy _FadeOutTimeOffset = new(() => Schema.GetOffset(0xD439658FE86D2FC2), LazyThreadSafetyMode.None); + public ref float FadeOutTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xD439658FE86D2FC2)); + get => ref _Handle.AsRef(_FadeOutTimeOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xD439658FE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xD439658FE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ForceBasedOnDistanceToPlaneImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ForceBasedOnDistanceToPlaneImpl.cs index 07a26c5b6..f50b32918 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ForceBasedOnDistanceToPlaneImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ForceBasedOnDistanceToPlaneImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_ForceBasedOnDistanceToPlaneImpl : CParticleFunctionF public C_OP_ForceBasedOnDistanceToPlaneImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinDistOffset = new(() => Schema.GetOffset(0x41A5EAC25219494D), LazyThreadSafetyMode.None); + public ref float MinDist { - get => ref _Handle.AsRef(Schema.GetOffset(0x41A5EAC25219494D)); + get => ref _Handle.AsRef(_MinDistOffset.Value); } + private static readonly Lazy _ForceAtMinDistOffset = new(() => Schema.GetOffset(0x41A5EAC23BD9C5EB), LazyThreadSafetyMode.None); + public ref Vector ForceAtMinDist { - get => ref _Handle.AsRef(Schema.GetOffset(0x41A5EAC23BD9C5EB)); + get => ref _Handle.AsRef(_ForceAtMinDistOffset.Value); } + private static readonly Lazy _MaxDistOffset = new(() => Schema.GetOffset(0x41A5EAC2EFFD23F7), LazyThreadSafetyMode.None); + public ref float MaxDist { - get => ref _Handle.AsRef(Schema.GetOffset(0x41A5EAC2EFFD23F7)); + get => ref _Handle.AsRef(_MaxDistOffset.Value); } + private static readonly Lazy _ForceAtMaxDistOffset = new(() => Schema.GetOffset(0x41A5EAC24119AAF9), LazyThreadSafetyMode.None); + public ref Vector ForceAtMaxDist { - get => ref _Handle.AsRef(Schema.GetOffset(0x41A5EAC24119AAF9)); + get => ref _Handle.AsRef(_ForceAtMaxDistOffset.Value); } + private static readonly Lazy _PlaneNormalOffset = new(() => Schema.GetOffset(0x41A5EAC221103682), LazyThreadSafetyMode.None); + public ref Vector PlaneNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0x41A5EAC221103682)); + get => ref _Handle.AsRef(_PlaneNormalOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x41A5EAC23F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x41A5EAC23F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _ExponentOffset = new(() => Schema.GetOffset(0x41A5EAC220A7BCBC), LazyThreadSafetyMode.None); + public ref float Exponent { - get => ref _Handle.AsRef(Schema.GetOffset(0x41A5EAC220A7BCBC)); + get => ref _Handle.AsRef(_ExponentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ForceControlPointStubImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ForceControlPointStubImpl.cs index 8df1cc85c..78ed297b4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ForceControlPointStubImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ForceControlPointStubImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_OP_ForceControlPointStubImpl : CParticleFunctionPreEmis public C_OP_ForceControlPointStubImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointOffset = new(() => Schema.GetOffset(0xE0FD255D5EDF730), LazyThreadSafetyMode.None); + public ref int ControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xE0FD255D5EDF730)); + get => ref _Handle.AsRef(_ControlPointOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_GameDecalRendererImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_GameDecalRendererImpl.cs index 80cf51ad8..63124fc51 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_GameDecalRendererImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_GameDecalRendererImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,53 +17,85 @@ internal partial class C_OP_GameDecalRendererImpl : CParticleFunctionRendererImp public C_OP_GameDecalRendererImpl(nint handle) : base(handle) { } + private static readonly Lazy _DecalGroupNameOffset = new(() => Schema.GetOffset(0x42DAAA6713ADF275), LazyThreadSafetyMode.None); + public ref CGlobalSymbol DecalGroupName { - get => ref _Handle.AsRef(Schema.GetOffset(0x42DAAA6713ADF275)); + get => ref _Handle.AsRef(_DecalGroupNameOffset.Value); } + private static readonly Lazy _EventTypeOffset = new(() => Schema.GetOffset(0x42DAAA67E1F9AA93), LazyThreadSafetyMode.None); + public ref EventTypeSelection_t EventType { - get => ref _Handle.AsRef(Schema.GetOffset(0x42DAAA67E1F9AA93)); + get => ref _Handle.AsRef(_EventTypeOffset.Value); } + private static readonly Lazy _InteractionMaskOffset = new(() => Schema.GetOffset(0x42DAAA6776E7F97B), LazyThreadSafetyMode.None); + public ref ParticleCollisionMask_t InteractionMask { - get => ref _Handle.AsRef(Schema.GetOffset(0x42DAAA6776E7F97B)); + get => ref _Handle.AsRef(_InteractionMaskOffset.Value); } + private static readonly Lazy _CollisionGroupOffset = new(() => Schema.GetOffset(0x42DAAA670AC0C752), LazyThreadSafetyMode.None); + public ref ParticleCollisionGroup_t CollisionGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0x42DAAA670AC0C752)); + get => ref _Handle.AsRef(_CollisionGroupOffset.Value); } + private static readonly Lazy _StartPosOffset = new(() => Schema.GetOffset(0x42DAAA6726654BFF), LazyThreadSafetyMode.None); + public CPerParticleVecInput StartPos { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x42DAAA6726654BFF)); + get => new CPerParticleVecInputImpl(_Handle + _StartPosOffset.Value); } + private static readonly Lazy _EndPosOffset = new(() => Schema.GetOffset(0x42DAAA678DD24760), LazyThreadSafetyMode.None); + public CPerParticleVecInput EndPos { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x42DAAA678DD24760)); + get => new CPerParticleVecInputImpl(_Handle + _EndPosOffset.Value); } + private static readonly Lazy _TraceBloatOffset = new(() => Schema.GetOffset(0x42DAAA674BE375F2), LazyThreadSafetyMode.None); + public CPerParticleFloatInput TraceBloat { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x42DAAA674BE375F2)); + get => new CPerParticleFloatInputImpl(_Handle + _TraceBloatOffset.Value); } + private static readonly Lazy _DecalSizeOffset = new(() => Schema.GetOffset(0x42DAAA6788E12609), LazyThreadSafetyMode.None); + public CPerParticleFloatInput DecalSize { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x42DAAA6788E12609)); + get => new CPerParticleFloatInputImpl(_Handle + _DecalSizeOffset.Value); } + private static readonly Lazy _DecalGroupIndexOffset = new(() => Schema.GetOffset(0x42DAAA6784206313), LazyThreadSafetyMode.None); + public CPerParticleFloatInput DecalGroupIndex { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x42DAAA6784206313)); + get => new CPerParticleFloatInputImpl(_Handle + _DecalGroupIndexOffset.Value); } + private static readonly Lazy _DecalRotationOffset = new(() => Schema.GetOffset(0x42DAAA6788A29A9E), LazyThreadSafetyMode.None); + public CPerParticleFloatInput DecalRotation { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x42DAAA6788A29A9E)); + get => new CPerParticleFloatInputImpl(_Handle + _DecalRotationOffset.Value); } + private static readonly Lazy _ModulationColorOffset = new(() => Schema.GetOffset(0x42DAAA67C39DA78E), LazyThreadSafetyMode.None); + public CPerParticleVecInput ModulationColor { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x42DAAA67C39DA78E)); + get => new CPerParticleVecInputImpl(_Handle + _ModulationColorOffset.Value); } + private static readonly Lazy _UseGameDefaultDecalSizeOffset = new(() => Schema.GetOffset(0x42DAAA6749D51905), LazyThreadSafetyMode.None); + public ref bool UseGameDefaultDecalSize { - get => ref _Handle.AsRef(Schema.GetOffset(0x42DAAA6749D51905)); + get => ref _Handle.AsRef(_UseGameDefaultDecalSizeOffset.Value); } + private static readonly Lazy _RandomDecalRotationOffset = new(() => Schema.GetOffset(0x42DAAA673B9BD1F1), LazyThreadSafetyMode.None); + public ref bool RandomDecalRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0x42DAAA673B9BD1F1)); + get => ref _Handle.AsRef(_RandomDecalRotationOffset.Value); } + private static readonly Lazy _RandomlySelectDecalInGroupOffset = new(() => Schema.GetOffset(0x42DAAA670519A84C), LazyThreadSafetyMode.None); + public ref bool RandomlySelectDecalInGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0x42DAAA670519A84C)); + get => ref _Handle.AsRef(_RandomlySelectDecalInGroupOffset.Value); } + private static readonly Lazy _NoDecalsOnOwnerOffset = new(() => Schema.GetOffset(0x42DAAA672B2ECEB4), LazyThreadSafetyMode.None); + public ref bool NoDecalsOnOwner { - get => ref _Handle.AsRef(Schema.GetOffset(0x42DAAA672B2ECEB4)); + get => ref _Handle.AsRef(_NoDecalsOnOwnerOffset.Value); } + private static readonly Lazy _VisualizeTracesOffset = new(() => Schema.GetOffset(0x42DAAA67ED707633), LazyThreadSafetyMode.None); + public ref bool VisualizeTraces { - get => ref _Handle.AsRef(Schema.GetOffset(0x42DAAA67ED707633)); + get => ref _Handle.AsRef(_VisualizeTracesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_GameLiquidSpillImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_GameLiquidSpillImpl.cs index 3f692fd99..969fd8d35 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_GameLiquidSpillImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_GameLiquidSpillImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_GameLiquidSpillImpl : CParticleFunctionRendererImpl, public C_OP_GameLiquidSpillImpl(nint handle) : base(handle) { } + private static readonly Lazy _LiquidContentsFieldOffset = new(() => Schema.GetOffset(0xB07185274F9A10CB), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput LiquidContentsField { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xB07185274F9A10CB)); + get => new CParticleCollectionFloatInputImpl(_Handle + _LiquidContentsFieldOffset.Value); } + private static readonly Lazy _ExpirationTimeOffset = new(() => Schema.GetOffset(0xB07185272A34213F), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ExpirationTime { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xB07185272A34213F)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ExpirationTimeOffset.Value); } + private static readonly Lazy _AmountAttributeOffset = new(() => Schema.GetOffset(0xB071852755424147), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t AmountAttribute { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xB071852755424147)); + get => new ParticleAttributeIndex_tImpl(_Handle + _AmountAttributeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_GlobalLightImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_GlobalLightImpl.cs index 63b72b42a..d5fb9c15b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_GlobalLightImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_GlobalLightImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_GlobalLightImpl : CParticleFunctionOperatorImpl, C_O public C_OP_GlobalLightImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0xC02700C2B731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0xC02700C2B731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _ClampLowerRangeOffset = new(() => Schema.GetOffset(0xC02700C20F690326), LazyThreadSafetyMode.None); + public ref bool ClampLowerRange { - get => ref _Handle.AsRef(Schema.GetOffset(0xC02700C20F690326)); + get => ref _Handle.AsRef(_ClampLowerRangeOffset.Value); } + private static readonly Lazy _ClampUpperRangeOffset = new(() => Schema.GetOffset(0xC02700C2815873B5), LazyThreadSafetyMode.None); + public ref bool ClampUpperRange { - get => ref _Handle.AsRef(Schema.GetOffset(0xC02700C2815873B5)); + get => ref _Handle.AsRef(_ClampUpperRangeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_HSVShiftToCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_HSVShiftToCPImpl.cs index fb7d33709..b8054135d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_HSVShiftToCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_HSVShiftToCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_HSVShiftToCPImpl : CParticleFunctionPreEmissionImpl, public C_OP_HSVShiftToCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _ColorCPOffset = new(() => Schema.GetOffset(0xA6FD1F901D3D233F), LazyThreadSafetyMode.None); + public ref int ColorCP { - get => ref _Handle.AsRef(Schema.GetOffset(0xA6FD1F901D3D233F)); + get => ref _Handle.AsRef(_ColorCPOffset.Value); } + private static readonly Lazy _ColorGemEnableCPOffset = new(() => Schema.GetOffset(0xA6FD1F907B5C2B7F), LazyThreadSafetyMode.None); + public ref int ColorGemEnableCP { - get => ref _Handle.AsRef(Schema.GetOffset(0xA6FD1F907B5C2B7F)); + get => ref _Handle.AsRef(_ColorGemEnableCPOffset.Value); } + private static readonly Lazy _OutputCPOffset = new(() => Schema.GetOffset(0xA6FD1F9050DF5703), LazyThreadSafetyMode.None); + public ref int OutputCP { - get => ref _Handle.AsRef(Schema.GetOffset(0xA6FD1F9050DF5703)); + get => ref _Handle.AsRef(_OutputCPOffset.Value); } + private static readonly Lazy _DefaultHSVColorOffset = new(() => Schema.GetOffset(0xA6FD1F90A7EFB0DE), LazyThreadSafetyMode.None); + public ref Color DefaultHSVColor { - get => ref _Handle.AsRef(Schema.GetOffset(0xA6FD1F90A7EFB0DE)); + get => ref _Handle.AsRef(_DefaultHSVColorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InheritFromParentParticlesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InheritFromParentParticlesImpl.cs index 2bbdeb4df..8a94e32d1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InheritFromParentParticlesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InheritFromParentParticlesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_InheritFromParentParticlesImpl : CParticleFunctionOp public C_OP_InheritFromParentParticlesImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x4310722BB731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0x4310722BB731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x4310722BE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x4310722BE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _IncrementOffset = new(() => Schema.GetOffset(0x4310722B2359F182), LazyThreadSafetyMode.None); + public ref int Increment { - get => ref _Handle.AsRef(Schema.GetOffset(0x4310722B2359F182)); + get => ref _Handle.AsRef(_IncrementOffset.Value); } + private static readonly Lazy _RandomDistributionOffset = new(() => Schema.GetOffset(0x4310722B830F6B38), LazyThreadSafetyMode.None); + public ref bool RandomDistribution { - get => ref _Handle.AsRef(Schema.GetOffset(0x4310722B830F6B38)); + get => ref _Handle.AsRef(_RandomDistributionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InheritFromParentParticlesV2Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InheritFromParentParticlesV2Impl.cs index 976dc288f..2c092ba9a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InheritFromParentParticlesV2Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InheritFromParentParticlesV2Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_InheritFromParentParticlesV2Impl : CParticleFunction public C_OP_InheritFromParentParticlesV2Impl(nint handle) : base(handle) { } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0xF948CFAFB731A42F), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Scale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xF948CFAFB731A42F)); + get => new CPerParticleFloatInputImpl(_Handle + _ScaleOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xF948CFAFE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xF948CFAFE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _IncrementOffset = new(() => Schema.GetOffset(0xF948CFAF2359F182), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Increment { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xF948CFAF2359F182)); + get => new CPerParticleFloatInputImpl(_Handle + _IncrementOffset.Value); } + private static readonly Lazy _RandomDistributionOffset = new(() => Schema.GetOffset(0xF948CFAF830F6B38), LazyThreadSafetyMode.None); + public ref bool RandomDistribution { - get => ref _Handle.AsRef(Schema.GetOffset(0xF948CFAF830F6B38)); + get => ref _Handle.AsRef(_RandomDistributionOffset.Value); } + private static readonly Lazy _ReverseOffset = new(() => Schema.GetOffset(0xF948CFAFEA4E22E5), LazyThreadSafetyMode.None); + public ref bool Reverse { - get => ref _Handle.AsRef(Schema.GetOffset(0xF948CFAFEA4E22E5)); + get => ref _Handle.AsRef(_ReverseOffset.Value); } + private static readonly Lazy _MissingParentBehaviorOffset = new(() => Schema.GetOffset(0xF948CFAF9B0F277D), LazyThreadSafetyMode.None); + public ref MissingParentInheritBehavior_t MissingParentBehavior { - get => ref _Handle.AsRef(Schema.GetOffset(0xF948CFAF9B0F277D)); + get => ref _Handle.AsRef(_MissingParentBehaviorOffset.Value); } + private static readonly Lazy _InterpolationOffset = new(() => Schema.GetOffset(0xF948CFAFCF55B987), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Interpolation { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xF948CFAFCF55B987)); + get => new CPerParticleFloatInputImpl(_Handle + _InterpolationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InheritFromPeerSystemImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InheritFromPeerSystemImpl.cs index 86179a3b8..dd8a4c9ff 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InheritFromPeerSystemImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InheritFromPeerSystemImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_InheritFromPeerSystemImpl : CParticleFunctionOperato public C_OP_InheritFromPeerSystemImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x8105C85DE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x8105C85DE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _FieldInputOffset = new(() => Schema.GetOffset(0x8105C85DAE775669), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x8105C85DAE775669)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputOffset.Value); } + private static readonly Lazy _IncrementOffset = new(() => Schema.GetOffset(0x8105C85D2359F182), LazyThreadSafetyMode.None); + public ref int Increment { - get => ref _Handle.AsRef(Schema.GetOffset(0x8105C85D2359F182)); + get => ref _Handle.AsRef(_IncrementOffset.Value); } + private static readonly Lazy _GroupIDOffset = new(() => Schema.GetOffset(0x8105C85D3BB05135), LazyThreadSafetyMode.None); + public ref int GroupID { - get => ref _Handle.AsRef(Schema.GetOffset(0x8105C85D3BB05135)); + get => ref _Handle.AsRef(_GroupIDOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InstantaneousEmitterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InstantaneousEmitterImpl.cs index 14b14cf14..1a89e12de 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InstantaneousEmitterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InstantaneousEmitterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,33 +17,49 @@ internal partial class C_OP_InstantaneousEmitterImpl : CParticleFunctionEmitterI public C_OP_InstantaneousEmitterImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParticlesToEmitOffset = new(() => Schema.GetOffset(0x39132039B1A158C6), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ParticlesToEmit { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x39132039B1A158C6)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ParticlesToEmitOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0x3913203967FE9DC4), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput StartTime { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x3913203967FE9DC4)); + get => new CParticleCollectionFloatInputImpl(_Handle + _StartTimeOffset.Value); } + private static readonly Lazy _InitFromKilledParentParticlesOffset = new(() => Schema.GetOffset(0x39132039269B492F), LazyThreadSafetyMode.None); + public ref float InitFromKilledParentParticles { - get => ref _Handle.AsRef(Schema.GetOffset(0x39132039269B492F)); + get => ref _Handle.AsRef(_InitFromKilledParentParticlesOffset.Value); } + private static readonly Lazy _EventTypeOffset = new(() => Schema.GetOffset(0x39132039E1F9AA93), LazyThreadSafetyMode.None); + public ref EventTypeSelection_t EventType { - get => ref _Handle.AsRef(Schema.GetOffset(0x39132039E1F9AA93)); + get => ref _Handle.AsRef(_EventTypeOffset.Value); } + private static readonly Lazy _ParentParticleScaleOffset = new(() => Schema.GetOffset(0x3913203967144ED5), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ParentParticleScale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x3913203967144ED5)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ParentParticleScaleOffset.Value); } + private static readonly Lazy _MaxEmittedPerFrameOffset = new(() => Schema.GetOffset(0x3913203970B62EBB), LazyThreadSafetyMode.None); + public ref int MaxEmittedPerFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x3913203970B62EBB)); + get => ref _Handle.AsRef(_MaxEmittedPerFrameOffset.Value); } + private static readonly Lazy _SnapshotControlPointOffset = new(() => Schema.GetOffset(0x39132039192638EC), LazyThreadSafetyMode.None); + public ref int SnapshotControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x39132039192638EC)); + get => ref _Handle.AsRef(_SnapshotControlPointOffset.Value); } + private static readonly Lazy _StrSnapshotSubsetOffset = new(() => Schema.GetOffset(0x39132039BD8A8E5E), LazyThreadSafetyMode.None); + public string StrSnapshotSubset { get { - var ptr = _Handle.Read(Schema.GetOffset(0x39132039BD8A8E5E)); + var ptr = _Handle.Read(_StrSnapshotSubsetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x39132039BD8A8E5E, value); + set => Schema.SetString(_Handle, _StrSnapshotSubsetOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InterpolateRadiusImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InterpolateRadiusImpl.cs index 8c5a30f79..85b8e4a1e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InterpolateRadiusImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_InterpolateRadiusImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_InterpolateRadiusImpl : CParticleFunctionOperatorImp public C_OP_InterpolateRadiusImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0x1912EFA667FE9DC4), LazyThreadSafetyMode.None); + public ref float StartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x1912EFA667FE9DC4)); + get => ref _Handle.AsRef(_StartTimeOffset.Value); } + private static readonly Lazy _EndTimeOffset = new(() => Schema.GetOffset(0x1912EFA62041DF9D), LazyThreadSafetyMode.None); + public ref float EndTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x1912EFA62041DF9D)); + get => ref _Handle.AsRef(_EndTimeOffset.Value); } + private static readonly Lazy _StartScaleOffset = new(() => Schema.GetOffset(0x1912EFA6634567D1), LazyThreadSafetyMode.None); + public ref float StartScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x1912EFA6634567D1)); + get => ref _Handle.AsRef(_StartScaleOffset.Value); } + private static readonly Lazy _EndScaleOffset = new(() => Schema.GetOffset(0x1912EFA67F017DB6), LazyThreadSafetyMode.None); + public ref float EndScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x1912EFA67F017DB6)); + get => ref _Handle.AsRef(_EndScaleOffset.Value); } + private static readonly Lazy _EaseInAndOutOffset = new(() => Schema.GetOffset(0x1912EFA6D14612BF), LazyThreadSafetyMode.None); + public ref bool EaseInAndOut { - get => ref _Handle.AsRef(Schema.GetOffset(0x1912EFA6D14612BF)); + get => ref _Handle.AsRef(_EaseInAndOutOffset.Value); } + private static readonly Lazy _BiasOffset = new(() => Schema.GetOffset(0x1912EFA6E7EF43B6), LazyThreadSafetyMode.None); + public ref float Bias { - get => ref _Handle.AsRef(Schema.GetOffset(0x1912EFA6E7EF43B6)); + get => ref _Handle.AsRef(_BiasOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_IntraParticleForceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_IntraParticleForceImpl.cs index 3c0257a6c..4ecda4e8d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_IntraParticleForceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_IntraParticleForceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_IntraParticleForceImpl : CParticleFunctionForceImpl, public C_OP_IntraParticleForceImpl(nint handle) : base(handle) { } + private static readonly Lazy _AttractionMinDistanceOffset = new(() => Schema.GetOffset(0x784412D0CEAEE62D), LazyThreadSafetyMode.None); + public ref float AttractionMinDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x784412D0CEAEE62D)); + get => ref _Handle.AsRef(_AttractionMinDistanceOffset.Value); } + private static readonly Lazy _AttractionMaxDistanceOffset = new(() => Schema.GetOffset(0x784412D04052F81F), LazyThreadSafetyMode.None); + public ref float AttractionMaxDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x784412D04052F81F)); + get => ref _Handle.AsRef(_AttractionMaxDistanceOffset.Value); } + private static readonly Lazy _AttractionMaxStrengthOffset = new(() => Schema.GetOffset(0x784412D09FE72EFD), LazyThreadSafetyMode.None); + public ref float AttractionMaxStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x784412D09FE72EFD)); + get => ref _Handle.AsRef(_AttractionMaxStrengthOffset.Value); } + private static readonly Lazy _RepulsionMinDistanceOffset = new(() => Schema.GetOffset(0x784412D018F9EFB1), LazyThreadSafetyMode.None); + public ref float RepulsionMinDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x784412D018F9EFB1)); + get => ref _Handle.AsRef(_RepulsionMinDistanceOffset.Value); } + private static readonly Lazy _RepulsionMaxDistanceOffset = new(() => Schema.GetOffset(0x784412D05B7D269B), LazyThreadSafetyMode.None); + public ref float RepulsionMaxDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x784412D05B7D269B)); + get => ref _Handle.AsRef(_RepulsionMaxDistanceOffset.Value); } + private static readonly Lazy _RepulsionMaxStrengthOffset = new(() => Schema.GetOffset(0x784412D0B9401C21), LazyThreadSafetyMode.None); + public ref float RepulsionMaxStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x784412D0B9401C21)); + get => ref _Handle.AsRef(_RepulsionMaxStrengthOffset.Value); } + private static readonly Lazy _UseAABBOffset = new(() => Schema.GetOffset(0x784412D029AAFF2E), LazyThreadSafetyMode.None); + public ref bool UseAABB { - get => ref _Handle.AsRef(Schema.GetOffset(0x784412D029AAFF2E)); + get => ref _Handle.AsRef(_UseAABBOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LagCompensationImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LagCompensationImpl.cs index 6473128d6..df731df6f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LagCompensationImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LagCompensationImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_LagCompensationImpl : CParticleFunctionOperatorImpl, public C_OP_LagCompensationImpl(nint handle) : base(handle) { } + private static readonly Lazy _DesiredVelocityCPOffset = new(() => Schema.GetOffset(0x21277E4532AACEC5), LazyThreadSafetyMode.None); + public ref int DesiredVelocityCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x21277E4532AACEC5)); + get => ref _Handle.AsRef(_DesiredVelocityCPOffset.Value); } + private static readonly Lazy _LatencyCPOffset = new(() => Schema.GetOffset(0x21277E45B100FE8E), LazyThreadSafetyMode.None); + public ref int LatencyCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x21277E45B100FE8E)); + get => ref _Handle.AsRef(_LatencyCPOffset.Value); } + private static readonly Lazy _LatencyCPFieldOffset = new(() => Schema.GetOffset(0x21277E458E1CEB3A), LazyThreadSafetyMode.None); + public ref int LatencyCPField { - get => ref _Handle.AsRef(Schema.GetOffset(0x21277E458E1CEB3A)); + get => ref _Handle.AsRef(_LatencyCPFieldOffset.Value); } + private static readonly Lazy _DesiredVelocityCPFieldOffset = new(() => Schema.GetOffset(0x21277E45B59E9007), LazyThreadSafetyMode.None); + public ref int DesiredVelocityCPField { - get => ref _Handle.AsRef(Schema.GetOffset(0x21277E45B59E9007)); + get => ref _Handle.AsRef(_DesiredVelocityCPFieldOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LazyCullCompareFloatImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LazyCullCompareFloatImpl.cs index a5976a10a..91becb20e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LazyCullCompareFloatImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LazyCullCompareFloatImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_LazyCullCompareFloatImpl : CParticleFunctionOperator public C_OP_LazyCullCompareFloatImpl(nint handle) : base(handle) { } + private static readonly Lazy _Comparsion1Offset = new(() => Schema.GetOffset(0x9D0DCAD079865299), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Comparsion1 { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x9D0DCAD079865299)); + get => new CPerParticleFloatInputImpl(_Handle + _Comparsion1Offset.Value); } + private static readonly Lazy _Comparsion2Offset = new(() => Schema.GetOffset(0x9D0DCAD076864DE0), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Comparsion2 { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x9D0DCAD076864DE0)); + get => new CPerParticleFloatInputImpl(_Handle + _Comparsion2Offset.Value); } + private static readonly Lazy _CullTimeOffset = new(() => Schema.GetOffset(0x9D0DCAD0AE2A76FA), LazyThreadSafetyMode.None); + public CPerParticleFloatInput CullTime { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x9D0DCAD0AE2A76FA)); + get => new CPerParticleFloatInputImpl(_Handle + _CullTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpEndCapScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpEndCapScalarImpl.cs index 46ec81633..c613debff 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpEndCapScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpEndCapScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_LerpEndCapScalarImpl : CParticleFunctionOperatorImpl public C_OP_LerpEndCapScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x308CB6FE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x308CB6FE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _OutputOffset = new(() => Schema.GetOffset(0x308CB6F368F96A2), LazyThreadSafetyMode.None); + public ref float Output { - get => ref _Handle.AsRef(Schema.GetOffset(0x308CB6F368F96A2)); + get => ref _Handle.AsRef(_OutputOffset.Value); } + private static readonly Lazy _LerpTimeOffset = new(() => Schema.GetOffset(0x308CB6F54FD987F), LazyThreadSafetyMode.None); + public ref float LerpTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x308CB6F54FD987F)); + get => ref _Handle.AsRef(_LerpTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpEndCapVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpEndCapVectorImpl.cs index 30219055d..8de82f1af 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpEndCapVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpEndCapVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_LerpEndCapVectorImpl : CParticleFunctionOperatorImpl public C_OP_LerpEndCapVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x4847E160E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x4847E160E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _OutputOffset = new(() => Schema.GetOffset(0x4847E16008B7FF64), LazyThreadSafetyMode.None); + public ref Vector Output { - get => ref _Handle.AsRef(Schema.GetOffset(0x4847E16008B7FF64)); + get => ref _Handle.AsRef(_OutputOffset.Value); } + private static readonly Lazy _LerpTimeOffset = new(() => Schema.GetOffset(0x4847E16054FD987F), LazyThreadSafetyMode.None); + public ref float LerpTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x4847E16054FD987F)); + get => ref _Handle.AsRef(_LerpTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpScalarImpl.cs index 3a88046a9..491b98923 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_LerpScalarImpl : CParticleFunctionOperatorImpl, C_OP public C_OP_LerpScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xB2C648D4E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xB2C648D4E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _OutputOffset = new(() => Schema.GetOffset(0xB2C648D4368F96A2), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Output { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xB2C648D4368F96A2)); + get => new CPerParticleFloatInputImpl(_Handle + _OutputOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0xB2C648D467FE9DC4), LazyThreadSafetyMode.None); + public ref float StartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xB2C648D467FE9DC4)); + get => ref _Handle.AsRef(_StartTimeOffset.Value); } + private static readonly Lazy _EndTimeOffset = new(() => Schema.GetOffset(0xB2C648D42041DF9D), LazyThreadSafetyMode.None); + public ref float EndTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xB2C648D42041DF9D)); + get => ref _Handle.AsRef(_EndTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpToInitialPositionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpToInitialPositionImpl.cs index 8a183dd92..6f7490a01 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpToInitialPositionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpToInitialPositionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_LerpToInitialPositionImpl : CParticleFunctionOperato public C_OP_LerpToInitialPositionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x56175BC3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x56175BC3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _InterpolationOffset = new(() => Schema.GetOffset(0x56175BCCF55B987), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Interpolation { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x56175BCCF55B987)); + get => new CPerParticleFloatInputImpl(_Handle + _InterpolationOffset.Value); } + private static readonly Lazy _CacheFieldOffset = new(() => Schema.GetOffset(0x56175BCB3696EEB), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t CacheField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x56175BCB3696EEB)); + get => new ParticleAttributeIndex_tImpl(_Handle + _CacheFieldOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x56175BCB731A42F), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Scale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x56175BCB731A42F)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ScaleOffset.Value); } + private static readonly Lazy _Scale1Offset = new(() => Schema.GetOffset(0x56175BC5F596B51), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput Scale1 { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x56175BC5F596B51)); + get => new CParticleCollectionVecInputImpl(_Handle + _Scale1Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpToOtherAttributeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpToOtherAttributeImpl.cs index decda2ebb..4e33e3163 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpToOtherAttributeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpToOtherAttributeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_LerpToOtherAttributeImpl : CParticleFunctionOperator public C_OP_LerpToOtherAttributeImpl(nint handle) : base(handle) { } + private static readonly Lazy _InterpolationOffset = new(() => Schema.GetOffset(0x1F92A80BCF55B987), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Interpolation { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x1F92A80BCF55B987)); + get => new CPerParticleFloatInputImpl(_Handle + _InterpolationOffset.Value); } + private static readonly Lazy _FieldInputFromOffset = new(() => Schema.GetOffset(0x1F92A80BB0E75581), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInputFrom { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x1F92A80BB0E75581)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputFromOffset.Value); } + private static readonly Lazy _FieldInputOffset = new(() => Schema.GetOffset(0x1F92A80BAE775669), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x1F92A80BAE775669)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x1F92A80BE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x1F92A80BE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpVectorImpl.cs index 35a639c6d..2c0a171f3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LerpVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_LerpVectorImpl : CParticleFunctionOperatorImpl, C_OP public C_OP_LerpVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x870E8457E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x870E8457E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _OutputOffset = new(() => Schema.GetOffset(0x870E845708B7FF64), LazyThreadSafetyMode.None); + public ref Vector Output { - get => ref _Handle.AsRef(Schema.GetOffset(0x870E845708B7FF64)); + get => ref _Handle.AsRef(_OutputOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0x870E845767FE9DC4), LazyThreadSafetyMode.None); + public ref float StartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x870E845767FE9DC4)); + get => ref _Handle.AsRef(_StartTimeOffset.Value); } + private static readonly Lazy _EndTimeOffset = new(() => Schema.GetOffset(0x870E84572041DF9D), LazyThreadSafetyMode.None); + public ref float EndTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x870E84572041DF9D)); + get => ref _Handle.AsRef(_EndTimeOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x870E8457FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x870E8457FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LightningSnapshotGeneratorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LightningSnapshotGeneratorImpl.cs index 99f14ba0d..35a004dfd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LightningSnapshotGeneratorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LightningSnapshotGeneratorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,50 +17,80 @@ internal partial class C_OP_LightningSnapshotGeneratorImpl : CParticleFunctionPr public C_OP_LightningSnapshotGeneratorImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPSnapshotOffset = new(() => Schema.GetOffset(0xA39272CA86FAC63E), LazyThreadSafetyMode.None); + public ref int CPSnapshot { - get => ref _Handle.AsRef(Schema.GetOffset(0xA39272CA86FAC63E)); + get => ref _Handle.AsRef(_CPSnapshotOffset.Value); } + private static readonly Lazy _CPStartPntOffset = new(() => Schema.GetOffset(0xA39272CA7731321C), LazyThreadSafetyMode.None); + public ref int CPStartPnt { - get => ref _Handle.AsRef(Schema.GetOffset(0xA39272CA7731321C)); + get => ref _Handle.AsRef(_CPStartPntOffset.Value); } + private static readonly Lazy _CPEndPntOffset = new(() => Schema.GetOffset(0xA39272CA3DC6A687), LazyThreadSafetyMode.None); + public ref int CPEndPnt { - get => ref _Handle.AsRef(Schema.GetOffset(0xA39272CA3DC6A687)); + get => ref _Handle.AsRef(_CPEndPntOffset.Value); } + private static readonly Lazy _SegmentsOffset = new(() => Schema.GetOffset(0xA39272CAE1250039), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Segments { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xA39272CAE1250039)); + get => new CParticleCollectionFloatInputImpl(_Handle + _SegmentsOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0xA39272CA7F14BA34), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Offset { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xA39272CA7F14BA34)); + get => new CParticleCollectionFloatInputImpl(_Handle + _OffsetOffset.Value); } + private static readonly Lazy _OffsetDecayOffset = new(() => Schema.GetOffset(0xA39272CAAFC14FD2), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput OffsetDecay { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xA39272CAAFC14FD2)); + get => new CParticleCollectionFloatInputImpl(_Handle + _OffsetDecayOffset.Value); } + private static readonly Lazy _RecalcRateOffset = new(() => Schema.GetOffset(0xA39272CA4DBA63D9), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput RecalcRate { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xA39272CA4DBA63D9)); + get => new CParticleCollectionFloatInputImpl(_Handle + _RecalcRateOffset.Value); } + private static readonly Lazy _UVScaleOffset = new(() => Schema.GetOffset(0xA39272CA8A5EA9EA), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput UVScale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xA39272CA8A5EA9EA)); + get => new CParticleCollectionFloatInputImpl(_Handle + _UVScaleOffset.Value); } + private static readonly Lazy _UVOffsetOffset = new(() => Schema.GetOffset(0xA39272CA7AD49A5B), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput UVOffset { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xA39272CA7AD49A5B)); + get => new CParticleCollectionFloatInputImpl(_Handle + _UVOffsetOffset.Value); } + private static readonly Lazy _SplitRateOffset = new(() => Schema.GetOffset(0xA39272CA39B025CF), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput SplitRate { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xA39272CA39B025CF)); + get => new CParticleCollectionFloatInputImpl(_Handle + _SplitRateOffset.Value); } + private static readonly Lazy _BranchTwistOffset = new(() => Schema.GetOffset(0xA39272CA688D5606), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput BranchTwist { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xA39272CA688D5606)); + get => new CParticleCollectionFloatInputImpl(_Handle + _BranchTwistOffset.Value); } + private static readonly Lazy _BranchBehaviorOffset = new(() => Schema.GetOffset(0xA39272CA04846BB3), LazyThreadSafetyMode.None); + public ref ParticleLightnintBranchBehavior_t BranchBehavior { - get => ref _Handle.AsRef(Schema.GetOffset(0xA39272CA04846BB3)); + get => ref _Handle.AsRef(_BranchBehaviorOffset.Value); } + private static readonly Lazy _RadiusStartOffset = new(() => Schema.GetOffset(0xA39272CA113E55B7), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput RadiusStart { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xA39272CA113E55B7)); + get => new CParticleCollectionFloatInputImpl(_Handle + _RadiusStartOffset.Value); } + private static readonly Lazy _RadiusEndOffset = new(() => Schema.GetOffset(0xA39272CADA05AE12), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput RadiusEnd { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xA39272CADA05AE12)); + get => new CParticleCollectionFloatInputImpl(_Handle + _RadiusEndOffset.Value); } + private static readonly Lazy _DedicatedPoolOffset = new(() => Schema.GetOffset(0xA39272CA86FD95A2), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput DedicatedPool { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xA39272CA86FD95A2)); + get => new CParticleCollectionFloatInputImpl(_Handle + _DedicatedPoolOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LocalAccelerationForceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LocalAccelerationForceImpl.cs index 63f8e7acb..95842f9d3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LocalAccelerationForceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LocalAccelerationForceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_LocalAccelerationForceImpl : CParticleFunctionForceI public C_OP_LocalAccelerationForceImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPOffset = new(() => Schema.GetOffset(0x3A562A9FEB661472), LazyThreadSafetyMode.None); + public ref int CP { - get => ref _Handle.AsRef(Schema.GetOffset(0x3A562A9FEB661472)); + get => ref _Handle.AsRef(_CPOffset.Value); } + private static readonly Lazy _ScaleCPOffset = new(() => Schema.GetOffset(0x3A562A9FDE3CC5E6), LazyThreadSafetyMode.None); + public ref int ScaleCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x3A562A9FDE3CC5E6)); + get => ref _Handle.AsRef(_ScaleCPOffset.Value); } + private static readonly Lazy _AccelOffset = new(() => Schema.GetOffset(0x3A562A9FEA9A0D73), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput Accel { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x3A562A9FEA9A0D73)); + get => new CParticleCollectionVecInputImpl(_Handle + _AccelOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockPointsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockPointsImpl.cs index 2d27dda5b..f6e550d4b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockPointsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockPointsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_LockPointsImpl : CParticleFunctionOperatorImpl, C_OP public C_OP_LockPointsImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinColOffset = new(() => Schema.GetOffset(0x68C45815E41E1FFB), LazyThreadSafetyMode.None); + public ref int MinCol { - get => ref _Handle.AsRef(Schema.GetOffset(0x68C45815E41E1FFB)); + get => ref _Handle.AsRef(_MinColOffset.Value); } + private static readonly Lazy _MaxColOffset = new(() => Schema.GetOffset(0x68C45815EC9939A1), LazyThreadSafetyMode.None); + public ref int MaxCol { - get => ref _Handle.AsRef(Schema.GetOffset(0x68C45815EC9939A1)); + get => ref _Handle.AsRef(_MaxColOffset.Value); } + private static readonly Lazy _MinRowOffset = new(() => Schema.GetOffset(0x68C45815199E3CF1), LazyThreadSafetyMode.None); + public ref int MinRow { - get => ref _Handle.AsRef(Schema.GetOffset(0x68C45815199E3CF1)); + get => ref _Handle.AsRef(_MinRowOffset.Value); } + private static readonly Lazy _MaxRowOffset = new(() => Schema.GetOffset(0x68C458157E297EEB), LazyThreadSafetyMode.None); + public ref int MaxRow { - get => ref _Handle.AsRef(Schema.GetOffset(0x68C458157E297EEB)); + get => ref _Handle.AsRef(_MaxRowOffset.Value); } + private static readonly Lazy _ControlPointOffset = new(() => Schema.GetOffset(0x68C458150D0DDF8C), LazyThreadSafetyMode.None); + public ref int ControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x68C458150D0DDF8C)); + get => ref _Handle.AsRef(_ControlPointOffset.Value); } + private static readonly Lazy _BlendValueOffset = new(() => Schema.GetOffset(0x68C45815E14CD067), LazyThreadSafetyMode.None); + public ref float BlendValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x68C45815E14CD067)); + get => ref _Handle.AsRef(_BlendValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockToBoneImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockToBoneImpl.cs index 55e264889..a99c14ef7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockToBoneImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockToBoneImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,54 +17,84 @@ internal partial class C_OP_LockToBoneImpl : CParticleFunctionOperatorImpl, C_OP public C_OP_LockToBoneImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModelInputOffset = new(() => Schema.GetOffset(0xF6C2B94DEB74120E), LazyThreadSafetyMode.None); + public CParticleModelInput ModelInput { - get => new CParticleModelInputImpl(_Handle + Schema.GetOffset(0xF6C2B94DEB74120E)); + get => new CParticleModelInputImpl(_Handle + _ModelInputOffset.Value); } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0xF6C2B94D3A9ED669), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0xF6C2B94D3A9ED669)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _LifeTimeFadeStartOffset = new(() => Schema.GetOffset(0xF6C2B94D95A2845A), LazyThreadSafetyMode.None); + public ref float LifeTimeFadeStart { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6C2B94D95A2845A)); + get => ref _Handle.AsRef(_LifeTimeFadeStartOffset.Value); } + private static readonly Lazy _LifeTimeFadeEndOffset = new(() => Schema.GetOffset(0xF6C2B94D222841EF), LazyThreadSafetyMode.None); + public ref float LifeTimeFadeEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6C2B94D222841EF)); + get => ref _Handle.AsRef(_LifeTimeFadeEndOffset.Value); } + private static readonly Lazy _JumpThresholdOffset = new(() => Schema.GetOffset(0xF6C2B94DB6BB1AD6), LazyThreadSafetyMode.None); + public ref float JumpThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6C2B94DB6BB1AD6)); + get => ref _Handle.AsRef(_JumpThresholdOffset.Value); } + private static readonly Lazy _PrevPosScaleOffset = new(() => Schema.GetOffset(0xF6C2B94D46CED122), LazyThreadSafetyMode.None); + public ref float PrevPosScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6C2B94D46CED122)); + get => ref _Handle.AsRef(_PrevPosScaleOffset.Value); } + private static readonly Lazy _HitboxSetNameOffset = new(() => Schema.GetOffset(0xF6C2B94D6A21BB0E), LazyThreadSafetyMode.None); + public string HitboxSetName { get { - var ptr = _Handle + Schema.GetOffset(0xF6C2B94D6A21BB0E); + var ptr = _Handle + _HitboxSetNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xF6C2B94D6A21BB0E, value, 128); + set => Schema.SetFixedString(_Handle, _HitboxSetNameOffset.Value, value, 128); } + private static readonly Lazy _RigidOffset = new(() => Schema.GetOffset(0xF6C2B94DF9ED9C8C), LazyThreadSafetyMode.None); + public ref bool Rigid { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6C2B94DF9ED9C8C)); + get => ref _Handle.AsRef(_RigidOffset.Value); } + private static readonly Lazy _UseBonesOffset = new(() => Schema.GetOffset(0xF6C2B94D10D1938B), LazyThreadSafetyMode.None); + public ref bool UseBones { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6C2B94D10D1938B)); + get => ref _Handle.AsRef(_UseBonesOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xF6C2B94DE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xF6C2B94DE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _FieldOutputPrevOffset = new(() => Schema.GetOffset(0xF6C2B94D68D9463B), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutputPrev { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xF6C2B94D68D9463B)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputPrevOffset.Value); } + private static readonly Lazy _RotationSetTypeOffset = new(() => Schema.GetOffset(0xF6C2B94D084883F9), LazyThreadSafetyMode.None); + public ref ParticleRotationLockType_t RotationSetType { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6C2B94D084883F9)); + get => ref _Handle.AsRef(_RotationSetTypeOffset.Value); } + private static readonly Lazy _RigidRotationLockOffset = new(() => Schema.GetOffset(0xF6C2B94D824664C5), LazyThreadSafetyMode.None); + public ref bool RigidRotationLock { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6C2B94D824664C5)); + get => ref _Handle.AsRef(_RigidRotationLockOffset.Value); } + private static readonly Lazy _RotationOffset = new(() => Schema.GetOffset(0xF6C2B94D1992E6BF), LazyThreadSafetyMode.None); + public CPerParticleVecInput Rotation { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xF6C2B94D1992E6BF)); + get => new CPerParticleVecInputImpl(_Handle + _RotationOffset.Value); } + private static readonly Lazy _RotLerpOffset = new(() => Schema.GetOffset(0xF6C2B94D2C030C4D), LazyThreadSafetyMode.None); + public CPerParticleFloatInput RotLerp { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xF6C2B94D2C030C4D)); + get => new CPerParticleFloatInputImpl(_Handle + _RotLerpOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockToPointListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockToPointListImpl.cs index 8fe2b9530..77b25fd10 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockToPointListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockToPointListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_LockToPointListImpl : CParticleFunctionOperatorImpl, public C_OP_LockToPointListImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xC9237E67E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xC9237E67E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _PointListOffset = new(() => Schema.GetOffset(0xC9237E67976AB4FD), LazyThreadSafetyMode.None); + public ref CUtlVector PointList { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC9237E67976AB4FD)); + get => ref _Handle.AsRef>(_PointListOffset.Value); } + private static readonly Lazy _PlaceAlongPathOffset = new(() => Schema.GetOffset(0xC9237E6781CF2E1A), LazyThreadSafetyMode.None); + public ref bool PlaceAlongPath { - get => ref _Handle.AsRef(Schema.GetOffset(0xC9237E6781CF2E1A)); + get => ref _Handle.AsRef(_PlaceAlongPathOffset.Value); } + private static readonly Lazy _ClosedLoopOffset = new(() => Schema.GetOffset(0xC9237E677C20D1AB), LazyThreadSafetyMode.None); + public ref bool ClosedLoop { - get => ref _Handle.AsRef(Schema.GetOffset(0xC9237E677C20D1AB)); + get => ref _Handle.AsRef(_ClosedLoopOffset.Value); } + private static readonly Lazy _NumPointsAlongPathOffset = new(() => Schema.GetOffset(0xC9237E67ACB5FC8A), LazyThreadSafetyMode.None); + public ref int NumPointsAlongPath { - get => ref _Handle.AsRef(Schema.GetOffset(0xC9237E67ACB5FC8A)); + get => ref _Handle.AsRef(_NumPointsAlongPathOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockToSavedSequentialPathImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockToSavedSequentialPathImpl.cs index e8509f1b8..511e2a422 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockToSavedSequentialPathImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockToSavedSequentialPathImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_LockToSavedSequentialPathImpl : CParticleFunctionOpe public C_OP_LockToSavedSequentialPathImpl(nint handle) : base(handle) { } + private static readonly Lazy _FadeStartOffset = new(() => Schema.GetOffset(0x69BF8E0EE1A81343), LazyThreadSafetyMode.None); + public ref float FadeStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x69BF8E0EE1A81343)); + get => ref _Handle.AsRef(_FadeStartOffset.Value); } + private static readonly Lazy _FadeEndOffset = new(() => Schema.GetOffset(0x69BF8E0EBE7F4636), LazyThreadSafetyMode.None); + public ref float FadeEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x69BF8E0EBE7F4636)); + get => ref _Handle.AsRef(_FadeEndOffset.Value); } + private static readonly Lazy _CPPairsOffset = new(() => Schema.GetOffset(0x69BF8E0EA5D36D0F), LazyThreadSafetyMode.None); + public ref bool CPPairs { - get => ref _Handle.AsRef(Schema.GetOffset(0x69BF8E0EA5D36D0F)); + get => ref _Handle.AsRef(_CPPairsOffset.Value); } + private static readonly Lazy _PathParamsOffset = new(() => Schema.GetOffset(0x69BF8E0E3C10092C), LazyThreadSafetyMode.None); + public CPathParameters PathParams { - get => new CPathParametersImpl(_Handle + Schema.GetOffset(0x69BF8E0E3C10092C)); + get => new CPathParametersImpl(_Handle + _PathParamsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockToSavedSequentialPathV2Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockToSavedSequentialPathV2Impl.cs index ec9036fc2..c70c838e9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockToSavedSequentialPathV2Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_LockToSavedSequentialPathV2Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_LockToSavedSequentialPathV2Impl : CParticleFunctionO public C_OP_LockToSavedSequentialPathV2Impl(nint handle) : base(handle) { } + private static readonly Lazy _FadeStartOffset = new(() => Schema.GetOffset(0x817A0CEE1A81343), LazyThreadSafetyMode.None); + public ref float FadeStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x817A0CEE1A81343)); + get => ref _Handle.AsRef(_FadeStartOffset.Value); } + private static readonly Lazy _FadeEndOffset = new(() => Schema.GetOffset(0x817A0CEBE7F4636), LazyThreadSafetyMode.None); + public ref float FadeEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x817A0CEBE7F4636)); + get => ref _Handle.AsRef(_FadeEndOffset.Value); } + private static readonly Lazy _CPPairsOffset = new(() => Schema.GetOffset(0x817A0CEA5D36D0F), LazyThreadSafetyMode.None); + public ref bool CPPairs { - get => ref _Handle.AsRef(Schema.GetOffset(0x817A0CEA5D36D0F)); + get => ref _Handle.AsRef(_CPPairsOffset.Value); } + private static readonly Lazy _PathParamsOffset = new(() => Schema.GetOffset(0x817A0CE3C10092C), LazyThreadSafetyMode.None); + public CPathParameters PathParams { - get => new CPathParametersImpl(_Handle + Schema.GetOffset(0x817A0CE3C10092C)); + get => new CPathParametersImpl(_Handle + _PathParamsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MaintainEmitterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MaintainEmitterImpl.cs index 2e908ec4b..32a75ed54 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MaintainEmitterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MaintainEmitterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,36 +17,54 @@ internal partial class C_OP_MaintainEmitterImpl : CParticleFunctionEmitterImpl, public C_OP_MaintainEmitterImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParticlesToMaintainOffset = new(() => Schema.GetOffset(0xAD7D6862537AE378), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ParticlesToMaintain { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xAD7D6862537AE378)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ParticlesToMaintainOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0xAD7D686267FE9DC4), LazyThreadSafetyMode.None); + public ref float StartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xAD7D686267FE9DC4)); + get => ref _Handle.AsRef(_StartTimeOffset.Value); } + private static readonly Lazy _EmissionDurationOffset = new(() => Schema.GetOffset(0xAD7D686290181C90), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput EmissionDuration { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xAD7D686290181C90)); + get => new CParticleCollectionFloatInputImpl(_Handle + _EmissionDurationOffset.Value); } + private static readonly Lazy _EmissionRateOffset = new(() => Schema.GetOffset(0xAD7D68620F6F6312), LazyThreadSafetyMode.None); + public ref float EmissionRate { - get => ref _Handle.AsRef(Schema.GetOffset(0xAD7D68620F6F6312)); + get => ref _Handle.AsRef(_EmissionRateOffset.Value); } + private static readonly Lazy _SnapshotControlPointOffset = new(() => Schema.GetOffset(0xAD7D6862192638EC), LazyThreadSafetyMode.None); + public ref int SnapshotControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xAD7D6862192638EC)); + get => ref _Handle.AsRef(_SnapshotControlPointOffset.Value); } + private static readonly Lazy _StrSnapshotSubsetOffset = new(() => Schema.GetOffset(0xAD7D6862BD8A8E5E), LazyThreadSafetyMode.None); + public string StrSnapshotSubset { get { - var ptr = _Handle.Read(Schema.GetOffset(0xAD7D6862BD8A8E5E)); + var ptr = _Handle.Read(_StrSnapshotSubsetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xAD7D6862BD8A8E5E, value); + set => Schema.SetString(_Handle, _StrSnapshotSubsetOffset.Value, value); } + private static readonly Lazy _EmitInstantaneouslyOffset = new(() => Schema.GetOffset(0xAD7D686205EFA03B), LazyThreadSafetyMode.None); + public ref bool EmitInstantaneously { - get => ref _Handle.AsRef(Schema.GetOffset(0xAD7D686205EFA03B)); + get => ref _Handle.AsRef(_EmitInstantaneouslyOffset.Value); } + private static readonly Lazy _FinalEmitOnStopOffset = new(() => Schema.GetOffset(0xAD7D68626A482A7D), LazyThreadSafetyMode.None); + public ref bool FinalEmitOnStop { - get => ref _Handle.AsRef(Schema.GetOffset(0xAD7D68626A482A7D)); + get => ref _Handle.AsRef(_FinalEmitOnStopOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0xAD7D6862B731A42F), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Scale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xAD7D6862B731A42F)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MaintainSequentialPathImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MaintainSequentialPathImpl.cs index 0c3aafe84..606275e3b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MaintainSequentialPathImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MaintainSequentialPathImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_MaintainSequentialPathImpl : CParticleFunctionOperat public C_OP_MaintainSequentialPathImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaxDistanceOffset = new(() => Schema.GetOffset(0x3F7004B8844E396A), LazyThreadSafetyMode.None); + public ref float MaxDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F7004B8844E396A)); + get => ref _Handle.AsRef(_MaxDistanceOffset.Value); } + private static readonly Lazy _NumToAssignOffset = new(() => Schema.GetOffset(0x3F7004B8F73366BD), LazyThreadSafetyMode.None); + public ref float NumToAssign { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F7004B8F73366BD)); + get => ref _Handle.AsRef(_NumToAssignOffset.Value); } + private static readonly Lazy _CohesionStrengthOffset = new(() => Schema.GetOffset(0x3F7004B8A5A506EA), LazyThreadSafetyMode.None); + public ref float CohesionStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F7004B8A5A506EA)); + get => ref _Handle.AsRef(_CohesionStrengthOffset.Value); } + private static readonly Lazy _ToleranceOffset = new(() => Schema.GetOffset(0x3F7004B88C29728E), LazyThreadSafetyMode.None); + public ref float Tolerance { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F7004B88C29728E)); + get => ref _Handle.AsRef(_ToleranceOffset.Value); } + private static readonly Lazy _LoopOffset = new(() => Schema.GetOffset(0x3F7004B8C668A4CB), LazyThreadSafetyMode.None); + public ref bool Loop { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F7004B8C668A4CB)); + get => ref _Handle.AsRef(_LoopOffset.Value); } + private static readonly Lazy _UseParticleCountOffset = new(() => Schema.GetOffset(0x3F7004B8D4DA0515), LazyThreadSafetyMode.None); + public ref bool UseParticleCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F7004B8D4DA0515)); + get => ref _Handle.AsRef(_UseParticleCountOffset.Value); } + private static readonly Lazy _PathParamsOffset = new(() => Schema.GetOffset(0x3F7004B83C10092C), LazyThreadSafetyMode.None); + public CPathParameters PathParams { - get => new CPathParametersImpl(_Handle + Schema.GetOffset(0x3F7004B83C10092C)); + get => new CPathParametersImpl(_Handle + _PathParamsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MaxVelocityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MaxVelocityImpl.cs index 47d30cecc..62799536f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MaxVelocityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MaxVelocityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_MaxVelocityImpl : CParticleFunctionOperatorImpl, C_O public C_OP_MaxVelocityImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaxVelocityOffset = new(() => Schema.GetOffset(0xE7D67D7E281BD640), LazyThreadSafetyMode.None); + public ref float MaxVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7D67D7E281BD640)); + get => ref _Handle.AsRef(_MaxVelocityOffset.Value); } + private static readonly Lazy _MinVelocityOffset = new(() => Schema.GetOffset(0xE7D67D7EAE8F0ADE), LazyThreadSafetyMode.None); + public ref float MinVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7D67D7EAE8F0ADE)); + get => ref _Handle.AsRef(_MinVelocityOffset.Value); } + private static readonly Lazy _OverrideCPOffset = new(() => Schema.GetOffset(0xE7D67D7EDD495162), LazyThreadSafetyMode.None); + public ref int OverrideCP { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7D67D7EDD495162)); + get => ref _Handle.AsRef(_OverrideCPOffset.Value); } + private static readonly Lazy _OverrideCPFieldOffset = new(() => Schema.GetOffset(0xE7D67D7E2FF9A086), LazyThreadSafetyMode.None); + public ref int OverrideCPField { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7D67D7E2FF9A086)); + get => ref _Handle.AsRef(_OverrideCPFieldOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ModelCullImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ModelCullImpl.cs index 4ec63dc98..cd7c0a10d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ModelCullImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ModelCullImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class C_OP_ModelCullImpl : CParticleFunctionOperatorImpl, C_OP_ public C_OP_ModelCullImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0xED02878A3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xED02878A3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _BoundBoxOffset = new(() => Schema.GetOffset(0xED02878AAB65CDDC), LazyThreadSafetyMode.None); + public ref bool BoundBox { - get => ref _Handle.AsRef(Schema.GetOffset(0xED02878AAB65CDDC)); + get => ref _Handle.AsRef(_BoundBoxOffset.Value); } + private static readonly Lazy _CullOutsideOffset = new(() => Schema.GetOffset(0xED02878AA6EF9E04), LazyThreadSafetyMode.None); + public ref bool CullOutside { - get => ref _Handle.AsRef(Schema.GetOffset(0xED02878AA6EF9E04)); + get => ref _Handle.AsRef(_CullOutsideOffset.Value); } + private static readonly Lazy _UseBonesOffset = new(() => Schema.GetOffset(0xED02878A10D1938B), LazyThreadSafetyMode.None); + public ref bool UseBones { - get => ref _Handle.AsRef(Schema.GetOffset(0xED02878A10D1938B)); + get => ref _Handle.AsRef(_UseBonesOffset.Value); } + private static readonly Lazy _HitboxSetNameOffset = new(() => Schema.GetOffset(0xED02878A6A21BB0E), LazyThreadSafetyMode.None); + public string HitboxSetName { get { - var ptr = _Handle + Schema.GetOffset(0xED02878A6A21BB0E); + var ptr = _Handle + _HitboxSetNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xED02878A6A21BB0E, value, 128); + set => Schema.SetFixedString(_Handle, _HitboxSetNameOffset.Value, value, 128); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ModelDampenMovementImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ModelDampenMovementImpl.cs index 60dedbd64..012f8dff8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ModelDampenMovementImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ModelDampenMovementImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,30 +17,44 @@ internal partial class C_OP_ModelDampenMovementImpl : CParticleFunctionOperatorI public C_OP_ModelDampenMovementImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x74BD8BB63F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x74BD8BB63F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _BoundBoxOffset = new(() => Schema.GetOffset(0x74BD8BB6AB65CDDC), LazyThreadSafetyMode.None); + public ref bool BoundBox { - get => ref _Handle.AsRef(Schema.GetOffset(0x74BD8BB6AB65CDDC)); + get => ref _Handle.AsRef(_BoundBoxOffset.Value); } + private static readonly Lazy _OutsideOffset = new(() => Schema.GetOffset(0x74BD8BB6733FEEA4), LazyThreadSafetyMode.None); + public ref bool Outside { - get => ref _Handle.AsRef(Schema.GetOffset(0x74BD8BB6733FEEA4)); + get => ref _Handle.AsRef(_OutsideOffset.Value); } + private static readonly Lazy _UseBonesOffset = new(() => Schema.GetOffset(0x74BD8BB610D1938B), LazyThreadSafetyMode.None); + public ref bool UseBones { - get => ref _Handle.AsRef(Schema.GetOffset(0x74BD8BB610D1938B)); + get => ref _Handle.AsRef(_UseBonesOffset.Value); } + private static readonly Lazy _HitboxSetNameOffset = new(() => Schema.GetOffset(0x74BD8BB66A21BB0E), LazyThreadSafetyMode.None); + public string HitboxSetName { get { - var ptr = _Handle + Schema.GetOffset(0x74BD8BB66A21BB0E); + var ptr = _Handle + _HitboxSetNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x74BD8BB66A21BB0E, value, 128); + set => Schema.SetFixedString(_Handle, _HitboxSetNameOffset.Value, value, 128); } + private static readonly Lazy _PosOffsetOffset = new(() => Schema.GetOffset(0x74BD8BB655D114B6), LazyThreadSafetyMode.None); + public CPerParticleVecInput PosOffset { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x74BD8BB655D114B6)); + get => new CPerParticleVecInputImpl(_Handle + _PosOffsetOffset.Value); } + private static readonly Lazy _DragOffset = new(() => Schema.GetOffset(0x74BD8BB650DA6497), LazyThreadSafetyMode.None); + public ref float Drag { - get => ref _Handle.AsRef(Schema.GetOffset(0x74BD8BB650DA6497)); + get => ref _Handle.AsRef(_DragOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MoveToHitboxImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MoveToHitboxImpl.cs index f5d73f36f..1fce08a80 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MoveToHitboxImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MoveToHitboxImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,36 +17,54 @@ internal partial class C_OP_MoveToHitboxImpl : CParticleFunctionOperatorImpl, C_ public C_OP_MoveToHitboxImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModelInputOffset = new(() => Schema.GetOffset(0x4ACEA8FFEB74120E), LazyThreadSafetyMode.None); + public CParticleModelInput ModelInput { - get => new CParticleModelInputImpl(_Handle + Schema.GetOffset(0x4ACEA8FFEB74120E)); + get => new CParticleModelInputImpl(_Handle + _ModelInputOffset.Value); } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0x4ACEA8FF3A9ED669), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x4ACEA8FF3A9ED669)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _LifeTimeLerpStartOffset = new(() => Schema.GetOffset(0x4ACEA8FFB9B0BE37), LazyThreadSafetyMode.None); + public ref float LifeTimeLerpStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ACEA8FFB9B0BE37)); + get => ref _Handle.AsRef(_LifeTimeLerpStartOffset.Value); } + private static readonly Lazy _LifeTimeLerpEndOffset = new(() => Schema.GetOffset(0x4ACEA8FF3BE2C292), LazyThreadSafetyMode.None); + public ref float LifeTimeLerpEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ACEA8FF3BE2C292)); + get => ref _Handle.AsRef(_LifeTimeLerpEndOffset.Value); } + private static readonly Lazy _PrevPosScaleOffset = new(() => Schema.GetOffset(0x4ACEA8FF46CED122), LazyThreadSafetyMode.None); + public ref float PrevPosScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ACEA8FF46CED122)); + get => ref _Handle.AsRef(_PrevPosScaleOffset.Value); } + private static readonly Lazy _HitboxSetNameOffset = new(() => Schema.GetOffset(0x4ACEA8FF6A21BB0E), LazyThreadSafetyMode.None); + public string HitboxSetName { get { - var ptr = _Handle + Schema.GetOffset(0x4ACEA8FF6A21BB0E); + var ptr = _Handle + _HitboxSetNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x4ACEA8FF6A21BB0E, value, 128); + set => Schema.SetFixedString(_Handle, _HitboxSetNameOffset.Value, value, 128); } + private static readonly Lazy _UseBonesOffset = new(() => Schema.GetOffset(0x4ACEA8FF10D1938B), LazyThreadSafetyMode.None); + public ref bool UseBones { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ACEA8FF10D1938B)); + get => ref _Handle.AsRef(_UseBonesOffset.Value); } + private static readonly Lazy _LerpTypeOffset = new(() => Schema.GetOffset(0x4ACEA8FF74114DCC), LazyThreadSafetyMode.None); + public ref HitboxLerpType_t LerpType { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ACEA8FF74114DCC)); + get => ref _Handle.AsRef(_LerpTypeOffset.Value); } + private static readonly Lazy _InterpolationOffset = new(() => Schema.GetOffset(0x4ACEA8FFCF55B987), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Interpolation { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x4ACEA8FFCF55B987)); + get => new CPerParticleFloatInputImpl(_Handle + _InterpolationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementLoopInsideSphereImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementLoopInsideSphereImpl.cs index 68a9349da..f65c50caa 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementLoopInsideSphereImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementLoopInsideSphereImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_MovementLoopInsideSphereImpl : CParticleFunctionOper public C_OP_MovementLoopInsideSphereImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPOffset = new(() => Schema.GetOffset(0x7C19959FEB661472), LazyThreadSafetyMode.None); + public ref int CP { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C19959FEB661472)); + get => ref _Handle.AsRef(_CPOffset.Value); } + private static readonly Lazy _DistanceOffset = new(() => Schema.GetOffset(0x7C19959F00DC4A68), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Distance { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x7C19959F00DC4A68)); + get => new CParticleCollectionFloatInputImpl(_Handle + _DistanceOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x7C19959F5F596B51), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput Scale { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x7C19959F5F596B51)); + get => new CParticleCollectionVecInputImpl(_Handle + _ScaleOffset.Value); } + private static readonly Lazy _DistSqrAttrOffset = new(() => Schema.GetOffset(0x7C19959F767818FE), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t DistSqrAttr { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x7C19959F767818FE)); + get => new ParticleAttributeIndex_tImpl(_Handle + _DistSqrAttrOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementMaintainOffsetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementMaintainOffsetImpl.cs index 459d76566..27361b71a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementMaintainOffsetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementMaintainOffsetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_MovementMaintainOffsetImpl : CParticleFunctionOperat public C_OP_MovementMaintainOffsetImpl(nint handle) : base(handle) { } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0xD9B3E796BD25CC2A), LazyThreadSafetyMode.None); + public ref Vector Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9B3E796BD25CC2A)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _CPOffset = new(() => Schema.GetOffset(0xD9B3E796EB661472), LazyThreadSafetyMode.None); + public ref int CP { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9B3E796EB661472)); + get => ref _Handle.AsRef(_CPOffset.Value); } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0xD9B3E796BBCB728B), LazyThreadSafetyMode.None); + public ref bool RadiusScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9B3E796BBCB728B)); + get => ref _Handle.AsRef(_RadiusScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementMoveAlongSkinnedCPSnapshotImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementMoveAlongSkinnedCPSnapshotImpl.cs index b736a3bd1..c46aa3ae9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementMoveAlongSkinnedCPSnapshotImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementMoveAlongSkinnedCPSnapshotImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_MovementMoveAlongSkinnedCPSnapshotImpl : CParticleFu public C_OP_MovementMoveAlongSkinnedCPSnapshotImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0xBF34A6C93F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xBF34A6C93F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _SnapshotControlPointNumberOffset = new(() => Schema.GetOffset(0xBF34A6C929D3EEDD), LazyThreadSafetyMode.None); + public ref int SnapshotControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xBF34A6C929D3EEDD)); + get => ref _Handle.AsRef(_SnapshotControlPointNumberOffset.Value); } + private static readonly Lazy _SetNormalOffset = new(() => Schema.GetOffset(0xBF34A6C9542722AC), LazyThreadSafetyMode.None); + public ref bool SetNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0xBF34A6C9542722AC)); + get => ref _Handle.AsRef(_SetNormalOffset.Value); } + private static readonly Lazy _SetRadiusOffset = new(() => Schema.GetOffset(0xBF34A6C9918808D1), LazyThreadSafetyMode.None); + public ref bool SetRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xBF34A6C9918808D1)); + get => ref _Handle.AsRef(_SetRadiusOffset.Value); } + private static readonly Lazy _InterpolationOffset = new(() => Schema.GetOffset(0xBF34A6C9CF55B987), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Interpolation { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xBF34A6C9CF55B987)); + get => new CPerParticleFloatInputImpl(_Handle + _InterpolationOffset.Value); } + private static readonly Lazy _TValueOffset = new(() => Schema.GetOffset(0xBF34A6C9B4CE908E), LazyThreadSafetyMode.None); + public CPerParticleFloatInput TValue { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xBF34A6C9B4CE908E)); + get => new CPerParticleFloatInputImpl(_Handle + _TValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementPlaceOnGroundImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementPlaceOnGroundImpl.cs index e0a9e4124..400afe899 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementPlaceOnGroundImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementPlaceOnGroundImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,60 +17,94 @@ internal partial class C_OP_MovementPlaceOnGroundImpl : CParticleFunctionOperato public C_OP_MovementPlaceOnGroundImpl(nint handle) : base(handle) { } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0x53323DE97F14BA34), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Offset { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x53323DE97F14BA34)); + get => new CPerParticleFloatInputImpl(_Handle + _OffsetOffset.Value); } + private static readonly Lazy _MaxTraceLengthOffset = new(() => Schema.GetOffset(0x53323DE9543C3798), LazyThreadSafetyMode.None); + public ref float MaxTraceLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x53323DE9543C3798)); + get => ref _Handle.AsRef(_MaxTraceLengthOffset.Value); } + private static readonly Lazy _ToleranceOffset = new(() => Schema.GetOffset(0x53323DE98C29728E), LazyThreadSafetyMode.None); + public ref float Tolerance { - get => ref _Handle.AsRef(Schema.GetOffset(0x53323DE98C29728E)); + get => ref _Handle.AsRef(_ToleranceOffset.Value); } + private static readonly Lazy _TraceOffsetOffset = new(() => Schema.GetOffset(0x53323DE97EF6C397), LazyThreadSafetyMode.None); + public ref float TraceOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x53323DE97EF6C397)); + get => ref _Handle.AsRef(_TraceOffsetOffset.Value); } + private static readonly Lazy _LerpRateOffset = new(() => Schema.GetOffset(0x53323DE938B06C64), LazyThreadSafetyMode.None); + public ref float LerpRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x53323DE938B06C64)); + get => ref _Handle.AsRef(_LerpRateOffset.Value); } + private static readonly Lazy _CollisionGroupNameOffset = new(() => Schema.GetOffset(0x53323DE9D58A3195), LazyThreadSafetyMode.None); + public string CollisionGroupName { get { - var ptr = _Handle + Schema.GetOffset(0x53323DE9D58A3195); + var ptr = _Handle + _CollisionGroupNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x53323DE9D58A3195, value, 128); + set => Schema.SetFixedString(_Handle, _CollisionGroupNameOffset.Value, value, 128); } + private static readonly Lazy _TraceSetOffset = new(() => Schema.GetOffset(0x53323DE9BD26C5B2), LazyThreadSafetyMode.None); + public ref ParticleTraceSet_t TraceSet { - get => ref _Handle.AsRef(Schema.GetOffset(0x53323DE9BD26C5B2)); + get => ref _Handle.AsRef(_TraceSetOffset.Value); } + private static readonly Lazy _RefCP1Offset = new(() => Schema.GetOffset(0x53323DE97D2F03D4), LazyThreadSafetyMode.None); + public ref int RefCP1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53323DE97D2F03D4)); + get => ref _Handle.AsRef(_RefCP1Offset.Value); } + private static readonly Lazy _RefCP2Offset = new(() => Schema.GetOffset(0x53323DE9802F088D), LazyThreadSafetyMode.None); + public ref int RefCP2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x53323DE9802F088D)); + get => ref _Handle.AsRef(_RefCP2Offset.Value); } + private static readonly Lazy _LerpCPOffset = new(() => Schema.GetOffset(0x53323DE9D251F4EF), LazyThreadSafetyMode.None); + public ref int LerpCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x53323DE9D251F4EF)); + get => ref _Handle.AsRef(_LerpCPOffset.Value); } + private static readonly Lazy _TraceMissBehaviorOffset = new(() => Schema.GetOffset(0x53323DE91F2C7BCC), LazyThreadSafetyMode.None); + public ref ParticleTraceMissBehavior_t TraceMissBehavior { - get => ref _Handle.AsRef(Schema.GetOffset(0x53323DE91F2C7BCC)); + get => ref _Handle.AsRef(_TraceMissBehaviorOffset.Value); } + private static readonly Lazy _IncludeShotHullOffset = new(() => Schema.GetOffset(0x53323DE9C9640390), LazyThreadSafetyMode.None); + public ref bool IncludeShotHull { - get => ref _Handle.AsRef(Schema.GetOffset(0x53323DE9C9640390)); + get => ref _Handle.AsRef(_IncludeShotHullOffset.Value); } + private static readonly Lazy _IncludeWaterOffset = new(() => Schema.GetOffset(0x53323DE9EB8D4646), LazyThreadSafetyMode.None); + public ref bool IncludeWater { - get => ref _Handle.AsRef(Schema.GetOffset(0x53323DE9EB8D4646)); + get => ref _Handle.AsRef(_IncludeWaterOffset.Value); } + private static readonly Lazy _SetNormalOffset = new(() => Schema.GetOffset(0x53323DE9542722AC), LazyThreadSafetyMode.None); + public ref bool SetNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0x53323DE9542722AC)); + get => ref _Handle.AsRef(_SetNormalOffset.Value); } + private static readonly Lazy _ScaleOffsetOffset = new(() => Schema.GetOffset(0x53323DE9AB39558E), LazyThreadSafetyMode.None); + public ref bool ScaleOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x53323DE9AB39558E)); + get => ref _Handle.AsRef(_ScaleOffsetOffset.Value); } + private static readonly Lazy _PreserveOffsetCPOffset = new(() => Schema.GetOffset(0x53323DE958AC51C1), LazyThreadSafetyMode.None); + public ref int PreserveOffsetCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x53323DE958AC51C1)); + get => ref _Handle.AsRef(_PreserveOffsetCPOffset.Value); } + private static readonly Lazy _IgnoreCPOffset = new(() => Schema.GetOffset(0x53323DE9F0DDC7AC), LazyThreadSafetyMode.None); + public ref int IgnoreCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x53323DE9F0DDC7AC)); + get => ref _Handle.AsRef(_IgnoreCPOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementRigidAttachToCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementRigidAttachToCPImpl.cs index 43a80bbb0..5f0b20a8f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementRigidAttachToCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementRigidAttachToCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_MovementRigidAttachToCPImpl : CParticleFunctionOpera public C_OP_MovementRigidAttachToCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x3D3A79B83F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D3A79B83F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _ScaleControlPointOffset = new(() => Schema.GetOffset(0x3D3A79B8B0577A70), LazyThreadSafetyMode.None); + public ref int ScaleControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D3A79B8B0577A70)); + get => ref _Handle.AsRef(_ScaleControlPointOffset.Value); } + private static readonly Lazy _ScaleCPFieldOffset = new(() => Schema.GetOffset(0x3D3A79B8B4A19A82), LazyThreadSafetyMode.None); + public ref int ScaleCPField { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D3A79B8B4A19A82)); + get => ref _Handle.AsRef(_ScaleCPFieldOffset.Value); } + private static readonly Lazy _FieldInputOffset = new(() => Schema.GetOffset(0x3D3A79B8AE775669), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x3D3A79B8AE775669)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x3D3A79B8E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x3D3A79B8E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _OffsetLocalOffset = new(() => Schema.GetOffset(0x3D3A79B8F07D31C1), LazyThreadSafetyMode.None); + public ref bool OffsetLocal { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D3A79B8F07D31C1)); + get => ref _Handle.AsRef(_OffsetLocalOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementRotateParticleAroundAxisImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementRotateParticleAroundAxisImpl.cs index 546482fe2..b0792bfda 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementRotateParticleAroundAxisImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementRotateParticleAroundAxisImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_MovementRotateParticleAroundAxisImpl : CParticleFunc public C_OP_MovementRotateParticleAroundAxisImpl(nint handle) : base(handle) { } + private static readonly Lazy _RotAxisOffset = new(() => Schema.GetOffset(0x44C1E1F191872163), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput RotAxis { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x44C1E1F191872163)); + get => new CParticleCollectionVecInputImpl(_Handle + _RotAxisOffset.Value); } + private static readonly Lazy _RotRateOffset = new(() => Schema.GetOffset(0x44C1E1F16747B556), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput RotRate { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x44C1E1F16747B556)); + get => new CParticleCollectionFloatInputImpl(_Handle + _RotRateOffset.Value); } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0x44C1E1F1B3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x44C1E1F1B3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _LocalSpaceOffset = new(() => Schema.GetOffset(0x44C1E1F162418E6E), LazyThreadSafetyMode.None); + public ref bool LocalSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x44C1E1F162418E6E)); + get => ref _Handle.AsRef(_LocalSpaceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementSkinnedPositionFromCPSnapshotImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementSkinnedPositionFromCPSnapshotImpl.cs index 3d31ffcdc..4304e9b47 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementSkinnedPositionFromCPSnapshotImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_MovementSkinnedPositionFromCPSnapshotImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,65 @@ internal partial class C_OP_MovementSkinnedPositionFromCPSnapshotImpl : CParticl public C_OP_MovementSkinnedPositionFromCPSnapshotImpl(nint handle) : base(handle) { } + private static readonly Lazy _SnapshotControlPointNumberOffset = new(() => Schema.GetOffset(0x6BA7A3C29D3EEDD), LazyThreadSafetyMode.None); + public ref int SnapshotControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x6BA7A3C29D3EEDD)); + get => ref _Handle.AsRef(_SnapshotControlPointNumberOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x6BA7A3C3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x6BA7A3C3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _RandomOffset = new(() => Schema.GetOffset(0x6BA7A3CD13B9DC2), LazyThreadSafetyMode.None); + public ref bool Random { - get => ref _Handle.AsRef(Schema.GetOffset(0x6BA7A3CD13B9DC2)); + get => ref _Handle.AsRef(_RandomOffset.Value); } + private static readonly Lazy _RandomSeedOffset = new(() => Schema.GetOffset(0x6BA7A3C6388F067), LazyThreadSafetyMode.None); + public ref int RandomSeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x6BA7A3C6388F067)); + get => ref _Handle.AsRef(_RandomSeedOffset.Value); } + private static readonly Lazy _SetNormalOffset = new(() => Schema.GetOffset(0x6BA7A3C542722AC), LazyThreadSafetyMode.None); + public ref bool SetNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0x6BA7A3C542722AC)); + get => ref _Handle.AsRef(_SetNormalOffset.Value); } + private static readonly Lazy _SetRadiusOffset = new(() => Schema.GetOffset(0x6BA7A3C918808D1), LazyThreadSafetyMode.None); + public ref bool SetRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x6BA7A3C918808D1)); + get => ref _Handle.AsRef(_SetRadiusOffset.Value); } + private static readonly Lazy _IndexTypeOffset = new(() => Schema.GetOffset(0x6BA7A3CDEEB271F), LazyThreadSafetyMode.None); + public ref SnapshotIndexType_t IndexType { - get => ref _Handle.AsRef(Schema.GetOffset(0x6BA7A3CDEEB271F)); + get => ref _Handle.AsRef(_IndexTypeOffset.Value); } + private static readonly Lazy _ReadIndexOffset = new(() => Schema.GetOffset(0x6BA7A3C7E9602C9), LazyThreadSafetyMode.None); + public CPerParticleFloatInput ReadIndex { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x6BA7A3C7E9602C9)); + get => new CPerParticleFloatInputImpl(_Handle + _ReadIndexOffset.Value); } + private static readonly Lazy _IncrementOffset = new(() => Schema.GetOffset(0x6BA7A3CB3721674), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Increment { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x6BA7A3CB3721674)); + get => new CParticleCollectionFloatInputImpl(_Handle + _IncrementOffset.Value); } + private static readonly Lazy _FullLoopIncrementOffset = new(() => Schema.GetOffset(0x6BA7A3C278D3497), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput FullLoopIncrement { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x6BA7A3C278D3497)); + get => new CParticleCollectionFloatInputImpl(_Handle + _FullLoopIncrementOffset.Value); } + private static readonly Lazy _SnapShotStartPointOffset = new(() => Schema.GetOffset(0x6BA7A3CA7DF116B), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput SnapShotStartPoint { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x6BA7A3CA7DF116B)); + get => new CParticleCollectionFloatInputImpl(_Handle + _SnapShotStartPointOffset.Value); } + private static readonly Lazy _InterpolationOffset = new(() => Schema.GetOffset(0x6BA7A3CCF55B987), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Interpolation { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x6BA7A3CCF55B987)); + get => new CPerParticleFloatInputImpl(_Handle + _InterpolationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_NoiseEmitterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_NoiseEmitterImpl.cs index 16e0a8f0b..23a1e10bb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_NoiseEmitterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_NoiseEmitterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,50 +17,80 @@ internal partial class C_OP_NoiseEmitterImpl : CParticleFunctionEmitterImpl, C_O public C_OP_NoiseEmitterImpl(nint handle) : base(handle) { } + private static readonly Lazy _EmissionDurationOffset = new(() => Schema.GetOffset(0x42B1C7990181C90), LazyThreadSafetyMode.None); + public ref float EmissionDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x42B1C7990181C90)); + get => ref _Handle.AsRef(_EmissionDurationOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0x42B1C7967FE9DC4), LazyThreadSafetyMode.None); + public ref float StartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x42B1C7967FE9DC4)); + get => ref _Handle.AsRef(_StartTimeOffset.Value); } + private static readonly Lazy _EmissionScaleOffset = new(() => Schema.GetOffset(0x42B1C7953003112), LazyThreadSafetyMode.None); + public ref float EmissionScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x42B1C7953003112)); + get => ref _Handle.AsRef(_EmissionScaleOffset.Value); } + private static readonly Lazy _ScaleControlPointOffset = new(() => Schema.GetOffset(0x42B1C79B0577A70), LazyThreadSafetyMode.None); + public ref int ScaleControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x42B1C79B0577A70)); + get => ref _Handle.AsRef(_ScaleControlPointOffset.Value); } + private static readonly Lazy _ScaleControlPointFieldOffset = new(() => Schema.GetOffset(0x42B1C79360C613C), LazyThreadSafetyMode.None); + public ref int ScaleControlPointField { - get => ref _Handle.AsRef(Schema.GetOffset(0x42B1C79360C613C)); + get => ref _Handle.AsRef(_ScaleControlPointFieldOffset.Value); } + private static readonly Lazy _WorldNoisePointOffset = new(() => Schema.GetOffset(0x42B1C79BE38A15B), LazyThreadSafetyMode.None); + public ref int WorldNoisePoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x42B1C79BE38A15B)); + get => ref _Handle.AsRef(_WorldNoisePointOffset.Value); } + private static readonly Lazy _AbsValOffset = new(() => Schema.GetOffset(0x42B1C79AD2CCF0A), LazyThreadSafetyMode.None); + public ref bool AbsVal { - get => ref _Handle.AsRef(Schema.GetOffset(0x42B1C79AD2CCF0A)); + get => ref _Handle.AsRef(_AbsValOffset.Value); } + private static readonly Lazy _AbsValInvOffset = new(() => Schema.GetOffset(0x42B1C79024BCB79), LazyThreadSafetyMode.None); + public ref bool AbsValInv { - get => ref _Handle.AsRef(Schema.GetOffset(0x42B1C79024BCB79)); + get => ref _Handle.AsRef(_AbsValInvOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0x42B1C797F14BA34), LazyThreadSafetyMode.None); + public ref float Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0x42B1C797F14BA34)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x42B1C795F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x42B1C795F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x42B1C7951A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x42B1C7951A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _NoiseScaleOffset = new(() => Schema.GetOffset(0x42B1C7932FE2EF3), LazyThreadSafetyMode.None); + public ref float NoiseScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x42B1C7932FE2EF3)); + get => ref _Handle.AsRef(_NoiseScaleOffset.Value); } + private static readonly Lazy _WorldNoiseScaleOffset = new(() => Schema.GetOffset(0x42B1C79A5AC912D), LazyThreadSafetyMode.None); + public ref float WorldNoiseScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x42B1C79A5AC912D)); + get => ref _Handle.AsRef(_WorldNoiseScaleOffset.Value); } + private static readonly Lazy _OffsetLocOffset = new(() => Schema.GetOffset(0x42B1C79EFAB26AC), LazyThreadSafetyMode.None); + public ref Vector OffsetLoc { - get => ref _Handle.AsRef(Schema.GetOffset(0x42B1C79EFAB26AC)); + get => ref _Handle.AsRef(_OffsetLocOffset.Value); } + private static readonly Lazy _WorldTimeScaleOffset = new(() => Schema.GetOffset(0x42B1C79314F4986), LazyThreadSafetyMode.None); + public ref float WorldTimeScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x42B1C79314F4986)); + get => ref _Handle.AsRef(_WorldTimeScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_NoiseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_NoiseImpl.cs index 44d5f8bb2..699950c0d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_NoiseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_NoiseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_NoiseImpl : CParticleFunctionOperatorImpl, C_OP_Nois public C_OP_NoiseImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x1F035961E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x1F035961E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x1F0359615F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x1F0359615F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x1F03596151A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x1F03596151A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _Fl4NoiseScaleOffset = new(() => Schema.GetOffset(0x1F035961F340DAD9), LazyThreadSafetyMode.None); + public ref float Fl4NoiseScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x1F035961F340DAD9)); + get => ref _Handle.AsRef(_Fl4NoiseScaleOffset.Value); } + private static readonly Lazy _AdditiveOffset = new(() => Schema.GetOffset(0x1F0359610FA86105), LazyThreadSafetyMode.None); + public ref bool Additive { - get => ref _Handle.AsRef(Schema.GetOffset(0x1F0359610FA86105)); + get => ref _Handle.AsRef(_AdditiveOffset.Value); } + private static readonly Lazy _NoiseAnimationTimeScaleOffset = new(() => Schema.GetOffset(0x1F035961504CBE30), LazyThreadSafetyMode.None); + public ref float NoiseAnimationTimeScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x1F035961504CBE30)); + get => ref _Handle.AsRef(_NoiseAnimationTimeScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_NormalLockImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_NormalLockImpl.cs index edce77727..d15b781d2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_NormalLockImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_NormalLockImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_OP_NormalLockImpl : CParticleFunctionOperatorImpl, C_OP public C_OP_NormalLockImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x8C7847AD3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x8C7847AD3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_NormalizeVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_NormalizeVectorImpl.cs index 4cf6a1ac7..7cbb6598f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_NormalizeVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_NormalizeVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_NormalizeVectorImpl : CParticleFunctionOperatorImpl, public C_OP_NormalizeVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x53107B8BE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x53107B8BE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x53107B8BB731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0x53107B8BB731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_Orient2DRelToCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_Orient2DRelToCPImpl.cs index bac501ca7..2962611ef 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_Orient2DRelToCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_Orient2DRelToCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_Orient2DRelToCPImpl : CParticleFunctionOperatorImpl, public C_OP_Orient2DRelToCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _RotOffsetOffset = new(() => Schema.GetOffset(0xD330A83D1EA9CDF), LazyThreadSafetyMode.None); + public ref float RotOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xD330A83D1EA9CDF)); + get => ref _Handle.AsRef(_RotOffsetOffset.Value); } + private static readonly Lazy _SpinStrengthOffset = new(() => Schema.GetOffset(0xD330A8312520F26), LazyThreadSafetyMode.None); + public ref float SpinStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0xD330A8312520F26)); + get => ref _Handle.AsRef(_SpinStrengthOffset.Value); } + private static readonly Lazy _CPOffset = new(() => Schema.GetOffset(0xD330A83EB661472), LazyThreadSafetyMode.None); + public ref int CP { - get => ref _Handle.AsRef(Schema.GetOffset(0xD330A83EB661472)); + get => ref _Handle.AsRef(_CPOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xD330A83E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xD330A83E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OrientTo2dDirectionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OrientTo2dDirectionImpl.cs index ddc895619..69871ac6f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OrientTo2dDirectionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OrientTo2dDirectionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_OrientTo2dDirectionImpl : CParticleFunctionOperatorI public C_OP_OrientTo2dDirectionImpl(nint handle) : base(handle) { } + private static readonly Lazy _RotOffsetOffset = new(() => Schema.GetOffset(0x2AC61F04D1EA9CDF), LazyThreadSafetyMode.None); + public ref float RotOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x2AC61F04D1EA9CDF)); + get => ref _Handle.AsRef(_RotOffsetOffset.Value); } + private static readonly Lazy _SpinStrengthOffset = new(() => Schema.GetOffset(0x2AC61F0412520F26), LazyThreadSafetyMode.None); + public ref float SpinStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x2AC61F0412520F26)); + get => ref _Handle.AsRef(_SpinStrengthOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x2AC61F04E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x2AC61F04E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OscillateScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OscillateScalarImpl.cs index 8c4a6cad2..516d7d031 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OscillateScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OscillateScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,70 @@ internal partial class C_OP_OscillateScalarImpl : CParticleFunctionOperatorImpl, public C_OP_OscillateScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _RateMinOffset = new(() => Schema.GetOffset(0x92E728A5645AF561), LazyThreadSafetyMode.None); + public ref float RateMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x92E728A5645AF561)); + get => ref _Handle.AsRef(_RateMinOffset.Value); } + private static readonly Lazy _RateMaxOffset = new(() => Schema.GetOffset(0x92E728A5566E670F), LazyThreadSafetyMode.None); + public ref float RateMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x92E728A5566E670F)); + get => ref _Handle.AsRef(_RateMaxOffset.Value); } + private static readonly Lazy _FrequencyMinOffset = new(() => Schema.GetOffset(0x92E728A531C7331B), LazyThreadSafetyMode.None); + public ref float FrequencyMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x92E728A531C7331B)); + get => ref _Handle.AsRef(_FrequencyMinOffset.Value); } + private static readonly Lazy _FrequencyMaxOffset = new(() => Schema.GetOffset(0x92E728A527B39BA5), LazyThreadSafetyMode.None); + public ref float FrequencyMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x92E728A527B39BA5)); + get => ref _Handle.AsRef(_FrequencyMaxOffset.Value); } + private static readonly Lazy _FieldOffset = new(() => Schema.GetOffset(0x92E728A5C257B93B), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t Field { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x92E728A5C257B93B)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOffset.Value); } + private static readonly Lazy _ProportionalOffset = new(() => Schema.GetOffset(0x92E728A5891F328A), LazyThreadSafetyMode.None); + public ref bool Proportional { - get => ref _Handle.AsRef(Schema.GetOffset(0x92E728A5891F328A)); + get => ref _Handle.AsRef(_ProportionalOffset.Value); } + private static readonly Lazy _ProportionalOpOffset = new(() => Schema.GetOffset(0x92E728A50F8832BD), LazyThreadSafetyMode.None); + public ref bool ProportionalOp { - get => ref _Handle.AsRef(Schema.GetOffset(0x92E728A50F8832BD)); + get => ref _Handle.AsRef(_ProportionalOpOffset.Value); } + private static readonly Lazy _StartTime_minOffset = new(() => Schema.GetOffset(0x92E728A55AC75BFB), LazyThreadSafetyMode.None); + public ref float StartTime_min { - get => ref _Handle.AsRef(Schema.GetOffset(0x92E728A55AC75BFB)); + get => ref _Handle.AsRef(_StartTime_minOffset.Value); } + private static readonly Lazy _StartTime_maxOffset = new(() => Schema.GetOffset(0x92E728A550B23185), LazyThreadSafetyMode.None); + public ref float StartTime_max { - get => ref _Handle.AsRef(Schema.GetOffset(0x92E728A550B23185)); + get => ref _Handle.AsRef(_StartTime_maxOffset.Value); } + private static readonly Lazy _EndTime_minOffset = new(() => Schema.GetOffset(0x92E728A57B891932), LazyThreadSafetyMode.None); + public ref float EndTime_min { - get => ref _Handle.AsRef(Schema.GetOffset(0x92E728A57B891932)); + get => ref _Handle.AsRef(_EndTime_minOffset.Value); } + private static readonly Lazy _EndTime_maxOffset = new(() => Schema.GetOffset(0x92E728A58575A138), LazyThreadSafetyMode.None); + public ref float EndTime_max { - get => ref _Handle.AsRef(Schema.GetOffset(0x92E728A58575A138)); + get => ref _Handle.AsRef(_EndTime_maxOffset.Value); } + private static readonly Lazy _OscMultOffset = new(() => Schema.GetOffset(0x92E728A516278E94), LazyThreadSafetyMode.None); + public ref float OscMult { - get => ref _Handle.AsRef(Schema.GetOffset(0x92E728A516278E94)); + get => ref _Handle.AsRef(_OscMultOffset.Value); } + private static readonly Lazy _OscAddOffset = new(() => Schema.GetOffset(0x92E728A57B38A63D), LazyThreadSafetyMode.None); + public ref float OscAdd { - get => ref _Handle.AsRef(Schema.GetOffset(0x92E728A57B38A63D)); + get => ref _Handle.AsRef(_OscAddOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OscillateScalarSimpleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OscillateScalarSimpleImpl.cs index 651793346..ed1f22968 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OscillateScalarSimpleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OscillateScalarSimpleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_OscillateScalarSimpleImpl : CParticleFunctionOperato public C_OP_OscillateScalarSimpleImpl(nint handle) : base(handle) { } + private static readonly Lazy _RateOffset = new(() => Schema.GetOffset(0xDD611E3FEC3280E7), LazyThreadSafetyMode.None); + public ref float Rate { - get => ref _Handle.AsRef(Schema.GetOffset(0xDD611E3FEC3280E7)); + get => ref _Handle.AsRef(_RateOffset.Value); } + private static readonly Lazy _FrequencyOffset = new(() => Schema.GetOffset(0xDD611E3FBCCAA981), LazyThreadSafetyMode.None); + public ref float Frequency { - get => ref _Handle.AsRef(Schema.GetOffset(0xDD611E3FBCCAA981)); + get => ref _Handle.AsRef(_FrequencyOffset.Value); } + private static readonly Lazy _FieldOffset = new(() => Schema.GetOffset(0xDD611E3FC257B93B), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t Field { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xDD611E3FC257B93B)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOffset.Value); } + private static readonly Lazy _OscMultOffset = new(() => Schema.GetOffset(0xDD611E3F16278E94), LazyThreadSafetyMode.None); + public ref float OscMult { - get => ref _Handle.AsRef(Schema.GetOffset(0xDD611E3F16278E94)); + get => ref _Handle.AsRef(_OscMultOffset.Value); } + private static readonly Lazy _OscAddOffset = new(() => Schema.GetOffset(0xDD611E3F7B38A63D), LazyThreadSafetyMode.None); + public ref float OscAdd { - get => ref _Handle.AsRef(Schema.GetOffset(0xDD611E3F7B38A63D)); + get => ref _Handle.AsRef(_OscAddOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OscillateVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OscillateVectorImpl.cs index d2ce94b97..022952f2a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OscillateVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OscillateVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,50 +17,80 @@ internal partial class C_OP_OscillateVectorImpl : CParticleFunctionOperatorImpl, public C_OP_OscillateVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _RateMinOffset = new(() => Schema.GetOffset(0xEECAE90A645AF561), LazyThreadSafetyMode.None); + public ref Vector RateMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xEECAE90A645AF561)); + get => ref _Handle.AsRef(_RateMinOffset.Value); } + private static readonly Lazy _RateMaxOffset = new(() => Schema.GetOffset(0xEECAE90A566E670F), LazyThreadSafetyMode.None); + public ref Vector RateMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xEECAE90A566E670F)); + get => ref _Handle.AsRef(_RateMaxOffset.Value); } + private static readonly Lazy _FrequencyMinOffset = new(() => Schema.GetOffset(0xEECAE90A31C7331B), LazyThreadSafetyMode.None); + public ref Vector FrequencyMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xEECAE90A31C7331B)); + get => ref _Handle.AsRef(_FrequencyMinOffset.Value); } + private static readonly Lazy _FrequencyMaxOffset = new(() => Schema.GetOffset(0xEECAE90A27B39BA5), LazyThreadSafetyMode.None); + public ref Vector FrequencyMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xEECAE90A27B39BA5)); + get => ref _Handle.AsRef(_FrequencyMaxOffset.Value); } + private static readonly Lazy _FieldOffset = new(() => Schema.GetOffset(0xEECAE90AC257B93B), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t Field { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xEECAE90AC257B93B)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOffset.Value); } + private static readonly Lazy _ProportionalOffset = new(() => Schema.GetOffset(0xEECAE90A891F328A), LazyThreadSafetyMode.None); + public ref bool Proportional { - get => ref _Handle.AsRef(Schema.GetOffset(0xEECAE90A891F328A)); + get => ref _Handle.AsRef(_ProportionalOffset.Value); } + private static readonly Lazy _ProportionalOpOffset = new(() => Schema.GetOffset(0xEECAE90A0F8832BD), LazyThreadSafetyMode.None); + public ref bool ProportionalOp { - get => ref _Handle.AsRef(Schema.GetOffset(0xEECAE90A0F8832BD)); + get => ref _Handle.AsRef(_ProportionalOpOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0xEECAE90A17412B2A), LazyThreadSafetyMode.None); + public ref bool Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0xEECAE90A17412B2A)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _StartTime_minOffset = new(() => Schema.GetOffset(0xEECAE90A5AC75BFB), LazyThreadSafetyMode.None); + public ref float StartTime_min { - get => ref _Handle.AsRef(Schema.GetOffset(0xEECAE90A5AC75BFB)); + get => ref _Handle.AsRef(_StartTime_minOffset.Value); } + private static readonly Lazy _StartTime_maxOffset = new(() => Schema.GetOffset(0xEECAE90A50B23185), LazyThreadSafetyMode.None); + public ref float StartTime_max { - get => ref _Handle.AsRef(Schema.GetOffset(0xEECAE90A50B23185)); + get => ref _Handle.AsRef(_StartTime_maxOffset.Value); } + private static readonly Lazy _EndTime_minOffset = new(() => Schema.GetOffset(0xEECAE90A7B891932), LazyThreadSafetyMode.None); + public ref float EndTime_min { - get => ref _Handle.AsRef(Schema.GetOffset(0xEECAE90A7B891932)); + get => ref _Handle.AsRef(_EndTime_minOffset.Value); } + private static readonly Lazy _EndTime_maxOffset = new(() => Schema.GetOffset(0xEECAE90A8575A138), LazyThreadSafetyMode.None); + public ref float EndTime_max { - get => ref _Handle.AsRef(Schema.GetOffset(0xEECAE90A8575A138)); + get => ref _Handle.AsRef(_EndTime_maxOffset.Value); } + private static readonly Lazy _OscMultOffset = new(() => Schema.GetOffset(0xEECAE90A16278E94), LazyThreadSafetyMode.None); + public CPerParticleFloatInput OscMult { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xEECAE90A16278E94)); + get => new CPerParticleFloatInputImpl(_Handle + _OscMultOffset.Value); } + private static readonly Lazy _OscAddOffset = new(() => Schema.GetOffset(0xEECAE90A7B38A63D), LazyThreadSafetyMode.None); + public CPerParticleFloatInput OscAdd { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xEECAE90A7B38A63D)); + get => new CPerParticleFloatInputImpl(_Handle + _OscAddOffset.Value); } + private static readonly Lazy _RateScaleOffset = new(() => Schema.GetOffset(0xEECAE90A58CBF9C1), LazyThreadSafetyMode.None); + public CPerParticleFloatInput RateScale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xEECAE90A58CBF9C1)); + get => new CPerParticleFloatInputImpl(_Handle + _RateScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OscillateVectorSimpleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OscillateVectorSimpleImpl.cs index 6c2494bcc..76b7b9782 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OscillateVectorSimpleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_OscillateVectorSimpleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_OscillateVectorSimpleImpl : CParticleFunctionOperato public C_OP_OscillateVectorSimpleImpl(nint handle) : base(handle) { } + private static readonly Lazy _RateOffset = new(() => Schema.GetOffset(0xB4CA468EC3280E7), LazyThreadSafetyMode.None); + public ref Vector Rate { - get => ref _Handle.AsRef(Schema.GetOffset(0xB4CA468EC3280E7)); + get => ref _Handle.AsRef(_RateOffset.Value); } + private static readonly Lazy _FrequencyOffset = new(() => Schema.GetOffset(0xB4CA468BCCAA981), LazyThreadSafetyMode.None); + public ref Vector Frequency { - get => ref _Handle.AsRef(Schema.GetOffset(0xB4CA468BCCAA981)); + get => ref _Handle.AsRef(_FrequencyOffset.Value); } + private static readonly Lazy _FieldOffset = new(() => Schema.GetOffset(0xB4CA468C257B93B), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t Field { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xB4CA468C257B93B)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOffset.Value); } + private static readonly Lazy _OscMultOffset = new(() => Schema.GetOffset(0xB4CA46816278E94), LazyThreadSafetyMode.None); + public ref float OscMult { - get => ref _Handle.AsRef(Schema.GetOffset(0xB4CA46816278E94)); + get => ref _Handle.AsRef(_OscMultOffset.Value); } + private static readonly Lazy _OscAddOffset = new(() => Schema.GetOffset(0xB4CA4687B38A63D), LazyThreadSafetyMode.None); + public ref float OscAdd { - get => ref _Handle.AsRef(Schema.GetOffset(0xB4CA4687B38A63D)); + get => ref _Handle.AsRef(_OscAddOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0xB4CA46817412B2A), LazyThreadSafetyMode.None); + public ref bool Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0xB4CA46817412B2A)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ParentVorticesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ParentVorticesImpl.cs index e09c4267e..afa8d67b5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ParentVorticesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ParentVorticesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_ParentVorticesImpl : CParticleFunctionForceImpl, C_O public C_OP_ParentVorticesImpl(nint handle) : base(handle) { } + private static readonly Lazy _ForceScaleOffset = new(() => Schema.GetOffset(0xBB2B6F884817F390), LazyThreadSafetyMode.None); + public ref float ForceScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB2B6F884817F390)); + get => ref _Handle.AsRef(_ForceScaleOffset.Value); } + private static readonly Lazy _TwistAxisOffset = new(() => Schema.GetOffset(0xBB2B6F8808970741), LazyThreadSafetyMode.None); + public ref Vector TwistAxis { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB2B6F8808970741)); + get => ref _Handle.AsRef(_TwistAxisOffset.Value); } + private static readonly Lazy _FlipBasedOnYawOffset = new(() => Schema.GetOffset(0xBB2B6F88BCFD5843), LazyThreadSafetyMode.None); + public ref bool FlipBasedOnYaw { - get => ref _Handle.AsRef(Schema.GetOffset(0xBB2B6F88BCFD5843)); + get => ref _Handle.AsRef(_FlipBasedOnYawOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PerParticleForceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PerParticleForceImpl.cs index 7463e0a5f..79482c4bc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PerParticleForceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PerParticleForceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_PerParticleForceImpl : CParticleFunctionForceImpl, C public C_OP_PerParticleForceImpl(nint handle) : base(handle) { } + private static readonly Lazy _ForceScaleOffset = new(() => Schema.GetOffset(0x70EFAEAD4817F390), LazyThreadSafetyMode.None); + public CPerParticleFloatInput ForceScale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x70EFAEAD4817F390)); + get => new CPerParticleFloatInputImpl(_Handle + _ForceScaleOffset.Value); } + private static readonly Lazy _ForceOffset = new(() => Schema.GetOffset(0x70EFAEADE530B0A8), LazyThreadSafetyMode.None); + public CPerParticleVecInput Force { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x70EFAEADE530B0A8)); + get => new CPerParticleVecInputImpl(_Handle + _ForceOffset.Value); } + private static readonly Lazy _CPOffset = new(() => Schema.GetOffset(0x70EFAEADEB661472), LazyThreadSafetyMode.None); + public ref int CP { - get => ref _Handle.AsRef(Schema.GetOffset(0x70EFAEADEB661472)); + get => ref _Handle.AsRef(_CPOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PercentageBetweenTransformLerpCPsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PercentageBetweenTransformLerpCPsImpl.cs index de715d618..0115b55ae 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PercentageBetweenTransformLerpCPsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PercentageBetweenTransformLerpCPsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,65 @@ internal partial class C_OP_PercentageBetweenTransformLerpCPsImpl : CParticleFun public C_OP_PercentageBetweenTransformLerpCPsImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x96404634E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x96404634E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x96404634E88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x96404634E88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x96404634D6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x96404634D6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _TransformStartOffset = new(() => Schema.GetOffset(0x96404634D94FA7F9), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformStart { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x96404634D94FA7F9)); + get => new CParticleTransformInputImpl(_Handle + _TransformStartOffset.Value); } + private static readonly Lazy _TransformEndOffset = new(() => Schema.GetOffset(0x964046340C3277C8), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformEnd { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x964046340C3277C8)); + get => new CParticleTransformInputImpl(_Handle + _TransformEndOffset.Value); } + private static readonly Lazy _OutputStartCPOffset = new(() => Schema.GetOffset(0x96404634E2225D8F), LazyThreadSafetyMode.None); + public ref int OutputStartCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x96404634E2225D8F)); + get => ref _Handle.AsRef(_OutputStartCPOffset.Value); } + private static readonly Lazy _OutputStartFieldOffset = new(() => Schema.GetOffset(0x96404634BEFE1578), LazyThreadSafetyMode.None); + public ref int OutputStartField { - get => ref _Handle.AsRef(Schema.GetOffset(0x96404634BEFE1578)); + get => ref _Handle.AsRef(_OutputStartFieldOffset.Value); } + private static readonly Lazy _OutputEndCPOffset = new(() => Schema.GetOffset(0x96404634A30AF91E), LazyThreadSafetyMode.None); + public ref int OutputEndCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x96404634A30AF91E)); + get => ref _Handle.AsRef(_OutputEndCPOffset.Value); } + private static readonly Lazy _OutputEndFieldOffset = new(() => Schema.GetOffset(0x964046344B3EC3AF), LazyThreadSafetyMode.None); + public ref int OutputEndField { - get => ref _Handle.AsRef(Schema.GetOffset(0x964046344B3EC3AF)); + get => ref _Handle.AsRef(_OutputEndFieldOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x96404634FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x96404634FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _ActiveRangeOffset = new(() => Schema.GetOffset(0x964046343FA53B84), LazyThreadSafetyMode.None); + public ref bool ActiveRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x964046343FA53B84)); + get => ref _Handle.AsRef(_ActiveRangeOffset.Value); } + private static readonly Lazy _RadialCheckOffset = new(() => Schema.GetOffset(0x96404634496187DE), LazyThreadSafetyMode.None); + public ref bool RadialCheck { - get => ref _Handle.AsRef(Schema.GetOffset(0x96404634496187DE)); + get => ref _Handle.AsRef(_RadialCheckOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PercentageBetweenTransformsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PercentageBetweenTransformsImpl.cs index 87d0fe9d6..abbc36d98 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PercentageBetweenTransformsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PercentageBetweenTransformsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class C_OP_PercentageBetweenTransformsImpl : CParticleFunctionO public C_OP_PercentageBetweenTransformsImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x37F3E6E6E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x37F3E6E6E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x37F3E6E6E88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x37F3E6E6E88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x37F3E6E6D6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x37F3E6E6D6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x37F3E6E65F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x37F3E6E65F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x37F3E6E651A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x37F3E6E651A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _TransformStartOffset = new(() => Schema.GetOffset(0x37F3E6E6D94FA7F9), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformStart { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x37F3E6E6D94FA7F9)); + get => new CParticleTransformInputImpl(_Handle + _TransformStartOffset.Value); } + private static readonly Lazy _TransformEndOffset = new(() => Schema.GetOffset(0x37F3E6E60C3277C8), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformEnd { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x37F3E6E60C3277C8)); + get => new CParticleTransformInputImpl(_Handle + _TransformEndOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x37F3E6E6FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x37F3E6E6FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _ActiveRangeOffset = new(() => Schema.GetOffset(0x37F3E6E63FA53B84), LazyThreadSafetyMode.None); + public ref bool ActiveRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x37F3E6E63FA53B84)); + get => ref _Handle.AsRef(_ActiveRangeOffset.Value); } + private static readonly Lazy _RadialCheckOffset = new(() => Schema.GetOffset(0x37F3E6E6496187DE), LazyThreadSafetyMode.None); + public ref bool RadialCheck { - get => ref _Handle.AsRef(Schema.GetOffset(0x37F3E6E6496187DE)); + get => ref _Handle.AsRef(_RadialCheckOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PercentageBetweenTransformsVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PercentageBetweenTransformsVectorImpl.cs index abdcf77b7..6240ac9e7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PercentageBetweenTransformsVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PercentageBetweenTransformsVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class C_OP_PercentageBetweenTransformsVectorImpl : CParticleFun public C_OP_PercentageBetweenTransformsVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x481FA5ADE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x481FA5ADE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x481FA5ADE88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x481FA5ADE88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x481FA5ADD6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x481FA5ADD6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x481FA5AD2EFED678), LazyThreadSafetyMode.None); + public ref Vector OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x481FA5AD2EFED678)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x481FA5AD451280D2), LazyThreadSafetyMode.None); + public ref Vector OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x481FA5AD451280D2)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _TransformStartOffset = new(() => Schema.GetOffset(0x481FA5ADD94FA7F9), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformStart { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x481FA5ADD94FA7F9)); + get => new CParticleTransformInputImpl(_Handle + _TransformStartOffset.Value); } + private static readonly Lazy _TransformEndOffset = new(() => Schema.GetOffset(0x481FA5AD0C3277C8), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformEnd { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x481FA5AD0C3277C8)); + get => new CParticleTransformInputImpl(_Handle + _TransformEndOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x481FA5ADFB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x481FA5ADFB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _ActiveRangeOffset = new(() => Schema.GetOffset(0x481FA5AD3FA53B84), LazyThreadSafetyMode.None); + public ref bool ActiveRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x481FA5AD3FA53B84)); + get => ref _Handle.AsRef(_ActiveRangeOffset.Value); } + private static readonly Lazy _RadialCheckOffset = new(() => Schema.GetOffset(0x481FA5AD496187DE), LazyThreadSafetyMode.None); + public ref bool RadialCheck { - get => ref _Handle.AsRef(Schema.GetOffset(0x481FA5AD496187DE)); + get => ref _Handle.AsRef(_RadialCheckOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PinParticleToCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PinParticleToCPImpl.cs index 8d379a57c..54a36ed02 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PinParticleToCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PinParticleToCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,47 +17,75 @@ internal partial class C_OP_PinParticleToCPImpl : CParticleFunctionOperatorImpl, public C_OP_PinParticleToCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0xE4FC73983F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xE4FC73983F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0xE4FC7398BD25CC2A), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput Offset { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xE4FC7398BD25CC2A)); + get => new CParticleCollectionVecInputImpl(_Handle + _OffsetOffset.Value); } + private static readonly Lazy _OffsetLocalOffset = new(() => Schema.GetOffset(0xE4FC7398F07D31C1), LazyThreadSafetyMode.None); + public ref bool OffsetLocal { - get => ref _Handle.AsRef(Schema.GetOffset(0xE4FC7398F07D31C1)); + get => ref _Handle.AsRef(_OffsetLocalOffset.Value); } + private static readonly Lazy _ParticleSelectionOffset = new(() => Schema.GetOffset(0xE4FC7398A2307EA7), LazyThreadSafetyMode.None); + public ref ParticleSelection_t ParticleSelection { - get => ref _Handle.AsRef(Schema.GetOffset(0xE4FC7398A2307EA7)); + get => ref _Handle.AsRef(_ParticleSelectionOffset.Value); } + private static readonly Lazy _ParticleNumberOffset = new(() => Schema.GetOffset(0xE4FC739812F26402), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ParticleNumber { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xE4FC739812F26402)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ParticleNumberOffset.Value); } + private static readonly Lazy _PinBreakTypeOffset = new(() => Schema.GetOffset(0xE4FC73981D66F607), LazyThreadSafetyMode.None); + public ref ParticlePinDistance_t PinBreakType { - get => ref _Handle.AsRef(Schema.GetOffset(0xE4FC73981D66F607)); + get => ref _Handle.AsRef(_PinBreakTypeOffset.Value); } + private static readonly Lazy _BreakDistanceOffset = new(() => Schema.GetOffset(0xE4FC7398AD760DA9), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput BreakDistance { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xE4FC7398AD760DA9)); + get => new CParticleCollectionFloatInputImpl(_Handle + _BreakDistanceOffset.Value); } + private static readonly Lazy _BreakSpeedOffset = new(() => Schema.GetOffset(0xE4FC739817DB9AD5), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput BreakSpeed { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xE4FC739817DB9AD5)); + get => new CParticleCollectionFloatInputImpl(_Handle + _BreakSpeedOffset.Value); } + private static readonly Lazy _AgeOffset = new(() => Schema.GetOffset(0xE4FC73984F7B4AF6), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Age { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xE4FC73984F7B4AF6)); + get => new CParticleCollectionFloatInputImpl(_Handle + _AgeOffset.Value); } + private static readonly Lazy _BreakControlPointNumberOffset = new(() => Schema.GetOffset(0xE4FC739817C1EFA0), LazyThreadSafetyMode.None); + public ref int BreakControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xE4FC739817C1EFA0)); + get => ref _Handle.AsRef(_BreakControlPointNumberOffset.Value); } + private static readonly Lazy _BreakControlPointNumber2Offset = new(() => Schema.GetOffset(0xE4FC7398F84C22D6), LazyThreadSafetyMode.None); + public ref int BreakControlPointNumber2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xE4FC7398F84C22D6)); + get => ref _Handle.AsRef(_BreakControlPointNumber2Offset.Value); } + private static readonly Lazy _BreakValueOffset = new(() => Schema.GetOffset(0xE4FC7398D120F44B), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput BreakValue { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xE4FC7398D120F44B)); + get => new CParticleCollectionFloatInputImpl(_Handle + _BreakValueOffset.Value); } + private static readonly Lazy _InterpolationOffset = new(() => Schema.GetOffset(0xE4FC7398CF55B987), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Interpolation { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xE4FC7398CF55B987)); + get => new CPerParticleFloatInputImpl(_Handle + _InterpolationOffset.Value); } + private static readonly Lazy _RetainInitialVelocityOffset = new(() => Schema.GetOffset(0xE4FC73981B3893D3), LazyThreadSafetyMode.None); + public ref bool RetainInitialVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xE4FC73981B3893D3)); + get => ref _Handle.AsRef(_RetainInitialVelocityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PinRopeSegmentParticleToParentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PinRopeSegmentParticleToParentImpl.cs index ba8b70f6f..54f29c21c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PinRopeSegmentParticleToParentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PinRopeSegmentParticleToParentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_PinRopeSegmentParticleToParentImpl : CParticleFuncti public C_OP_PinRopeSegmentParticleToParentImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParticleSelectionOffset = new(() => Schema.GetOffset(0x5F59F78EA2307EA7), LazyThreadSafetyMode.None); + public ref ParticleSelection_t ParticleSelection { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F59F78EA2307EA7)); + get => ref _Handle.AsRef(_ParticleSelectionOffset.Value); } + private static readonly Lazy _ParticleNumberOffset = new(() => Schema.GetOffset(0x5F59F78E12F26402), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ParticleNumber { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x5F59F78E12F26402)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ParticleNumberOffset.Value); } + private static readonly Lazy _InterpolationOffset = new(() => Schema.GetOffset(0x5F59F78ECF55B987), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Interpolation { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x5F59F78ECF55B987)); + get => new CPerParticleFloatInputImpl(_Handle + _InterpolationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PlanarConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PlanarConstraintImpl.cs index 9a19d06ea..33fe62310 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PlanarConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PlanarConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_PlanarConstraintImpl : CParticleFunctionConstraintIm public C_OP_PlanarConstraintImpl(nint handle) : base(handle) { } + private static readonly Lazy _PointOnPlaneOffset = new(() => Schema.GetOffset(0x1440B2AE4A5806BE), LazyThreadSafetyMode.None); + public ref Vector PointOnPlane { - get => ref _Handle.AsRef(Schema.GetOffset(0x1440B2AE4A5806BE)); + get => ref _Handle.AsRef(_PointOnPlaneOffset.Value); } + private static readonly Lazy _PlaneNormalOffset = new(() => Schema.GetOffset(0x1440B2AEEAA80062), LazyThreadSafetyMode.None); + public ref Vector PlaneNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0x1440B2AEEAA80062)); + get => ref _Handle.AsRef(_PlaneNormalOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x1440B2AE3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x1440B2AE3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _GlobalOriginOffset = new(() => Schema.GetOffset(0x1440B2AEDF871518), LazyThreadSafetyMode.None); + public ref bool GlobalOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0x1440B2AEDF871518)); + get => ref _Handle.AsRef(_GlobalOriginOffset.Value); } + private static readonly Lazy _GlobalNormalOffset = new(() => Schema.GetOffset(0x1440B2AE266C15DD), LazyThreadSafetyMode.None); + public ref bool GlobalNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0x1440B2AE266C15DD)); + get => ref _Handle.AsRef(_GlobalNormalOffset.Value); } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0x1440B2AEA7A20159), LazyThreadSafetyMode.None); + public CPerParticleFloatInput RadiusScale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x1440B2AEA7A20159)); + get => new CPerParticleFloatInputImpl(_Handle + _RadiusScaleOffset.Value); } + private static readonly Lazy _MaximumDistanceToCPOffset = new(() => Schema.GetOffset(0x1440B2AE91B48FEA), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput MaximumDistanceToCP { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x1440B2AE91B48FEA)); + get => new CParticleCollectionFloatInputImpl(_Handle + _MaximumDistanceToCPOffset.Value); } + private static readonly Lazy _UseOldCodeOffset = new(() => Schema.GetOffset(0x1440B2AEB7886300), LazyThreadSafetyMode.None); + public ref bool UseOldCode { - get => ref _Handle.AsRef(Schema.GetOffset(0x1440B2AEB7886300)); + get => ref _Handle.AsRef(_UseOldCodeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PlaneCullImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PlaneCullImpl.cs index b7a5384d1..60932f227 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PlaneCullImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PlaneCullImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_PlaneCullImpl : CParticleFunctionOperatorImpl, C_OP_ public C_OP_PlaneCullImpl(nint handle) : base(handle) { } + private static readonly Lazy _PlaneControlPointOffset = new(() => Schema.GetOffset(0x352AAF45E621E9BC), LazyThreadSafetyMode.None); + public ref int PlaneControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x352AAF45E621E9BC)); + get => ref _Handle.AsRef(_PlaneControlPointOffset.Value); } + private static readonly Lazy _PlaneDirectionOffset = new(() => Schema.GetOffset(0x352AAF45B00A585A), LazyThreadSafetyMode.None); + public ref Vector PlaneDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0x352AAF45B00A585A)); + get => ref _Handle.AsRef(_PlaneDirectionOffset.Value); } + private static readonly Lazy _LocalSpaceOffset = new(() => Schema.GetOffset(0x352AAF4562418E6E), LazyThreadSafetyMode.None); + public ref bool LocalSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x352AAF4562418E6E)); + get => ref _Handle.AsRef(_LocalSpaceOffset.Value); } + private static readonly Lazy _PlaneOffsetOffset = new(() => Schema.GetOffset(0x352AAF45D394676C), LazyThreadSafetyMode.None); + public ref float PlaneOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x352AAF45D394676C)); + get => ref _Handle.AsRef(_PlaneOffsetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PlayEndCapWhenFinishedImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PlayEndCapWhenFinishedImpl.cs index 4dcf491b7..3c972f9a6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PlayEndCapWhenFinishedImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PlayEndCapWhenFinishedImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_PlayEndCapWhenFinishedImpl : CParticleFunctionPreEmi public C_OP_PlayEndCapWhenFinishedImpl(nint handle) : base(handle) { } + private static readonly Lazy _FireOnEmissionEndOffset = new(() => Schema.GetOffset(0xFC89982E01C357B0), LazyThreadSafetyMode.None); + public ref bool FireOnEmissionEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC89982E01C357B0)); + get => ref _Handle.AsRef(_FireOnEmissionEndOffset.Value); } + private static readonly Lazy _IncludeChildrenOffset = new(() => Schema.GetOffset(0xFC89982EA7706C80), LazyThreadSafetyMode.None); + public ref bool IncludeChildren { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC89982EA7706C80)); + get => ref _Handle.AsRef(_IncludeChildrenOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PointVectorAtNextParticleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PointVectorAtNextParticleImpl.cs index 4251d8b1c..277ba56c7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PointVectorAtNextParticleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PointVectorAtNextParticleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_PointVectorAtNextParticleImpl : CParticleFunctionOpe public C_OP_PointVectorAtNextParticleImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xC209094CE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xC209094CE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InterpolationOffset = new(() => Schema.GetOffset(0xC209094CCF55B987), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Interpolation { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xC209094CCF55B987)); + get => new CPerParticleFloatInputImpl(_Handle + _InterpolationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PositionLockImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PositionLockImpl.cs index 7ea6afcc1..d4b380c79 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PositionLockImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_PositionLockImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,50 +17,80 @@ internal partial class C_OP_PositionLockImpl : CParticleFunctionOperatorImpl, C_ public C_OP_PositionLockImpl(nint handle) : base(handle) { } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0xCE90EAD5B3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0xCE90EAD5B3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _StartTime_minOffset = new(() => Schema.GetOffset(0xCE90EAD55AC75BFB), LazyThreadSafetyMode.None); + public ref float StartTime_min { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE90EAD55AC75BFB)); + get => ref _Handle.AsRef(_StartTime_minOffset.Value); } + private static readonly Lazy _StartTime_maxOffset = new(() => Schema.GetOffset(0xCE90EAD550B23185), LazyThreadSafetyMode.None); + public ref float StartTime_max { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE90EAD550B23185)); + get => ref _Handle.AsRef(_StartTime_maxOffset.Value); } + private static readonly Lazy _StartTime_expOffset = new(() => Schema.GetOffset(0xCE90EAD5E9B22DE4), LazyThreadSafetyMode.None); + public ref float StartTime_exp { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE90EAD5E9B22DE4)); + get => ref _Handle.AsRef(_StartTime_expOffset.Value); } + private static readonly Lazy _EndTime_minOffset = new(() => Schema.GetOffset(0xCE90EAD57B891932), LazyThreadSafetyMode.None); + public ref float EndTime_min { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE90EAD57B891932)); + get => ref _Handle.AsRef(_EndTime_minOffset.Value); } + private static readonly Lazy _EndTime_maxOffset = new(() => Schema.GetOffset(0xCE90EAD58575A138), LazyThreadSafetyMode.None); + public ref float EndTime_max { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE90EAD58575A138)); + get => ref _Handle.AsRef(_EndTime_maxOffset.Value); } + private static readonly Lazy _EndTime_expOffset = new(() => Schema.GetOffset(0xCE90EAD51CA4CB99), LazyThreadSafetyMode.None); + public ref float EndTime_exp { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE90EAD51CA4CB99)); + get => ref _Handle.AsRef(_EndTime_expOffset.Value); } + private static readonly Lazy _RangeOffset = new(() => Schema.GetOffset(0xCE90EAD53FC92844), LazyThreadSafetyMode.None); + public ref float Range { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE90EAD53FC92844)); + get => ref _Handle.AsRef(_RangeOffset.Value); } + private static readonly Lazy _RangeBiasOffset = new(() => Schema.GetOffset(0xCE90EAD56BC1F129), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput RangeBias { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xCE90EAD56BC1F129)); + get => new CParticleCollectionFloatInputImpl(_Handle + _RangeBiasOffset.Value); } + private static readonly Lazy _JumpThresholdOffset = new(() => Schema.GetOffset(0xCE90EAD5B6BB1AD6), LazyThreadSafetyMode.None); + public ref float JumpThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE90EAD5B6BB1AD6)); + get => ref _Handle.AsRef(_JumpThresholdOffset.Value); } + private static readonly Lazy _PrevPosScaleOffset = new(() => Schema.GetOffset(0xCE90EAD546CED122), LazyThreadSafetyMode.None); + public ref float PrevPosScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE90EAD546CED122)); + get => ref _Handle.AsRef(_PrevPosScaleOffset.Value); } + private static readonly Lazy _LockRotOffset = new(() => Schema.GetOffset(0xCE90EAD5549B459B), LazyThreadSafetyMode.None); + public ref bool LockRot { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE90EAD5549B459B)); + get => ref _Handle.AsRef(_LockRotOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0xCE90EAD55F596B51), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput Scale { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xCE90EAD55F596B51)); + get => new CParticleCollectionVecInputImpl(_Handle + _ScaleOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xCE90EAD5E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xCE90EAD5E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _FieldOutputPrevOffset = new(() => Schema.GetOffset(0xCE90EAD568D9463B), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutputPrev { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xCE90EAD568D9463B)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputPrevOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_QuantizeCPComponentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_QuantizeCPComponentImpl.cs index 0e099899c..62394c425 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_QuantizeCPComponentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_QuantizeCPComponentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_QuantizeCPComponentImpl : CParticleFunctionPreEmissi public C_OP_QuantizeCPComponentImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueOffset = new(() => Schema.GetOffset(0xDE980890EEDF8362), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput InputValue { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xDE980890EEDF8362)); + get => new CParticleCollectionFloatInputImpl(_Handle + _InputValueOffset.Value); } + private static readonly Lazy _CPOutputOffset = new(() => Schema.GetOffset(0xDE9808902077C953), LazyThreadSafetyMode.None); + public ref int CPOutput { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE9808902077C953)); + get => ref _Handle.AsRef(_CPOutputOffset.Value); } + private static readonly Lazy _OutVectorFieldOffset = new(() => Schema.GetOffset(0xDE980890F9041E74), LazyThreadSafetyMode.None); + public ref int OutVectorField { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE980890F9041E74)); + get => ref _Handle.AsRef(_OutVectorFieldOffset.Value); } + private static readonly Lazy _QuantizeValueOffset = new(() => Schema.GetOffset(0xDE98089065E1A349), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput QuantizeValue { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xDE98089065E1A349)); + get => new CParticleCollectionFloatInputImpl(_Handle + _QuantizeValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_QuantizeFloatImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_QuantizeFloatImpl.cs index c08b6befe..7be5364fc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_QuantizeFloatImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_QuantizeFloatImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_QuantizeFloatImpl : CParticleFunctionOperatorImpl, C public C_OP_QuantizeFloatImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueOffset = new(() => Schema.GetOffset(0xCD85375434445438), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputValue { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xCD85375434445438)); + get => new CPerParticleFloatInputImpl(_Handle + _InputValueOffset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0xCD853754324F6F74), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t OutputField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xCD853754324F6F74)); + get => new ParticleAttributeIndex_tImpl(_Handle + _OutputFieldOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RadiusDecayImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RadiusDecayImpl.cs index 3cc5e29c3..dae600eee 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RadiusDecayImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RadiusDecayImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_OP_RadiusDecayImpl : CParticleFunctionOperatorImpl, C_O public C_OP_RadiusDecayImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinRadiusOffset = new(() => Schema.GetOffset(0x119375431D07C7B7), LazyThreadSafetyMode.None); + public ref float MinRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x119375431D07C7B7)); + get => ref _Handle.AsRef(_MinRadiusOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampCPLinearRandomImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampCPLinearRandomImpl.cs index 302bd5395..79b5371e2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampCPLinearRandomImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampCPLinearRandomImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_RampCPLinearRandomImpl : CParticleFunctionPreEmissio public C_OP_RampCPLinearRandomImpl(nint handle) : base(handle) { } + private static readonly Lazy _OutControlPointNumberOffset = new(() => Schema.GetOffset(0xF3F4631CD021D73F), LazyThreadSafetyMode.None); + public ref int OutControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3F4631CD021D73F)); + get => ref _Handle.AsRef(_OutControlPointNumberOffset.Value); } + private static readonly Lazy _RateMinOffset = new(() => Schema.GetOffset(0xF3F4631CB1C06501), LazyThreadSafetyMode.None); + public ref Vector RateMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3F4631CB1C06501)); + get => ref _Handle.AsRef(_RateMinOffset.Value); } + private static readonly Lazy _RateMaxOffset = new(() => Schema.GetOffset(0xF3F4631CA3D569AF), LazyThreadSafetyMode.None); + public ref Vector RateMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xF3F4631CA3D569AF)); + get => ref _Handle.AsRef(_RateMaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampScalarLinearImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampScalarLinearImpl.cs index b9a6db54b..337b65d34 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampScalarLinearImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampScalarLinearImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_RampScalarLinearImpl : CParticleFunctionOperatorImpl public C_OP_RampScalarLinearImpl(nint handle) : base(handle) { } + private static readonly Lazy _RateMinOffset = new(() => Schema.GetOffset(0xEE7E510C645AF561), LazyThreadSafetyMode.None); + public ref float RateMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xEE7E510C645AF561)); + get => ref _Handle.AsRef(_RateMinOffset.Value); } + private static readonly Lazy _RateMaxOffset = new(() => Schema.GetOffset(0xEE7E510C566E670F), LazyThreadSafetyMode.None); + public ref float RateMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xEE7E510C566E670F)); + get => ref _Handle.AsRef(_RateMaxOffset.Value); } + private static readonly Lazy _StartTime_minOffset = new(() => Schema.GetOffset(0xEE7E510C5AC75BFB), LazyThreadSafetyMode.None); + public ref float StartTime_min { - get => ref _Handle.AsRef(Schema.GetOffset(0xEE7E510C5AC75BFB)); + get => ref _Handle.AsRef(_StartTime_minOffset.Value); } + private static readonly Lazy _StartTime_maxOffset = new(() => Schema.GetOffset(0xEE7E510C50B23185), LazyThreadSafetyMode.None); + public ref float StartTime_max { - get => ref _Handle.AsRef(Schema.GetOffset(0xEE7E510C50B23185)); + get => ref _Handle.AsRef(_StartTime_maxOffset.Value); } + private static readonly Lazy _EndTime_minOffset = new(() => Schema.GetOffset(0xEE7E510C7B891932), LazyThreadSafetyMode.None); + public ref float EndTime_min { - get => ref _Handle.AsRef(Schema.GetOffset(0xEE7E510C7B891932)); + get => ref _Handle.AsRef(_EndTime_minOffset.Value); } + private static readonly Lazy _EndTime_maxOffset = new(() => Schema.GetOffset(0xEE7E510C8575A138), LazyThreadSafetyMode.None); + public ref float EndTime_max { - get => ref _Handle.AsRef(Schema.GetOffset(0xEE7E510C8575A138)); + get => ref _Handle.AsRef(_EndTime_maxOffset.Value); } + private static readonly Lazy _FieldOffset = new(() => Schema.GetOffset(0xEE7E510CC257B93B), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t Field { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xEE7E510CC257B93B)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOffset.Value); } + private static readonly Lazy _ProportionalOpOffset = new(() => Schema.GetOffset(0xEE7E510C0F8832BD), LazyThreadSafetyMode.None); + public ref bool ProportionalOp { - get => ref _Handle.AsRef(Schema.GetOffset(0xEE7E510C0F8832BD)); + get => ref _Handle.AsRef(_ProportionalOpOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampScalarLinearSimpleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampScalarLinearSimpleImpl.cs index c7f75b21f..278fcb3b3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampScalarLinearSimpleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampScalarLinearSimpleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_RampScalarLinearSimpleImpl : CParticleFunctionOperat public C_OP_RampScalarLinearSimpleImpl(nint handle) : base(handle) { } + private static readonly Lazy _RateOffset = new(() => Schema.GetOffset(0xCD04073EEC3280E7), LazyThreadSafetyMode.None); + public ref float Rate { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD04073EEC3280E7)); + get => ref _Handle.AsRef(_RateOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0xCD04073E67FE9DC4), LazyThreadSafetyMode.None); + public ref float StartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD04073E67FE9DC4)); + get => ref _Handle.AsRef(_StartTimeOffset.Value); } + private static readonly Lazy _EndTimeOffset = new(() => Schema.GetOffset(0xCD04073E2041DF9D), LazyThreadSafetyMode.None); + public ref float EndTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xCD04073E2041DF9D)); + get => ref _Handle.AsRef(_EndTimeOffset.Value); } + private static readonly Lazy _FieldOffset = new(() => Schema.GetOffset(0xCD04073EC257B93B), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t Field { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xCD04073EC257B93B)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampScalarSplineImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampScalarSplineImpl.cs index c77adfb60..2aa1ddeda 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampScalarSplineImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampScalarSplineImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class C_OP_RampScalarSplineImpl : CParticleFunctionOperatorImpl public C_OP_RampScalarSplineImpl(nint handle) : base(handle) { } + private static readonly Lazy _RateMinOffset = new(() => Schema.GetOffset(0x4ADFC178645AF561), LazyThreadSafetyMode.None); + public ref float RateMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ADFC178645AF561)); + get => ref _Handle.AsRef(_RateMinOffset.Value); } + private static readonly Lazy _RateMaxOffset = new(() => Schema.GetOffset(0x4ADFC178566E670F), LazyThreadSafetyMode.None); + public ref float RateMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ADFC178566E670F)); + get => ref _Handle.AsRef(_RateMaxOffset.Value); } + private static readonly Lazy _StartTime_minOffset = new(() => Schema.GetOffset(0x4ADFC1785AC75BFB), LazyThreadSafetyMode.None); + public ref float StartTime_min { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ADFC1785AC75BFB)); + get => ref _Handle.AsRef(_StartTime_minOffset.Value); } + private static readonly Lazy _StartTime_maxOffset = new(() => Schema.GetOffset(0x4ADFC17850B23185), LazyThreadSafetyMode.None); + public ref float StartTime_max { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ADFC17850B23185)); + get => ref _Handle.AsRef(_StartTime_maxOffset.Value); } + private static readonly Lazy _EndTime_minOffset = new(() => Schema.GetOffset(0x4ADFC1787B891932), LazyThreadSafetyMode.None); + public ref float EndTime_min { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ADFC1787B891932)); + get => ref _Handle.AsRef(_EndTime_minOffset.Value); } + private static readonly Lazy _EndTime_maxOffset = new(() => Schema.GetOffset(0x4ADFC1788575A138), LazyThreadSafetyMode.None); + public ref float EndTime_max { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ADFC1788575A138)); + get => ref _Handle.AsRef(_EndTime_maxOffset.Value); } + private static readonly Lazy _BiasOffset = new(() => Schema.GetOffset(0x4ADFC178E7EF43B6), LazyThreadSafetyMode.None); + public ref float Bias { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ADFC178E7EF43B6)); + get => ref _Handle.AsRef(_BiasOffset.Value); } + private static readonly Lazy _FieldOffset = new(() => Schema.GetOffset(0x4ADFC178C257B93B), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t Field { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x4ADFC178C257B93B)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOffset.Value); } + private static readonly Lazy _ProportionalOpOffset = new(() => Schema.GetOffset(0x4ADFC1780F8832BD), LazyThreadSafetyMode.None); + public ref bool ProportionalOp { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ADFC1780F8832BD)); + get => ref _Handle.AsRef(_ProportionalOpOffset.Value); } + private static readonly Lazy _EaseOutOffset = new(() => Schema.GetOffset(0x4ADFC1788E58B9D1), LazyThreadSafetyMode.None); + public ref bool EaseOut { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ADFC1788E58B9D1)); + get => ref _Handle.AsRef(_EaseOutOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampScalarSplineSimpleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampScalarSplineSimpleImpl.cs index 0dbe0a59f..f185dc49f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampScalarSplineSimpleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RampScalarSplineSimpleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_RampScalarSplineSimpleImpl : CParticleFunctionOperat public C_OP_RampScalarSplineSimpleImpl(nint handle) : base(handle) { } + private static readonly Lazy _RateOffset = new(() => Schema.GetOffset(0xA8BA5EF2EC3280E7), LazyThreadSafetyMode.None); + public ref float Rate { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8BA5EF2EC3280E7)); + get => ref _Handle.AsRef(_RateOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0xA8BA5EF267FE9DC4), LazyThreadSafetyMode.None); + public ref float StartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8BA5EF267FE9DC4)); + get => ref _Handle.AsRef(_StartTimeOffset.Value); } + private static readonly Lazy _EndTimeOffset = new(() => Schema.GetOffset(0xA8BA5EF22041DF9D), LazyThreadSafetyMode.None); + public ref float EndTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8BA5EF22041DF9D)); + get => ref _Handle.AsRef(_EndTimeOffset.Value); } + private static readonly Lazy _FieldOffset = new(() => Schema.GetOffset(0xA8BA5EF2C257B93B), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t Field { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xA8BA5EF2C257B93B)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOffset.Value); } + private static readonly Lazy _EaseOutOffset = new(() => Schema.GetOffset(0xA8BA5EF28E58B9D1), LazyThreadSafetyMode.None); + public ref bool EaseOut { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8BA5EF28E58B9D1)); + get => ref _Handle.AsRef(_EaseOutOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RandomForceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RandomForceImpl.cs index 20aff3c59..f905de6bc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RandomForceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RandomForceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_RandomForceImpl : CParticleFunctionForceImpl, C_OP_R public C_OP_RandomForceImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinForceOffset = new(() => Schema.GetOffset(0x4BB81519FA8D2AE2), LazyThreadSafetyMode.None); + public ref Vector MinForce { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BB81519FA8D2AE2)); + get => ref _Handle.AsRef(_MinForceOffset.Value); } + private static readonly Lazy _MaxForceOffset = new(() => Schema.GetOffset(0x4BB815192324D8D8), LazyThreadSafetyMode.None); + public ref Vector MaxForce { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BB815192324D8D8)); + get => ref _Handle.AsRef(_MaxForceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ReadFromNeighboringParticleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ReadFromNeighboringParticleImpl.cs index 796893e90..dd3725498 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ReadFromNeighboringParticleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ReadFromNeighboringParticleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_ReadFromNeighboringParticleImpl : CParticleFunctionO public C_OP_ReadFromNeighboringParticleImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldInputOffset = new(() => Schema.GetOffset(0xDC4AE427AE775669), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xDC4AE427AE775669)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xDC4AE427E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xDC4AE427E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _IncrementOffset = new(() => Schema.GetOffset(0xDC4AE4272359F182), LazyThreadSafetyMode.None); + public ref int Increment { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC4AE4272359F182)); + get => ref _Handle.AsRef(_IncrementOffset.Value); } + private static readonly Lazy _DistanceCheckOffset = new(() => Schema.GetOffset(0xDC4AE4272F031DC2), LazyThreadSafetyMode.None); + public CPerParticleFloatInput DistanceCheck { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xDC4AE4272F031DC2)); + get => new CPerParticleFloatInputImpl(_Handle + _DistanceCheckOffset.Value); } + private static readonly Lazy _InterpolationOffset = new(() => Schema.GetOffset(0xDC4AE427CF55B987), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Interpolation { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xDC4AE427CF55B987)); + get => new CPerParticleFloatInputImpl(_Handle + _InterpolationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ReinitializeScalarEndCapImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ReinitializeScalarEndCapImpl.cs index 8d0d1b1ea..abe280c3e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ReinitializeScalarEndCapImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ReinitializeScalarEndCapImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_ReinitializeScalarEndCapImpl : CParticleFunctionOper public C_OP_ReinitializeScalarEndCapImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xC52E8D41E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xC52E8D41E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0xC52E8D415F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xC52E8D415F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0xC52E8D4151A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xC52E8D4151A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapAverageHitboxSpeedtoCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapAverageHitboxSpeedtoCPImpl.cs index d2e7f1815..833cee1ad 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapAverageHitboxSpeedtoCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapAverageHitboxSpeedtoCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,42 +17,64 @@ internal partial class C_OP_RemapAverageHitboxSpeedtoCPImpl : CParticleFunctionP public C_OP_RemapAverageHitboxSpeedtoCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _InControlPointNumberOffset = new(() => Schema.GetOffset(0xE6055FBCE7CB99DE), LazyThreadSafetyMode.None); + public ref int InControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xE6055FBCE7CB99DE)); + get => ref _Handle.AsRef(_InControlPointNumberOffset.Value); } + private static readonly Lazy _OutControlPointNumberOffset = new(() => Schema.GetOffset(0xE6055FBCD021D73F), LazyThreadSafetyMode.None); + public ref int OutControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xE6055FBCD021D73F)); + get => ref _Handle.AsRef(_OutControlPointNumberOffset.Value); } + private static readonly Lazy _FieldOffset = new(() => Schema.GetOffset(0xE6055FBCC257B93B), LazyThreadSafetyMode.None); + public ref int Field { - get => ref _Handle.AsRef(Schema.GetOffset(0xE6055FBCC257B93B)); + get => ref _Handle.AsRef(_FieldOffset.Value); } + private static readonly Lazy _HitboxDataTypeOffset = new(() => Schema.GetOffset(0xE6055FBCAB1666E3), LazyThreadSafetyMode.None); + public ref ParticleHitboxDataSelection_t HitboxDataType { - get => ref _Handle.AsRef(Schema.GetOffset(0xE6055FBCAB1666E3)); + get => ref _Handle.AsRef(_HitboxDataTypeOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0xE6055FBCE88A0D0F), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput InputMin { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xE6055FBCE88A0D0F)); + get => new CParticleCollectionFloatInputImpl(_Handle + _InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0xE6055FBCD6766901), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput InputMax { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xE6055FBCD6766901)); + get => new CParticleCollectionFloatInputImpl(_Handle + _InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0xE6055FBC5F8D7716), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput OutputMin { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xE6055FBC5F8D7716)); + get => new CParticleCollectionFloatInputImpl(_Handle + _OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0xE6055FBC51A0E8C4), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput OutputMax { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xE6055FBC51A0E8C4)); + get => new CParticleCollectionFloatInputImpl(_Handle + _OutputMaxOffset.Value); } + private static readonly Lazy _HeightControlPointNumberOffset = new(() => Schema.GetOffset(0xE6055FBCF2D4BC82), LazyThreadSafetyMode.None); + public ref int HeightControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xE6055FBCF2D4BC82)); + get => ref _Handle.AsRef(_HeightControlPointNumberOffset.Value); } + private static readonly Lazy _ComparisonVelocityOffset = new(() => Schema.GetOffset(0xE6055FBC23BF409F), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput ComparisonVelocity { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xE6055FBC23BF409F)); + get => new CParticleCollectionVecInputImpl(_Handle + _ComparisonVelocityOffset.Value); } + private static readonly Lazy _HitboxSetNameOffset = new(() => Schema.GetOffset(0xE6055FBC6A21BB0E), LazyThreadSafetyMode.None); + public string HitboxSetName { get { - var ptr = _Handle + Schema.GetOffset(0xE6055FBC6A21BB0E); + var ptr = _Handle + _HitboxSetNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xE6055FBC6A21BB0E, value, 128); + set => Schema.SetFixedString(_Handle, _HitboxSetNameOffset.Value, value, 128); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapAverageScalarValuetoCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapAverageScalarValuetoCPImpl.cs index 2a4a57bcd..0e588395d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapAverageScalarValuetoCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapAverageScalarValuetoCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_RemapAverageScalarValuetoCPImpl : CParticleFunctionP public C_OP_RemapAverageScalarValuetoCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExpressionOffset = new(() => Schema.GetOffset(0x98EDCBBC160B2427), LazyThreadSafetyMode.None); + public ref SetStatisticExpressionType_t Expression { - get => ref _Handle.AsRef(Schema.GetOffset(0x98EDCBBC160B2427)); + get => ref _Handle.AsRef(_ExpressionOffset.Value); } + private static readonly Lazy _DecimalPlacesOffset = new(() => Schema.GetOffset(0x98EDCBBCB314ED06), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput DecimalPlaces { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x98EDCBBCB314ED06)); + get => new CParticleCollectionFloatInputImpl(_Handle + _DecimalPlacesOffset.Value); } + private static readonly Lazy _OutControlPointNumberOffset = new(() => Schema.GetOffset(0x98EDCBBCD021D73F), LazyThreadSafetyMode.None); + public ref int OutControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x98EDCBBCD021D73F)); + get => ref _Handle.AsRef(_OutControlPointNumberOffset.Value); } + private static readonly Lazy _OutVectorFieldOffset = new(() => Schema.GetOffset(0x98EDCBBCF9041E74), LazyThreadSafetyMode.None); + public ref int OutVectorField { - get => ref _Handle.AsRef(Schema.GetOffset(0x98EDCBBCF9041E74)); + get => ref _Handle.AsRef(_OutVectorFieldOffset.Value); } + private static readonly Lazy _FieldOffset = new(() => Schema.GetOffset(0x98EDCBBCC257B93B), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t Field { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x98EDCBBCC257B93B)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOffset.Value); } + private static readonly Lazy _OutputRemapOffset = new(() => Schema.GetOffset(0x98EDCBBC1239396F), LazyThreadSafetyMode.None); + public CParticleRemapFloatInput OutputRemap { - get => new CParticleRemapFloatInputImpl(_Handle + Schema.GetOffset(0x98EDCBBC1239396F)); + get => new CParticleRemapFloatInputImpl(_Handle + _OutputRemapOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapBoundingVolumetoCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapBoundingVolumetoCPImpl.cs index b71a06b34..4cc4d88e1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapBoundingVolumetoCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapBoundingVolumetoCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_RemapBoundingVolumetoCPImpl : CParticleFunctionPreEm public C_OP_RemapBoundingVolumetoCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _OutControlPointNumberOffset = new(() => Schema.GetOffset(0xBFFF451ED021D73F), LazyThreadSafetyMode.None); + public ref int OutControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xBFFF451ED021D73F)); + get => ref _Handle.AsRef(_OutControlPointNumberOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0xBFFF451EE88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xBFFF451EE88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0xBFFF451ED6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xBFFF451ED6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0xBFFF451E5F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xBFFF451E5F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0xBFFF451E51A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xBFFF451E51A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCPVelocityToVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCPVelocityToVectorImpl.cs index 35a7e00b7..2574ee39b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCPVelocityToVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCPVelocityToVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_RemapCPVelocityToVectorImpl : CParticleFunctionOpera public C_OP_RemapCPVelocityToVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointOffset = new(() => Schema.GetOffset(0xAD6CE1DC0D0DDF8C), LazyThreadSafetyMode.None); + public ref int ControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xAD6CE1DC0D0DDF8C)); + get => ref _Handle.AsRef(_ControlPointOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xAD6CE1DCE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xAD6CE1DCE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0xAD6CE1DCB731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0xAD6CE1DCB731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _NormalizeOffset = new(() => Schema.GetOffset(0xAD6CE1DC48BC424C), LazyThreadSafetyMode.None); + public ref bool Normalize { - get => ref _Handle.AsRef(Schema.GetOffset(0xAD6CE1DC48BC424C)); + get => ref _Handle.AsRef(_NormalizeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCPtoCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCPtoCPImpl.cs index a1cde4240..9d67c9ea8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCPtoCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCPtoCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class C_OP_RemapCPtoCPImpl : CParticleFunctionPreEmissionImpl, public C_OP_RemapCPtoCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputControlPointOffset = new(() => Schema.GetOffset(0xF7F0A2676A869E3E), LazyThreadSafetyMode.None); + public ref int InputControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xF7F0A2676A869E3E)); + get => ref _Handle.AsRef(_InputControlPointOffset.Value); } + private static readonly Lazy _OutputControlPointOffset = new(() => Schema.GetOffset(0xF7F0A267266B0FD9), LazyThreadSafetyMode.None); + public ref int OutputControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xF7F0A267266B0FD9)); + get => ref _Handle.AsRef(_OutputControlPointOffset.Value); } + private static readonly Lazy _InputFieldOffset = new(() => Schema.GetOffset(0xF7F0A267FB4C1579), LazyThreadSafetyMode.None); + public ref int InputField { - get => ref _Handle.AsRef(Schema.GetOffset(0xF7F0A267FB4C1579)); + get => ref _Handle.AsRef(_InputFieldOffset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0xF7F0A267324F6F74), LazyThreadSafetyMode.None); + public ref int OutputField { - get => ref _Handle.AsRef(Schema.GetOffset(0xF7F0A267324F6F74)); + get => ref _Handle.AsRef(_OutputFieldOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0xF7F0A267E88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xF7F0A267E88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0xF7F0A267D6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xF7F0A267D6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0xF7F0A2675F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xF7F0A2675F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0xF7F0A26751A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xF7F0A26751A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _DerivativeOffset = new(() => Schema.GetOffset(0xF7F0A267D10213C0), LazyThreadSafetyMode.None); + public ref bool Derivative { - get => ref _Handle.AsRef(Schema.GetOffset(0xF7F0A267D10213C0)); + get => ref _Handle.AsRef(_DerivativeOffset.Value); } + private static readonly Lazy _InterpRateOffset = new(() => Schema.GetOffset(0xF7F0A267D3B705A7), LazyThreadSafetyMode.None); + public ref float InterpRate { - get => ref _Handle.AsRef(Schema.GetOffset(0xF7F0A267D3B705A7)); + get => ref _Handle.AsRef(_InterpRateOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCPtoScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCPtoScalarImpl.cs index d6c456f27..2f91015e5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCPtoScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCPtoScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class C_OP_RemapCPtoScalarImpl : CParticleFunctionOperatorImpl, public C_OP_RemapCPtoScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPInputOffset = new(() => Schema.GetOffset(0xD9758CB0FB805736), LazyThreadSafetyMode.None); + public ref int CPInput { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9758CB0FB805736)); + get => ref _Handle.AsRef(_CPInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xD9758CB0E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xD9758CB0E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _FieldOffset = new(() => Schema.GetOffset(0xD9758CB0C257B93B), LazyThreadSafetyMode.None); + public ref int Field { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9758CB0C257B93B)); + get => ref _Handle.AsRef(_FieldOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0xD9758CB0E88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9758CB0E88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0xD9758CB0D6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9758CB0D6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0xD9758CB05F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9758CB05F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0xD9758CB051A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9758CB051A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0xD9758CB067FE9DC4), LazyThreadSafetyMode.None); + public ref float StartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9758CB067FE9DC4)); + get => ref _Handle.AsRef(_StartTimeOffset.Value); } + private static readonly Lazy _EndTimeOffset = new(() => Schema.GetOffset(0xD9758CB02041DF9D), LazyThreadSafetyMode.None); + public ref float EndTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9758CB02041DF9D)); + get => ref _Handle.AsRef(_EndTimeOffset.Value); } + private static readonly Lazy _InterpRateOffset = new(() => Schema.GetOffset(0xD9758CB0D3B705A7), LazyThreadSafetyMode.None); + public ref float InterpRate { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9758CB0D3B705A7)); + get => ref _Handle.AsRef(_InterpRateOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0xD9758CB0FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0xD9758CB0FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCPtoVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCPtoVectorImpl.cs index 72cee3cf6..8b0710495 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCPtoVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCPtoVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,70 @@ internal partial class C_OP_RemapCPtoVectorImpl : CParticleFunctionOperatorImpl, public C_OP_RemapCPtoVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPInputOffset = new(() => Schema.GetOffset(0xA5B6B7CBFB805736), LazyThreadSafetyMode.None); + public ref int CPInput { - get => ref _Handle.AsRef(Schema.GetOffset(0xA5B6B7CBFB805736)); + get => ref _Handle.AsRef(_CPInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xA5B6B7CBE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xA5B6B7CBE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _LocalSpaceCPOffset = new(() => Schema.GetOffset(0xA5B6B7CBC8E9CB31), LazyThreadSafetyMode.None); + public ref int LocalSpaceCP { - get => ref _Handle.AsRef(Schema.GetOffset(0xA5B6B7CBC8E9CB31)); + get => ref _Handle.AsRef(_LocalSpaceCPOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0xA5B6B7CB367FBCC9), LazyThreadSafetyMode.None); + public ref Vector InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xA5B6B7CB367FBCC9)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0xA5B6B7CB286C1F07), LazyThreadSafetyMode.None); + public ref Vector InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xA5B6B7CB286C1F07)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0xA5B6B7CBA04D6C7C), LazyThreadSafetyMode.None); + public ref Vector OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xA5B6B7CBA04D6C7C)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0xA5B6B7CB8E39C86E), LazyThreadSafetyMode.None); + public ref Vector OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xA5B6B7CB8E39C86E)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0xA5B6B7CB67FE9DC4), LazyThreadSafetyMode.None); + public ref float StartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xA5B6B7CB67FE9DC4)); + get => ref _Handle.AsRef(_StartTimeOffset.Value); } + private static readonly Lazy _EndTimeOffset = new(() => Schema.GetOffset(0xA5B6B7CB2041DF9D), LazyThreadSafetyMode.None); + public ref float EndTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xA5B6B7CB2041DF9D)); + get => ref _Handle.AsRef(_EndTimeOffset.Value); } + private static readonly Lazy _InterpRateOffset = new(() => Schema.GetOffset(0xA5B6B7CBD3B705A7), LazyThreadSafetyMode.None); + public ref float InterpRate { - get => ref _Handle.AsRef(Schema.GetOffset(0xA5B6B7CBD3B705A7)); + get => ref _Handle.AsRef(_InterpRateOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0xA5B6B7CBFB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0xA5B6B7CBFB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0xA5B6B7CB17412B2A), LazyThreadSafetyMode.None); + public ref bool Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0xA5B6B7CB17412B2A)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _AccelerateOffset = new(() => Schema.GetOffset(0xA5B6B7CBA9BEFF50), LazyThreadSafetyMode.None); + public ref bool Accelerate { - get => ref _Handle.AsRef(Schema.GetOffset(0xA5B6B7CBA9BEFF50)); + get => ref _Handle.AsRef(_AccelerateOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapControlPointDirectionToVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapControlPointDirectionToVectorImpl.cs index a02496858..d5aea217c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapControlPointDirectionToVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapControlPointDirectionToVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_RemapControlPointDirectionToVectorImpl : CParticleFu public C_OP_RemapControlPointDirectionToVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xB5467A62E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xB5467A62E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0xB5467A62B731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5467A62B731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0xB5467A623F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xB5467A623F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapControlPointOrientationToRotationImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapControlPointOrientationToRotationImpl.cs index 4020a3e52..48c73d1db 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapControlPointOrientationToRotationImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapControlPointOrientationToRotationImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_RemapControlPointOrientationToRotationImpl : CPartic public C_OP_RemapControlPointOrientationToRotationImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPOffset = new(() => Schema.GetOffset(0x2CE44E90EB661472), LazyThreadSafetyMode.None); + public ref int CP { - get => ref _Handle.AsRef(Schema.GetOffset(0x2CE44E90EB661472)); + get => ref _Handle.AsRef(_CPOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x2CE44E90E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x2CE44E90E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _OffsetRotOffset = new(() => Schema.GetOffset(0x2CE44E90B414F849), LazyThreadSafetyMode.None); + public ref float OffsetRot { - get => ref _Handle.AsRef(Schema.GetOffset(0x2CE44E90B414F849)); + get => ref _Handle.AsRef(_OffsetRotOffset.Value); } + private static readonly Lazy _ComponentOffset = new(() => Schema.GetOffset(0x2CE44E90BFD0952C), LazyThreadSafetyMode.None); + public ref int Component { - get => ref _Handle.AsRef(Schema.GetOffset(0x2CE44E90BFD0952C)); + get => ref _Handle.AsRef(_ComponentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCrossProductOfTwoVectorsToVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCrossProductOfTwoVectorsToVectorImpl.cs index 2cd2cd2f0..defb04038 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCrossProductOfTwoVectorsToVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapCrossProductOfTwoVectorsToVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_RemapCrossProductOfTwoVectorsToVectorImpl : CParticl public C_OP_RemapCrossProductOfTwoVectorsToVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputVec1Offset = new(() => Schema.GetOffset(0x4B4531D84584355A), LazyThreadSafetyMode.None); + public CPerParticleVecInput InputVec1 { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x4B4531D84584355A)); + get => new CPerParticleVecInputImpl(_Handle + _InputVec1Offset.Value); } + private static readonly Lazy _InputVec2Offset = new(() => Schema.GetOffset(0x4B4531D8448433C7), LazyThreadSafetyMode.None); + public CPerParticleVecInput InputVec2 { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x4B4531D8448433C7)); + get => new CPerParticleVecInputImpl(_Handle + _InputVec2Offset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x4B4531D8E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x4B4531D8E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _NormalizeOffset = new(() => Schema.GetOffset(0x4B4531D848BC424C), LazyThreadSafetyMode.None); + public ref bool Normalize { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B4531D848BC424C)); + get => ref _Handle.AsRef(_NormalizeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDensityGradientToVectorAttributeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDensityGradientToVectorAttributeImpl.cs index 6c60b4a18..74ebbaa40 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDensityGradientToVectorAttributeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDensityGradientToVectorAttributeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_RemapDensityGradientToVectorAttributeImpl : CParticl public C_OP_RemapDensityGradientToVectorAttributeImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0xB9D06F88A7A20159), LazyThreadSafetyMode.None); + public ref float RadiusScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xB9D06F88A7A20159)); + get => ref _Handle.AsRef(_RadiusScaleOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xB9D06F88E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xB9D06F88E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDensityToVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDensityToVectorImpl.cs index faf1da0bf..21c3439e5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDensityToVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDensityToVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_RemapDensityToVectorImpl : CParticleFunctionOperator public C_OP_RemapDensityToVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0x81794CB4A7A20159), LazyThreadSafetyMode.None); + public ref float RadiusScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x81794CB4A7A20159)); + get => ref _Handle.AsRef(_RadiusScaleOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x81794CB4E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x81794CB4E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _DensityMinOffset = new(() => Schema.GetOffset(0x81794CB4B4D8467B), LazyThreadSafetyMode.None); + public ref float DensityMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x81794CB4B4D8467B)); + get => ref _Handle.AsRef(_DensityMinOffset.Value); } + private static readonly Lazy _DensityMaxOffset = new(() => Schema.GetOffset(0x81794CB4AAC31C05), LazyThreadSafetyMode.None); + public ref float DensityMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x81794CB4AAC31C05)); + get => ref _Handle.AsRef(_DensityMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x81794CB42EFED678), LazyThreadSafetyMode.None); + public ref Vector OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x81794CB42EFED678)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x81794CB4451280D2), LazyThreadSafetyMode.None); + public ref Vector OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x81794CB4451280D2)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _UseParentDensityOffset = new(() => Schema.GetOffset(0x81794CB40FE31F64), LazyThreadSafetyMode.None); + public ref bool UseParentDensity { - get => ref _Handle.AsRef(Schema.GetOffset(0x81794CB40FE31F64)); + get => ref _Handle.AsRef(_UseParentDensityOffset.Value); } + private static readonly Lazy _VoxelGridResolutionOffset = new(() => Schema.GetOffset(0x81794CB45AA7D7ED), LazyThreadSafetyMode.None); + public ref int VoxelGridResolution { - get => ref _Handle.AsRef(Schema.GetOffset(0x81794CB45AA7D7ED)); + get => ref _Handle.AsRef(_VoxelGridResolutionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDirectionToCPToVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDirectionToCPToVectorImpl.cs index 3d328a8ab..d6b7e2a5d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDirectionToCPToVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDirectionToCPToVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_RemapDirectionToCPToVectorImpl : CParticleFunctionOp public C_OP_RemapDirectionToCPToVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPOffset = new(() => Schema.GetOffset(0x80443C5BEB661472), LazyThreadSafetyMode.None); + public ref int CP { - get => ref _Handle.AsRef(Schema.GetOffset(0x80443C5BEB661472)); + get => ref _Handle.AsRef(_CPOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x80443C5BE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x80443C5BE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x80443C5BB731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0x80443C5BB731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _OffsetRotOffset = new(() => Schema.GetOffset(0x80443C5BB414F849), LazyThreadSafetyMode.None); + public ref float OffsetRot { - get => ref _Handle.AsRef(Schema.GetOffset(0x80443C5BB414F849)); + get => ref _Handle.AsRef(_OffsetRotOffset.Value); } + private static readonly Lazy _OffsetAxisOffset = new(() => Schema.GetOffset(0x80443C5BFAB4918F), LazyThreadSafetyMode.None); + public ref Vector OffsetAxis { - get => ref _Handle.AsRef(Schema.GetOffset(0x80443C5BFAB4918F)); + get => ref _Handle.AsRef(_OffsetAxisOffset.Value); } + private static readonly Lazy _NormalizeOffset = new(() => Schema.GetOffset(0x80443C5B48BC424C), LazyThreadSafetyMode.None); + public ref bool Normalize { - get => ref _Handle.AsRef(Schema.GetOffset(0x80443C5B48BC424C)); + get => ref _Handle.AsRef(_NormalizeOffset.Value); } + private static readonly Lazy _FieldStrengthOffset = new(() => Schema.GetOffset(0x80443C5BDBA3663E), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldStrength { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x80443C5BDBA3663E)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldStrengthOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDistanceToLineSegmentBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDistanceToLineSegmentBaseImpl.cs index 1823933f5..0bd53f778 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDistanceToLineSegmentBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDistanceToLineSegmentBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_RemapDistanceToLineSegmentBaseImpl : CParticleFuncti public C_OP_RemapDistanceToLineSegmentBaseImpl(nint handle) : base(handle) { } + private static readonly Lazy _CP0Offset = new(() => Schema.GetOffset(0xD8219F7AD3B1E3E6), LazyThreadSafetyMode.None); + public ref int CP0 { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8219F7AD3B1E3E6)); + get => ref _Handle.AsRef(_CP0Offset.Value); } + private static readonly Lazy _CP1Offset = new(() => Schema.GetOffset(0xD8219F7AD4B1E579), LazyThreadSafetyMode.None); + public ref int CP1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8219F7AD4B1E579)); + get => ref _Handle.AsRef(_CP1Offset.Value); } + private static readonly Lazy _MinInputValueOffset = new(() => Schema.GetOffset(0xD8219F7ABDB4BC64), LazyThreadSafetyMode.None); + public ref float MinInputValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8219F7ABDB4BC64)); + get => ref _Handle.AsRef(_MinInputValueOffset.Value); } + private static readonly Lazy _MaxInputValueOffset = new(() => Schema.GetOffset(0xD8219F7A3EF75C2A), LazyThreadSafetyMode.None); + public ref float MaxInputValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8219F7A3EF75C2A)); + get => ref _Handle.AsRef(_MaxInputValueOffset.Value); } + private static readonly Lazy _InfiniteLineOffset = new(() => Schema.GetOffset(0xD8219F7A9C5BC47F), LazyThreadSafetyMode.None); + public ref bool InfiniteLine { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8219F7A9C5BC47F)); + get => ref _Handle.AsRef(_InfiniteLineOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDistanceToLineSegmentToScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDistanceToLineSegmentToScalarImpl.cs index dfd112fd6..5ba603e85 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDistanceToLineSegmentToScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDistanceToLineSegmentToScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_RemapDistanceToLineSegmentToScalarImpl : C_OP_RemapD public C_OP_RemapDistanceToLineSegmentToScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xF4B67462E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xF4B67462E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _MinOutputValueOffset = new(() => Schema.GetOffset(0xF4B67462F63C7011), LazyThreadSafetyMode.None); + public ref float MinOutputValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xF4B67462F63C7011)); + get => ref _Handle.AsRef(_MinOutputValueOffset.Value); } + private static readonly Lazy _MaxOutputValueOffset = new(() => Schema.GetOffset(0xF4B67462A91B71B3), LazyThreadSafetyMode.None); + public ref float MaxOutputValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xF4B67462A91B71B3)); + get => ref _Handle.AsRef(_MaxOutputValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDistanceToLineSegmentToVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDistanceToLineSegmentToVectorImpl.cs index 94fae0a76..83a541e57 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDistanceToLineSegmentToVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDistanceToLineSegmentToVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_RemapDistanceToLineSegmentToVectorImpl : C_OP_RemapD public C_OP_RemapDistanceToLineSegmentToVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xF88068A9E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xF88068A9E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _MinOutputValueOffset = new(() => Schema.GetOffset(0xF88068A94BF7BCBF), LazyThreadSafetyMode.None); + public ref Vector MinOutputValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xF88068A94BF7BCBF)); + get => ref _Handle.AsRef(_MinOutputValueOffset.Value); } + private static readonly Lazy _MaxOutputValueOffset = new(() => Schema.GetOffset(0xF88068A9A7A69BC5), LazyThreadSafetyMode.None); + public ref Vector MaxOutputValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xF88068A9A7A69BC5)); + get => ref _Handle.AsRef(_MaxOutputValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDotProductToCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDotProductToCPImpl.cs index 2aee51a54..856363cd9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDotProductToCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDotProductToCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_RemapDotProductToCPImpl : CParticleFunctionPreEmissi public C_OP_RemapDotProductToCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputCP1Offset = new(() => Schema.GetOffset(0xDC012AAEA0CCAE3F), LazyThreadSafetyMode.None); + public ref int InputCP1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC012AAEA0CCAE3F)); + get => ref _Handle.AsRef(_InputCP1Offset.Value); } + private static readonly Lazy _InputCP2Offset = new(() => Schema.GetOffset(0xDC012AAEA1CCAFD2), LazyThreadSafetyMode.None); + public ref int InputCP2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC012AAEA1CCAFD2)); + get => ref _Handle.AsRef(_InputCP2Offset.Value); } + private static readonly Lazy _OutputCPOffset = new(() => Schema.GetOffset(0xDC012AAE50DF5703), LazyThreadSafetyMode.None); + public ref int OutputCP { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC012AAE50DF5703)); + get => ref _Handle.AsRef(_OutputCPOffset.Value); } + private static readonly Lazy _OutVectorFieldOffset = new(() => Schema.GetOffset(0xDC012AAEF9041E74), LazyThreadSafetyMode.None); + public ref int OutVectorField { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC012AAEF9041E74)); + get => ref _Handle.AsRef(_OutVectorFieldOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0xDC012AAEE88A0D0F), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput InputMin { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xDC012AAEE88A0D0F)); + get => new CParticleCollectionFloatInputImpl(_Handle + _InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0xDC012AAED6766901), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput InputMax { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xDC012AAED6766901)); + get => new CParticleCollectionFloatInputImpl(_Handle + _InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0xDC012AAE5F8D7716), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput OutputMin { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xDC012AAE5F8D7716)); + get => new CParticleCollectionFloatInputImpl(_Handle + _OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0xDC012AAE51A0E8C4), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput OutputMax { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xDC012AAE51A0E8C4)); + get => new CParticleCollectionFloatInputImpl(_Handle + _OutputMaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDotProductToScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDotProductToScalarImpl.cs index 28d0fc3ea..0845e55b7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDotProductToScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapDotProductToScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class C_OP_RemapDotProductToScalarImpl : CParticleFunctionOpera public C_OP_RemapDotProductToScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputCP1Offset = new(() => Schema.GetOffset(0x56A85935A0CCAE3F), LazyThreadSafetyMode.None); + public ref int InputCP1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x56A85935A0CCAE3F)); + get => ref _Handle.AsRef(_InputCP1Offset.Value); } + private static readonly Lazy _InputCP2Offset = new(() => Schema.GetOffset(0x56A85935A1CCAFD2), LazyThreadSafetyMode.None); + public ref int InputCP2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x56A85935A1CCAFD2)); + get => ref _Handle.AsRef(_InputCP2Offset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x56A85935E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x56A85935E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x56A85935E88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x56A85935E88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x56A85935D6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x56A85935D6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x56A859355F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x56A859355F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x56A8593551A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x56A8593551A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _UseParticleVelocityOffset = new(() => Schema.GetOffset(0x56A85935412A8335), LazyThreadSafetyMode.None); + public ref bool UseParticleVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0x56A85935412A8335)); + get => ref _Handle.AsRef(_UseParticleVelocityOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x56A85935FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x56A85935FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _ActiveRangeOffset = new(() => Schema.GetOffset(0x56A859353FA53B84), LazyThreadSafetyMode.None); + public ref bool ActiveRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x56A859353FA53B84)); + get => ref _Handle.AsRef(_ActiveRangeOffset.Value); } + private static readonly Lazy _UseParticleNormalOffset = new(() => Schema.GetOffset(0x56A859353FBCD9B5), LazyThreadSafetyMode.None); + public ref bool UseParticleNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0x56A859353FBCD9B5)); + get => ref _Handle.AsRef(_UseParticleNormalOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapExternalWindToCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapExternalWindToCPImpl.cs index f3552fc26..5da415a0f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapExternalWindToCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapExternalWindToCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_RemapExternalWindToCPImpl : CParticleFunctionPreEmis public C_OP_RemapExternalWindToCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPOffset = new(() => Schema.GetOffset(0x19366DF9EB661472), LazyThreadSafetyMode.None); + public ref int CP { - get => ref _Handle.AsRef(Schema.GetOffset(0x19366DF9EB661472)); + get => ref _Handle.AsRef(_CPOffset.Value); } + private static readonly Lazy _CPOutputOffset = new(() => Schema.GetOffset(0x19366DF92077C953), LazyThreadSafetyMode.None); + public ref int CPOutput { - get => ref _Handle.AsRef(Schema.GetOffset(0x19366DF92077C953)); + get => ref _Handle.AsRef(_CPOutputOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x19366DF95F596B51), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput Scale { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x19366DF95F596B51)); + get => new CParticleCollectionVecInputImpl(_Handle + _ScaleOffset.Value); } + private static readonly Lazy _SetMagnitudeOffset = new(() => Schema.GetOffset(0x19366DF9B87FB05F), LazyThreadSafetyMode.None); + public ref bool SetMagnitude { - get => ref _Handle.AsRef(Schema.GetOffset(0x19366DF9B87FB05F)); + get => ref _Handle.AsRef(_SetMagnitudeOffset.Value); } + private static readonly Lazy _OutVectorFieldOffset = new(() => Schema.GetOffset(0x19366DF9F9041E74), LazyThreadSafetyMode.None); + public ref int OutVectorField { - get => ref _Handle.AsRef(Schema.GetOffset(0x19366DF9F9041E74)); + get => ref _Handle.AsRef(_OutVectorFieldOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapGravityToVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapGravityToVectorImpl.cs index a5b05f6de..8ced625b0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapGravityToVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapGravityToVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_RemapGravityToVectorImpl : CParticleFunctionOperator public C_OP_RemapGravityToVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _Input1Offset = new(() => Schema.GetOffset(0x3777A3A2E17F27DA), LazyThreadSafetyMode.None); + public CPerParticleVecInput Input1 { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x3777A3A2E17F27DA)); + get => new CPerParticleVecInputImpl(_Handle + _Input1Offset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0x3777A3A2324F6F74), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t OutputField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x3777A3A2324F6F74)); + get => new ParticleAttributeIndex_tImpl(_Handle + _OutputFieldOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x3777A3A2FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x3777A3A2FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _NormalizedOutputOffset = new(() => Schema.GetOffset(0x3777A3A20AA98C55), LazyThreadSafetyMode.None); + public ref bool NormalizedOutput { - get => ref _Handle.AsRef(Schema.GetOffset(0x3777A3A20AA98C55)); + get => ref _Handle.AsRef(_NormalizedOutputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapModelVolumetoCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapModelVolumetoCPImpl.cs index c0aecdf9b..e473d2cec 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapModelVolumetoCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapModelVolumetoCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class C_OP_RemapModelVolumetoCPImpl : CParticleFunctionPreEmiss public C_OP_RemapModelVolumetoCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _BBoxTypeOffset = new(() => Schema.GetOffset(0x5F3AA677780A22F6), LazyThreadSafetyMode.None); + public ref BBoxVolumeType_t BBoxType { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F3AA677780A22F6)); + get => ref _Handle.AsRef(_BBoxTypeOffset.Value); } + private static readonly Lazy _InControlPointNumberOffset = new(() => Schema.GetOffset(0x5F3AA677E7CB99DE), LazyThreadSafetyMode.None); + public ref int InControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F3AA677E7CB99DE)); + get => ref _Handle.AsRef(_InControlPointNumberOffset.Value); } + private static readonly Lazy _OutControlPointNumberOffset = new(() => Schema.GetOffset(0x5F3AA677D021D73F), LazyThreadSafetyMode.None); + public ref int OutControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F3AA677D021D73F)); + get => ref _Handle.AsRef(_OutControlPointNumberOffset.Value); } + private static readonly Lazy _OutControlPointMaxNumberOffset = new(() => Schema.GetOffset(0x5F3AA677420C1A45), LazyThreadSafetyMode.None); + public ref int OutControlPointMaxNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F3AA677420C1A45)); + get => ref _Handle.AsRef(_OutControlPointMaxNumberOffset.Value); } + private static readonly Lazy _FieldOffset = new(() => Schema.GetOffset(0x5F3AA677C257B93B), LazyThreadSafetyMode.None); + public ref int Field { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F3AA677C257B93B)); + get => ref _Handle.AsRef(_FieldOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x5F3AA677E88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F3AA677E88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x5F3AA677D6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F3AA677D6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x5F3AA6775F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F3AA6775F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x5F3AA67751A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F3AA67751A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _BBoxOnlyOffset = new(() => Schema.GetOffset(0x5F3AA67725A324B4), LazyThreadSafetyMode.None); + public ref bool BBoxOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F3AA67725A324B4)); + get => ref _Handle.AsRef(_BBoxOnlyOffset.Value); } + private static readonly Lazy _CubeRootOffset = new(() => Schema.GetOffset(0x5F3AA67717695018), LazyThreadSafetyMode.None); + public ref bool CubeRoot { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F3AA67717695018)); + get => ref _Handle.AsRef(_CubeRootOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelBodyPartEndCapImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelBodyPartEndCapImpl.cs index 4d75f92b6..eaa480f92 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelBodyPartEndCapImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelBodyPartEndCapImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelBodyPartOnceTimedImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelBodyPartOnceTimedImpl.cs index c9a688d91..4bee8d565 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelBodyPartOnceTimedImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelBodyPartOnceTimedImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelElementEndCapImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelElementEndCapImpl.cs index b4a2c2fe1..48ccc29c1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelElementEndCapImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelElementEndCapImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_RemapNamedModelElementEndCapImpl : CParticleFunction public C_OP_RemapNamedModelElementEndCapImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModelOffset = new(() => Schema.GetOffset(0xC434ECD3E100C814), LazyThreadSafetyMode.None); + public ref CStrongHandle Model { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC434ECD3E100C814)); + get => ref _Handle.AsRef>(_ModelOffset.Value); } + private static readonly Lazy _InNamesOffset = new(() => Schema.GetOffset(0xC434ECD3C6BEF30A), LazyThreadSafetyMode.None); + public ref CUtlVector InNames { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC434ECD3C6BEF30A)); + get => ref _Handle.AsRef>(_InNamesOffset.Value); } + private static readonly Lazy _OutNamesOffset = new(() => Schema.GetOffset(0xC434ECD34AEE2CFD), LazyThreadSafetyMode.None); + public ref CUtlVector OutNames { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC434ECD34AEE2CFD)); + get => ref _Handle.AsRef>(_OutNamesOffset.Value); } + private static readonly Lazy _FallbackNamesOffset = new(() => Schema.GetOffset(0xC434ECD35C686169), LazyThreadSafetyMode.None); + public ref CUtlVector FallbackNames { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC434ECD35C686169)); + get => ref _Handle.AsRef>(_FallbackNamesOffset.Value); } + private static readonly Lazy _ModelFromRendererOffset = new(() => Schema.GetOffset(0xC434ECD3AEBA1F25), LazyThreadSafetyMode.None); + public ref bool ModelFromRenderer { - get => ref _Handle.AsRef(Schema.GetOffset(0xC434ECD3AEBA1F25)); + get => ref _Handle.AsRef(_ModelFromRendererOffset.Value); } + private static readonly Lazy _FieldInputOffset = new(() => Schema.GetOffset(0xC434ECD3AE775669), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xC434ECD3AE775669)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xC434ECD3E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xC434ECD3E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelElementOnceTimedImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelElementOnceTimedImpl.cs index a52d6894c..35ae3c15d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelElementOnceTimedImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelElementOnceTimedImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class C_OP_RemapNamedModelElementOnceTimedImpl : CParticleFunct public C_OP_RemapNamedModelElementOnceTimedImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModelOffset = new(() => Schema.GetOffset(0xBD6F6D8CE100C814), LazyThreadSafetyMode.None); + public ref CStrongHandle Model { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBD6F6D8CE100C814)); + get => ref _Handle.AsRef>(_ModelOffset.Value); } + private static readonly Lazy _InNamesOffset = new(() => Schema.GetOffset(0xBD6F6D8CC6BEF30A), LazyThreadSafetyMode.None); + public ref CUtlVector InNames { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBD6F6D8CC6BEF30A)); + get => ref _Handle.AsRef>(_InNamesOffset.Value); } + private static readonly Lazy _OutNamesOffset = new(() => Schema.GetOffset(0xBD6F6D8C4AEE2CFD), LazyThreadSafetyMode.None); + public ref CUtlVector OutNames { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBD6F6D8C4AEE2CFD)); + get => ref _Handle.AsRef>(_OutNamesOffset.Value); } + private static readonly Lazy _FallbackNamesOffset = new(() => Schema.GetOffset(0xBD6F6D8C5C686169), LazyThreadSafetyMode.None); + public ref CUtlVector FallbackNames { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBD6F6D8C5C686169)); + get => ref _Handle.AsRef>(_FallbackNamesOffset.Value); } + private static readonly Lazy _ModelFromRendererOffset = new(() => Schema.GetOffset(0xBD6F6D8CAEBA1F25), LazyThreadSafetyMode.None); + public ref bool ModelFromRenderer { - get => ref _Handle.AsRef(Schema.GetOffset(0xBD6F6D8CAEBA1F25)); + get => ref _Handle.AsRef(_ModelFromRendererOffset.Value); } + private static readonly Lazy _ProportionalOffset = new(() => Schema.GetOffset(0xBD6F6D8C891F328A), LazyThreadSafetyMode.None); + public ref bool Proportional { - get => ref _Handle.AsRef(Schema.GetOffset(0xBD6F6D8C891F328A)); + get => ref _Handle.AsRef(_ProportionalOffset.Value); } + private static readonly Lazy _FieldInputOffset = new(() => Schema.GetOffset(0xBD6F6D8CAE775669), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xBD6F6D8CAE775669)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xBD6F6D8CE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xBD6F6D8CE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _RemapTimeOffset = new(() => Schema.GetOffset(0xBD6F6D8CF436AC39), LazyThreadSafetyMode.None); + public ref float RemapTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xBD6F6D8CF436AC39)); + get => ref _Handle.AsRef(_RemapTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelMeshGroupEndCapImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelMeshGroupEndCapImpl.cs index b5a662a8f..f28e02f54 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelMeshGroupEndCapImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelMeshGroupEndCapImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelMeshGroupOnceTimedImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelMeshGroupOnceTimedImpl.cs index 36eaff1c7..a3a488232 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelMeshGroupOnceTimedImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelMeshGroupOnceTimedImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelSequenceEndCapImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelSequenceEndCapImpl.cs index 447428699..5ff3c8c25 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelSequenceEndCapImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelSequenceEndCapImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelSequenceOnceTimedImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelSequenceOnceTimedImpl.cs index 900b3da60..27e6f57fe 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelSequenceOnceTimedImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapNamedModelSequenceOnceTimedImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapParticleCountOnScalarEndCapImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapParticleCountOnScalarEndCapImpl.cs index 63e4daae4..2145fdde9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapParticleCountOnScalarEndCapImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapParticleCountOnScalarEndCapImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_RemapParticleCountOnScalarEndCapImpl : CParticleFunc public C_OP_RemapParticleCountOnScalarEndCapImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xA36B6C9DE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xA36B6C9DE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0xA36B6C9D85E92181), LazyThreadSafetyMode.None); + public ref int InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xA36B6C9D85E92181)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0xA36B6C9D77FE262F), LazyThreadSafetyMode.None); + public ref int InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xA36B6C9D77FE262F)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0xA36B6C9D5F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xA36B6C9D5F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0xA36B6C9D51A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xA36B6C9D51A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _BackwardsOffset = new(() => Schema.GetOffset(0xA36B6C9D3EE875F5), LazyThreadSafetyMode.None); + public ref bool Backwards { - get => ref _Handle.AsRef(Schema.GetOffset(0xA36B6C9D3EE875F5)); + get => ref _Handle.AsRef(_BackwardsOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0xA36B6C9DFB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0xA36B6C9DFB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapParticleCountToScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapParticleCountToScalarImpl.cs index ca1a05b62..f210a4371 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapParticleCountToScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapParticleCountToScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_RemapParticleCountToScalarImpl : CParticleFunctionOp public C_OP_RemapParticleCountToScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x4DE6C52E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x4DE6C52E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x4DE6C5285E92181), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput InputMin { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x4DE6C5285E92181)); + get => new CParticleCollectionFloatInputImpl(_Handle + _InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x4DE6C5277FE262F), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput InputMax { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x4DE6C5277FE262F)); + get => new CParticleCollectionFloatInputImpl(_Handle + _InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x4DE6C525F8D7716), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput OutputMin { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x4DE6C525F8D7716)); + get => new CParticleCollectionFloatInputImpl(_Handle + _OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x4DE6C5251A0E8C4), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput OutputMax { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x4DE6C5251A0E8C4)); + get => new CParticleCollectionFloatInputImpl(_Handle + _OutputMaxOffset.Value); } + private static readonly Lazy _ActiveRangeOffset = new(() => Schema.GetOffset(0x4DE6C523FA53B84), LazyThreadSafetyMode.None); + public ref bool ActiveRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x4DE6C523FA53B84)); + get => ref _Handle.AsRef(_ActiveRangeOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x4DE6C52FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x4DE6C52FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapScalarEndCapImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapScalarEndCapImpl.cs index 2479ead23..870bdb265 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapScalarEndCapImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapScalarEndCapImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_RemapScalarEndCapImpl : CParticleFunctionOperatorImp public C_OP_RemapScalarEndCapImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldInputOffset = new(() => Schema.GetOffset(0x73A6F7F1AE775669), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x73A6F7F1AE775669)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x73A6F7F1E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x73A6F7F1E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x73A6F7F1E88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x73A6F7F1E88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x73A6F7F1D6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x73A6F7F1D6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x73A6F7F15F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x73A6F7F15F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x73A6F7F151A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x73A6F7F151A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapScalarImpl.cs index f4ce290f5..1e8a60119 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_RemapScalarImpl : CParticleFunctionOperatorImpl, C_O public C_OP_RemapScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldInputOffset = new(() => Schema.GetOffset(0x580A448EAE775669), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x580A448EAE775669)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x580A448EE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x580A448EE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x580A448EE88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x580A448EE88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x580A448ED6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x580A448ED6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x580A448E5F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x580A448E5F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x580A448E51A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x580A448E51A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _OldCodeOffset = new(() => Schema.GetOffset(0x580A448EFB4CA66B), LazyThreadSafetyMode.None); + public ref bool OldCode { - get => ref _Handle.AsRef(Schema.GetOffset(0x580A448EFB4CA66B)); + get => ref _Handle.AsRef(_OldCodeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapScalarOnceTimedImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapScalarOnceTimedImpl.cs index f987f34da..e30b46b59 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapScalarOnceTimedImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapScalarOnceTimedImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_RemapScalarOnceTimedImpl : CParticleFunctionOperator public C_OP_RemapScalarOnceTimedImpl(nint handle) : base(handle) { } + private static readonly Lazy _ProportionalOffset = new(() => Schema.GetOffset(0xF5150932891F328A), LazyThreadSafetyMode.None); + public ref bool Proportional { - get => ref _Handle.AsRef(Schema.GetOffset(0xF5150932891F328A)); + get => ref _Handle.AsRef(_ProportionalOffset.Value); } + private static readonly Lazy _FieldInputOffset = new(() => Schema.GetOffset(0xF5150932AE775669), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xF5150932AE775669)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xF5150932E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xF5150932E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0xF5150932E88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xF5150932E88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0xF5150932D6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xF5150932D6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0xF51509325F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xF51509325F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0xF515093251A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xF515093251A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _RemapTimeOffset = new(() => Schema.GetOffset(0xF5150932F436AC39), LazyThreadSafetyMode.None); + public ref float RemapTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xF5150932F436AC39)); + get => ref _Handle.AsRef(_RemapTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapSpeedImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapSpeedImpl.cs index 1a56c031d..d73a3b9bd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapSpeedImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapSpeedImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_RemapSpeedImpl : CParticleFunctionOperatorImpl, C_OP public C_OP_RemapSpeedImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x2DB522A9E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x2DB522A9E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x2DB522A9E88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x2DB522A9E88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x2DB522A9D6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x2DB522A9D6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x2DB522A95F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x2DB522A95F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x2DB522A951A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x2DB522A951A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x2DB522A9FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x2DB522A9FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _IgnoreDeltaOffset = new(() => Schema.GetOffset(0x2DB522A9A944B263), LazyThreadSafetyMode.None); + public ref bool IgnoreDelta { - get => ref _Handle.AsRef(Schema.GetOffset(0x2DB522A9A944B263)); + get => ref _Handle.AsRef(_IgnoreDeltaOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapSpeedtoCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapSpeedtoCPImpl.cs index 84be7933f..7ff2f453a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapSpeedtoCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapSpeedtoCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_RemapSpeedtoCPImpl : CParticleFunctionPreEmissionImp public C_OP_RemapSpeedtoCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _InControlPointNumberOffset = new(() => Schema.GetOffset(0x15A0E8C3E7CB99DE), LazyThreadSafetyMode.None); + public ref int InControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x15A0E8C3E7CB99DE)); + get => ref _Handle.AsRef(_InControlPointNumberOffset.Value); } + private static readonly Lazy _OutControlPointNumberOffset = new(() => Schema.GetOffset(0x15A0E8C3D021D73F), LazyThreadSafetyMode.None); + public ref int OutControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x15A0E8C3D021D73F)); + get => ref _Handle.AsRef(_OutControlPointNumberOffset.Value); } + private static readonly Lazy _FieldOffset = new(() => Schema.GetOffset(0x15A0E8C3C257B93B), LazyThreadSafetyMode.None); + public ref int Field { - get => ref _Handle.AsRef(Schema.GetOffset(0x15A0E8C3C257B93B)); + get => ref _Handle.AsRef(_FieldOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x15A0E8C3E88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x15A0E8C3E88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x15A0E8C3D6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x15A0E8C3D6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x15A0E8C35F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x15A0E8C35F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x15A0E8C351A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x15A0E8C351A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _UseDeltaVOffset = new(() => Schema.GetOffset(0x15A0E8C389609F7C), LazyThreadSafetyMode.None); + public ref bool UseDeltaV { - get => ref _Handle.AsRef(Schema.GetOffset(0x15A0E8C389609F7C)); + get => ref _Handle.AsRef(_UseDeltaVOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformOrientationToRotationsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformOrientationToRotationsImpl.cs index 97c100d77..5a213b26a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformOrientationToRotationsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformOrientationToRotationsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_RemapTransformOrientationToRotationsImpl : CParticle public C_OP_RemapTransformOrientationToRotationsImpl(nint handle) : base(handle) { } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0x73EBC1F8B3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x73EBC1F8B3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _RotationOffset = new(() => Schema.GetOffset(0x73EBC1F81992E6BF), LazyThreadSafetyMode.None); + public ref Vector Rotation { - get => ref _Handle.AsRef(Schema.GetOffset(0x73EBC1F81992E6BF)); + get => ref _Handle.AsRef(_RotationOffset.Value); } + private static readonly Lazy _UseQuatOffset = new(() => Schema.GetOffset(0x73EBC1F843F0D4DB), LazyThreadSafetyMode.None); + public ref bool UseQuat { - get => ref _Handle.AsRef(Schema.GetOffset(0x73EBC1F843F0D4DB)); + get => ref _Handle.AsRef(_UseQuatOffset.Value); } + private static readonly Lazy _WriteNormalOffset = new(() => Schema.GetOffset(0x73EBC1F8C2EF44FF), LazyThreadSafetyMode.None); + public ref bool WriteNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0x73EBC1F8C2EF44FF)); + get => ref _Handle.AsRef(_WriteNormalOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformOrientationToYawImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformOrientationToYawImpl.cs index 20426e7e0..7ed8315d2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformOrientationToYawImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformOrientationToYawImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_RemapTransformOrientationToYawImpl : CParticleFuncti public C_OP_RemapTransformOrientationToYawImpl(nint handle) : base(handle) { } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0xA0DF014CB3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0xA0DF014CB3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xA0DF014CE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xA0DF014CE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _RotOffsetOffset = new(() => Schema.GetOffset(0xA0DF014CD1EA9CDF), LazyThreadSafetyMode.None); + public ref float RotOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xA0DF014CD1EA9CDF)); + get => ref _Handle.AsRef(_RotOffsetOffset.Value); } + private static readonly Lazy _SpinStrengthOffset = new(() => Schema.GetOffset(0xA0DF014C12520F26), LazyThreadSafetyMode.None); + public ref float SpinStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0xA0DF014C12520F26)); + get => ref _Handle.AsRef(_SpinStrengthOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformToVelocityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformToVelocityImpl.cs index fad001700..b924c85c1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformToVelocityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformToVelocityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_OP_RemapTransformToVelocityImpl : CParticleFunctionOper public C_OP_RemapTransformToVelocityImpl(nint handle) : base(handle) { } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0xC1A2CC64B3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0xC1A2CC64B3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformVisibilityToScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformVisibilityToScalarImpl.cs index 5d79ff597..d2f4cfc59 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformVisibilityToScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformVisibilityToScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_RemapTransformVisibilityToScalarImpl : CParticleFunc public C_OP_RemapTransformVisibilityToScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x3CE3C8AFFB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x3CE3C8AFFB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0x3CE3C8AFB3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x3CE3C8AFB3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x3CE3C8AFE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x3CE3C8AFE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x3CE3C8AFE88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x3CE3C8AFE88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x3CE3C8AFD6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x3CE3C8AFD6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x3CE3C8AF5F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x3CE3C8AF5F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x3CE3C8AF51A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x3CE3C8AF51A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x3CE3C8AF5ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x3CE3C8AF5ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformVisibilityToVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformVisibilityToVectorImpl.cs index c6bb0ba3b..a9749bad7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformVisibilityToVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapTransformVisibilityToVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_RemapTransformVisibilityToVectorImpl : CParticleFunc public C_OP_RemapTransformVisibilityToVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x3F1181A0FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F1181A0FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0x3F1181A0B3FDC289), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x3F1181A0B3FDC289)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x3F1181A0E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x3F1181A0E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x3F1181A0E88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F1181A0E88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x3F1181A0D6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F1181A0D6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x3F1181A02EFED678), LazyThreadSafetyMode.None); + public ref Vector OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F1181A02EFED678)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x3F1181A0451280D2), LazyThreadSafetyMode.None); + public ref Vector OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F1181A0451280D2)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x3F1181A05ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F1181A05ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapVectorComponentToScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapVectorComponentToScalarImpl.cs index 5b75ddf89..a3aa5fd0e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapVectorComponentToScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapVectorComponentToScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_RemapVectorComponentToScalarImpl : CParticleFunction public C_OP_RemapVectorComponentToScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldInputOffset = new(() => Schema.GetOffset(0x39413771AE775669), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x39413771AE775669)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x39413771E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x39413771E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _ComponentOffset = new(() => Schema.GetOffset(0x39413771BFD0952C), LazyThreadSafetyMode.None); + public ref int Component { - get => ref _Handle.AsRef(Schema.GetOffset(0x39413771BFD0952C)); + get => ref _Handle.AsRef(_ComponentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapVectortoCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapVectortoCPImpl.cs index 0530a05e1..1a2d72520 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapVectortoCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapVectortoCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_RemapVectortoCPImpl : CParticleFunctionOperatorImpl, public C_OP_RemapVectortoCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _OutControlPointNumberOffset = new(() => Schema.GetOffset(0xADC661D7D021D73F), LazyThreadSafetyMode.None); + public ref int OutControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xADC661D7D021D73F)); + get => ref _Handle.AsRef(_OutControlPointNumberOffset.Value); } + private static readonly Lazy _FieldInputOffset = new(() => Schema.GetOffset(0xADC661D7AE775669), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xADC661D7AE775669)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputOffset.Value); } + private static readonly Lazy _ParticleNumberOffset = new(() => Schema.GetOffset(0xADC661D712F26402), LazyThreadSafetyMode.None); + public ref int ParticleNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xADC661D712F26402)); + get => ref _Handle.AsRef(_ParticleNumberOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapVelocityToVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapVelocityToVectorImpl.cs index f145438f7..ab446190e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapVelocityToVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapVelocityToVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_RemapVelocityToVectorImpl : CParticleFunctionOperato public C_OP_RemapVelocityToVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x3985F683E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x3985F683E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x3985F683B731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0x3985F683B731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _NormalizeOffset = new(() => Schema.GetOffset(0x3985F68348BC424C), LazyThreadSafetyMode.None); + public ref bool Normalize { - get => ref _Handle.AsRef(Schema.GetOffset(0x3985F68348BC424C)); + get => ref _Handle.AsRef(_NormalizeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapVisibilityScalarImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapVisibilityScalarImpl.cs index 2b0ef5af0..f9f2180a2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapVisibilityScalarImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RemapVisibilityScalarImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_RemapVisibilityScalarImpl : CParticleFunctionOperato public C_OP_RemapVisibilityScalarImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldInputOffset = new(() => Schema.GetOffset(0x2215F0FEAE775669), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldInput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x2215F0FEAE775669)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x2215F0FEE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x2215F0FEE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x2215F0FEE88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x2215F0FEE88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x2215F0FED6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x2215F0FED6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x2215F0FE5F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x2215F0FE5F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x2215F0FE51A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x2215F0FE51A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0x2215F0FEA7A20159), LazyThreadSafetyMode.None); + public ref float RadiusScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x2215F0FEA7A20159)); + get => ref _Handle.AsRef(_RadiusScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderAsModelsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderAsModelsImpl.cs index 32db92c47..390b01d2b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderAsModelsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderAsModelsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_RenderAsModelsImpl : CParticleFunctionRendererImpl, public C_OP_RenderAsModelsImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModelListOffset = new(() => Schema.GetOffset(0x634E6CCB05FC11B6), LazyThreadSafetyMode.None); + public ref CUtlVector ModelList { - get => ref _Handle.AsRef>(Schema.GetOffset(0x634E6CCB05FC11B6)); + get => ref _Handle.AsRef>(_ModelListOffset.Value); } + private static readonly Lazy _ModelScaleOffset = new(() => Schema.GetOffset(0x634E6CCBD28B2146), LazyThreadSafetyMode.None); + public ref float ModelScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x634E6CCBD28B2146)); + get => ref _Handle.AsRef(_ModelScaleOffset.Value); } + private static readonly Lazy _FitToModelSizeOffset = new(() => Schema.GetOffset(0x634E6CCBF444BB23), LazyThreadSafetyMode.None); + public ref bool FitToModelSize { - get => ref _Handle.AsRef(Schema.GetOffset(0x634E6CCBF444BB23)); + get => ref _Handle.AsRef(_FitToModelSizeOffset.Value); } + private static readonly Lazy _NonUniformScalingOffset = new(() => Schema.GetOffset(0x634E6CCBC2ADF0D9), LazyThreadSafetyMode.None); + public ref bool NonUniformScaling { - get => ref _Handle.AsRef(Schema.GetOffset(0x634E6CCBC2ADF0D9)); + get => ref _Handle.AsRef(_NonUniformScalingOffset.Value); } + private static readonly Lazy _XAxisScalingAttributeOffset = new(() => Schema.GetOffset(0x634E6CCB0E363ADD), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t XAxisScalingAttribute { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x634E6CCB0E363ADD)); + get => new ParticleAttributeIndex_tImpl(_Handle + _XAxisScalingAttributeOffset.Value); } + private static readonly Lazy _YAxisScalingAttributeOffset = new(() => Schema.GetOffset(0x634E6CCBC293ED92), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t YAxisScalingAttribute { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x634E6CCBC293ED92)); + get => new ParticleAttributeIndex_tImpl(_Handle + _YAxisScalingAttributeOffset.Value); } + private static readonly Lazy _ZAxisScalingAttributeOffset = new(() => Schema.GetOffset(0x634E6CCBC34C4EDF), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t ZAxisScalingAttribute { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x634E6CCBC34C4EDF)); + get => new ParticleAttributeIndex_tImpl(_Handle + _ZAxisScalingAttributeOffset.Value); } + private static readonly Lazy _SizeCullBloatOffset = new(() => Schema.GetOffset(0x634E6CCB5EB61122), LazyThreadSafetyMode.None); + public ref int SizeCullBloat { - get => ref _Handle.AsRef(Schema.GetOffset(0x634E6CCB5EB61122)); + get => ref _Handle.AsRef(_SizeCullBloatOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderBlobsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderBlobsImpl.cs index 8f7cb967f..1258c4050 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderBlobsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderBlobsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_RenderBlobsImpl : CParticleFunctionRendererImpl, C_O public C_OP_RenderBlobsImpl(nint handle) : base(handle) { } + private static readonly Lazy _CubeWidthOffset = new(() => Schema.GetOffset(0xB25239A3E172FDCC), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput CubeWidth { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xB25239A3E172FDCC)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _CubeWidthOffset.Value); } + private static readonly Lazy _CutoffRadiusOffset = new(() => Schema.GetOffset(0xB25239A33B9D5B46), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput CutoffRadius { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xB25239A33B9D5B46)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _CutoffRadiusOffset.Value); } + private static readonly Lazy _RenderRadiusOffset = new(() => Schema.GetOffset(0xB25239A35157484B), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput RenderRadius { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xB25239A35157484B)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _RenderRadiusOffset.Value); } + private static readonly Lazy _VertexCountKbOffset = new(() => Schema.GetOffset(0xB25239A36064907B), LazyThreadSafetyMode.None); + public ref uint VertexCountKb { - get => ref _Handle.AsRef(Schema.GetOffset(0xB25239A36064907B)); + get => ref _Handle.AsRef(_VertexCountKbOffset.Value); } + private static readonly Lazy _IndexCountKbOffset = new(() => Schema.GetOffset(0xB25239A36CDECFF7), LazyThreadSafetyMode.None); + public ref uint IndexCountKb { - get => ref _Handle.AsRef(Schema.GetOffset(0xB25239A36CDECFF7)); + get => ref _Handle.AsRef(_IndexCountKbOffset.Value); } + private static readonly Lazy _ScaleCPOffset = new(() => Schema.GetOffset(0xB25239A3DE3CC5E6), LazyThreadSafetyMode.None); + public ref int ScaleCP { - get => ref _Handle.AsRef(Schema.GetOffset(0xB25239A3DE3CC5E6)); + get => ref _Handle.AsRef(_ScaleCPOffset.Value); } + private static readonly Lazy _MaterialVarsOffset = new(() => Schema.GetOffset(0xB25239A3FA861D66), LazyThreadSafetyMode.None); + public ref CUtlVector MaterialVars { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB25239A3FA861D66)); + get => ref _Handle.AsRef>(_MaterialVarsOffset.Value); } + private static readonly Lazy _MaterialOffset = new(() => Schema.GetOffset(0xB25239A3888CE42E), LazyThreadSafetyMode.None); + public ref CStrongHandle Material { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB25239A3888CE42E)); + get => ref _Handle.AsRef>(_MaterialOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderCablesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderCablesImpl.cs index 3c56d03f5..928ec6ce5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderCablesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderCablesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,74 +17,120 @@ internal partial class C_OP_RenderCablesImpl : CParticleFunctionRendererImpl, C_ public C_OP_RenderCablesImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0x16498877A7A20159), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput RadiusScale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x16498877A7A20159)); + get => new CParticleCollectionFloatInputImpl(_Handle + _RadiusScaleOffset.Value); } + private static readonly Lazy _AlphaScaleOffset = new(() => Schema.GetOffset(0x16498877EC6D3C25), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput AlphaScale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x16498877EC6D3C25)); + get => new CParticleCollectionFloatInputImpl(_Handle + _AlphaScaleOffset.Value); } + private static readonly Lazy _ColorScaleOffset = new(() => Schema.GetOffset(0x164988779F9BB8BA), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput ColorScale { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x164988779F9BB8BA)); + get => new CParticleCollectionVecInputImpl(_Handle + _ColorScaleOffset.Value); } + private static readonly Lazy _ColorBlendTypeOffset = new(() => Schema.GetOffset(0x16498877DBC6EFCF), LazyThreadSafetyMode.None); + public ref ParticleColorBlendType_t ColorBlendType { - get => ref _Handle.AsRef(Schema.GetOffset(0x16498877DBC6EFCF)); + get => ref _Handle.AsRef(_ColorBlendTypeOffset.Value); } + private static readonly Lazy _MaterialOffset = new(() => Schema.GetOffset(0x16498877888CE42E), LazyThreadSafetyMode.None); + public ref CStrongHandle Material { - get => ref _Handle.AsRef>(Schema.GetOffset(0x16498877888CE42E)); + get => ref _Handle.AsRef>(_MaterialOffset.Value); } + private static readonly Lazy _TextureRepetitionModeOffset = new(() => Schema.GetOffset(0x164988777CB37DBC), LazyThreadSafetyMode.None); + public ref TextureRepetitionMode_t TextureRepetitionMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x164988777CB37DBC)); + get => ref _Handle.AsRef(_TextureRepetitionModeOffset.Value); } + private static readonly Lazy _TextureRepeatsPerSegmentOffset = new(() => Schema.GetOffset(0x164988774C265576), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput TextureRepeatsPerSegment { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x164988774C265576)); + get => new CParticleCollectionFloatInputImpl(_Handle + _TextureRepeatsPerSegmentOffset.Value); } + private static readonly Lazy _TextureRepeatsCircumferenceOffset = new(() => Schema.GetOffset(0x1649887730DF1DF3), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput TextureRepeatsCircumference { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x1649887730DF1DF3)); + get => new CParticleCollectionFloatInputImpl(_Handle + _TextureRepeatsCircumferenceOffset.Value); } + private static readonly Lazy _ColorMapOffsetVOffset = new(() => Schema.GetOffset(0x164988773012E667), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ColorMapOffsetV { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x164988773012E667)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ColorMapOffsetVOffset.Value); } + private static readonly Lazy _ColorMapOffsetUOffset = new(() => Schema.GetOffset(0x164988773112E7FA), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ColorMapOffsetU { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x164988773112E7FA)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ColorMapOffsetUOffset.Value); } + private static readonly Lazy _NormalMapOffsetVOffset = new(() => Schema.GetOffset(0x164988775228495D), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput NormalMapOffsetV { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x164988775228495D)); + get => new CParticleCollectionFloatInputImpl(_Handle + _NormalMapOffsetVOffset.Value); } + private static readonly Lazy _NormalMapOffsetUOffset = new(() => Schema.GetOffset(0x164988774F2844A4), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput NormalMapOffsetU { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x164988774F2844A4)); + get => new CParticleCollectionFloatInputImpl(_Handle + _NormalMapOffsetUOffset.Value); } + private static readonly Lazy _DrawCableCapsOffset = new(() => Schema.GetOffset(0x164988773CBBA5F9), LazyThreadSafetyMode.None); + public ref bool DrawCableCaps { - get => ref _Handle.AsRef(Schema.GetOffset(0x164988773CBBA5F9)); + get => ref _Handle.AsRef(_DrawCableCapsOffset.Value); } + private static readonly Lazy _CapRoundnessOffset = new(() => Schema.GetOffset(0x164988775B126564), LazyThreadSafetyMode.None); + public ref float CapRoundness { - get => ref _Handle.AsRef(Schema.GetOffset(0x164988775B126564)); + get => ref _Handle.AsRef(_CapRoundnessOffset.Value); } + private static readonly Lazy _CapOffsetAmountOffset = new(() => Schema.GetOffset(0x1649887729E8FA5E), LazyThreadSafetyMode.None); + public ref float CapOffsetAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0x1649887729E8FA5E)); + get => ref _Handle.AsRef(_CapOffsetAmountOffset.Value); } + private static readonly Lazy _TessScaleOffset = new(() => Schema.GetOffset(0x16498877EE9C9570), LazyThreadSafetyMode.None); + public ref float TessScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x16498877EE9C9570)); + get => ref _Handle.AsRef(_TessScaleOffset.Value); } + private static readonly Lazy _MinTesselationOffset = new(() => Schema.GetOffset(0x16498877ECCEE8B4), LazyThreadSafetyMode.None); + public ref int MinTesselation { - get => ref _Handle.AsRef(Schema.GetOffset(0x16498877ECCEE8B4)); + get => ref _Handle.AsRef(_MinTesselationOffset.Value); } + private static readonly Lazy _MaxTesselationOffset = new(() => Schema.GetOffset(0x16498877B609C442), LazyThreadSafetyMode.None); + public ref int MaxTesselation { - get => ref _Handle.AsRef(Schema.GetOffset(0x16498877B609C442)); + get => ref _Handle.AsRef(_MaxTesselationOffset.Value); } + private static readonly Lazy _RoundnessOffset = new(() => Schema.GetOffset(0x1649887761078EC0), LazyThreadSafetyMode.None); + public ref int Roundness { - get => ref _Handle.AsRef(Schema.GetOffset(0x1649887761078EC0)); + get => ref _Handle.AsRef(_RoundnessOffset.Value); } + private static readonly Lazy _ForceRoundnessFixedOffset = new(() => Schema.GetOffset(0x16498877D74D29BF), LazyThreadSafetyMode.None); + public ref bool ForceRoundnessFixed { - get => ref _Handle.AsRef(Schema.GetOffset(0x16498877D74D29BF)); + get => ref _Handle.AsRef(_ForceRoundnessFixedOffset.Value); } + private static readonly Lazy _LightingTransformOffset = new(() => Schema.GetOffset(0x164988776557F58F), LazyThreadSafetyMode.None); + public CParticleTransformInput LightingTransform { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x164988776557F58F)); + get => new CParticleTransformInputImpl(_Handle + _LightingTransformOffset.Value); } + private static readonly Lazy _MaterialFloatVarsOffset = new(() => Schema.GetOffset(0x164988777A7B4D6C), LazyThreadSafetyMode.None); + public ref CUtlLeanVector MaterialFloatVars { - get => ref _Handle.AsRef>(Schema.GetOffset(0x164988777A7B4D6C)); + get => ref _Handle.AsRef>(_MaterialFloatVarsOffset.Value); } + private static readonly Lazy _MaterialVecVarsOffset = new(() => Schema.GetOffset(0x16498877E670B944), LazyThreadSafetyMode.None); + public ref CUtlLeanVector MaterialVecVars { - get => ref _Handle.AsRef>(Schema.GetOffset(0x16498877E670B944)); + get => ref _Handle.AsRef>(_MaterialVecVarsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderClientPhysicsImpulseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderClientPhysicsImpulseImpl.cs index 978e0af23..530ccc16e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderClientPhysicsImpulseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderClientPhysicsImpulseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_RenderClientPhysicsImpulseImpl : CParticleFunctionRe public C_OP_RenderClientPhysicsImpulseImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x618F365ACFC08D), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Radius { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x618F365ACFC08D)); + get => new CPerParticleFloatInputImpl(_Handle + _RadiusOffset.Value); } + private static readonly Lazy _MagnitudeOffset = new(() => Schema.GetOffset(0x618F36ED0A1D8B), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Magnitude { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x618F36ED0A1D8B)); + get => new CPerParticleFloatInputImpl(_Handle + _MagnitudeOffset.Value); } + private static readonly Lazy _SimIdFilterOffset = new(() => Schema.GetOffset(0x618F36C5FA023F), LazyThreadSafetyMode.None); + public ref int SimIdFilter { - get => ref _Handle.AsRef(Schema.GetOffset(0x618F36C5FA023F)); + get => ref _Handle.AsRef(_SimIdFilterOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderClothForceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderClothForceImpl.cs index f7bcb6d0f..c8031101b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderClothForceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderClothForceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderDeferredLightImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderDeferredLightImpl.cs index 3162c3d3a..ac3c950be 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderDeferredLightImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderDeferredLightImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,53 +17,85 @@ internal partial class C_OP_RenderDeferredLightImpl : CParticleFunctionRendererI public C_OP_RenderDeferredLightImpl(nint handle) : base(handle) { } + private static readonly Lazy _UseAlphaTestWindowOffset = new(() => Schema.GetOffset(0x44291266951B0D10), LazyThreadSafetyMode.None); + public ref bool UseAlphaTestWindow { - get => ref _Handle.AsRef(Schema.GetOffset(0x44291266951B0D10)); + get => ref _Handle.AsRef(_UseAlphaTestWindowOffset.Value); } + private static readonly Lazy _UseTextureOffset = new(() => Schema.GetOffset(0x4429126624A2D28F), LazyThreadSafetyMode.None); + public ref bool UseTexture { - get => ref _Handle.AsRef(Schema.GetOffset(0x4429126624A2D28F)); + get => ref _Handle.AsRef(_UseTextureOffset.Value); } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0x44291266A7A20159), LazyThreadSafetyMode.None); + public ref float RadiusScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x44291266A7A20159)); + get => ref _Handle.AsRef(_RadiusScaleOffset.Value); } + private static readonly Lazy _AlphaScaleOffset = new(() => Schema.GetOffset(0x44291266EC6D3C25), LazyThreadSafetyMode.None); + public ref float AlphaScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x44291266EC6D3C25)); + get => ref _Handle.AsRef(_AlphaScaleOffset.Value); } + private static readonly Lazy _Alpha2FieldOffset = new(() => Schema.GetOffset(0x44291266F60EADC1), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t Alpha2Field { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x44291266F60EADC1)); + get => new ParticleAttributeIndex_tImpl(_Handle + _Alpha2FieldOffset.Value); } + private static readonly Lazy _ColorScaleOffset = new(() => Schema.GetOffset(0x442912669F9BB8BA), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput ColorScale { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x442912669F9BB8BA)); + get => new CParticleCollectionVecInputImpl(_Handle + _ColorScaleOffset.Value); } + private static readonly Lazy _ColorBlendTypeOffset = new(() => Schema.GetOffset(0x44291266DBC6EFCF), LazyThreadSafetyMode.None); + public ref ParticleColorBlendType_t ColorBlendType { - get => ref _Handle.AsRef(Schema.GetOffset(0x44291266DBC6EFCF)); + get => ref _Handle.AsRef(_ColorBlendTypeOffset.Value); } + private static readonly Lazy _LightDistanceOffset = new(() => Schema.GetOffset(0x44291266FAE1FD66), LazyThreadSafetyMode.None); + public ref float LightDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x44291266FAE1FD66)); + get => ref _Handle.AsRef(_LightDistanceOffset.Value); } + private static readonly Lazy _StartFalloffOffset = new(() => Schema.GetOffset(0x44291266A8F25925), LazyThreadSafetyMode.None); + public ref float StartFalloff { - get => ref _Handle.AsRef(Schema.GetOffset(0x44291266A8F25925)); + get => ref _Handle.AsRef(_StartFalloffOffset.Value); } + private static readonly Lazy _DistanceFalloffOffset = new(() => Schema.GetOffset(0x44291266A9C33036), LazyThreadSafetyMode.None); + public ref float DistanceFalloff { - get => ref _Handle.AsRef(Schema.GetOffset(0x44291266A9C33036)); + get => ref _Handle.AsRef(_DistanceFalloffOffset.Value); } + private static readonly Lazy _SpotFoVOffset = new(() => Schema.GetOffset(0x44291266D202E536), LazyThreadSafetyMode.None); + public ref float SpotFoV { - get => ref _Handle.AsRef(Schema.GetOffset(0x44291266D202E536)); + get => ref _Handle.AsRef(_SpotFoVOffset.Value); } + private static readonly Lazy _AlphaTestPointFieldOffset = new(() => Schema.GetOffset(0x442912666AD21C15), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t AlphaTestPointField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x442912666AD21C15)); + get => new ParticleAttributeIndex_tImpl(_Handle + _AlphaTestPointFieldOffset.Value); } + private static readonly Lazy _AlphaTestRangeFieldOffset = new(() => Schema.GetOffset(0x442912663E3E66D4), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t AlphaTestRangeField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x442912663E3E66D4)); + get => new ParticleAttributeIndex_tImpl(_Handle + _AlphaTestRangeFieldOffset.Value); } + private static readonly Lazy _AlphaTestSharpnessFieldOffset = new(() => Schema.GetOffset(0x44291266BCB74B82), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t AlphaTestSharpnessField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x44291266BCB74B82)); + get => new ParticleAttributeIndex_tImpl(_Handle + _AlphaTestSharpnessFieldOffset.Value); } + private static readonly Lazy _TextureOffset = new(() => Schema.GetOffset(0x442912668C0A2FB6), LazyThreadSafetyMode.None); + public ref CStrongHandle Texture { - get => ref _Handle.AsRef>(Schema.GetOffset(0x442912668C0A2FB6)); + get => ref _Handle.AsRef>(_TextureOffset.Value); } + private static readonly Lazy _HSVShiftControlPointOffset = new(() => Schema.GetOffset(0x442912668848C01F), LazyThreadSafetyMode.None); + public ref int HSVShiftControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x442912668848C01F)); + get => ref _Handle.AsRef(_HSVShiftControlPointOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderFlattenGrassImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderFlattenGrassImpl.cs index cf4e73868..3518256ad 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderFlattenGrassImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderFlattenGrassImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_RenderFlattenGrassImpl : CParticleFunctionRendererIm public C_OP_RenderFlattenGrassImpl(nint handle) : base(handle) { } + private static readonly Lazy _FlattenStrengthOffset = new(() => Schema.GetOffset(0x81877FD959D69362), LazyThreadSafetyMode.None); + public ref float FlattenStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x81877FD959D69362)); + get => ref _Handle.AsRef(_FlattenStrengthOffset.Value); } + private static readonly Lazy _StrengthFieldOverrideOffset = new(() => Schema.GetOffset(0x81877FD91996F4F8), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t StrengthFieldOverride { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x81877FD91996F4F8)); + get => new ParticleAttributeIndex_tImpl(_Handle + _StrengthFieldOverrideOffset.Value); } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0x81877FD9A7A20159), LazyThreadSafetyMode.None); + public ref float RadiusScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x81877FD9A7A20159)); + get => ref _Handle.AsRef(_RadiusScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderGpuImplicitImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderGpuImplicitImpl.cs index 38604cb3f..db401ab7f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderGpuImplicitImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderGpuImplicitImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_RenderGpuImplicitImpl : CParticleFunctionRendererImp public C_OP_RenderGpuImplicitImpl(nint handle) : base(handle) { } + private static readonly Lazy _UsePerParticleRadiusOffset = new(() => Schema.GetOffset(0xF780A8E2CB5B403), LazyThreadSafetyMode.None); + public ref bool UsePerParticleRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xF780A8E2CB5B403)); + get => ref _Handle.AsRef(_UsePerParticleRadiusOffset.Value); } + private static readonly Lazy _VertexCountKbOffset = new(() => Schema.GetOffset(0xF780A8E6064907B), LazyThreadSafetyMode.None); + public ref uint VertexCountKb { - get => ref _Handle.AsRef(Schema.GetOffset(0xF780A8E6064907B)); + get => ref _Handle.AsRef(_VertexCountKbOffset.Value); } + private static readonly Lazy _IndexCountKbOffset = new(() => Schema.GetOffset(0xF780A8E6CDECFF7), LazyThreadSafetyMode.None); + public ref uint IndexCountKb { - get => ref _Handle.AsRef(Schema.GetOffset(0xF780A8E6CDECFF7)); + get => ref _Handle.AsRef(_IndexCountKbOffset.Value); } + private static readonly Lazy _GridSizeOffset = new(() => Schema.GetOffset(0xF780A8E456E2F5C), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput GridSize { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xF780A8E456E2F5C)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _GridSizeOffset.Value); } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0xF780A8E15F78967), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput RadiusScale { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xF780A8E15F78967)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _RadiusScaleOffset.Value); } + private static readonly Lazy _IsosurfaceThresholdOffset = new(() => Schema.GetOffset(0xF780A8E32E25824), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput IsosurfaceThreshold { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0xF780A8E32E25824)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _IsosurfaceThresholdOffset.Value); } + private static readonly Lazy _ScaleCPOffset = new(() => Schema.GetOffset(0xF780A8EDE3CC5E6), LazyThreadSafetyMode.None); + public ref int ScaleCP { - get => ref _Handle.AsRef(Schema.GetOffset(0xF780A8EDE3CC5E6)); + get => ref _Handle.AsRef(_ScaleCPOffset.Value); } + private static readonly Lazy _MaterialOffset = new(() => Schema.GetOffset(0xF780A8E888CE42E), LazyThreadSafetyMode.None); + public ref CStrongHandle Material { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF780A8E888CE42E)); + get => ref _Handle.AsRef>(_MaterialOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderLightBeamImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderLightBeamImpl.cs index 81e9352cf..ba2aa671c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderLightBeamImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderLightBeamImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_RenderLightBeamImpl : CParticleFunctionRendererImpl, public C_OP_RenderLightBeamImpl(nint handle) : base(handle) { } + private static readonly Lazy _ColorBlendOffset = new(() => Schema.GetOffset(0xD8A78450740E9A5F), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput ColorBlend { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xD8A78450740E9A5F)); + get => new CParticleCollectionVecInputImpl(_Handle + _ColorBlendOffset.Value); } + private static readonly Lazy _ColorBlendTypeOffset = new(() => Schema.GetOffset(0xD8A78450DBC6EFCF), LazyThreadSafetyMode.None); + public ref ParticleColorBlendType_t ColorBlendType { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8A78450DBC6EFCF)); + get => ref _Handle.AsRef(_ColorBlendTypeOffset.Value); } + private static readonly Lazy _BrightnessLumensPerMeterOffset = new(() => Schema.GetOffset(0xD8A78450889235AE), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput BrightnessLumensPerMeter { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xD8A78450889235AE)); + get => new CParticleCollectionFloatInputImpl(_Handle + _BrightnessLumensPerMeterOffset.Value); } + private static readonly Lazy _CastShadowsOffset = new(() => Schema.GetOffset(0xD8A7845036113167), LazyThreadSafetyMode.None); + public ref bool CastShadows { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8A7845036113167)); + get => ref _Handle.AsRef(_CastShadowsOffset.Value); } + private static readonly Lazy _SkirtOffset = new(() => Schema.GetOffset(0xD8A78450EAFB6D2A), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Skirt { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xD8A78450EAFB6D2A)); + get => new CParticleCollectionFloatInputImpl(_Handle + _SkirtOffset.Value); } + private static readonly Lazy _RangeOffset = new(() => Schema.GetOffset(0xD8A784503FC92844), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Range { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xD8A784503FC92844)); + get => new CParticleCollectionFloatInputImpl(_Handle + _RangeOffset.Value); } + private static readonly Lazy _ThicknessOffset = new(() => Schema.GetOffset(0xD8A78450DC7C1987), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Thickness { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xD8A78450DC7C1987)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ThicknessOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderLightsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderLightsImpl.cs index 39784d14e..b88455e77 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderLightsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderLightsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_RenderLightsImpl : C_OP_RenderPointsImpl, C_OP_Rende public C_OP_RenderLightsImpl(nint handle) : base(handle) { } + private static readonly Lazy _AnimationRateOffset = new(() => Schema.GetOffset(0x534FF0BC607083AD), LazyThreadSafetyMode.None); + public ref float AnimationRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x534FF0BC607083AD)); + get => ref _Handle.AsRef(_AnimationRateOffset.Value); } + private static readonly Lazy _AnimationTypeOffset = new(() => Schema.GetOffset(0x534FF0BCB93FDFD1), LazyThreadSafetyMode.None); + public ref AnimationType_t AnimationType { - get => ref _Handle.AsRef(Schema.GetOffset(0x534FF0BCB93FDFD1)); + get => ref _Handle.AsRef(_AnimationTypeOffset.Value); } + private static readonly Lazy _AnimateInFPSOffset = new(() => Schema.GetOffset(0x534FF0BC7C271B16), LazyThreadSafetyMode.None); + public ref bool AnimateInFPS { - get => ref _Handle.AsRef(Schema.GetOffset(0x534FF0BC7C271B16)); + get => ref _Handle.AsRef(_AnimateInFPSOffset.Value); } + private static readonly Lazy _MinSizeOffset = new(() => Schema.GetOffset(0x534FF0BCBDC3B198), LazyThreadSafetyMode.None); + public ref float MinSize { - get => ref _Handle.AsRef(Schema.GetOffset(0x534FF0BCBDC3B198)); + get => ref _Handle.AsRef(_MinSizeOffset.Value); } + private static readonly Lazy _MaxSizeOffset = new(() => Schema.GetOffset(0x534FF0BC8CA4E6BE), LazyThreadSafetyMode.None); + public ref float MaxSize { - get => ref _Handle.AsRef(Schema.GetOffset(0x534FF0BC8CA4E6BE)); + get => ref _Handle.AsRef(_MaxSizeOffset.Value); } + private static readonly Lazy _StartFadeSizeOffset = new(() => Schema.GetOffset(0x534FF0BCBA251D92), LazyThreadSafetyMode.None); + public ref float StartFadeSize { - get => ref _Handle.AsRef(Schema.GetOffset(0x534FF0BCBA251D92)); + get => ref _Handle.AsRef(_StartFadeSizeOffset.Value); } + private static readonly Lazy _EndFadeSizeOffset = new(() => Schema.GetOffset(0x534FF0BC2D3FD423), LazyThreadSafetyMode.None); + public ref float EndFadeSize { - get => ref _Handle.AsRef(Schema.GetOffset(0x534FF0BC2D3FD423)); + get => ref _Handle.AsRef(_EndFadeSizeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderMaterialProxyImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderMaterialProxyImpl.cs index 0bdc1e266..9443cab4f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderMaterialProxyImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderMaterialProxyImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_RenderMaterialProxyImpl : CParticleFunctionRendererI public C_OP_RenderMaterialProxyImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaterialControlPointOffset = new(() => Schema.GetOffset(0xA7258058EACD475D), LazyThreadSafetyMode.None); + public ref int MaterialControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xA7258058EACD475D)); + get => ref _Handle.AsRef(_MaterialControlPointOffset.Value); } + private static readonly Lazy _ProxyTypeOffset = new(() => Schema.GetOffset(0xA7258058066A337F), LazyThreadSafetyMode.None); + public ref MaterialProxyType_t ProxyType { - get => ref _Handle.AsRef(Schema.GetOffset(0xA7258058066A337F)); + get => ref _Handle.AsRef(_ProxyTypeOffset.Value); } + private static readonly Lazy _MaterialVarsOffset = new(() => Schema.GetOffset(0xA7258058FA861D66), LazyThreadSafetyMode.None); + public ref CUtlVector MaterialVars { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA7258058FA861D66)); + get => ref _Handle.AsRef>(_MaterialVarsOffset.Value); } + private static readonly Lazy _OverrideMaterialOffset = new(() => Schema.GetOffset(0xA72580582C055CBE), LazyThreadSafetyMode.None); + public ref CStrongHandle OverrideMaterial { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA72580582C055CBE)); + get => ref _Handle.AsRef>(_OverrideMaterialOffset.Value); } + private static readonly Lazy _MaterialOverrideEnabledOffset = new(() => Schema.GetOffset(0xA725805832275723), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput MaterialOverrideEnabled { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xA725805832275723)); + get => new CParticleCollectionFloatInputImpl(_Handle + _MaterialOverrideEnabledOffset.Value); } + private static readonly Lazy _ColorScaleOffset = new(() => Schema.GetOffset(0xA72580589F9BB8BA), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput ColorScale { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xA72580589F9BB8BA)); + get => new CParticleCollectionVecInputImpl(_Handle + _ColorScaleOffset.Value); } + private static readonly Lazy _AlphaOffset = new(() => Schema.GetOffset(0xA7258058A0DB7DD1), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Alpha { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xA7258058A0DB7DD1)); + get => new CPerParticleFloatInputImpl(_Handle + _AlphaOffset.Value); } + private static readonly Lazy _ColorBlendTypeOffset = new(() => Schema.GetOffset(0xA7258058DBC6EFCF), LazyThreadSafetyMode.None); + public ref ParticleColorBlendType_t ColorBlendType { - get => ref _Handle.AsRef(Schema.GetOffset(0xA7258058DBC6EFCF)); + get => ref _Handle.AsRef(_ColorBlendTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderModelsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderModelsImpl.cs index 2514f58f7..e11b3e116 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderModelsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderModelsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,190 +17,300 @@ internal partial class C_OP_RenderModelsImpl : CParticleFunctionRendererImpl, C_ public C_OP_RenderModelsImpl(nint handle) : base(handle) { } + private static readonly Lazy _OnlyRenderInEffectsBloomPassOffset = new(() => Schema.GetOffset(0xC58C7B13D6FA0FBC), LazyThreadSafetyMode.None); + public ref bool OnlyRenderInEffectsBloomPass { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B13D6FA0FBC)); + get => ref _Handle.AsRef(_OnlyRenderInEffectsBloomPassOffset.Value); } + private static readonly Lazy _OnlyRenderInEffectsWaterPassOffset = new(() => Schema.GetOffset(0xC58C7B13111BB03C), LazyThreadSafetyMode.None); + public ref bool OnlyRenderInEffectsWaterPass { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B13111BB03C)); + get => ref _Handle.AsRef(_OnlyRenderInEffectsWaterPassOffset.Value); } + private static readonly Lazy _UseMixedResolutionRenderingOffset = new(() => Schema.GetOffset(0xC58C7B138C2B17B7), LazyThreadSafetyMode.None); + public ref bool UseMixedResolutionRendering { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B138C2B17B7)); + get => ref _Handle.AsRef(_UseMixedResolutionRenderingOffset.Value); } + private static readonly Lazy _OnlyRenderInEffecsGameOverlayOffset = new(() => Schema.GetOffset(0xC58C7B130293C80E), LazyThreadSafetyMode.None); + public ref bool OnlyRenderInEffecsGameOverlay { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B130293C80E)); + get => ref _Handle.AsRef(_OnlyRenderInEffecsGameOverlayOffset.Value); } + private static readonly Lazy _ModelListOffset = new(() => Schema.GetOffset(0xC58C7B1305FC11B6), LazyThreadSafetyMode.None); + public ref CUtlVector ModelList { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC58C7B1305FC11B6)); + get => ref _Handle.AsRef>(_ModelListOffset.Value); } + private static readonly Lazy _BodyGroupFieldOffset = new(() => Schema.GetOffset(0xC58C7B13556DEFD4), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t BodyGroupField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xC58C7B13556DEFD4)); + get => new ParticleAttributeIndex_tImpl(_Handle + _BodyGroupFieldOffset.Value); } + private static readonly Lazy _SubModelFieldOffset = new(() => Schema.GetOffset(0xC58C7B13ED904DE2), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t SubModelField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xC58C7B13ED904DE2)); + get => new ParticleAttributeIndex_tImpl(_Handle + _SubModelFieldOffset.Value); } + private static readonly Lazy _IgnoreNormalOffset = new(() => Schema.GetOffset(0xC58C7B131AD60A6C), LazyThreadSafetyMode.None); + public ref bool IgnoreNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B131AD60A6C)); + get => ref _Handle.AsRef(_IgnoreNormalOffset.Value); } + private static readonly Lazy _OrientZOffset = new(() => Schema.GetOffset(0xC58C7B139307DE0A), LazyThreadSafetyMode.None); + public ref bool OrientZ { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B139307DE0A)); + get => ref _Handle.AsRef(_OrientZOffset.Value); } + private static readonly Lazy _CenterOffsetOffset = new(() => Schema.GetOffset(0xC58C7B13E2C912BF), LazyThreadSafetyMode.None); + public ref bool CenterOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B13E2C912BF)); + get => ref _Handle.AsRef(_CenterOffsetOffset.Value); } + private static readonly Lazy _LocalOffsetOffset = new(() => Schema.GetOffset(0xC58C7B130ABC2F9B), LazyThreadSafetyMode.None); + public CPerParticleVecInput LocalOffset { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xC58C7B130ABC2F9B)); + get => new CPerParticleVecInputImpl(_Handle + _LocalOffsetOffset.Value); } + private static readonly Lazy _LocalRotationOffset = new(() => Schema.GetOffset(0xC58C7B1396B4170E), LazyThreadSafetyMode.None); + public CPerParticleVecInput LocalRotation { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xC58C7B1396B4170E)); + get => new CPerParticleVecInputImpl(_Handle + _LocalRotationOffset.Value); } + private static readonly Lazy _IgnoreRadiusOffset = new(() => Schema.GetOffset(0xC58C7B13DD2E3E91), LazyThreadSafetyMode.None); + public ref bool IgnoreRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B13DD2E3E91)); + get => ref _Handle.AsRef(_IgnoreRadiusOffset.Value); } + private static readonly Lazy _ModelScaleCPOffset = new(() => Schema.GetOffset(0xC58C7B134E008EEF), LazyThreadSafetyMode.None); + public ref int ModelScaleCP { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B134E008EEF)); + get => ref _Handle.AsRef(_ModelScaleCPOffset.Value); } + private static readonly Lazy _ComponentScaleOffset = new(() => Schema.GetOffset(0xC58C7B13B17954E2), LazyThreadSafetyMode.None); + public CPerParticleVecInput ComponentScale { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xC58C7B13B17954E2)); + get => new CPerParticleVecInputImpl(_Handle + _ComponentScaleOffset.Value); } + private static readonly Lazy _LocalScaleOffset = new(() => Schema.GetOffset(0xC58C7B136BF4802A), LazyThreadSafetyMode.None); + public ref bool LocalScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B136BF4802A)); + get => ref _Handle.AsRef(_LocalScaleOffset.Value); } + private static readonly Lazy _SizeCullBloatOffset = new(() => Schema.GetOffset(0xC58C7B135EB61122), LazyThreadSafetyMode.None); + public ref int SizeCullBloat { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B135EB61122)); + get => ref _Handle.AsRef(_SizeCullBloatOffset.Value); } + private static readonly Lazy _AnimatedOffset = new(() => Schema.GetOffset(0xC58C7B13D0F1701C), LazyThreadSafetyMode.None); + public ref bool Animated { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B13D0F1701C)); + get => ref _Handle.AsRef(_AnimatedOffset.Value); } + private static readonly Lazy _AnimationRateOffset = new(() => Schema.GetOffset(0xC58C7B13607083AD), LazyThreadSafetyMode.None); + public CPerParticleFloatInput AnimationRate { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xC58C7B13607083AD)); + get => new CPerParticleFloatInputImpl(_Handle + _AnimationRateOffset.Value); } + private static readonly Lazy _ScaleAnimationRateOffset = new(() => Schema.GetOffset(0xC58C7B133CEBA30B), LazyThreadSafetyMode.None); + public ref bool ScaleAnimationRate { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B133CEBA30B)); + get => ref _Handle.AsRef(_ScaleAnimationRateOffset.Value); } + private static readonly Lazy _ForceLoopingAnimationOffset = new(() => Schema.GetOffset(0xC58C7B134CD43984), LazyThreadSafetyMode.None); + public ref bool ForceLoopingAnimation { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B134CD43984)); + get => ref _Handle.AsRef(_ForceLoopingAnimationOffset.Value); } + private static readonly Lazy _ResetAnimOnStopOffset = new(() => Schema.GetOffset(0xC58C7B13A7CA94A8), LazyThreadSafetyMode.None); + public ref bool ResetAnimOnStop { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B13A7CA94A8)); + get => ref _Handle.AsRef(_ResetAnimOnStopOffset.Value); } + private static readonly Lazy _ManualAnimFrameOffset = new(() => Schema.GetOffset(0xC58C7B13FA6279DB), LazyThreadSafetyMode.None); + public ref bool ManualAnimFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B13FA6279DB)); + get => ref _Handle.AsRef(_ManualAnimFrameOffset.Value); } + private static readonly Lazy _AnimationScaleFieldOffset = new(() => Schema.GetOffset(0xC58C7B1328447E1F), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t AnimationScaleField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xC58C7B1328447E1F)); + get => new ParticleAttributeIndex_tImpl(_Handle + _AnimationScaleFieldOffset.Value); } + private static readonly Lazy _AnimationFieldOffset = new(() => Schema.GetOffset(0xC58C7B13EBE2D213), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t AnimationField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xC58C7B13EBE2D213)); + get => new ParticleAttributeIndex_tImpl(_Handle + _AnimationFieldOffset.Value); } + private static readonly Lazy _ManualFrameFieldOffset = new(() => Schema.GetOffset(0xC58C7B1352FAE698), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t ManualFrameField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xC58C7B1352FAE698)); + get => new ParticleAttributeIndex_tImpl(_Handle + _ManualFrameFieldOffset.Value); } + private static readonly Lazy _ActivityNameOffset = new(() => Schema.GetOffset(0xC58C7B13BF0C5087), LazyThreadSafetyMode.None); + public string ActivityName { get { - var ptr = _Handle + Schema.GetOffset(0xC58C7B13BF0C5087); + var ptr = _Handle + _ActivityNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xC58C7B13BF0C5087, value, 256); + set => Schema.SetFixedString(_Handle, _ActivityNameOffset.Value, value, 256); } + private static readonly Lazy _SequenceNameOffset = new(() => Schema.GetOffset(0xC58C7B13A270F66B), LazyThreadSafetyMode.None); + public string SequenceName { get { - var ptr = _Handle + Schema.GetOffset(0xC58C7B13A270F66B); + var ptr = _Handle + _SequenceNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xC58C7B13A270F66B, value, 256); + set => Schema.SetFixedString(_Handle, _SequenceNameOffset.Value, value, 256); } + private static readonly Lazy _EnableClothSimulationOffset = new(() => Schema.GetOffset(0xC58C7B13F2B3D0A9), LazyThreadSafetyMode.None); + public ref bool EnableClothSimulation { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B13F2B3D0A9)); + get => ref _Handle.AsRef(_EnableClothSimulationOffset.Value); } + private static readonly Lazy _ClothEffectNameOffset = new(() => Schema.GetOffset(0xC58C7B139D0B2FCD), LazyThreadSafetyMode.None); + public string ClothEffectName { get { - var ptr = _Handle + Schema.GetOffset(0xC58C7B139D0B2FCD); + var ptr = _Handle + _ClothEffectNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xC58C7B139D0B2FCD, value, 64); + set => Schema.SetFixedString(_Handle, _ClothEffectNameOffset.Value, value, 64); } + private static readonly Lazy _OverrideMaterialOffset = new(() => Schema.GetOffset(0xC58C7B132C055CBE), LazyThreadSafetyMode.None); + public ref CStrongHandle OverrideMaterial { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC58C7B132C055CBE)); + get => ref _Handle.AsRef>(_OverrideMaterialOffset.Value); } + private static readonly Lazy _OverrideTranslucentMaterialsOffset = new(() => Schema.GetOffset(0xC58C7B13A9CF9EDA), LazyThreadSafetyMode.None); + public ref bool OverrideTranslucentMaterials { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B13A9CF9EDA)); + get => ref _Handle.AsRef(_OverrideTranslucentMaterialsOffset.Value); } + private static readonly Lazy _SkinOffset = new(() => Schema.GetOffset(0xC58C7B13E65A22FC), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Skin { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xC58C7B13E65A22FC)); + get => new CPerParticleFloatInputImpl(_Handle + _SkinOffset.Value); } + private static readonly Lazy _MaterialVarsOffset = new(() => Schema.GetOffset(0xC58C7B13FA861D66), LazyThreadSafetyMode.None); + public ref CUtlVector MaterialVars { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC58C7B13FA861D66)); + get => ref _Handle.AsRef>(_MaterialVarsOffset.Value); } + private static readonly Lazy _RenderFilterOffset = new(() => Schema.GetOffset(0xC58C7B13EDE7010D), LazyThreadSafetyMode.None); + public CPerParticleFloatInput RenderFilter { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xC58C7B13EDE7010D)); + get => new CPerParticleFloatInputImpl(_Handle + _RenderFilterOffset.Value); } + private static readonly Lazy _ManualModelSelectionOffset = new(() => Schema.GetOffset(0xC58C7B1356A82C10), LazyThreadSafetyMode.None); + public CPerParticleFloatInput ManualModelSelection { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xC58C7B1356A82C10)); + get => new CPerParticleFloatInputImpl(_Handle + _ManualModelSelectionOffset.Value); } + private static readonly Lazy _ModelInputOffset = new(() => Schema.GetOffset(0xC58C7B13EB74120E), LazyThreadSafetyMode.None); + public CParticleModelInput ModelInput { - get => new CParticleModelInputImpl(_Handle + Schema.GetOffset(0xC58C7B13EB74120E)); + get => new CParticleModelInputImpl(_Handle + _ModelInputOffset.Value); } + private static readonly Lazy _LODOffset = new(() => Schema.GetOffset(0xC58C7B138303A434), LazyThreadSafetyMode.None); + public ref int LOD { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B138303A434)); + get => ref _Handle.AsRef(_LODOffset.Value); } + private static readonly Lazy _EconSlotNameOffset = new(() => Schema.GetOffset(0xC58C7B13F7A43C9B), LazyThreadSafetyMode.None); + public string EconSlotName { get { - var ptr = _Handle + Schema.GetOffset(0xC58C7B13F7A43C9B); + var ptr = _Handle + _EconSlotNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xC58C7B13F7A43C9B, value, 256); + set => Schema.SetFixedString(_Handle, _EconSlotNameOffset.Value, value, 256); } + private static readonly Lazy _OriginalModelOffset = new(() => Schema.GetOffset(0xC58C7B13F52DF2AF), LazyThreadSafetyMode.None); + public ref bool OriginalModel { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B13F52DF2AF)); + get => ref _Handle.AsRef(_OriginalModelOffset.Value); } + private static readonly Lazy _SuppressTintOffset = new(() => Schema.GetOffset(0xC58C7B1381F42727), LazyThreadSafetyMode.None); + public ref bool SuppressTint { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B1381F42727)); + get => ref _Handle.AsRef(_SuppressTintOffset.Value); } + private static readonly Lazy _SubModelFieldTypeOffset = new(() => Schema.GetOffset(0xC58C7B13C37F4112), LazyThreadSafetyMode.None); + public ref RenderModelSubModelFieldType_t SubModelFieldType { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B13C37F4112)); + get => ref _Handle.AsRef(_SubModelFieldTypeOffset.Value); } + private static readonly Lazy _DisableShadowsOffset = new(() => Schema.GetOffset(0xC58C7B13161A1880), LazyThreadSafetyMode.None); + public ref bool DisableShadows { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B13161A1880)); + get => ref _Handle.AsRef(_DisableShadowsOffset.Value); } + private static readonly Lazy _DisableDepthPrepassOffset = new(() => Schema.GetOffset(0xC58C7B13A31BF4A8), LazyThreadSafetyMode.None); + public ref bool DisableDepthPrepass { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B13A31BF4A8)); + get => ref _Handle.AsRef(_DisableDepthPrepassOffset.Value); } + private static readonly Lazy _AcceptsDecalsOffset = new(() => Schema.GetOffset(0xC58C7B133D83AB88), LazyThreadSafetyMode.None); + public ref bool AcceptsDecals { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B133D83AB88)); + get => ref _Handle.AsRef(_AcceptsDecalsOffset.Value); } + private static readonly Lazy _ForceDrawInterlevedWithSiblingsOffset = new(() => Schema.GetOffset(0xC58C7B131D0350F5), LazyThreadSafetyMode.None); + public ref bool ForceDrawInterlevedWithSiblings { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B131D0350F5)); + get => ref _Handle.AsRef(_ForceDrawInterlevedWithSiblingsOffset.Value); } + private static readonly Lazy _DoNotDrawInParticlePassOffset = new(() => Schema.GetOffset(0xC58C7B130E9B1BCB), LazyThreadSafetyMode.None); + public ref bool DoNotDrawInParticlePass { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B130E9B1BCB)); + get => ref _Handle.AsRef(_DoNotDrawInParticlePassOffset.Value); } + private static readonly Lazy _AllowApproximateTransformsOffset = new(() => Schema.GetOffset(0xC58C7B136C6ACC65), LazyThreadSafetyMode.None); + public ref bool AllowApproximateTransforms { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B136C6ACC65)); + get => ref _Handle.AsRef(_AllowApproximateTransformsOffset.Value); } + private static readonly Lazy _RenderAttributeOffset = new(() => Schema.GetOffset(0xC58C7B13A343F648), LazyThreadSafetyMode.None); + public string RenderAttribute { get { - var ptr = _Handle + Schema.GetOffset(0xC58C7B13A343F648); + var ptr = _Handle + _RenderAttributeOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xC58C7B13A343F648, value, 260); + set => Schema.SetFixedString(_Handle, _RenderAttributeOffset.Value, value, 260); } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0xC58C7B13A7A20159), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput RadiusScale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xC58C7B13A7A20159)); + get => new CParticleCollectionFloatInputImpl(_Handle + _RadiusScaleOffset.Value); } + private static readonly Lazy _AlphaScaleOffset = new(() => Schema.GetOffset(0xC58C7B13EC6D3C25), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput AlphaScale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xC58C7B13EC6D3C25)); + get => new CParticleCollectionFloatInputImpl(_Handle + _AlphaScaleOffset.Value); } + private static readonly Lazy _RollScaleOffset = new(() => Schema.GetOffset(0xC58C7B13F2113F72), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput RollScale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xC58C7B13F2113F72)); + get => new CParticleCollectionFloatInputImpl(_Handle + _RollScaleOffset.Value); } + private static readonly Lazy _Alpha2FieldOffset = new(() => Schema.GetOffset(0xC58C7B13F60EADC1), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t Alpha2Field { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xC58C7B13F60EADC1)); + get => new ParticleAttributeIndex_tImpl(_Handle + _Alpha2FieldOffset.Value); } + private static readonly Lazy _ColorScaleOffset = new(() => Schema.GetOffset(0xC58C7B139F9BB8BA), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput ColorScale { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xC58C7B139F9BB8BA)); + get => new CParticleCollectionVecInputImpl(_Handle + _ColorScaleOffset.Value); } + private static readonly Lazy _ColorBlendTypeOffset = new(() => Schema.GetOffset(0xC58C7B13DBC6EFCF), LazyThreadSafetyMode.None); + public ref ParticleColorBlendType_t ColorBlendType { - get => ref _Handle.AsRef(Schema.GetOffset(0xC58C7B13DBC6EFCF)); + get => ref _Handle.AsRef(_ColorBlendTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderOmni2LightImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderOmni2LightImpl.cs index 74cac9f91..3f168eaea 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderOmni2LightImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderOmni2LightImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,53 +17,85 @@ internal partial class C_OP_RenderOmni2LightImpl : CParticleFunctionRendererImpl public C_OP_RenderOmni2LightImpl(nint handle) : base(handle) { } + private static readonly Lazy _LightTypeOffset = new(() => Schema.GetOffset(0xDE9AF4EE18C7B4A3), LazyThreadSafetyMode.None); + public ref ParticleOmni2LightTypeChoiceList_t LightType { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE9AF4EE18C7B4A3)); + get => ref _Handle.AsRef(_LightTypeOffset.Value); } + private static readonly Lazy _ColorBlendOffset = new(() => Schema.GetOffset(0xDE9AF4EE740E9A5F), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput ColorBlend { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xDE9AF4EE740E9A5F)); + get => new CParticleCollectionVecInputImpl(_Handle + _ColorBlendOffset.Value); } + private static readonly Lazy _ColorBlendTypeOffset = new(() => Schema.GetOffset(0xDE9AF4EEDBC6EFCF), LazyThreadSafetyMode.None); + public ref ParticleColorBlendType_t ColorBlendType { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE9AF4EEDBC6EFCF)); + get => ref _Handle.AsRef(_ColorBlendTypeOffset.Value); } + private static readonly Lazy _BrightnessUnitOffset = new(() => Schema.GetOffset(0xDE9AF4EE2A6E4030), LazyThreadSafetyMode.None); + public ref ParticleLightUnitChoiceList_t BrightnessUnit { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE9AF4EE2A6E4030)); + get => ref _Handle.AsRef(_BrightnessUnitOffset.Value); } + private static readonly Lazy _BrightnessLumensOffset = new(() => Schema.GetOffset(0xDE9AF4EEC542F6EA), LazyThreadSafetyMode.None); + public CPerParticleFloatInput BrightnessLumens { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xDE9AF4EEC542F6EA)); + get => new CPerParticleFloatInputImpl(_Handle + _BrightnessLumensOffset.Value); } + private static readonly Lazy _BrightnessCandelasOffset = new(() => Schema.GetOffset(0xDE9AF4EEE3A4688B), LazyThreadSafetyMode.None); + public CPerParticleFloatInput BrightnessCandelas { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xDE9AF4EEE3A4688B)); + get => new CPerParticleFloatInputImpl(_Handle + _BrightnessCandelasOffset.Value); } + private static readonly Lazy _CastShadowsOffset = new(() => Schema.GetOffset(0xDE9AF4EE36113167), LazyThreadSafetyMode.None); + public ref bool CastShadows { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE9AF4EE36113167)); + get => ref _Handle.AsRef(_CastShadowsOffset.Value); } + private static readonly Lazy _FogOffset = new(() => Schema.GetOffset(0xDE9AF4EECA77E01F), LazyThreadSafetyMode.None); + public ref bool Fog { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE9AF4EECA77E01F)); + get => ref _Handle.AsRef(_FogOffset.Value); } + private static readonly Lazy _FogScaleOffset = new(() => Schema.GetOffset(0xDE9AF4EECF999E05), LazyThreadSafetyMode.None); + public CPerParticleFloatInput FogScale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xDE9AF4EECF999E05)); + get => new CPerParticleFloatInputImpl(_Handle + _FogScaleOffset.Value); } + private static readonly Lazy _LuminaireRadiusOffset = new(() => Schema.GetOffset(0xDE9AF4EECB5A5B89), LazyThreadSafetyMode.None); + public CPerParticleFloatInput LuminaireRadius { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xDE9AF4EECB5A5B89)); + get => new CPerParticleFloatInputImpl(_Handle + _LuminaireRadiusOffset.Value); } + private static readonly Lazy _SkirtOffset = new(() => Schema.GetOffset(0xDE9AF4EEEAFB6D2A), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Skirt { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xDE9AF4EEEAFB6D2A)); + get => new CPerParticleFloatInputImpl(_Handle + _SkirtOffset.Value); } + private static readonly Lazy _RangeOffset = new(() => Schema.GetOffset(0xDE9AF4EE3FC92844), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Range { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xDE9AF4EE3FC92844)); + get => new CPerParticleFloatInputImpl(_Handle + _RangeOffset.Value); } + private static readonly Lazy _InnerConeAngleOffset = new(() => Schema.GetOffset(0xDE9AF4EE16875B1D), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InnerConeAngle { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xDE9AF4EE16875B1D)); + get => new CPerParticleFloatInputImpl(_Handle + _InnerConeAngleOffset.Value); } + private static readonly Lazy _OuterConeAngleOffset = new(() => Schema.GetOffset(0xDE9AF4EE90EF9464), LazyThreadSafetyMode.None); + public CPerParticleFloatInput OuterConeAngle { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xDE9AF4EE90EF9464)); + get => new CPerParticleFloatInputImpl(_Handle + _OuterConeAngleOffset.Value); } + private static readonly Lazy _LightCookieOffset = new(() => Schema.GetOffset(0xDE9AF4EE0609D103), LazyThreadSafetyMode.None); + public ref CStrongHandle LightCookie { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDE9AF4EE0609D103)); + get => ref _Handle.AsRef>(_LightCookieOffset.Value); } + private static readonly Lazy _SphericalCookieOffset = new(() => Schema.GetOffset(0xDE9AF4EE6C822B6E), LazyThreadSafetyMode.None); + public ref bool SphericalCookie { - get => ref _Handle.AsRef(Schema.GetOffset(0xDE9AF4EE6C822B6E)); + get => ref _Handle.AsRef(_SphericalCookieOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderPointsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderPointsImpl.cs index 6a8ade8f4..0a2742572 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderPointsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderPointsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_OP_RenderPointsImpl : CParticleFunctionRendererImpl, C_ public C_OP_RenderPointsImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaterialOffset = new(() => Schema.GetOffset(0x9B246DAE888CE42E), LazyThreadSafetyMode.None); + public ref CStrongHandle Material { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9B246DAE888CE42E)); + get => ref _Handle.AsRef>(_MaterialOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderPostProcessingImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderPostProcessingImpl.cs index 56122317b..f3859ce3a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderPostProcessingImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderPostProcessingImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_RenderPostProcessingImpl : CParticleFunctionRenderer public C_OP_RenderPostProcessingImpl(nint handle) : base(handle) { } + private static readonly Lazy _PostProcessStrengthOffset = new(() => Schema.GetOffset(0xD64D179C653C1A17), LazyThreadSafetyMode.None); + public CPerParticleFloatInput PostProcessStrength { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xD64D179C653C1A17)); + get => new CPerParticleFloatInputImpl(_Handle + _PostProcessStrengthOffset.Value); } + private static readonly Lazy _PostTextureOffset = new(() => Schema.GetOffset(0xD64D179C943F8D28), LazyThreadSafetyMode.None); + public ref CStrongHandle PostTexture { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD64D179C943F8D28)); + get => ref _Handle.AsRef>(_PostTextureOffset.Value); } + private static readonly Lazy _PriorityOffset = new(() => Schema.GetOffset(0xD64D179CE7EFB335), LazyThreadSafetyMode.None); + public ref ParticlePostProcessPriorityGroup_t Priority { - get => ref _Handle.AsRef(Schema.GetOffset(0xD64D179CE7EFB335)); + get => ref _Handle.AsRef(_PriorityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderProjectedImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderProjectedImpl.cs index deec7f627..a53cbe4f4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderProjectedImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderProjectedImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,59 +17,95 @@ internal partial class C_OP_RenderProjectedImpl : CParticleFunctionRendererImpl, public C_OP_RenderProjectedImpl(nint handle) : base(handle) { } + private static readonly Lazy _ProjectCharacterOffset = new(() => Schema.GetOffset(0xA370F307B21A6149), LazyThreadSafetyMode.None); + public ref bool ProjectCharacter { - get => ref _Handle.AsRef(Schema.GetOffset(0xA370F307B21A6149)); + get => ref _Handle.AsRef(_ProjectCharacterOffset.Value); } + private static readonly Lazy _ProjectWorldOffset = new(() => Schema.GetOffset(0xA370F307078C32D2), LazyThreadSafetyMode.None); + public ref bool ProjectWorld { - get => ref _Handle.AsRef(Schema.GetOffset(0xA370F307078C32D2)); + get => ref _Handle.AsRef(_ProjectWorldOffset.Value); } + private static readonly Lazy _ProjectWaterOffset = new(() => Schema.GetOffset(0xA370F3077E2B6E09), LazyThreadSafetyMode.None); + public ref bool ProjectWater { - get => ref _Handle.AsRef(Schema.GetOffset(0xA370F3077E2B6E09)); + get => ref _Handle.AsRef(_ProjectWaterOffset.Value); } + private static readonly Lazy _FlipHorizontalOffset = new(() => Schema.GetOffset(0xA370F307B0A49AFA), LazyThreadSafetyMode.None); + public ref bool FlipHorizontal { - get => ref _Handle.AsRef(Schema.GetOffset(0xA370F307B0A49AFA)); + get => ref _Handle.AsRef(_FlipHorizontalOffset.Value); } + private static readonly Lazy _EnableProjectedDepthControlsOffset = new(() => Schema.GetOffset(0xA370F307B614A221), LazyThreadSafetyMode.None); + public ref bool EnableProjectedDepthControls { - get => ref _Handle.AsRef(Schema.GetOffset(0xA370F307B614A221)); + get => ref _Handle.AsRef(_EnableProjectedDepthControlsOffset.Value); } + private static readonly Lazy _MinProjectionDepthOffset = new(() => Schema.GetOffset(0xA370F3076A7B1FB1), LazyThreadSafetyMode.None); + public ref float MinProjectionDepth { - get => ref _Handle.AsRef(Schema.GetOffset(0xA370F3076A7B1FB1)); + get => ref _Handle.AsRef(_MinProjectionDepthOffset.Value); } + private static readonly Lazy _MaxProjectionDepthOffset = new(() => Schema.GetOffset(0xA370F3078C7219DB), LazyThreadSafetyMode.None); + public ref float MaxProjectionDepth { - get => ref _Handle.AsRef(Schema.GetOffset(0xA370F3078C7219DB)); + get => ref _Handle.AsRef(_MaxProjectionDepthOffset.Value); } + private static readonly Lazy _ProjectedMaterialsOffset = new(() => Schema.GetOffset(0xA370F30718968FAF), LazyThreadSafetyMode.None); + public ref CUtlVector ProjectedMaterials { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA370F30718968FAF)); + get => ref _Handle.AsRef>(_ProjectedMaterialsOffset.Value); } + private static readonly Lazy _MaterialSelectionOffset = new(() => Schema.GetOffset(0xA370F3075A88A590), LazyThreadSafetyMode.None); + public CPerParticleFloatInput MaterialSelection { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xA370F3075A88A590)); + get => new CPerParticleFloatInputImpl(_Handle + _MaterialSelectionOffset.Value); } + private static readonly Lazy _AnimationTimeScaleOffset = new(() => Schema.GetOffset(0xA370F3071CD3BFF4), LazyThreadSafetyMode.None); + public ref float AnimationTimeScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xA370F3071CD3BFF4)); + get => ref _Handle.AsRef(_AnimationTimeScaleOffset.Value); } + private static readonly Lazy _OrientToNormalOffset = new(() => Schema.GetOffset(0xA370F307FAC0D30A), LazyThreadSafetyMode.None); + public ref bool OrientToNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0xA370F307FAC0D30A)); + get => ref _Handle.AsRef(_OrientToNormalOffset.Value); } + private static readonly Lazy _MaterialVarsOffset = new(() => Schema.GetOffset(0xA370F307FA861D66), LazyThreadSafetyMode.None); + public ref CUtlVector MaterialVars { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA370F307FA861D66)); + get => ref _Handle.AsRef>(_MaterialVarsOffset.Value); } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0xA370F307A7A20159), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput RadiusScale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xA370F307A7A20159)); + get => new CParticleCollectionFloatInputImpl(_Handle + _RadiusScaleOffset.Value); } + private static readonly Lazy _AlphaScaleOffset = new(() => Schema.GetOffset(0xA370F307EC6D3C25), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput AlphaScale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xA370F307EC6D3C25)); + get => new CParticleCollectionFloatInputImpl(_Handle + _AlphaScaleOffset.Value); } + private static readonly Lazy _RollScaleOffset = new(() => Schema.GetOffset(0xA370F307F2113F72), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput RollScale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xA370F307F2113F72)); + get => new CParticleCollectionFloatInputImpl(_Handle + _RollScaleOffset.Value); } + private static readonly Lazy _Alpha2FieldOffset = new(() => Schema.GetOffset(0xA370F307F60EADC1), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t Alpha2Field { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xA370F307F60EADC1)); + get => new ParticleAttributeIndex_tImpl(_Handle + _Alpha2FieldOffset.Value); } + private static readonly Lazy _ColorScaleOffset = new(() => Schema.GetOffset(0xA370F3079F9BB8BA), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput ColorScale { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xA370F3079F9BB8BA)); + get => new CParticleCollectionVecInputImpl(_Handle + _ColorScaleOffset.Value); } + private static readonly Lazy _ColorBlendTypeOffset = new(() => Schema.GetOffset(0xA370F307DBC6EFCF), LazyThreadSafetyMode.None); + public ref ParticleColorBlendType_t ColorBlendType { - get => ref _Handle.AsRef(Schema.GetOffset(0xA370F307DBC6EFCF)); + get => ref _Handle.AsRef(_ColorBlendTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderRopesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderRopesImpl.cs index 80e57e6be..36956d32e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderRopesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderRopesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,101 +17,165 @@ internal partial class C_OP_RenderRopesImpl : CBaseRendererSource2Impl, C_OP_Ren public C_OP_RenderRopesImpl(nint handle) : base(handle) { } + private static readonly Lazy _EnableFadingAndClampingOffset = new(() => Schema.GetOffset(0x9BCDD8B21BC56ADD), LazyThreadSafetyMode.None); + public ref bool EnableFadingAndClamping { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B21BC56ADD)); + get => ref _Handle.AsRef(_EnableFadingAndClampingOffset.Value); } + private static readonly Lazy _MinSizeOffset = new(() => Schema.GetOffset(0x9BCDD8B2BDC3B198), LazyThreadSafetyMode.None); + public ref float MinSize { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B2BDC3B198)); + get => ref _Handle.AsRef(_MinSizeOffset.Value); } + private static readonly Lazy _MaxSizeOffset = new(() => Schema.GetOffset(0x9BCDD8B28CA4E6BE), LazyThreadSafetyMode.None); + public ref float MaxSize { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B28CA4E6BE)); + get => ref _Handle.AsRef(_MaxSizeOffset.Value); } + private static readonly Lazy _StartFadeSizeOffset = new(() => Schema.GetOffset(0x9BCDD8B2BA251D92), LazyThreadSafetyMode.None); + public ref float StartFadeSize { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B2BA251D92)); + get => ref _Handle.AsRef(_StartFadeSizeOffset.Value); } + private static readonly Lazy _EndFadeSizeOffset = new(() => Schema.GetOffset(0x9BCDD8B22D3FD423), LazyThreadSafetyMode.None); + public ref float EndFadeSize { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B22D3FD423)); + get => ref _Handle.AsRef(_EndFadeSizeOffset.Value); } + private static readonly Lazy _StartFadeDotOffset = new(() => Schema.GetOffset(0x9BCDD8B2A5D81E0E), LazyThreadSafetyMode.None); + public ref float StartFadeDot { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B2A5D81E0E)); + get => ref _Handle.AsRef(_StartFadeDotOffset.Value); } + private static readonly Lazy _EndFadeDotOffset = new(() => Schema.GetOffset(0x9BCDD8B2D549B121), LazyThreadSafetyMode.None); + public ref float EndFadeDot { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B2D549B121)); + get => ref _Handle.AsRef(_EndFadeDotOffset.Value); } + private static readonly Lazy _RadiusTaperOffset = new(() => Schema.GetOffset(0x9BCDD8B26362520D), LazyThreadSafetyMode.None); + public ref float RadiusTaper { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B26362520D)); + get => ref _Handle.AsRef(_RadiusTaperOffset.Value); } + private static readonly Lazy _MinTesselationOffset = new(() => Schema.GetOffset(0x9BCDD8B2ECCEE8B4), LazyThreadSafetyMode.None); + public ref int MinTesselation { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B2ECCEE8B4)); + get => ref _Handle.AsRef(_MinTesselationOffset.Value); } + private static readonly Lazy _MaxTesselationOffset = new(() => Schema.GetOffset(0x9BCDD8B2B609C442), LazyThreadSafetyMode.None); + public ref int MaxTesselation { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B2B609C442)); + get => ref _Handle.AsRef(_MaxTesselationOffset.Value); } + private static readonly Lazy _TessScaleOffset = new(() => Schema.GetOffset(0x9BCDD8B2EE9C9570), LazyThreadSafetyMode.None); + public ref float TessScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B2EE9C9570)); + get => ref _Handle.AsRef(_TessScaleOffset.Value); } + private static readonly Lazy _TextureVWorldSizeOffset = new(() => Schema.GetOffset(0x9BCDD8B230B8BF35), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput TextureVWorldSize { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x9BCDD8B230B8BF35)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _TextureVWorldSizeOffset.Value); } + private static readonly Lazy _TextureVScrollRateOffset = new(() => Schema.GetOffset(0x9BCDD8B2DC8A591B), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput TextureVScrollRate { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x9BCDD8B2DC8A591B)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _TextureVScrollRateOffset.Value); } + private static readonly Lazy _TextureVOffsetOffset = new(() => Schema.GetOffset(0x9BCDD8B21502ED5B), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput TextureVOffset { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x9BCDD8B21502ED5B)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _TextureVOffsetOffset.Value); } + private static readonly Lazy _TextureVParamsCPOffset = new(() => Schema.GetOffset(0x9BCDD8B2264B3E6B), LazyThreadSafetyMode.None); + public ref int TextureVParamsCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B2264B3E6B)); + get => ref _Handle.AsRef(_TextureVParamsCPOffset.Value); } + private static readonly Lazy _ClampVOffset = new(() => Schema.GetOffset(0x9BCDD8B2D02C13FE), LazyThreadSafetyMode.None); + public ref bool ClampV { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B2D02C13FE)); + get => ref _Handle.AsRef(_ClampVOffset.Value); } + private static readonly Lazy _ScaleCP1Offset = new(() => Schema.GetOffset(0x9BCDD8B2B0AB7175), LazyThreadSafetyMode.None); + public ref int ScaleCP1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B2B0AB7175)); + get => ref _Handle.AsRef(_ScaleCP1Offset.Value); } + private static readonly Lazy _ScaleCP2Offset = new(() => Schema.GetOffset(0x9BCDD8B2ADAB6CBC), LazyThreadSafetyMode.None); + public ref int ScaleCP2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B2ADAB6CBC)); + get => ref _Handle.AsRef(_ScaleCP2Offset.Value); } + private static readonly Lazy _ScaleVSizeByControlPointDistanceOffset = new(() => Schema.GetOffset(0x9BCDD8B22B989321), LazyThreadSafetyMode.None); + public ref float ScaleVSizeByControlPointDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B22B989321)); + get => ref _Handle.AsRef(_ScaleVSizeByControlPointDistanceOffset.Value); } + private static readonly Lazy _ScaleVScrollByControlPointDistanceOffset = new(() => Schema.GetOffset(0x9BCDD8B2E2B0C749), LazyThreadSafetyMode.None); + public ref float ScaleVScrollByControlPointDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B2E2B0C749)); + get => ref _Handle.AsRef(_ScaleVScrollByControlPointDistanceOffset.Value); } + private static readonly Lazy _ScaleVOffsetByControlPointDistanceOffset = new(() => Schema.GetOffset(0x9BCDD8B271D6B21B), LazyThreadSafetyMode.None); + public ref float ScaleVOffsetByControlPointDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B271D6B21B)); + get => ref _Handle.AsRef(_ScaleVOffsetByControlPointDistanceOffset.Value); } + private static readonly Lazy _UseScalarForTextureCoordinateOffset = new(() => Schema.GetOffset(0x9BCDD8B2BE8C7688), LazyThreadSafetyMode.None); + public ref bool UseScalarForTextureCoordinate { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B2BE8C7688)); + get => ref _Handle.AsRef(_UseScalarForTextureCoordinateOffset.Value); } + private static readonly Lazy _ScalarFieldForTextureCoordinateOffset = new(() => Schema.GetOffset(0x9BCDD8B2455C28F7), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t ScalarFieldForTextureCoordinate { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x9BCDD8B2455C28F7)); + get => new ParticleAttributeIndex_tImpl(_Handle + _ScalarFieldForTextureCoordinateOffset.Value); } + private static readonly Lazy _ScalarAttributeTextureCoordScaleOffset = new(() => Schema.GetOffset(0x9BCDD8B279F074DD), LazyThreadSafetyMode.None); + public ref float ScalarAttributeTextureCoordScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B279F074DD)); + get => ref _Handle.AsRef(_ScalarAttributeTextureCoordScaleOffset.Value); } + private static readonly Lazy _ReverseOrderOffset = new(() => Schema.GetOffset(0x9BCDD8B212C75F97), LazyThreadSafetyMode.None); + public ref bool ReverseOrder { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B212C75F97)); + get => ref _Handle.AsRef(_ReverseOrderOffset.Value); } + private static readonly Lazy _ClosedLoopOffset = new(() => Schema.GetOffset(0x9BCDD8B27C20D1AB), LazyThreadSafetyMode.None); + public ref bool ClosedLoop { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B27C20D1AB)); + get => ref _Handle.AsRef(_ClosedLoopOffset.Value); } + private static readonly Lazy _SplitFieldOffset = new(() => Schema.GetOffset(0x9BCDD8B205F58FA9), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t SplitField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x9BCDD8B205F58FA9)); + get => new ParticleAttributeIndex_tImpl(_Handle + _SplitFieldOffset.Value); } + private static readonly Lazy _SortBySegmentIDOffset = new(() => Schema.GetOffset(0x9BCDD8B246C71BC4), LazyThreadSafetyMode.None); + public ref bool SortBySegmentID { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B246C71BC4)); + get => ref _Handle.AsRef(_SortBySegmentIDOffset.Value); } + private static readonly Lazy _OrientationTypeOffset = new(() => Schema.GetOffset(0x9BCDD8B2931FA045), LazyThreadSafetyMode.None); + public ref ParticleOrientationChoiceList_t OrientationType { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B2931FA045)); + get => ref _Handle.AsRef(_OrientationTypeOffset.Value); } + private static readonly Lazy _VectorFieldForOrientationOffset = new(() => Schema.GetOffset(0x9BCDD8B2D2DFF7F5), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t VectorFieldForOrientation { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x9BCDD8B2D2DFF7F5)); + get => new ParticleAttributeIndex_tImpl(_Handle + _VectorFieldForOrientationOffset.Value); } + private static readonly Lazy _DrawAsOpaqueOffset = new(() => Schema.GetOffset(0x9BCDD8B23556AEE4), LazyThreadSafetyMode.None); + public ref bool DrawAsOpaque { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B23556AEE4)); + get => ref _Handle.AsRef(_DrawAsOpaqueOffset.Value); } + private static readonly Lazy _GenerateNormalsOffset = new(() => Schema.GetOffset(0x9BCDD8B20FBDD8F6), LazyThreadSafetyMode.None); + public ref bool GenerateNormals { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BCDD8B20FBDD8F6)); + get => ref _Handle.AsRef(_GenerateNormalsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderScreenShakeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderScreenShakeImpl.cs index 00fea8394..a15ef0b9c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderScreenShakeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderScreenShakeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class C_OP_RenderScreenShakeImpl : CParticleFunctionRendererImp public C_OP_RenderScreenShakeImpl(nint handle) : base(handle) { } + private static readonly Lazy _DurationScaleOffset = new(() => Schema.GetOffset(0x37508849776D4203), LazyThreadSafetyMode.None); + public ref float DurationScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x37508849776D4203)); + get => ref _Handle.AsRef(_DurationScaleOffset.Value); } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0x37508849A7A20159), LazyThreadSafetyMode.None); + public ref float RadiusScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x37508849A7A20159)); + get => ref _Handle.AsRef(_RadiusScaleOffset.Value); } + private static readonly Lazy _FrequencyScaleOffset = new(() => Schema.GetOffset(0x375088494B5C34F7), LazyThreadSafetyMode.None); + public ref float FrequencyScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x375088494B5C34F7)); + get => ref _Handle.AsRef(_FrequencyScaleOffset.Value); } + private static readonly Lazy _AmplitudeScaleOffset = new(() => Schema.GetOffset(0x37508849BF90DF5A), LazyThreadSafetyMode.None); + public ref float AmplitudeScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x37508849BF90DF5A)); + get => ref _Handle.AsRef(_AmplitudeScaleOffset.Value); } + private static readonly Lazy _RadiusFieldOffset = new(() => Schema.GetOffset(0x375088494B15FC11), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t RadiusField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x375088494B15FC11)); + get => new ParticleAttributeIndex_tImpl(_Handle + _RadiusFieldOffset.Value); } + private static readonly Lazy _DurationFieldOffset = new(() => Schema.GetOffset(0x37508849B21EDAAB), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t DurationField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x37508849B21EDAAB)); + get => new ParticleAttributeIndex_tImpl(_Handle + _DurationFieldOffset.Value); } + private static readonly Lazy _FrequencyFieldOffset = new(() => Schema.GetOffset(0x37508849DDA055AF), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FrequencyField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x37508849DDA055AF)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FrequencyFieldOffset.Value); } + private static readonly Lazy _AmplitudeFieldOffset = new(() => Schema.GetOffset(0x37508849F8F54FD2), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t AmplitudeField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x37508849F8F54FD2)); + get => new ParticleAttributeIndex_tImpl(_Handle + _AmplitudeFieldOffset.Value); } + private static readonly Lazy _FilterCPOffset = new(() => Schema.GetOffset(0x375088499304E130), LazyThreadSafetyMode.None); + public ref int FilterCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x375088499304E130)); + get => ref _Handle.AsRef(_FilterCPOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderScreenVelocityRotateImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderScreenVelocityRotateImpl.cs index cf4b1be41..7d72e6bd4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderScreenVelocityRotateImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderScreenVelocityRotateImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_RenderScreenVelocityRotateImpl : CParticleFunctionRe public C_OP_RenderScreenVelocityRotateImpl(nint handle) : base(handle) { } + private static readonly Lazy _RotateRateDegreesOffset = new(() => Schema.GetOffset(0x6288600D11A21BC7), LazyThreadSafetyMode.None); + public ref float RotateRateDegrees { - get => ref _Handle.AsRef(Schema.GetOffset(0x6288600D11A21BC7)); + get => ref _Handle.AsRef(_RotateRateDegreesOffset.Value); } + private static readonly Lazy _ForwardDegreesOffset = new(() => Schema.GetOffset(0x6288600D44D44C45), LazyThreadSafetyMode.None); + public ref float ForwardDegrees { - get => ref _Handle.AsRef(Schema.GetOffset(0x6288600D44D44C45)); + get => ref _Handle.AsRef(_ForwardDegreesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderSimpleModelCollectionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderSimpleModelCollectionImpl.cs index 5ac34d3cc..4011b414b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderSimpleModelCollectionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderSimpleModelCollectionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class C_OP_RenderSimpleModelCollectionImpl : CParticleFunctionR public C_OP_RenderSimpleModelCollectionImpl(nint handle) : base(handle) { } + private static readonly Lazy _CenterOffsetOffset = new(() => Schema.GetOffset(0xFCE69AE8E2C912BF), LazyThreadSafetyMode.None); + public ref bool CenterOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCE69AE8E2C912BF)); + get => ref _Handle.AsRef(_CenterOffsetOffset.Value); } + private static readonly Lazy _ModelOffset = new(() => Schema.GetOffset(0xFCE69AE8E100C814), LazyThreadSafetyMode.None); + public ref CStrongHandle Model { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFCE69AE8E100C814)); + get => ref _Handle.AsRef>(_ModelOffset.Value); } + private static readonly Lazy _ModelInputOffset = new(() => Schema.GetOffset(0xFCE69AE8EB74120E), LazyThreadSafetyMode.None); + public CParticleModelInput ModelInput { - get => new CParticleModelInputImpl(_Handle + Schema.GetOffset(0xFCE69AE8EB74120E)); + get => new CParticleModelInputImpl(_Handle + _ModelInputOffset.Value); } + private static readonly Lazy _SizeCullScaleOffset = new(() => Schema.GetOffset(0xFCE69AE89AB1415E), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput SizeCullScale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xFCE69AE89AB1415E)); + get => new CParticleCollectionFloatInputImpl(_Handle + _SizeCullScaleOffset.Value); } + private static readonly Lazy _DisableShadowsOffset = new(() => Schema.GetOffset(0xFCE69AE8161A1880), LazyThreadSafetyMode.None); + public ref bool DisableShadows { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCE69AE8161A1880)); + get => ref _Handle.AsRef(_DisableShadowsOffset.Value); } + private static readonly Lazy _DisableMotionBlurOffset = new(() => Schema.GetOffset(0xFCE69AE80A3CF924), LazyThreadSafetyMode.None); + public ref bool DisableMotionBlur { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCE69AE80A3CF924)); + get => ref _Handle.AsRef(_DisableMotionBlurOffset.Value); } + private static readonly Lazy _AcceptsDecalsOffset = new(() => Schema.GetOffset(0xFCE69AE83D83AB88), LazyThreadSafetyMode.None); + public ref bool AcceptsDecals { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCE69AE83D83AB88)); + get => ref _Handle.AsRef(_AcceptsDecalsOffset.Value); } + private static readonly Lazy _DrawFilterOffset = new(() => Schema.GetOffset(0xFCE69AE8FD854541), LazyThreadSafetyMode.None); + public CPerParticleFloatInput DrawFilter { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xFCE69AE8FD854541)); + get => new CPerParticleFloatInputImpl(_Handle + _DrawFilterOffset.Value); } + private static readonly Lazy _AngularVelocityFieldOffset = new(() => Schema.GetOffset(0xFCE69AE81A8493FE), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t AngularVelocityField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xFCE69AE81A8493FE)); + get => new ParticleAttributeIndex_tImpl(_Handle + _AngularVelocityFieldOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderSoundImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderSoundImpl.cs index f06df19bc..bec1febcf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderSoundImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderSoundImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,45 +17,69 @@ internal partial class C_OP_RenderSoundImpl : CParticleFunctionRendererImpl, C_O public C_OP_RenderSoundImpl(nint handle) : base(handle) { } + private static readonly Lazy _DurationScaleOffset = new(() => Schema.GetOffset(0xBDBBFDFC776D4203), LazyThreadSafetyMode.None); + public ref float DurationScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xBDBBFDFC776D4203)); + get => ref _Handle.AsRef(_DurationScaleOffset.Value); } + private static readonly Lazy _SndLvlScaleOffset = new(() => Schema.GetOffset(0xBDBBFDFC19AAA97E), LazyThreadSafetyMode.None); + public ref float SndLvlScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xBDBBFDFC19AAA97E)); + get => ref _Handle.AsRef(_SndLvlScaleOffset.Value); } + private static readonly Lazy _PitchScaleOffset = new(() => Schema.GetOffset(0xBDBBFDFCBBEE57F3), LazyThreadSafetyMode.None); + public ref float PitchScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xBDBBFDFCBBEE57F3)); + get => ref _Handle.AsRef(_PitchScaleOffset.Value); } + private static readonly Lazy _VolumeScaleOffset = new(() => Schema.GetOffset(0xBDBBFDFCDFBFD5FD), LazyThreadSafetyMode.None); + public ref float VolumeScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xBDBBFDFCDFBFD5FD)); + get => ref _Handle.AsRef(_VolumeScaleOffset.Value); } + private static readonly Lazy _SndLvlFieldOffset = new(() => Schema.GetOffset(0xBDBBFDFC17E2BD46), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t SndLvlField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xBDBBFDFC17E2BD46)); + get => new ParticleAttributeIndex_tImpl(_Handle + _SndLvlFieldOffset.Value); } + private static readonly Lazy _DurationFieldOffset = new(() => Schema.GetOffset(0xBDBBFDFCB21EDAAB), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t DurationField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xBDBBFDFCB21EDAAB)); + get => new ParticleAttributeIndex_tImpl(_Handle + _DurationFieldOffset.Value); } + private static readonly Lazy _PitchFieldOffset = new(() => Schema.GetOffset(0xBDBBFDFC6E37791F), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t PitchField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xBDBBFDFC6E37791F)); + get => new ParticleAttributeIndex_tImpl(_Handle + _PitchFieldOffset.Value); } + private static readonly Lazy _VolumeFieldOffset = new(() => Schema.GetOffset(0xBDBBFDFC3F07D465), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t VolumeField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xBDBBFDFC3F07D465)); + get => new ParticleAttributeIndex_tImpl(_Handle + _VolumeFieldOffset.Value); } + private static readonly Lazy _ChannelOffset = new(() => Schema.GetOffset(0xBDBBFDFCC4CD80F8), LazyThreadSafetyMode.None); + public ref int Channel { - get => ref _Handle.AsRef(Schema.GetOffset(0xBDBBFDFCC4CD80F8)); + get => ref _Handle.AsRef(_ChannelOffset.Value); } + private static readonly Lazy _CPReferenceOffset = new(() => Schema.GetOffset(0xBDBBFDFC1349FFE7), LazyThreadSafetyMode.None); + public ref int CPReference { - get => ref _Handle.AsRef(Schema.GetOffset(0xBDBBFDFC1349FFE7)); + get => ref _Handle.AsRef(_CPReferenceOffset.Value); } + private static readonly Lazy _SoundNameOffset = new(() => Schema.GetOffset(0xBDBBFDFC26D82A1A), LazyThreadSafetyMode.None); + public string SoundName { get { - var ptr = _Handle + Schema.GetOffset(0xBDBBFDFC26D82A1A); + var ptr = _Handle + _SoundNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xBDBBFDFC26D82A1A, value, 256); + set => Schema.SetFixedString(_Handle, _SoundNameOffset.Value, value, 256); } + private static readonly Lazy _SuppressStopSoundEventOffset = new(() => Schema.GetOffset(0xBDBBFDFC76AD7797), LazyThreadSafetyMode.None); + public ref bool SuppressStopSoundEvent { - get => ref _Handle.AsRef(Schema.GetOffset(0xBDBBFDFC76AD7797)); + get => ref _Handle.AsRef(_SuppressStopSoundEventOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderSpritesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderSpritesImpl.cs index 6ad9c4ae6..1df8e6c59 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderSpritesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderSpritesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,95 +17,155 @@ internal partial class C_OP_RenderSpritesImpl : CBaseRendererSource2Impl, C_OP_R public C_OP_RenderSpritesImpl(nint handle) : base(handle) { } + private static readonly Lazy _SequenceOverrideOffset = new(() => Schema.GetOffset(0x35C7913533862044), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput SequenceOverride { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x35C7913533862044)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _SequenceOverrideOffset.Value); } + private static readonly Lazy _SequenceNumbersAreRawSequenceIndicesOffset = new(() => Schema.GetOffset(0x35C79135306EF03C), LazyThreadSafetyMode.None); + public ref bool SequenceNumbersAreRawSequenceIndices { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C79135306EF03C)); + get => ref _Handle.AsRef(_SequenceNumbersAreRawSequenceIndicesOffset.Value); } + private static readonly Lazy _OrientationTypeOffset = new(() => Schema.GetOffset(0x35C79135931FA045), LazyThreadSafetyMode.None); + public ref ParticleOrientationChoiceList_t OrientationType { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C79135931FA045)); + get => ref _Handle.AsRef(_OrientationTypeOffset.Value); } + private static readonly Lazy _OrientationControlPointOffset = new(() => Schema.GetOffset(0x35C7913555B5B328), LazyThreadSafetyMode.None); + public ref int OrientationControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C7913555B5B328)); + get => ref _Handle.AsRef(_OrientationControlPointOffset.Value); } + private static readonly Lazy _UseYawWithNormalAlignedOffset = new(() => Schema.GetOffset(0x35C79135A7AF0D54), LazyThreadSafetyMode.None); + public ref bool UseYawWithNormalAligned { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C79135A7AF0D54)); + get => ref _Handle.AsRef(_UseYawWithNormalAlignedOffset.Value); } + private static readonly Lazy _MinSizeOffset = new(() => Schema.GetOffset(0x35C79135BDC3B198), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput MinSize { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x35C79135BDC3B198)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _MinSizeOffset.Value); } + private static readonly Lazy _MaxSizeOffset = new(() => Schema.GetOffset(0x35C791358CA4E6BE), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput MaxSize { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x35C791358CA4E6BE)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _MaxSizeOffset.Value); } + private static readonly Lazy _AlphaAdjustWithSizeAdjustOffset = new(() => Schema.GetOffset(0x35C791355B30C850), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput AlphaAdjustWithSizeAdjust { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x35C791355B30C850)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _AlphaAdjustWithSizeAdjustOffset.Value); } + private static readonly Lazy _StartFadeSizeOffset = new(() => Schema.GetOffset(0x35C79135BA251D92), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput StartFadeSize { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x35C79135BA251D92)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _StartFadeSizeOffset.Value); } + private static readonly Lazy _EndFadeSizeOffset = new(() => Schema.GetOffset(0x35C791352D3FD423), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput EndFadeSize { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x35C791352D3FD423)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _EndFadeSizeOffset.Value); } + private static readonly Lazy _StartFadeDotOffset = new(() => Schema.GetOffset(0x35C79135A5D81E0E), LazyThreadSafetyMode.None); + public ref float StartFadeDot { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C79135A5D81E0E)); + get => ref _Handle.AsRef(_StartFadeDotOffset.Value); } + private static readonly Lazy _EndFadeDotOffset = new(() => Schema.GetOffset(0x35C79135D549B121), LazyThreadSafetyMode.None); + public ref float EndFadeDot { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C79135D549B121)); + get => ref _Handle.AsRef(_EndFadeDotOffset.Value); } + private static readonly Lazy _DistanceAlphaOffset = new(() => Schema.GetOffset(0x35C79135CF65F35A), LazyThreadSafetyMode.None); + public ref bool DistanceAlpha { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C79135CF65F35A)); + get => ref _Handle.AsRef(_DistanceAlphaOffset.Value); } + private static readonly Lazy _SoftEdgesOffset = new(() => Schema.GetOffset(0x35C791354D56D8CD), LazyThreadSafetyMode.None); + public ref bool SoftEdges { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C791354D56D8CD)); + get => ref _Handle.AsRef(_SoftEdgesOffset.Value); } + private static readonly Lazy _EdgeSoftnessStartOffset = new(() => Schema.GetOffset(0x35C7913583B977AF), LazyThreadSafetyMode.None); + public ref float EdgeSoftnessStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C7913583B977AF)); + get => ref _Handle.AsRef(_EdgeSoftnessStartOffset.Value); } + private static readonly Lazy _EdgeSoftnessEndOffset = new(() => Schema.GetOffset(0x35C79135801CC13A), LazyThreadSafetyMode.None); + public ref float EdgeSoftnessEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C79135801CC13A)); + get => ref _Handle.AsRef(_EdgeSoftnessEndOffset.Value); } + private static readonly Lazy _OutlineOffset = new(() => Schema.GetOffset(0x35C79135E5CA479D), LazyThreadSafetyMode.None); + public ref bool Outline { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C79135E5CA479D)); + get => ref _Handle.AsRef(_OutlineOffset.Value); } + private static readonly Lazy _OutlineColorOffset = new(() => Schema.GetOffset(0x35C7913575B94BB0), LazyThreadSafetyMode.None); + public ref Color OutlineColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C7913575B94BB0)); + get => ref _Handle.AsRef(_OutlineColorOffset.Value); } + private static readonly Lazy _OutlineAlphaOffset = new(() => Schema.GetOffset(0x35C79135290C6707), LazyThreadSafetyMode.None); + public ref int OutlineAlpha { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C79135290C6707)); + get => ref _Handle.AsRef(_OutlineAlphaOffset.Value); } + private static readonly Lazy _OutlineStart0Offset = new(() => Schema.GetOffset(0x35C7913500B6410B), LazyThreadSafetyMode.None); + public ref float OutlineStart0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C7913500B6410B)); + get => ref _Handle.AsRef(_OutlineStart0Offset.Value); } + private static readonly Lazy _OutlineStart1Offset = new(() => Schema.GetOffset(0x35C79135FFB63F78), LazyThreadSafetyMode.None); + public ref float OutlineStart1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C79135FFB63F78)); + get => ref _Handle.AsRef(_OutlineStart1Offset.Value); } + private static readonly Lazy _OutlineEnd0Offset = new(() => Schema.GetOffset(0x35C79135D8EF5788), LazyThreadSafetyMode.None); + public ref float OutlineEnd0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C79135D8EF5788)); + get => ref _Handle.AsRef(_OutlineEnd0Offset.Value); } + private static readonly Lazy _OutlineEnd1Offset = new(() => Schema.GetOffset(0x35C79135D9EF591B), LazyThreadSafetyMode.None); + public ref float OutlineEnd1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C79135D9EF591B)); + get => ref _Handle.AsRef(_OutlineEnd1Offset.Value); } + private static readonly Lazy _LightingModeOffset = new(() => Schema.GetOffset(0x35C791359C9B184A), LazyThreadSafetyMode.None); + public ref ParticleLightingQuality_t LightingMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C791359C9B184A)); + get => ref _Handle.AsRef(_LightingModeOffset.Value); } + private static readonly Lazy _LightingOverrideOffset = new(() => Schema.GetOffset(0x35C791354A443819), LazyThreadSafetyMode.None); + public CParticleCollectionRendererVecInput LightingOverride { - get => new CParticleCollectionRendererVecInputImpl(_Handle + Schema.GetOffset(0x35C791354A443819)); + get => new CParticleCollectionRendererVecInputImpl(_Handle + _LightingOverrideOffset.Value); } + private static readonly Lazy _LightingTessellationOffset = new(() => Schema.GetOffset(0x35C791354CFEA24E), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput LightingTessellation { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x35C791354CFEA24E)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _LightingTessellationOffset.Value); } + private static readonly Lazy _LightingDirectionalityOffset = new(() => Schema.GetOffset(0x35C7913575690583), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput LightingDirectionality { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x35C7913575690583)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _LightingDirectionalityOffset.Value); } + private static readonly Lazy _ParticleShadowsOffset = new(() => Schema.GetOffset(0x35C7913544427B1C), LazyThreadSafetyMode.None); + public ref bool ParticleShadows { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C7913544427B1C)); + get => ref _Handle.AsRef(_ParticleShadowsOffset.Value); } + private static readonly Lazy _ShadowDensityOffset = new(() => Schema.GetOffset(0x35C791352B024AE9), LazyThreadSafetyMode.None); + public ref float ShadowDensity { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C791352B024AE9)); + get => ref _Handle.AsRef(_ShadowDensityOffset.Value); } + private static readonly Lazy _ReplicationParametersOffset = new(() => Schema.GetOffset(0x35C79135C63216ED), LazyThreadSafetyMode.None); + public CReplicationParameters ReplicationParameters { - get => new CReplicationParametersImpl(_Handle + Schema.GetOffset(0x35C79135C63216ED)); + get => new CReplicationParametersImpl(_Handle + _ReplicationParametersOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderStandardLightImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderStandardLightImpl.cs index 50a577fcc..cd477fd06 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderStandardLightImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderStandardLightImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,96 +17,154 @@ internal partial class C_OP_RenderStandardLightImpl : CParticleFunctionRendererI public C_OP_RenderStandardLightImpl(nint handle) : base(handle) { } + private static readonly Lazy _LightTypeOffset = new(() => Schema.GetOffset(0x40395A8418C7B4A3), LazyThreadSafetyMode.None); + public ref ParticleLightTypeChoiceList_t LightType { - get => ref _Handle.AsRef(Schema.GetOffset(0x40395A8418C7B4A3)); + get => ref _Handle.AsRef(_LightTypeOffset.Value); } + private static readonly Lazy _ColorScaleOffset = new(() => Schema.GetOffset(0x40395A849F9BB8BA), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput ColorScale { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x40395A849F9BB8BA)); + get => new CParticleCollectionVecInputImpl(_Handle + _ColorScaleOffset.Value); } + private static readonly Lazy _ColorBlendTypeOffset = new(() => Schema.GetOffset(0x40395A84DBC6EFCF), LazyThreadSafetyMode.None); + public ref ParticleColorBlendType_t ColorBlendType { - get => ref _Handle.AsRef(Schema.GetOffset(0x40395A84DBC6EFCF)); + get => ref _Handle.AsRef(_ColorBlendTypeOffset.Value); } + private static readonly Lazy _IntensityOffset = new(() => Schema.GetOffset(0x40395A8467B5578C), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Intensity { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x40395A8467B5578C)); + get => new CParticleCollectionFloatInputImpl(_Handle + _IntensityOffset.Value); } + private static readonly Lazy _CastShadowsOffset = new(() => Schema.GetOffset(0x40395A8436113167), LazyThreadSafetyMode.None); + public ref bool CastShadows { - get => ref _Handle.AsRef(Schema.GetOffset(0x40395A8436113167)); + get => ref _Handle.AsRef(_CastShadowsOffset.Value); } + private static readonly Lazy _ThetaOffset = new(() => Schema.GetOffset(0x40395A84F8B2ACC1), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Theta { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x40395A84F8B2ACC1)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ThetaOffset.Value); } + private static readonly Lazy _PhiOffset = new(() => Schema.GetOffset(0x40395A84957450E2), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Phi { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x40395A84957450E2)); + get => new CParticleCollectionFloatInputImpl(_Handle + _PhiOffset.Value); } + private static readonly Lazy _RadiusMultiplierOffset = new(() => Schema.GetOffset(0x40395A849DF78C5E), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput RadiusMultiplier { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x40395A849DF78C5E)); + get => new CParticleCollectionFloatInputImpl(_Handle + _RadiusMultiplierOffset.Value); } + private static readonly Lazy _AttenuationStyleOffset = new(() => Schema.GetOffset(0x40395A84AB09C83C), LazyThreadSafetyMode.None); + public ref StandardLightingAttenuationStyle_t AttenuationStyle { - get => ref _Handle.AsRef(Schema.GetOffset(0x40395A84AB09C83C)); + get => ref _Handle.AsRef(_AttenuationStyleOffset.Value); } + private static readonly Lazy _FalloffLinearityOffset = new(() => Schema.GetOffset(0x40395A84CD7C8366), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput FalloffLinearity { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x40395A84CD7C8366)); + get => new CParticleCollectionFloatInputImpl(_Handle + _FalloffLinearityOffset.Value); } + private static readonly Lazy _FiftyPercentFalloffOffset = new(() => Schema.GetOffset(0x40395A84C955CBBA), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput FiftyPercentFalloff { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x40395A84C955CBBA)); + get => new CParticleCollectionFloatInputImpl(_Handle + _FiftyPercentFalloffOffset.Value); } + private static readonly Lazy _ZeroPercentFalloffOffset = new(() => Schema.GetOffset(0x40395A8407053988), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ZeroPercentFalloff { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x40395A8407053988)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ZeroPercentFalloffOffset.Value); } + private static readonly Lazy _RenderDiffuseOffset = new(() => Schema.GetOffset(0x40395A84DEDF2F65), LazyThreadSafetyMode.None); + public ref bool RenderDiffuse { - get => ref _Handle.AsRef(Schema.GetOffset(0x40395A84DEDF2F65)); + get => ref _Handle.AsRef(_RenderDiffuseOffset.Value); } + private static readonly Lazy _RenderSpecularOffset = new(() => Schema.GetOffset(0x40395A84AF965178), LazyThreadSafetyMode.None); + public ref bool RenderSpecular { - get => ref _Handle.AsRef(Schema.GetOffset(0x40395A84AF965178)); + get => ref _Handle.AsRef(_RenderSpecularOffset.Value); } + private static readonly Lazy _LightCookieOffset = new(() => Schema.GetOffset(0x40395A84E1B0CA41), LazyThreadSafetyMode.None); + public string LightCookie { get { - var ptr = _Handle.Read(Schema.GetOffset(0x40395A84E1B0CA41)); + var ptr = _Handle.Read(_LightCookieOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x40395A84E1B0CA41, value); + set => Schema.SetString(_Handle, _LightCookieOffset.Value, value); } + private static readonly Lazy _PriorityOffset = new(() => Schema.GetOffset(0x40395A84E7EFB335), LazyThreadSafetyMode.None); + public ref int Priority { - get => ref _Handle.AsRef(Schema.GetOffset(0x40395A84E7EFB335)); + get => ref _Handle.AsRef(_PriorityOffset.Value); } + private static readonly Lazy _FogLightingModeOffset = new(() => Schema.GetOffset(0x40395A8468C76B34), LazyThreadSafetyMode.None); + public ref ParticleLightFogLightingMode_t FogLightingMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x40395A8468C76B34)); + get => ref _Handle.AsRef(_FogLightingModeOffset.Value); } + private static readonly Lazy _FogContributionOffset = new(() => Schema.GetOffset(0x40395A841B30F043), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput FogContribution { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x40395A841B30F043)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _FogContributionOffset.Value); } + private static readonly Lazy _CapsuleLightBehaviorOffset = new(() => Schema.GetOffset(0x40395A8454DF782E), LazyThreadSafetyMode.None); + public ref ParticleLightBehaviorChoiceList_t CapsuleLightBehavior { - get => ref _Handle.AsRef(Schema.GetOffset(0x40395A8454DF782E)); + get => ref _Handle.AsRef(_CapsuleLightBehaviorOffset.Value); } + private static readonly Lazy _CapsuleLengthOffset = new(() => Schema.GetOffset(0x40395A84F692B376), LazyThreadSafetyMode.None); + public ref float CapsuleLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x40395A84F692B376)); + get => ref _Handle.AsRef(_CapsuleLengthOffset.Value); } + private static readonly Lazy _ReverseOrderOffset = new(() => Schema.GetOffset(0x40395A8412C75F97), LazyThreadSafetyMode.None); + public ref bool ReverseOrder { - get => ref _Handle.AsRef(Schema.GetOffset(0x40395A8412C75F97)); + get => ref _Handle.AsRef(_ReverseOrderOffset.Value); } + private static readonly Lazy _ClosedLoopOffset = new(() => Schema.GetOffset(0x40395A847C20D1AB), LazyThreadSafetyMode.None); + public ref bool ClosedLoop { - get => ref _Handle.AsRef(Schema.GetOffset(0x40395A847C20D1AB)); + get => ref _Handle.AsRef(_ClosedLoopOffset.Value); } + private static readonly Lazy _PrevPntSourceOffset = new(() => Schema.GetOffset(0x40395A84E1E5B3D3), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t PrevPntSource { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x40395A84E1E5B3D3)); + get => new ParticleAttributeIndex_tImpl(_Handle + _PrevPntSourceOffset.Value); } + private static readonly Lazy _MaxLengthOffset = new(() => Schema.GetOffset(0x40395A8487A8B4C7), LazyThreadSafetyMode.None); + public ref float MaxLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x40395A8487A8B4C7)); + get => ref _Handle.AsRef(_MaxLengthOffset.Value); } + private static readonly Lazy _MinLengthOffset = new(() => Schema.GetOffset(0x40395A8495FB8E51), LazyThreadSafetyMode.None); + public ref float MinLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x40395A8495FB8E51)); + get => ref _Handle.AsRef(_MinLengthOffset.Value); } + private static readonly Lazy _IgnoreDTOffset = new(() => Schema.GetOffset(0x40395A84530C3863), LazyThreadSafetyMode.None); + public ref bool IgnoreDT { - get => ref _Handle.AsRef(Schema.GetOffset(0x40395A84530C3863)); + get => ref _Handle.AsRef(_IgnoreDTOffset.Value); } + private static readonly Lazy _ConstrainRadiusToLengthRatioOffset = new(() => Schema.GetOffset(0x40395A8492B0E52E), LazyThreadSafetyMode.None); + public ref float ConstrainRadiusToLengthRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0x40395A8492B0E52E)); + get => ref _Handle.AsRef(_ConstrainRadiusToLengthRatioOffset.Value); } + private static readonly Lazy _LengthScaleOffset = new(() => Schema.GetOffset(0x40395A84E312BAFF), LazyThreadSafetyMode.None); + public ref float LengthScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x40395A84E312BAFF)); + get => ref _Handle.AsRef(_LengthScaleOffset.Value); } + private static readonly Lazy _LengthFadeInTimeOffset = new(() => Schema.GetOffset(0x40395A84F2585C63), LazyThreadSafetyMode.None); + public ref float LengthFadeInTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x40395A84F2585C63)); + get => ref _Handle.AsRef(_LengthFadeInTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderStatusEffectCitadelImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderStatusEffectCitadelImpl.cs index bec5cc6e8..bf7b4bff1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderStatusEffectCitadelImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderStatusEffectCitadelImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_RenderStatusEffectCitadelImpl : CParticleFunctionRen public C_OP_RenderStatusEffectCitadelImpl(nint handle) : base(handle) { } + private static readonly Lazy _TextureColorWarpOffset = new(() => Schema.GetOffset(0x3A3089C2C99DEE43), LazyThreadSafetyMode.None); + public ref CStrongHandle TextureColorWarp { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3A3089C2C99DEE43)); + get => ref _Handle.AsRef>(_TextureColorWarpOffset.Value); } + private static readonly Lazy _TextureNormalOffset = new(() => Schema.GetOffset(0x3A3089C298E8363D), LazyThreadSafetyMode.None); + public ref CStrongHandle TextureNormal { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3A3089C298E8363D)); + get => ref _Handle.AsRef>(_TextureNormalOffset.Value); } + private static readonly Lazy _TextureMetalnessOffset = new(() => Schema.GetOffset(0x3A3089C25ABD9B42), LazyThreadSafetyMode.None); + public ref CStrongHandle TextureMetalness { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3A3089C25ABD9B42)); + get => ref _Handle.AsRef>(_TextureMetalnessOffset.Value); } + private static readonly Lazy _TextureRoughnessOffset = new(() => Schema.GetOffset(0x3A3089C2BD0AD95C), LazyThreadSafetyMode.None); + public ref CStrongHandle TextureRoughness { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3A3089C2BD0AD95C)); + get => ref _Handle.AsRef>(_TextureRoughnessOffset.Value); } + private static readonly Lazy _TextureSelfIllumOffset = new(() => Schema.GetOffset(0x3A3089C2D815240D), LazyThreadSafetyMode.None); + public ref CStrongHandle TextureSelfIllum { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3A3089C2D815240D)); + get => ref _Handle.AsRef>(_TextureSelfIllumOffset.Value); } + private static readonly Lazy _TextureDetailOffset = new(() => Schema.GetOffset(0x3A3089C28D414A8F), LazyThreadSafetyMode.None); + public ref CStrongHandle TextureDetail { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3A3089C28D414A8F)); + get => ref _Handle.AsRef>(_TextureDetailOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderStatusEffectImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderStatusEffectImpl.cs index 92a630299..da51b5e04 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderStatusEffectImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderStatusEffectImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_RenderStatusEffectImpl : CParticleFunctionRendererIm public C_OP_RenderStatusEffectImpl(nint handle) : base(handle) { } + private static readonly Lazy _TextureColorWarpOffset = new(() => Schema.GetOffset(0x2D120E02C99DEE43), LazyThreadSafetyMode.None); + public ref CStrongHandle TextureColorWarp { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2D120E02C99DEE43)); + get => ref _Handle.AsRef>(_TextureColorWarpOffset.Value); } + private static readonly Lazy _TextureDetail2Offset = new(() => Schema.GetOffset(0x2D120E021AC8A787), LazyThreadSafetyMode.None); + public ref CStrongHandle TextureDetail2 { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2D120E021AC8A787)); + get => ref _Handle.AsRef>(_TextureDetail2Offset.Value); } + private static readonly Lazy _TextureDiffuseWarpOffset = new(() => Schema.GetOffset(0x2D120E02F91AF7A2), LazyThreadSafetyMode.None); + public ref CStrongHandle TextureDiffuseWarp { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2D120E02F91AF7A2)); + get => ref _Handle.AsRef>(_TextureDiffuseWarpOffset.Value); } + private static readonly Lazy _TextureFresnelColorWarpOffset = new(() => Schema.GetOffset(0x2D120E02C8B05C0A), LazyThreadSafetyMode.None); + public ref CStrongHandle TextureFresnelColorWarp { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2D120E02C8B05C0A)); + get => ref _Handle.AsRef>(_TextureFresnelColorWarpOffset.Value); } + private static readonly Lazy _TextureFresnelWarpOffset = new(() => Schema.GetOffset(0x2D120E020BCD7353), LazyThreadSafetyMode.None); + public ref CStrongHandle TextureFresnelWarp { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2D120E020BCD7353)); + get => ref _Handle.AsRef>(_TextureFresnelWarpOffset.Value); } + private static readonly Lazy _TextureSpecularWarpOffset = new(() => Schema.GetOffset(0x2D120E02B904CD45), LazyThreadSafetyMode.None); + public ref CStrongHandle TextureSpecularWarp { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2D120E02B904CD45)); + get => ref _Handle.AsRef>(_TextureSpecularWarpOffset.Value); } + private static readonly Lazy _TextureEnvMapOffset = new(() => Schema.GetOffset(0x2D120E0280FDA7DD), LazyThreadSafetyMode.None); + public ref CStrongHandle TextureEnvMap { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2D120E0280FDA7DD)); + get => ref _Handle.AsRef>(_TextureEnvMapOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderTextImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderTextImpl.cs index 5a39f3fcc..e1fe85562 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderTextImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderTextImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class C_OP_RenderTextImpl : CParticleFunctionRendererImpl, C_OP public C_OP_RenderTextImpl(nint handle) : base(handle) { } + private static readonly Lazy _OutlineColorOffset = new(() => Schema.GetOffset(0x376BB2E675B94BB0), LazyThreadSafetyMode.None); + public ref Color OutlineColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x376BB2E675B94BB0)); + get => ref _Handle.AsRef(_OutlineColorOffset.Value); } + private static readonly Lazy _DefaultTextOffset = new(() => Schema.GetOffset(0x376BB2E67556AF5D), LazyThreadSafetyMode.None); + public string DefaultText { get { - var ptr = _Handle.Read(Schema.GetOffset(0x376BB2E67556AF5D)); + var ptr = _Handle.Read(_DefaultTextOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x376BB2E67556AF5D, value); + set => Schema.SetString(_Handle, _DefaultTextOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderTrailsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderTrailsImpl.cs index 9ce1d0f9d..fe3cc6f92 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderTrailsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderTrailsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,65 +17,105 @@ internal partial class C_OP_RenderTrailsImpl : CBaseTrailRendererImpl, C_OP_Rend public C_OP_RenderTrailsImpl(nint handle) : base(handle) { } + private static readonly Lazy _EnableFadingAndClampingOffset = new(() => Schema.GetOffset(0xD6B804481BC56ADD), LazyThreadSafetyMode.None); + public ref bool EnableFadingAndClamping { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6B804481BC56ADD)); + get => ref _Handle.AsRef(_EnableFadingAndClampingOffset.Value); } + private static readonly Lazy _StartFadeDotOffset = new(() => Schema.GetOffset(0xD6B80448A5D81E0E), LazyThreadSafetyMode.None); + public ref float StartFadeDot { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6B80448A5D81E0E)); + get => ref _Handle.AsRef(_StartFadeDotOffset.Value); } + private static readonly Lazy _EndFadeDotOffset = new(() => Schema.GetOffset(0xD6B80448D549B121), LazyThreadSafetyMode.None); + public ref float EndFadeDot { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6B80448D549B121)); + get => ref _Handle.AsRef(_EndFadeDotOffset.Value); } + private static readonly Lazy _PrevPntSourceOffset = new(() => Schema.GetOffset(0xD6B80448E1E5B3D3), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t PrevPntSource { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xD6B80448E1E5B3D3)); + get => new ParticleAttributeIndex_tImpl(_Handle + _PrevPntSourceOffset.Value); } + private static readonly Lazy _MaxLengthOffset = new(() => Schema.GetOffset(0xD6B8044887A8B4C7), LazyThreadSafetyMode.None); + public ref float MaxLength { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6B8044887A8B4C7)); + get => ref _Handle.AsRef(_MaxLengthOffset.Value); } + private static readonly Lazy _MinLengthOffset = new(() => Schema.GetOffset(0xD6B8044895FB8E51), LazyThreadSafetyMode.None); + public ref float MinLength { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6B8044895FB8E51)); + get => ref _Handle.AsRef(_MinLengthOffset.Value); } + private static readonly Lazy _IgnoreDTOffset = new(() => Schema.GetOffset(0xD6B80448530C3863), LazyThreadSafetyMode.None); + public ref bool IgnoreDT { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6B80448530C3863)); + get => ref _Handle.AsRef(_IgnoreDTOffset.Value); } + private static readonly Lazy _ConstrainRadiusToLengthRatioOffset = new(() => Schema.GetOffset(0xD6B8044892B0E52E), LazyThreadSafetyMode.None); + public ref float ConstrainRadiusToLengthRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6B8044892B0E52E)); + get => ref _Handle.AsRef(_ConstrainRadiusToLengthRatioOffset.Value); } + private static readonly Lazy _LengthScaleOffset = new(() => Schema.GetOffset(0xD6B80448E312BAFF), LazyThreadSafetyMode.None); + public ref float LengthScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6B80448E312BAFF)); + get => ref _Handle.AsRef(_LengthScaleOffset.Value); } + private static readonly Lazy _LengthFadeInTimeOffset = new(() => Schema.GetOffset(0xD6B80448F2585C63), LazyThreadSafetyMode.None); + public ref float LengthFadeInTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6B80448F2585C63)); + get => ref _Handle.AsRef(_LengthFadeInTimeOffset.Value); } + private static readonly Lazy _RadiusHeadTaperOffset = new(() => Schema.GetOffset(0xD6B80448FA8DD87B), LazyThreadSafetyMode.None); + public CPerParticleFloatInput RadiusHeadTaper { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xD6B80448FA8DD87B)); + get => new CPerParticleFloatInputImpl(_Handle + _RadiusHeadTaperOffset.Value); } + private static readonly Lazy _HeadColorScaleOffset = new(() => Schema.GetOffset(0xD6B80448C40BF2F8), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput HeadColorScale { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xD6B80448C40BF2F8)); + get => new CParticleCollectionVecInputImpl(_Handle + _HeadColorScaleOffset.Value); } + private static readonly Lazy _HeadAlphaScaleOffset = new(() => Schema.GetOffset(0xD6B80448225B27B3), LazyThreadSafetyMode.None); + public CPerParticleFloatInput HeadAlphaScale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xD6B80448225B27B3)); + get => new CPerParticleFloatInputImpl(_Handle + _HeadAlphaScaleOffset.Value); } + private static readonly Lazy _RadiusTaperOffset = new(() => Schema.GetOffset(0xD6B804486362520D), LazyThreadSafetyMode.None); + public CPerParticleFloatInput RadiusTaper { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xD6B804486362520D)); + get => new CPerParticleFloatInputImpl(_Handle + _RadiusTaperOffset.Value); } + private static readonly Lazy _TailColorScaleOffset = new(() => Schema.GetOffset(0xD6B80448CA576A18), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput TailColorScale { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xD6B80448CA576A18)); + get => new CParticleCollectionVecInputImpl(_Handle + _TailColorScaleOffset.Value); } + private static readonly Lazy _TailAlphaScaleOffset = new(() => Schema.GetOffset(0xD6B80448E64193A3), LazyThreadSafetyMode.None); + public CPerParticleFloatInput TailAlphaScale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xD6B80448E64193A3)); + get => new CPerParticleFloatInputImpl(_Handle + _TailAlphaScaleOffset.Value); } + private static readonly Lazy _HorizCropFieldOffset = new(() => Schema.GetOffset(0xD6B8044824C3C3FD), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t HorizCropField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xD6B8044824C3C3FD)); + get => new ParticleAttributeIndex_tImpl(_Handle + _HorizCropFieldOffset.Value); } + private static readonly Lazy _VertCropFieldOffset = new(() => Schema.GetOffset(0xD6B804488C72C684), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t VertCropField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xD6B804488C72C684)); + get => new ParticleAttributeIndex_tImpl(_Handle + _VertCropFieldOffset.Value); } + private static readonly Lazy _ForwardShiftOffset = new(() => Schema.GetOffset(0xD6B80448E6A1E8D8), LazyThreadSafetyMode.None); + public ref float ForwardShift { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6B80448E6A1E8D8)); + get => ref _Handle.AsRef(_ForwardShiftOffset.Value); } + private static readonly Lazy _FlipUVBasedOnPitchYawOffset = new(() => Schema.GetOffset(0xD6B8044861C3ACF4), LazyThreadSafetyMode.None); + public ref bool FlipUVBasedOnPitchYaw { - get => ref _Handle.AsRef(Schema.GetOffset(0xD6B8044861C3ACF4)); + get => ref _Handle.AsRef(_FlipUVBasedOnPitchYawOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderTreeShakeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderTreeShakeImpl.cs index fba1fe451..00731bed9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderTreeShakeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderTreeShakeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class C_OP_RenderTreeShakeImpl : CParticleFunctionRendererImpl, public C_OP_RenderTreeShakeImpl(nint handle) : base(handle) { } + private static readonly Lazy _PeakStrengthOffset = new(() => Schema.GetOffset(0x8EB4A28DA6BB3CD1), LazyThreadSafetyMode.None); + public ref float PeakStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x8EB4A28DA6BB3CD1)); + get => ref _Handle.AsRef(_PeakStrengthOffset.Value); } + private static readonly Lazy _PeakStrengthFieldOverrideOffset = new(() => Schema.GetOffset(0x8EB4A28D78E18331), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t PeakStrengthFieldOverride { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x8EB4A28D78E18331)); + get => new ParticleAttributeIndex_tImpl(_Handle + _PeakStrengthFieldOverrideOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x8EB4A28D5ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x8EB4A28D5ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _RadiusFieldOverrideOffset = new(() => Schema.GetOffset(0x8EB4A28D53B0BAA1), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t RadiusFieldOverride { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x8EB4A28D53B0BAA1)); + get => new ParticleAttributeIndex_tImpl(_Handle + _RadiusFieldOverrideOffset.Value); } + private static readonly Lazy _ShakeDurationOffset = new(() => Schema.GetOffset(0x8EB4A28D941D986F), LazyThreadSafetyMode.None); + public ref float ShakeDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0x8EB4A28D941D986F)); + get => ref _Handle.AsRef(_ShakeDurationOffset.Value); } + private static readonly Lazy _TransitionTimeOffset = new(() => Schema.GetOffset(0x8EB4A28D8D4BFC39), LazyThreadSafetyMode.None); + public ref float TransitionTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x8EB4A28D8D4BFC39)); + get => ref _Handle.AsRef(_TransitionTimeOffset.Value); } + private static readonly Lazy _TwistAmountOffset = new(() => Schema.GetOffset(0x8EB4A28DB299B9CA), LazyThreadSafetyMode.None); + public ref float TwistAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0x8EB4A28DB299B9CA)); + get => ref _Handle.AsRef(_TwistAmountOffset.Value); } + private static readonly Lazy _RadialAmountOffset = new(() => Schema.GetOffset(0x8EB4A28DA8611998), LazyThreadSafetyMode.None); + public ref float RadialAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0x8EB4A28DA8611998)); + get => ref _Handle.AsRef(_RadialAmountOffset.Value); } + private static readonly Lazy _ControlPointOrientationAmountOffset = new(() => Schema.GetOffset(0x8EB4A28D3D28AFF4), LazyThreadSafetyMode.None); + public ref float ControlPointOrientationAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0x8EB4A28D3D28AFF4)); + get => ref _Handle.AsRef(_ControlPointOrientationAmountOffset.Value); } + private static readonly Lazy _ControlPointForLinearDirectionOffset = new(() => Schema.GetOffset(0x8EB4A28D80958783), LazyThreadSafetyMode.None); + public ref int ControlPointForLinearDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0x8EB4A28D80958783)); + get => ref _Handle.AsRef(_ControlPointForLinearDirectionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderVRHapticEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderVRHapticEventImpl.cs index 73309934c..44eb8e904 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderVRHapticEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RenderVRHapticEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_RenderVRHapticEventImpl : CParticleFunctionRendererI public C_OP_RenderVRHapticEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _HandOffset = new(() => Schema.GetOffset(0xB83C5242D49ECB4C), LazyThreadSafetyMode.None); + public ref ParticleVRHandChoiceList_t Hand { - get => ref _Handle.AsRef(Schema.GetOffset(0xB83C5242D49ECB4C)); + get => ref _Handle.AsRef(_HandOffset.Value); } + private static readonly Lazy _OutputHandCPOffset = new(() => Schema.GetOffset(0xB83C52428D35D26A), LazyThreadSafetyMode.None); + public ref int OutputHandCP { - get => ref _Handle.AsRef(Schema.GetOffset(0xB83C52428D35D26A)); + get => ref _Handle.AsRef(_OutputHandCPOffset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0xB83C5242324F6F74), LazyThreadSafetyMode.None); + public ref int OutputField { - get => ref _Handle.AsRef(Schema.GetOffset(0xB83C5242324F6F74)); + get => ref _Handle.AsRef(_OutputFieldOffset.Value); } + private static readonly Lazy _AmplitudeOffset = new(() => Schema.GetOffset(0xB83C5242B44B0E18), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Amplitude { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xB83C5242B44B0E18)); + get => new CPerParticleFloatInputImpl(_Handle + _AmplitudeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RepeatedTriggerChildGroupImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RepeatedTriggerChildGroupImpl.cs index ba1878453..2901fc774 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RepeatedTriggerChildGroupImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RepeatedTriggerChildGroupImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_RepeatedTriggerChildGroupImpl : CParticleFunctionPre public C_OP_RepeatedTriggerChildGroupImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildGroupIDOffset = new(() => Schema.GetOffset(0x3D9A0D4E3F3C965), LazyThreadSafetyMode.None); + public ref int ChildGroupID { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D9A0D4E3F3C965)); + get => ref _Handle.AsRef(_ChildGroupIDOffset.Value); } + private static readonly Lazy _ClusterRefireTimeOffset = new(() => Schema.GetOffset(0x3D9A0D47E6BEEAB), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ClusterRefireTime { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x3D9A0D47E6BEEAB)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ClusterRefireTimeOffset.Value); } + private static readonly Lazy _ClusterSizeOffset = new(() => Schema.GetOffset(0x3D9A0D4A7549FF6), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ClusterSize { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x3D9A0D4A7549FF6)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ClusterSizeOffset.Value); } + private static readonly Lazy _ClusterCooldownOffset = new(() => Schema.GetOffset(0x3D9A0D4753687EA), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ClusterCooldown { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x3D9A0D4753687EA)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ClusterCooldownOffset.Value); } + private static readonly Lazy _LimitChildCountOffset = new(() => Schema.GetOffset(0x3D9A0D4EA978249), LazyThreadSafetyMode.None); + public ref bool LimitChildCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D9A0D4EA978249)); + get => ref _Handle.AsRef(_LimitChildCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RestartAfterDurationImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RestartAfterDurationImpl.cs index 137c21717..52b28768c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RestartAfterDurationImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RestartAfterDurationImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_RestartAfterDurationImpl : CParticleFunctionOperator public C_OP_RestartAfterDurationImpl(nint handle) : base(handle) { } + private static readonly Lazy _DurationMinOffset = new(() => Schema.GetOffset(0x3F8C903A5D25DBDD), LazyThreadSafetyMode.None); + public ref float DurationMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F8C903A5D25DBDD)); + get => ref _Handle.AsRef(_DurationMinOffset.Value); } + private static readonly Lazy _DurationMaxOffset = new(() => Schema.GetOffset(0x3F8C903A671263E3), LazyThreadSafetyMode.None); + public ref float DurationMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F8C903A671263E3)); + get => ref _Handle.AsRef(_DurationMaxOffset.Value); } + private static readonly Lazy _CPOffset = new(() => Schema.GetOffset(0x3F8C903AEB661472), LazyThreadSafetyMode.None); + public ref int CP { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F8C903AEB661472)); + get => ref _Handle.AsRef(_CPOffset.Value); } + private static readonly Lazy _CPFieldOffset = new(() => Schema.GetOffset(0x3F8C903A50B79876), LazyThreadSafetyMode.None); + public ref int CPField { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F8C903A50B79876)); + get => ref _Handle.AsRef(_CPFieldOffset.Value); } + private static readonly Lazy _ChildGroupIDOffset = new(() => Schema.GetOffset(0x3F8C903AE3F3C965), LazyThreadSafetyMode.None); + public ref int ChildGroupID { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F8C903AE3F3C965)); + get => ref _Handle.AsRef(_ChildGroupIDOffset.Value); } + private static readonly Lazy _OnlyChildrenOffset = new(() => Schema.GetOffset(0x3F8C903AD53575B0), LazyThreadSafetyMode.None); + public ref bool OnlyChildren { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F8C903AD53575B0)); + get => ref _Handle.AsRef(_OnlyChildrenOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RopeSpringConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RopeSpringConstraintImpl.cs index 7f758a495..ba5acd3de 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RopeSpringConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RopeSpringConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_RopeSpringConstraintImpl : CParticleFunctionConstrai public C_OP_RopeSpringConstraintImpl(nint handle) : base(handle) { } + private static readonly Lazy _RestLengthOffset = new(() => Schema.GetOffset(0x2CF6156393AC4079), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput RestLength { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x2CF6156393AC4079)); + get => new CParticleCollectionFloatInputImpl(_Handle + _RestLengthOffset.Value); } + private static readonly Lazy _MinDistanceOffset = new(() => Schema.GetOffset(0x2CF6156392BCAD06), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput MinDistance { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x2CF6156392BCAD06)); + get => new CParticleCollectionFloatInputImpl(_Handle + _MinDistanceOffset.Value); } + private static readonly Lazy _MaxDistanceOffset = new(() => Schema.GetOffset(0x2CF6156398893360), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput MaxDistance { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x2CF6156398893360)); + get => new CParticleCollectionFloatInputImpl(_Handle + _MaxDistanceOffset.Value); } + private static readonly Lazy _AdjustmentScaleOffset = new(() => Schema.GetOffset(0x2CF61563A29D34AE), LazyThreadSafetyMode.None); + public ref float AdjustmentScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x2CF61563A29D34AE)); + get => ref _Handle.AsRef(_AdjustmentScaleOffset.Value); } + private static readonly Lazy _InitialRestingLengthOffset = new(() => Schema.GetOffset(0x2CF61563FE9273C1), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput InitialRestingLength { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x2CF61563FE9273C1)); + get => new CParticleCollectionFloatInputImpl(_Handle + _InitialRestingLengthOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RotateVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RotateVectorImpl.cs index 7ccf5ddbf..cec5a6624 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RotateVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RotateVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_RotateVectorImpl : CParticleFunctionOperatorImpl, C_ public C_OP_RotateVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x43DEF471E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x43DEF471E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _RotAxisMinOffset = new(() => Schema.GetOffset(0x43DEF471E51ED175), LazyThreadSafetyMode.None); + public ref Vector RotAxisMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x43DEF471E51ED175)); + get => ref _Handle.AsRef(_RotAxisMinOffset.Value); } + private static readonly Lazy _RotAxisMaxOffset = new(() => Schema.GetOffset(0x43DEF471CF32368B), LazyThreadSafetyMode.None); + public ref Vector RotAxisMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x43DEF471CF32368B)); + get => ref _Handle.AsRef(_RotAxisMaxOffset.Value); } + private static readonly Lazy _RotRateMinOffset = new(() => Schema.GetOffset(0x43DEF4710EE55F62), LazyThreadSafetyMode.None); + public ref float RotRateMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x43DEF4710EE55F62)); + get => ref _Handle.AsRef(_RotRateMinOffset.Value); } + private static readonly Lazy _RotRateMaxOffset = new(() => Schema.GetOffset(0x43DEF471F8D1B508), LazyThreadSafetyMode.None); + public ref float RotRateMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x43DEF471F8D1B508)); + get => ref _Handle.AsRef(_RotRateMaxOffset.Value); } + private static readonly Lazy _NormalizeOffset = new(() => Schema.GetOffset(0x43DEF47148BC424C), LazyThreadSafetyMode.None); + public ref bool Normalize { - get => ref _Handle.AsRef(Schema.GetOffset(0x43DEF47148BC424C)); + get => ref _Handle.AsRef(_NormalizeOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x43DEF471B731A42F), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Scale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x43DEF471B731A42F)); + get => new CPerParticleFloatInputImpl(_Handle + _ScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RtEnvCullImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RtEnvCullImpl.cs index e697cd1da..0248550df 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RtEnvCullImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_RtEnvCullImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,30 +17,44 @@ internal partial class C_OP_RtEnvCullImpl : CParticleFunctionOperatorImpl, C_OP_ public C_OP_RtEnvCullImpl(nint handle) : base(handle) { } + private static readonly Lazy _TestDirOffset = new(() => Schema.GetOffset(0x72531BAEC17166B4), LazyThreadSafetyMode.None); + public ref Vector TestDir { - get => ref _Handle.AsRef(Schema.GetOffset(0x72531BAEC17166B4)); + get => ref _Handle.AsRef(_TestDirOffset.Value); } + private static readonly Lazy _TestNormalOffset = new(() => Schema.GetOffset(0x72531BAED4AC77F2), LazyThreadSafetyMode.None); + public ref Vector TestNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0x72531BAED4AC77F2)); + get => ref _Handle.AsRef(_TestNormalOffset.Value); } + private static readonly Lazy _CullOnMissOffset = new(() => Schema.GetOffset(0x72531BAE5E118398), LazyThreadSafetyMode.None); + public ref bool CullOnMiss { - get => ref _Handle.AsRef(Schema.GetOffset(0x72531BAE5E118398)); + get => ref _Handle.AsRef(_CullOnMissOffset.Value); } + private static readonly Lazy _StickInsteadOfCullOffset = new(() => Schema.GetOffset(0x72531BAE343222A2), LazyThreadSafetyMode.None); + public ref bool StickInsteadOfCull { - get => ref _Handle.AsRef(Schema.GetOffset(0x72531BAE343222A2)); + get => ref _Handle.AsRef(_StickInsteadOfCullOffset.Value); } + private static readonly Lazy _RtEnvNameOffset = new(() => Schema.GetOffset(0x72531BAEC32A9775), LazyThreadSafetyMode.None); + public string RtEnvName { get { - var ptr = _Handle + Schema.GetOffset(0x72531BAEC32A9775); + var ptr = _Handle + _RtEnvNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x72531BAEC32A9775, value, 128); + set => Schema.SetFixedString(_Handle, _RtEnvNameOffset.Value, value, 128); } + private static readonly Lazy _RTEnvCPOffset = new(() => Schema.GetOffset(0x72531BAE01881731), LazyThreadSafetyMode.None); + public ref int RTEnvCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x72531BAE01881731)); + get => ref _Handle.AsRef(_RTEnvCPOffset.Value); } + private static readonly Lazy _ComponentOffset = new(() => Schema.GetOffset(0x72531BAEBFD0952C), LazyThreadSafetyMode.None); + public ref int Component { - get => ref _Handle.AsRef(Schema.GetOffset(0x72531BAEBFD0952C)); + get => ref _Handle.AsRef(_ComponentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ScreenSpaceDistanceToEdgeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ScreenSpaceDistanceToEdgeImpl.cs index 92c5e07b0..0695b7b07 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ScreenSpaceDistanceToEdgeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ScreenSpaceDistanceToEdgeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_ScreenSpaceDistanceToEdgeImpl : CParticleFunctionOpe public C_OP_ScreenSpaceDistanceToEdgeImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x5525036EE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x5525036EE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _MaxDistFromEdgeOffset = new(() => Schema.GetOffset(0x5525036E3E73EC16), LazyThreadSafetyMode.None); + public CPerParticleFloatInput MaxDistFromEdge { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x5525036E3E73EC16)); + get => new CPerParticleFloatInputImpl(_Handle + _MaxDistFromEdgeOffset.Value); } + private static readonly Lazy _OutputRemapOffset = new(() => Schema.GetOffset(0x5525036E1239396F), LazyThreadSafetyMode.None); + public CParticleRemapFloatInput OutputRemap { - get => new CParticleRemapFloatInputImpl(_Handle + Schema.GetOffset(0x5525036E1239396F)); + get => new CParticleRemapFloatInputImpl(_Handle + _OutputRemapOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x5525036EFB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x5525036EFB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ScreenSpacePositionOfTargetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ScreenSpacePositionOfTargetImpl.cs index 2d91c2348..6fd7cd435 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ScreenSpacePositionOfTargetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ScreenSpacePositionOfTargetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_ScreenSpacePositionOfTargetImpl : CParticleFunctionO public C_OP_ScreenSpacePositionOfTargetImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetPositionOffset = new(() => Schema.GetOffset(0x5FF537BA554C563B), LazyThreadSafetyMode.None); + public CPerParticleVecInput TargetPosition { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x5FF537BA554C563B)); + get => new CPerParticleVecInputImpl(_Handle + _TargetPositionOffset.Value); } + private static readonly Lazy _OututBehindnessOffset = new(() => Schema.GetOffset(0x5FF537BADB123D49), LazyThreadSafetyMode.None); + public ref bool OututBehindness { - get => ref _Handle.AsRef(Schema.GetOffset(0x5FF537BADB123D49)); + get => ref _Handle.AsRef(_OututBehindnessOffset.Value); } + private static readonly Lazy _BehindFieldOutputOffset = new(() => Schema.GetOffset(0x5FF537BA69F4F392), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t BehindFieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x5FF537BA69F4F392)); + get => new ParticleAttributeIndex_tImpl(_Handle + _BehindFieldOutputOffset.Value); } + private static readonly Lazy _BehindOutputRemapOffset = new(() => Schema.GetOffset(0x5FF537BA4B35FBF3), LazyThreadSafetyMode.None); + public CParticleRemapFloatInput BehindOutputRemap { - get => new CParticleRemapFloatInputImpl(_Handle + Schema.GetOffset(0x5FF537BA4B35FBF3)); + get => new CParticleRemapFloatInputImpl(_Handle + _BehindOutputRemapOffset.Value); } + private static readonly Lazy _BehindSetMethodOffset = new(() => Schema.GetOffset(0x5FF537BAFE7A7BDA), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t BehindSetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x5FF537BAFE7A7BDA)); + get => ref _Handle.AsRef(_BehindSetMethodOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ScreenSpaceRotateTowardTargetImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ScreenSpaceRotateTowardTargetImpl.cs index e04d9465d..1af3f5879 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ScreenSpaceRotateTowardTargetImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ScreenSpaceRotateTowardTargetImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_ScreenSpaceRotateTowardTargetImpl : CParticleFunctio public C_OP_ScreenSpaceRotateTowardTargetImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetPositionOffset = new(() => Schema.GetOffset(0xD66164FC554C563B), LazyThreadSafetyMode.None); + public CPerParticleVecInput TargetPosition { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xD66164FC554C563B)); + get => new CPerParticleVecInputImpl(_Handle + _TargetPositionOffset.Value); } + private static readonly Lazy _OutputRemapOffset = new(() => Schema.GetOffset(0xD66164FC1239396F), LazyThreadSafetyMode.None); + public CParticleRemapFloatInput OutputRemap { - get => new CParticleRemapFloatInputImpl(_Handle + Schema.GetOffset(0xD66164FC1239396F)); + get => new CParticleRemapFloatInputImpl(_Handle + _OutputRemapOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0xD66164FCFB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0xD66164FCFB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _ScreenEdgeAlignmentDistanceOffset = new(() => Schema.GetOffset(0xD66164FCDB3D3EAC), LazyThreadSafetyMode.None); + public CPerParticleFloatInput ScreenEdgeAlignmentDistance { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xD66164FCDB3D3EAC)); + get => new CPerParticleFloatInputImpl(_Handle + _ScreenEdgeAlignmentDistanceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SelectivelyEnableChildrenImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SelectivelyEnableChildrenImpl.cs index f10d44aad..5a91b1746 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SelectivelyEnableChildrenImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SelectivelyEnableChildrenImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_SelectivelyEnableChildrenImpl : CParticleFunctionPre public C_OP_SelectivelyEnableChildrenImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildGroupIDOffset = new(() => Schema.GetOffset(0x73804886E3F3C965), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ChildGroupID { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x73804886E3F3C965)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ChildGroupIDOffset.Value); } + private static readonly Lazy _FirstChildOffset = new(() => Schema.GetOffset(0x738048862DF4A8BD), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput FirstChild { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x738048862DF4A8BD)); + get => new CParticleCollectionFloatInputImpl(_Handle + _FirstChildOffset.Value); } + private static readonly Lazy _NumChildrenToEnableOffset = new(() => Schema.GetOffset(0x738048868039247A), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput NumChildrenToEnable { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x738048868039247A)); + get => new CParticleCollectionFloatInputImpl(_Handle + _NumChildrenToEnableOffset.Value); } + private static readonly Lazy _PlayEndcapOnStopOffset = new(() => Schema.GetOffset(0x73804886CEC82FA1), LazyThreadSafetyMode.None); + public ref bool PlayEndcapOnStop { - get => ref _Handle.AsRef(Schema.GetOffset(0x73804886CEC82FA1)); + get => ref _Handle.AsRef(_PlayEndcapOnStopOffset.Value); } + private static readonly Lazy _DestroyImmediatelyOffset = new(() => Schema.GetOffset(0x7380488675F43101), LazyThreadSafetyMode.None); + public ref bool DestroyImmediately { - get => ref _Handle.AsRef(Schema.GetOffset(0x7380488675F43101)); + get => ref _Handle.AsRef(_DestroyImmediatelyOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SequenceFromModelImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SequenceFromModelImpl.cs index ea383e990..fc2237d0d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SequenceFromModelImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SequenceFromModelImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_SequenceFromModelImpl : CParticleFunctionOperatorImp public C_OP_SequenceFromModelImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x16E29E953F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x16E29E953F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x16E29E95E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x16E29E95E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _FieldOutputAnimOffset = new(() => Schema.GetOffset(0x16E29E9537BE767F), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutputAnim { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x16E29E9537BE767F)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputAnimOffset.Value); } + private static readonly Lazy _InputMinOffset = new(() => Schema.GetOffset(0x16E29E95E88A0D0F), LazyThreadSafetyMode.None); + public ref float InputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x16E29E95E88A0D0F)); + get => ref _Handle.AsRef(_InputMinOffset.Value); } + private static readonly Lazy _InputMaxOffset = new(() => Schema.GetOffset(0x16E29E95D6766901), LazyThreadSafetyMode.None); + public ref float InputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x16E29E95D6766901)); + get => ref _Handle.AsRef(_InputMaxOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0x16E29E955F8D7716), LazyThreadSafetyMode.None); + public ref float OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x16E29E955F8D7716)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0x16E29E9551A0E8C4), LazyThreadSafetyMode.None); + public ref float OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x16E29E9551A0E8C4)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x16E29E95FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x16E29E95FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetAttributeToScalarExpressionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetAttributeToScalarExpressionImpl.cs index cd8903d4a..15c8a5f41 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetAttributeToScalarExpressionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetAttributeToScalarExpressionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_SetAttributeToScalarExpressionImpl : CParticleFuncti public C_OP_SetAttributeToScalarExpressionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExpressionOffset = new(() => Schema.GetOffset(0x3D6339D6160B2427), LazyThreadSafetyMode.None); + public ref ScalarExpressionType_t Expression { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D6339D6160B2427)); + get => ref _Handle.AsRef(_ExpressionOffset.Value); } + private static readonly Lazy _Input1Offset = new(() => Schema.GetOffset(0x3D6339D6E9DA2E24), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Input1 { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x3D6339D6E9DA2E24)); + get => new CPerParticleFloatInputImpl(_Handle + _Input1Offset.Value); } + private static readonly Lazy _Input2Offset = new(() => Schema.GetOffset(0x3D6339D6ECDA32DD), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Input2 { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x3D6339D6ECDA32DD)); + get => new CPerParticleFloatInputImpl(_Handle + _Input2Offset.Value); } + private static readonly Lazy _OutputRemapOffset = new(() => Schema.GetOffset(0x3D6339D61239396F), LazyThreadSafetyMode.None); + public CParticleRemapFloatInput OutputRemap { - get => new CParticleRemapFloatInputImpl(_Handle + Schema.GetOffset(0x3D6339D61239396F)); + get => new CParticleRemapFloatInputImpl(_Handle + _OutputRemapOffset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0x3D6339D6324F6F74), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t OutputField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x3D6339D6324F6F74)); + get => new ParticleAttributeIndex_tImpl(_Handle + _OutputFieldOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x3D6339D6FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D6339D6FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetCPOrientationToDirectionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetCPOrientationToDirectionImpl.cs index 5be10053a..90d310925 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetCPOrientationToDirectionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetCPOrientationToDirectionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_SetCPOrientationToDirectionImpl : CParticleFunctionO public C_OP_SetCPOrientationToDirectionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputControlPointOffset = new(() => Schema.GetOffset(0x761C6D886A869E3E), LazyThreadSafetyMode.None); + public ref int InputControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x761C6D886A869E3E)); + get => ref _Handle.AsRef(_InputControlPointOffset.Value); } + private static readonly Lazy _OutputControlPointOffset = new(() => Schema.GetOffset(0x761C6D88266B0FD9), LazyThreadSafetyMode.None); + public ref int OutputControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x761C6D88266B0FD9)); + get => ref _Handle.AsRef(_OutputControlPointOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetCPOrientationToGroundNormalImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetCPOrientationToGroundNormalImpl.cs index bc305b5f5..f363f508d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetCPOrientationToGroundNormalImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetCPOrientationToGroundNormalImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,36 +17,54 @@ internal partial class C_OP_SetCPOrientationToGroundNormalImpl : CParticleFuncti public C_OP_SetCPOrientationToGroundNormalImpl(nint handle) : base(handle) { } + private static readonly Lazy _InterpRateOffset = new(() => Schema.GetOffset(0x7BC52DA3D3B705A7), LazyThreadSafetyMode.None); + public ref float InterpRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x7BC52DA3D3B705A7)); + get => ref _Handle.AsRef(_InterpRateOffset.Value); } + private static readonly Lazy _MaxTraceLengthOffset = new(() => Schema.GetOffset(0x7BC52DA3543C3798), LazyThreadSafetyMode.None); + public ref float MaxTraceLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x7BC52DA3543C3798)); + get => ref _Handle.AsRef(_MaxTraceLengthOffset.Value); } + private static readonly Lazy _ToleranceOffset = new(() => Schema.GetOffset(0x7BC52DA38C29728E), LazyThreadSafetyMode.None); + public ref float Tolerance { - get => ref _Handle.AsRef(Schema.GetOffset(0x7BC52DA38C29728E)); + get => ref _Handle.AsRef(_ToleranceOffset.Value); } + private static readonly Lazy _TraceOffsetOffset = new(() => Schema.GetOffset(0x7BC52DA37EF6C397), LazyThreadSafetyMode.None); + public ref float TraceOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x7BC52DA37EF6C397)); + get => ref _Handle.AsRef(_TraceOffsetOffset.Value); } + private static readonly Lazy _CollisionGroupNameOffset = new(() => Schema.GetOffset(0x7BC52DA3D58A3195), LazyThreadSafetyMode.None); + public string CollisionGroupName { get { - var ptr = _Handle + Schema.GetOffset(0x7BC52DA3D58A3195); + var ptr = _Handle + _CollisionGroupNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x7BC52DA3D58A3195, value, 128); + set => Schema.SetFixedString(_Handle, _CollisionGroupNameOffset.Value, value, 128); } + private static readonly Lazy _TraceSetOffset = new(() => Schema.GetOffset(0x7BC52DA3BD26C5B2), LazyThreadSafetyMode.None); + public ref ParticleTraceSet_t TraceSet { - get => ref _Handle.AsRef(Schema.GetOffset(0x7BC52DA3BD26C5B2)); + get => ref _Handle.AsRef(_TraceSetOffset.Value); } + private static readonly Lazy _InputCPOffset = new(() => Schema.GetOffset(0x7BC52DA3F39A3C14), LazyThreadSafetyMode.None); + public ref int InputCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x7BC52DA3F39A3C14)); + get => ref _Handle.AsRef(_InputCPOffset.Value); } + private static readonly Lazy _OutputCPOffset = new(() => Schema.GetOffset(0x7BC52DA350DF5703), LazyThreadSafetyMode.None); + public ref int OutputCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x7BC52DA350DF5703)); + get => ref _Handle.AsRef(_OutputCPOffset.Value); } + private static readonly Lazy _IncludeWaterOffset = new(() => Schema.GetOffset(0x7BC52DA3EB8D4646), LazyThreadSafetyMode.None); + public ref bool IncludeWater { - get => ref _Handle.AsRef(Schema.GetOffset(0x7BC52DA3EB8D4646)); + get => ref _Handle.AsRef(_IncludeWaterOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetCPOrientationToPointAtCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetCPOrientationToPointAtCPImpl.cs index 719764029..41f7f1fcc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetCPOrientationToPointAtCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetCPOrientationToPointAtCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_SetCPOrientationToPointAtCPImpl : CParticleFunctionP public C_OP_SetCPOrientationToPointAtCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputCPOffset = new(() => Schema.GetOffset(0xEB886769F39A3C14), LazyThreadSafetyMode.None); + public ref int InputCP { - get => ref _Handle.AsRef(Schema.GetOffset(0xEB886769F39A3C14)); + get => ref _Handle.AsRef(_InputCPOffset.Value); } + private static readonly Lazy _OutputCPOffset = new(() => Schema.GetOffset(0xEB88676950DF5703), LazyThreadSafetyMode.None); + public ref int OutputCP { - get => ref _Handle.AsRef(Schema.GetOffset(0xEB88676950DF5703)); + get => ref _Handle.AsRef(_OutputCPOffset.Value); } + private static readonly Lazy _InterpolationOffset = new(() => Schema.GetOffset(0xEB886769CF55B987), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Interpolation { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xEB886769CF55B987)); + get => new CParticleCollectionFloatInputImpl(_Handle + _InterpolationOffset.Value); } + private static readonly Lazy _B2DOrientationOffset = new(() => Schema.GetOffset(0xEB886769D5B7C017), LazyThreadSafetyMode.None); + public ref bool B2DOrientation { - get => ref _Handle.AsRef(Schema.GetOffset(0xEB886769D5B7C017)); + get => ref _Handle.AsRef(_B2DOrientationOffset.Value); } + private static readonly Lazy _AvoidSingularityOffset = new(() => Schema.GetOffset(0xEB8867694B0F0B45), LazyThreadSafetyMode.None); + public ref bool AvoidSingularity { - get => ref _Handle.AsRef(Schema.GetOffset(0xEB8867694B0F0B45)); + get => ref _Handle.AsRef(_AvoidSingularityOffset.Value); } + private static readonly Lazy _PointAwayOffset = new(() => Schema.GetOffset(0xEB88676987355BAF), LazyThreadSafetyMode.None); + public ref bool PointAway { - get => ref _Handle.AsRef(Schema.GetOffset(0xEB88676987355BAF)); + get => ref _Handle.AsRef(_PointAwayOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetCPtoVectorImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetCPtoVectorImpl.cs index 228f98fe5..3d3b4b3db 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetCPtoVectorImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetCPtoVectorImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_SetCPtoVectorImpl : CParticleFunctionOperatorImpl, C public C_OP_SetCPtoVectorImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPInputOffset = new(() => Schema.GetOffset(0x799E4536FB805736), LazyThreadSafetyMode.None); + public ref int CPInput { - get => ref _Handle.AsRef(Schema.GetOffset(0x799E4536FB805736)); + get => ref _Handle.AsRef(_CPInputOffset.Value); } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0x799E4536E5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x799E4536E5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetChildControlPointsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetChildControlPointsImpl.cs index 5fdf81884..35044a61f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetChildControlPointsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetChildControlPointsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_SetChildControlPointsImpl : CParticleFunctionOperato public C_OP_SetChildControlPointsImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildGroupIDOffset = new(() => Schema.GetOffset(0x42125413E3F3C965), LazyThreadSafetyMode.None); + public ref int ChildGroupID { - get => ref _Handle.AsRef(Schema.GetOffset(0x42125413E3F3C965)); + get => ref _Handle.AsRef(_ChildGroupIDOffset.Value); } + private static readonly Lazy _FirstControlPointOffset = new(() => Schema.GetOffset(0x4212541372117650), LazyThreadSafetyMode.None); + public ref int FirstControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x4212541372117650)); + get => ref _Handle.AsRef(_FirstControlPointOffset.Value); } + private static readonly Lazy _NumControlPointsOffset = new(() => Schema.GetOffset(0x42125413551EBC4F), LazyThreadSafetyMode.None); + public ref int NumControlPoints { - get => ref _Handle.AsRef(Schema.GetOffset(0x42125413551EBC4F)); + get => ref _Handle.AsRef(_NumControlPointsOffset.Value); } + private static readonly Lazy _FirstSourcePointOffset = new(() => Schema.GetOffset(0x421254139D7DC18E), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput FirstSourcePoint { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x421254139D7DC18E)); + get => new CParticleCollectionFloatInputImpl(_Handle + _FirstSourcePointOffset.Value); } + private static readonly Lazy _ReverseOffset = new(() => Schema.GetOffset(0x42125413EA4E22E5), LazyThreadSafetyMode.None); + public ref bool Reverse { - get => ref _Handle.AsRef(Schema.GetOffset(0x42125413EA4E22E5)); + get => ref _Handle.AsRef(_ReverseOffset.Value); } + private static readonly Lazy _SetOrientationOffset = new(() => Schema.GetOffset(0x42125413E1390E37), LazyThreadSafetyMode.None); + public ref bool SetOrientation { - get => ref _Handle.AsRef(Schema.GetOffset(0x42125413E1390E37)); + get => ref _Handle.AsRef(_SetOrientationOffset.Value); } + private static readonly Lazy _OrientationOffset = new(() => Schema.GetOffset(0x42125413B02B656D), LazyThreadSafetyMode.None); + public ref ParticleOrientationType_t Orientation { - get => ref _Handle.AsRef(Schema.GetOffset(0x42125413B02B656D)); + get => ref _Handle.AsRef(_OrientationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointFieldFromVectorExpressionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointFieldFromVectorExpressionImpl.cs index d6d93944b..8a27bb0a9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointFieldFromVectorExpressionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointFieldFromVectorExpressionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_SetControlPointFieldFromVectorExpressionImpl : CPart public C_OP_SetControlPointFieldFromVectorExpressionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExpressionOffset = new(() => Schema.GetOffset(0x1A9FFD07160B2427), LazyThreadSafetyMode.None); + public ref VectorFloatExpressionType_t Expression { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A9FFD07160B2427)); + get => ref _Handle.AsRef(_ExpressionOffset.Value); } + private static readonly Lazy _Input1Offset = new(() => Schema.GetOffset(0x1A9FFD07A155BDDE), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput Input1 { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x1A9FFD07A155BDDE)); + get => new CParticleCollectionVecInputImpl(_Handle + _Input1Offset.Value); } + private static readonly Lazy _Input2Offset = new(() => Schema.GetOffset(0x1A9FFD07A055BC4B), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput Input2 { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x1A9FFD07A055BC4B)); + get => new CParticleCollectionVecInputImpl(_Handle + _Input2Offset.Value); } + private static readonly Lazy _LerpOffset = new(() => Schema.GetOffset(0x1A9FFD07622FAB06), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Lerp { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x1A9FFD07622FAB06)); + get => new CPerParticleFloatInputImpl(_Handle + _LerpOffset.Value); } + private static readonly Lazy _OutputRemapOffset = new(() => Schema.GetOffset(0x1A9FFD071239396F), LazyThreadSafetyMode.None); + public CParticleRemapFloatInput OutputRemap { - get => new CParticleRemapFloatInputImpl(_Handle + Schema.GetOffset(0x1A9FFD071239396F)); + get => new CParticleRemapFloatInputImpl(_Handle + _OutputRemapOffset.Value); } + private static readonly Lazy _OutputCPOffset = new(() => Schema.GetOffset(0x1A9FFD0750DF5703), LazyThreadSafetyMode.None); + public ref int OutputCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A9FFD0750DF5703)); + get => ref _Handle.AsRef(_OutputCPOffset.Value); } + private static readonly Lazy _OutVectorFieldOffset = new(() => Schema.GetOffset(0x1A9FFD07F9041E74), LazyThreadSafetyMode.None); + public ref int OutVectorField { - get => ref _Handle.AsRef(Schema.GetOffset(0x1A9FFD07F9041E74)); + get => ref _Handle.AsRef(_OutVectorFieldOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointFieldToScalarExpressionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointFieldToScalarExpressionImpl.cs index 735ad96d1..b400d6647 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointFieldToScalarExpressionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointFieldToScalarExpressionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_SetControlPointFieldToScalarExpressionImpl : CPartic public C_OP_SetControlPointFieldToScalarExpressionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExpressionOffset = new(() => Schema.GetOffset(0x6A8A3411160B2427), LazyThreadSafetyMode.None); + public ref ScalarExpressionType_t Expression { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8A3411160B2427)); + get => ref _Handle.AsRef(_ExpressionOffset.Value); } + private static readonly Lazy _Input1Offset = new(() => Schema.GetOffset(0x6A8A3411E9DA2E24), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Input1 { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x6A8A3411E9DA2E24)); + get => new CParticleCollectionFloatInputImpl(_Handle + _Input1Offset.Value); } + private static readonly Lazy _Input2Offset = new(() => Schema.GetOffset(0x6A8A3411ECDA32DD), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Input2 { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x6A8A3411ECDA32DD)); + get => new CParticleCollectionFloatInputImpl(_Handle + _Input2Offset.Value); } + private static readonly Lazy _OutputRemapOffset = new(() => Schema.GetOffset(0x6A8A34111239396F), LazyThreadSafetyMode.None); + public CParticleRemapFloatInput OutputRemap { - get => new CParticleRemapFloatInputImpl(_Handle + Schema.GetOffset(0x6A8A34111239396F)); + get => new CParticleRemapFloatInputImpl(_Handle + _OutputRemapOffset.Value); } + private static readonly Lazy _OutputCPOffset = new(() => Schema.GetOffset(0x6A8A341150DF5703), LazyThreadSafetyMode.None); + public ref int OutputCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8A341150DF5703)); + get => ref _Handle.AsRef(_OutputCPOffset.Value); } + private static readonly Lazy _OutVectorFieldOffset = new(() => Schema.GetOffset(0x6A8A3411F9041E74), LazyThreadSafetyMode.None); + public ref int OutVectorField { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A8A3411F9041E74)); + get => ref _Handle.AsRef(_OutVectorFieldOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointFieldToWaterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointFieldToWaterImpl.cs index 97262e0b1..dbe222b1b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointFieldToWaterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointFieldToWaterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_SetControlPointFieldToWaterImpl : CParticleFunctionP public C_OP_SetControlPointFieldToWaterImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceCPOffset = new(() => Schema.GetOffset(0x77BA8CA24C01E3B7), LazyThreadSafetyMode.None); + public ref int SourceCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x77BA8CA24C01E3B7)); + get => ref _Handle.AsRef(_SourceCPOffset.Value); } + private static readonly Lazy _DestCPOffset = new(() => Schema.GetOffset(0x77BA8CA2E27355DA), LazyThreadSafetyMode.None); + public ref int DestCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x77BA8CA2E27355DA)); + get => ref _Handle.AsRef(_DestCPOffset.Value); } + private static readonly Lazy _CPFieldOffset = new(() => Schema.GetOffset(0x77BA8CA250B79876), LazyThreadSafetyMode.None); + public ref int CPField { - get => ref _Handle.AsRef(Schema.GetOffset(0x77BA8CA250B79876)); + get => ref _Handle.AsRef(_CPFieldOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointFromObjectScaleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointFromObjectScaleImpl.cs index 022f5d2f2..a4ca54741 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointFromObjectScaleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointFromObjectScaleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_SetControlPointFromObjectScaleImpl : CParticleFuncti public C_OP_SetControlPointFromObjectScaleImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPInputOffset = new(() => Schema.GetOffset(0xB0DB8599FB805736), LazyThreadSafetyMode.None); + public ref int CPInput { - get => ref _Handle.AsRef(Schema.GetOffset(0xB0DB8599FB805736)); + get => ref _Handle.AsRef(_CPInputOffset.Value); } + private static readonly Lazy _CPOutputOffset = new(() => Schema.GetOffset(0xB0DB85992077C953), LazyThreadSafetyMode.None); + public ref int CPOutput { - get => ref _Handle.AsRef(Schema.GetOffset(0xB0DB85992077C953)); + get => ref _Handle.AsRef(_CPOutputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointOrientationImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointOrientationImpl.cs index 5d5ba54fa..59aea365b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointOrientationImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointOrientationImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_SetControlPointOrientationImpl : CParticleFunctionPr public C_OP_SetControlPointOrientationImpl(nint handle) : base(handle) { } + private static readonly Lazy _UseWorldLocationOffset = new(() => Schema.GetOffset(0x2461079CF371AED7), LazyThreadSafetyMode.None); + public ref bool UseWorldLocation { - get => ref _Handle.AsRef(Schema.GetOffset(0x2461079CF371AED7)); + get => ref _Handle.AsRef(_UseWorldLocationOffset.Value); } + private static readonly Lazy _RandomizeOffset = new(() => Schema.GetOffset(0x2461079C4C98CC9C), LazyThreadSafetyMode.None); + public ref bool Randomize { - get => ref _Handle.AsRef(Schema.GetOffset(0x2461079C4C98CC9C)); + get => ref _Handle.AsRef(_RandomizeOffset.Value); } + private static readonly Lazy _SetOnceOffset = new(() => Schema.GetOffset(0x2461079C6B261086), LazyThreadSafetyMode.None); + public ref bool SetOnce { - get => ref _Handle.AsRef(Schema.GetOffset(0x2461079C6B261086)); + get => ref _Handle.AsRef(_SetOnceOffset.Value); } + private static readonly Lazy _CPOffset = new(() => Schema.GetOffset(0x2461079CEB661472), LazyThreadSafetyMode.None); + public ref int CP { - get => ref _Handle.AsRef(Schema.GetOffset(0x2461079CEB661472)); + get => ref _Handle.AsRef(_CPOffset.Value); } + private static readonly Lazy _HeadLocationOffset = new(() => Schema.GetOffset(0x2461079CA8ECDA78), LazyThreadSafetyMode.None); + public ref int HeadLocation { - get => ref _Handle.AsRef(Schema.GetOffset(0x2461079CA8ECDA78)); + get => ref _Handle.AsRef(_HeadLocationOffset.Value); } + private static readonly Lazy _RotationOffset = new(() => Schema.GetOffset(0x2461079C1992E6BF), LazyThreadSafetyMode.None); + public ref QAngle Rotation { - get => ref _Handle.AsRef(Schema.GetOffset(0x2461079C1992E6BF)); + get => ref _Handle.AsRef(_RotationOffset.Value); } + private static readonly Lazy _RotationBOffset = new(() => Schema.GetOffset(0x2461079C3F41A047), LazyThreadSafetyMode.None); + public ref QAngle RotationB { - get => ref _Handle.AsRef(Schema.GetOffset(0x2461079C3F41A047)); + get => ref _Handle.AsRef(_RotationBOffset.Value); } + private static readonly Lazy _InterpolationOffset = new(() => Schema.GetOffset(0x2461079CCF55B987), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Interpolation { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x2461079CCF55B987)); + get => new CParticleCollectionFloatInputImpl(_Handle + _InterpolationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointOrientationToCPVelocityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointOrientationToCPVelocityImpl.cs index 03275474b..7c8ccd74a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointOrientationToCPVelocityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointOrientationToCPVelocityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class C_OP_SetControlPointOrientationToCPVelocityImpl : CPartic public C_OP_SetControlPointOrientationToCPVelocityImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPInputOffset = new(() => Schema.GetOffset(0x8FFC9885FB805736), LazyThreadSafetyMode.None); + public ref int CPInput { - get => ref _Handle.AsRef(Schema.GetOffset(0x8FFC9885FB805736)); + get => ref _Handle.AsRef(_CPInputOffset.Value); } + private static readonly Lazy _CPOutputOffset = new(() => Schema.GetOffset(0x8FFC98852077C953), LazyThreadSafetyMode.None); + public ref int CPOutput { - get => ref _Handle.AsRef(Schema.GetOffset(0x8FFC98852077C953)); + get => ref _Handle.AsRef(_CPOutputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointPositionToRandomActiveCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointPositionToRandomActiveCPImpl.cs index 39de2f2a6..f24bdc11c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointPositionToRandomActiveCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointPositionToRandomActiveCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_SetControlPointPositionToRandomActiveCPImpl : CParti public C_OP_SetControlPointPositionToRandomActiveCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _CP1Offset = new(() => Schema.GetOffset(0x7B108D36D4B1E579), LazyThreadSafetyMode.None); + public ref int CP1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x7B108D36D4B1E579)); + get => ref _Handle.AsRef(_CP1Offset.Value); } + private static readonly Lazy _HeadLocationMinOffset = new(() => Schema.GetOffset(0x7B108D360E904014), LazyThreadSafetyMode.None); + public ref int HeadLocationMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x7B108D360E904014)); + get => ref _Handle.AsRef(_HeadLocationMinOffset.Value); } + private static readonly Lazy _HeadLocationMaxOffset = new(() => Schema.GetOffset(0x7B108D36FCA53E76), LazyThreadSafetyMode.None); + public ref int HeadLocationMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x7B108D36FCA53E76)); + get => ref _Handle.AsRef(_HeadLocationMaxOffset.Value); } + private static readonly Lazy _ResetRateOffset = new(() => Schema.GetOffset(0x7B108D369E741FFC), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ResetRate { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x7B108D369E741FFC)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ResetRateOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointPositionToTimeOfDayValueImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointPositionToTimeOfDayValueImpl.cs index acf0c90e7..ffbdb67eb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointPositionToTimeOfDayValueImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointPositionToTimeOfDayValueImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class C_OP_SetControlPointPositionToTimeOfDayValueImpl : CParti public C_OP_SetControlPointPositionToTimeOfDayValueImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x976831CB3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x976831CB3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _TimeOfDayParameterOffset = new(() => Schema.GetOffset(0x976831CB5B5E9DD3), LazyThreadSafetyMode.None); + public string TimeOfDayParameter { get { - var ptr = _Handle + Schema.GetOffset(0x976831CB5B5E9DD3); + var ptr = _Handle + _TimeOfDayParameterOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x976831CB5B5E9DD3, value, 128); + set => Schema.SetFixedString(_Handle, _TimeOfDayParameterOffset.Value, value, 128); } + private static readonly Lazy _DefaultValueOffset = new(() => Schema.GetOffset(0x976831CB0A18BFDF), LazyThreadSafetyMode.None); + public ref Vector DefaultValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x976831CB0A18BFDF)); + get => ref _Handle.AsRef(_DefaultValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointPositionsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointPositionsImpl.cs index 3008489ab..32cd49e63 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointPositionsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointPositionsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,65 @@ internal partial class C_OP_SetControlPointPositionsImpl : CParticleFunctionPreE public C_OP_SetControlPointPositionsImpl(nint handle) : base(handle) { } + private static readonly Lazy _UseWorldLocationOffset = new(() => Schema.GetOffset(0x12B1A872F371AED7), LazyThreadSafetyMode.None); + public ref bool UseWorldLocation { - get => ref _Handle.AsRef(Schema.GetOffset(0x12B1A872F371AED7)); + get => ref _Handle.AsRef(_UseWorldLocationOffset.Value); } + private static readonly Lazy _OrientOffset = new(() => Schema.GetOffset(0x12B1A8727CD61854), LazyThreadSafetyMode.None); + public ref bool Orient { - get => ref _Handle.AsRef(Schema.GetOffset(0x12B1A8727CD61854)); + get => ref _Handle.AsRef(_OrientOffset.Value); } + private static readonly Lazy _SetOnceOffset = new(() => Schema.GetOffset(0x12B1A8726B261086), LazyThreadSafetyMode.None); + public ref bool SetOnce { - get => ref _Handle.AsRef(Schema.GetOffset(0x12B1A8726B261086)); + get => ref _Handle.AsRef(_SetOnceOffset.Value); } + private static readonly Lazy _CP1Offset = new(() => Schema.GetOffset(0x12B1A872D4B1E579), LazyThreadSafetyMode.None); + public ref int CP1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x12B1A872D4B1E579)); + get => ref _Handle.AsRef(_CP1Offset.Value); } + private static readonly Lazy _CP2Offset = new(() => Schema.GetOffset(0x12B1A872D1B1E0C0), LazyThreadSafetyMode.None); + public ref int CP2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x12B1A872D1B1E0C0)); + get => ref _Handle.AsRef(_CP2Offset.Value); } + private static readonly Lazy _CP3Offset = new(() => Schema.GetOffset(0x12B1A872D2B1E253), LazyThreadSafetyMode.None); + public ref int CP3 { - get => ref _Handle.AsRef(Schema.GetOffset(0x12B1A872D2B1E253)); + get => ref _Handle.AsRef(_CP3Offset.Value); } + private static readonly Lazy _CP4Offset = new(() => Schema.GetOffset(0x12B1A872D7B1EA32), LazyThreadSafetyMode.None); + public ref int CP4 { - get => ref _Handle.AsRef(Schema.GetOffset(0x12B1A872D7B1EA32)); + get => ref _Handle.AsRef(_CP4Offset.Value); } + private static readonly Lazy _CP1PosOffset = new(() => Schema.GetOffset(0x12B1A872408288D9), LazyThreadSafetyMode.None); + public ref Vector CP1Pos { - get => ref _Handle.AsRef(Schema.GetOffset(0x12B1A872408288D9)); + get => ref _Handle.AsRef(_CP1PosOffset.Value); } + private static readonly Lazy _CP2PosOffset = new(() => Schema.GetOffset(0x12B1A872862C8D46), LazyThreadSafetyMode.None); + public ref Vector CP2Pos { - get => ref _Handle.AsRef(Schema.GetOffset(0x12B1A872862C8D46)); + get => ref _Handle.AsRef(_CP2PosOffset.Value); } + private static readonly Lazy _CP3PosOffset = new(() => Schema.GetOffset(0x12B1A872E3C5304F), LazyThreadSafetyMode.None); + public ref Vector CP3Pos { - get => ref _Handle.AsRef(Schema.GetOffset(0x12B1A872E3C5304F)); + get => ref _Handle.AsRef(_CP3PosOffset.Value); } + private static readonly Lazy _CP4PosOffset = new(() => Schema.GetOffset(0x12B1A872A5E5E51C), LazyThreadSafetyMode.None); + public ref Vector CP4Pos { - get => ref _Handle.AsRef(Schema.GetOffset(0x12B1A872A5E5E51C)); + get => ref _Handle.AsRef(_CP4PosOffset.Value); } + private static readonly Lazy _HeadLocationOffset = new(() => Schema.GetOffset(0x12B1A872A8ECDA78), LazyThreadSafetyMode.None); + public ref int HeadLocation { - get => ref _Handle.AsRef(Schema.GetOffset(0x12B1A872A8ECDA78)); + get => ref _Handle.AsRef(_HeadLocationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointRotationImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointRotationImpl.cs index 7ecc2c73a..a1ad14dfe 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointRotationImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointRotationImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_SetControlPointRotationImpl : CParticleFunctionPreEm public C_OP_SetControlPointRotationImpl(nint handle) : base(handle) { } + private static readonly Lazy _RotAxisOffset = new(() => Schema.GetOffset(0x8F20B2F891872163), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput RotAxis { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x8F20B2F891872163)); + get => new CParticleCollectionVecInputImpl(_Handle + _RotAxisOffset.Value); } + private static readonly Lazy _RotRateOffset = new(() => Schema.GetOffset(0x8F20B2F86747B556), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput RotRate { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x8F20B2F86747B556)); + get => new CParticleCollectionFloatInputImpl(_Handle + _RotRateOffset.Value); } + private static readonly Lazy _CPOffset = new(() => Schema.GetOffset(0x8F20B2F8EB661472), LazyThreadSafetyMode.None); + public ref int CP { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F20B2F8EB661472)); + get => ref _Handle.AsRef(_CPOffset.Value); } + private static readonly Lazy _LocalCPOffset = new(() => Schema.GetOffset(0x8F20B2F8ACAAFF8F), LazyThreadSafetyMode.None); + public ref int LocalCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x8F20B2F8ACAAFF8F)); + get => ref _Handle.AsRef(_LocalCPOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToCPVelocityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToCPVelocityImpl.cs index a61a8ae3b..d6c1b8b36 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToCPVelocityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToCPVelocityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_SetControlPointToCPVelocityImpl : CParticleFunctionP public C_OP_SetControlPointToCPVelocityImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPInputOffset = new(() => Schema.GetOffset(0x8D70A057FB805736), LazyThreadSafetyMode.None); + public ref int CPInput { - get => ref _Handle.AsRef(Schema.GetOffset(0x8D70A057FB805736)); + get => ref _Handle.AsRef(_CPInputOffset.Value); } + private static readonly Lazy _CPOutputVelOffset = new(() => Schema.GetOffset(0x8D70A0576AC86D06), LazyThreadSafetyMode.None); + public ref int CPOutputVel { - get => ref _Handle.AsRef(Schema.GetOffset(0x8D70A0576AC86D06)); + get => ref _Handle.AsRef(_CPOutputVelOffset.Value); } + private static readonly Lazy _NormalizeOffset = new(() => Schema.GetOffset(0x8D70A05748BC424C), LazyThreadSafetyMode.None); + public ref bool Normalize { - get => ref _Handle.AsRef(Schema.GetOffset(0x8D70A05748BC424C)); + get => ref _Handle.AsRef(_NormalizeOffset.Value); } + private static readonly Lazy _CPOutputMagOffset = new(() => Schema.GetOffset(0x8D70A05704FD82D2), LazyThreadSafetyMode.None); + public ref int CPOutputMag { - get => ref _Handle.AsRef(Schema.GetOffset(0x8D70A05704FD82D2)); + get => ref _Handle.AsRef(_CPOutputMagOffset.Value); } + private static readonly Lazy _CPFieldOffset = new(() => Schema.GetOffset(0x8D70A05750B79876), LazyThreadSafetyMode.None); + public ref int CPField { - get => ref _Handle.AsRef(Schema.GetOffset(0x8D70A05750B79876)); + get => ref _Handle.AsRef(_CPFieldOffset.Value); } + private static readonly Lazy _ComparisonVelocityOffset = new(() => Schema.GetOffset(0x8D70A05723BF409F), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput ComparisonVelocity { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x8D70A05723BF409F)); + get => new CParticleCollectionVecInputImpl(_Handle + _ComparisonVelocityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToCenterImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToCenterImpl.cs index 163b5db7d..82abd3901 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToCenterImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToCenterImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_SetControlPointToCenterImpl : CParticleFunctionPreEm public C_OP_SetControlPointToCenterImpl(nint handle) : base(handle) { } + private static readonly Lazy _CP1Offset = new(() => Schema.GetOffset(0xB2CEB7C2D4B1E579), LazyThreadSafetyMode.None); + public ref int CP1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB2CEB7C2D4B1E579)); + get => ref _Handle.AsRef(_CP1Offset.Value); } + private static readonly Lazy _CP1PosOffset = new(() => Schema.GetOffset(0xB2CEB7C2408288D9), LazyThreadSafetyMode.None); + public ref Vector CP1Pos { - get => ref _Handle.AsRef(Schema.GetOffset(0xB2CEB7C2408288D9)); + get => ref _Handle.AsRef(_CP1PosOffset.Value); } + private static readonly Lazy _UseAvgParticlePosOffset = new(() => Schema.GetOffset(0xB2CEB7C2399CEECC), LazyThreadSafetyMode.None); + public ref bool UseAvgParticlePos { - get => ref _Handle.AsRef(Schema.GetOffset(0xB2CEB7C2399CEECC)); + get => ref _Handle.AsRef(_UseAvgParticlePosOffset.Value); } + private static readonly Lazy _SetParentOffset = new(() => Schema.GetOffset(0xB2CEB7C22D8246B7), LazyThreadSafetyMode.None); + public ref ParticleParentSetMode_t SetParent { - get => ref _Handle.AsRef(Schema.GetOffset(0xB2CEB7C22D8246B7)); + get => ref _Handle.AsRef(_SetParentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToHMDImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToHMDImpl.cs index 0ef566a93..94db072bc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToHMDImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToHMDImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_SetControlPointToHMDImpl : CParticleFunctionPreEmiss public C_OP_SetControlPointToHMDImpl(nint handle) : base(handle) { } + private static readonly Lazy _CP1Offset = new(() => Schema.GetOffset(0x58898D54D4B1E579), LazyThreadSafetyMode.None); + public ref int CP1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x58898D54D4B1E579)); + get => ref _Handle.AsRef(_CP1Offset.Value); } + private static readonly Lazy _CP1PosOffset = new(() => Schema.GetOffset(0x58898D54408288D9), LazyThreadSafetyMode.None); + public ref Vector CP1Pos { - get => ref _Handle.AsRef(Schema.GetOffset(0x58898D54408288D9)); + get => ref _Handle.AsRef(_CP1PosOffset.Value); } + private static readonly Lazy _OrientToHMDOffset = new(() => Schema.GetOffset(0x58898D54F3E0D0A6), LazyThreadSafetyMode.None); + public ref bool OrientToHMD { - get => ref _Handle.AsRef(Schema.GetOffset(0x58898D54F3E0D0A6)); + get => ref _Handle.AsRef(_OrientToHMDOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToHandImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToHandImpl.cs index 3aa311540..bd3d2af13 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToHandImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToHandImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_SetControlPointToHandImpl : CParticleFunctionPreEmis public C_OP_SetControlPointToHandImpl(nint handle) : base(handle) { } + private static readonly Lazy _CP1Offset = new(() => Schema.GetOffset(0x5D527B26D4B1E579), LazyThreadSafetyMode.None); + public ref int CP1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x5D527B26D4B1E579)); + get => ref _Handle.AsRef(_CP1Offset.Value); } + private static readonly Lazy _HandOffset = new(() => Schema.GetOffset(0x5D527B26D49ECB4C), LazyThreadSafetyMode.None); + public ref int Hand { - get => ref _Handle.AsRef(Schema.GetOffset(0x5D527B26D49ECB4C)); + get => ref _Handle.AsRef(_HandOffset.Value); } + private static readonly Lazy _CP1PosOffset = new(() => Schema.GetOffset(0x5D527B26408288D9), LazyThreadSafetyMode.None); + public ref Vector CP1Pos { - get => ref _Handle.AsRef(Schema.GetOffset(0x5D527B26408288D9)); + get => ref _Handle.AsRef(_CP1PosOffset.Value); } + private static readonly Lazy _OrientToHandOffset = new(() => Schema.GetOffset(0x5D527B26372CF7D8), LazyThreadSafetyMode.None); + public ref bool OrientToHand { - get => ref _Handle.AsRef(Schema.GetOffset(0x5D527B26372CF7D8)); + get => ref _Handle.AsRef(_OrientToHandOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToImpactPointImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToImpactPointImpl.cs index cbc4cc25c..81c4d45cf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToImpactPointImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToImpactPointImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,45 +17,69 @@ internal partial class C_OP_SetControlPointToImpactPointImpl : CParticleFunction public C_OP_SetControlPointToImpactPointImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPOutOffset = new(() => Schema.GetOffset(0x5ED2C481BAE50826), LazyThreadSafetyMode.None); + public ref int CPOut { - get => ref _Handle.AsRef(Schema.GetOffset(0x5ED2C481BAE50826)); + get => ref _Handle.AsRef(_CPOutOffset.Value); } + private static readonly Lazy _CPInOffset = new(() => Schema.GetOffset(0x5ED2C481CAF7E91D), LazyThreadSafetyMode.None); + public ref int CPIn { - get => ref _Handle.AsRef(Schema.GetOffset(0x5ED2C481CAF7E91D)); + get => ref _Handle.AsRef(_CPInOffset.Value); } + private static readonly Lazy _UpdateRateOffset = new(() => Schema.GetOffset(0x5ED2C4812701581C), LazyThreadSafetyMode.None); + public ref float UpdateRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x5ED2C4812701581C)); + get => ref _Handle.AsRef(_UpdateRateOffset.Value); } + private static readonly Lazy _TraceLengthOffset = new(() => Schema.GetOffset(0x5ED2C481F5A5DE40), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput TraceLength { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x5ED2C481F5A5DE40)); + get => new CParticleCollectionFloatInputImpl(_Handle + _TraceLengthOffset.Value); } + private static readonly Lazy _StartOffsetOffset = new(() => Schema.GetOffset(0x5ED2C48169A449AA), LazyThreadSafetyMode.None); + public ref float StartOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x5ED2C48169A449AA)); + get => ref _Handle.AsRef(_StartOffsetOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0x5ED2C4817F14BA34), LazyThreadSafetyMode.None); + public ref float Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0x5ED2C4817F14BA34)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _TraceDirOffset = new(() => Schema.GetOffset(0x5ED2C481B3F09745), LazyThreadSafetyMode.None); + public ref Vector TraceDir { - get => ref _Handle.AsRef(Schema.GetOffset(0x5ED2C481B3F09745)); + get => ref _Handle.AsRef(_TraceDirOffset.Value); } + private static readonly Lazy _CollisionGroupNameOffset = new(() => Schema.GetOffset(0x5ED2C481D58A3195), LazyThreadSafetyMode.None); + public string CollisionGroupName { get { - var ptr = _Handle + Schema.GetOffset(0x5ED2C481D58A3195); + var ptr = _Handle + _CollisionGroupNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x5ED2C481D58A3195, value, 128); + set => Schema.SetFixedString(_Handle, _CollisionGroupNameOffset.Value, value, 128); } + private static readonly Lazy _TraceSetOffset = new(() => Schema.GetOffset(0x5ED2C481BD26C5B2), LazyThreadSafetyMode.None); + public ref ParticleTraceSet_t TraceSet { - get => ref _Handle.AsRef(Schema.GetOffset(0x5ED2C481BD26C5B2)); + get => ref _Handle.AsRef(_TraceSetOffset.Value); } + private static readonly Lazy _SetToEndpointOffset = new(() => Schema.GetOffset(0x5ED2C481B96F6E13), LazyThreadSafetyMode.None); + public ref bool SetToEndpoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x5ED2C481B96F6E13)); + get => ref _Handle.AsRef(_SetToEndpointOffset.Value); } + private static readonly Lazy _TraceToClosestSurfaceOffset = new(() => Schema.GetOffset(0x5ED2C4816BEE8BDD), LazyThreadSafetyMode.None); + public ref bool TraceToClosestSurface { - get => ref _Handle.AsRef(Schema.GetOffset(0x5ED2C4816BEE8BDD)); + get => ref _Handle.AsRef(_TraceToClosestSurfaceOffset.Value); } + private static readonly Lazy _IncludeWaterOffset = new(() => Schema.GetOffset(0x5ED2C481EB8D4646), LazyThreadSafetyMode.None); + public ref bool IncludeWater { - get => ref _Handle.AsRef(Schema.GetOffset(0x5ED2C481EB8D4646)); + get => ref _Handle.AsRef(_IncludeWaterOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToPlayerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToPlayerImpl.cs index 0f805f1fc..d6f5a6618 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToPlayerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToPlayerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_SetControlPointToPlayerImpl : CParticleFunctionPreEm public C_OP_SetControlPointToPlayerImpl(nint handle) : base(handle) { } + private static readonly Lazy _CP1Offset = new(() => Schema.GetOffset(0xD877DC8ED4B1E579), LazyThreadSafetyMode.None); + public ref int CP1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xD877DC8ED4B1E579)); + get => ref _Handle.AsRef(_CP1Offset.Value); } + private static readonly Lazy _CP1PosOffset = new(() => Schema.GetOffset(0xD877DC8E408288D9), LazyThreadSafetyMode.None); + public ref Vector CP1Pos { - get => ref _Handle.AsRef(Schema.GetOffset(0xD877DC8E408288D9)); + get => ref _Handle.AsRef(_CP1PosOffset.Value); } + private static readonly Lazy _OrientToEyesOffset = new(() => Schema.GetOffset(0xD877DC8E3270E4F3), LazyThreadSafetyMode.None); + public ref bool OrientToEyes { - get => ref _Handle.AsRef(Schema.GetOffset(0xD877DC8E3270E4F3)); + get => ref _Handle.AsRef(_OrientToEyesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToVectorExpressionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToVectorExpressionImpl.cs index f334e876b..e225df013 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToVectorExpressionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToVectorExpressionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_SetControlPointToVectorExpressionImpl : CParticleFun public C_OP_SetControlPointToVectorExpressionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExpressionOffset = new(() => Schema.GetOffset(0x67E9EFDE160B2427), LazyThreadSafetyMode.None); + public ref VectorExpressionType_t Expression { - get => ref _Handle.AsRef(Schema.GetOffset(0x67E9EFDE160B2427)); + get => ref _Handle.AsRef(_ExpressionOffset.Value); } + private static readonly Lazy _OutputCPOffset = new(() => Schema.GetOffset(0x67E9EFDE50DF5703), LazyThreadSafetyMode.None); + public ref int OutputCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x67E9EFDE50DF5703)); + get => ref _Handle.AsRef(_OutputCPOffset.Value); } + private static readonly Lazy _Input1Offset = new(() => Schema.GetOffset(0x67E9EFDEE17F27DA), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput Input1 { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x67E9EFDEE17F27DA)); + get => new CParticleCollectionVecInputImpl(_Handle + _Input1Offset.Value); } + private static readonly Lazy _Input2Offset = new(() => Schema.GetOffset(0x67E9EFDEE07F2647), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput Input2 { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x67E9EFDEE07F2647)); + get => new CParticleCollectionVecInputImpl(_Handle + _Input2Offset.Value); } + private static readonly Lazy _LerpOffset = new(() => Schema.GetOffset(0x67E9EFDE622FAB06), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Lerp { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x67E9EFDE622FAB06)); + get => new CPerParticleFloatInputImpl(_Handle + _LerpOffset.Value); } + private static readonly Lazy _NormalizedOutputOffset = new(() => Schema.GetOffset(0x67E9EFDE0AA98C55), LazyThreadSafetyMode.None); + public ref bool NormalizedOutput { - get => ref _Handle.AsRef(Schema.GetOffset(0x67E9EFDE0AA98C55)); + get => ref _Handle.AsRef(_NormalizedOutputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToWaterSurfaceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToWaterSurfaceImpl.cs index b4bced6a7..341255730 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToWaterSurfaceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointToWaterSurfaceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_SetControlPointToWaterSurfaceImpl : CParticleFunctio public C_OP_SetControlPointToWaterSurfaceImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceCPOffset = new(() => Schema.GetOffset(0x5BA6BFAD4C01E3B7), LazyThreadSafetyMode.None); + public ref int SourceCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BA6BFAD4C01E3B7)); + get => ref _Handle.AsRef(_SourceCPOffset.Value); } + private static readonly Lazy _DestCPOffset = new(() => Schema.GetOffset(0x5BA6BFADE27355DA), LazyThreadSafetyMode.None); + public ref int DestCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BA6BFADE27355DA)); + get => ref _Handle.AsRef(_DestCPOffset.Value); } + private static readonly Lazy _FlowCPOffset = new(() => Schema.GetOffset(0x5BA6BFADF3D93292), LazyThreadSafetyMode.None); + public ref int FlowCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BA6BFADF3D93292)); + get => ref _Handle.AsRef(_FlowCPOffset.Value); } + private static readonly Lazy _ActiveCPOffset = new(() => Schema.GetOffset(0x5BA6BFADA12F97B0), LazyThreadSafetyMode.None); + public ref int ActiveCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BA6BFADA12F97B0)); + get => ref _Handle.AsRef(_ActiveCPOffset.Value); } + private static readonly Lazy _ActiveCPFieldOffset = new(() => Schema.GetOffset(0x5BA6BFAD61A1D27C), LazyThreadSafetyMode.None); + public ref int ActiveCPField { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BA6BFAD61A1D27C)); + get => ref _Handle.AsRef(_ActiveCPFieldOffset.Value); } + private static readonly Lazy _RetestRateOffset = new(() => Schema.GetOffset(0x5BA6BFAD38DA66AC), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput RetestRate { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x5BA6BFAD38DA66AC)); + get => new CParticleCollectionFloatInputImpl(_Handle + _RetestRateOffset.Value); } + private static readonly Lazy _AdaptiveThresholdOffset = new(() => Schema.GetOffset(0x5BA6BFADE64212D6), LazyThreadSafetyMode.None); + public ref bool AdaptiveThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BA6BFADE64212D6)); + get => ref _Handle.AsRef(_AdaptiveThresholdOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointsToModelParticlesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointsToModelParticlesImpl.cs index 7f1e36251..a136b0649 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointsToModelParticlesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointsToModelParticlesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,34 +17,48 @@ internal partial class C_OP_SetControlPointsToModelParticlesImpl : CParticleFunc public C_OP_SetControlPointsToModelParticlesImpl(nint handle) : base(handle) { } + private static readonly Lazy _HitboxSetNameOffset = new(() => Schema.GetOffset(0x8850EF6A6A21BB0E), LazyThreadSafetyMode.None); + public string HitboxSetName { get { - var ptr = _Handle + Schema.GetOffset(0x8850EF6A6A21BB0E); + var ptr = _Handle + _HitboxSetNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x8850EF6A6A21BB0E, value, 128); + set => Schema.SetFixedString(_Handle, _HitboxSetNameOffset.Value, value, 128); } + private static readonly Lazy _AttachmentNameOffset = new(() => Schema.GetOffset(0x8850EF6A9CFCA76B), LazyThreadSafetyMode.None); + public string AttachmentName { get { - var ptr = _Handle + Schema.GetOffset(0x8850EF6A9CFCA76B); + var ptr = _Handle + _AttachmentNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x8850EF6A9CFCA76B, value, 128); + set => Schema.SetFixedString(_Handle, _AttachmentNameOffset.Value, value, 128); } + private static readonly Lazy _FirstControlPointOffset = new(() => Schema.GetOffset(0x8850EF6A72117650), LazyThreadSafetyMode.None); + public ref int FirstControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x8850EF6A72117650)); + get => ref _Handle.AsRef(_FirstControlPointOffset.Value); } + private static readonly Lazy _NumControlPointsOffset = new(() => Schema.GetOffset(0x8850EF6A551EBC4F), LazyThreadSafetyMode.None); + public ref int NumControlPoints { - get => ref _Handle.AsRef(Schema.GetOffset(0x8850EF6A551EBC4F)); + get => ref _Handle.AsRef(_NumControlPointsOffset.Value); } + private static readonly Lazy _FirstSourcePointOffset = new(() => Schema.GetOffset(0x8850EF6A9D7DC18E), LazyThreadSafetyMode.None); + public ref int FirstSourcePoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x8850EF6A9D7DC18E)); + get => ref _Handle.AsRef(_FirstSourcePointOffset.Value); } + private static readonly Lazy _SkinOffset = new(() => Schema.GetOffset(0x8850EF6A1BE32F18), LazyThreadSafetyMode.None); + public ref bool Skin { - get => ref _Handle.AsRef(Schema.GetOffset(0x8850EF6A1BE32F18)); + get => ref _Handle.AsRef(_SkinOffset.Value); } + private static readonly Lazy _AttachmentOffset = new(() => Schema.GetOffset(0x8850EF6A4D2F6EC8), LazyThreadSafetyMode.None); + public ref bool Attachment { - get => ref _Handle.AsRef(Schema.GetOffset(0x8850EF6A4D2F6EC8)); + get => ref _Handle.AsRef(_AttachmentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointsToParticleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointsToParticleImpl.cs index 8101cd1e1..008115057 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointsToParticleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetControlPointsToParticleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_SetControlPointsToParticleImpl : CParticleFunctionOp public C_OP_SetControlPointsToParticleImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildGroupIDOffset = new(() => Schema.GetOffset(0x119EA308E3F3C965), LazyThreadSafetyMode.None); + public ref int ChildGroupID { - get => ref _Handle.AsRef(Schema.GetOffset(0x119EA308E3F3C965)); + get => ref _Handle.AsRef(_ChildGroupIDOffset.Value); } + private static readonly Lazy _FirstControlPointOffset = new(() => Schema.GetOffset(0x119EA30872117650), LazyThreadSafetyMode.None); + public ref int FirstControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x119EA30872117650)); + get => ref _Handle.AsRef(_FirstControlPointOffset.Value); } + private static readonly Lazy _NumControlPointsOffset = new(() => Schema.GetOffset(0x119EA308551EBC4F), LazyThreadSafetyMode.None); + public ref int NumControlPoints { - get => ref _Handle.AsRef(Schema.GetOffset(0x119EA308551EBC4F)); + get => ref _Handle.AsRef(_NumControlPointsOffset.Value); } + private static readonly Lazy _FirstSourcePointOffset = new(() => Schema.GetOffset(0x119EA3089D7DC18E), LazyThreadSafetyMode.None); + public ref int FirstSourcePoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x119EA3089D7DC18E)); + get => ref _Handle.AsRef(_FirstSourcePointOffset.Value); } + private static readonly Lazy _ReverseOffset = new(() => Schema.GetOffset(0x119EA308EA4E22E5), LazyThreadSafetyMode.None); + public ref bool Reverse { - get => ref _Handle.AsRef(Schema.GetOffset(0x119EA308EA4E22E5)); + get => ref _Handle.AsRef(_ReverseOffset.Value); } + private static readonly Lazy _SetOrientationOffset = new(() => Schema.GetOffset(0x119EA308E1390E37), LazyThreadSafetyMode.None); + public ref bool SetOrientation { - get => ref _Handle.AsRef(Schema.GetOffset(0x119EA308E1390E37)); + get => ref _Handle.AsRef(_SetOrientationOffset.Value); } + private static readonly Lazy _OrientationModeOffset = new(() => Schema.GetOffset(0x119EA308272947BA), LazyThreadSafetyMode.None); + public ref ParticleOrientationSetMode_t OrientationMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x119EA308272947BA)); + get => ref _Handle.AsRef(_OrientationModeOffset.Value); } + private static readonly Lazy _SetParentOffset = new(() => Schema.GetOffset(0x119EA3082D8246B7), LazyThreadSafetyMode.None); + public ref ParticleParentSetMode_t SetParent { - get => ref _Handle.AsRef(Schema.GetOffset(0x119EA3082D8246B7)); + get => ref _Handle.AsRef(_SetParentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetFloatAttributeToVectorExpressionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetFloatAttributeToVectorExpressionImpl.cs index 3922f9e88..9f8466a28 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetFloatAttributeToVectorExpressionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetFloatAttributeToVectorExpressionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_SetFloatAttributeToVectorExpressionImpl : CParticleF public C_OP_SetFloatAttributeToVectorExpressionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExpressionOffset = new(() => Schema.GetOffset(0x26D81D160B2427), LazyThreadSafetyMode.None); + public ref VectorFloatExpressionType_t Expression { - get => ref _Handle.AsRef(Schema.GetOffset(0x26D81D160B2427)); + get => ref _Handle.AsRef(_ExpressionOffset.Value); } + private static readonly Lazy _Input1Offset = new(() => Schema.GetOffset(0x26D81DE17F27DA), LazyThreadSafetyMode.None); + public CPerParticleVecInput Input1 { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x26D81DE17F27DA)); + get => new CPerParticleVecInputImpl(_Handle + _Input1Offset.Value); } + private static readonly Lazy _Input2Offset = new(() => Schema.GetOffset(0x26D81DE07F2647), LazyThreadSafetyMode.None); + public CPerParticleVecInput Input2 { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x26D81DE07F2647)); + get => new CPerParticleVecInputImpl(_Handle + _Input2Offset.Value); } + private static readonly Lazy _OutputRemapOffset = new(() => Schema.GetOffset(0x26D81D1239396F), LazyThreadSafetyMode.None); + public CParticleRemapFloatInput OutputRemap { - get => new CParticleRemapFloatInputImpl(_Handle + Schema.GetOffset(0x26D81D1239396F)); + get => new CParticleRemapFloatInputImpl(_Handle + _OutputRemapOffset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0x26D81D324F6F74), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t OutputField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x26D81D324F6F74)); + get => new ParticleAttributeIndex_tImpl(_Handle + _OutputFieldOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x26D81DFB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x26D81DFB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetFloatCollectionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetFloatCollectionImpl.cs index 83de8f915..e6011e73d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetFloatCollectionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetFloatCollectionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_SetFloatCollectionImpl : CParticleFunctionOperatorIm public C_OP_SetFloatCollectionImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueOffset = new(() => Schema.GetOffset(0x72EFBE1734445438), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput InputValue { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x72EFBE1734445438)); + get => new CParticleCollectionFloatInputImpl(_Handle + _InputValueOffset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0x72EFBE17324F6F74), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t OutputField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x72EFBE17324F6F74)); + get => new ParticleAttributeIndex_tImpl(_Handle + _OutputFieldOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x72EFBE17FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x72EFBE17FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _LerpOffset = new(() => Schema.GetOffset(0x72EFBE175C17F8E8), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Lerp { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x72EFBE175C17F8E8)); + get => new CParticleCollectionFloatInputImpl(_Handle + _LerpOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetFloatImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetFloatImpl.cs index 0bd7afe6a..9c9d58ba3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetFloatImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetFloatImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_SetFloatImpl : CParticleFunctionOperatorImpl, C_OP_S public C_OP_SetFloatImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueOffset = new(() => Schema.GetOffset(0xF719E43734445438), LazyThreadSafetyMode.None); + public CPerParticleFloatInput InputValue { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xF719E43734445438)); + get => new CPerParticleFloatInputImpl(_Handle + _InputValueOffset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0xF719E437324F6F74), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t OutputField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xF719E437324F6F74)); + get => new ParticleAttributeIndex_tImpl(_Handle + _OutputFieldOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0xF719E437FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0xF719E437FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _LerpOffset = new(() => Schema.GetOffset(0xF719E4375C17F8E8), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Lerp { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xF719E4375C17F8E8)); + get => new CPerParticleFloatInputImpl(_Handle + _LerpOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetFromCPSnapshotImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetFromCPSnapshotImpl.cs index 24570c617..ede1cd05e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetFromCPSnapshotImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetFromCPSnapshotImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,48 +17,74 @@ internal partial class C_OP_SetFromCPSnapshotImpl : CParticleFunctionOperatorImp public C_OP_SetFromCPSnapshotImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x5B4435183F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B4435183F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _StrSnapshotSubsetOffset = new(() => Schema.GetOffset(0x5B443518BD8A8E5E), LazyThreadSafetyMode.None); + public string StrSnapshotSubset { get { - var ptr = _Handle.Read(Schema.GetOffset(0x5B443518BD8A8E5E)); + var ptr = _Handle.Read(_StrSnapshotSubsetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x5B443518BD8A8E5E, value); + set => Schema.SetString(_Handle, _StrSnapshotSubsetOffset.Value, value); } + private static readonly Lazy _AttributeToReadOffset = new(() => Schema.GetOffset(0x5B443518E0F61F9E), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t AttributeToRead { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x5B443518E0F61F9E)); + get => new ParticleAttributeIndex_tImpl(_Handle + _AttributeToReadOffset.Value); } + private static readonly Lazy _AttributeToWriteOffset = new(() => Schema.GetOffset(0x5B443518389A3CC1), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t AttributeToWrite { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x5B443518389A3CC1)); + get => new ParticleAttributeIndex_tImpl(_Handle + _AttributeToWriteOffset.Value); } + private static readonly Lazy _LocalSpaceCPOffset = new(() => Schema.GetOffset(0x5B443518C8E9CB31), LazyThreadSafetyMode.None); + public ref int LocalSpaceCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B443518C8E9CB31)); + get => ref _Handle.AsRef(_LocalSpaceCPOffset.Value); } + private static readonly Lazy _RandomOffset = new(() => Schema.GetOffset(0x5B443518D13B9DC2), LazyThreadSafetyMode.None); + public ref bool Random { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B443518D13B9DC2)); + get => ref _Handle.AsRef(_RandomOffset.Value); } + private static readonly Lazy _ReverseOffset = new(() => Schema.GetOffset(0x5B443518EA4E22E5), LazyThreadSafetyMode.None); + public ref bool Reverse { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B443518EA4E22E5)); + get => ref _Handle.AsRef(_ReverseOffset.Value); } + private static readonly Lazy _RandomSeedOffset = new(() => Schema.GetOffset(0x5B4435186388F067), LazyThreadSafetyMode.None); + public ref int RandomSeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B4435186388F067)); + get => ref _Handle.AsRef(_RandomSeedOffset.Value); } + private static readonly Lazy _SnapShotStartPointOffset = new(() => Schema.GetOffset(0x5B443518A7DF116B), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput SnapShotStartPoint { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x5B443518A7DF116B)); + get => new CParticleCollectionFloatInputImpl(_Handle + _SnapShotStartPointOffset.Value); } + private static readonly Lazy _SnapShotIncrementOffset = new(() => Schema.GetOffset(0x5B443518C1AED602), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput SnapShotIncrement { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x5B443518C1AED602)); + get => new CParticleCollectionFloatInputImpl(_Handle + _SnapShotIncrementOffset.Value); } + private static readonly Lazy _InterpolationOffset = new(() => Schema.GetOffset(0x5B443518CF55B987), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Interpolation { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x5B443518CF55B987)); + get => new CPerParticleFloatInputImpl(_Handle + _InterpolationOffset.Value); } + private static readonly Lazy _SubSampleOffset = new(() => Schema.GetOffset(0x5B4435185021E837), LazyThreadSafetyMode.None); + public ref bool SubSample { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B4435185021E837)); + get => ref _Handle.AsRef(_SubSampleOffset.Value); } + private static readonly Lazy _PrevOffset = new(() => Schema.GetOffset(0x5B4435189E5B9F10), LazyThreadSafetyMode.None); + public ref bool Prev { - get => ref _Handle.AsRef(Schema.GetOffset(0x5B4435189E5B9F10)); + get => ref _Handle.AsRef(_PrevOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetGravityToCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetGravityToCPImpl.cs index 8fdd748f8..f7bd75636 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetGravityToCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetGravityToCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_SetGravityToCPImpl : CParticleFunctionPreEmissionImp public C_OP_SetGravityToCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPInputOffset = new(() => Schema.GetOffset(0xBA369CBDFB805736), LazyThreadSafetyMode.None); + public ref int CPInput { - get => ref _Handle.AsRef(Schema.GetOffset(0xBA369CBDFB805736)); + get => ref _Handle.AsRef(_CPInputOffset.Value); } + private static readonly Lazy _CPOutputOffset = new(() => Schema.GetOffset(0xBA369CBD2077C953), LazyThreadSafetyMode.None); + public ref int CPOutput { - get => ref _Handle.AsRef(Schema.GetOffset(0xBA369CBD2077C953)); + get => ref _Handle.AsRef(_CPOutputOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0xBA369CBDB731A42F), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Scale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xBA369CBDB731A42F)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ScaleOffset.Value); } + private static readonly Lazy _SetOrientationOffset = new(() => Schema.GetOffset(0xBA369CBDE1390E37), LazyThreadSafetyMode.None); + public ref bool SetOrientation { - get => ref _Handle.AsRef(Schema.GetOffset(0xBA369CBDE1390E37)); + get => ref _Handle.AsRef(_SetOrientationOffset.Value); } + private static readonly Lazy _SetZDownOffset = new(() => Schema.GetOffset(0xBA369CBDE2673E97), LazyThreadSafetyMode.None); + public ref bool SetZDown { - get => ref _Handle.AsRef(Schema.GetOffset(0xBA369CBDE2673E97)); + get => ref _Handle.AsRef(_SetZDownOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetParentControlPointsToChildCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetParentControlPointsToChildCPImpl.cs index 2d5a8bdf8..6967ee14b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetParentControlPointsToChildCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetParentControlPointsToChildCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_SetParentControlPointsToChildCPImpl : CParticleFunct public C_OP_SetParentControlPointsToChildCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildGroupIDOffset = new(() => Schema.GetOffset(0x9A9F20B7E3F3C965), LazyThreadSafetyMode.None); + public ref int ChildGroupID { - get => ref _Handle.AsRef(Schema.GetOffset(0x9A9F20B7E3F3C965)); + get => ref _Handle.AsRef(_ChildGroupIDOffset.Value); } + private static readonly Lazy _ChildControlPointOffset = new(() => Schema.GetOffset(0x9A9F20B78DDB3CFC), LazyThreadSafetyMode.None); + public ref int ChildControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x9A9F20B78DDB3CFC)); + get => ref _Handle.AsRef(_ChildControlPointOffset.Value); } + private static readonly Lazy _NumControlPointsOffset = new(() => Schema.GetOffset(0x9A9F20B7551EBC4F), LazyThreadSafetyMode.None); + public ref int NumControlPoints { - get => ref _Handle.AsRef(Schema.GetOffset(0x9A9F20B7551EBC4F)); + get => ref _Handle.AsRef(_NumControlPointsOffset.Value); } + private static readonly Lazy _FirstSourcePointOffset = new(() => Schema.GetOffset(0x9A9F20B79D7DC18E), LazyThreadSafetyMode.None); + public ref int FirstSourcePoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x9A9F20B79D7DC18E)); + get => ref _Handle.AsRef(_FirstSourcePointOffset.Value); } + private static readonly Lazy _SetOrientationOffset = new(() => Schema.GetOffset(0x9A9F20B7E1390E37), LazyThreadSafetyMode.None); + public ref bool SetOrientation { - get => ref _Handle.AsRef(Schema.GetOffset(0x9A9F20B7E1390E37)); + get => ref _Handle.AsRef(_SetOrientationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetPerChildControlPointFromAttributeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetPerChildControlPointFromAttributeImpl.cs index 88bc9a587..65b401936 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetPerChildControlPointFromAttributeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetPerChildControlPointFromAttributeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_SetPerChildControlPointFromAttributeImpl : CParticle public C_OP_SetPerChildControlPointFromAttributeImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildGroupIDOffset = new(() => Schema.GetOffset(0x4217F56BE3F3C965), LazyThreadSafetyMode.None); + public ref int ChildGroupID { - get => ref _Handle.AsRef(Schema.GetOffset(0x4217F56BE3F3C965)); + get => ref _Handle.AsRef(_ChildGroupIDOffset.Value); } + private static readonly Lazy _FirstControlPointOffset = new(() => Schema.GetOffset(0x4217F56B72117650), LazyThreadSafetyMode.None); + public ref int FirstControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x4217F56B72117650)); + get => ref _Handle.AsRef(_FirstControlPointOffset.Value); } + private static readonly Lazy _NumControlPointsOffset = new(() => Schema.GetOffset(0x4217F56B551EBC4F), LazyThreadSafetyMode.None); + public ref int NumControlPoints { - get => ref _Handle.AsRef(Schema.GetOffset(0x4217F56B551EBC4F)); + get => ref _Handle.AsRef(_NumControlPointsOffset.Value); } + private static readonly Lazy _ParticleIncrementOffset = new(() => Schema.GetOffset(0x4217F56B73AF63D0), LazyThreadSafetyMode.None); + public ref int ParticleIncrement { - get => ref _Handle.AsRef(Schema.GetOffset(0x4217F56B73AF63D0)); + get => ref _Handle.AsRef(_ParticleIncrementOffset.Value); } + private static readonly Lazy _FirstSourcePointOffset = new(() => Schema.GetOffset(0x4217F56B9D7DC18E), LazyThreadSafetyMode.None); + public ref int FirstSourcePoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x4217F56B9D7DC18E)); + get => ref _Handle.AsRef(_FirstSourcePointOffset.Value); } + private static readonly Lazy _NumBasedOnParticleCountOffset = new(() => Schema.GetOffset(0x4217F56B401CC5D0), LazyThreadSafetyMode.None); + public ref bool NumBasedOnParticleCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x4217F56B401CC5D0)); + get => ref _Handle.AsRef(_NumBasedOnParticleCountOffset.Value); } + private static readonly Lazy _AttributeToReadOffset = new(() => Schema.GetOffset(0x4217F56BE0F61F9E), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t AttributeToRead { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x4217F56BE0F61F9E)); + get => new ParticleAttributeIndex_tImpl(_Handle + _AttributeToReadOffset.Value); } + private static readonly Lazy _CPFieldOffset = new(() => Schema.GetOffset(0x4217F56B50B79876), LazyThreadSafetyMode.None); + public ref int CPField { - get => ref _Handle.AsRef(Schema.GetOffset(0x4217F56B50B79876)); + get => ref _Handle.AsRef(_CPFieldOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetPerChildControlPointImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetPerChildControlPointImpl.cs index 9e9cb0b70..88d2be570 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetPerChildControlPointImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetPerChildControlPointImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_SetPerChildControlPointImpl : CParticleFunctionOpera public C_OP_SetPerChildControlPointImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildGroupIDOffset = new(() => Schema.GetOffset(0xC456E2B9E3F3C965), LazyThreadSafetyMode.None); + public ref int ChildGroupID { - get => ref _Handle.AsRef(Schema.GetOffset(0xC456E2B9E3F3C965)); + get => ref _Handle.AsRef(_ChildGroupIDOffset.Value); } + private static readonly Lazy _FirstControlPointOffset = new(() => Schema.GetOffset(0xC456E2B972117650), LazyThreadSafetyMode.None); + public ref int FirstControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xC456E2B972117650)); + get => ref _Handle.AsRef(_FirstControlPointOffset.Value); } + private static readonly Lazy _NumControlPointsOffset = new(() => Schema.GetOffset(0xC456E2B9551EBC4F), LazyThreadSafetyMode.None); + public ref int NumControlPoints { - get => ref _Handle.AsRef(Schema.GetOffset(0xC456E2B9551EBC4F)); + get => ref _Handle.AsRef(_NumControlPointsOffset.Value); } + private static readonly Lazy _ParticleIncrementOffset = new(() => Schema.GetOffset(0xC456E2B973AF63D0), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ParticleIncrement { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xC456E2B973AF63D0)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ParticleIncrementOffset.Value); } + private static readonly Lazy _FirstSourcePointOffset = new(() => Schema.GetOffset(0xC456E2B99D7DC18E), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput FirstSourcePoint { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xC456E2B99D7DC18E)); + get => new CParticleCollectionFloatInputImpl(_Handle + _FirstSourcePointOffset.Value); } + private static readonly Lazy _SetOrientationOffset = new(() => Schema.GetOffset(0xC456E2B9E1390E37), LazyThreadSafetyMode.None); + public ref bool SetOrientation { - get => ref _Handle.AsRef(Schema.GetOffset(0xC456E2B9E1390E37)); + get => ref _Handle.AsRef(_SetOrientationOffset.Value); } + private static readonly Lazy _OrientationFieldOffset = new(() => Schema.GetOffset(0xC456E2B9FFE45E9F), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t OrientationField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xC456E2B9FFE45E9F)); + get => new ParticleAttributeIndex_tImpl(_Handle + _OrientationFieldOffset.Value); } + private static readonly Lazy _NumBasedOnParticleCountOffset = new(() => Schema.GetOffset(0xC456E2B9401CC5D0), LazyThreadSafetyMode.None); + public ref bool NumBasedOnParticleCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xC456E2B9401CC5D0)); + get => ref _Handle.AsRef(_NumBasedOnParticleCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetRandomControlPointPositionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetRandomControlPointPositionImpl.cs index a16032dbd..7e89f4872 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetRandomControlPointPositionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetRandomControlPointPositionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_SetRandomControlPointPositionImpl : CParticleFunctio public C_OP_SetRandomControlPointPositionImpl(nint handle) : base(handle) { } + private static readonly Lazy _UseWorldLocationOffset = new(() => Schema.GetOffset(0x4E797BEAF371AED7), LazyThreadSafetyMode.None); + public ref bool UseWorldLocation { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E797BEAF371AED7)); + get => ref _Handle.AsRef(_UseWorldLocationOffset.Value); } + private static readonly Lazy _OrientOffset = new(() => Schema.GetOffset(0x4E797BEA7CD61854), LazyThreadSafetyMode.None); + public ref bool Orient { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E797BEA7CD61854)); + get => ref _Handle.AsRef(_OrientOffset.Value); } + private static readonly Lazy _CP1Offset = new(() => Schema.GetOffset(0x4E797BEAD4B1E579), LazyThreadSafetyMode.None); + public ref int CP1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E797BEAD4B1E579)); + get => ref _Handle.AsRef(_CP1Offset.Value); } + private static readonly Lazy _HeadLocationOffset = new(() => Schema.GetOffset(0x4E797BEAA8ECDA78), LazyThreadSafetyMode.None); + public ref int HeadLocation { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E797BEAA8ECDA78)); + get => ref _Handle.AsRef(_HeadLocationOffset.Value); } + private static readonly Lazy _ReRandomRateOffset = new(() => Schema.GetOffset(0x4E797BEA98F44A13), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput ReRandomRate { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x4E797BEA98F44A13)); + get => new CParticleCollectionFloatInputImpl(_Handle + _ReRandomRateOffset.Value); } + private static readonly Lazy _CPMinPosOffset = new(() => Schema.GetOffset(0x4E797BEA4E9C9B68), LazyThreadSafetyMode.None); + public ref Vector CPMinPos { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E797BEA4E9C9B68)); + get => ref _Handle.AsRef(_CPMinPosOffset.Value); } + private static readonly Lazy _CPMaxPosOffset = new(() => Schema.GetOffset(0x4E797BEA4FFBFD72), LazyThreadSafetyMode.None); + public ref Vector CPMaxPos { - get => ref _Handle.AsRef(Schema.GetOffset(0x4E797BEA4FFBFD72)); + get => ref _Handle.AsRef(_CPMaxPosOffset.Value); } + private static readonly Lazy _InterpolationOffset = new(() => Schema.GetOffset(0x4E797BEACF55B987), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Interpolation { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x4E797BEACF55B987)); + get => new CParticleCollectionFloatInputImpl(_Handle + _InterpolationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetSimulationRateImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetSimulationRateImpl.cs index dce32185f..e6db40b36 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetSimulationRateImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetSimulationRateImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_OP_SetSimulationRateImpl : CParticleFunctionPreEmission public C_OP_SetSimulationRateImpl(nint handle) : base(handle) { } + private static readonly Lazy _SimulationScaleOffset = new(() => Schema.GetOffset(0x6C806DC2994DAEC6), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput SimulationScale { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x6C806DC2994DAEC6)); + get => new CParticleCollectionFloatInputImpl(_Handle + _SimulationScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetSingleControlPointPositionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetSingleControlPointPositionImpl.cs index 5e9850772..75213ec71 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetSingleControlPointPositionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetSingleControlPointPositionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_SetSingleControlPointPositionImpl : CParticleFunctio public C_OP_SetSingleControlPointPositionImpl(nint handle) : base(handle) { } + private static readonly Lazy _SetOnceOffset = new(() => Schema.GetOffset(0xFE0B7A4D6B261086), LazyThreadSafetyMode.None); + public ref bool SetOnce { - get => ref _Handle.AsRef(Schema.GetOffset(0xFE0B7A4D6B261086)); + get => ref _Handle.AsRef(_SetOnceOffset.Value); } + private static readonly Lazy _CP1Offset = new(() => Schema.GetOffset(0xFE0B7A4DD4B1E579), LazyThreadSafetyMode.None); + public ref int CP1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xFE0B7A4DD4B1E579)); + get => ref _Handle.AsRef(_CP1Offset.Value); } + private static readonly Lazy _CP1PosOffset = new(() => Schema.GetOffset(0xFE0B7A4D408288D9), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput CP1Pos { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0xFE0B7A4D408288D9)); + get => new CParticleCollectionVecInputImpl(_Handle + _CP1PosOffset.Value); } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0xFE0B7A4D3A9ED669), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0xFE0B7A4D3A9ED669)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetToCPImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetToCPImpl.cs index 3480c1119..25cbeb985 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetToCPImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetToCPImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_SetToCPImpl : CParticleFunctionOperatorImpl, C_OP_Se public C_OP_SetToCPImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0xF80ACA353F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xF80ACA353F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0xF80ACA35BD25CC2A), LazyThreadSafetyMode.None); + public ref Vector Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0xF80ACA35BD25CC2A)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _OffsetLocalOffset = new(() => Schema.GetOffset(0xF80ACA35F07D31C1), LazyThreadSafetyMode.None); + public ref bool OffsetLocal { - get => ref _Handle.AsRef(Schema.GetOffset(0xF80ACA35F07D31C1)); + get => ref _Handle.AsRef(_OffsetLocalOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetUserEventImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetUserEventImpl.cs index 5317921c0..6255115b3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetUserEventImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetUserEventImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_SetUserEventImpl : CParticleFunctionOperatorImpl, C_ public C_OP_SetUserEventImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputOffset = new(() => Schema.GetOffset(0x9A6F6FB81D4B7FFD), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Input { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x9A6F6FB81D4B7FFD)); + get => new CPerParticleFloatInputImpl(_Handle + _InputOffset.Value); } + private static readonly Lazy _RisingEdgeOffset = new(() => Schema.GetOffset(0x9A6F6FB8DCFBDCF4), LazyThreadSafetyMode.None); + public CPerParticleFloatInput RisingEdge { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x9A6F6FB8DCFBDCF4)); + get => new CPerParticleFloatInputImpl(_Handle + _RisingEdgeOffset.Value); } + private static readonly Lazy _RisingEventTypeOffset = new(() => Schema.GetOffset(0x9A6F6FB83790928D), LazyThreadSafetyMode.None); + public ref EventTypeSelection_t RisingEventType { - get => ref _Handle.AsRef(Schema.GetOffset(0x9A6F6FB83790928D)); + get => ref _Handle.AsRef(_RisingEventTypeOffset.Value); } + private static readonly Lazy _FallingEdgeOffset = new(() => Schema.GetOffset(0x9A6F6FB8CBE5115B), LazyThreadSafetyMode.None); + public CPerParticleFloatInput FallingEdge { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x9A6F6FB8CBE5115B)); + get => new CPerParticleFloatInputImpl(_Handle + _FallingEdgeOffset.Value); } + private static readonly Lazy _FallingEventTypeOffset = new(() => Schema.GetOffset(0x9A6F6FB8C79ED114), LazyThreadSafetyMode.None); + public ref EventTypeSelection_t FallingEventType { - get => ref _Handle.AsRef(Schema.GetOffset(0x9A6F6FB8C79ED114)); + get => ref _Handle.AsRef(_FallingEventTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetVariableImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetVariableImpl.cs index d941c57f6..24400f3b3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetVariableImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetVariableImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_SetVariableImpl : CParticleFunctionPreEmissionImpl, public C_OP_SetVariableImpl(nint handle) : base(handle) { } + private static readonly Lazy _VariableReferenceOffset = new(() => Schema.GetOffset(0x9BAC801F3731E65A), LazyThreadSafetyMode.None); + public CParticleVariableRef VariableReference { - get => new CParticleVariableRefImpl(_Handle + Schema.GetOffset(0x9BAC801F3731E65A)); + get => new CParticleVariableRefImpl(_Handle + _VariableReferenceOffset.Value); } + private static readonly Lazy _TransformInputOffset = new(() => Schema.GetOffset(0x9BAC801F3A9ED669), LazyThreadSafetyMode.None); + public CParticleTransformInput TransformInput { - get => new CParticleTransformInputImpl(_Handle + Schema.GetOffset(0x9BAC801F3A9ED669)); + get => new CParticleTransformInputImpl(_Handle + _TransformInputOffset.Value); } + private static readonly Lazy _PositionOffsetOffset = new(() => Schema.GetOffset(0x9BAC801FC9C9DB1D), LazyThreadSafetyMode.None); + public ref Vector PositionOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BAC801FC9C9DB1D)); + get => ref _Handle.AsRef(_PositionOffsetOffset.Value); } + private static readonly Lazy _RotationOffsetOffset = new(() => Schema.GetOffset(0x9BAC801FD70314A4), LazyThreadSafetyMode.None); + public ref QAngle RotationOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BAC801FD70314A4)); + get => ref _Handle.AsRef(_RotationOffsetOffset.Value); } + private static readonly Lazy _InputOffset = new(() => Schema.GetOffset(0x9BAC801F1EA0ED5B), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput Input { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x9BAC801F1EA0ED5B)); + get => new CParticleCollectionVecInputImpl(_Handle + _InputOffset.Value); } + private static readonly Lazy _FloatInputOffset = new(() => Schema.GetOffset(0x9BAC801F7107333B), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput FloatInput { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0x9BAC801F7107333B)); + get => new CParticleCollectionFloatInputImpl(_Handle + _FloatInputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetVecImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetVecImpl.cs index 22ea178bb..f3446f9a4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetVecImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetVecImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_SetVecImpl : CParticleFunctionOperatorImpl, C_OP_Set public C_OP_SetVecImpl(nint handle) : base(handle) { } + private static readonly Lazy _InputValueOffset = new(() => Schema.GetOffset(0x24E155B734445438), LazyThreadSafetyMode.None); + public CPerParticleVecInput InputValue { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x24E155B734445438)); + get => new CPerParticleVecInputImpl(_Handle + _InputValueOffset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0x24E155B7324F6F74), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t OutputField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x24E155B7324F6F74)); + get => new ParticleAttributeIndex_tImpl(_Handle + _OutputFieldOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0x24E155B7FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0x24E155B7FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _LerpOffset = new(() => Schema.GetOffset(0x24E155B75C17F8E8), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Lerp { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x24E155B75C17F8E8)); + get => new CPerParticleFloatInputImpl(_Handle + _LerpOffset.Value); } + private static readonly Lazy _NormalizedOutputOffset = new(() => Schema.GetOffset(0x24E155B70AA98C55), LazyThreadSafetyMode.None); + public ref bool NormalizedOutput { - get => ref _Handle.AsRef(Schema.GetOffset(0x24E155B70AA98C55)); + get => ref _Handle.AsRef(_NormalizedOutputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetVectorAttributeToVectorExpressionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetVectorAttributeToVectorExpressionImpl.cs index d1629b0c5..11c9fb727 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetVectorAttributeToVectorExpressionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SetVectorAttributeToVectorExpressionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_SetVectorAttributeToVectorExpressionImpl : CParticle public C_OP_SetVectorAttributeToVectorExpressionImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExpressionOffset = new(() => Schema.GetOffset(0xF36D0C4160B2427), LazyThreadSafetyMode.None); + public ref VectorExpressionType_t Expression { - get => ref _Handle.AsRef(Schema.GetOffset(0xF36D0C4160B2427)); + get => ref _Handle.AsRef(_ExpressionOffset.Value); } + private static readonly Lazy _Input1Offset = new(() => Schema.GetOffset(0xF36D0C4E17F27DA), LazyThreadSafetyMode.None); + public CPerParticleVecInput Input1 { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xF36D0C4E17F27DA)); + get => new CPerParticleVecInputImpl(_Handle + _Input1Offset.Value); } + private static readonly Lazy _Input2Offset = new(() => Schema.GetOffset(0xF36D0C4E07F2647), LazyThreadSafetyMode.None); + public CPerParticleVecInput Input2 { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xF36D0C4E07F2647)); + get => new CPerParticleVecInputImpl(_Handle + _Input2Offset.Value); } + private static readonly Lazy _LerpOffset = new(() => Schema.GetOffset(0xF36D0C4622FAB06), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Lerp { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xF36D0C4622FAB06)); + get => new CPerParticleFloatInputImpl(_Handle + _LerpOffset.Value); } + private static readonly Lazy _OutputFieldOffset = new(() => Schema.GetOffset(0xF36D0C4324F6F74), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t OutputField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xF36D0C4324F6F74)); + get => new ParticleAttributeIndex_tImpl(_Handle + _OutputFieldOffset.Value); } + private static readonly Lazy _SetMethodOffset = new(() => Schema.GetOffset(0xF36D0C4FB53C31E), LazyThreadSafetyMode.None); + public ref ParticleSetMethod_t SetMethod { - get => ref _Handle.AsRef(Schema.GetOffset(0xF36D0C4FB53C31E)); + get => ref _Handle.AsRef(_SetMethodOffset.Value); } + private static readonly Lazy _NormalizedOutputOffset = new(() => Schema.GetOffset(0xF36D0C40AA98C55), LazyThreadSafetyMode.None); + public ref bool NormalizedOutput { - get => ref _Handle.AsRef(Schema.GetOffset(0xF36D0C40AA98C55)); + get => ref _Handle.AsRef(_NormalizedOutputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ShapeMatchingConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ShapeMatchingConstraintImpl.cs index 84194c573..777e68593 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ShapeMatchingConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_ShapeMatchingConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_OP_ShapeMatchingConstraintImpl : CParticleFunctionConst public C_OP_ShapeMatchingConstraintImpl(nint handle) : base(handle) { } + private static readonly Lazy _ShapeRestorationTimeOffset = new(() => Schema.GetOffset(0x4FF42FB6A86E05A9), LazyThreadSafetyMode.None); + public ref float ShapeRestorationTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x4FF42FB6A86E05A9)); + get => ref _Handle.AsRef(_ShapeRestorationTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SnapshotRigidSkinToBonesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SnapshotRigidSkinToBonesImpl.cs index a60ab8de4..a67c410f0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SnapshotRigidSkinToBonesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SnapshotRigidSkinToBonesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_SnapshotRigidSkinToBonesImpl : CParticleFunctionOper public C_OP_SnapshotRigidSkinToBonesImpl(nint handle) : base(handle) { } + private static readonly Lazy _TransformNormalsOffset = new(() => Schema.GetOffset(0x208C05EB3C6BFD75), LazyThreadSafetyMode.None); + public ref bool TransformNormals { - get => ref _Handle.AsRef(Schema.GetOffset(0x208C05EB3C6BFD75)); + get => ref _Handle.AsRef(_TransformNormalsOffset.Value); } + private static readonly Lazy _TransformRadiiOffset = new(() => Schema.GetOffset(0x208C05EB8183F664), LazyThreadSafetyMode.None); + public ref bool TransformRadii { - get => ref _Handle.AsRef(Schema.GetOffset(0x208C05EB8183F664)); + get => ref _Handle.AsRef(_TransformRadiiOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x208C05EB3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x208C05EB3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SnapshotSkinToBonesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SnapshotSkinToBonesImpl.cs index 7769a3ee0..7a3a616ee 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SnapshotSkinToBonesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SnapshotSkinToBonesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_SnapshotSkinToBonesImpl : CParticleFunctionOperatorI public C_OP_SnapshotSkinToBonesImpl(nint handle) : base(handle) { } + private static readonly Lazy _TransformNormalsOffset = new(() => Schema.GetOffset(0xCA48FCF83C6BFD75), LazyThreadSafetyMode.None); + public ref bool TransformNormals { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA48FCF83C6BFD75)); + get => ref _Handle.AsRef(_TransformNormalsOffset.Value); } + private static readonly Lazy _TransformRadiiOffset = new(() => Schema.GetOffset(0xCA48FCF88183F664), LazyThreadSafetyMode.None); + public ref bool TransformRadii { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA48FCF88183F664)); + get => ref _Handle.AsRef(_TransformRadiiOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0xCA48FCF83F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA48FCF83F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _LifeTimeFadeStartOffset = new(() => Schema.GetOffset(0xCA48FCF895A2845A), LazyThreadSafetyMode.None); + public ref float LifeTimeFadeStart { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA48FCF895A2845A)); + get => ref _Handle.AsRef(_LifeTimeFadeStartOffset.Value); } + private static readonly Lazy _LifeTimeFadeEndOffset = new(() => Schema.GetOffset(0xCA48FCF8222841EF), LazyThreadSafetyMode.None); + public ref float LifeTimeFadeEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA48FCF8222841EF)); + get => ref _Handle.AsRef(_LifeTimeFadeEndOffset.Value); } + private static readonly Lazy _JumpThresholdOffset = new(() => Schema.GetOffset(0xCA48FCF8B6BB1AD6), LazyThreadSafetyMode.None); + public ref float JumpThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA48FCF8B6BB1AD6)); + get => ref _Handle.AsRef(_JumpThresholdOffset.Value); } + private static readonly Lazy _PrevPosScaleOffset = new(() => Schema.GetOffset(0xCA48FCF846CED122), LazyThreadSafetyMode.None); + public ref float PrevPosScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA48FCF846CED122)); + get => ref _Handle.AsRef(_PrevPosScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SpinImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SpinImpl.cs index d9dd25055..6e4281275 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SpinImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SpinImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SpinUpdateImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SpinUpdateImpl.cs index d2fe1294b..f6e4c0a2e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SpinUpdateImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SpinUpdateImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SpinYawImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SpinYawImpl.cs index 2810a503a..563c36238 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SpinYawImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SpinYawImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SpringToVectorConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SpringToVectorConstraintImpl.cs index 9e61e518f..72ffdf6bd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SpringToVectorConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_SpringToVectorConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class C_OP_SpringToVectorConstraintImpl : CParticleFunctionCons public C_OP_SpringToVectorConstraintImpl(nint handle) : base(handle) { } + private static readonly Lazy _RestLengthOffset = new(() => Schema.GetOffset(0xF442244193AC4079), LazyThreadSafetyMode.None); + public CPerParticleFloatInput RestLength { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xF442244193AC4079)); + get => new CPerParticleFloatInputImpl(_Handle + _RestLengthOffset.Value); } + private static readonly Lazy _MinDistanceOffset = new(() => Schema.GetOffset(0xF442244192BCAD06), LazyThreadSafetyMode.None); + public CPerParticleFloatInput MinDistance { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xF442244192BCAD06)); + get => new CPerParticleFloatInputImpl(_Handle + _MinDistanceOffset.Value); } + private static readonly Lazy _MaxDistanceOffset = new(() => Schema.GetOffset(0xF442244198893360), LazyThreadSafetyMode.None); + public CPerParticleFloatInput MaxDistance { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xF442244198893360)); + get => new CPerParticleFloatInputImpl(_Handle + _MaxDistanceOffset.Value); } + private static readonly Lazy _RestingLengthOffset = new(() => Schema.GetOffset(0xF4422441BB988EAF), LazyThreadSafetyMode.None); + public CPerParticleFloatInput RestingLength { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xF4422441BB988EAF)); + get => new CPerParticleFloatInputImpl(_Handle + _RestingLengthOffset.Value); } + private static readonly Lazy _AnchorVectorOffset = new(() => Schema.GetOffset(0xF442244180D613F3), LazyThreadSafetyMode.None); + public CPerParticleVecInput AnchorVector { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0xF442244180D613F3)); + get => new CPerParticleVecInputImpl(_Handle + _AnchorVectorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_StopAfterCPDurationImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_StopAfterCPDurationImpl.cs index 6f0a3f826..dfba09655 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_StopAfterCPDurationImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_StopAfterCPDurationImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class C_OP_StopAfterCPDurationImpl : CParticleFunctionPreEmissi public C_OP_StopAfterCPDurationImpl(nint handle) : base(handle) { } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0xFC2AFAC6BC5E3BAB), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Duration { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xFC2AFAC6BC5E3BAB)); + get => new CParticleCollectionFloatInputImpl(_Handle + _DurationOffset.Value); } + private static readonly Lazy _DestroyImmediatelyOffset = new(() => Schema.GetOffset(0xFC2AFAC675F43101), LazyThreadSafetyMode.None); + public ref bool DestroyImmediately { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC2AFAC675F43101)); + get => ref _Handle.AsRef(_DestroyImmediatelyOffset.Value); } + private static readonly Lazy _PlayEndCapOffset = new(() => Schema.GetOffset(0xFC2AFAC6A7AB4A38), LazyThreadSafetyMode.None); + public ref bool PlayEndCap { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC2AFAC6A7AB4A38)); + get => ref _Handle.AsRef(_PlayEndCapOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_TeleportBeamImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_TeleportBeamImpl.cs index c541c2ae9..0d79528a3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_TeleportBeamImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_TeleportBeamImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class C_OP_TeleportBeamImpl : CParticleFunctionOperatorImpl, C_ public C_OP_TeleportBeamImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPPositionOffset = new(() => Schema.GetOffset(0xD80BE8C1AECEEF2D), LazyThreadSafetyMode.None); + public ref int CPPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0xD80BE8C1AECEEF2D)); + get => ref _Handle.AsRef(_CPPositionOffset.Value); } + private static readonly Lazy _CPVelocityOffset = new(() => Schema.GetOffset(0xD80BE8C165FA13B9), LazyThreadSafetyMode.None); + public ref int CPVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xD80BE8C165FA13B9)); + get => ref _Handle.AsRef(_CPVelocityOffset.Value); } + private static readonly Lazy _CPMiscOffset = new(() => Schema.GetOffset(0xD80BE8C1466D5C8A), LazyThreadSafetyMode.None); + public ref int CPMisc { - get => ref _Handle.AsRef(Schema.GetOffset(0xD80BE8C1466D5C8A)); + get => ref _Handle.AsRef(_CPMiscOffset.Value); } + private static readonly Lazy _CPColorOffset = new(() => Schema.GetOffset(0xD80BE8C14B880225), LazyThreadSafetyMode.None); + public ref int CPColor { - get => ref _Handle.AsRef(Schema.GetOffset(0xD80BE8C14B880225)); + get => ref _Handle.AsRef(_CPColorOffset.Value); } + private static readonly Lazy _CPInvalidColorOffset = new(() => Schema.GetOffset(0xD80BE8C1370493BC), LazyThreadSafetyMode.None); + public ref int CPInvalidColor { - get => ref _Handle.AsRef(Schema.GetOffset(0xD80BE8C1370493BC)); + get => ref _Handle.AsRef(_CPInvalidColorOffset.Value); } + private static readonly Lazy _CPExtraArcDataOffset = new(() => Schema.GetOffset(0xD80BE8C1FE881B08), LazyThreadSafetyMode.None); + public ref int CPExtraArcData { - get => ref _Handle.AsRef(Schema.GetOffset(0xD80BE8C1FE881B08)); + get => ref _Handle.AsRef(_CPExtraArcDataOffset.Value); } + private static readonly Lazy _GravityOffset = new(() => Schema.GetOffset(0xD80BE8C1A5AE4779), LazyThreadSafetyMode.None); + public ref Vector Gravity { - get => ref _Handle.AsRef(Schema.GetOffset(0xD80BE8C1A5AE4779)); + get => ref _Handle.AsRef(_GravityOffset.Value); } + private static readonly Lazy _ArcMaxDurationOffset = new(() => Schema.GetOffset(0xD80BE8C150FE58BD), LazyThreadSafetyMode.None); + public ref float ArcMaxDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0xD80BE8C150FE58BD)); + get => ref _Handle.AsRef(_ArcMaxDurationOffset.Value); } + private static readonly Lazy _SegmentBreakOffset = new(() => Schema.GetOffset(0xD80BE8C18DEE8E2F), LazyThreadSafetyMode.None); + public ref float SegmentBreak { - get => ref _Handle.AsRef(Schema.GetOffset(0xD80BE8C18DEE8E2F)); + get => ref _Handle.AsRef(_SegmentBreakOffset.Value); } + private static readonly Lazy _ArcSpeedOffset = new(() => Schema.GetOffset(0xD80BE8C14E9BC58C), LazyThreadSafetyMode.None); + public ref float ArcSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xD80BE8C14E9BC58C)); + get => ref _Handle.AsRef(_ArcSpeedOffset.Value); } + private static readonly Lazy _AlphaOffset = new(() => Schema.GetOffset(0xD80BE8C1A0DB7DD1), LazyThreadSafetyMode.None); + public ref float Alpha { - get => ref _Handle.AsRef(Schema.GetOffset(0xD80BE8C1A0DB7DD1)); + get => ref _Handle.AsRef(_AlphaOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_TimeVaryingForceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_TimeVaryingForceImpl.cs index 10af66a8c..7df0c2bac 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_TimeVaryingForceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_TimeVaryingForceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_TimeVaryingForceImpl : CParticleFunctionForceImpl, C public C_OP_TimeVaryingForceImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartLerpTimeOffset = new(() => Schema.GetOffset(0xAC89FC47C1D0DC21), LazyThreadSafetyMode.None); + public ref float StartLerpTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xAC89FC47C1D0DC21)); + get => ref _Handle.AsRef(_StartLerpTimeOffset.Value); } + private static readonly Lazy _StartingForceOffset = new(() => Schema.GetOffset(0xAC89FC478FA47818), LazyThreadSafetyMode.None); + public ref Vector StartingForce { - get => ref _Handle.AsRef(Schema.GetOffset(0xAC89FC478FA47818)); + get => ref _Handle.AsRef(_StartingForceOffset.Value); } + private static readonly Lazy _EndLerpTimeOffset = new(() => Schema.GetOffset(0xAC89FC47AA182894), LazyThreadSafetyMode.None); + public ref float EndLerpTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xAC89FC47AA182894)); + get => ref _Handle.AsRef(_EndLerpTimeOffset.Value); } + private static readonly Lazy _EndingForceOffset = new(() => Schema.GetOffset(0xAC89FC47CEB5307D), LazyThreadSafetyMode.None); + public ref Vector EndingForce { - get => ref _Handle.AsRef(Schema.GetOffset(0xAC89FC47CEB5307D)); + get => ref _Handle.AsRef(_EndingForceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_TurbulenceForceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_TurbulenceForceImpl.cs index 98fa87815..e572db88a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_TurbulenceForceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_TurbulenceForceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_TurbulenceForceImpl : CParticleFunctionForceImpl, C_ public C_OP_TurbulenceForceImpl(nint handle) : base(handle) { } + private static readonly Lazy _NoiseCoordScale0Offset = new(() => Schema.GetOffset(0xCAE57FA75C19EC96), LazyThreadSafetyMode.None); + public ref float NoiseCoordScale0 { - get => ref _Handle.AsRef(Schema.GetOffset(0xCAE57FA75C19EC96)); + get => ref _Handle.AsRef(_NoiseCoordScale0Offset.Value); } + private static readonly Lazy _NoiseCoordScale1Offset = new(() => Schema.GetOffset(0xCAE57FA75D19EE29), LazyThreadSafetyMode.None); + public ref float NoiseCoordScale1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xCAE57FA75D19EE29)); + get => ref _Handle.AsRef(_NoiseCoordScale1Offset.Value); } + private static readonly Lazy _NoiseCoordScale2Offset = new(() => Schema.GetOffset(0xCAE57FA75A19E970), LazyThreadSafetyMode.None); + public ref float NoiseCoordScale2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xCAE57FA75A19E970)); + get => ref _Handle.AsRef(_NoiseCoordScale2Offset.Value); } + private static readonly Lazy _NoiseCoordScale3Offset = new(() => Schema.GetOffset(0xCAE57FA75B19EB03), LazyThreadSafetyMode.None); + public ref float NoiseCoordScale3 { - get => ref _Handle.AsRef(Schema.GetOffset(0xCAE57FA75B19EB03)); + get => ref _Handle.AsRef(_NoiseCoordScale3Offset.Value); } + private static readonly Lazy _NoiseAmount0Offset = new(() => Schema.GetOffset(0xCAE57FA767BF95F7), LazyThreadSafetyMode.None); + public ref Vector NoiseAmount0 { - get => ref _Handle.AsRef(Schema.GetOffset(0xCAE57FA767BF95F7)); + get => ref _Handle.AsRef(_NoiseAmount0Offset.Value); } + private static readonly Lazy _NoiseAmount1Offset = new(() => Schema.GetOffset(0xCAE57FA766BF9464), LazyThreadSafetyMode.None); + public ref Vector NoiseAmount1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xCAE57FA766BF9464)); + get => ref _Handle.AsRef(_NoiseAmount1Offset.Value); } + private static readonly Lazy _NoiseAmount2Offset = new(() => Schema.GetOffset(0xCAE57FA769BF991D), LazyThreadSafetyMode.None); + public ref Vector NoiseAmount2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xCAE57FA769BF991D)); + get => ref _Handle.AsRef(_NoiseAmount2Offset.Value); } + private static readonly Lazy _NoiseAmount3Offset = new(() => Schema.GetOffset(0xCAE57FA768BF978A), LazyThreadSafetyMode.None); + public ref Vector NoiseAmount3 { - get => ref _Handle.AsRef(Schema.GetOffset(0xCAE57FA768BF978A)); + get => ref _Handle.AsRef(_NoiseAmount3Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_TwistAroundAxisImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_TwistAroundAxisImpl.cs index 092589eb5..84b9faf1b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_TwistAroundAxisImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_TwistAroundAxisImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class C_OP_TwistAroundAxisImpl : CParticleFunctionForceImpl, C_ public C_OP_TwistAroundAxisImpl(nint handle) : base(handle) { } + private static readonly Lazy _ForceAmountOffset = new(() => Schema.GetOffset(0xE1FA036870831A84), LazyThreadSafetyMode.None); + public ref float ForceAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1FA036870831A84)); + get => ref _Handle.AsRef(_ForceAmountOffset.Value); } + private static readonly Lazy _TwistAxisOffset = new(() => Schema.GetOffset(0xE1FA0368BEAAB521), LazyThreadSafetyMode.None); + public ref Vector TwistAxis { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1FA0368BEAAB521)); + get => ref _Handle.AsRef(_TwistAxisOffset.Value); } + private static readonly Lazy _LocalSpaceOffset = new(() => Schema.GetOffset(0xE1FA036862418E6E), LazyThreadSafetyMode.None); + public ref bool LocalSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1FA036862418E6E)); + get => ref _Handle.AsRef(_LocalSpaceOffset.Value); } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0xE1FA03683F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xE1FA03683F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_UpdateLightSourceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_UpdateLightSourceImpl.cs index fcbf3e3e9..f31f4ac72 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_UpdateLightSourceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_UpdateLightSourceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_UpdateLightSourceImpl : CParticleFunctionOperatorImp public C_OP_UpdateLightSourceImpl(nint handle) : base(handle) { } + private static readonly Lazy _ColorTintOffset = new(() => Schema.GetOffset(0x6611EEDD569A6EA9), LazyThreadSafetyMode.None); + public ref Color ColorTint { - get => ref _Handle.AsRef(Schema.GetOffset(0x6611EEDD569A6EA9)); + get => ref _Handle.AsRef(_ColorTintOffset.Value); } + private static readonly Lazy _BrightnessScaleOffset = new(() => Schema.GetOffset(0x6611EEDD5EFC3AAE), LazyThreadSafetyMode.None); + public ref float BrightnessScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x6611EEDD5EFC3AAE)); + get => ref _Handle.AsRef(_BrightnessScaleOffset.Value); } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0x6611EEDDA7A20159), LazyThreadSafetyMode.None); + public ref float RadiusScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x6611EEDDA7A20159)); + get => ref _Handle.AsRef(_RadiusScaleOffset.Value); } + private static readonly Lazy _MinimumLightingRadiusOffset = new(() => Schema.GetOffset(0x6611EEDD946ABF7B), LazyThreadSafetyMode.None); + public ref float MinimumLightingRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x6611EEDD946ABF7B)); + get => ref _Handle.AsRef(_MinimumLightingRadiusOffset.Value); } + private static readonly Lazy _MaximumLightingRadiusOffset = new(() => Schema.GetOffset(0x6611EEDD8804B57D), LazyThreadSafetyMode.None); + public ref float MaximumLightingRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x6611EEDD8804B57D)); + get => ref _Handle.AsRef(_MaximumLightingRadiusOffset.Value); } + private static readonly Lazy _PositionDampingConstantOffset = new(() => Schema.GetOffset(0x6611EEDD074C2A6A), LazyThreadSafetyMode.None); + public ref float PositionDampingConstant { - get => ref _Handle.AsRef(Schema.GetOffset(0x6611EEDD074C2A6A)); + get => ref _Handle.AsRef(_PositionDampingConstantOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_VectorFieldSnapshotImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_VectorFieldSnapshotImpl.cs index adb03cb38..55c3d5b93 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_VectorFieldSnapshotImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_VectorFieldSnapshotImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class C_OP_VectorFieldSnapshotImpl : CParticleFunctionOperatorI public C_OP_VectorFieldSnapshotImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNumberOffset = new(() => Schema.GetOffset(0x4679512A3F31A6BD), LazyThreadSafetyMode.None); + public ref int ControlPointNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0x4679512A3F31A6BD)); + get => ref _Handle.AsRef(_ControlPointNumberOffset.Value); } + private static readonly Lazy _AttributeToWriteOffset = new(() => Schema.GetOffset(0x4679512A389A3CC1), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t AttributeToWrite { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0x4679512A389A3CC1)); + get => new ParticleAttributeIndex_tImpl(_Handle + _AttributeToWriteOffset.Value); } + private static readonly Lazy _LocalSpaceCPOffset = new(() => Schema.GetOffset(0x4679512AC8E9CB31), LazyThreadSafetyMode.None); + public ref int LocalSpaceCP { - get => ref _Handle.AsRef(Schema.GetOffset(0x4679512AC8E9CB31)); + get => ref _Handle.AsRef(_LocalSpaceCPOffset.Value); } + private static readonly Lazy _InterpolationOffset = new(() => Schema.GetOffset(0x4679512ACF55B987), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Interpolation { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x4679512ACF55B987)); + get => new CPerParticleFloatInputImpl(_Handle + _InterpolationOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x4679512A5F596B51), LazyThreadSafetyMode.None); + public CPerParticleVecInput Scale { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x4679512A5F596B51)); + get => new CPerParticleVecInputImpl(_Handle + _ScaleOffset.Value); } + private static readonly Lazy _BoundaryDampeningOffset = new(() => Schema.GetOffset(0x4679512A6C557EF8), LazyThreadSafetyMode.None); + public ref float BoundaryDampening { - get => ref _Handle.AsRef(Schema.GetOffset(0x4679512A6C557EF8)); + get => ref _Handle.AsRef(_BoundaryDampeningOffset.Value); } + private static readonly Lazy _SetVelocityOffset = new(() => Schema.GetOffset(0x4679512A996C0A34), LazyThreadSafetyMode.None); + public ref bool SetVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0x4679512A996C0A34)); + get => ref _Handle.AsRef(_SetVelocityOffset.Value); } + private static readonly Lazy _LockToSurfaceOffset = new(() => Schema.GetOffset(0x4679512A81E43C02), LazyThreadSafetyMode.None); + public ref bool LockToSurface { - get => ref _Handle.AsRef(Schema.GetOffset(0x4679512A81E43C02)); + get => ref _Handle.AsRef(_LockToSurfaceOffset.Value); } + private static readonly Lazy _GridSpacingOffset = new(() => Schema.GetOffset(0x4679512AB7D1BFB8), LazyThreadSafetyMode.None); + public ref float GridSpacing { - get => ref _Handle.AsRef(Schema.GetOffset(0x4679512AB7D1BFB8)); + get => ref _Handle.AsRef(_GridSpacingOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_VectorNoiseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_VectorNoiseImpl.cs index ff84871b4..306576293 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_VectorNoiseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_VectorNoiseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class C_OP_VectorNoiseImpl : CParticleFunctionOperatorImpl, C_O public C_OP_VectorNoiseImpl(nint handle) : base(handle) { } + private static readonly Lazy _FieldOutputOffset = new(() => Schema.GetOffset(0xEAAF071CE5729606), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t FieldOutput { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xEAAF071CE5729606)); + get => new ParticleAttributeIndex_tImpl(_Handle + _FieldOutputOffset.Value); } + private static readonly Lazy _OutputMinOffset = new(() => Schema.GetOffset(0xEAAF071C2EFED678), LazyThreadSafetyMode.None); + public ref Vector OutputMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xEAAF071C2EFED678)); + get => ref _Handle.AsRef(_OutputMinOffset.Value); } + private static readonly Lazy _OutputMaxOffset = new(() => Schema.GetOffset(0xEAAF071C451280D2), LazyThreadSafetyMode.None); + public ref Vector OutputMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xEAAF071C451280D2)); + get => ref _Handle.AsRef(_OutputMaxOffset.Value); } + private static readonly Lazy _Fl4NoiseScaleOffset = new(() => Schema.GetOffset(0xEAAF071CF340DAD9), LazyThreadSafetyMode.None); + public ref float Fl4NoiseScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xEAAF071CF340DAD9)); + get => ref _Handle.AsRef(_Fl4NoiseScaleOffset.Value); } + private static readonly Lazy _AdditiveOffset = new(() => Schema.GetOffset(0xEAAF071C0FA86105), LazyThreadSafetyMode.None); + public ref bool Additive { - get => ref _Handle.AsRef(Schema.GetOffset(0xEAAF071C0FA86105)); + get => ref _Handle.AsRef(_AdditiveOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0xEAAF071C17412B2A), LazyThreadSafetyMode.None); + public ref bool Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0xEAAF071C17412B2A)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _NoiseAnimationTimeScaleOffset = new(() => Schema.GetOffset(0xEAAF071C504CBE30), LazyThreadSafetyMode.None); + public ref float NoiseAnimationTimeScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xEAAF071C504CBE30)); + get => ref _Handle.AsRef(_NoiseAnimationTimeScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_VelocityDecayImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_VelocityDecayImpl.cs index aede1eba9..0fc6dba4e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_VelocityDecayImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_VelocityDecayImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_OP_VelocityDecayImpl : CParticleFunctionOperatorImpl, C public C_OP_VelocityDecayImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinVelocityOffset = new(() => Schema.GetOffset(0xF59EE920AE8F0ADE), LazyThreadSafetyMode.None); + public ref float MinVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xF59EE920AE8F0ADE)); + get => ref _Handle.AsRef(_MinVelocityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_VelocityMatchingForceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_VelocityMatchingForceImpl.cs index 0f52ecf69..673f3d90f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_VelocityMatchingForceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_VelocityMatchingForceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class C_OP_VelocityMatchingForceImpl : CParticleFunctionOperato public C_OP_VelocityMatchingForceImpl(nint handle) : base(handle) { } + private static readonly Lazy _DirScaleOffset = new(() => Schema.GetOffset(0x8B7E85343A95212C), LazyThreadSafetyMode.None); + public ref float DirScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x8B7E85343A95212C)); + get => ref _Handle.AsRef(_DirScaleOffset.Value); } + private static readonly Lazy _SpdScaleOffset = new(() => Schema.GetOffset(0x8B7E8534B3DC18DA), LazyThreadSafetyMode.None); + public ref float SpdScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x8B7E8534B3DC18DA)); + get => ref _Handle.AsRef(_SpdScaleOffset.Value); } + private static readonly Lazy _NeighborDistanceOffset = new(() => Schema.GetOffset(0x8B7E8534F03C7C66), LazyThreadSafetyMode.None); + public ref float NeighborDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x8B7E8534F03C7C66)); + get => ref _Handle.AsRef(_NeighborDistanceOffset.Value); } + private static readonly Lazy _FacingStrengthOffset = new(() => Schema.GetOffset(0x8B7E85340D514274), LazyThreadSafetyMode.None); + public ref float FacingStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x8B7E85340D514274)); + get => ref _Handle.AsRef(_FacingStrengthOffset.Value); } + private static readonly Lazy _UseAABBOffset = new(() => Schema.GetOffset(0x8B7E853429AAFF2E), LazyThreadSafetyMode.None); + public ref bool UseAABB { - get => ref _Handle.AsRef(Schema.GetOffset(0x8B7E853429AAFF2E)); + get => ref _Handle.AsRef(_UseAABBOffset.Value); } + private static readonly Lazy _CPBroadcastOffset = new(() => Schema.GetOffset(0x8B7E85344C1065B5), LazyThreadSafetyMode.None); + public ref int CPBroadcast { - get => ref _Handle.AsRef(Schema.GetOffset(0x8B7E85344C1065B5)); + get => ref _Handle.AsRef(_CPBroadcastOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_WaterImpulseRendererImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_WaterImpulseRendererImpl.cs index 13e23ffe5..82f571e6f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_WaterImpulseRendererImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_WaterImpulseRendererImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class C_OP_WaterImpulseRendererImpl : CParticleFunctionRenderer public C_OP_WaterImpulseRendererImpl(nint handle) : base(handle) { } + private static readonly Lazy _PosOffset = new(() => Schema.GetOffset(0x7CC87C0C3B18EB69), LazyThreadSafetyMode.None); + public CPerParticleVecInput Pos { - get => new CPerParticleVecInputImpl(_Handle + Schema.GetOffset(0x7CC87C0C3B18EB69)); + get => new CPerParticleVecInputImpl(_Handle + _PosOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x7CC87C0C5ACFC08D), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Radius { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x7CC87C0C5ACFC08D)); + get => new CPerParticleFloatInputImpl(_Handle + _RadiusOffset.Value); } + private static readonly Lazy _MagnitudeOffset = new(() => Schema.GetOffset(0x7CC87C0CED0A1D8B), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Magnitude { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x7CC87C0CED0A1D8B)); + get => new CPerParticleFloatInputImpl(_Handle + _MagnitudeOffset.Value); } + private static readonly Lazy _ShapeOffset = new(() => Schema.GetOffset(0x7CC87C0C5DCE07D8), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Shape { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x7CC87C0C5DCE07D8)); + get => new CPerParticleFloatInputImpl(_Handle + _ShapeOffset.Value); } + private static readonly Lazy _WindSpeedOffset = new(() => Schema.GetOffset(0x7CC87C0CADDA5C24), LazyThreadSafetyMode.None); + public CPerParticleFloatInput WindSpeed { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x7CC87C0CADDA5C24)); + get => new CPerParticleFloatInputImpl(_Handle + _WindSpeedOffset.Value); } + private static readonly Lazy _WobbleOffset = new(() => Schema.GetOffset(0x7CC87C0CF8575B0A), LazyThreadSafetyMode.None); + public CPerParticleFloatInput Wobble { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0x7CC87C0CF8575B0A)); + get => new CPerParticleFloatInputImpl(_Handle + _WobbleOffset.Value); } + private static readonly Lazy _IsRadialWindOffset = new(() => Schema.GetOffset(0x7CC87C0C64147034), LazyThreadSafetyMode.None); + public ref bool IsRadialWind { - get => ref _Handle.AsRef(Schema.GetOffset(0x7CC87C0C64147034)); + get => ref _Handle.AsRef(_IsRadialWindOffset.Value); } + private static readonly Lazy _EventTypeOffset = new(() => Schema.GetOffset(0x7CC87C0CE1F9AA93), LazyThreadSafetyMode.None); + public ref EventTypeSelection_t EventType { - get => ref _Handle.AsRef(Schema.GetOffset(0x7CC87C0CE1F9AA93)); + get => ref _Handle.AsRef(_EventTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_WindForceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_WindForceImpl.cs index 644dc78b5..336524999 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_WindForceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_WindForceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class C_OP_WindForceImpl : CParticleFunctionForceImpl, C_OP_Win public C_OP_WindForceImpl(nint handle) : base(handle) { } + private static readonly Lazy _ForceOffset = new(() => Schema.GetOffset(0xBBD251C2E530B0A8), LazyThreadSafetyMode.None); + public ref Vector Force { - get => ref _Handle.AsRef(Schema.GetOffset(0xBBD251C2E530B0A8)); + get => ref _Handle.AsRef(_ForceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_WorldCollideConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_WorldCollideConstraintImpl.cs index f70de712c..edd01642f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_WorldCollideConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_WorldCollideConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_WorldTraceConstraintImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_WorldTraceConstraintImpl.cs index 037a637a4..5c1056bad 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_WorldTraceConstraintImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/C_OP_WorldTraceConstraintImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,90 +17,144 @@ internal partial class C_OP_WorldTraceConstraintImpl : CParticleFunctionConstrai public C_OP_WorldTraceConstraintImpl(nint handle) : base(handle) { } + private static readonly Lazy _CPOffset = new(() => Schema.GetOffset(0xD88A859FEB661472), LazyThreadSafetyMode.None); + public ref int CP { - get => ref _Handle.AsRef(Schema.GetOffset(0xD88A859FEB661472)); + get => ref _Handle.AsRef(_CPOffset.Value); } + private static readonly Lazy _CpOffsetOffset = new(() => Schema.GetOffset(0xD88A859FA3985361), LazyThreadSafetyMode.None); + public ref Vector CpOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xD88A859FA3985361)); + get => ref _Handle.AsRef(_CpOffsetOffset.Value); } + private static readonly Lazy _CollisionModeOffset = new(() => Schema.GetOffset(0xD88A859F2EB03DC4), LazyThreadSafetyMode.None); + public ref ParticleCollisionMode_t CollisionMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xD88A859F2EB03DC4)); + get => ref _Handle.AsRef(_CollisionModeOffset.Value); } + private static readonly Lazy _CollisionModeMinOffset = new(() => Schema.GetOffset(0xD88A859F6BF73D98), LazyThreadSafetyMode.None); + public ref ParticleCollisionMode_t CollisionModeMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xD88A859F6BF73D98)); + get => ref _Handle.AsRef(_CollisionModeMinOffset.Value); } + private static readonly Lazy _TraceSetOffset = new(() => Schema.GetOffset(0xD88A859FBD26C5B2), LazyThreadSafetyMode.None); + public ref ParticleTraceSet_t TraceSet { - get => ref _Handle.AsRef(Schema.GetOffset(0xD88A859FBD26C5B2)); + get => ref _Handle.AsRef(_TraceSetOffset.Value); } + private static readonly Lazy _CollisionGroupNameOffset = new(() => Schema.GetOffset(0xD88A859FD58A3195), LazyThreadSafetyMode.None); + public string CollisionGroupName { get { - var ptr = _Handle + Schema.GetOffset(0xD88A859FD58A3195); + var ptr = _Handle + _CollisionGroupNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xD88A859FD58A3195, value, 128); + set => Schema.SetFixedString(_Handle, _CollisionGroupNameOffset.Value, value, 128); } + private static readonly Lazy _WorldOnlyOffset = new(() => Schema.GetOffset(0xD88A859FC03ED30D), LazyThreadSafetyMode.None); + public ref bool WorldOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0xD88A859FC03ED30D)); + get => ref _Handle.AsRef(_WorldOnlyOffset.Value); } + private static readonly Lazy _BrushOnlyOffset = new(() => Schema.GetOffset(0xD88A859F66F92BAD), LazyThreadSafetyMode.None); + public ref bool BrushOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0xD88A859F66F92BAD)); + get => ref _Handle.AsRef(_BrushOnlyOffset.Value); } + private static readonly Lazy _IncludeWaterOffset = new(() => Schema.GetOffset(0xD88A859FEB8D4646), LazyThreadSafetyMode.None); + public ref bool IncludeWater { - get => ref _Handle.AsRef(Schema.GetOffset(0xD88A859FEB8D4646)); + get => ref _Handle.AsRef(_IncludeWaterOffset.Value); } + private static readonly Lazy _IgnoreCPOffset = new(() => Schema.GetOffset(0xD88A859FF0DDC7AC), LazyThreadSafetyMode.None); + public ref int IgnoreCP { - get => ref _Handle.AsRef(Schema.GetOffset(0xD88A859FF0DDC7AC)); + get => ref _Handle.AsRef(_IgnoreCPOffset.Value); } + private static readonly Lazy _CpMovementToleranceOffset = new(() => Schema.GetOffset(0xD88A859FC12044AC), LazyThreadSafetyMode.None); + public ref float CpMovementTolerance { - get => ref _Handle.AsRef(Schema.GetOffset(0xD88A859FC12044AC)); + get => ref _Handle.AsRef(_CpMovementToleranceOffset.Value); } + private static readonly Lazy _RetestRateOffset = new(() => Schema.GetOffset(0xD88A859F38DA66AC), LazyThreadSafetyMode.None); + public ref float RetestRate { - get => ref _Handle.AsRef(Schema.GetOffset(0xD88A859F38DA66AC)); + get => ref _Handle.AsRef(_RetestRateOffset.Value); } + private static readonly Lazy _TraceToleranceOffset = new(() => Schema.GetOffset(0xD88A859F8AA4F663), LazyThreadSafetyMode.None); + public ref float TraceTolerance { - get => ref _Handle.AsRef(Schema.GetOffset(0xD88A859F8AA4F663)); + get => ref _Handle.AsRef(_TraceToleranceOffset.Value); } + private static readonly Lazy _CollisionConfirmationSpeedOffset = new(() => Schema.GetOffset(0xD88A859F18CD4FE3), LazyThreadSafetyMode.None); + public ref float CollisionConfirmationSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xD88A859F18CD4FE3)); + get => ref _Handle.AsRef(_CollisionConfirmationSpeedOffset.Value); } + private static readonly Lazy _MaxTracesPerFrameOffset = new(() => Schema.GetOffset(0xD88A859F849E53A7), LazyThreadSafetyMode.None); + public ref float MaxTracesPerFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0xD88A859F849E53A7)); + get => ref _Handle.AsRef(_MaxTracesPerFrameOffset.Value); } + private static readonly Lazy _RadiusScaleOffset = new(() => Schema.GetOffset(0xD88A859FA7A20159), LazyThreadSafetyMode.None); + public CPerParticleFloatInput RadiusScale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xD88A859FA7A20159)); + get => new CPerParticleFloatInputImpl(_Handle + _RadiusScaleOffset.Value); } + private static readonly Lazy _BounceAmountOffset = new(() => Schema.GetOffset(0xD88A859F43A3ECA3), LazyThreadSafetyMode.None); + public CPerParticleFloatInput BounceAmount { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xD88A859F43A3ECA3)); + get => new CPerParticleFloatInputImpl(_Handle + _BounceAmountOffset.Value); } + private static readonly Lazy _SlideAmountOffset = new(() => Schema.GetOffset(0xD88A859F674011EC), LazyThreadSafetyMode.None); + public CPerParticleFloatInput SlideAmount { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xD88A859F674011EC)); + get => new CPerParticleFloatInputImpl(_Handle + _SlideAmountOffset.Value); } + private static readonly Lazy _RandomDirScaleOffset = new(() => Schema.GetOffset(0xD88A859FDAE4B057), LazyThreadSafetyMode.None); + public CPerParticleFloatInput RandomDirScale { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xD88A859FDAE4B057)); + get => new CPerParticleFloatInputImpl(_Handle + _RandomDirScaleOffset.Value); } + private static readonly Lazy _DecayBounceOffset = new(() => Schema.GetOffset(0xD88A859FC161B795), LazyThreadSafetyMode.None); + public ref bool DecayBounce { - get => ref _Handle.AsRef(Schema.GetOffset(0xD88A859FC161B795)); + get => ref _Handle.AsRef(_DecayBounceOffset.Value); } + private static readonly Lazy _KillonContactOffset = new(() => Schema.GetOffset(0xD88A859FDB24D138), LazyThreadSafetyMode.None); + public ref bool KillonContact { - get => ref _Handle.AsRef(Schema.GetOffset(0xD88A859FDB24D138)); + get => ref _Handle.AsRef(_KillonContactOffset.Value); } + private static readonly Lazy _MinSpeedOffset = new(() => Schema.GetOffset(0xD88A859F4A4CBC54), LazyThreadSafetyMode.None); + public ref float MinSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0xD88A859F4A4CBC54)); + get => ref _Handle.AsRef(_MinSpeedOffset.Value); } + private static readonly Lazy _SetNormalOffset = new(() => Schema.GetOffset(0xD88A859F542722AC), LazyThreadSafetyMode.None); + public ref bool SetNormal { - get => ref _Handle.AsRef(Schema.GetOffset(0xD88A859F542722AC)); + get => ref _Handle.AsRef(_SetNormalOffset.Value); } + private static readonly Lazy _StickOnCollisionFieldOffset = new(() => Schema.GetOffset(0xD88A859FA94734FA), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t StickOnCollisionField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xD88A859FA94734FA)); + get => new ParticleAttributeIndex_tImpl(_Handle + _StickOnCollisionFieldOffset.Value); } + private static readonly Lazy _StopSpeedOffset = new(() => Schema.GetOffset(0xD88A859FC6DE3582), LazyThreadSafetyMode.None); + public CPerParticleFloatInput StopSpeed { - get => new CPerParticleFloatInputImpl(_Handle + Schema.GetOffset(0xD88A859FC6DE3582)); + get => new CPerParticleFloatInputImpl(_Handle + _StopSpeedOffset.Value); } + private static readonly Lazy _EntityStickDataFieldOffset = new(() => Schema.GetOffset(0xD88A859F9BA1B8FA), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t EntityStickDataField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xD88A859F9BA1B8FA)); + get => new ParticleAttributeIndex_tImpl(_Handle + _EntityStickDataFieldOffset.Value); } + private static readonly Lazy _EntityStickNormalFieldOffset = new(() => Schema.GetOffset(0xD88A859FBB3D8ECF), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t EntityStickNormalField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xD88A859FBB3D8ECF)); + get => new ParticleAttributeIndex_tImpl(_Handle + _EntityStickNormalFieldOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CastSphereSATParams_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CastSphereSATParams_tImpl.cs index da3f8574d..2ec38b632 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CastSphereSATParams_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CastSphereSATParams_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,36 @@ internal partial class CastSphereSATParams_tImpl : SchemaClass, CastSphereSATPar public CastSphereSATParams_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _RayStartOffset = new(() => Schema.GetOffset(0x6282EF48CB929F19), LazyThreadSafetyMode.None); + public ref Vector RayStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x6282EF48CB929F19)); + get => ref _Handle.AsRef(_RayStartOffset.Value); } + private static readonly Lazy _RayDeltaOffset = new(() => Schema.GetOffset(0x6282EF4874156D5B), LazyThreadSafetyMode.None); + public ref Vector RayDelta { - get => ref _Handle.AsRef(Schema.GetOffset(0x6282EF4874156D5B)); + get => ref _Handle.AsRef(_RayDeltaOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x6282EF485ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x6282EF485ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _MaxFractionOffset = new(() => Schema.GetOffset(0x6282EF48BA58C801), LazyThreadSafetyMode.None); + public ref float MaxFraction { - get => ref _Handle.AsRef(Schema.GetOffset(0x6282EF48BA58C801)); + get => ref _Handle.AsRef(_MaxFractionOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x6282EF48B731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0x6282EF48B731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _HullOffset = new(() => Schema.GetOffset(0x6282EF48FAD20488), LazyThreadSafetyMode.None); + public RnHull_t? Hull { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6282EF48FAD20488)); + var ptr = _Handle.Read(_HullOffset.Value); return ptr.IsValidPtr() ? new RnHull_tImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ChainToSolveData_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ChainToSolveData_tImpl.cs index 816a27269..817b2fc82 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ChainToSolveData_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ChainToSolveData_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class ChainToSolveData_tImpl : SchemaClass, ChainToSolveData_t public ChainToSolveData_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChainIndexOffset = new(() => Schema.GetOffset(0x87A241BDA34589B6), LazyThreadSafetyMode.None); + public ref int ChainIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x87A241BDA34589B6)); + get => ref _Handle.AsRef(_ChainIndexOffset.Value); } + private static readonly Lazy _SolverSettingsOffset = new(() => Schema.GetOffset(0x87A241BDE19D8233), LazyThreadSafetyMode.None); + public IKSolverSettings_t SolverSettings { - get => new IKSolverSettings_tImpl(_Handle + Schema.GetOffset(0x87A241BDE19D8233)); + get => new IKSolverSettings_tImpl(_Handle + _SolverSettingsOffset.Value); } + private static readonly Lazy _TargetSettingsOffset = new(() => Schema.GetOffset(0x87A241BDD6828E35), LazyThreadSafetyMode.None); + public IKTargetSettings_t TargetSettings { - get => new IKTargetSettings_tImpl(_Handle + Schema.GetOffset(0x87A241BDD6828E35)); + get => new IKTargetSettings_tImpl(_Handle + _TargetSettingsOffset.Value); } + private static readonly Lazy _DebugSettingOffset = new(() => Schema.GetOffset(0x87A241BD624CC0B4), LazyThreadSafetyMode.None); + public ref SolveIKChainAnimNodeDebugSetting DebugSetting { - get => ref _Handle.AsRef(Schema.GetOffset(0x87A241BD624CC0B4)); + get => ref _Handle.AsRef(_DebugSettingOffset.Value); } + private static readonly Lazy _DebugNormalizedValueOffset = new(() => Schema.GetOffset(0x87A241BD0F331460), LazyThreadSafetyMode.None); + public ref float DebugNormalizedValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x87A241BD0F331460)); + get => ref _Handle.AsRef(_DebugNormalizedValueOffset.Value); } + private static readonly Lazy _DebugOffsetOffset = new(() => Schema.GetOffset(0x87A241BD2FF28BBF), LazyThreadSafetyMode.None); + public ref Vector DebugOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x87A241BD2FF28BBF)); + get => ref _Handle.AsRef(_DebugOffsetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ClutterSceneObject_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ClutterSceneObject_tImpl.cs index 79dd0b27b..aa5d6dbac 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ClutterSceneObject_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ClutterSceneObject_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class ClutterSceneObject_tImpl : SchemaClass, ClutterSceneObjec public ClutterSceneObject_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoundsOffset = new(() => Schema.GetOffset(0xAE8D1536ABF76288), LazyThreadSafetyMode.None); + public AABB_t Bounds { - get => new AABB_tImpl(_Handle + Schema.GetOffset(0xAE8D1536ABF76288)); + get => new AABB_tImpl(_Handle + _BoundsOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0xAE8D1536DC74A14C), LazyThreadSafetyMode.None); + public ref ObjectTypeFlags_t Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0xAE8D1536DC74A14C)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _LayerOffset = new(() => Schema.GetOffset(0xAE8D1536477C7B2A), LazyThreadSafetyMode.None); + public ref short Layer { - get => ref _Handle.AsRef(Schema.GetOffset(0xAE8D1536477C7B2A)); + get => ref _Handle.AsRef(_LayerOffset.Value); } + private static readonly Lazy _InstancePositionsOffset = new(() => Schema.GetOffset(0xAE8D15369B4D36BA), LazyThreadSafetyMode.None); + public ref CUtlVector InstancePositions { - get => ref _Handle.AsRef>(Schema.GetOffset(0xAE8D15369B4D36BA)); + get => ref _Handle.AsRef>(_InstancePositionsOffset.Value); } + private static readonly Lazy _InstanceScalesOffset = new(() => Schema.GetOffset(0xAE8D1536F0D43B61), LazyThreadSafetyMode.None); + public ref CUtlVector InstanceScales { - get => ref _Handle.AsRef>(Schema.GetOffset(0xAE8D1536F0D43B61)); + get => ref _Handle.AsRef>(_InstanceScalesOffset.Value); } + private static readonly Lazy _InstanceTintSrgbOffset = new(() => Schema.GetOffset(0xAE8D15369EE1C08B), LazyThreadSafetyMode.None); + public ref CUtlVector InstanceTintSrgb { - get => ref _Handle.AsRef>(Schema.GetOffset(0xAE8D15369EE1C08B)); + get => ref _Handle.AsRef>(_InstanceTintSrgbOffset.Value); } + private static readonly Lazy _TilesOffset = new(() => Schema.GetOffset(0xAE8D15361FD2CAEE), LazyThreadSafetyMode.None); + public ref CUtlVector Tiles { - get => ref _Handle.AsRef>(Schema.GetOffset(0xAE8D15361FD2CAEE)); + get => ref _Handle.AsRef>(_TilesOffset.Value); } + private static readonly Lazy _RenderableModelOffset = new(() => Schema.GetOffset(0xAE8D15362AEEFA82), LazyThreadSafetyMode.None); + public ref CStrongHandle RenderableModel { - get => ref _Handle.AsRef>(Schema.GetOffset(0xAE8D15362AEEFA82)); + get => ref _Handle.AsRef>(_RenderableModelOffset.Value); } + private static readonly Lazy _MaterialGroupOffset = new(() => Schema.GetOffset(0xAE8D15362B778F03), LazyThreadSafetyMode.None); + public ref CUtlStringToken MaterialGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0xAE8D15362B778F03)); + get => ref _Handle.AsRef(_MaterialGroupOffset.Value); } + private static readonly Lazy _BeginCullSizeOffset = new(() => Schema.GetOffset(0xAE8D153680809565), LazyThreadSafetyMode.None); + public ref float BeginCullSize { - get => ref _Handle.AsRef(Schema.GetOffset(0xAE8D153680809565)); + get => ref _Handle.AsRef(_BeginCullSizeOffset.Value); } + private static readonly Lazy _EndCullSizeOffset = new(() => Schema.GetOffset(0xAE8D153664AC3931), LazyThreadSafetyMode.None); + public ref float EndCullSize { - get => ref _Handle.AsRef(Schema.GetOffset(0xAE8D153664AC3931)); + get => ref _Handle.AsRef(_EndCullSizeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ClutterTile_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ClutterTile_tImpl.cs index 044acf207..f2416ddc2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ClutterTile_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ClutterTile_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class ClutterTile_tImpl : SchemaClass, ClutterTile_t { public ClutterTile_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FirstInstanceOffset = new(() => Schema.GetOffset(0xAC4066F19AF07072), LazyThreadSafetyMode.None); + public ref uint FirstInstance { - get => ref _Handle.AsRef(Schema.GetOffset(0xAC4066F19AF07072)); + get => ref _Handle.AsRef(_FirstInstanceOffset.Value); } + private static readonly Lazy _LastInstanceOffset = new(() => Schema.GetOffset(0xAC4066F10D99AC92), LazyThreadSafetyMode.None); + public ref uint LastInstance { - get => ref _Handle.AsRef(Schema.GetOffset(0xAC4066F10D99AC92)); + get => ref _Handle.AsRef(_LastInstanceOffset.Value); } + private static readonly Lazy _BoundsWsOffset = new(() => Schema.GetOffset(0xAC4066F1BE54855A), LazyThreadSafetyMode.None); + public AABB_t BoundsWs { - get => new AABB_tImpl(_Handle + Schema.GetOffset(0xAC4066F1BE54855A)); + get => new AABB_tImpl(_Handle + _BoundsWsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CollisionGroupContext_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CollisionGroupContext_tImpl.cs index 86ad4e7cb..6a7231586 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CollisionGroupContext_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CollisionGroupContext_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class CollisionGroupContext_tImpl : SchemaClass, CollisionGroup public CollisionGroupContext_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CollisionGroupNumberOffset = new(() => Schema.GetOffset(0xF923B00A9115013F), LazyThreadSafetyMode.None); + public ref int CollisionGroupNumber { - get => ref _Handle.AsRef(Schema.GetOffset(0xF923B00A9115013F)); + get => ref _Handle.AsRef(_CollisionGroupNumberOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ConfigIndexImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ConfigIndexImpl.cs index 335a3a69f..a9a7cfe69 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ConfigIndexImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ConfigIndexImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class ConfigIndexImpl : SchemaClass, ConfigIndex { public ConfigIndexImpl(nint handle) : base(handle) { } + private static readonly Lazy _GroupOffset = new(() => Schema.GetOffset(0x193FE40D0CD16308), LazyThreadSafetyMode.None); + public ref ushort Group { - get => ref _Handle.AsRef(Schema.GetOffset(0x193FE40D0CD16308)); + get => ref _Handle.AsRef(_GroupOffset.Value); } + private static readonly Lazy _ConfigOffset = new(() => Schema.GetOffset(0x193FE40D8BD1DF73), LazyThreadSafetyMode.None); + public ref ushort Config { - get => ref _Handle.AsRef(Schema.GetOffset(0x193FE40D8BD1DF73)); + get => ref _Handle.AsRef(_ConfigOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ConstantInfo_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ConstantInfo_tImpl.cs index 21d43251c..9c3586807 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ConstantInfo_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ConstantInfo_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class ConstantInfo_tImpl : SchemaClass, ConstantInfo_t { public ConstantInfo_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xF4BEF78E4D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xF4BEF78E4D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xF4BEF78E4D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _NameTokenOffset = new(() => Schema.GetOffset(0xF4BEF78E9293FEF3), LazyThreadSafetyMode.None); + public ref CUtlStringToken NameToken { - get => ref _Handle.AsRef(Schema.GetOffset(0xF4BEF78E9293FEF3)); + get => ref _Handle.AsRef(_NameTokenOffset.Value); } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xF4BEF78E8DFCB984), LazyThreadSafetyMode.None); + public ref float Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xF4BEF78E8DFCB984)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ConstraintSoundInfoImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ConstraintSoundInfoImpl.cs index d7a20a607..73efe4627 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ConstraintSoundInfoImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ConstraintSoundInfoImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,57 @@ internal partial class ConstraintSoundInfoImpl : SchemaClass, ConstraintSoundInf public ConstraintSoundInfoImpl(nint handle) : base(handle) { } + private static readonly Lazy _SamplerOffset = new(() => Schema.GetOffset(0x79068C49FCCD6193), LazyThreadSafetyMode.None); + public VelocitySampler Sampler { - get => new VelocitySamplerImpl(_Handle + Schema.GetOffset(0x79068C49FCCD6193)); + get => new VelocitySamplerImpl(_Handle + _SamplerOffset.Value); } + private static readonly Lazy _SoundProfileOffset = new(() => Schema.GetOffset(0x79068C49D9300921), LazyThreadSafetyMode.None); + public SimpleConstraintSoundProfile SoundProfile { - get => new SimpleConstraintSoundProfileImpl(_Handle + Schema.GetOffset(0x79068C49D9300921)); + get => new SimpleConstraintSoundProfileImpl(_Handle + _SoundProfileOffset.Value); } + private static readonly Lazy _ForwardAxisOffset = new(() => Schema.GetOffset(0x79068C49DC95B25F), LazyThreadSafetyMode.None); + public ref Vector ForwardAxis { - get => ref _Handle.AsRef(Schema.GetOffset(0x79068C49DC95B25F)); + get => ref _Handle.AsRef(_ForwardAxisOffset.Value); } + private static readonly Lazy _TravelSoundFwdOffset = new(() => Schema.GetOffset(0x79068C497A65F069), LazyThreadSafetyMode.None); + public string TravelSoundFwd { get { - var ptr = _Handle.Read(Schema.GetOffset(0x79068C497A65F069)); + var ptr = _Handle.Read(_TravelSoundFwdOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x79068C497A65F069, value); + set => Schema.SetString(_Handle, _TravelSoundFwdOffset.Value, value); } + private static readonly Lazy _TravelSoundBackOffset = new(() => Schema.GetOffset(0x79068C49506B73E3), LazyThreadSafetyMode.None); + public string TravelSoundBack { get { - var ptr = _Handle.Read(Schema.GetOffset(0x79068C49506B73E3)); + var ptr = _Handle.Read(_TravelSoundBackOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x79068C49506B73E3, value); + set => Schema.SetString(_Handle, _TravelSoundBackOffset.Value, value); } + private static readonly Lazy _ReversalSoundsOffset = new(() => Schema.GetOffset(0x79068C49F5164187), LazyThreadSafetyMode.None); + public string ReversalSounds { get { - var ptr = _Handle.Read(Schema.GetOffset(0x79068C49F5164187)); + var ptr = _Handle.Read(_ReversalSoundsOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x79068C49F5164187, value); + set => Schema.SetString(_Handle, _ReversalSoundsOffset.Value, value); } + private static readonly Lazy _PlayTravelSoundOffset = new(() => Schema.GetOffset(0x79068C49FF3432DE), LazyThreadSafetyMode.None); + public ref bool PlayTravelSound { - get => ref _Handle.AsRef(Schema.GetOffset(0x79068C49FF3432DE)); + get => ref _Handle.AsRef(_PlayTravelSoundOffset.Value); } + private static readonly Lazy _PlayReversalSoundOffset = new(() => Schema.GetOffset(0x79068C4941EF4324), LazyThreadSafetyMode.None); + public ref bool PlayReversalSound { - get => ref _Handle.AsRef(Schema.GetOffset(0x79068C4941EF4324)); + get => ref _Handle.AsRef(_PlayReversalSoundOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ControlPointReference_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ControlPointReference_tImpl.cs index b403e6485..14328b345 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ControlPointReference_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ControlPointReference_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class ControlPointReference_tImpl : SchemaClass, ControlPointRe public ControlPointReference_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointNameStringOffset = new(() => Schema.GetOffset(0x83CD020625F4E2B6), LazyThreadSafetyMode.None); + public ref int ControlPointNameString { - get => ref _Handle.AsRef(Schema.GetOffset(0x83CD020625F4E2B6)); + get => ref _Handle.AsRef(_ControlPointNameStringOffset.Value); } + private static readonly Lazy _OffsetFromControlPointOffset = new(() => Schema.GetOffset(0x83CD0206C9E39FFF), LazyThreadSafetyMode.None); + public ref Vector OffsetFromControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x83CD0206C9E39FFF)); + get => ref _Handle.AsRef(_OffsetFromControlPointOffset.Value); } + private static readonly Lazy _OffsetInLocalSpaceOffset = new(() => Schema.GetOffset(0x83CD02064ADEF5FE), LazyThreadSafetyMode.None); + public ref bool OffsetInLocalSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x83CD02064ADEF5FE)); + get => ref _Handle.AsRef(_OffsetInLocalSpaceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CountdownTimerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CountdownTimerImpl.cs index 12a42579d..9911f2b96 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CountdownTimerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CountdownTimerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CountdownTimerImpl : SchemaClass, CountdownTimer { public CountdownTimerImpl(nint handle) : base(handle) { } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0x8A632F13D9FF5AD), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A632F13D9FF5AD)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _TimestampOffset = new(() => Schema.GetOffset(0x8A632F1B6C56F43), LazyThreadSafetyMode.None); + public GameTime_t Timestamp { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8A632F1B6C56F43)); + get => new GameTime_tImpl(_Handle + _TimestampOffset.Value); } + private static readonly Lazy _TimescaleOffset = new(() => Schema.GetOffset(0x8A632F18A240BBE), LazyThreadSafetyMode.None); + public ref float Timescale { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A632F18A240BBE)); + get => ref _Handle.AsRef(_TimescaleOffset.Value); } + private static readonly Lazy _WorldGroupIdOffset = new(() => Schema.GetOffset(0x8A632F17414B193), LazyThreadSafetyMode.None); + public ref uint WorldGroupId { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A632F17414B193)); + get => ref _Handle.AsRef(_WorldGroupIdOffset.Value); } public void DurationUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CovMatrix3Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CovMatrix3Impl.cs index 74c5e5eb1..156863c86 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/CovMatrix3Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/CovMatrix3Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class CovMatrix3Impl : SchemaClass, CovMatrix3 { public CovMatrix3Impl(nint handle) : base(handle) { } + private static readonly Lazy _DiagOffset = new(() => Schema.GetOffset(0xA222FA6F7CC0D332), LazyThreadSafetyMode.None); + public ref Vector Diag { - get => ref _Handle.AsRef(Schema.GetOffset(0xA222FA6F7CC0D332)); + get => ref _Handle.AsRef(_DiagOffset.Value); } + private static readonly Lazy _XYOffset = new(() => Schema.GetOffset(0xA222FA6FA58DC304), LazyThreadSafetyMode.None); + public ref float XY { - get => ref _Handle.AsRef(Schema.GetOffset(0xA222FA6FA58DC304)); + get => ref _Handle.AsRef(_XYOffset.Value); } + private static readonly Lazy _XZOffset = new(() => Schema.GetOffset(0xA222FA6FA88DC7BD), LazyThreadSafetyMode.None); + public ref float XZ { - get => ref _Handle.AsRef(Schema.GetOffset(0xA222FA6FA88DC7BD)); + get => ref _Handle.AsRef(_XZOffset.Value); } + private static readonly Lazy _YZOffset = new(() => Schema.GetOffset(0xA222FA6F9E8B7968), LazyThreadSafetyMode.None); + public ref float YZ { - get => ref _Handle.AsRef(Schema.GetOffset(0xA222FA6F9E8B7968)); + get => ref _Handle.AsRef(_YZOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/DecalGroupOption_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/DecalGroupOption_tImpl.cs index fb5901792..a48fd1af4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/DecalGroupOption_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/DecalGroupOption_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class DecalGroupOption_tImpl : SchemaClass, DecalGroupOption_t public DecalGroupOption_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaterialOffset = new(() => Schema.GetOffset(0x9F3DB78B888CE42E), LazyThreadSafetyMode.None); + public ref CStrongHandle Material { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9F3DB78B888CE42E)); + get => ref _Handle.AsRef>(_MaterialOffset.Value); } + private static readonly Lazy _SequenceNameOffset = new(() => Schema.GetOffset(0x9F3DB78B7462AF30), LazyThreadSafetyMode.None); + public ref CGlobalSymbol SequenceName { - get => ref _Handle.AsRef(Schema.GetOffset(0x9F3DB78B7462AF30)); + get => ref _Handle.AsRef(_SequenceNameOffset.Value); } + private static readonly Lazy _ProbabilityOffset = new(() => Schema.GetOffset(0x9F3DB78B9ABB533A), LazyThreadSafetyMode.None); + public ref float Probability { - get => ref _Handle.AsRef(Schema.GetOffset(0x9F3DB78B9ABB533A)); + get => ref _Handle.AsRef(_ProbabilityOffset.Value); } + private static readonly Lazy _EnableAngleBetweenNormalAndGravityRangeOffset = new(() => Schema.GetOffset(0x9F3DB78B5C382DAE), LazyThreadSafetyMode.None); + public ref bool EnableAngleBetweenNormalAndGravityRange { - get => ref _Handle.AsRef(Schema.GetOffset(0x9F3DB78B5C382DAE)); + get => ref _Handle.AsRef(_EnableAngleBetweenNormalAndGravityRangeOffset.Value); } + private static readonly Lazy _MinAngleBetweenNormalAndGravityOffset = new(() => Schema.GetOffset(0x9F3DB78B8EB6C526), LazyThreadSafetyMode.None); + public ref float MinAngleBetweenNormalAndGravity { - get => ref _Handle.AsRef(Schema.GetOffset(0x9F3DB78B8EB6C526)); + get => ref _Handle.AsRef(_MinAngleBetweenNormalAndGravityOffset.Value); } + private static readonly Lazy _MaxAngleBetweenNormalAndGravityOffset = new(() => Schema.GetOffset(0x9F3DB78B44368314), LazyThreadSafetyMode.None); + public ref float MaxAngleBetweenNormalAndGravity { - get => ref _Handle.AsRef(Schema.GetOffset(0x9F3DB78B44368314)); + get => ref _Handle.AsRef(_MaxAngleBetweenNormalAndGravityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/DestructibleHitGroupToDestroy_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/DestructibleHitGroupToDestroy_tImpl.cs index fbd5cf7f7..de8def20f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/DestructibleHitGroupToDestroy_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/DestructibleHitGroupToDestroy_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class DestructibleHitGroupToDestroy_tImpl : SchemaClass, Destru public DestructibleHitGroupToDestroy_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _HitGroupOffset = new(() => Schema.GetOffset(0xD162E34F9C854D19), LazyThreadSafetyMode.None); + public ref HitGroup_t HitGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0xD162E34F9C854D19)); + get => ref _Handle.AsRef(_HitGroupOffset.Value); } + private static readonly Lazy _MaxDamageLevelOffset = new(() => Schema.GetOffset(0xD162E34FBEC9C376), LazyThreadSafetyMode.None); + public ref int MaxDamageLevel { - get => ref _Handle.AsRef(Schema.GetOffset(0xD162E34FBEC9C376)); + get => ref _Handle.AsRef(_MaxDamageLevelOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/Dop26_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/Dop26_tImpl.cs index 42130ea5b..427436a9c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/Dop26_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/Dop26_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/DynamicMeshDeformParams_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/DynamicMeshDeformParams_tImpl.cs index b0e89ad18..43b48e298 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/DynamicMeshDeformParams_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/DynamicMeshDeformParams_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class DynamicMeshDeformParams_tImpl : SchemaClass, DynamicMeshD public DynamicMeshDeformParams_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TensionCompressScaleOffset = new(() => Schema.GetOffset(0xBC2B1F5B5DC0072F), LazyThreadSafetyMode.None); + public ref float TensionCompressScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC2B1F5B5DC0072F)); + get => ref _Handle.AsRef(_TensionCompressScaleOffset.Value); } + private static readonly Lazy _TensionStretchScaleOffset = new(() => Schema.GetOffset(0xBC2B1F5B0EC210AA), LazyThreadSafetyMode.None); + public ref float TensionStretchScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC2B1F5B0EC210AA)); + get => ref _Handle.AsRef(_TensionStretchScaleOffset.Value); } + private static readonly Lazy _RecomputeSmoothNormalsAfterAnimationOffset = new(() => Schema.GetOffset(0xBC2B1F5BAAFD0999), LazyThreadSafetyMode.None); + public ref bool RecomputeSmoothNormalsAfterAnimation { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC2B1F5BAAFD0999)); + get => ref _Handle.AsRef(_RecomputeSmoothNormalsAfterAnimationOffset.Value); } + private static readonly Lazy _ComputeDynamicMeshTensionAfterAnimationOffset = new(() => Schema.GetOffset(0xBC2B1F5BDC02C4E8), LazyThreadSafetyMode.None); + public ref bool ComputeDynamicMeshTensionAfterAnimation { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC2B1F5BDC02C4E8)); + get => ref _Handle.AsRef(_ComputeDynamicMeshTensionAfterAnimationOffset.Value); } + private static readonly Lazy _SmoothNormalsAcrossUvSeamsOffset = new(() => Schema.GetOffset(0xBC2B1F5B6719D8D2), LazyThreadSafetyMode.None); + public ref bool SmoothNormalsAcrossUvSeams { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC2B1F5B6719D8D2)); + get => ref _Handle.AsRef(_SmoothNormalsAcrossUvSeamsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/DynamicVolumeDef_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/DynamicVolumeDef_tImpl.cs index 1b1d24ea6..584f8af77 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/DynamicVolumeDef_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/DynamicVolumeDef_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class DynamicVolumeDef_tImpl : SchemaClass, DynamicVolumeDef_t public DynamicVolumeDef_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SourceOffset = new(() => Schema.GetOffset(0x9D661554D0835C78), LazyThreadSafetyMode.None); + public ref CHandle Source { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9D661554D0835C78)); + get => ref _Handle.AsRef>(_SourceOffset.Value); } + private static readonly Lazy _TargetOffset = new(() => Schema.GetOffset(0x9D661554FA08A9E8), LazyThreadSafetyMode.None); + public ref CHandle Target { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9D661554FA08A9E8)); + get => ref _Handle.AsRef>(_TargetOffset.Value); } + private static readonly Lazy _HullIdxOffset = new(() => Schema.GetOffset(0x9D661554595B303D), LazyThreadSafetyMode.None); + public ref int HullIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x9D661554595B303D)); + get => ref _Handle.AsRef(_HullIdxOffset.Value); } + private static readonly Lazy _SourceAnchorPosOffset = new(() => Schema.GetOffset(0x9D661554E6AC3899), LazyThreadSafetyMode.None); + public ref Vector SourceAnchorPos { - get => ref _Handle.AsRef(Schema.GetOffset(0x9D661554E6AC3899)); + get => ref _Handle.AsRef(_SourceAnchorPosOffset.Value); } + private static readonly Lazy _TargetAnchorPosOffset = new(() => Schema.GetOffset(0x9D6615540976AD91), LazyThreadSafetyMode.None); + public ref Vector TargetAnchorPos { - get => ref _Handle.AsRef(Schema.GetOffset(0x9D6615540976AD91)); + get => ref _Handle.AsRef(_TargetAnchorPosOffset.Value); } + private static readonly Lazy _AreaSrcOffset = new(() => Schema.GetOffset(0x9D661554E55D859E), LazyThreadSafetyMode.None); + public ref uint AreaSrc { - get => ref _Handle.AsRef(Schema.GetOffset(0x9D661554E55D859E)); + get => ref _Handle.AsRef(_AreaSrcOffset.Value); } + private static readonly Lazy _AreaDstOffset = new(() => Schema.GetOffset(0x9D66155487799313), LazyThreadSafetyMode.None); + public ref uint AreaDst { - get => ref _Handle.AsRef(Schema.GetOffset(0x9D66155487799313)); + get => ref _Handle.AsRef(_AreaDstOffset.Value); } + private static readonly Lazy _AttachedOffset = new(() => Schema.GetOffset(0x9D6615544C8B6515), LazyThreadSafetyMode.None); + public ref bool Attached { - get => ref _Handle.AsRef(Schema.GetOffset(0x9D6615544C8B6515)); + get => ref _Handle.AsRef(_AttachedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EmptyTestScriptImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EmptyTestScriptImpl.cs index d219faf58..af6bb7a6a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EmptyTestScriptImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EmptyTestScriptImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class EmptyTestScriptImpl : CAnimScriptBaseImpl, EmptyTestScrip public EmptyTestScriptImpl(nint handle) : base(handle) { } + private static readonly Lazy _TestOffset = new(() => Schema.GetOffset(0xB7F6B6D5FAAC6DA3), LazyThreadSafetyMode.None); + public SchemaUntypedField Test { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xB7F6B6D5FAAC6DA3)); + get => new SchemaUntypedField(_Handle + _TestOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EngineCountdownTimerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EngineCountdownTimerImpl.cs index e3a499ec3..07d07c093 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EngineCountdownTimerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EngineCountdownTimerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class EngineCountdownTimerImpl : SchemaClass, EngineCountdownTi public EngineCountdownTimerImpl(nint handle) : base(handle) { } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0x3F0C5A433D9FF5AD), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F0C5A433D9FF5AD)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _TimestampOffset = new(() => Schema.GetOffset(0x3F0C5A43B6C56F43), LazyThreadSafetyMode.None); + public ref float Timestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F0C5A43B6C56F43)); + get => ref _Handle.AsRef(_TimestampOffset.Value); } + private static readonly Lazy _TimescaleOffset = new(() => Schema.GetOffset(0x3F0C5A438A240BBE), LazyThreadSafetyMode.None); + public ref float Timescale { - get => ref _Handle.AsRef(Schema.GetOffset(0x3F0C5A438A240BBE)); + get => ref _Handle.AsRef(_TimescaleOffset.Value); } public void DurationUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EngineLoopState_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EngineLoopState_tImpl.cs index 8a0f51084..ae66a0e6b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EngineLoopState_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EngineLoopState_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class EngineLoopState_tImpl : SchemaClass, EngineLoopState_t { public EngineLoopState_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _PlatWindowWidthOffset = new(() => Schema.GetOffset(0x8A7EC4513AF18278), LazyThreadSafetyMode.None); + public ref int PlatWindowWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A7EC4513AF18278)); + get => ref _Handle.AsRef(_PlatWindowWidthOffset.Value); } + private static readonly Lazy _PlatWindowHeightOffset = new(() => Schema.GetOffset(0x8A7EC45157A7B88F), LazyThreadSafetyMode.None); + public ref int PlatWindowHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A7EC45157A7B88F)); + get => ref _Handle.AsRef(_PlatWindowHeightOffset.Value); } + private static readonly Lazy _RenderWidthOffset = new(() => Schema.GetOffset(0x8A7EC45179B0DC63), LazyThreadSafetyMode.None); + public ref int RenderWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A7EC45179B0DC63)); + get => ref _Handle.AsRef(_RenderWidthOffset.Value); } + private static readonly Lazy _RenderHeightOffset = new(() => Schema.GetOffset(0x8A7EC451A184E51E), LazyThreadSafetyMode.None); + public ref int RenderHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A7EC451A184E51E)); + get => ref _Handle.AsRef(_RenderHeightOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntComponentInfo_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntComponentInfo_tImpl.cs index b51f00884..13472f3b5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntComponentInfo_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntComponentInfo_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,43 +17,57 @@ internal partial class EntComponentInfo_tImpl : SchemaClass, EntComponentInfo_t public EntComponentInfo_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xDEAD526A5B47C92C), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDEAD526A5B47C92C)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDEAD526A5B47C92C, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _CPPClassnameOffset = new(() => Schema.GetOffset(0xDEAD526A65BE3EC7), LazyThreadSafetyMode.None); + public string CPPClassname { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDEAD526A65BE3EC7)); + var ptr = _Handle.Read(_CPPClassnameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDEAD526A65BE3EC7, value); + set => Schema.SetString(_Handle, _CPPClassnameOffset.Value, value); } + private static readonly Lazy _NetworkDataReferencedDescriptionOffset = new(() => Schema.GetOffset(0xDEAD526AB84E3342), LazyThreadSafetyMode.None); + public string NetworkDataReferencedDescription { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDEAD526AB84E3342)); + var ptr = _Handle.Read(_NetworkDataReferencedDescriptionOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDEAD526AB84E3342, value); + set => Schema.SetString(_Handle, _NetworkDataReferencedDescriptionOffset.Value, value); } + private static readonly Lazy _NetworkDataReferencedPtrPropDescriptionOffset = new(() => Schema.GetOffset(0xDEAD526AFDC5489F), LazyThreadSafetyMode.None); + public string NetworkDataReferencedPtrPropDescription { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDEAD526AFDC5489F)); + var ptr = _Handle.Read(_NetworkDataReferencedPtrPropDescriptionOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDEAD526AFDC5489F, value); + set => Schema.SetString(_Handle, _NetworkDataReferencedPtrPropDescriptionOffset.Value, value); } + private static readonly Lazy _RuntimeIndexOffset = new(() => Schema.GetOffset(0xDEAD526AB53184BD), LazyThreadSafetyMode.None); + public ref int RuntimeIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xDEAD526AB53184BD)); + get => ref _Handle.AsRef(_RuntimeIndexOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0xDEAD526ACE6E9C28), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0xDEAD526ACE6E9C28)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _BaseClassComponentHelperOffset = new(() => Schema.GetOffset(0xDEAD526A9799DD51), LazyThreadSafetyMode.None); + public CEntityComponentHelper? BaseClassComponentHelper { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDEAD526A9799DD51)); + var ptr = _Handle.Read(_BaseClassComponentHelperOffset.Value); return ptr.IsValidPtr() ? new CEntityComponentHelperImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntInput_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntInput_tImpl.cs index 1067eff65..17f24b4ef 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntInput_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntInput_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntOutput_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntOutput_tImpl.cs index 293cd98a5..8d671dbff 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntOutput_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntOutput_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntityIOConnectionData_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntityIOConnectionData_tImpl.cs index dfa48667c..21ff19374 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntityIOConnectionData_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntityIOConnectionData_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,45 +17,61 @@ internal partial class EntityIOConnectionData_tImpl : SchemaClass, EntityIOConne public EntityIOConnectionData_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _OutputNameOffset = new(() => Schema.GetOffset(0xDEBEBB4D5BFC85BF), LazyThreadSafetyMode.None); + public string OutputName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDEBEBB4D5BFC85BF)); + var ptr = _Handle.Read(_OutputNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDEBEBB4D5BFC85BF, value); + set => Schema.SetString(_Handle, _OutputNameOffset.Value, value); } + private static readonly Lazy _TargetTypeOffset = new(() => Schema.GetOffset(0xDEBEBB4D13C167A0), LazyThreadSafetyMode.None); + public ref uint TargetType { - get => ref _Handle.AsRef(Schema.GetOffset(0xDEBEBB4D13C167A0)); + get => ref _Handle.AsRef(_TargetTypeOffset.Value); } + private static readonly Lazy _TargetNameOffset = new(() => Schema.GetOffset(0xDEBEBB4DC58FE46B), LazyThreadSafetyMode.None); + public string TargetName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDEBEBB4DC58FE46B)); + var ptr = _Handle.Read(_TargetNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDEBEBB4DC58FE46B, value); + set => Schema.SetString(_Handle, _TargetNameOffset.Value, value); } + private static readonly Lazy _InputNameOffset = new(() => Schema.GetOffset(0xDEBEBB4D61478B20), LazyThreadSafetyMode.None); + public string InputName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDEBEBB4D61478B20)); + var ptr = _Handle.Read(_InputNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDEBEBB4D61478B20, value); + set => Schema.SetString(_Handle, _InputNameOffset.Value, value); } + private static readonly Lazy _OverrideParamOffset = new(() => Schema.GetOffset(0xDEBEBB4DB454EE6A), LazyThreadSafetyMode.None); + public string OverrideParam { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDEBEBB4DB454EE6A)); + var ptr = _Handle.Read(_OverrideParamOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDEBEBB4DB454EE6A, value); + set => Schema.SetString(_Handle, _OverrideParamOffset.Value, value); } + private static readonly Lazy _DelayOffset = new(() => Schema.GetOffset(0xDEBEBB4D7D68FD6E), LazyThreadSafetyMode.None); + public ref float Delay { - get => ref _Handle.AsRef(Schema.GetOffset(0xDEBEBB4D7D68FD6E)); + get => ref _Handle.AsRef(_DelayOffset.Value); } + private static readonly Lazy _TimesToFireOffset = new(() => Schema.GetOffset(0xDEBEBB4D0393A604), LazyThreadSafetyMode.None); + public ref int TimesToFire { - get => ref _Handle.AsRef(Schema.GetOffset(0xDEBEBB4D0393A604)); + get => ref _Handle.AsRef(_TimesToFireOffset.Value); } + private static readonly Lazy _ParamMapOffset = new(() => Schema.GetOffset(0xDEBEBB4DF64DD25C), LazyThreadSafetyMode.None); + public SchemaUntypedField ParamMap { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xDEBEBB4DF64DD25C)); + get => new SchemaUntypedField(_Handle + _ParamMapOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntityKeyValueData_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntityKeyValueData_tImpl.cs index 69903229a..eadbe87a0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntityKeyValueData_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntityKeyValueData_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class EntityKeyValueData_tImpl : SchemaClass, EntityKeyValueDat public EntityKeyValueData_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ConnectionsOffset = new(() => Schema.GetOffset(0x66FE4A4558F33FBE), LazyThreadSafetyMode.None); + public ref CUtlVector Connections { - get => ref _Handle.AsRef>(Schema.GetOffset(0x66FE4A4558F33FBE)); + get => ref _Handle.AsRef>(_ConnectionsOffset.Value); } + private static readonly Lazy _KeyValuesDataOffset = new(() => Schema.GetOffset(0x66FE4A451BD58EB2), LazyThreadSafetyMode.None); + public ref CUtlBinaryBlock KeyValuesData { - get => ref _Handle.AsRef(Schema.GetOffset(0x66FE4A451BD58EB2)); + get => ref _Handle.AsRef(_KeyValuesDataOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntityRenderAttribute_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntityRenderAttribute_tImpl.cs index c04abb361..e99295421 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntityRenderAttribute_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntityRenderAttribute_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class EntityRenderAttribute_tImpl : SchemaClass, EntityRenderAt public EntityRenderAttribute_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _IDOffset = new(() => Schema.GetOffset(0xBC8CD39195066900), LazyThreadSafetyMode.None); + public ref CUtlStringToken ID { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC8CD39195066900)); + get => ref _Handle.AsRef(_IDOffset.Value); } + private static readonly Lazy _ValuesOffset = new(() => Schema.GetOffset(0xBC8CD391A2E804BB), LazyThreadSafetyMode.None); + public ref Vector4D Values { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC8CD391A2E804BB)); + get => ref _Handle.AsRef(_ValuesOffset.Value); } public void IDUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntitySpottedState_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntitySpottedState_tImpl.cs index 65f961177..c1b6af9c4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntitySpottedState_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EntitySpottedState_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class EntitySpottedState_tImpl : SchemaClass, EntitySpottedStat public EntitySpottedState_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SpottedOffset = new(() => Schema.GetOffset(0x6E33B0176DE4F1CA), LazyThreadSafetyMode.None); + public ref bool Spotted { - get => ref _Handle.AsRef(Schema.GetOffset(0x6E33B0176DE4F1CA)); + get => ref _Handle.AsRef(_SpottedOffset.Value); } public ISchemaFixedArray SpottedByMask { get => new SchemaFixedArray(_Handle, 0x6E33B0170BD77207, 2, 4, 4); diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventAdvanceTick_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventAdvanceTick_tImpl.cs index 8415a28d8..40115c603 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventAdvanceTick_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventAdvanceTick_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class EventAdvanceTick_tImpl : EventSimulate_tImpl, EventAdvanc public EventAdvanceTick_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CurrentTickOffset = new(() => Schema.GetOffset(0xB79597D53C23687B), LazyThreadSafetyMode.None); + public ref int CurrentTick { - get => ref _Handle.AsRef(Schema.GetOffset(0xB79597D53C23687B)); + get => ref _Handle.AsRef(_CurrentTickOffset.Value); } + private static readonly Lazy _CurrentTickThisFrameOffset = new(() => Schema.GetOffset(0xB79597D509CE99F8), LazyThreadSafetyMode.None); + public ref int CurrentTickThisFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0xB79597D509CE99F8)); + get => ref _Handle.AsRef(_CurrentTickThisFrameOffset.Value); } + private static readonly Lazy _TotalTicksThisFrameOffset = new(() => Schema.GetOffset(0xB79597D524EA7826), LazyThreadSafetyMode.None); + public ref int TotalTicksThisFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0xB79597D524EA7826)); + get => ref _Handle.AsRef(_TotalTicksThisFrameOffset.Value); } + private static readonly Lazy _TotalTicksOffset = new(() => Schema.GetOffset(0xB79597D545397B31), LazyThreadSafetyMode.None); + public ref int TotalTicks { - get => ref _Handle.AsRef(Schema.GetOffset(0xB79597D545397B31)); + get => ref _Handle.AsRef(_TotalTicksOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventAppShutdown_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventAppShutdown_tImpl.cs index b4e38a5d6..d18825ae9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventAppShutdown_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventAppShutdown_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class EventAppShutdown_tImpl : SchemaClass, EventAppShutdown_t public EventAppShutdown_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _Dummy0Offset = new(() => Schema.GetOffset(0x815B1527A26B2B9D), LazyThreadSafetyMode.None); + public ref int Dummy0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x815B1527A26B2B9D)); + get => ref _Handle.AsRef(_Dummy0Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientAdvanceNonRenderedFrame_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientAdvanceNonRenderedFrame_tImpl.cs index 251d1169e..32f1256b2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientAdvanceNonRenderedFrame_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientAdvanceNonRenderedFrame_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientAdvanceTick_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientAdvanceTick_tImpl.cs index 55dc22c25..53e13a97a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientAdvanceTick_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientAdvanceTick_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientFrameSimulate_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientFrameSimulate_tImpl.cs index d51f3bce3..e08819ac2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientFrameSimulate_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientFrameSimulate_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class EventClientFrameSimulate_tImpl : SchemaClass, EventClient public EventClientFrameSimulate_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _LoopStateOffset = new(() => Schema.GetOffset(0x18229C4F928A2EC), LazyThreadSafetyMode.None); + public EngineLoopState_t LoopState { - get => new EngineLoopState_tImpl(_Handle + Schema.GetOffset(0x18229C4F928A2EC)); + get => new EngineLoopState_tImpl(_Handle + _LoopStateOffset.Value); } + private static readonly Lazy _RealTimeOffset = new(() => Schema.GetOffset(0x18229C41168EC02), LazyThreadSafetyMode.None); + public ref float RealTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x18229C41168EC02)); + get => ref _Handle.AsRef(_RealTimeOffset.Value); } + private static readonly Lazy _FrameTimeOffset = new(() => Schema.GetOffset(0x18229C4659DF875), LazyThreadSafetyMode.None); + public ref float FrameTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x18229C4659DF875)); + get => ref _Handle.AsRef(_FrameTimeOffset.Value); } + private static readonly Lazy _ScheduleSendTickPacketOffset = new(() => Schema.GetOffset(0x18229C400A650C3), LazyThreadSafetyMode.None); + public ref bool ScheduleSendTickPacket { - get => ref _Handle.AsRef(Schema.GetOffset(0x18229C400A650C3)); + get => ref _Handle.AsRef(_ScheduleSendTickPacketOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientOutput_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientOutput_tImpl.cs index 03199d223..fb4c57c72 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientOutput_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientOutput_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class EventClientOutput_tImpl : SchemaClass, EventClientOutput_ public EventClientOutput_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _LoopStateOffset = new(() => Schema.GetOffset(0xDC610E16F928A2EC), LazyThreadSafetyMode.None); + public EngineLoopState_t LoopState { - get => new EngineLoopState_tImpl(_Handle + Schema.GetOffset(0xDC610E16F928A2EC)); + get => new EngineLoopState_tImpl(_Handle + _LoopStateOffset.Value); } + private static readonly Lazy _RenderTimeOffset = new(() => Schema.GetOffset(0xDC610E163C2AE65A), LazyThreadSafetyMode.None); + public ref float RenderTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC610E163C2AE65A)); + get => ref _Handle.AsRef(_RenderTimeOffset.Value); } + private static readonly Lazy _RealTimeOffset = new(() => Schema.GetOffset(0xDC610E161168EC02), LazyThreadSafetyMode.None); + public ref float RealTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC610E161168EC02)); + get => ref _Handle.AsRef(_RealTimeOffset.Value); } + private static readonly Lazy _RenderFrameTimeUnboundedOffset = new(() => Schema.GetOffset(0xDC610E16735692FF), LazyThreadSafetyMode.None); + public ref float RenderFrameTimeUnbounded { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC610E16735692FF)); + get => ref _Handle.AsRef(_RenderFrameTimeUnboundedOffset.Value); } + private static readonly Lazy _RenderOnlyOffset = new(() => Schema.GetOffset(0xDC610E16E274559F), LazyThreadSafetyMode.None); + public ref bool RenderOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0xDC610E16E274559F)); + get => ref _Handle.AsRef(_RenderOnlyOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPauseSimulate_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPauseSimulate_tImpl.cs index 221076779..973b07b06 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPauseSimulate_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPauseSimulate_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPollInput_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPollInput_tImpl.cs index 8b4838d0f..2f815687c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPollInput_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPollInput_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class EventClientPollInput_tImpl : SchemaClass, EventClientPoll public EventClientPollInput_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _LoopStateOffset = new(() => Schema.GetOffset(0x1E8649A0F928A2EC), LazyThreadSafetyMode.None); + public EngineLoopState_t LoopState { - get => new EngineLoopState_tImpl(_Handle + Schema.GetOffset(0x1E8649A0F928A2EC)); + get => new EngineLoopState_tImpl(_Handle + _LoopStateOffset.Value); } + private static readonly Lazy _RealTimeOffset = new(() => Schema.GetOffset(0x1E8649A01168EC02), LazyThreadSafetyMode.None); + public ref float RealTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x1E8649A01168EC02)); + get => ref _Handle.AsRef(_RealTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPollNetworking_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPollNetworking_tImpl.cs index 5f81e9cb3..0372f563d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPollNetworking_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPollNetworking_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class EventClientPollNetworking_tImpl : SchemaClass, EventClien public EventClientPollNetworking_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TickCountOffset = new(() => Schema.GetOffset(0xE9C02F00E25E6B27), LazyThreadSafetyMode.None); + public ref int TickCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xE9C02F00E25E6B27)); + get => ref _Handle.AsRef(_TickCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPostAdvanceTick_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPostAdvanceTick_tImpl.cs index 0661b5c79..e8099ee93 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPostAdvanceTick_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPostAdvanceTick_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPostOutput_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPostOutput_tImpl.cs index 530c4577a..58524aa02 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPostOutput_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPostOutput_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class EventClientPostOutput_tImpl : SchemaClass, EventClientPos public EventClientPostOutput_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _LoopStateOffset = new(() => Schema.GetOffset(0x98578A18F928A2EC), LazyThreadSafetyMode.None); + public EngineLoopState_t LoopState { - get => new EngineLoopState_tImpl(_Handle + Schema.GetOffset(0x98578A18F928A2EC)); + get => new EngineLoopState_tImpl(_Handle + _LoopStateOffset.Value); } + private static readonly Lazy _RenderTimeOffset = new(() => Schema.GetOffset(0x98578A183C2AE65A), LazyThreadSafetyMode.None); + public ref double RenderTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x98578A183C2AE65A)); + get => ref _Handle.AsRef(_RenderTimeOffset.Value); } + private static readonly Lazy _RenderFrameTimeOffset = new(() => Schema.GetOffset(0x98578A18F2FB2D81), LazyThreadSafetyMode.None); + public ref float RenderFrameTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x98578A18F2FB2D81)); + get => ref _Handle.AsRef(_RenderFrameTimeOffset.Value); } + private static readonly Lazy _RenderFrameTimeUnboundedOffset = new(() => Schema.GetOffset(0x98578A18735692FF), LazyThreadSafetyMode.None); + public ref float RenderFrameTimeUnbounded { - get => ref _Handle.AsRef(Schema.GetOffset(0x98578A18735692FF)); + get => ref _Handle.AsRef(_RenderFrameTimeUnboundedOffset.Value); } + private static readonly Lazy _RenderOnlyOffset = new(() => Schema.GetOffset(0x98578A18E274559F), LazyThreadSafetyMode.None); + public ref bool RenderOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0x98578A18E274559F)); + get => ref _Handle.AsRef(_RenderOnlyOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPostSimulate_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPostSimulate_tImpl.cs index fbe9741ea..da5a80743 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPostSimulate_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPostSimulate_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPreOutput_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPreOutput_tImpl.cs index df4da3e13..6b14330d0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPreOutput_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPreOutput_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class EventClientPreOutput_tImpl : SchemaClass, EventClientPreO public EventClientPreOutput_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _LoopStateOffset = new(() => Schema.GetOffset(0xB79CB11BF928A2EC), LazyThreadSafetyMode.None); + public EngineLoopState_t LoopState { - get => new EngineLoopState_tImpl(_Handle + Schema.GetOffset(0xB79CB11BF928A2EC)); + get => new EngineLoopState_tImpl(_Handle + _LoopStateOffset.Value); } + private static readonly Lazy _RenderTimeOffset = new(() => Schema.GetOffset(0xB79CB11B3C2AE65A), LazyThreadSafetyMode.None); + public ref double RenderTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xB79CB11B3C2AE65A)); + get => ref _Handle.AsRef(_RenderTimeOffset.Value); } + private static readonly Lazy _RenderFrameTimeOffset = new(() => Schema.GetOffset(0xB79CB11BF2FB2D81), LazyThreadSafetyMode.None); + public ref double RenderFrameTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xB79CB11BF2FB2D81)); + get => ref _Handle.AsRef(_RenderFrameTimeOffset.Value); } + private static readonly Lazy _RenderFrameTimeUnboundedOffset = new(() => Schema.GetOffset(0xB79CB11B735692FF), LazyThreadSafetyMode.None); + public ref double RenderFrameTimeUnbounded { - get => ref _Handle.AsRef(Schema.GetOffset(0xB79CB11B735692FF)); + get => ref _Handle.AsRef(_RenderFrameTimeUnboundedOffset.Value); } + private static readonly Lazy _RealTimeOffset = new(() => Schema.GetOffset(0xB79CB11B1168EC02), LazyThreadSafetyMode.None); + public ref float RealTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xB79CB11B1168EC02)); + get => ref _Handle.AsRef(_RealTimeOffset.Value); } + private static readonly Lazy _RenderOnlyOffset = new(() => Schema.GetOffset(0xB79CB11BE274559F), LazyThreadSafetyMode.None); + public ref bool RenderOnly { - get => ref _Handle.AsRef(Schema.GetOffset(0xB79CB11BE274559F)); + get => ref _Handle.AsRef(_RenderOnlyOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPreSimulate_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPreSimulate_tImpl.cs index df245adf0..464680181 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPreSimulate_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientPreSimulate_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientProcessGameInput_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientProcessGameInput_tImpl.cs index eb0d59cfd..74487c809 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientProcessGameInput_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientProcessGameInput_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class EventClientProcessGameInput_tImpl : SchemaClass, EventCli public EventClientProcessGameInput_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _LoopStateOffset = new(() => Schema.GetOffset(0x705D7E06F928A2EC), LazyThreadSafetyMode.None); + public EngineLoopState_t LoopState { - get => new EngineLoopState_tImpl(_Handle + Schema.GetOffset(0x705D7E06F928A2EC)); + get => new EngineLoopState_tImpl(_Handle + _LoopStateOffset.Value); } + private static readonly Lazy _RealTimeOffset = new(() => Schema.GetOffset(0x705D7E061168EC02), LazyThreadSafetyMode.None); + public ref float RealTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x705D7E061168EC02)); + get => ref _Handle.AsRef(_RealTimeOffset.Value); } + private static readonly Lazy _FrameTimeOffset = new(() => Schema.GetOffset(0x705D7E06659DF875), LazyThreadSafetyMode.None); + public ref float FrameTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x705D7E06659DF875)); + get => ref _Handle.AsRef(_FrameTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientProcessInput_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientProcessInput_tImpl.cs index d9ccc57c6..a03fac3be 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientProcessInput_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientProcessInput_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class EventClientProcessInput_tImpl : SchemaClass, EventClientP public EventClientProcessInput_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _LoopStateOffset = new(() => Schema.GetOffset(0x406EC290F928A2EC), LazyThreadSafetyMode.None); + public EngineLoopState_t LoopState { - get => new EngineLoopState_tImpl(_Handle + Schema.GetOffset(0x406EC290F928A2EC)); + get => new EngineLoopState_tImpl(_Handle + _LoopStateOffset.Value); } + private static readonly Lazy _RealTimeOffset = new(() => Schema.GetOffset(0x406EC2901168EC02), LazyThreadSafetyMode.None); + public ref float RealTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x406EC2901168EC02)); + get => ref _Handle.AsRef(_RealTimeOffset.Value); } + private static readonly Lazy _TickIntervalOffset = new(() => Schema.GetOffset(0x406EC290D279D07B), LazyThreadSafetyMode.None); + public ref float TickInterval { - get => ref _Handle.AsRef(Schema.GetOffset(0x406EC290D279D07B)); + get => ref _Handle.AsRef(_TickIntervalOffset.Value); } + private static readonly Lazy _TickStartTimeOffset = new(() => Schema.GetOffset(0x406EC29068A38BE7), LazyThreadSafetyMode.None); + public ref double TickStartTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x406EC29068A38BE7)); + get => ref _Handle.AsRef(_TickStartTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientProcessNetworking_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientProcessNetworking_tImpl.cs index 61b9d3361..a7786a42a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientProcessNetworking_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientProcessNetworking_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class EventClientProcessNetworking_tImpl : SchemaClass, EventCl public EventClientProcessNetworking_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TickCountOffset = new(() => Schema.GetOffset(0x89FEDE50E25E6B27), LazyThreadSafetyMode.None); + public ref int TickCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x89FEDE50E25E6B27)); + get => ref _Handle.AsRef(_TickCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientSceneSystemThreadStateChange_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientSceneSystemThreadStateChange_tImpl.cs index 057ee3690..ac09fae08 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientSceneSystemThreadStateChange_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientSceneSystemThreadStateChange_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class EventClientSceneSystemThreadStateChange_tImpl : SchemaCla public EventClientSceneSystemThreadStateChange_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ThreadsActiveOffset = new(() => Schema.GetOffset(0x28053E1174AC2EF0), LazyThreadSafetyMode.None); + public ref bool ThreadsActive { - get => ref _Handle.AsRef(Schema.GetOffset(0x28053E1174AC2EF0)); + get => ref _Handle.AsRef(_ThreadsActiveOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientSimulate_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientSimulate_tImpl.cs index 875f73027..62599cff7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientSimulate_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventClientSimulate_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventFrameBoundary_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventFrameBoundary_tImpl.cs index 3a5d0fb16..397855164 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventFrameBoundary_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventFrameBoundary_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class EventFrameBoundary_tImpl : SchemaClass, EventFrameBoundar public EventFrameBoundary_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FrameTimeOffset = new(() => Schema.GetOffset(0xDFF6C21659DF875), LazyThreadSafetyMode.None); + public ref float FrameTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xDFF6C21659DF875)); + get => ref _Handle.AsRef(_FrameTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventModInitialized_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventModInitialized_tImpl.cs index fba9a5b4d..bf4ffb496 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventModInitialized_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventModInitialized_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventPostAdvanceTick_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventPostAdvanceTick_tImpl.cs index 24f2fb07e..f25ad494c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventPostAdvanceTick_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventPostAdvanceTick_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class EventPostAdvanceTick_tImpl : EventSimulate_tImpl, EventPo public EventPostAdvanceTick_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CurrentTickOffset = new(() => Schema.GetOffset(0xE5D2DBB33C23687B), LazyThreadSafetyMode.None); + public ref int CurrentTick { - get => ref _Handle.AsRef(Schema.GetOffset(0xE5D2DBB33C23687B)); + get => ref _Handle.AsRef(_CurrentTickOffset.Value); } + private static readonly Lazy _CurrentTickThisFrameOffset = new(() => Schema.GetOffset(0xE5D2DBB309CE99F8), LazyThreadSafetyMode.None); + public ref int CurrentTickThisFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0xE5D2DBB309CE99F8)); + get => ref _Handle.AsRef(_CurrentTickThisFrameOffset.Value); } + private static readonly Lazy _TotalTicksThisFrameOffset = new(() => Schema.GetOffset(0xE5D2DBB324EA7826), LazyThreadSafetyMode.None); + public ref int TotalTicksThisFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0xE5D2DBB324EA7826)); + get => ref _Handle.AsRef(_TotalTicksThisFrameOffset.Value); } + private static readonly Lazy _TotalTicksOffset = new(() => Schema.GetOffset(0xE5D2DBB345397B31), LazyThreadSafetyMode.None); + public ref int TotalTicks { - get => ref _Handle.AsRef(Schema.GetOffset(0xE5D2DBB345397B31)); + get => ref _Handle.AsRef(_TotalTicksOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventPostDataUpdate_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventPostDataUpdate_tImpl.cs index b7046df4f..be19402b4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventPostDataUpdate_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventPostDataUpdate_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class EventPostDataUpdate_tImpl : SchemaClass, EventPostDataUpd public EventPostDataUpdate_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CountOffset = new(() => Schema.GetOffset(0x109BBB5B7D31AC08), LazyThreadSafetyMode.None); + public ref int Count { - get => ref _Handle.AsRef(Schema.GetOffset(0x109BBB5B7D31AC08)); + get => ref _Handle.AsRef(_CountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventPreDataUpdate_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventPreDataUpdate_tImpl.cs index dd3638065..d25893c06 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventPreDataUpdate_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventPreDataUpdate_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class EventPreDataUpdate_tImpl : SchemaClass, EventPreDataUpdat public EventPreDataUpdate_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CountOffset = new(() => Schema.GetOffset(0xEDF6C5BA7D31AC08), LazyThreadSafetyMode.None); + public ref int Count { - get => ref _Handle.AsRef(Schema.GetOffset(0xEDF6C5BA7D31AC08)); + get => ref _Handle.AsRef(_CountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventProfileStorageAvailable_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventProfileStorageAvailable_tImpl.cs index 0b964c4ae..5c34ed782 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventProfileStorageAvailable_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventProfileStorageAvailable_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class EventProfileStorageAvailable_tImpl : SchemaClass, EventPr public EventProfileStorageAvailable_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SplitScreenSlotOffset = new(() => Schema.GetOffset(0x871602F7DB96ED47), LazyThreadSafetyMode.None); + public ref uint SplitScreenSlot { - get => ref _Handle.AsRef(Schema.GetOffset(0x871602F7DB96ED47)); + get => ref _Handle.AsRef(_SplitScreenSlotOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerAdvanceTick_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerAdvanceTick_tImpl.cs index 2a67e46b5..27a45dc6e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerAdvanceTick_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerAdvanceTick_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerBeginAsyncPostTickWork_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerBeginAsyncPostTickWork_tImpl.cs index 2b4674308..9e6fdf882 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerBeginAsyncPostTickWork_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerBeginAsyncPostTickWork_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerEndAsyncPostTickWork_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerEndAsyncPostTickWork_tImpl.cs index 95719a587..6c47fa163 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerEndAsyncPostTickWork_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerEndAsyncPostTickWork_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerPollNetworking_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerPollNetworking_tImpl.cs index 6c15b38b1..386f82399 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerPollNetworking_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerPollNetworking_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerPostAdvanceTick_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerPostAdvanceTick_tImpl.cs index 142632f38..d1649e11f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerPostAdvanceTick_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerPostAdvanceTick_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerPostSimulate_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerPostSimulate_tImpl.cs index 9049f26bb..71cdaab64 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerPostSimulate_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerPostSimulate_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerProcessNetworking_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerProcessNetworking_tImpl.cs index acf7908cb..0e8738ce4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerProcessNetworking_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerProcessNetworking_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerSimulate_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerSimulate_tImpl.cs index bccdd35d6..64f3599c9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerSimulate_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventServerSimulate_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventSetTime_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventSetTime_tImpl.cs index d26c378cf..d96ede2b5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventSetTime_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventSetTime_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class EventSetTime_tImpl : SchemaClass, EventSetTime_t { public EventSetTime_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _LoopStateOffset = new(() => Schema.GetOffset(0x260F6EEFF928A2EC), LazyThreadSafetyMode.None); + public EngineLoopState_t LoopState { - get => new EngineLoopState_tImpl(_Handle + Schema.GetOffset(0x260F6EEFF928A2EC)); + get => new EngineLoopState_tImpl(_Handle + _LoopStateOffset.Value); } + private static readonly Lazy _ClientOutputFramesOffset = new(() => Schema.GetOffset(0x260F6EEF19578919), LazyThreadSafetyMode.None); + public ref int ClientOutputFrames { - get => ref _Handle.AsRef(Schema.GetOffset(0x260F6EEF19578919)); + get => ref _Handle.AsRef(_ClientOutputFramesOffset.Value); } + private static readonly Lazy _RealTimeOffset = new(() => Schema.GetOffset(0x260F6EEF1168EC02), LazyThreadSafetyMode.None); + public ref double RealTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x260F6EEF1168EC02)); + get => ref _Handle.AsRef(_RealTimeOffset.Value); } + private static readonly Lazy _RenderTimeOffset = new(() => Schema.GetOffset(0x260F6EEF3C2AE65A), LazyThreadSafetyMode.None); + public ref double RenderTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x260F6EEF3C2AE65A)); + get => ref _Handle.AsRef(_RenderTimeOffset.Value); } + private static readonly Lazy _RenderFrameTimeOffset = new(() => Schema.GetOffset(0x260F6EEFF2FB2D81), LazyThreadSafetyMode.None); + public ref double RenderFrameTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x260F6EEFF2FB2D81)); + get => ref _Handle.AsRef(_RenderFrameTimeOffset.Value); } + private static readonly Lazy _RenderFrameTimeUnboundedOffset = new(() => Schema.GetOffset(0x260F6EEF735692FF), LazyThreadSafetyMode.None); + public ref double RenderFrameTimeUnbounded { - get => ref _Handle.AsRef(Schema.GetOffset(0x260F6EEF735692FF)); + get => ref _Handle.AsRef(_RenderFrameTimeUnboundedOffset.Value); } + private static readonly Lazy _RenderFrameTimeUnscaledOffset = new(() => Schema.GetOffset(0x260F6EEFCCC75750), LazyThreadSafetyMode.None); + public ref double RenderFrameTimeUnscaled { - get => ref _Handle.AsRef(Schema.GetOffset(0x260F6EEFCCC75750)); + get => ref _Handle.AsRef(_RenderFrameTimeUnscaledOffset.Value); } + private static readonly Lazy _TickRemainderOffset = new(() => Schema.GetOffset(0x260F6EEF330ED365), LazyThreadSafetyMode.None); + public ref double TickRemainder { - get => ref _Handle.AsRef(Schema.GetOffset(0x260F6EEF330ED365)); + get => ref _Handle.AsRef(_TickRemainderOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventSimpleLoopFrameUpdate_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventSimpleLoopFrameUpdate_tImpl.cs index f8d2a0d86..53749d2a0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventSimpleLoopFrameUpdate_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventSimpleLoopFrameUpdate_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class EventSimpleLoopFrameUpdate_tImpl : SchemaClass, EventSimp public EventSimpleLoopFrameUpdate_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _LoopStateOffset = new(() => Schema.GetOffset(0x2C7358DAF928A2EC), LazyThreadSafetyMode.None); + public EngineLoopState_t LoopState { - get => new EngineLoopState_tImpl(_Handle + Schema.GetOffset(0x2C7358DAF928A2EC)); + get => new EngineLoopState_tImpl(_Handle + _LoopStateOffset.Value); } + private static readonly Lazy _RealTimeOffset = new(() => Schema.GetOffset(0x2C7358DA1168EC02), LazyThreadSafetyMode.None); + public ref float RealTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x2C7358DA1168EC02)); + get => ref _Handle.AsRef(_RealTimeOffset.Value); } + private static readonly Lazy _FrameTimeOffset = new(() => Schema.GetOffset(0x2C7358DA659DF875), LazyThreadSafetyMode.None); + public ref float FrameTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x2C7358DA659DF875)); + get => ref _Handle.AsRef(_FrameTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventSimulate_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventSimulate_tImpl.cs index 464ad4464..f25c06ec6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventSimulate_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventSimulate_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class EventSimulate_tImpl : SchemaClass, EventSimulate_t { public EventSimulate_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _LoopStateOffset = new(() => Schema.GetOffset(0x39B7BD6EF928A2EC), LazyThreadSafetyMode.None); + public EngineLoopState_t LoopState { - get => new EngineLoopState_tImpl(_Handle + Schema.GetOffset(0x39B7BD6EF928A2EC)); + get => new EngineLoopState_tImpl(_Handle + _LoopStateOffset.Value); } + private static readonly Lazy _FirstTickOffset = new(() => Schema.GetOffset(0x39B7BD6EC8198F38), LazyThreadSafetyMode.None); + public ref bool FirstTick { - get => ref _Handle.AsRef(Schema.GetOffset(0x39B7BD6EC8198F38)); + get => ref _Handle.AsRef(_FirstTickOffset.Value); } + private static readonly Lazy _LastTickOffset = new(() => Schema.GetOffset(0x39B7BD6E1704CC30), LazyThreadSafetyMode.None); + public ref bool LastTick { - get => ref _Handle.AsRef(Schema.GetOffset(0x39B7BD6E1704CC30)); + get => ref _Handle.AsRef(_LastTickOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventSplitScreenStateChanged_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventSplitScreenStateChanged_tImpl.cs index 8ddb399a2..90ad21a1a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventSplitScreenStateChanged_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/EventSplitScreenStateChanged_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ExtentImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ExtentImpl.cs index d706abc48..67033c5df 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ExtentImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ExtentImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class ExtentImpl : SchemaClass, Extent { public ExtentImpl(nint handle) : base(handle) { } + private static readonly Lazy _LoOffset = new(() => Schema.GetOffset(0x6E8BE8394231C06C), LazyThreadSafetyMode.None); + public ref Vector Lo { - get => ref _Handle.AsRef(Schema.GetOffset(0x6E8BE8394231C06C)); + get => ref _Handle.AsRef(_LoOffset.Value); } + private static readonly Lazy _HiOffset = new(() => Schema.GetOffset(0x6E8BE839683AF69A), LazyThreadSafetyMode.None); + public ref Vector Hi { - get => ref _Handle.AsRef(Schema.GetOffset(0x6E8BE839683AF69A)); + get => ref _Handle.AsRef(_HiOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ExtraVertexStreamOverride_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ExtraVertexStreamOverride_tImpl.cs index 660b15e20..ace20b621 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ExtraVertexStreamOverride_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ExtraVertexStreamOverride_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class ExtraVertexStreamOverride_tImpl : BaseSceneObjectOverride public ExtraVertexStreamOverride_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SubSceneObjectOffset = new(() => Schema.GetOffset(0x38857FE855C3CCBC), LazyThreadSafetyMode.None); + public ref uint SubSceneObject { - get => ref _Handle.AsRef(Schema.GetOffset(0x38857FE855C3CCBC)); + get => ref _Handle.AsRef(_SubSceneObjectOffset.Value); } + private static readonly Lazy _DrawCallIndexOffset = new(() => Schema.GetOffset(0x38857FE8FA5614D5), LazyThreadSafetyMode.None); + public ref uint DrawCallIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x38857FE8FA5614D5)); + get => ref _Handle.AsRef(_DrawCallIndexOffset.Value); } + private static readonly Lazy _AdditionalMeshDrawPrimitiveFlagsOffset = new(() => Schema.GetOffset(0x38857FE8F0E57F2B), LazyThreadSafetyMode.None); + public ref MeshDrawPrimitiveFlags_t AdditionalMeshDrawPrimitiveFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0x38857FE8F0E57F2B)); + get => ref _Handle.AsRef(_AdditionalMeshDrawPrimitiveFlagsOffset.Value); } + private static readonly Lazy _ExtraBufferBindingOffset = new(() => Schema.GetOffset(0x38857FE800630FD0), LazyThreadSafetyMode.None); + public CRenderBufferBinding ExtraBufferBinding { - get => new CRenderBufferBindingImpl(_Handle + Schema.GetOffset(0x38857FE800630FD0)); + get => new CRenderBufferBindingImpl(_Handle + _ExtraBufferBindingOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FakeEntityDerivedA_tAPIImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FakeEntityDerivedA_tAPIImpl.cs index fec810b2d..2e2fed81f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FakeEntityDerivedA_tAPIImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FakeEntityDerivedA_tAPIImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FakeEntityDerivedB_tAPIImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FakeEntityDerivedB_tAPIImpl.cs index 0aaf64770..45e0d7959 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FakeEntityDerivedB_tAPIImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FakeEntityDerivedB_tAPIImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FakeEntity_tAPIImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FakeEntity_tAPIImpl.cs index 3e8f3740c..8582f5f21 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FakeEntity_tAPIImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FakeEntity_tAPIImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAnimStrayRadius_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAnimStrayRadius_tImpl.cs index 38506c230..d549a5fa4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAnimStrayRadius_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAnimStrayRadius_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,11 +20,15 @@ public FeAnimStrayRadius_tImpl(nint handle) : base(handle) { public ISchemaFixedArray Node { get => new SchemaFixedArray(_Handle, 0xF06BE9BCD6694B9, 2, 2, 2); } + private static readonly Lazy _MaxDistOffset = new(() => Schema.GetOffset(0xF06BE9BC9FFDD57), LazyThreadSafetyMode.None); + public ref float MaxDist { - get => ref _Handle.AsRef(Schema.GetOffset(0xF06BE9BC9FFDD57)); + get => ref _Handle.AsRef(_MaxDistOffset.Value); } + private static readonly Lazy _RelaxationFactorOffset = new(() => Schema.GetOffset(0xF06BE9B357F3BFF), LazyThreadSafetyMode.None); + public ref float RelaxationFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0xF06BE9B357F3BFF)); + get => ref _Handle.AsRef(_RelaxationFactorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAntiTunnelGroupBuild_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAntiTunnelGroupBuild_tImpl.cs index ba078eefe..f79e2e34f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAntiTunnelGroupBuild_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAntiTunnelGroupBuild_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class FeAntiTunnelGroupBuild_tImpl : SchemaClass, FeAntiTunnelG public FeAntiTunnelGroupBuild_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _VertexMapHashOffset = new(() => Schema.GetOffset(0x8189225C06BCA0A3), LazyThreadSafetyMode.None); + public ref uint VertexMapHash { - get => ref _Handle.AsRef(Schema.GetOffset(0x8189225C06BCA0A3)); + get => ref _Handle.AsRef(_VertexMapHashOffset.Value); } + private static readonly Lazy _CollisionMaskOffset = new(() => Schema.GetOffset(0x8189225C0CCF1BEF), LazyThreadSafetyMode.None); + public ref uint CollisionMask { - get => ref _Handle.AsRef(Schema.GetOffset(0x8189225C0CCF1BEF)); + get => ref _Handle.AsRef(_CollisionMaskOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAntiTunnelProbeBuild_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAntiTunnelProbeBuild_tImpl.cs index ea8d9e7b7..f4337f7ee 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAntiTunnelProbeBuild_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAntiTunnelProbeBuild_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class FeAntiTunnelProbeBuild_tImpl : SchemaClass, FeAntiTunnelP public FeAntiTunnelProbeBuild_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0x71B6F8ABCFFC66CB), LazyThreadSafetyMode.None); + public ref float Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0x71B6F8ABCFFC66CB)); + get => ref _Handle.AsRef(_WeightOffset.Value); } + private static readonly Lazy _ActivationDistanceOffset = new(() => Schema.GetOffset(0x71B6F8ABEAB1A998), LazyThreadSafetyMode.None); + public ref float ActivationDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x71B6F8ABEAB1A998)); + get => ref _Handle.AsRef(_ActivationDistanceOffset.Value); } + private static readonly Lazy _BiasOffset = new(() => Schema.GetOffset(0x71B6F8AB30667CD6), LazyThreadSafetyMode.None); + public ref float Bias { - get => ref _Handle.AsRef(Schema.GetOffset(0x71B6F8AB30667CD6)); + get => ref _Handle.AsRef(_BiasOffset.Value); } + private static readonly Lazy _CurvatureOffset = new(() => Schema.GetOffset(0x71B6F8ABF5F69668), LazyThreadSafetyMode.None); + public ref float Curvature { - get => ref _Handle.AsRef(Schema.GetOffset(0x71B6F8ABF5F69668)); + get => ref _Handle.AsRef(_CurvatureOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x71B6F8ABB8D52E48), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x71B6F8ABB8D52E48)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _ProbeNodeOffset = new(() => Schema.GetOffset(0x71B6F8AB5F3CB12D), LazyThreadSafetyMode.None); + public ref ushort ProbeNode { - get => ref _Handle.AsRef(Schema.GetOffset(0x71B6F8AB5F3CB12D)); + get => ref _Handle.AsRef(_ProbeNodeOffset.Value); } + private static readonly Lazy _TargetNodesOffset = new(() => Schema.GetOffset(0x71B6F8AB4BCFFCA5), LazyThreadSafetyMode.None); + public ref CUtlVector TargetNodes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x71B6F8AB4BCFFCA5)); + get => ref _Handle.AsRef>(_TargetNodesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAntiTunnelProbe_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAntiTunnelProbe_tImpl.cs index 6a783372f..40850016b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAntiTunnelProbe_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAntiTunnelProbe_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class FeAntiTunnelProbe_tImpl : SchemaClass, FeAntiTunnelProbe_ public FeAntiTunnelProbe_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0xBC54CE0BCFFC66CB), LazyThreadSafetyMode.None); + public ref float Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC54CE0BCFFC66CB)); + get => ref _Handle.AsRef(_WeightOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0xBC54CE0BB8D52E48), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC54CE0BB8D52E48)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _ProbeNodeOffset = new(() => Schema.GetOffset(0xBC54CE0B5F3CB12D), LazyThreadSafetyMode.None); + public ref ushort ProbeNode { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC54CE0B5F3CB12D)); + get => ref _Handle.AsRef(_ProbeNodeOffset.Value); } + private static readonly Lazy _CountOffset = new(() => Schema.GetOffset(0xBC54CE0B67983E28), LazyThreadSafetyMode.None); + public ref ushort Count { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC54CE0B67983E28)); + get => ref _Handle.AsRef(_CountOffset.Value); } + private static readonly Lazy _BeginOffset = new(() => Schema.GetOffset(0xBC54CE0BC630D75A), LazyThreadSafetyMode.None); + public ref uint Begin { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC54CE0BC630D75A)); + get => ref _Handle.AsRef(_BeginOffset.Value); } + private static readonly Lazy _ActivationDistanceOffset = new(() => Schema.GetOffset(0xBC54CE0BEAB1A998), LazyThreadSafetyMode.None); + public ref float ActivationDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC54CE0BEAB1A998)); + get => ref _Handle.AsRef(_ActivationDistanceOffset.Value); } + private static readonly Lazy _CurvatureRadiusOffset = new(() => Schema.GetOffset(0xBC54CE0BADAE92BE), LazyThreadSafetyMode.None); + public ref float CurvatureRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC54CE0BADAE92BE)); + get => ref _Handle.AsRef(_CurvatureRadiusOffset.Value); } + private static readonly Lazy _BiasOffset = new(() => Schema.GetOffset(0xBC54CE0B30667CD6), LazyThreadSafetyMode.None); + public ref float Bias { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC54CE0B30667CD6)); + get => ref _Handle.AsRef(_BiasOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAxialEdgeBend_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAxialEdgeBend_tImpl.cs index f17dee9d2..398fe5573 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAxialEdgeBend_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeAxialEdgeBend_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class FeAxialEdgeBend_tImpl : SchemaClass, FeAxialEdgeBend_t { public FeAxialEdgeBend_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TeOffset = new(() => Schema.GetOffset(0x6CF84D703C453EB2), LazyThreadSafetyMode.None); + public ref float Te { - get => ref _Handle.AsRef(Schema.GetOffset(0x6CF84D703C453EB2)); + get => ref _Handle.AsRef(_TeOffset.Value); } + private static readonly Lazy _TvOffset = new(() => Schema.GetOffset(0x6CF84D704B45564F), LazyThreadSafetyMode.None); + public ref float Tv { - get => ref _Handle.AsRef(Schema.GetOffset(0x6CF84D704B45564F)); + get => ref _Handle.AsRef(_TvOffset.Value); } + private static readonly Lazy _DistOffset = new(() => Schema.GetOffset(0x6CF84D701234268F), LazyThreadSafetyMode.None); + public ref float Dist { - get => ref _Handle.AsRef(Schema.GetOffset(0x6CF84D701234268F)); + get => ref _Handle.AsRef(_DistOffset.Value); } public ISchemaFixedArray Weight { get => new SchemaFixedArray(_Handle, 0x6CF84D70CFFC66CB, 4, 4, 4); diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBandBendLimit_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBandBendLimit_tImpl.cs index 280e94a39..a7cb769c3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBandBendLimit_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBandBendLimit_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class FeBandBendLimit_tImpl : SchemaClass, FeBandBendLimit_t { public FeBandBendLimit_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _DistMinOffset = new(() => Schema.GetOffset(0xB667406005D5EE89), LazyThreadSafetyMode.None); + public ref float DistMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xB667406005D5EE89)); + get => ref _Handle.AsRef(_DistMinOffset.Value); } + private static readonly Lazy _DistMaxOffset = new(() => Schema.GetOffset(0xB6674060F7C250C7), LazyThreadSafetyMode.None); + public ref float DistMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xB6674060F7C250C7)); + get => ref _Handle.AsRef(_DistMaxOffset.Value); } public ISchemaFixedArray Node { get => new SchemaFixedArray(_Handle, 0xB6674060CD6694B9, 6, 2, 2); diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBoxRigid_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBoxRigid_tImpl.cs index 58caa5170..013017441 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBoxRigid_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBoxRigid_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class FeBoxRigid_tImpl : SchemaClass, FeBoxRigid_t { public FeBoxRigid_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TmFrame2Offset = new(() => Schema.GetOffset(0x63C7789F568CD94B), LazyThreadSafetyMode.None); + public ref CTransform TmFrame2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x63C7789F568CD94B)); + get => ref _Handle.AsRef(_TmFrame2Offset.Value); } + private static readonly Lazy _NodeOffset = new(() => Schema.GetOffset(0x63C7789FCD6694B9), LazyThreadSafetyMode.None); + public ref ushort Node { - get => ref _Handle.AsRef(Schema.GetOffset(0x63C7789FCD6694B9)); + get => ref _Handle.AsRef(_NodeOffset.Value); } + private static readonly Lazy _CollisionMaskOffset = new(() => Schema.GetOffset(0x63C7789F0ED3454F), LazyThreadSafetyMode.None); + public ref ushort CollisionMask { - get => ref _Handle.AsRef(Schema.GetOffset(0x63C7789F0ED3454F)); + get => ref _Handle.AsRef(_CollisionMaskOffset.Value); } + private static readonly Lazy _SizeOffset = new(() => Schema.GetOffset(0x63C7789FCB89C418), LazyThreadSafetyMode.None); + public ref Vector Size { - get => ref _Handle.AsRef(Schema.GetOffset(0x63C7789FCB89C418)); + get => ref _Handle.AsRef(_SizeOffset.Value); } + private static readonly Lazy _VertexMapIndexOffset = new(() => Schema.GetOffset(0x63C7789F7B332E39), LazyThreadSafetyMode.None); + public ref ushort VertexMapIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x63C7789F7B332E39)); + get => ref _Handle.AsRef(_VertexMapIndexOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x63C7789FB8D52E48), LazyThreadSafetyMode.None); + public ref ushort Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x63C7789FB8D52E48)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBuildBoxRigid_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBuildBoxRigid_tImpl.cs index 2f0ba6dd0..f3ec2972c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBuildBoxRigid_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBuildBoxRigid_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class FeBuildBoxRigid_tImpl : FeBoxRigid_tImpl, FeBuildBoxRigid public FeBuildBoxRigid_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _PriorityOffset = new(() => Schema.GetOffset(0x9E8528AFE7EFB335), LazyThreadSafetyMode.None); + public ref int Priority { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E8528AFE7EFB335)); + get => ref _Handle.AsRef(_PriorityOffset.Value); } + private static readonly Lazy _VertexMapHashOffset = new(() => Schema.GetOffset(0x9E8528AF06BCA0A3), LazyThreadSafetyMode.None); + public ref uint VertexMapHash { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E8528AF06BCA0A3)); + get => ref _Handle.AsRef(_VertexMapHashOffset.Value); } + private static readonly Lazy _AntitunnelGroupBitsOffset = new(() => Schema.GetOffset(0x9E8528AFA5C6E91A), LazyThreadSafetyMode.None); + public ref uint AntitunnelGroupBits { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E8528AFA5C6E91A)); + get => ref _Handle.AsRef(_AntitunnelGroupBitsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBuildSDFRigid_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBuildSDFRigid_tImpl.cs index 53e4173b8..0bf2f20c9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBuildSDFRigid_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBuildSDFRigid_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class FeBuildSDFRigid_tImpl : FeSDFRigid_tImpl, FeBuildSDFRigid public FeBuildSDFRigid_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _PriorityOffset = new(() => Schema.GetOffset(0x8C389301E7EFB335), LazyThreadSafetyMode.None); + public ref int Priority { - get => ref _Handle.AsRef(Schema.GetOffset(0x8C389301E7EFB335)); + get => ref _Handle.AsRef(_PriorityOffset.Value); } + private static readonly Lazy _VertexMapHashOffset = new(() => Schema.GetOffset(0x8C38930106BCA0A3), LazyThreadSafetyMode.None); + public ref uint VertexMapHash { - get => ref _Handle.AsRef(Schema.GetOffset(0x8C38930106BCA0A3)); + get => ref _Handle.AsRef(_VertexMapHashOffset.Value); } + private static readonly Lazy _AntitunnelGroupBitsOffset = new(() => Schema.GetOffset(0x8C389301A5C6E91A), LazyThreadSafetyMode.None); + public ref uint AntitunnelGroupBits { - get => ref _Handle.AsRef(Schema.GetOffset(0x8C389301A5C6E91A)); + get => ref _Handle.AsRef(_AntitunnelGroupBitsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBuildSphereRigid_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBuildSphereRigid_tImpl.cs index c0b1f93d5..de0cd28d1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBuildSphereRigid_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBuildSphereRigid_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class FeBuildSphereRigid_tImpl : FeSphereRigid_tImpl, FeBuildSp public FeBuildSphereRigid_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _PriorityOffset = new(() => Schema.GetOffset(0xB0A01B13E7EFB335), LazyThreadSafetyMode.None); + public ref int Priority { - get => ref _Handle.AsRef(Schema.GetOffset(0xB0A01B13E7EFB335)); + get => ref _Handle.AsRef(_PriorityOffset.Value); } + private static readonly Lazy _VertexMapHashOffset = new(() => Schema.GetOffset(0xB0A01B1306BCA0A3), LazyThreadSafetyMode.None); + public ref uint VertexMapHash { - get => ref _Handle.AsRef(Schema.GetOffset(0xB0A01B1306BCA0A3)); + get => ref _Handle.AsRef(_VertexMapHashOffset.Value); } + private static readonly Lazy _AntitunnelGroupBitsOffset = new(() => Schema.GetOffset(0xB0A01B13A5C6E91A), LazyThreadSafetyMode.None); + public ref uint AntitunnelGroupBits { - get => ref _Handle.AsRef(Schema.GetOffset(0xB0A01B13A5C6E91A)); + get => ref _Handle.AsRef(_AntitunnelGroupBitsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBuildTaperedCapsuleRigid_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBuildTaperedCapsuleRigid_tImpl.cs index d52970713..12815f31c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBuildTaperedCapsuleRigid_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeBuildTaperedCapsuleRigid_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class FeBuildTaperedCapsuleRigid_tImpl : FeTaperedCapsuleRigid_ public FeBuildTaperedCapsuleRigid_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _PriorityOffset = new(() => Schema.GetOffset(0x444BEEFEE7EFB335), LazyThreadSafetyMode.None); + public ref int Priority { - get => ref _Handle.AsRef(Schema.GetOffset(0x444BEEFEE7EFB335)); + get => ref _Handle.AsRef(_PriorityOffset.Value); } + private static readonly Lazy _VertexMapHashOffset = new(() => Schema.GetOffset(0x444BEEFE06BCA0A3), LazyThreadSafetyMode.None); + public ref uint VertexMapHash { - get => ref _Handle.AsRef(Schema.GetOffset(0x444BEEFE06BCA0A3)); + get => ref _Handle.AsRef(_VertexMapHashOffset.Value); } + private static readonly Lazy _AntitunnelGroupBitsOffset = new(() => Schema.GetOffset(0x444BEEFEA5C6E91A), LazyThreadSafetyMode.None); + public ref uint AntitunnelGroupBits { - get => ref _Handle.AsRef(Schema.GetOffset(0x444BEEFEA5C6E91A)); + get => ref _Handle.AsRef(_AntitunnelGroupBitsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeCollisionPlane_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeCollisionPlane_tImpl.cs index 97634f748..390ffb41b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeCollisionPlane_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeCollisionPlane_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class FeCollisionPlane_tImpl : SchemaClass, FeCollisionPlane_t public FeCollisionPlane_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CtrlParentOffset = new(() => Schema.GetOffset(0xF8EBA99555049230), LazyThreadSafetyMode.None); + public ref ushort CtrlParent { - get => ref _Handle.AsRef(Schema.GetOffset(0xF8EBA99555049230)); + get => ref _Handle.AsRef(_CtrlParentOffset.Value); } + private static readonly Lazy _ChildNodeOffset = new(() => Schema.GetOffset(0xF8EBA99592A8E0E9), LazyThreadSafetyMode.None); + public ref ushort ChildNode { - get => ref _Handle.AsRef(Schema.GetOffset(0xF8EBA99592A8E0E9)); + get => ref _Handle.AsRef(_ChildNodeOffset.Value); } + private static readonly Lazy _PlaneOffset = new(() => Schema.GetOffset(0xF8EBA995671CB5D5), LazyThreadSafetyMode.None); + public RnPlane_t Plane { - get => new RnPlane_tImpl(_Handle + Schema.GetOffset(0xF8EBA995671CB5D5)); + get => new RnPlane_tImpl(_Handle + _PlaneOffset.Value); } + private static readonly Lazy _StrengthOffset = new(() => Schema.GetOffset(0xF8EBA995AFA3323A), LazyThreadSafetyMode.None); + public ref float Strength { - get => ref _Handle.AsRef(Schema.GetOffset(0xF8EBA995AFA3323A)); + get => ref _Handle.AsRef(_StrengthOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeCtrlOffset_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeCtrlOffset_tImpl.cs index f55688191..24833c796 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeCtrlOffset_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeCtrlOffset_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class FeCtrlOffset_tImpl : SchemaClass, FeCtrlOffset_t { public FeCtrlOffset_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0x83912B89B2913856), LazyThreadSafetyMode.None); + public ref Vector Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0x83912B89B2913856)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _CtrlParentOffset = new(() => Schema.GetOffset(0x83912B8955049230), LazyThreadSafetyMode.None); + public ref ushort CtrlParent { - get => ref _Handle.AsRef(Schema.GetOffset(0x83912B8955049230)); + get => ref _Handle.AsRef(_CtrlParentOffset.Value); } + private static readonly Lazy _CtrlChildOffset = new(() => Schema.GetOffset(0x83912B895BE48066), LazyThreadSafetyMode.None); + public ref ushort CtrlChild { - get => ref _Handle.AsRef(Schema.GetOffset(0x83912B895BE48066)); + get => ref _Handle.AsRef(_CtrlChildOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeCtrlOsOffset_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeCtrlOsOffset_tImpl.cs index 7f896fbc7..06b309725 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeCtrlOsOffset_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeCtrlOsOffset_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class FeCtrlOsOffset_tImpl : SchemaClass, FeCtrlOsOffset_t { public FeCtrlOsOffset_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CtrlParentOffset = new(() => Schema.GetOffset(0xA9B7D3DF55049230), LazyThreadSafetyMode.None); + public ref ushort CtrlParent { - get => ref _Handle.AsRef(Schema.GetOffset(0xA9B7D3DF55049230)); + get => ref _Handle.AsRef(_CtrlParentOffset.Value); } + private static readonly Lazy _CtrlChildOffset = new(() => Schema.GetOffset(0xA9B7D3DF5BE48066), LazyThreadSafetyMode.None); + public ref ushort CtrlChild { - get => ref _Handle.AsRef(Schema.GetOffset(0xA9B7D3DF5BE48066)); + get => ref _Handle.AsRef(_CtrlChildOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeCtrlSoftOffset_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeCtrlSoftOffset_tImpl.cs index 36ce5e73a..2baa25753 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeCtrlSoftOffset_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeCtrlSoftOffset_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class FeCtrlSoftOffset_tImpl : SchemaClass, FeCtrlSoftOffset_t public FeCtrlSoftOffset_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CtrlParentOffset = new(() => Schema.GetOffset(0xCA94FF2955049230), LazyThreadSafetyMode.None); + public ref ushort CtrlParent { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA94FF2955049230)); + get => ref _Handle.AsRef(_CtrlParentOffset.Value); } + private static readonly Lazy _CtrlChildOffset = new(() => Schema.GetOffset(0xCA94FF295BE48066), LazyThreadSafetyMode.None); + public ref ushort CtrlChild { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA94FF295BE48066)); + get => ref _Handle.AsRef(_CtrlChildOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0xCA94FF29B2913856), LazyThreadSafetyMode.None); + public ref Vector Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA94FF29B2913856)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _AlphaOffset = new(() => Schema.GetOffset(0xCA94FF29684C8871), LazyThreadSafetyMode.None); + public ref float Alpha { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA94FF29684C8871)); + get => ref _Handle.AsRef(_AlphaOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeDynKinLink_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeDynKinLink_tImpl.cs index c4669154d..8013b048f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeDynKinLink_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeDynKinLink_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class FeDynKinLink_tImpl : SchemaClass, FeDynKinLink_t { public FeDynKinLink_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParentOffset = new(() => Schema.GetOffset(0xA0FBF6C40AABB9D1), LazyThreadSafetyMode.None); + public ref ushort Parent { - get => ref _Handle.AsRef(Schema.GetOffset(0xA0FBF6C40AABB9D1)); + get => ref _Handle.AsRef(_ParentOffset.Value); } + private static readonly Lazy _ChildOffset = new(() => Schema.GetOffset(0xA0FBF6C4FE653481), LazyThreadSafetyMode.None); + public ref ushort Child { - get => ref _Handle.AsRef(Schema.GetOffset(0xA0FBF6C4FE653481)); + get => ref _Handle.AsRef(_ChildOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeEdgeDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeEdgeDesc_tImpl.cs index 8c4362045..40a5f6f73 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeEdgeDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeEdgeDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,8 +20,10 @@ public FeEdgeDesc_tImpl(nint handle) : base(handle) { public ISchemaFixedArray Edge { get => new SchemaFixedArray(_Handle, 0xD483120F9FB47768, 2, 2, 2); } + private static readonly Lazy _SideOffset = new(() => Schema.GetOffset(0xD483120FA0D97E1A), LazyThreadSafetyMode.None); + public SchemaUntypedField Side { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xD483120FA0D97E1A)); + get => new SchemaUntypedField(_Handle + _SideOffset.Value); } public ISchemaFixedArray VirtElem { get => new SchemaFixedArray(_Handle, 0xD483120F64A695A5, 2, 2, 2); diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeEffectDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeEffectDesc_tImpl.cs index 1cfcba759..2c5059ac4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeEffectDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeEffectDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class FeEffectDesc_tImpl : SchemaClass, FeEffectDesc_t { public FeEffectDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x3462F54326980769), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x3462F54326980769)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x3462F54326980769, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _NameHashOffset = new(() => Schema.GetOffset(0x3462F543BA4B2BDE), LazyThreadSafetyMode.None); + public ref uint NameHash { - get => ref _Handle.AsRef(Schema.GetOffset(0x3462F543BA4B2BDE)); + get => ref _Handle.AsRef(_NameHashOffset.Value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x3462F543EEF036F9), LazyThreadSafetyMode.None); + public ref int Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x3462F543EEF036F9)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _ParamsOffset = new(() => Schema.GetOffset(0x3462F543900020D3), LazyThreadSafetyMode.None); + public SchemaUntypedField Params { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x3462F543900020D3)); + get => new SchemaUntypedField(_Handle + _ParamsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeFitInfluence_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeFitInfluence_tImpl.cs index d327766c1..929ee0b2e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeFitInfluence_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeFitInfluence_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class FeFitInfluence_tImpl : SchemaClass, FeFitInfluence_t { public FeFitInfluence_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _VertexNodeOffset = new(() => Schema.GetOffset(0xF8271D2105342743), LazyThreadSafetyMode.None); + public ref uint VertexNode { - get => ref _Handle.AsRef(Schema.GetOffset(0xF8271D2105342743)); + get => ref _Handle.AsRef(_VertexNodeOffset.Value); } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0xF8271D21CFFC66CB), LazyThreadSafetyMode.None); + public ref float Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0xF8271D21CFFC66CB)); + get => ref _Handle.AsRef(_WeightOffset.Value); } + private static readonly Lazy _MatrixNodeOffset = new(() => Schema.GetOffset(0xF8271D2189590174), LazyThreadSafetyMode.None); + public ref uint MatrixNode { - get => ref _Handle.AsRef(Schema.GetOffset(0xF8271D2189590174)); + get => ref _Handle.AsRef(_MatrixNodeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeFitMatrix_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeFitMatrix_tImpl.cs index 431c4a823..da8a30068 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeFitMatrix_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeFitMatrix_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class FeFitMatrix_tImpl : SchemaClass, FeFitMatrix_t { public FeFitMatrix_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneOffset = new(() => Schema.GetOffset(0xB8804215DB90E18F), LazyThreadSafetyMode.None); + public ref CTransform Bone { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8804215DB90E18F)); + get => ref _Handle.AsRef(_BoneOffset.Value); } + private static readonly Lazy _CenterOffset = new(() => Schema.GetOffset(0xB88042157CA60028), LazyThreadSafetyMode.None); + public ref Vector Center { - get => ref _Handle.AsRef(Schema.GetOffset(0xB88042157CA60028)); + get => ref _Handle.AsRef(_CenterOffset.Value); } + private static readonly Lazy _EndOffset = new(() => Schema.GetOffset(0xB8804215FE4CFBD6), LazyThreadSafetyMode.None); + public ref ushort End { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8804215FE4CFBD6)); + get => ref _Handle.AsRef(_EndOffset.Value); } + private static readonly Lazy _NodeOffset = new(() => Schema.GetOffset(0xB8804215CD6694B9), LazyThreadSafetyMode.None); + public ref ushort Node { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8804215CD6694B9)); + get => ref _Handle.AsRef(_NodeOffset.Value); } + private static readonly Lazy _BeginDynamicOffset = new(() => Schema.GetOffset(0xB88042153F6B5607), LazyThreadSafetyMode.None); + public ref ushort BeginDynamic { - get => ref _Handle.AsRef(Schema.GetOffset(0xB88042153F6B5607)); + get => ref _Handle.AsRef(_BeginDynamicOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeFitWeight_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeFitWeight_tImpl.cs index ecc34211e..3ed417414 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeFitWeight_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeFitWeight_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class FeFitWeight_tImpl : SchemaClass, FeFitWeight_t { public FeFitWeight_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0x292AB604CFFC66CB), LazyThreadSafetyMode.None); + public ref float Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0x292AB604CFFC66CB)); + get => ref _Handle.AsRef(_WeightOffset.Value); } + private static readonly Lazy _NodeOffset = new(() => Schema.GetOffset(0x292AB604CD6694B9), LazyThreadSafetyMode.None); + public ref ushort Node { - get => ref _Handle.AsRef(Schema.GetOffset(0x292AB604CD6694B9)); + get => ref _Handle.AsRef(_NodeOffset.Value); } + private static readonly Lazy _DummyOffset = new(() => Schema.GetOffset(0x292AB604CD8BAE5F), LazyThreadSafetyMode.None); + public ref ushort Dummy { - get => ref _Handle.AsRef(Schema.GetOffset(0x292AB604CD8BAE5F)); + get => ref _Handle.AsRef(_DummyOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeFollowNode_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeFollowNode_tImpl.cs index 9d320510e..ae49d5b4c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeFollowNode_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeFollowNode_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class FeFollowNode_tImpl : SchemaClass, FeFollowNode_t { public FeFollowNode_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParentNodeOffset = new(() => Schema.GetOffset(0x8BE908126CBBA7F9), LazyThreadSafetyMode.None); + public ref ushort ParentNode { - get => ref _Handle.AsRef(Schema.GetOffset(0x8BE908126CBBA7F9)); + get => ref _Handle.AsRef(_ParentNodeOffset.Value); } + private static readonly Lazy _ChildNodeOffset = new(() => Schema.GetOffset(0x8BE9081292A8E0E9), LazyThreadSafetyMode.None); + public ref ushort ChildNode { - get => ref _Handle.AsRef(Schema.GetOffset(0x8BE9081292A8E0E9)); + get => ref _Handle.AsRef(_ChildNodeOffset.Value); } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0x8BE90812CFFC66CB), LazyThreadSafetyMode.None); + public ref float Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0x8BE90812CFFC66CB)); + get => ref _Handle.AsRef(_WeightOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeHingeLimitBuild_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeHingeLimitBuild_tImpl.cs index 367c43d5c..4cacc67f6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeHingeLimitBuild_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeHingeLimitBuild_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,14 +20,20 @@ public FeHingeLimitBuild_tImpl(nint handle) : base(handle) { public ISchemaFixedArray Node { get => new SchemaFixedArray(_Handle, 0x50E120ADCD6694B9, 6, 2, 2); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x50E120ADB8D52E48), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x50E120ADB8D52E48)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _LimitCWOffset = new(() => Schema.GetOffset(0x50E120ADC3D20C44), LazyThreadSafetyMode.None); + public ref float LimitCW { - get => ref _Handle.AsRef(Schema.GetOffset(0x50E120ADC3D20C44)); + get => ref _Handle.AsRef(_LimitCWOffset.Value); } + private static readonly Lazy _LimitCCWOffset = new(() => Schema.GetOffset(0x50E120ADA6C794ED), LazyThreadSafetyMode.None); + public ref float LimitCCW { - get => ref _Handle.AsRef(Schema.GetOffset(0x50E120ADA6C794ED)); + get => ref _Handle.AsRef(_LimitCCWOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeHingeLimit_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeHingeLimit_tImpl.cs index c81b16aa2..a3672bd46 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeHingeLimit_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeHingeLimit_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,20 +20,30 @@ public FeHingeLimit_tImpl(nint handle) : base(handle) { public ISchemaFixedArray Node { get => new SchemaFixedArray(_Handle, 0x3E7F1FF5CD6694B9, 6, 2, 2); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x3E7F1FF5B8D52E48), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E7F1FF5B8D52E48)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _Weight4Offset = new(() => Schema.GetOffset(0x3E7F1FF56956236D), LazyThreadSafetyMode.None); + public ref float Weight4 { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E7F1FF56956236D)); + get => ref _Handle.AsRef(_Weight4Offset.Value); } + private static readonly Lazy _Weight5Offset = new(() => Schema.GetOffset(0x3E7F1FF5685621DA), LazyThreadSafetyMode.None); + public ref float Weight5 { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E7F1FF5685621DA)); + get => ref _Handle.AsRef(_Weight5Offset.Value); } + private static readonly Lazy _AngleCenterOffset = new(() => Schema.GetOffset(0x3E7F1FF57BF2D76B), LazyThreadSafetyMode.None); + public ref float AngleCenter { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E7F1FF57BF2D76B)); + get => ref _Handle.AsRef(_AngleCenterOffset.Value); } + private static readonly Lazy _AngleExtentsOffset = new(() => Schema.GetOffset(0x3E7F1FF59D58EF0B), LazyThreadSafetyMode.None); + public ref float AngleExtents { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E7F1FF59D58EF0B)); + get => ref _Handle.AsRef(_AngleExtentsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeKelagerBend2_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeKelagerBend2_tImpl.cs index 6bfa6b5cd..4186291e6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeKelagerBend2_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeKelagerBend2_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,14 +20,18 @@ public FeKelagerBend2_tImpl(nint handle) : base(handle) { public ISchemaFixedArray Weight { get => new SchemaFixedArray(_Handle, 0x702E10E1CFFC66CB, 3, 4, 4); } + private static readonly Lazy _Height0Offset = new(() => Schema.GetOffset(0x702E10E1AA7896A0), LazyThreadSafetyMode.None); + public ref float Height0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x702E10E1AA7896A0)); + get => ref _Handle.AsRef(_Height0Offset.Value); } public ISchemaFixedArray Node { get => new SchemaFixedArray(_Handle, 0x702E10E1CD6694B9, 3, 2, 2); } + private static readonly Lazy _ReservedOffset = new(() => Schema.GetOffset(0x702E10E1156749A1), LazyThreadSafetyMode.None); + public ref ushort Reserved { - get => ref _Handle.AsRef(Schema.GetOffset(0x702E10E1156749A1)); + get => ref _Handle.AsRef(_ReservedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeMorphLayerDepr_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeMorphLayerDepr_tImpl.cs index c8087697e..6b965398b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeMorphLayerDepr_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeMorphLayerDepr_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,33 +17,49 @@ internal partial class FeMorphLayerDepr_tImpl : SchemaClass, FeMorphLayerDepr_t public FeMorphLayerDepr_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x5895C19CAE8A266), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x5895C19CAE8A266)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x5895C19CAE8A266, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _NameHashOffset = new(() => Schema.GetOffset(0x5895C19DE15EEFE), LazyThreadSafetyMode.None); + public ref uint NameHash { - get => ref _Handle.AsRef(Schema.GetOffset(0x5895C19DE15EEFE)); + get => ref _Handle.AsRef(_NameHashOffset.Value); } + private static readonly Lazy _NodesOffset = new(() => Schema.GetOffset(0x5895C19EBA045DA), LazyThreadSafetyMode.None); + public ref CUtlVector Nodes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5895C19EBA045DA)); + get => ref _Handle.AsRef>(_NodesOffset.Value); } + private static readonly Lazy _InitPosOffset = new(() => Schema.GetOffset(0x5895C198D152323), LazyThreadSafetyMode.None); + public ref CUtlVector InitPos { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5895C198D152323)); + get => ref _Handle.AsRef>(_InitPosOffset.Value); } + private static readonly Lazy _GravityOffset = new(() => Schema.GetOffset(0x5895C19790C70C5), LazyThreadSafetyMode.None); + public ref CUtlVector Gravity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5895C19790C70C5)); + get => ref _Handle.AsRef>(_GravityOffset.Value); } + private static readonly Lazy _GoalStrengthOffset = new(() => Schema.GetOffset(0x5895C19686343FF), LazyThreadSafetyMode.None); + public ref CUtlVector GoalStrength { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5895C19686343FF)); + get => ref _Handle.AsRef>(_GoalStrengthOffset.Value); } + private static readonly Lazy _GoalDampingOffset = new(() => Schema.GetOffset(0x5895C190F3CA820), LazyThreadSafetyMode.None); + public ref CUtlVector GoalDamping { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5895C190F3CA820)); + get => ref _Handle.AsRef>(_GoalDampingOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x5895C19CE6E9C28), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x5895C19CE6E9C28)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeNodeBase_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeNodeBase_tImpl.cs index a99fcbdcb..3ff0591ab 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeNodeBase_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeNodeBase_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,38 @@ internal partial class FeNodeBase_tImpl : SchemaClass, FeNodeBase_t { public FeNodeBase_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NodeOffset = new(() => Schema.GetOffset(0x74CA29BECD6694B9), LazyThreadSafetyMode.None); + public ref ushort Node { - get => ref _Handle.AsRef(Schema.GetOffset(0x74CA29BECD6694B9)); + get => ref _Handle.AsRef(_NodeOffset.Value); } public ISchemaFixedArray Dummy { get => new SchemaFixedArray(_Handle, 0x74CA29BECD8BAE5F, 3, 2, 2); } + private static readonly Lazy _NodeX0Offset = new(() => Schema.GetOffset(0x74CA29BE81C7FEB9), LazyThreadSafetyMode.None); + public ref ushort NodeX0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x74CA29BE81C7FEB9)); + get => ref _Handle.AsRef(_NodeX0Offset.Value); } + private static readonly Lazy _NodeX1Offset = new(() => Schema.GetOffset(0x74CA29BE80C7FD26), LazyThreadSafetyMode.None); + public ref ushort NodeX1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x74CA29BE80C7FD26)); + get => ref _Handle.AsRef(_NodeX1Offset.Value); } + private static readonly Lazy _NodeY0Offset = new(() => Schema.GetOffset(0x74CA29BE7BC5B6B0), LazyThreadSafetyMode.None); + public ref ushort NodeY0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x74CA29BE7BC5B6B0)); + get => ref _Handle.AsRef(_NodeY0Offset.Value); } + private static readonly Lazy _NodeY1Offset = new(() => Schema.GetOffset(0x74CA29BE7CC5B843), LazyThreadSafetyMode.None); + public ref ushort NodeY1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x74CA29BE7CC5B843)); + get => ref _Handle.AsRef(_NodeY1Offset.Value); } + private static readonly Lazy _AdjustOffset = new(() => Schema.GetOffset(0x74CA29BE0F6C0983), LazyThreadSafetyMode.None); + public SchemaUntypedField Adjust { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x74CA29BE0F6C0983)); + get => new SchemaUntypedField(_Handle + _AdjustOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeNodeIntegrator_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeNodeIntegrator_tImpl.cs index 65d264821..be25ddd99 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeNodeIntegrator_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeNodeIntegrator_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class FeNodeIntegrator_tImpl : SchemaClass, FeNodeIntegrator_t public FeNodeIntegrator_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _PointDampingOffset = new(() => Schema.GetOffset(0x64217E4215738003), LazyThreadSafetyMode.None); + public ref float PointDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0x64217E4215738003)); + get => ref _Handle.AsRef(_PointDampingOffset.Value); } + private static readonly Lazy _AnimationForceAttractionOffset = new(() => Schema.GetOffset(0x64217E423D09A7B3), LazyThreadSafetyMode.None); + public ref float AnimationForceAttraction { - get => ref _Handle.AsRef(Schema.GetOffset(0x64217E423D09A7B3)); + get => ref _Handle.AsRef(_AnimationForceAttractionOffset.Value); } + private static readonly Lazy _AnimationVertexAttractionOffset = new(() => Schema.GetOffset(0x64217E424E9EA4DC), LazyThreadSafetyMode.None); + public ref float AnimationVertexAttraction { - get => ref _Handle.AsRef(Schema.GetOffset(0x64217E424E9EA4DC)); + get => ref _Handle.AsRef(_AnimationVertexAttractionOffset.Value); } + private static readonly Lazy _GravityOffset = new(() => Schema.GetOffset(0x64217E4289B3B847), LazyThreadSafetyMode.None); + public ref float Gravity { - get => ref _Handle.AsRef(Schema.GetOffset(0x64217E4289B3B847)); + get => ref _Handle.AsRef(_GravityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeNodeReverseOffset_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeNodeReverseOffset_tImpl.cs index 4a6e93487..fff34983c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeNodeReverseOffset_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeNodeReverseOffset_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class FeNodeReverseOffset_tImpl : SchemaClass, FeNodeReverseOff public FeNodeReverseOffset_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0xA3D68D6AB2913856), LazyThreadSafetyMode.None); + public ref Vector Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3D68D6AB2913856)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _BoneCtrlOffset = new(() => Schema.GetOffset(0xA3D68D6AE9730872), LazyThreadSafetyMode.None); + public ref ushort BoneCtrl { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3D68D6AE9730872)); + get => ref _Handle.AsRef(_BoneCtrlOffset.Value); } + private static readonly Lazy _TargetNodeOffset = new(() => Schema.GetOffset(0xA3D68D6A817BD540), LazyThreadSafetyMode.None); + public ref ushort TargetNode { - get => ref _Handle.AsRef(Schema.GetOffset(0xA3D68D6A817BD540)); + get => ref _Handle.AsRef(_TargetNodeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeNodeWindBase_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeNodeWindBase_tImpl.cs index 7177b1c89..6616ca678 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeNodeWindBase_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeNodeWindBase_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class FeNodeWindBase_tImpl : SchemaClass, FeNodeWindBase_t { public FeNodeWindBase_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NodeX0Offset = new(() => Schema.GetOffset(0x3892EC5081C7FEB9), LazyThreadSafetyMode.None); + public ref ushort NodeX0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x3892EC5081C7FEB9)); + get => ref _Handle.AsRef(_NodeX0Offset.Value); } + private static readonly Lazy _NodeX1Offset = new(() => Schema.GetOffset(0x3892EC5080C7FD26), LazyThreadSafetyMode.None); + public ref ushort NodeX1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x3892EC5080C7FD26)); + get => ref _Handle.AsRef(_NodeX1Offset.Value); } + private static readonly Lazy _NodeY0Offset = new(() => Schema.GetOffset(0x3892EC507BC5B6B0), LazyThreadSafetyMode.None); + public ref ushort NodeY0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x3892EC507BC5B6B0)); + get => ref _Handle.AsRef(_NodeY0Offset.Value); } + private static readonly Lazy _NodeY1Offset = new(() => Schema.GetOffset(0x3892EC507CC5B843), LazyThreadSafetyMode.None); + public ref ushort NodeY1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x3892EC507CC5B843)); + get => ref _Handle.AsRef(_NodeY1Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeProxyVertexMap_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeProxyVertexMap_tImpl.cs index e7d28c989..91f627dd3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeProxyVertexMap_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeProxyVertexMap_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class FeProxyVertexMap_tImpl : SchemaClass, FeProxyVertexMap_t public FeProxyVertexMap_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xBBEA9D17CAE8A266), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xBBEA9D17CAE8A266)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xBBEA9D17CAE8A266, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0xBBEA9D177B81E7AB), LazyThreadSafetyMode.None); + public ref float Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0xBBEA9D177B81E7AB)); + get => ref _Handle.AsRef(_WeightOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeQuad_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeQuad_tImpl.cs index 296656ddb..de138cfad 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeQuad_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeQuad_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,8 +20,10 @@ public FeQuad_tImpl(nint handle) : base(handle) { public ISchemaFixedArray Node { get => new SchemaFixedArray(_Handle, 0x22A47BB8CD6694B9, 4, 2, 2); } + private static readonly Lazy _SlackOffset = new(() => Schema.GetOffset(0x22A47BB8C6554869), LazyThreadSafetyMode.None); + public ref float Slack { - get => ref _Handle.AsRef(Schema.GetOffset(0x22A47BB8C6554869)); + get => ref _Handle.AsRef(_SlackOffset.Value); } public ISchemaFixedArray Shape { get => new SchemaFixedArray(_Handle, 0x22A47BB8E159551A, 4, 16, 4); diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeRigidColliderIndices_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeRigidColliderIndices_tImpl.cs index 2a9b3f57f..97b7d819f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeRigidColliderIndices_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeRigidColliderIndices_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class FeRigidColliderIndices_tImpl : SchemaClass, FeRigidCollid public FeRigidColliderIndices_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TaperedCapsuleRigidIndexOffset = new(() => Schema.GetOffset(0x3411B17B4168EBCE), LazyThreadSafetyMode.None); + public ref ushort TaperedCapsuleRigidIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x3411B17B4168EBCE)); + get => ref _Handle.AsRef(_TaperedCapsuleRigidIndexOffset.Value); } + private static readonly Lazy _SphereRigidIndexOffset = new(() => Schema.GetOffset(0x3411B17B3AA961B5), LazyThreadSafetyMode.None); + public ref ushort SphereRigidIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x3411B17B3AA961B5)); + get => ref _Handle.AsRef(_SphereRigidIndexOffset.Value); } + private static readonly Lazy _BoxRigidIndexOffset = new(() => Schema.GetOffset(0x3411B17B46589173), LazyThreadSafetyMode.None); + public ref ushort BoxRigidIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x3411B17B46589173)); + get => ref _Handle.AsRef(_BoxRigidIndexOffset.Value); } + private static readonly Lazy _SDFRigidIndexOffset = new(() => Schema.GetOffset(0x3411B17BCE5B5E19), LazyThreadSafetyMode.None); + public ref ushort SDFRigidIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x3411B17BCE5B5E19)); + get => ref _Handle.AsRef(_SDFRigidIndexOffset.Value); } + private static readonly Lazy _CollisionPlaneIndexOffset = new(() => Schema.GetOffset(0x3411B17B7638A2B9), LazyThreadSafetyMode.None); + public ref ushort CollisionPlaneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x3411B17B7638A2B9)); + get => ref _Handle.AsRef(_CollisionPlaneIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeRodConstraint_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeRodConstraint_tImpl.cs index 0b56a4e7c..e15554fc1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeRodConstraint_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeRodConstraint_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,17 +20,25 @@ public FeRodConstraint_tImpl(nint handle) : base(handle) { public ISchemaFixedArray Node { get => new SchemaFixedArray(_Handle, 0xC672146DCD6694B9, 2, 2, 2); } + private static readonly Lazy _MaxDistOffset = new(() => Schema.GetOffset(0xC672146DC9FFDD57), LazyThreadSafetyMode.None); + public ref float MaxDist { - get => ref _Handle.AsRef(Schema.GetOffset(0xC672146DC9FFDD57)); + get => ref _Handle.AsRef(_MaxDistOffset.Value); } + private static readonly Lazy _MinDistOffset = new(() => Schema.GetOffset(0xC672146D2C1C02AD), LazyThreadSafetyMode.None); + public ref float MinDist { - get => ref _Handle.AsRef(Schema.GetOffset(0xC672146D2C1C02AD)); + get => ref _Handle.AsRef(_MinDistOffset.Value); } + private static readonly Lazy _Weight0Offset = new(() => Schema.GetOffset(0xC672146D65561D21), LazyThreadSafetyMode.None); + public ref float Weight0 { - get => ref _Handle.AsRef(Schema.GetOffset(0xC672146D65561D21)); + get => ref _Handle.AsRef(_Weight0Offset.Value); } + private static readonly Lazy _RelaxationFactorOffset = new(() => Schema.GetOffset(0xC672146D357F3BFF), LazyThreadSafetyMode.None); + public ref float RelaxationFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0xC672146D357F3BFF)); + get => ref _Handle.AsRef(_RelaxationFactorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSDFRigid_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSDFRigid_tImpl.cs index 04a3dbaef..890d0e3a2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSDFRigid_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSDFRigid_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class FeSDFRigid_tImpl : SchemaClass, FeSDFRigid_t { public FeSDFRigid_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _LocalMinOffset = new(() => Schema.GetOffset(0xAA90A717B4EB2F0), LazyThreadSafetyMode.None); + public ref Vector LocalMin { - get => ref _Handle.AsRef(Schema.GetOffset(0xAA90A717B4EB2F0)); + get => ref _Handle.AsRef(_LocalMinOffset.Value); } + private static readonly Lazy _LocalMaxOffset = new(() => Schema.GetOffset(0xAA90A71713B1B7A), LazyThreadSafetyMode.None); + public ref Vector LocalMax { - get => ref _Handle.AsRef(Schema.GetOffset(0xAA90A71713B1B7A)); + get => ref _Handle.AsRef(_LocalMaxOffset.Value); } + private static readonly Lazy _BouncinessOffset = new(() => Schema.GetOffset(0xAA90A7157FAD924), LazyThreadSafetyMode.None); + public ref float Bounciness { - get => ref _Handle.AsRef(Schema.GetOffset(0xAA90A7157FAD924)); + get => ref _Handle.AsRef(_BouncinessOffset.Value); } + private static readonly Lazy _NodeOffset = new(() => Schema.GetOffset(0xAA90A71CD6694B9), LazyThreadSafetyMode.None); + public ref ushort Node { - get => ref _Handle.AsRef(Schema.GetOffset(0xAA90A71CD6694B9)); + get => ref _Handle.AsRef(_NodeOffset.Value); } + private static readonly Lazy _CollisionMaskOffset = new(() => Schema.GetOffset(0xAA90A710ED3454F), LazyThreadSafetyMode.None); + public ref ushort CollisionMask { - get => ref _Handle.AsRef(Schema.GetOffset(0xAA90A710ED3454F)); + get => ref _Handle.AsRef(_CollisionMaskOffset.Value); } + private static readonly Lazy _VertexMapIndexOffset = new(() => Schema.GetOffset(0xAA90A717B332E39), LazyThreadSafetyMode.None); + public ref ushort VertexMapIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xAA90A717B332E39)); + get => ref _Handle.AsRef(_VertexMapIndexOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0xAA90A71B8D52E48), LazyThreadSafetyMode.None); + public ref ushort Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0xAA90A71B8D52E48)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _DistancesOffset = new(() => Schema.GetOffset(0xAA90A7122002443), LazyThreadSafetyMode.None); + public ref CUtlVector Distances { - get => ref _Handle.AsRef>(Schema.GetOffset(0xAA90A7122002443)); + get => ref _Handle.AsRef>(_DistancesOffset.Value); } + private static readonly Lazy _WidthOffset = new(() => Schema.GetOffset(0xAA90A71119108BB), LazyThreadSafetyMode.None); + public ref int Width { - get => ref _Handle.AsRef(Schema.GetOffset(0xAA90A71119108BB)); + get => ref _Handle.AsRef(_WidthOffset.Value); } + private static readonly Lazy _HeightOffset = new(() => Schema.GetOffset(0xAA90A71CAB61C56), LazyThreadSafetyMode.None); + public ref int Height { - get => ref _Handle.AsRef(Schema.GetOffset(0xAA90A71CAB61C56)); + get => ref _Handle.AsRef(_HeightOffset.Value); } + private static readonly Lazy _DepthOffset = new(() => Schema.GetOffset(0xAA90A71B725DB96), LazyThreadSafetyMode.None); + public ref int Depth { - get => ref _Handle.AsRef(Schema.GetOffset(0xAA90A71B725DB96)); + get => ref _Handle.AsRef(_DepthOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdAnimStrayRadius_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdAnimStrayRadius_tImpl.cs index ffd2a1b2f..0d629157d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdAnimStrayRadius_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdAnimStrayRadius_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class FeSimdAnimStrayRadius_tImpl : SchemaClass, FeSimdAnimStra public FeSimdAnimStrayRadius_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NodeOffset = new(() => Schema.GetOffset(0xEEC96A9CCD6694B9), LazyThreadSafetyMode.None); + public SchemaUntypedField Node { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xEEC96A9CCD6694B9)); + get => new SchemaUntypedField(_Handle + _NodeOffset.Value); } + private static readonly Lazy _MaxDistOffset = new(() => Schema.GetOffset(0xEEC96A9CC9FFDD57), LazyThreadSafetyMode.None); + public ref fltx4 MaxDist { - get => ref _Handle.AsRef(Schema.GetOffset(0xEEC96A9CC9FFDD57)); + get => ref _Handle.AsRef(_MaxDistOffset.Value); } + private static readonly Lazy _RelaxationFactorOffset = new(() => Schema.GetOffset(0xEEC96A9C357F3BFF), LazyThreadSafetyMode.None); + public ref fltx4 RelaxationFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0xEEC96A9C357F3BFF)); + get => ref _Handle.AsRef(_RelaxationFactorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdNodeBase_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdNodeBase_tImpl.cs index 5789de2fc..dcffd5fbb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdNodeBase_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdNodeBase_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -33,8 +35,10 @@ public ISchemaFixedArray NodeY1 { public ISchemaFixedArray Dummy { get => new SchemaFixedArray(_Handle, 0x8B863723CD8BAE5F, 4, 2, 2); } + private static readonly Lazy _AdjustOffset = new(() => Schema.GetOffset(0x8B8637230F6C0983), LazyThreadSafetyMode.None); + public FourQuaternions Adjust { - get => new FourQuaternionsImpl(_Handle + Schema.GetOffset(0x8B8637230F6C0983)); + get => new FourQuaternionsImpl(_Handle + _AdjustOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdQuad_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdQuad_tImpl.cs index 0953c6562..4d6f4129a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdQuad_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdQuad_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class FeSimdQuad_tImpl : SchemaClass, FeSimdQuad_t { public FeSimdQuad_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NodeOffset = new(() => Schema.GetOffset(0xB82B061DCD6694B9), LazyThreadSafetyMode.None); + public SchemaUntypedField Node { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xB82B061DCD6694B9)); + get => new SchemaUntypedField(_Handle + _NodeOffset.Value); } + private static readonly Lazy _F4SlackOffset = new(() => Schema.GetOffset(0xB82B061DBBFE3561), LazyThreadSafetyMode.None); + public ref fltx4 F4Slack { - get => ref _Handle.AsRef(Schema.GetOffset(0xB82B061DBBFE3561)); + get => ref _Handle.AsRef(_F4SlackOffset.Value); } public ISchemaFixedArray Shape { get => new SchemaFixedArray(_Handle, 0xB82B061DE159551A, 4, 48, 16); diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdRodConstraintAnim_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdRodConstraintAnim_tImpl.cs index 325f2e167..72e340271 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdRodConstraintAnim_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdRodConstraintAnim_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class FeSimdRodConstraintAnim_tImpl : SchemaClass, FeSimdRodCon public FeSimdRodConstraintAnim_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NodeOffset = new(() => Schema.GetOffset(0x22AFF313CD6694B9), LazyThreadSafetyMode.None); + public SchemaUntypedField Node { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x22AFF313CD6694B9)); + get => new SchemaUntypedField(_Handle + _NodeOffset.Value); } + private static readonly Lazy _F4Weight0Offset = new(() => Schema.GetOffset(0x22AFF3131FFC3579), LazyThreadSafetyMode.None); + public ref fltx4 F4Weight0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x22AFF3131FFC3579)); + get => ref _Handle.AsRef(_F4Weight0Offset.Value); } + private static readonly Lazy _F4RelaxationFactorOffset = new(() => Schema.GetOffset(0x22AFF313DF311F87), LazyThreadSafetyMode.None); + public ref fltx4 F4RelaxationFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0x22AFF313DF311F87)); + get => ref _Handle.AsRef(_F4RelaxationFactorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdRodConstraint_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdRodConstraint_tImpl.cs index 9b57b403a..5377bbc9d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdRodConstraint_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdRodConstraint_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class FeSimdRodConstraint_tImpl : SchemaClass, FeSimdRodConstra public FeSimdRodConstraint_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NodeOffset = new(() => Schema.GetOffset(0x596F7846CD6694B9), LazyThreadSafetyMode.None); + public SchemaUntypedField Node { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x596F7846CD6694B9)); + get => new SchemaUntypedField(_Handle + _NodeOffset.Value); } + private static readonly Lazy _F4MaxDistOffset = new(() => Schema.GetOffset(0x596F7846287D425F), LazyThreadSafetyMode.None); + public ref fltx4 F4MaxDist { - get => ref _Handle.AsRef(Schema.GetOffset(0x596F7846287D425F)); + get => ref _Handle.AsRef(_F4MaxDistOffset.Value); } + private static readonly Lazy _F4MinDistOffset = new(() => Schema.GetOffset(0x596F7846C67A2525), LazyThreadSafetyMode.None); + public ref fltx4 F4MinDist { - get => ref _Handle.AsRef(Schema.GetOffset(0x596F7846C67A2525)); + get => ref _Handle.AsRef(_F4MinDistOffset.Value); } + private static readonly Lazy _F4Weight0Offset = new(() => Schema.GetOffset(0x596F78461FFC3579), LazyThreadSafetyMode.None); + public ref fltx4 F4Weight0 { - get => ref _Handle.AsRef(Schema.GetOffset(0x596F78461FFC3579)); + get => ref _Handle.AsRef(_F4Weight0Offset.Value); } + private static readonly Lazy _F4RelaxationFactorOffset = new(() => Schema.GetOffset(0x596F7846DF311F87), LazyThreadSafetyMode.None); + public ref fltx4 F4RelaxationFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0x596F7846DF311F87)); + get => ref _Handle.AsRef(_F4RelaxationFactorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdSpringIntegrator_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdSpringIntegrator_tImpl.cs index 95930ab56..f4722aff3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdSpringIntegrator_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSimdSpringIntegrator_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class FeSimdSpringIntegrator_tImpl : SchemaClass, FeSimdSpringI public FeSimdSpringIntegrator_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NodeOffset = new(() => Schema.GetOffset(0xF9413B96CD6694B9), LazyThreadSafetyMode.None); + public SchemaUntypedField Node { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xF9413B96CD6694B9)); + get => new SchemaUntypedField(_Handle + _NodeOffset.Value); } + private static readonly Lazy _SpringRestLengthOffset = new(() => Schema.GetOffset(0xF9413B9628C609E8), LazyThreadSafetyMode.None); + public ref fltx4 SpringRestLength { - get => ref _Handle.AsRef(Schema.GetOffset(0xF9413B9628C609E8)); + get => ref _Handle.AsRef(_SpringRestLengthOffset.Value); } + private static readonly Lazy _SpringConstantOffset = new(() => Schema.GetOffset(0xF9413B969346E79E), LazyThreadSafetyMode.None); + public ref fltx4 SpringConstant { - get => ref _Handle.AsRef(Schema.GetOffset(0xF9413B969346E79E)); + get => ref _Handle.AsRef(_SpringConstantOffset.Value); } + private static readonly Lazy _SpringDampingOffset = new(() => Schema.GetOffset(0xF9413B9620E775D0), LazyThreadSafetyMode.None); + public ref fltx4 SpringDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0xF9413B9620E775D0)); + get => ref _Handle.AsRef(_SpringDampingOffset.Value); } + private static readonly Lazy _NodeWeight0Offset = new(() => Schema.GetOffset(0xF9413B966E62FEA1), LazyThreadSafetyMode.None); + public ref fltx4 NodeWeight0 { - get => ref _Handle.AsRef(Schema.GetOffset(0xF9413B966E62FEA1)); + get => ref _Handle.AsRef(_NodeWeight0Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSoftParent_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSoftParent_tImpl.cs index c78df6d8e..86af8e8b6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSoftParent_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSoftParent_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class FeSoftParent_tImpl : SchemaClass, FeSoftParent_t { public FeSoftParent_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParentOffset = new(() => Schema.GetOffset(0x2404393716640171), LazyThreadSafetyMode.None); + public ref int Parent { - get => ref _Handle.AsRef(Schema.GetOffset(0x2404393716640171)); + get => ref _Handle.AsRef(_ParentOffset.Value); } + private static readonly Lazy _AlphaOffset = new(() => Schema.GetOffset(0x24043937684C8871), LazyThreadSafetyMode.None); + public ref float Alpha { - get => ref _Handle.AsRef(Schema.GetOffset(0x24043937684C8871)); + get => ref _Handle.AsRef(_AlphaOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSourceEdge_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSourceEdge_tImpl.cs index a6e5aed3a..8b0f4b3b4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSourceEdge_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSourceEdge_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSphereRigid_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSphereRigid_tImpl.cs index 33ecea277..7b7c9bd1c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSphereRigid_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSphereRigid_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class FeSphereRigid_tImpl : SchemaClass, FeSphereRigid_t { public FeSphereRigid_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SphereOffset = new(() => Schema.GetOffset(0xA76DA0A39E2AC48C), LazyThreadSafetyMode.None); + public ref fltx4 Sphere { - get => ref _Handle.AsRef(Schema.GetOffset(0xA76DA0A39E2AC48C)); + get => ref _Handle.AsRef(_SphereOffset.Value); } + private static readonly Lazy _NodeOffset = new(() => Schema.GetOffset(0xA76DA0A3CD6694B9), LazyThreadSafetyMode.None); + public ref ushort Node { - get => ref _Handle.AsRef(Schema.GetOffset(0xA76DA0A3CD6694B9)); + get => ref _Handle.AsRef(_NodeOffset.Value); } + private static readonly Lazy _CollisionMaskOffset = new(() => Schema.GetOffset(0xA76DA0A30ED3454F), LazyThreadSafetyMode.None); + public ref ushort CollisionMask { - get => ref _Handle.AsRef(Schema.GetOffset(0xA76DA0A30ED3454F)); + get => ref _Handle.AsRef(_CollisionMaskOffset.Value); } + private static readonly Lazy _VertexMapIndexOffset = new(() => Schema.GetOffset(0xA76DA0A37B332E39), LazyThreadSafetyMode.None); + public ref ushort VertexMapIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xA76DA0A37B332E39)); + get => ref _Handle.AsRef(_VertexMapIndexOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0xA76DA0A3B8D52E48), LazyThreadSafetyMode.None); + public ref ushort Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0xA76DA0A3B8D52E48)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSpringIntegrator_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSpringIntegrator_tImpl.cs index 5f2515810..b3f88869c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSpringIntegrator_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeSpringIntegrator_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,17 +20,25 @@ public FeSpringIntegrator_tImpl(nint handle) : base(handle) { public ISchemaFixedArray Node { get => new SchemaFixedArray(_Handle, 0xFC6DF38BCD6694B9, 2, 2, 2); } + private static readonly Lazy _SpringRestLengthOffset = new(() => Schema.GetOffset(0xFC6DF38B28C609E8), LazyThreadSafetyMode.None); + public ref float SpringRestLength { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC6DF38B28C609E8)); + get => ref _Handle.AsRef(_SpringRestLengthOffset.Value); } + private static readonly Lazy _SpringConstantOffset = new(() => Schema.GetOffset(0xFC6DF38B9346E79E), LazyThreadSafetyMode.None); + public ref float SpringConstant { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC6DF38B9346E79E)); + get => ref _Handle.AsRef(_SpringConstantOffset.Value); } + private static readonly Lazy _SpringDampingOffset = new(() => Schema.GetOffset(0xFC6DF38B20E775D0), LazyThreadSafetyMode.None); + public ref float SpringDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC6DF38B20E775D0)); + get => ref _Handle.AsRef(_SpringDampingOffset.Value); } + private static readonly Lazy _NodeWeight0Offset = new(() => Schema.GetOffset(0xFC6DF38B6E62FEA1), LazyThreadSafetyMode.None); + public ref float NodeWeight0 { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC6DF38B6E62FEA1)); + get => ref _Handle.AsRef(_NodeWeight0Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeStiffHingeBuild_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeStiffHingeBuild_tImpl.cs index 32d7ab3c4..983b89f56 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeStiffHingeBuild_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeStiffHingeBuild_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class FeStiffHingeBuild_tImpl : SchemaClass, FeStiffHingeBuild_ public FeStiffHingeBuild_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaxAngleOffset = new(() => Schema.GetOffset(0x41A81A5876FE0F8E), LazyThreadSafetyMode.None); + public ref float MaxAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0x41A81A5876FE0F8E)); + get => ref _Handle.AsRef(_MaxAngleOffset.Value); } + private static readonly Lazy _StrengthOffset = new(() => Schema.GetOffset(0x41A81A58AFA3323A), LazyThreadSafetyMode.None); + public ref float Strength { - get => ref _Handle.AsRef(Schema.GetOffset(0x41A81A58AFA3323A)); + get => ref _Handle.AsRef(_StrengthOffset.Value); } public ISchemaFixedArray MotionBias { get => new SchemaFixedArray(_Handle, 0x41A81A582CDDBF14, 3, 4, 4); diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTaperedCapsuleRigid_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTaperedCapsuleRigid_tImpl.cs index 48451f0f1..6add47872 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTaperedCapsuleRigid_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTaperedCapsuleRigid_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,17 +20,25 @@ public FeTaperedCapsuleRigid_tImpl(nint handle) : base(handle) { public ISchemaFixedArray Sphere { get => new SchemaFixedArray(_Handle, 0x4B2017EE9E2AC48C, 2, 16, 16); } + private static readonly Lazy _NodeOffset = new(() => Schema.GetOffset(0x4B2017EECD6694B9), LazyThreadSafetyMode.None); + public ref ushort Node { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B2017EECD6694B9)); + get => ref _Handle.AsRef(_NodeOffset.Value); } + private static readonly Lazy _CollisionMaskOffset = new(() => Schema.GetOffset(0x4B2017EE0ED3454F), LazyThreadSafetyMode.None); + public ref ushort CollisionMask { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B2017EE0ED3454F)); + get => ref _Handle.AsRef(_CollisionMaskOffset.Value); } + private static readonly Lazy _VertexMapIndexOffset = new(() => Schema.GetOffset(0x4B2017EE7B332E39), LazyThreadSafetyMode.None); + public ref ushort VertexMapIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B2017EE7B332E39)); + get => ref _Handle.AsRef(_VertexMapIndexOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x4B2017EEB8D52E48), LazyThreadSafetyMode.None); + public ref ushort Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x4B2017EEB8D52E48)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTaperedCapsuleStretch_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTaperedCapsuleStretch_tImpl.cs index 36c56c067..c59295eb0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTaperedCapsuleStretch_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTaperedCapsuleStretch_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,11 +20,15 @@ public FeTaperedCapsuleStretch_tImpl(nint handle) : base(handle) { public ISchemaFixedArray Node { get => new SchemaFixedArray(_Handle, 0x627474D0CD6694B9, 2, 2, 2); } + private static readonly Lazy _CollisionMaskOffset = new(() => Schema.GetOffset(0x627474D00ED3454F), LazyThreadSafetyMode.None); + public ref ushort CollisionMask { - get => ref _Handle.AsRef(Schema.GetOffset(0x627474D00ED3454F)); + get => ref _Handle.AsRef(_CollisionMaskOffset.Value); } + private static readonly Lazy _DummyOffset = new(() => Schema.GetOffset(0x627474D0CD8BAE5F), LazyThreadSafetyMode.None); + public ref ushort Dummy { - get => ref _Handle.AsRef(Schema.GetOffset(0x627474D0CD8BAE5F)); + get => ref _Handle.AsRef(_DummyOffset.Value); } public ISchemaFixedArray Radius { get => new SchemaFixedArray(_Handle, 0x627474D095FBF7AD, 2, 4, 4); diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTreeChildren_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTreeChildren_tImpl.cs index b374de19e..856a828a9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTreeChildren_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTreeChildren_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTri_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTri_tImpl.cs index 5d85f8e1a..dfecb274a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTri_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTri_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,17 +20,25 @@ public FeTri_tImpl(nint handle) : base(handle) { public ISchemaFixedArray Node { get => new SchemaFixedArray(_Handle, 0x75C07D86CD6694B9, 3, 2, 2); } + private static readonly Lazy _W1Offset = new(() => Schema.GetOffset(0x75C07D8610473805), LazyThreadSafetyMode.None); + public ref float W1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x75C07D8610473805)); + get => ref _Handle.AsRef(_W1Offset.Value); } + private static readonly Lazy _W2Offset = new(() => Schema.GetOffset(0x75C07D860D47334C), LazyThreadSafetyMode.None); + public ref float W2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x75C07D860D47334C)); + get => ref _Handle.AsRef(_W2Offset.Value); } + private static readonly Lazy _V1xOffset = new(() => Schema.GetOffset(0x75C07D8680EC4B30), LazyThreadSafetyMode.None); + public ref float V1x { - get => ref _Handle.AsRef(Schema.GetOffset(0x75C07D8680EC4B30)); + get => ref _Handle.AsRef(_V1xOffset.Value); } + private static readonly Lazy _V2Offset = new(() => Schema.GetOffset(0x75C07D86974A4B21), LazyThreadSafetyMode.None); + public ref Vector2D V2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x75C07D86974A4B21)); + get => ref _Handle.AsRef(_V2Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTwistConstraint_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTwistConstraint_tImpl.cs index b5aa68477..43fb3f230 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTwistConstraint_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeTwistConstraint_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class FeTwistConstraint_tImpl : SchemaClass, FeTwistConstraint_ public FeTwistConstraint_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NodeOrientOffset = new(() => Schema.GetOffset(0x4BD7707B59026ED8), LazyThreadSafetyMode.None); + public ref ushort NodeOrient { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BD7707B59026ED8)); + get => ref _Handle.AsRef(_NodeOrientOffset.Value); } + private static readonly Lazy _NodeEndOffset = new(() => Schema.GetOffset(0x4BD7707B8A00317E), LazyThreadSafetyMode.None); + public ref ushort NodeEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BD7707B8A00317E)); + get => ref _Handle.AsRef(_NodeEndOffset.Value); } + private static readonly Lazy _TwistRelaxOffset = new(() => Schema.GetOffset(0x4BD7707B9E4510FC), LazyThreadSafetyMode.None); + public ref float TwistRelax { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BD7707B9E4510FC)); + get => ref _Handle.AsRef(_TwistRelaxOffset.Value); } + private static readonly Lazy _SwingRelaxOffset = new(() => Schema.GetOffset(0x4BD7707BE4722697), LazyThreadSafetyMode.None); + public ref float SwingRelax { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BD7707BE4722697)); + get => ref _Handle.AsRef(_SwingRelaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeVertexMapBuild_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeVertexMapBuild_tImpl.cs index 25b3b470d..22bbf879b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeVertexMapBuild_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeVertexMapBuild_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,27 +17,39 @@ internal partial class FeVertexMapBuild_tImpl : SchemaClass, FeVertexMapBuild_t public FeVertexMapBuild_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _VertexMapNameOffset = new(() => Schema.GetOffset(0x35530D470AA2D2C4), LazyThreadSafetyMode.None); + public string VertexMapName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x35530D470AA2D2C4)); + var ptr = _Handle.Read(_VertexMapNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x35530D470AA2D2C4, value); + set => Schema.SetString(_Handle, _VertexMapNameOffset.Value, value); } + private static readonly Lazy _NameHashOffset = new(() => Schema.GetOffset(0x35530D47DE15EEFE), LazyThreadSafetyMode.None); + public ref uint NameHash { - get => ref _Handle.AsRef(Schema.GetOffset(0x35530D47DE15EEFE)); + get => ref _Handle.AsRef(_NameHashOffset.Value); } + private static readonly Lazy _ColorOffset = new(() => Schema.GetOffset(0x35530D47D7D017D8), LazyThreadSafetyMode.None); + public ref Color Color { - get => ref _Handle.AsRef(Schema.GetOffset(0x35530D47D7D017D8)); + get => ref _Handle.AsRef(_ColorOffset.Value); } + private static readonly Lazy _VolumetricSolveStrengthOffset = new(() => Schema.GetOffset(0x35530D47F490B9B7), LazyThreadSafetyMode.None); + public ref float VolumetricSolveStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x35530D47F490B9B7)); + get => ref _Handle.AsRef(_VolumetricSolveStrengthOffset.Value); } + private static readonly Lazy _ScaleSourceNodeOffset = new(() => Schema.GetOffset(0x35530D477C35F5E4), LazyThreadSafetyMode.None); + public ref int ScaleSourceNode { - get => ref _Handle.AsRef(Schema.GetOffset(0x35530D477C35F5E4)); + get => ref _Handle.AsRef(_ScaleSourceNodeOffset.Value); } + private static readonly Lazy _WeightsOffset = new(() => Schema.GetOffset(0x35530D475DDC697E), LazyThreadSafetyMode.None); + public ref CUtlVector Weights { - get => ref _Handle.AsRef>(Schema.GetOffset(0x35530D475DDC697E)); + get => ref _Handle.AsRef>(_WeightsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeVertexMapDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeVertexMapDesc_tImpl.cs index 37753141f..93fea68b3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeVertexMapDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeVertexMapDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,45 +17,69 @@ internal partial class FeVertexMapDesc_tImpl : SchemaClass, FeVertexMapDesc_t { public FeVertexMapDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xD8EDB44626980769), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD8EDB44626980769)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD8EDB44626980769, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _NameHashOffset = new(() => Schema.GetOffset(0xD8EDB446BA4B2BDE), LazyThreadSafetyMode.None); + public ref uint NameHash { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8EDB446BA4B2BDE)); + get => ref _Handle.AsRef(_NameHashOffset.Value); } + private static readonly Lazy _ColorOffset = new(() => Schema.GetOffset(0xD8EDB44643AC69B4), LazyThreadSafetyMode.None); + public ref uint Color { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8EDB44643AC69B4)); + get => ref _Handle.AsRef(_ColorOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0xD8EDB446B8D52E48), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8EDB446B8D52E48)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _VertexBaseOffset = new(() => Schema.GetOffset(0xD8EDB4462D00367E), LazyThreadSafetyMode.None); + public ref ushort VertexBase { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8EDB4462D00367E)); + get => ref _Handle.AsRef(_VertexBaseOffset.Value); } + private static readonly Lazy _VertexCountOffset = new(() => Schema.GetOffset(0xD8EDB44625B0F972), LazyThreadSafetyMode.None); + public ref ushort VertexCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8EDB44625B0F972)); + get => ref _Handle.AsRef(_VertexCountOffset.Value); } + private static readonly Lazy _MapOffsetOffset = new(() => Schema.GetOffset(0xD8EDB4463B93E882), LazyThreadSafetyMode.None); + public ref uint MapOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8EDB4463B93E882)); + get => ref _Handle.AsRef(_MapOffsetOffset.Value); } + private static readonly Lazy _NodeListOffsetOffset = new(() => Schema.GetOffset(0xD8EDB44655CAC7CA), LazyThreadSafetyMode.None); + public ref uint NodeListOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8EDB44655CAC7CA)); + get => ref _Handle.AsRef(_NodeListOffsetOffset.Value); } + private static readonly Lazy _CenterOfMassOffset = new(() => Schema.GetOffset(0xD8EDB4467DD919BD), LazyThreadSafetyMode.None); + public ref Vector CenterOfMass { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8EDB4467DD919BD)); + get => ref _Handle.AsRef(_CenterOfMassOffset.Value); } + private static readonly Lazy _VolumetricSolveStrengthOffset = new(() => Schema.GetOffset(0xD8EDB446F787BED7), LazyThreadSafetyMode.None); + public ref float VolumetricSolveStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8EDB446F787BED7)); + get => ref _Handle.AsRef(_VolumetricSolveStrengthOffset.Value); } + private static readonly Lazy _ScaleSourceNodeOffset = new(() => Schema.GetOffset(0xD8EDB446052CD004), LazyThreadSafetyMode.None); + public ref short ScaleSourceNode { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8EDB446052CD004)); + get => ref _Handle.AsRef(_ScaleSourceNodeOffset.Value); } + private static readonly Lazy _NodeListCountOffset = new(() => Schema.GetOffset(0xD8EDB446CAB099F4), LazyThreadSafetyMode.None); + public ref ushort NodeListCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xD8EDB446CAB099F4)); + get => ref _Handle.AsRef(_NodeListCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeWeightedNode_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeWeightedNode_tImpl.cs index ce9f6e795..692c16f2f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeWeightedNode_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeWeightedNode_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class FeWeightedNode_tImpl : SchemaClass, FeWeightedNode_t { public FeWeightedNode_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NodeOffset = new(() => Schema.GetOffset(0x7CA6E056CD6694B9), LazyThreadSafetyMode.None); + public ref ushort Node { - get => ref _Handle.AsRef(Schema.GetOffset(0x7CA6E056CD6694B9)); + get => ref _Handle.AsRef(_NodeOffset.Value); } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0x7CA6E0564C8D62A5), LazyThreadSafetyMode.None); + public ref ushort Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0x7CA6E0564C8D62A5)); + get => ref _Handle.AsRef(_WeightOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeWorldCollisionParams_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeWorldCollisionParams_tImpl.cs index e94f9aa25..f129729dd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeWorldCollisionParams_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FeWorldCollisionParams_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class FeWorldCollisionParams_tImpl : SchemaClass, FeWorldCollis public FeWorldCollisionParams_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _WorldFrictionOffset = new(() => Schema.GetOffset(0x85D16E65E1266C23), LazyThreadSafetyMode.None); + public ref float WorldFriction { - get => ref _Handle.AsRef(Schema.GetOffset(0x85D16E65E1266C23)); + get => ref _Handle.AsRef(_WorldFrictionOffset.Value); } + private static readonly Lazy _GroundFrictionOffset = new(() => Schema.GetOffset(0x85D16E652D394B72), LazyThreadSafetyMode.None); + public ref float GroundFriction { - get => ref _Handle.AsRef(Schema.GetOffset(0x85D16E652D394B72)); + get => ref _Handle.AsRef(_GroundFrictionOffset.Value); } + private static readonly Lazy _ListBeginOffset = new(() => Schema.GetOffset(0x85D16E650BA98846), LazyThreadSafetyMode.None); + public ref ushort ListBegin { - get => ref _Handle.AsRef(Schema.GetOffset(0x85D16E650BA98846)); + get => ref _Handle.AsRef(_ListBeginOffset.Value); } + private static readonly Lazy _ListEndOffset = new(() => Schema.GetOffset(0x85D16E658683DD62), LazyThreadSafetyMode.None); + public ref ushort ListEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x85D16E658683DD62)); + get => ref _Handle.AsRef(_ListEndOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FilterDamageTypeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FilterDamageTypeImpl.cs index b7cb3d53a..eb372a5d9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FilterDamageTypeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FilterDamageTypeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class FilterDamageTypeImpl : CBaseFilterImpl, FilterDamageType public FilterDamageTypeImpl(nint handle) : base(handle) { } + private static readonly Lazy _DamageTypeOffset = new(() => Schema.GetOffset(0xEBD649E6AF4EB7BD), LazyThreadSafetyMode.None); + public ref int DamageType { - get => ref _Handle.AsRef(Schema.GetOffset(0xEBD649E6AF4EB7BD)); + get => ref _Handle.AsRef(_DamageTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FilterHealthImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FilterHealthImpl.cs index 771a1dd76..1e3bf1c87 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FilterHealthImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FilterHealthImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class FilterHealthImpl : CBaseFilterImpl, FilterHealth { public FilterHealthImpl(nint handle) : base(handle) { } + private static readonly Lazy _AdrenalineActiveOffset = new(() => Schema.GetOffset(0x4DD06C81671CFB30), LazyThreadSafetyMode.None); + public ref bool AdrenalineActive { - get => ref _Handle.AsRef(Schema.GetOffset(0x4DD06C81671CFB30)); + get => ref _Handle.AsRef(_AdrenalineActiveOffset.Value); } + private static readonly Lazy _HealthMinOffset = new(() => Schema.GetOffset(0x4DD06C8117D5C166), LazyThreadSafetyMode.None); + public ref int HealthMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x4DD06C8117D5C166)); + get => ref _Handle.AsRef(_HealthMinOffset.Value); } + private static readonly Lazy _HealthMaxOffset = new(() => Schema.GetOffset(0x4DD06C8129E96574), LazyThreadSafetyMode.None); + public ref int HealthMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x4DD06C8129E96574)); + get => ref _Handle.AsRef(_HealthMaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FloatInputMaterialVariable_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FloatInputMaterialVariable_tImpl.cs index 60d63c2c0..662be64bc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FloatInputMaterialVariable_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FloatInputMaterialVariable_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class FloatInputMaterialVariable_tImpl : SchemaClass, FloatInpu public FloatInputMaterialVariable_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _StrVariableOffset = new(() => Schema.GetOffset(0xEFEA50FDA52C3390), LazyThreadSafetyMode.None); + public string StrVariable { get { - var ptr = _Handle.Read(Schema.GetOffset(0xEFEA50FDA52C3390)); + var ptr = _Handle.Read(_StrVariableOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xEFEA50FDA52C3390, value); + set => Schema.SetString(_Handle, _StrVariableOffset.Value, value); } + private static readonly Lazy _InputOffset = new(() => Schema.GetOffset(0xEFEA50FD1D4B7FFD), LazyThreadSafetyMode.None); + public CParticleCollectionFloatInput Input { - get => new CParticleCollectionFloatInputImpl(_Handle + Schema.GetOffset(0xEFEA50FD1D4B7FFD)); + get => new CParticleCollectionFloatInputImpl(_Handle + _InputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FollowAttachmentDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FollowAttachmentDataImpl.cs index 33e648f5e..f3385d89c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FollowAttachmentDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FollowAttachmentDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class FollowAttachmentDataImpl : SchemaClass, FollowAttachmentD public FollowAttachmentDataImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneIndexOffset = new(() => Schema.GetOffset(0x7E37AD4D6AFA4155), LazyThreadSafetyMode.None); + public ref int BoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x7E37AD4D6AFA4155)); + get => ref _Handle.AsRef(_BoneIndexOffset.Value); } + private static readonly Lazy _AttachmentHandleOffset = new(() => Schema.GetOffset(0x7E37AD4DA203035E), LazyThreadSafetyMode.None); + public AttachmentHandle_t AttachmentHandle { - get => new AttachmentHandle_tImpl(_Handle + Schema.GetOffset(0x7E37AD4DA203035E)); + get => new AttachmentHandle_tImpl(_Handle + _AttachmentHandleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FollowAttachmentSettings_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FollowAttachmentSettings_tImpl.cs index fda54f8d0..ed4916f79 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FollowAttachmentSettings_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FollowAttachmentSettings_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class FollowAttachmentSettings_tImpl : SchemaClass, FollowAttac public FollowAttachmentSettings_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _AttachmentOffset = new(() => Schema.GetOffset(0x94FFC64B2C5CA308), LazyThreadSafetyMode.None); + public CAnimAttachment Attachment { - get => new CAnimAttachmentImpl(_Handle + Schema.GetOffset(0x94FFC64B2C5CA308)); + get => new CAnimAttachmentImpl(_Handle + _AttachmentOffset.Value); } + private static readonly Lazy _BoneIndexOffset = new(() => Schema.GetOffset(0x94FFC64B6AFA4155), LazyThreadSafetyMode.None); + public ref int BoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x94FFC64B6AFA4155)); + get => ref _Handle.AsRef(_BoneIndexOffset.Value); } + private static readonly Lazy _AttachmentHandleOffset = new(() => Schema.GetOffset(0x94FFC64BA203035E), LazyThreadSafetyMode.None); + public AttachmentHandle_t AttachmentHandle { - get => new AttachmentHandle_tImpl(_Handle + Schema.GetOffset(0x94FFC64BA203035E)); + get => new AttachmentHandle_tImpl(_Handle + _AttachmentHandleOffset.Value); } + private static readonly Lazy _MatchTranslationOffset = new(() => Schema.GetOffset(0x94FFC64B96FCC779), LazyThreadSafetyMode.None); + public ref bool MatchTranslation { - get => ref _Handle.AsRef(Schema.GetOffset(0x94FFC64B96FCC779)); + get => ref _Handle.AsRef(_MatchTranslationOffset.Value); } + private static readonly Lazy _MatchRotationOffset = new(() => Schema.GetOffset(0x94FFC64BA4FB561C), LazyThreadSafetyMode.None); + public ref bool MatchRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0x94FFC64BA4FB561C)); + get => ref _Handle.AsRef(_MatchRotationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FollowTargetOpFixedSettings_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FollowTargetOpFixedSettings_tImpl.cs index 4411941c7..ee36e8cba 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FollowTargetOpFixedSettings_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FollowTargetOpFixedSettings_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class FollowTargetOpFixedSettings_tImpl : SchemaClass, FollowTa public FollowTargetOpFixedSettings_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneIndexOffset = new(() => Schema.GetOffset(0xF6423DF66AFA4155), LazyThreadSafetyMode.None); + public ref int BoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6423DF66AFA4155)); + get => ref _Handle.AsRef(_BoneIndexOffset.Value); } + private static readonly Lazy _BoneTargetOffset = new(() => Schema.GetOffset(0xF6423DF60E626FD2), LazyThreadSafetyMode.None); + public ref bool BoneTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6423DF60E626FD2)); + get => ref _Handle.AsRef(_BoneTargetOffset.Value); } + private static readonly Lazy _BoneTargetIndexOffset = new(() => Schema.GetOffset(0xF6423DF62218DF46), LazyThreadSafetyMode.None); + public ref int BoneTargetIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6423DF62218DF46)); + get => ref _Handle.AsRef(_BoneTargetIndexOffset.Value); } + private static readonly Lazy _WorldCoodinateTargetOffset = new(() => Schema.GetOffset(0xF6423DF60B5B2B16), LazyThreadSafetyMode.None); + public ref bool WorldCoodinateTarget { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6423DF60B5B2B16)); + get => ref _Handle.AsRef(_WorldCoodinateTargetOffset.Value); } + private static readonly Lazy _MatchTargetOrientationOffset = new(() => Schema.GetOffset(0xF6423DF642E0C3DB), LazyThreadSafetyMode.None); + public ref bool MatchTargetOrientation { - get => ref _Handle.AsRef(Schema.GetOffset(0xF6423DF642E0C3DB)); + get => ref _Handle.AsRef(_MatchTargetOrientationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootFixedData_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootFixedData_tImpl.cs index 2b60dc65a..0b8421bed 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootFixedData_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootFixedData_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class FootFixedData_tImpl : SchemaClass, FootFixedData_t { public FootFixedData_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ToeOffsetOffset = new(() => Schema.GetOffset(0x20A34186E7F8869C), LazyThreadSafetyMode.None); + public ref Vector ToeOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x20A34186E7F8869C)); + get => ref _Handle.AsRef(_ToeOffsetOffset.Value); } + private static readonly Lazy _HeelOffsetOffset = new(() => Schema.GetOffset(0x20A34186306AE608), LazyThreadSafetyMode.None); + public ref Vector HeelOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x20A34186306AE608)); + get => ref _Handle.AsRef(_HeelOffsetOffset.Value); } + private static readonly Lazy _TargetBoneIndexOffset = new(() => Schema.GetOffset(0x20A341862EDA7BBE), LazyThreadSafetyMode.None); + public ref int TargetBoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x20A341862EDA7BBE)); + get => ref _Handle.AsRef(_TargetBoneIndexOffset.Value); } + private static readonly Lazy _AnkleBoneIndexOffset = new(() => Schema.GetOffset(0x20A34186A0D156BA), LazyThreadSafetyMode.None); + public ref int AnkleBoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x20A34186A0D156BA)); + get => ref _Handle.AsRef(_AnkleBoneIndexOffset.Value); } + private static readonly Lazy _IKAnchorBoneIndexOffset = new(() => Schema.GetOffset(0x20A341867F68400A), LazyThreadSafetyMode.None); + public ref int IKAnchorBoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x20A341867F68400A)); + get => ref _Handle.AsRef(_IKAnchorBoneIndexOffset.Value); } + private static readonly Lazy _IkChainIndexOffset = new(() => Schema.GetOffset(0x20A3418605785BF2), LazyThreadSafetyMode.None); + public ref int IkChainIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x20A3418605785BF2)); + get => ref _Handle.AsRef(_IkChainIndexOffset.Value); } + private static readonly Lazy _MaxIKLengthOffset = new(() => Schema.GetOffset(0x20A341863E04849B), LazyThreadSafetyMode.None); + public ref float MaxIKLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x20A341863E04849B)); + get => ref _Handle.AsRef(_MaxIKLengthOffset.Value); } + private static readonly Lazy _FootIndexOffset = new(() => Schema.GetOffset(0x20A3418667D56BAB), LazyThreadSafetyMode.None); + public ref int FootIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x20A3418667D56BAB)); + get => ref _Handle.AsRef(_FootIndexOffset.Value); } + private static readonly Lazy _TagIndexOffset = new(() => Schema.GetOffset(0x20A34186C2026AAD), LazyThreadSafetyMode.None); + public ref int TagIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x20A34186C2026AAD)); + get => ref _Handle.AsRef(_TagIndexOffset.Value); } + private static readonly Lazy _MaxRotationLeftOffset = new(() => Schema.GetOffset(0x20A34186FA1CDF44), LazyThreadSafetyMode.None); + public ref float MaxRotationLeft { - get => ref _Handle.AsRef(Schema.GetOffset(0x20A34186FA1CDF44)); + get => ref _Handle.AsRef(_MaxRotationLeftOffset.Value); } + private static readonly Lazy _MaxRotationRightOffset = new(() => Schema.GetOffset(0x20A341868C95FA31), LazyThreadSafetyMode.None); + public ref float MaxRotationRight { - get => ref _Handle.AsRef(Schema.GetOffset(0x20A341868C95FA31)); + get => ref _Handle.AsRef(_MaxRotationRightOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootFixedSettingsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootFixedSettingsImpl.cs index 6cd188bc2..ed50512ce 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootFixedSettingsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootFixedSettingsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class FootFixedSettingsImpl : SchemaClass, FootFixedSettings { public FootFixedSettingsImpl(nint handle) : base(handle) { } + private static readonly Lazy _TraceSettingsOffset = new(() => Schema.GetOffset(0x3401F9D0115F2D3B), LazyThreadSafetyMode.None); + public TraceSettings_t TraceSettings { - get => new TraceSettings_tImpl(_Handle + Schema.GetOffset(0x3401F9D0115F2D3B)); + get => new TraceSettings_tImpl(_Handle + _TraceSettingsOffset.Value); } + private static readonly Lazy _FootBaseBindPosePositionMSOffset = new(() => Schema.GetOffset(0x3401F9D0C391A025), LazyThreadSafetyMode.None); + public ref Vector FootBaseBindPosePositionMS { - get => ref _Handle.AsRef(Schema.GetOffset(0x3401F9D0C391A025)); + get => ref _Handle.AsRef(_FootBaseBindPosePositionMSOffset.Value); } + private static readonly Lazy _FootBaseLengthOffset = new(() => Schema.GetOffset(0x3401F9D08593ED7E), LazyThreadSafetyMode.None); + public ref float FootBaseLength { - get => ref _Handle.AsRef(Schema.GetOffset(0x3401F9D08593ED7E)); + get => ref _Handle.AsRef(_FootBaseLengthOffset.Value); } + private static readonly Lazy _MaxRotationLeftOffset = new(() => Schema.GetOffset(0x3401F9D0FA1CDF44), LazyThreadSafetyMode.None); + public ref float MaxRotationLeft { - get => ref _Handle.AsRef(Schema.GetOffset(0x3401F9D0FA1CDF44)); + get => ref _Handle.AsRef(_MaxRotationLeftOffset.Value); } + private static readonly Lazy _MaxRotationRightOffset = new(() => Schema.GetOffset(0x3401F9D08C95FA31), LazyThreadSafetyMode.None); + public ref float MaxRotationRight { - get => ref _Handle.AsRef(Schema.GetOffset(0x3401F9D08C95FA31)); + get => ref _Handle.AsRef(_MaxRotationRightOffset.Value); } + private static readonly Lazy _FootstepLandedTagIndexOffset = new(() => Schema.GetOffset(0x3401F9D04954321B), LazyThreadSafetyMode.None); + public ref int FootstepLandedTagIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x3401F9D04954321B)); + get => ref _Handle.AsRef(_FootstepLandedTagIndexOffset.Value); } + private static readonly Lazy _EnableTracingOffset = new(() => Schema.GetOffset(0x3401F9D03C16FC54), LazyThreadSafetyMode.None); + public ref bool EnableTracing { - get => ref _Handle.AsRef(Schema.GetOffset(0x3401F9D03C16FC54)); + get => ref _Handle.AsRef(_EnableTracingOffset.Value); } + private static readonly Lazy _TraceAngleBlendOffset = new(() => Schema.GetOffset(0x3401F9D0029B769E), LazyThreadSafetyMode.None); + public ref float TraceAngleBlend { - get => ref _Handle.AsRef(Schema.GetOffset(0x3401F9D0029B769E)); + get => ref _Handle.AsRef(_TraceAngleBlendOffset.Value); } + private static readonly Lazy _DisableTagIndexOffset = new(() => Schema.GetOffset(0x3401F9D0C56AE9EB), LazyThreadSafetyMode.None); + public ref int DisableTagIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x3401F9D0C56AE9EB)); + get => ref _Handle.AsRef(_DisableTagIndexOffset.Value); } + private static readonly Lazy _FootIndexOffset = new(() => Schema.GetOffset(0x3401F9D067D56BAB), LazyThreadSafetyMode.None); + public ref int FootIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x3401F9D067D56BAB)); + get => ref _Handle.AsRef(_FootIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootLockPoseOpFixedSettingsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootLockPoseOpFixedSettingsImpl.cs index 0c1144306..4b2f5da8b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootLockPoseOpFixedSettingsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootLockPoseOpFixedSettingsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,59 +17,95 @@ internal partial class FootLockPoseOpFixedSettingsImpl : SchemaClass, FootLockPo public FootLockPoseOpFixedSettingsImpl(nint handle) : base(handle) { } + private static readonly Lazy _FootInfoOffset = new(() => Schema.GetOffset(0x1246AD6B942F50C1), LazyThreadSafetyMode.None); + public ref CUtlVector FootInfo { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1246AD6B942F50C1)); + get => ref _Handle.AsRef>(_FootInfoOffset.Value); } + private static readonly Lazy _HipDampingSettingsOffset = new(() => Schema.GetOffset(0x1246AD6B3453D635), LazyThreadSafetyMode.None); + public CAnimInputDamping HipDampingSettings { - get => new CAnimInputDampingImpl(_Handle + Schema.GetOffset(0x1246AD6B3453D635)); + get => new CAnimInputDampingImpl(_Handle + _HipDampingSettingsOffset.Value); } + private static readonly Lazy _HipBoneIndexOffset = new(() => Schema.GetOffset(0x1246AD6B12FFBC70), LazyThreadSafetyMode.None); + public ref int HipBoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x1246AD6B12FFBC70)); + get => ref _Handle.AsRef(_HipBoneIndexOffset.Value); } + private static readonly Lazy _IkSolverTypeOffset = new(() => Schema.GetOffset(0x1246AD6BDD30189E), LazyThreadSafetyMode.None); + public ref IKSolverType IkSolverType { - get => ref _Handle.AsRef(Schema.GetOffset(0x1246AD6BDD30189E)); + get => ref _Handle.AsRef(_IkSolverTypeOffset.Value); } + private static readonly Lazy _ApplyTiltOffset = new(() => Schema.GetOffset(0x1246AD6B4568146C), LazyThreadSafetyMode.None); + public ref bool ApplyTilt { - get => ref _Handle.AsRef(Schema.GetOffset(0x1246AD6B4568146C)); + get => ref _Handle.AsRef(_ApplyTiltOffset.Value); } + private static readonly Lazy _ApplyHipDropOffset = new(() => Schema.GetOffset(0x1246AD6B3905DD5D), LazyThreadSafetyMode.None); + public ref bool ApplyHipDrop { - get => ref _Handle.AsRef(Schema.GetOffset(0x1246AD6B3905DD5D)); + get => ref _Handle.AsRef(_ApplyHipDropOffset.Value); } + private static readonly Lazy _AlwaysUseFallbackHingeOffset = new(() => Schema.GetOffset(0x1246AD6B58B8E174), LazyThreadSafetyMode.None); + public ref bool AlwaysUseFallbackHinge { - get => ref _Handle.AsRef(Schema.GetOffset(0x1246AD6B58B8E174)); + get => ref _Handle.AsRef(_AlwaysUseFallbackHingeOffset.Value); } + private static readonly Lazy _ApplyFootRotationLimitsOffset = new(() => Schema.GetOffset(0x1246AD6B7C3F5AED), LazyThreadSafetyMode.None); + public ref bool ApplyFootRotationLimits { - get => ref _Handle.AsRef(Schema.GetOffset(0x1246AD6B7C3F5AED)); + get => ref _Handle.AsRef(_ApplyFootRotationLimitsOffset.Value); } + private static readonly Lazy _ApplyLegTwistLimitsOffset = new(() => Schema.GetOffset(0x1246AD6B95B3EE60), LazyThreadSafetyMode.None); + public ref bool ApplyLegTwistLimits { - get => ref _Handle.AsRef(Schema.GetOffset(0x1246AD6B95B3EE60)); + get => ref _Handle.AsRef(_ApplyLegTwistLimitsOffset.Value); } + private static readonly Lazy _MaxFootHeightOffset = new(() => Schema.GetOffset(0x1246AD6B42AF5050), LazyThreadSafetyMode.None); + public ref float MaxFootHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x1246AD6B42AF5050)); + get => ref _Handle.AsRef(_MaxFootHeightOffset.Value); } + private static readonly Lazy _ExtensionScaleOffset = new(() => Schema.GetOffset(0x1246AD6B4059BBBA), LazyThreadSafetyMode.None); + public ref float ExtensionScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x1246AD6B4059BBBA)); + get => ref _Handle.AsRef(_ExtensionScaleOffset.Value); } + private static readonly Lazy _MaxLegTwistOffset = new(() => Schema.GetOffset(0x1246AD6BB79440DC), LazyThreadSafetyMode.None); + public ref float MaxLegTwist { - get => ref _Handle.AsRef(Schema.GetOffset(0x1246AD6BB79440DC)); + get => ref _Handle.AsRef(_MaxLegTwistOffset.Value); } + private static readonly Lazy _EnableLockBreakingOffset = new(() => Schema.GetOffset(0x1246AD6BEC9BF16C), LazyThreadSafetyMode.None); + public ref bool EnableLockBreaking { - get => ref _Handle.AsRef(Schema.GetOffset(0x1246AD6BEC9BF16C)); + get => ref _Handle.AsRef(_EnableLockBreakingOffset.Value); } + private static readonly Lazy _LockBreakToleranceOffset = new(() => Schema.GetOffset(0x1246AD6BC7586E26), LazyThreadSafetyMode.None); + public ref float LockBreakTolerance { - get => ref _Handle.AsRef(Schema.GetOffset(0x1246AD6BC7586E26)); + get => ref _Handle.AsRef(_LockBreakToleranceOffset.Value); } + private static readonly Lazy _LockBlendTimeOffset = new(() => Schema.GetOffset(0x1246AD6B91AE988A), LazyThreadSafetyMode.None); + public ref float LockBlendTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x1246AD6B91AE988A)); + get => ref _Handle.AsRef(_LockBlendTimeOffset.Value); } + private static readonly Lazy _EnableStretchingOffset = new(() => Schema.GetOffset(0x1246AD6BE2E75A5D), LazyThreadSafetyMode.None); + public ref bool EnableStretching { - get => ref _Handle.AsRef(Schema.GetOffset(0x1246AD6BE2E75A5D)); + get => ref _Handle.AsRef(_EnableStretchingOffset.Value); } + private static readonly Lazy _MaxStretchAmountOffset = new(() => Schema.GetOffset(0x1246AD6B18F00468), LazyThreadSafetyMode.None); + public ref float MaxStretchAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0x1246AD6B18F00468)); + get => ref _Handle.AsRef(_MaxStretchAmountOffset.Value); } + private static readonly Lazy _StretchExtensionScaleOffset = new(() => Schema.GetOffset(0x1246AD6BE711A7A5), LazyThreadSafetyMode.None); + public ref float StretchExtensionScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x1246AD6BE711A7A5)); + get => ref _Handle.AsRef(_StretchExtensionScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootPinningPoseOpFixedData_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootPinningPoseOpFixedData_tImpl.cs index 31c610103..c2fa5bfac 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootPinningPoseOpFixedData_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootPinningPoseOpFixedData_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class FootPinningPoseOpFixedData_tImpl : SchemaClass, FootPinni public FootPinningPoseOpFixedData_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FootInfoOffset = new(() => Schema.GetOffset(0x87C487AD942F50C1), LazyThreadSafetyMode.None); + public ref CUtlVector FootInfo { - get => ref _Handle.AsRef>(Schema.GetOffset(0x87C487AD942F50C1)); + get => ref _Handle.AsRef>(_FootInfoOffset.Value); } + private static readonly Lazy _BlendTimeOffset = new(() => Schema.GetOffset(0x87C487ADA6206E9F), LazyThreadSafetyMode.None); + public ref float BlendTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x87C487ADA6206E9F)); + get => ref _Handle.AsRef(_BlendTimeOffset.Value); } + private static readonly Lazy _LockBreakDistanceOffset = new(() => Schema.GetOffset(0x87C487AD71965CA0), LazyThreadSafetyMode.None); + public ref float LockBreakDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x87C487AD71965CA0)); + get => ref _Handle.AsRef(_LockBreakDistanceOffset.Value); } + private static readonly Lazy _MaxLegTwistOffset = new(() => Schema.GetOffset(0x87C487ADB79440DC), LazyThreadSafetyMode.None); + public ref float MaxLegTwist { - get => ref _Handle.AsRef(Schema.GetOffset(0x87C487ADB79440DC)); + get => ref _Handle.AsRef(_MaxLegTwistOffset.Value); } + private static readonly Lazy _HipBoneIndexOffset = new(() => Schema.GetOffset(0x87C487AD12FFBC70), LazyThreadSafetyMode.None); + public ref int HipBoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x87C487AD12FFBC70)); + get => ref _Handle.AsRef(_HipBoneIndexOffset.Value); } + private static readonly Lazy _ApplyLegTwistLimitsOffset = new(() => Schema.GetOffset(0x87C487AD95B3EE60), LazyThreadSafetyMode.None); + public ref bool ApplyLegTwistLimits { - get => ref _Handle.AsRef(Schema.GetOffset(0x87C487AD95B3EE60)); + get => ref _Handle.AsRef(_ApplyLegTwistLimitsOffset.Value); } + private static readonly Lazy _ApplyFootRotationLimitsOffset = new(() => Schema.GetOffset(0x87C487AD7C3F5AED), LazyThreadSafetyMode.None); + public ref bool ApplyFootRotationLimits { - get => ref _Handle.AsRef(Schema.GetOffset(0x87C487AD7C3F5AED)); + get => ref _Handle.AsRef(_ApplyFootRotationLimitsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootStepTriggerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootStepTriggerImpl.cs index 83bd1291a..b62a4eb60 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootStepTriggerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FootStepTriggerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class FootStepTriggerImpl : SchemaClass, FootStepTrigger { public FootStepTriggerImpl(nint handle) : base(handle) { } + private static readonly Lazy _TagsOffset = new(() => Schema.GetOffset(0xD1D326CDB46C8540), LazyThreadSafetyMode.None); + public ref CUtlVector Tags { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD1D326CDB46C8540)); + get => ref _Handle.AsRef>(_TagsOffset.Value); } + private static readonly Lazy _FootIndexOffset = new(() => Schema.GetOffset(0xD1D326CD67D56BAB), LazyThreadSafetyMode.None); + public ref int FootIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1D326CD67D56BAB)); + get => ref _Handle.AsRef(_FootIndexOffset.Value); } + private static readonly Lazy _TriggerPhaseOffset = new(() => Schema.GetOffset(0xD1D326CD486B84EE), LazyThreadSafetyMode.None); + public ref StepPhase TriggerPhase { - get => ref _Handle.AsRef(Schema.GetOffset(0xD1D326CD486B84EE)); + get => ref _Handle.AsRef(_TriggerPhaseOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FourCovMatrices3Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FourCovMatrices3Impl.cs index 822fcdb90..85f4b5ebe 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FourCovMatrices3Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FourCovMatrices3Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class FourCovMatrices3Impl : SchemaClass, FourCovMatrices3 { public FourCovMatrices3Impl(nint handle) : base(handle) { } + private static readonly Lazy _DiagOffset = new(() => Schema.GetOffset(0xCEA91E487CC0D332), LazyThreadSafetyMode.None); + public ref FourVectors Diag { - get => ref _Handle.AsRef(Schema.GetOffset(0xCEA91E487CC0D332)); + get => ref _Handle.AsRef(_DiagOffset.Value); } + private static readonly Lazy _XYOffset = new(() => Schema.GetOffset(0xCEA91E48A58DC304), LazyThreadSafetyMode.None); + public ref fltx4 XY { - get => ref _Handle.AsRef(Schema.GetOffset(0xCEA91E48A58DC304)); + get => ref _Handle.AsRef(_XYOffset.Value); } + private static readonly Lazy _XZOffset = new(() => Schema.GetOffset(0xCEA91E48A88DC7BD), LazyThreadSafetyMode.None); + public ref fltx4 XZ { - get => ref _Handle.AsRef(Schema.GetOffset(0xCEA91E48A88DC7BD)); + get => ref _Handle.AsRef(_XZOffset.Value); } + private static readonly Lazy _YZOffset = new(() => Schema.GetOffset(0xCEA91E489E8B7968), LazyThreadSafetyMode.None); + public ref fltx4 YZ { - get => ref _Handle.AsRef(Schema.GetOffset(0xCEA91E489E8B7968)); + get => ref _Handle.AsRef(_YZOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FourQuaternionsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FourQuaternionsImpl.cs index ea6794be7..21fe05f9b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FourQuaternionsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FourQuaternionsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class FourQuaternionsImpl : SchemaClass, FourQuaternions { public FourQuaternionsImpl(nint handle) : base(handle) { } + private static readonly Lazy _XOffset = new(() => Schema.GetOffset(0x438DAD7AFD0C5087), LazyThreadSafetyMode.None); + public ref fltx4 X { - get => ref _Handle.AsRef(Schema.GetOffset(0x438DAD7AFD0C5087)); + get => ref _Handle.AsRef(_XOffset.Value); } + private static readonly Lazy _YOffset = new(() => Schema.GetOffset(0x438DAD7AFC0C4EF4), LazyThreadSafetyMode.None); + public ref fltx4 Y { - get => ref _Handle.AsRef(Schema.GetOffset(0x438DAD7AFC0C4EF4)); + get => ref _Handle.AsRef(_YOffset.Value); } + private static readonly Lazy _ZOffset = new(() => Schema.GetOffset(0x438DAD7AFF0C53AD), LazyThreadSafetyMode.None); + public ref fltx4 Z { - get => ref _Handle.AsRef(Schema.GetOffset(0x438DAD7AFF0C53AD)); + get => ref _Handle.AsRef(_ZOffset.Value); } + private static readonly Lazy _WOffset = new(() => Schema.GetOffset(0x438DAD7AF20C3F36), LazyThreadSafetyMode.None); + public ref fltx4 W { - get => ref _Handle.AsRef(Schema.GetOffset(0x438DAD7AF20C3F36)); + get => ref _Handle.AsRef(_WOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FourVectors2DImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FourVectors2DImpl.cs index 4a0bf3e0b..3eaaa2c9c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FourVectors2DImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FourVectors2DImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class FourVectors2DImpl : SchemaClass, FourVectors2D { public FourVectors2DImpl(nint handle) : base(handle) { } + private static readonly Lazy _XOffset = new(() => Schema.GetOffset(0x7A817FA5FD0C5087), LazyThreadSafetyMode.None); + public ref fltx4 X { - get => ref _Handle.AsRef(Schema.GetOffset(0x7A817FA5FD0C5087)); + get => ref _Handle.AsRef(_XOffset.Value); } + private static readonly Lazy _YOffset = new(() => Schema.GetOffset(0x7A817FA5FC0C4EF4), LazyThreadSafetyMode.None); + public ref fltx4 Y { - get => ref _Handle.AsRef(Schema.GetOffset(0x7A817FA5FC0C4EF4)); + get => ref _Handle.AsRef(_YOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FunctionInfo_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FunctionInfo_tImpl.cs index 9ab973f25..feff5b0fc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FunctionInfo_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FunctionInfo_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class FunctionInfo_tImpl : SchemaClass, FunctionInfo_t { public FunctionInfo_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xFCE0933A4D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xFCE0933A4D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xFCE0933A4D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _NameTokenOffset = new(() => Schema.GetOffset(0xFCE0933A9293FEF3), LazyThreadSafetyMode.None); + public ref CUtlStringToken NameToken { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCE0933A9293FEF3)); + get => ref _Handle.AsRef(_NameTokenOffset.Value); } + private static readonly Lazy _ParamCountOffset = new(() => Schema.GetOffset(0xFCE0933ADD5DEEAD), LazyThreadSafetyMode.None); + public ref int ParamCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCE0933ADD5DEEAD)); + get => ref _Handle.AsRef(_ParamCountOffset.Value); } + private static readonly Lazy _IndexOffset = new(() => Schema.GetOffset(0xFCE0933AB73DBE67), LazyThreadSafetyMode.None); + public FuseFunctionIndex_t Index { - get => new FuseFunctionIndex_tImpl(_Handle + Schema.GetOffset(0xFCE0933AB73DBE67)); + get => new FuseFunctionIndex_tImpl(_Handle + _IndexOffset.Value); } + private static readonly Lazy _IsPureOffset = new(() => Schema.GetOffset(0xFCE0933AA5A65B13), LazyThreadSafetyMode.None); + public ref bool IsPure { - get => ref _Handle.AsRef(Schema.GetOffset(0xFCE0933AA5A65B13)); + get => ref _Handle.AsRef(_IsPureOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FuseFunctionIndex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FuseFunctionIndex_tImpl.cs index 637729ba3..2d8f769d9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FuseFunctionIndex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FuseFunctionIndex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class FuseFunctionIndex_tImpl : SchemaClass, FuseFunctionIndex_ public FuseFunctionIndex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x48B825DFDCB0894A), LazyThreadSafetyMode.None); + public ref ushort Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x48B825DFDCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FuseVariableIndex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FuseVariableIndex_tImpl.cs index 9557caac6..59e075060 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/FuseVariableIndex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/FuseVariableIndex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class FuseVariableIndex_tImpl : SchemaClass, FuseVariableIndex_ public FuseVariableIndex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xA039B887DCB0894A), LazyThreadSafetyMode.None); + public ref ushort Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xA039B887DCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/GameAmmoTypeInfo_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/GameAmmoTypeInfo_tImpl.cs index 5ec0fafee..110ee54c5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/GameAmmoTypeInfo_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/GameAmmoTypeInfo_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class GameAmmoTypeInfo_tImpl : AmmoTypeInfo_tImpl, GameAmmoType public GameAmmoTypeInfo_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BuySizeOffset = new(() => Schema.GetOffset(0x64034C7E8E17434E), LazyThreadSafetyMode.None); + public ref int BuySize { - get => ref _Handle.AsRef(Schema.GetOffset(0x64034C7E8E17434E)); + get => ref _Handle.AsRef(_BuySizeOffset.Value); } + private static readonly Lazy _CostOffset = new(() => Schema.GetOffset(0x64034C7E919660C4), LazyThreadSafetyMode.None); + public ref int Cost { - get => ref _Handle.AsRef(Schema.GetOffset(0x64034C7E919660C4)); + get => ref _Handle.AsRef(_CostOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/GameTick_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/GameTick_tImpl.cs index 8608e762d..e306cda47 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/GameTick_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/GameTick_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class GameTick_tImpl : SchemaClass, GameTick_t { public GameTick_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x89A0CF8DDCB0894A), LazyThreadSafetyMode.None); + public ref int Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x89A0CF8DDCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/GameTime_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/GameTime_tImpl.cs index e2f9a2ea3..f4e20e723 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/GameTime_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/GameTime_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class GameTime_tImpl : SchemaClass, GameTime_t { public GameTime_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x1DBEBD4DDCB0894A), LazyThreadSafetyMode.None); + public ref float Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x1DBEBD4DDCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/HSequenceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/HSequenceImpl.cs index bbf1a424e..7d1119f01 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/HSequenceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/HSequenceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class HSequenceImpl : SchemaClass, HSequence { public HSequenceImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x5388CC0EDCB0894A), LazyThreadSafetyMode.None); + public ref int Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x5388CC0EDCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/HitReactFixedSettings_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/HitReactFixedSettings_tImpl.cs index 4e2bb016a..c9adfb4ed 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/HitReactFixedSettings_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/HitReactFixedSettings_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,56 +17,90 @@ internal partial class HitReactFixedSettings_tImpl : SchemaClass, HitReactFixedS public HitReactFixedSettings_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _WeightListIndexOffset = new(() => Schema.GetOffset(0x49C67E6F30288377), LazyThreadSafetyMode.None); + public ref int WeightListIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x49C67E6F30288377)); + get => ref _Handle.AsRef(_WeightListIndexOffset.Value); } + private static readonly Lazy _EffectedBoneCountOffset = new(() => Schema.GetOffset(0x49C67E6F5D78F32A), LazyThreadSafetyMode.None); + public ref int EffectedBoneCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x49C67E6F5D78F32A)); + get => ref _Handle.AsRef(_EffectedBoneCountOffset.Value); } + private static readonly Lazy _MaxImpactForceOffset = new(() => Schema.GetOffset(0x49C67E6F30F6F9AC), LazyThreadSafetyMode.None); + public ref float MaxImpactForce { - get => ref _Handle.AsRef(Schema.GetOffset(0x49C67E6F30F6F9AC)); + get => ref _Handle.AsRef(_MaxImpactForceOffset.Value); } + private static readonly Lazy _MinImpactForceOffset = new(() => Schema.GetOffset(0x49C67E6F0A67F596), LazyThreadSafetyMode.None); + public ref float MinImpactForce { - get => ref _Handle.AsRef(Schema.GetOffset(0x49C67E6F0A67F596)); + get => ref _Handle.AsRef(_MinImpactForceOffset.Value); } + private static readonly Lazy _WhipImpactScaleOffset = new(() => Schema.GetOffset(0x49C67E6FBE9EBA7B), LazyThreadSafetyMode.None); + public ref float WhipImpactScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x49C67E6FBE9EBA7B)); + get => ref _Handle.AsRef(_WhipImpactScaleOffset.Value); } + private static readonly Lazy _CounterRotationScaleOffset = new(() => Schema.GetOffset(0x49C67E6F8F00801B), LazyThreadSafetyMode.None); + public ref float CounterRotationScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x49C67E6F8F00801B)); + get => ref _Handle.AsRef(_CounterRotationScaleOffset.Value); } + private static readonly Lazy _DistanceFadeScaleOffset = new(() => Schema.GetOffset(0x49C67E6FCE3774BC), LazyThreadSafetyMode.None); + public ref float DistanceFadeScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x49C67E6FCE3774BC)); + get => ref _Handle.AsRef(_DistanceFadeScaleOffset.Value); } + private static readonly Lazy _PropagationScaleOffset = new(() => Schema.GetOffset(0x49C67E6F5C590343), LazyThreadSafetyMode.None); + public ref float PropagationScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x49C67E6F5C590343)); + get => ref _Handle.AsRef(_PropagationScaleOffset.Value); } + private static readonly Lazy _WhipDelayOffset = new(() => Schema.GetOffset(0x49C67E6F7E59F654), LazyThreadSafetyMode.None); + public ref float WhipDelay { - get => ref _Handle.AsRef(Schema.GetOffset(0x49C67E6F7E59F654)); + get => ref _Handle.AsRef(_WhipDelayOffset.Value); } + private static readonly Lazy _SpringStrengthOffset = new(() => Schema.GetOffset(0x49C67E6F595D254F), LazyThreadSafetyMode.None); + public ref float SpringStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x49C67E6F595D254F)); + get => ref _Handle.AsRef(_SpringStrengthOffset.Value); } + private static readonly Lazy _WhipSpringStrengthOffset = new(() => Schema.GetOffset(0x49C67E6F149D5369), LazyThreadSafetyMode.None); + public ref float WhipSpringStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x49C67E6F149D5369)); + get => ref _Handle.AsRef(_WhipSpringStrengthOffset.Value); } + private static readonly Lazy _MaxAngleRadiansOffset = new(() => Schema.GetOffset(0x49C67E6F6654A2A4), LazyThreadSafetyMode.None); + public ref float MaxAngleRadians { - get => ref _Handle.AsRef(Schema.GetOffset(0x49C67E6F6654A2A4)); + get => ref _Handle.AsRef(_MaxAngleRadiansOffset.Value); } + private static readonly Lazy _HipBoneIndexOffset = new(() => Schema.GetOffset(0x49C67E6F12FFBC70), LazyThreadSafetyMode.None); + public ref int HipBoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x49C67E6F12FFBC70)); + get => ref _Handle.AsRef(_HipBoneIndexOffset.Value); } + private static readonly Lazy _HipBoneTranslationScaleOffset = new(() => Schema.GetOffset(0x49C67E6F604F4D39), LazyThreadSafetyMode.None); + public ref float HipBoneTranslationScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x49C67E6F604F4D39)); + get => ref _Handle.AsRef(_HipBoneTranslationScaleOffset.Value); } + private static readonly Lazy _HipDipSpringStrengthOffset = new(() => Schema.GetOffset(0x49C67E6F1C148301), LazyThreadSafetyMode.None); + public ref float HipDipSpringStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x49C67E6F1C148301)); + get => ref _Handle.AsRef(_HipDipSpringStrengthOffset.Value); } + private static readonly Lazy _HipDipImpactScaleOffset = new(() => Schema.GetOffset(0x49C67E6F9856E173), LazyThreadSafetyMode.None); + public ref float HipDipImpactScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x49C67E6F9856E173)); + get => ref _Handle.AsRef(_HipDipImpactScaleOffset.Value); } + private static readonly Lazy _HipDipDelayOffset = new(() => Schema.GetOffset(0x49C67E6F8A45177C), LazyThreadSafetyMode.None); + public ref float HipDipDelay { - get => ref _Handle.AsRef(Schema.GetOffset(0x49C67E6F8A45177C)); + get => ref _Handle.AsRef(_HipDipDelayOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/HullFlags_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/HullFlags_tImpl.cs index b706499ff..56bc41a15 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/HullFlags_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/HullFlags_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class HullFlags_tImpl : SchemaClass, HullFlags_t { public HullFlags_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _Hull_HumanOffset = new(() => Schema.GetOffset(0x6601A7BA756C6ED0), LazyThreadSafetyMode.None); + public ref bool Hull_Human { - get => ref _Handle.AsRef(Schema.GetOffset(0x6601A7BA756C6ED0)); + get => ref _Handle.AsRef(_Hull_HumanOffset.Value); } + private static readonly Lazy _Hull_SmallCenteredOffset = new(() => Schema.GetOffset(0x6601A7BAA57EDD5E), LazyThreadSafetyMode.None); + public ref bool Hull_SmallCentered { - get => ref _Handle.AsRef(Schema.GetOffset(0x6601A7BAA57EDD5E)); + get => ref _Handle.AsRef(_Hull_SmallCenteredOffset.Value); } + private static readonly Lazy _Hull_WideHumanOffset = new(() => Schema.GetOffset(0x6601A7BAEA8B5AFD), LazyThreadSafetyMode.None); + public ref bool Hull_WideHuman { - get => ref _Handle.AsRef(Schema.GetOffset(0x6601A7BAEA8B5AFD)); + get => ref _Handle.AsRef(_Hull_WideHumanOffset.Value); } + private static readonly Lazy _Hull_TinyOffset = new(() => Schema.GetOffset(0x6601A7BA637634AD), LazyThreadSafetyMode.None); + public ref bool Hull_Tiny { - get => ref _Handle.AsRef(Schema.GetOffset(0x6601A7BA637634AD)); + get => ref _Handle.AsRef(_Hull_TinyOffset.Value); } + private static readonly Lazy _Hull_MediumOffset = new(() => Schema.GetOffset(0x6601A7BADB23BDB4), LazyThreadSafetyMode.None); + public ref bool Hull_Medium { - get => ref _Handle.AsRef(Schema.GetOffset(0x6601A7BADB23BDB4)); + get => ref _Handle.AsRef(_Hull_MediumOffset.Value); } + private static readonly Lazy _Hull_TinyCenteredOffset = new(() => Schema.GetOffset(0x6601A7BA139ED50D), LazyThreadSafetyMode.None); + public ref bool Hull_TinyCentered { - get => ref _Handle.AsRef(Schema.GetOffset(0x6601A7BA139ED50D)); + get => ref _Handle.AsRef(_Hull_TinyCenteredOffset.Value); } + private static readonly Lazy _Hull_LargeOffset = new(() => Schema.GetOffset(0x6601A7BA11910E06), LazyThreadSafetyMode.None); + public ref bool Hull_Large { - get => ref _Handle.AsRef(Schema.GetOffset(0x6601A7BA11910E06)); + get => ref _Handle.AsRef(_Hull_LargeOffset.Value); } + private static readonly Lazy _Hull_LargeCenteredOffset = new(() => Schema.GetOffset(0x6601A7BAEE04D78A), LazyThreadSafetyMode.None); + public ref bool Hull_LargeCentered { - get => ref _Handle.AsRef(Schema.GetOffset(0x6601A7BAEE04D78A)); + get => ref _Handle.AsRef(_Hull_LargeCenteredOffset.Value); } + private static readonly Lazy _Hull_MediumTallOffset = new(() => Schema.GetOffset(0x6601A7BA332567D3), LazyThreadSafetyMode.None); + public ref bool Hull_MediumTall { - get => ref _Handle.AsRef(Schema.GetOffset(0x6601A7BA332567D3)); + get => ref _Handle.AsRef(_Hull_MediumTallOffset.Value); } + private static readonly Lazy _Hull_SmallOffset = new(() => Schema.GetOffset(0x6601A7BA86608A2A), LazyThreadSafetyMode.None); + public ref bool Hull_Small { - get => ref _Handle.AsRef(Schema.GetOffset(0x6601A7BA86608A2A)); + get => ref _Handle.AsRef(_Hull_SmallOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IChoreoServicesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IChoreoServicesImpl.cs index 49e5554c0..e6cd5b31f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IChoreoServicesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IChoreoServicesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IEconItemInterfaceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IEconItemInterfaceImpl.cs index 3fd415742..5f05e1cf6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IEconItemInterfaceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IEconItemInterfaceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IHasAttributesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IHasAttributesImpl.cs index 0106eb833..d61a3aa12 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IHasAttributesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IHasAttributesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IKBoneNameAndIndex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IKBoneNameAndIndex_tImpl.cs index cb81713c4..ea53de9ef 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IKBoneNameAndIndex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IKBoneNameAndIndex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class IKBoneNameAndIndex_tImpl : SchemaClass, IKBoneNameAndInde public IKBoneNameAndIndex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xEDEB678CAE8A266), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xEDEB678CAE8A266)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xEDEB678CAE8A266, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IKDemoCaptureSettings_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IKDemoCaptureSettings_tImpl.cs index 5230cd518..2534b28eb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IKDemoCaptureSettings_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IKDemoCaptureSettings_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,36 +17,46 @@ internal partial class IKDemoCaptureSettings_tImpl : SchemaClass, IKDemoCaptureS public IKDemoCaptureSettings_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParentBoneNameOffset = new(() => Schema.GetOffset(0x6D63001A95A4F804), LazyThreadSafetyMode.None); + public string ParentBoneName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6D63001A95A4F804)); + var ptr = _Handle.Read(_ParentBoneNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6D63001A95A4F804, value); + set => Schema.SetString(_Handle, _ParentBoneNameOffset.Value, value); } + private static readonly Lazy _ModeOffset = new(() => Schema.GetOffset(0x6D63001A1050A633), LazyThreadSafetyMode.None); + public ref IKChannelMode Mode { - get => ref _Handle.AsRef(Schema.GetOffset(0x6D63001A1050A633)); + get => ref _Handle.AsRef(_ModeOffset.Value); } + private static readonly Lazy _IkChainNameOffset = new(() => Schema.GetOffset(0x6D63001A50E152ED), LazyThreadSafetyMode.None); + public string IkChainName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6D63001A50E152ED)); + var ptr = _Handle.Read(_IkChainNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6D63001A50E152ED, value); + set => Schema.SetString(_Handle, _IkChainNameOffset.Value, value); } + private static readonly Lazy _OneBoneStartOffset = new(() => Schema.GetOffset(0x6D63001A95ADD82F), LazyThreadSafetyMode.None); + public string OneBoneStart { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6D63001A95ADD82F)); + var ptr = _Handle.Read(_OneBoneStartOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6D63001A95ADD82F, value); + set => Schema.SetString(_Handle, _OneBoneStartOffset.Value, value); } + private static readonly Lazy _OneBoneEndOffset = new(() => Schema.GetOffset(0x6D63001AE57D0DBA), LazyThreadSafetyMode.None); + public string OneBoneEnd { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6D63001AE57D0DBA)); + var ptr = _Handle.Read(_OneBoneEndOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6D63001AE57D0DBA, value); + set => Schema.SetString(_Handle, _OneBoneEndOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IKSolverSettings_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IKSolverSettings_tImpl.cs index d4c7c3d57..0a45bd0ec 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IKSolverSettings_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IKSolverSettings_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class IKSolverSettings_tImpl : SchemaClass, IKSolverSettings_t public IKSolverSettings_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SolverTypeOffset = new(() => Schema.GetOffset(0x368DC59819CA61B6), LazyThreadSafetyMode.None); + public ref IKSolverType SolverType { - get => ref _Handle.AsRef(Schema.GetOffset(0x368DC59819CA61B6)); + get => ref _Handle.AsRef(_SolverTypeOffset.Value); } + private static readonly Lazy _NumIterationsOffset = new(() => Schema.GetOffset(0x368DC59878BB0057), LazyThreadSafetyMode.None); + public ref int NumIterations { - get => ref _Handle.AsRef(Schema.GetOffset(0x368DC59878BB0057)); + get => ref _Handle.AsRef(_NumIterationsOffset.Value); } + private static readonly Lazy _EndEffectorRotationFixUpModeOffset = new(() => Schema.GetOffset(0x368DC5980B45E281), LazyThreadSafetyMode.None); + public ref EIKEndEffectorRotationFixUpMode EndEffectorRotationFixUpMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x368DC5980B45E281)); + get => ref _Handle.AsRef(_EndEffectorRotationFixUpModeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IKTargetSettings_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IKTargetSettings_tImpl.cs index 2f6487f8a..12c5150db 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IKTargetSettings_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IKTargetSettings_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class IKTargetSettings_tImpl : SchemaClass, IKTargetSettings_t public IKTargetSettings_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetSourceOffset = new(() => Schema.GetOffset(0xE4055546D23809BD), LazyThreadSafetyMode.None); + public ref IKTargetSource TargetSource { - get => ref _Handle.AsRef(Schema.GetOffset(0xE4055546D23809BD)); + get => ref _Handle.AsRef(_TargetSourceOffset.Value); } + private static readonly Lazy _BoneOffset = new(() => Schema.GetOffset(0xE4055546193FC60F), LazyThreadSafetyMode.None); + public IKBoneNameAndIndex_t Bone { - get => new IKBoneNameAndIndex_tImpl(_Handle + Schema.GetOffset(0xE4055546193FC60F)); + get => new IKBoneNameAndIndex_tImpl(_Handle + _BoneOffset.Value); } + private static readonly Lazy _AnimgraphParameterNamePositionOffset = new(() => Schema.GetOffset(0xE4055546D9047CE3), LazyThreadSafetyMode.None); + public AnimParamID AnimgraphParameterNamePosition { - get => new AnimParamIDImpl(_Handle + Schema.GetOffset(0xE4055546D9047CE3)); + get => new AnimParamIDImpl(_Handle + _AnimgraphParameterNamePositionOffset.Value); } + private static readonly Lazy _AnimgraphParameterNameOrientationOffset = new(() => Schema.GetOffset(0xE4055546C162E1CA), LazyThreadSafetyMode.None); + public AnimParamID AnimgraphParameterNameOrientation { - get => new AnimParamIDImpl(_Handle + Schema.GetOffset(0xE4055546C162E1CA)); + get => new AnimParamIDImpl(_Handle + _AnimgraphParameterNameOrientationOffset.Value); } + private static readonly Lazy _TargetCoordSystemOffset = new(() => Schema.GetOffset(0xE40555469BF14938), LazyThreadSafetyMode.None); + public ref IKTargetCoordinateSystem TargetCoordSystem { - get => ref _Handle.AsRef(Schema.GetOffset(0xE40555469BF14938)); + get => ref _Handle.AsRef(_TargetCoordSystemOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IParticleCollectionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IParticleCollectionImpl.cs index 90f1d5716..9a28f813b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IParticleCollectionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IParticleCollectionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IParticleEffectImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IParticleEffectImpl.cs index 59fa8856a..2678b9873 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IParticleEffectImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IParticleEffectImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IParticleSystemDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IParticleSystemDefinitionImpl.cs index 08bbf9eba..45cb31f0c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IParticleSystemDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IParticleSystemDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IPhysicsPlayerControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IPhysicsPlayerControllerImpl.cs index 38325321a..370874c94 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IPhysicsPlayerControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IPhysicsPlayerControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IRagdollImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IRagdollImpl.cs index 93f72c400..d872a5434 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IRagdollImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IRagdollImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ISkeletonAnimationControllerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ISkeletonAnimationControllerImpl.cs index 04ed3c073..4c3fc929d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ISkeletonAnimationControllerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ISkeletonAnimationControllerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCAnimDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCAnimDataImpl.cs index f1f90a77f..5030862b7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCAnimDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCAnimDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCAnimationGroupImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCAnimationGroupImpl.cs index d4b530fd5..019542d80 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCAnimationGroupImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCAnimationGroupImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCCSGOEconItemImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCCSGOEconItemImpl.cs index d61044761..67fb6f803 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCCSGOEconItemImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCCSGOEconItemImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCChoreoSceneFileListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCChoreoSceneFileListImpl.cs index e8d6f7624..a9f5cd171 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCChoreoSceneFileListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCChoreoSceneFileListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCChoreoSceneResourceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCChoreoSceneResourceImpl.cs index ee2cfa21a..618f7de8a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCChoreoSceneResourceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCChoreoSceneResourceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCCompositeMaterialKitImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCCompositeMaterialKitImpl.cs index 5aac94848..abb511825 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCCompositeMaterialKitImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCCompositeMaterialKitImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCDOTANovelsListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCDOTANovelsListImpl.cs index 4d0c8f96b..8fff6aa2e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCDOTANovelsListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCDOTANovelsListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCDOTAPatchNotesListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCDOTAPatchNotesListImpl.cs index 52a9388bb..453beff4b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCDOTAPatchNotesListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCDOTAPatchNotesListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCDotaItemDefinitionResourceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCDotaItemDefinitionResourceImpl.cs index c63dc2566..fb3322d4b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCDotaItemDefinitionResourceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCDotaItemDefinitionResourceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCEntityLumpImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCEntityLumpImpl.cs index 59d5e359b..7fd384b3b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCEntityLumpImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCEntityLumpImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCGcExportableExternalDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCGcExportableExternalDataImpl.cs index 57e57e4ac..c14d82ace 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCGcExportableExternalDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCGcExportableExternalDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCJavaScriptResourceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCJavaScriptResourceImpl.cs index 01386f72c..cdc7a3add 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCJavaScriptResourceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCJavaScriptResourceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCModelImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCModelImpl.cs index 4279f05ad..d3a7d5d5a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCModelImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCModelImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCMorphSetDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCMorphSetDataImpl.cs index 36db0cd6f..a84dfcfd6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCMorphSetDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCMorphSetDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCNmClipImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCNmClipImpl.cs index 9975ea750..64878a033 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCNmClipImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCNmClipImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCNmGraphDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCNmGraphDefinitionImpl.cs index 531fee845..75c82dbe9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCNmGraphDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCNmGraphDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCNmIKRigImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCNmIKRigImpl.cs index ef090fa00..8910b1b8f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCNmIKRigImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCNmIKRigImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCNmSkeletonImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCNmSkeletonImpl.cs index 4d835a75f..ec8c7158b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCNmSkeletonImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCNmSkeletonImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPanoramaDynamicImagesImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPanoramaDynamicImagesImpl.cs index 8d8b327fc..6365cc648 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPanoramaDynamicImagesImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPanoramaDynamicImagesImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPanoramaLayoutImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPanoramaLayoutImpl.cs index 21055b5c7..b9d94ec0d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPanoramaLayoutImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPanoramaLayoutImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPanoramaStyleImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPanoramaStyleImpl.cs index 2836ca6f4..83cafa2a1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPanoramaStyleImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPanoramaStyleImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPhysAggregateDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPhysAggregateDataImpl.cs index 11a9ea9fe..5b3585ff9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPhysAggregateDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPhysAggregateDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPostProcessingResourceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPostProcessingResourceImpl.cs index 0c4f96dea..9455c9ab1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPostProcessingResourceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCPostProcessingResourceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCRenderMeshImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCRenderMeshImpl.cs index 3e0ac5400..4acbf4932 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCRenderMeshImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCRenderMeshImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCResourceManifestInternalImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCResourceManifestInternalImpl.cs index 8084c1dd3..c273b85d0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCResourceManifestInternalImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCResourceManifestInternalImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCResponseRulesListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCResponseRulesListImpl.cs index c8db9cb3c..2e63a3e97 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCResponseRulesListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCResponseRulesListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCSequenceGroupDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCSequenceGroupDataImpl.cs index 84220c146..e12e2f896 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCSequenceGroupDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCSequenceGroupDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCSmartPropImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCSmartPropImpl.cs index 8bb6c9e80..a99b0c53d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCSmartPropImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCSmartPropImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCSurfaceGraphImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCSurfaceGraphImpl.cs index af6351662..92151a014 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCSurfaceGraphImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCSurfaceGraphImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCTestResourceDataImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCTestResourceDataImpl.cs index 8813d1340..2638da7cc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCTestResourceDataImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCTestResourceDataImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCTextureBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCTextureBaseImpl.cs index 3a8a5b3e4..3273337d4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCTextureBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCTextureBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCTypeScriptResourceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCTypeScriptResourceImpl.cs index 20501adae..eb06a597b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCTypeScriptResourceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCTypeScriptResourceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVDataResourceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVDataResourceImpl.cs index 9f1a84317..0e03ed0bc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVDataResourceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVDataResourceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVMixListResourceImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVMixListResourceImpl.cs index fc2210b57..9ebbb70d2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVMixListResourceImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVMixListResourceImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVPhysXSurfacePropertiesListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVPhysXSurfacePropertiesListImpl.cs index 7b6e901c8..3a41673fc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVPhysXSurfacePropertiesListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVPhysXSurfacePropertiesListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVSoundEventScriptListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVSoundEventScriptListImpl.cs index 350b3e436..7122547ab 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVSoundEventScriptListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVSoundEventScriptListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVSoundStackScriptListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVSoundStackScriptListImpl.cs index cbd392018..41d56c774 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVSoundStackScriptListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVSoundStackScriptListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVoiceContainerBaseImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVoiceContainerBaseImpl.cs index a91e7f419..6d9395fea 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVoiceContainerBaseImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVoiceContainerBaseImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVoxelVisibilityImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVoxelVisibilityImpl.cs index d2da4bccb..d51d144f2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVoxelVisibilityImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCVoxelVisibilityImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCWorldNodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCWorldNodeImpl.cs index 25b9e7f9d..63c28aed0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCWorldNodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeCWorldNodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIAnimGraphModelBindingImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIAnimGraphModelBindingImpl.cs index 5c921f0ec..f17d8d13f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIAnimGraphModelBindingImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIAnimGraphModelBindingImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIMaterial2Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIMaterial2Impl.cs index f352aeebb..d4713dd4d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIMaterial2Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIMaterial2Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIParticleSnapshotImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIParticleSnapshotImpl.cs index 57690ed6d..5c3817721 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIParticleSnapshotImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIParticleSnapshotImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIParticleSystemDefinitionImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIParticleSystemDefinitionImpl.cs index 9092b4988..707ffc914 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIParticleSystemDefinitionImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIParticleSystemDefinitionImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIPulseGraphDefImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIPulseGraphDefImpl.cs index 61d00668f..883cb583e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIPulseGraphDefImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIPulseGraphDefImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIVectorGraphicImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIVectorGraphicImpl.cs index 318b10b45..10f1bbdbd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIVectorGraphicImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeIVectorGraphicImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeManifestTestResource_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeManifestTestResource_tImpl.cs index 6d0802fb3..797143667 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeManifestTestResource_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeManifestTestResource_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeProceduralTestResource_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeProceduralTestResource_tImpl.cs index 62f09a95e..b16179e45 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeProceduralTestResource_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeProceduralTestResource_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeVMapResourceData_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeVMapResourceData_tImpl.cs index 85d580286..6c9a5e2b0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeVMapResourceData_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeVMapResourceData_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeWorld_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeWorld_tImpl.cs index 13077304b..d26f7afd4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeWorld_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/InfoForResourceTypeWorld_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IntervalTimerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IntervalTimerImpl.cs index bcf30f01b..602419894 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/IntervalTimerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/IntervalTimerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class IntervalTimerImpl : SchemaClass, IntervalTimer { public IntervalTimerImpl(nint handle) : base(handle) { } + private static readonly Lazy _TimestampOffset = new(() => Schema.GetOffset(0x8FD39659B6C56F43), LazyThreadSafetyMode.None); + public GameTime_t Timestamp { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8FD39659B6C56F43)); + get => new GameTime_tImpl(_Handle + _TimestampOffset.Value); } + private static readonly Lazy _WorldGroupIdOffset = new(() => Schema.GetOffset(0x8FD396597414B193), LazyThreadSafetyMode.None); + public ref uint WorldGroupId { - get => ref _Handle.AsRef(Schema.GetOffset(0x8FD396597414B193)); + get => ref _Handle.AsRef(_WorldGroupIdOffset.Value); } public void TimestampUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/JiggleBoneSettingsList_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/JiggleBoneSettingsList_tImpl.cs index ceab3c2e2..0ba0bf595 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/JiggleBoneSettingsList_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/JiggleBoneSettingsList_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class JiggleBoneSettingsList_tImpl : SchemaClass, JiggleBoneSet public JiggleBoneSettingsList_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneSettingsOffset = new(() => Schema.GetOffset(0xD234E39D689AEBE2), LazyThreadSafetyMode.None); + public ref CUtlVector BoneSettings { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD234E39D689AEBE2)); + get => ref _Handle.AsRef>(_BoneSettingsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/JiggleBoneSettings_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/JiggleBoneSettings_tImpl.cs index bb2863293..d54e87686 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/JiggleBoneSettings_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/JiggleBoneSettings_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class JiggleBoneSettings_tImpl : SchemaClass, JiggleBoneSetting public JiggleBoneSettings_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneIndexOffset = new(() => Schema.GetOffset(0xBEFF05219F407B79), LazyThreadSafetyMode.None); + public ref int BoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xBEFF05219F407B79)); + get => ref _Handle.AsRef(_BoneIndexOffset.Value); } + private static readonly Lazy _SpringStrengthOffset = new(() => Schema.GetOffset(0xBEFF0521595D254F), LazyThreadSafetyMode.None); + public ref float SpringStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0xBEFF0521595D254F)); + get => ref _Handle.AsRef(_SpringStrengthOffset.Value); } + private static readonly Lazy _MaxTimeStepOffset = new(() => Schema.GetOffset(0xBEFF052177D1E0C4), LazyThreadSafetyMode.None); + public ref float MaxTimeStep { - get => ref _Handle.AsRef(Schema.GetOffset(0xBEFF052177D1E0C4)); + get => ref _Handle.AsRef(_MaxTimeStepOffset.Value); } + private static readonly Lazy _DampingOffset = new(() => Schema.GetOffset(0xBEFF0521AAC624EB), LazyThreadSafetyMode.None); + public ref float Damping { - get => ref _Handle.AsRef(Schema.GetOffset(0xBEFF0521AAC624EB)); + get => ref _Handle.AsRef(_DampingOffset.Value); } + private static readonly Lazy _BoundsMaxLSOffset = new(() => Schema.GetOffset(0xBEFF0521ABADA913), LazyThreadSafetyMode.None); + public ref Vector BoundsMaxLS { - get => ref _Handle.AsRef(Schema.GetOffset(0xBEFF0521ABADA913)); + get => ref _Handle.AsRef(_BoundsMaxLSOffset.Value); } + private static readonly Lazy _BoundsMinLSOffset = new(() => Schema.GetOffset(0xBEFF0521FF607855), LazyThreadSafetyMode.None); + public ref Vector BoundsMinLS { - get => ref _Handle.AsRef(Schema.GetOffset(0xBEFF0521FF607855)); + get => ref _Handle.AsRef(_BoundsMinLSOffset.Value); } + private static readonly Lazy _SimSpaceOffset = new(() => Schema.GetOffset(0xBEFF052186872533), LazyThreadSafetyMode.None); + public ref JiggleBoneSimSpace SimSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0xBEFF052186872533)); + get => ref _Handle.AsRef(_SimSpaceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/LookAtBone_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/LookAtBone_tImpl.cs index d0c86d57a..53d50a35c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/LookAtBone_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/LookAtBone_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class LookAtBone_tImpl : SchemaClass, LookAtBone_t { public LookAtBone_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _IndexOffset = new(() => Schema.GetOffset(0x25E8B58A491963CB), LazyThreadSafetyMode.None); + public ref int Index { - get => ref _Handle.AsRef(Schema.GetOffset(0x25E8B58A491963CB)); + get => ref _Handle.AsRef(_IndexOffset.Value); } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0x25E8B58A07D0CD59), LazyThreadSafetyMode.None); + public ref float Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0x25E8B58A07D0CD59)); + get => ref _Handle.AsRef(_WeightOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/LookAtOpFixedSettings_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/LookAtOpFixedSettings_tImpl.cs index e42d441ab..6314a0543 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/LookAtOpFixedSettings_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/LookAtOpFixedSettings_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class LookAtOpFixedSettings_tImpl : SchemaClass, LookAtOpFixedS public LookAtOpFixedSettings_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _AttachmentOffset = new(() => Schema.GetOffset(0xF114BD602C5CA308), LazyThreadSafetyMode.None); + public CAnimAttachment Attachment { - get => new CAnimAttachmentImpl(_Handle + Schema.GetOffset(0xF114BD602C5CA308)); + get => new CAnimAttachmentImpl(_Handle + _AttachmentOffset.Value); } + private static readonly Lazy _DampingOffset = new(() => Schema.GetOffset(0xF114BD6015440FB5), LazyThreadSafetyMode.None); + public CAnimInputDamping Damping { - get => new CAnimInputDampingImpl(_Handle + Schema.GetOffset(0xF114BD6015440FB5)); + get => new CAnimInputDampingImpl(_Handle + _DampingOffset.Value); } + private static readonly Lazy _BonesOffset = new(() => Schema.GetOffset(0xF114BD600FDA60D4), LazyThreadSafetyMode.None); + public ref CUtlVector Bones { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF114BD600FDA60D4)); + get => ref _Handle.AsRef>(_BonesOffset.Value); } + private static readonly Lazy _YawLimitOffset = new(() => Schema.GetOffset(0xF114BD60C8DE6E19), LazyThreadSafetyMode.None); + public ref float YawLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0xF114BD60C8DE6E19)); + get => ref _Handle.AsRef(_YawLimitOffset.Value); } + private static readonly Lazy _PitchLimitOffset = new(() => Schema.GetOffset(0xF114BD60A68363C6), LazyThreadSafetyMode.None); + public ref float PitchLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0xF114BD60A68363C6)); + get => ref _Handle.AsRef(_PitchLimitOffset.Value); } + private static readonly Lazy _HysteresisInnerAngleOffset = new(() => Schema.GetOffset(0xF114BD6097B2D677), LazyThreadSafetyMode.None); + public ref float HysteresisInnerAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0xF114BD6097B2D677)); + get => ref _Handle.AsRef(_HysteresisInnerAngleOffset.Value); } + private static readonly Lazy _HysteresisOuterAngleOffset = new(() => Schema.GetOffset(0xF114BD60F67403AE), LazyThreadSafetyMode.None); + public ref float HysteresisOuterAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0xF114BD60F67403AE)); + get => ref _Handle.AsRef(_HysteresisOuterAngleOffset.Value); } + private static readonly Lazy _RotateYawForwardOffset = new(() => Schema.GetOffset(0xF114BD6058C8E372), LazyThreadSafetyMode.None); + public ref bool RotateYawForward { - get => ref _Handle.AsRef(Schema.GetOffset(0xF114BD6058C8E372)); + get => ref _Handle.AsRef(_RotateYawForwardOffset.Value); } + private static readonly Lazy _MaintainUpDirectionOffset = new(() => Schema.GetOffset(0xF114BD601F5BE57E), LazyThreadSafetyMode.None); + public ref bool MaintainUpDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0xF114BD601F5BE57E)); + get => ref _Handle.AsRef(_MaintainUpDirectionOffset.Value); } + private static readonly Lazy _TargetIsPositionOffset = new(() => Schema.GetOffset(0xF114BD6014C34163), LazyThreadSafetyMode.None); + public ref bool TargetIsPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0xF114BD6014C34163)); + get => ref _Handle.AsRef(_TargetIsPositionOffset.Value); } + private static readonly Lazy _UseHysteresisOffset = new(() => Schema.GetOffset(0xF114BD60A1B392FB), LazyThreadSafetyMode.None); + public ref bool UseHysteresis { - get => ref _Handle.AsRef(Schema.GetOffset(0xF114BD60A1B392FB)); + get => ref _Handle.AsRef(_UseHysteresisOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ManifestTestResource_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ManifestTestResource_tImpl.cs index 0f1edbcfd..189deac4e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ManifestTestResource_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ManifestTestResource_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class ManifestTestResource_tImpl : SchemaClass, ManifestTestRes public ManifestTestResource_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xFF18C79F4D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xFF18C79F4D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xFF18C79F4D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _ChildOffset = new(() => Schema.GetOffset(0xFF18C79F2827B07D), LazyThreadSafetyMode.None); + public ref CStrongHandle Child { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFF18C79F2827B07D)); + get => ref _Handle.AsRef>(_ChildOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialGroup_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialGroup_tImpl.cs index 42b4a525c..618aff05e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialGroup_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialGroup_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class MaterialGroup_tImpl : SchemaClass, MaterialGroup_t { public MaterialGroup_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x702431604D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x702431604D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x702431604D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _MaterialsOffset = new(() => Schema.GetOffset(0x7024316060E46909), LazyThreadSafetyMode.None); + public ref CUtlVector> Materials { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x7024316060E46909)); + get => ref _Handle.AsRef>>(_MaterialsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialOverride_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialOverride_tImpl.cs index 0d98b9f57..c62fee7a5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialOverride_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialOverride_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class MaterialOverride_tImpl : BaseSceneObjectOverride_tImpl, M public MaterialOverride_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SubSceneObjectOffset = new(() => Schema.GetOffset(0xFB7BFECB55C3CCBC), LazyThreadSafetyMode.None); + public ref uint SubSceneObject { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB7BFECB55C3CCBC)); + get => ref _Handle.AsRef(_SubSceneObjectOffset.Value); } + private static readonly Lazy _DrawCallIndexOffset = new(() => Schema.GetOffset(0xFB7BFECBFA5614D5), LazyThreadSafetyMode.None); + public ref uint DrawCallIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB7BFECBFA5614D5)); + get => ref _Handle.AsRef(_DrawCallIndexOffset.Value); } + private static readonly Lazy _MaterialOffset = new(() => Schema.GetOffset(0xFB7BFECB972B1076), LazyThreadSafetyMode.None); + public ref CStrongHandle Material { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFB7BFECB972B1076)); + get => ref _Handle.AsRef>(_MaterialOffset.Value); } + private static readonly Lazy _LinearTintColorOffset = new(() => Schema.GetOffset(0xFB7BFECB6901D28C), LazyThreadSafetyMode.None); + public ref Vector LinearTintColor { - get => ref _Handle.AsRef(Schema.GetOffset(0xFB7BFECB6901D28C)); + get => ref _Handle.AsRef(_LinearTintColorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamBuffer_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamBuffer_tImpl.cs index f753c28f2..9302a43cd 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamBuffer_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamBuffer_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class MaterialParamBuffer_tImpl : MaterialParam_tImpl, Material public MaterialParamBuffer_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x90FFBDB46B99AEEA), LazyThreadSafetyMode.None); + public ref CUtlBinaryBlock Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x90FFBDB46B99AEEA)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamFloat_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamFloat_tImpl.cs index 4cce9bde4..e224050b9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamFloat_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamFloat_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class MaterialParamFloat_tImpl : MaterialParam_tImpl, MaterialP public MaterialParamFloat_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xB6A452E28DFCB984), LazyThreadSafetyMode.None); + public ref float Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xB6A452E28DFCB984)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamInt_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamInt_tImpl.cs index 1116e9fb3..f4a7efaf6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamInt_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamInt_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class MaterialParamInt_tImpl : MaterialParam_tImpl, MaterialPar public MaterialParamInt_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xD2910839077D337E), LazyThreadSafetyMode.None); + public ref int Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xD2910839077D337E)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamString_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamString_tImpl.cs index 25abcc8f3..3e7e13f08 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamString_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamString_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class MaterialParamString_tImpl : MaterialParam_tImpl, Material public MaterialParamString_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xDB5EB0676B99AEEA), LazyThreadSafetyMode.None); + public string Value { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDB5EB0676B99AEEA)); + var ptr = _Handle.Read(_ValueOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDB5EB0676B99AEEA, value); + set => Schema.SetString(_Handle, _ValueOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamTexture_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamTexture_tImpl.cs index fc969a362..c20ba8ad6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamTexture_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamTexture_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class MaterialParamTexture_tImpl : MaterialParam_tImpl, Materia public MaterialParamTexture_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x17803E3B7F437844), LazyThreadSafetyMode.None); + public ref CStrongHandle Value { - get => ref _Handle.AsRef>(Schema.GetOffset(0x17803E3B7F437844)); + get => ref _Handle.AsRef>(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamVector_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamVector_tImpl.cs index 6e1852fc2..85f77a35a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamVector_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParamVector_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class MaterialParamVector_tImpl : MaterialParam_tImpl, Material public MaterialParamVector_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xC82210956B99AEEA), LazyThreadSafetyMode.None); + public ref Vector4D Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xC82210956B99AEEA)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParam_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParam_tImpl.cs index 4ed5f49a7..1ecce3aa5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParam_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialParam_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,12 +17,14 @@ internal partial class MaterialParam_tImpl : SchemaClass, MaterialParam_t { public MaterialParam_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x81EE845A4D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x81EE845A4D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x81EE845A4D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialResourceData_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialResourceData_tImpl.cs index 41f26b487..478d0bba9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialResourceData_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialResourceData_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,55 +17,83 @@ internal partial class MaterialResourceData_tImpl : SchemaClass, MaterialResourc public MaterialResourceData_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaterialNameOffset = new(() => Schema.GetOffset(0xA8F70097AF8795A3), LazyThreadSafetyMode.None); + public string MaterialName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA8F70097AF8795A3)); + var ptr = _Handle.Read(_MaterialNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA8F70097AF8795A3, value); + set => Schema.SetString(_Handle, _MaterialNameOffset.Value, value); } + private static readonly Lazy _ShaderNameOffset = new(() => Schema.GetOffset(0xA8F70097F8B3D7CB), LazyThreadSafetyMode.None); + public string ShaderName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA8F70097F8B3D7CB)); + var ptr = _Handle.Read(_ShaderNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA8F70097F8B3D7CB, value); + set => Schema.SetString(_Handle, _ShaderNameOffset.Value, value); } + private static readonly Lazy _IntParamsOffset = new(() => Schema.GetOffset(0xA8F7009783517144), LazyThreadSafetyMode.None); + public ref CUtlVector IntParams { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F7009783517144)); + get => ref _Handle.AsRef>(_IntParamsOffset.Value); } + private static readonly Lazy _FloatParamsOffset = new(() => Schema.GetOffset(0xA8F70097E6B01113), LazyThreadSafetyMode.None); + public ref CUtlVector FloatParams { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F70097E6B01113)); + get => ref _Handle.AsRef>(_FloatParamsOffset.Value); } + private static readonly Lazy _VectorParamsOffset = new(() => Schema.GetOffset(0xA8F70097FA0211E0), LazyThreadSafetyMode.None); + public ref CUtlVector VectorParams { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F70097FA0211E0)); + get => ref _Handle.AsRef>(_VectorParamsOffset.Value); } + private static readonly Lazy _TextureParamsOffset = new(() => Schema.GetOffset(0xA8F70097E53114F2), LazyThreadSafetyMode.None); + public ref CUtlVector TextureParams { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F70097E53114F2)); + get => ref _Handle.AsRef>(_TextureParamsOffset.Value); } + private static readonly Lazy _DynamicParamsOffset = new(() => Schema.GetOffset(0xA8F70097CC06B734), LazyThreadSafetyMode.None); + public ref CUtlVector DynamicParams { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F70097CC06B734)); + get => ref _Handle.AsRef>(_DynamicParamsOffset.Value); } + private static readonly Lazy _DynamicTextureParamsOffset = new(() => Schema.GetOffset(0xA8F70097A1DB64A7), LazyThreadSafetyMode.None); + public ref CUtlVector DynamicTextureParams { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F70097A1DB64A7)); + get => ref _Handle.AsRef>(_DynamicTextureParamsOffset.Value); } + private static readonly Lazy _IntAttributesOffset = new(() => Schema.GetOffset(0xA8F700974510A3FB), LazyThreadSafetyMode.None); + public ref CUtlVector IntAttributes { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F700974510A3FB)); + get => ref _Handle.AsRef>(_IntAttributesOffset.Value); } + private static readonly Lazy _FloatAttributesOffset = new(() => Schema.GetOffset(0xA8F70097D7D0F554), LazyThreadSafetyMode.None); + public ref CUtlVector FloatAttributes { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F70097D7D0F554)); + get => ref _Handle.AsRef>(_FloatAttributesOffset.Value); } + private static readonly Lazy _VectorAttributesOffset = new(() => Schema.GetOffset(0xA8F70097FDB43687), LazyThreadSafetyMode.None); + public ref CUtlVector VectorAttributes { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F70097FDB43687)); + get => ref _Handle.AsRef>(_VectorAttributesOffset.Value); } + private static readonly Lazy _TextureAttributesOffset = new(() => Schema.GetOffset(0xA8F70097417A5705), LazyThreadSafetyMode.None); + public ref CUtlVector TextureAttributes { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F70097417A5705)); + get => ref _Handle.AsRef>(_TextureAttributesOffset.Value); } + private static readonly Lazy _StringAttributesOffset = new(() => Schema.GetOffset(0xA8F700973452D511), LazyThreadSafetyMode.None); + public ref CUtlVector StringAttributes { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F700973452D511)); + get => ref _Handle.AsRef>(_StringAttributesOffset.Value); } + private static readonly Lazy _RenderAttributesUsedOffset = new(() => Schema.GetOffset(0xA8F700979CB01DD9), LazyThreadSafetyMode.None); + public ref CUtlVector RenderAttributesUsed { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA8F700979CB01DD9)); + get => ref _Handle.AsRef>(_RenderAttributesUsedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialVariable_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialVariable_tImpl.cs index c37f3d4e1..8687a08ff 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialVariable_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MaterialVariable_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class MaterialVariable_tImpl : SchemaClass, MaterialVariable_t public MaterialVariable_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _StrVariableOffset = new(() => Schema.GetOffset(0xCACB71DBA52C3390), LazyThreadSafetyMode.None); + public string StrVariable { get { - var ptr = _Handle.Read(Schema.GetOffset(0xCACB71DBA52C3390)); + var ptr = _Handle.Read(_StrVariableOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xCACB71DBA52C3390, value); + set => Schema.SetString(_Handle, _StrVariableOffset.Value, value); } + private static readonly Lazy _VariableFieldOffset = new(() => Schema.GetOffset(0xCACB71DBF868E9B3), LazyThreadSafetyMode.None); + public ParticleAttributeIndex_t VariableField { - get => new ParticleAttributeIndex_tImpl(_Handle + Schema.GetOffset(0xCACB71DBF868E9B3)); + get => new ParticleAttributeIndex_tImpl(_Handle + _VariableFieldOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0xCACB71DBB731A42F), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0xCACB71DBB731A42F)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelBoneFlexDriverControl_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelBoneFlexDriverControl_tImpl.cs index 0f058ecac..9727f46cb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelBoneFlexDriverControl_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelBoneFlexDriverControl_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class ModelBoneFlexDriverControl_tImpl : SchemaClass, ModelBone public ModelBoneFlexDriverControl_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneComponentOffset = new(() => Schema.GetOffset(0x7DDCB3413C2E9E9E), LazyThreadSafetyMode.None); + public ref ModelBoneFlexComponent_t BoneComponent { - get => ref _Handle.AsRef(Schema.GetOffset(0x7DDCB3413C2E9E9E)); + get => ref _Handle.AsRef(_BoneComponentOffset.Value); } + private static readonly Lazy _FlexControllerOffset = new(() => Schema.GetOffset(0x7DDCB341EDF88AAA), LazyThreadSafetyMode.None); + public string FlexController { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7DDCB341EDF88AAA)); + var ptr = _Handle.Read(_FlexControllerOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7DDCB341EDF88AAA, value); + set => Schema.SetString(_Handle, _FlexControllerOffset.Value, value); } + private static readonly Lazy _FlexControllerTokenOffset = new(() => Schema.GetOffset(0x7DDCB341996814FF), LazyThreadSafetyMode.None); + public ref uint FlexControllerToken { - get => ref _Handle.AsRef(Schema.GetOffset(0x7DDCB341996814FF)); + get => ref _Handle.AsRef(_FlexControllerTokenOffset.Value); } + private static readonly Lazy _MinOffset = new(() => Schema.GetOffset(0x7DDCB3413B1A5649), LazyThreadSafetyMode.None); + public ref float Min { - get => ref _Handle.AsRef(Schema.GetOffset(0x7DDCB3413B1A5649)); + get => ref _Handle.AsRef(_MinOffset.Value); } + private static readonly Lazy _MaxOffset = new(() => Schema.GetOffset(0x7DDCB3412D06B887), LazyThreadSafetyMode.None); + public ref float Max { - get => ref _Handle.AsRef(Schema.GetOffset(0x7DDCB3412D06B887)); + get => ref _Handle.AsRef(_MaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelBoneFlexDriver_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelBoneFlexDriver_tImpl.cs index 15400bb1a..90205b053 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelBoneFlexDriver_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelBoneFlexDriver_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class ModelBoneFlexDriver_tImpl : SchemaClass, ModelBoneFlexDri public ModelBoneFlexDriver_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneNameOffset = new(() => Schema.GetOffset(0xBCBDE5AAFDEE0E0C), LazyThreadSafetyMode.None); + public string BoneName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xBCBDE5AAFDEE0E0C)); + var ptr = _Handle.Read(_BoneNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xBCBDE5AAFDEE0E0C, value); + set => Schema.SetString(_Handle, _BoneNameOffset.Value, value); } + private static readonly Lazy _BoneNameTokenOffset = new(() => Schema.GetOffset(0xBCBDE5AA44D1E369), LazyThreadSafetyMode.None); + public ref uint BoneNameToken { - get => ref _Handle.AsRef(Schema.GetOffset(0xBCBDE5AA44D1E369)); + get => ref _Handle.AsRef(_BoneNameTokenOffset.Value); } + private static readonly Lazy _ControlsOffset = new(() => Schema.GetOffset(0xBCBDE5AA5FCAD2B7), LazyThreadSafetyMode.None); + public ref CUtlVector Controls { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBCBDE5AA5FCAD2B7)); + get => ref _Handle.AsRef>(_ControlsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelConfigHandle_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelConfigHandle_tImpl.cs index bbd1ae24f..586d1ddc6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelConfigHandle_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelConfigHandle_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class ModelConfigHandle_tImpl : SchemaClass, ModelConfigHandle_ public ModelConfigHandle_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x5DC9B751DCB0894A), LazyThreadSafetyMode.None); + public ref uint Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x5DC9B751DCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelEmbeddedMesh_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelEmbeddedMesh_tImpl.cs index 4f1a13915..417ba8ee9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelEmbeddedMesh_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelEmbeddedMesh_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,36 +17,54 @@ internal partial class ModelEmbeddedMesh_tImpl : SchemaClass, ModelEmbeddedMesh_ public ModelEmbeddedMesh_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x9EB0DD6ECAE8A266), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x9EB0DD6ECAE8A266)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x9EB0DD6ECAE8A266, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _MeshIndexOffset = new(() => Schema.GetOffset(0x9EB0DD6E07C0EC64), LazyThreadSafetyMode.None); + public ref int MeshIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x9EB0DD6E07C0EC64)); + get => ref _Handle.AsRef(_MeshIndexOffset.Value); } + private static readonly Lazy _DataBlockOffset = new(() => Schema.GetOffset(0x9EB0DD6E3D4FDE56), LazyThreadSafetyMode.None); + public ref int DataBlock { - get => ref _Handle.AsRef(Schema.GetOffset(0x9EB0DD6E3D4FDE56)); + get => ref _Handle.AsRef(_DataBlockOffset.Value); } + private static readonly Lazy _MorphBlockOffset = new(() => Schema.GetOffset(0x9EB0DD6E73C9235E), LazyThreadSafetyMode.None); + public ref int MorphBlock { - get => ref _Handle.AsRef(Schema.GetOffset(0x9EB0DD6E73C9235E)); + get => ref _Handle.AsRef(_MorphBlockOffset.Value); } + private static readonly Lazy _VertexBuffersOffset = new(() => Schema.GetOffset(0x9EB0DD6E967BB5EA), LazyThreadSafetyMode.None); + public ref CUtlVector VertexBuffers { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9EB0DD6E967BB5EA)); + get => ref _Handle.AsRef>(_VertexBuffersOffset.Value); } + private static readonly Lazy _IndexBuffersOffset = new(() => Schema.GetOffset(0x9EB0DD6EF9221876), LazyThreadSafetyMode.None); + public ref CUtlVector IndexBuffers { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9EB0DD6EF9221876)); + get => ref _Handle.AsRef>(_IndexBuffersOffset.Value); } + private static readonly Lazy _ToolsBuffersOffset = new(() => Schema.GetOffset(0x9EB0DD6ED56473DF), LazyThreadSafetyMode.None); + public ref CUtlVector ToolsBuffers { - get => ref _Handle.AsRef>(Schema.GetOffset(0x9EB0DD6ED56473DF)); + get => ref _Handle.AsRef>(_ToolsBuffersOffset.Value); } + private static readonly Lazy _VBIBBlockOffset = new(() => Schema.GetOffset(0x9EB0DD6EF5E4DCB7), LazyThreadSafetyMode.None); + public ref int VBIBBlock { - get => ref _Handle.AsRef(Schema.GetOffset(0x9EB0DD6EF5E4DCB7)); + get => ref _Handle.AsRef(_VBIBBlockOffset.Value); } + private static readonly Lazy _ToolsVBBlockOffset = new(() => Schema.GetOffset(0x9EB0DD6EB4D00411), LazyThreadSafetyMode.None); + public ref int ToolsVBBlock { - get => ref _Handle.AsRef(Schema.GetOffset(0x9EB0DD6EB4D00411)); + get => ref _Handle.AsRef(_ToolsVBBlockOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelMeshBufferData_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelMeshBufferData_tImpl.cs index 70f86d5aa..3ed10f93b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelMeshBufferData_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelMeshBufferData_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class ModelMeshBufferData_tImpl : SchemaClass, ModelMeshBufferD public ModelMeshBufferData_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BlockIndexOffset = new(() => Schema.GetOffset(0xA75611C261BAFD8A), LazyThreadSafetyMode.None); + public ref int BlockIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xA75611C261BAFD8A)); + get => ref _Handle.AsRef(_BlockIndexOffset.Value); } + private static readonly Lazy _ElementCountOffset = new(() => Schema.GetOffset(0xA75611C251A2EF12), LazyThreadSafetyMode.None); + public ref uint ElementCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xA75611C251A2EF12)); + get => ref _Handle.AsRef(_ElementCountOffset.Value); } + private static readonly Lazy _ElementSizeInBytesOffset = new(() => Schema.GetOffset(0xA75611C2F602975C), LazyThreadSafetyMode.None); + public ref uint ElementSizeInBytes { - get => ref _Handle.AsRef(Schema.GetOffset(0xA75611C2F602975C)); + get => ref _Handle.AsRef(_ElementSizeInBytesOffset.Value); } + private static readonly Lazy _MeshoptCompressedOffset = new(() => Schema.GetOffset(0xA75611C2BED25A2C), LazyThreadSafetyMode.None); + public ref bool MeshoptCompressed { - get => ref _Handle.AsRef(Schema.GetOffset(0xA75611C2BED25A2C)); + get => ref _Handle.AsRef(_MeshoptCompressedOffset.Value); } + private static readonly Lazy _MeshoptIndexSequenceOffset = new(() => Schema.GetOffset(0xA75611C21727BBF2), LazyThreadSafetyMode.None); + public ref bool MeshoptIndexSequence { - get => ref _Handle.AsRef(Schema.GetOffset(0xA75611C21727BBF2)); + get => ref _Handle.AsRef(_MeshoptIndexSequenceOffset.Value); } + private static readonly Lazy _CompressedZSTDOffset = new(() => Schema.GetOffset(0xA75611C2AB2B4F3B), LazyThreadSafetyMode.None); + public ref bool CompressedZSTD { - get => ref _Handle.AsRef(Schema.GetOffset(0xA75611C2AB2B4F3B)); + get => ref _Handle.AsRef(_CompressedZSTDOffset.Value); } + private static readonly Lazy _CreateBufferSRVOffset = new(() => Schema.GetOffset(0xA75611C2DCF67560), LazyThreadSafetyMode.None); + public ref bool CreateBufferSRV { - get => ref _Handle.AsRef(Schema.GetOffset(0xA75611C2DCF67560)); + get => ref _Handle.AsRef(_CreateBufferSRVOffset.Value); } + private static readonly Lazy _CreateBufferUAVOffset = new(() => Schema.GetOffset(0xA75611C27C3596ED), LazyThreadSafetyMode.None); + public ref bool CreateBufferUAV { - get => ref _Handle.AsRef(Schema.GetOffset(0xA75611C27C3596ED)); + get => ref _Handle.AsRef(_CreateBufferUAVOffset.Value); } + private static readonly Lazy _CreateRawBufferOffset = new(() => Schema.GetOffset(0xA75611C232F79BCF), LazyThreadSafetyMode.None); + public ref bool CreateRawBuffer { - get => ref _Handle.AsRef(Schema.GetOffset(0xA75611C232F79BCF)); + get => ref _Handle.AsRef(_CreateRawBufferOffset.Value); } + private static readonly Lazy _CreatePooledBufferOffset = new(() => Schema.GetOffset(0xA75611C2EFB854B4), LazyThreadSafetyMode.None); + public ref bool CreatePooledBuffer { - get => ref _Handle.AsRef(Schema.GetOffset(0xA75611C2EFB854B4)); + get => ref _Handle.AsRef(_CreatePooledBufferOffset.Value); } + private static readonly Lazy _InputLayoutFieldsOffset = new(() => Schema.GetOffset(0xA75611C2FDECA2D8), LazyThreadSafetyMode.None); + public ref CUtlVector InputLayoutFields { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA75611C2FDECA2D8)); + get => ref _Handle.AsRef>(_InputLayoutFieldsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelReference_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelReference_tImpl.cs index 7d7794917..d3fd853e1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelReference_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelReference_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class ModelReference_tImpl : SchemaClass, ModelReference_t { public ModelReference_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModelOffset = new(() => Schema.GetOffset(0x72F202EC1CD79E7A), LazyThreadSafetyMode.None); + public ref CStrongHandle Model { - get => ref _Handle.AsRef>(Schema.GetOffset(0x72F202EC1CD79E7A)); + get => ref _Handle.AsRef>(_ModelOffset.Value); } + private static readonly Lazy _RelativeProbabilityOfSpawnOffset = new(() => Schema.GetOffset(0x72F202ECDBFCAD1E), LazyThreadSafetyMode.None); + public ref float RelativeProbabilityOfSpawn { - get => ref _Handle.AsRef(Schema.GetOffset(0x72F202ECDBFCAD1E)); + get => ref _Handle.AsRef(_RelativeProbabilityOfSpawnOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelSkeletonData_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelSkeletonData_tImpl.cs index 59045477a..1c2a67490 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelSkeletonData_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ModelSkeletonData_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class ModelSkeletonData_tImpl : SchemaClass, ModelSkeletonData_ public ModelSkeletonData_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneNameOffset = new(() => Schema.GetOffset(0x8349B622FDEE0E0C), LazyThreadSafetyMode.None); + public ref CUtlVector BoneName { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8349B622FDEE0E0C)); + get => ref _Handle.AsRef>(_BoneNameOffset.Value); } + private static readonly Lazy _ParentOffset = new(() => Schema.GetOffset(0x8349B6220AABB9D1), LazyThreadSafetyMode.None); + public ref CUtlVector Parent { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8349B6220AABB9D1)); + get => ref _Handle.AsRef>(_ParentOffset.Value); } + private static readonly Lazy _BoneSphereOffset = new(() => Schema.GetOffset(0x8349B6222F22FB5A), LazyThreadSafetyMode.None); + public ref CUtlVector BoneSphere { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8349B6222F22FB5A)); + get => ref _Handle.AsRef>(_BoneSphereOffset.Value); } + private static readonly Lazy _FlagOffset = new(() => Schema.GetOffset(0x8349B622CED32C4B), LazyThreadSafetyMode.None); + public ref CUtlVector Flag { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8349B622CED32C4B)); + get => ref _Handle.AsRef>(_FlagOffset.Value); } + private static readonly Lazy _BonePosParentOffset = new(() => Schema.GetOffset(0x8349B622E59E127F), LazyThreadSafetyMode.None); + public ref CUtlVector BonePosParent { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8349B622E59E127F)); + get => ref _Handle.AsRef>(_BonePosParentOffset.Value); } + private static readonly Lazy _BoneRotParentOffset = new(() => Schema.GetOffset(0x8349B622A6E3A10C), LazyThreadSafetyMode.None); + public ref CUtlVector BoneRotParent { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8349B622A6E3A10C)); + get => ref _Handle.AsRef>(_BoneRotParentOffset.Value); } + private static readonly Lazy _BoneScaleParentOffset = new(() => Schema.GetOffset(0x8349B622FA2ED87F), LazyThreadSafetyMode.None); + public ref CUtlVector BoneScaleParent { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8349B622FA2ED87F)); + get => ref _Handle.AsRef>(_BoneScaleParentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MoodAnimationLayer_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MoodAnimationLayer_tImpl.cs index ff66cc2c4..8f4e07548 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MoodAnimationLayer_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MoodAnimationLayer_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,45 +17,69 @@ internal partial class MoodAnimationLayer_tImpl : SchemaClass, MoodAnimationLaye public MoodAnimationLayer_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x3663914263D22D49), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x3663914263D22D49)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x3663914263D22D49, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _ActiveListeningOffset = new(() => Schema.GetOffset(0x36639142122973A0), LazyThreadSafetyMode.None); + public ref bool ActiveListening { - get => ref _Handle.AsRef(Schema.GetOffset(0x36639142122973A0)); + get => ref _Handle.AsRef(_ActiveListeningOffset.Value); } + private static readonly Lazy _ActiveTalkingOffset = new(() => Schema.GetOffset(0x366391423033E5C3), LazyThreadSafetyMode.None); + public ref bool ActiveTalking { - get => ref _Handle.AsRef(Schema.GetOffset(0x366391423033E5C3)); + get => ref _Handle.AsRef(_ActiveTalkingOffset.Value); } + private static readonly Lazy _LayerAnimationsOffset = new(() => Schema.GetOffset(0x3663914250279465), LazyThreadSafetyMode.None); + public ref CUtlVector LayerAnimations { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3663914250279465)); + get => ref _Handle.AsRef>(_LayerAnimationsOffset.Value); } + private static readonly Lazy _IntensityOffset = new(() => Schema.GetOffset(0x3663914267B5578C), LazyThreadSafetyMode.None); + public CRangeFloat Intensity { - get => new CRangeFloatImpl(_Handle + Schema.GetOffset(0x3663914267B5578C)); + get => new CRangeFloatImpl(_Handle + _IntensityOffset.Value); } + private static readonly Lazy _DurationScaleOffset = new(() => Schema.GetOffset(0x36639142776D4203), LazyThreadSafetyMode.None); + public CRangeFloat DurationScale { - get => new CRangeFloatImpl(_Handle + Schema.GetOffset(0x36639142776D4203)); + get => new CRangeFloatImpl(_Handle + _DurationScaleOffset.Value); } + private static readonly Lazy _ScaleWithIntsOffset = new(() => Schema.GetOffset(0x366391427C46A077), LazyThreadSafetyMode.None); + public ref bool ScaleWithInts { - get => ref _Handle.AsRef(Schema.GetOffset(0x366391427C46A077)); + get => ref _Handle.AsRef(_ScaleWithIntsOffset.Value); } + private static readonly Lazy _NextStartOffset = new(() => Schema.GetOffset(0x3663914202956BDE), LazyThreadSafetyMode.None); + public CRangeFloat NextStart { - get => new CRangeFloatImpl(_Handle + Schema.GetOffset(0x3663914202956BDE)); + get => new CRangeFloatImpl(_Handle + _NextStartOffset.Value); } + private static readonly Lazy _StartOffsetOffset = new(() => Schema.GetOffset(0x3663914269A449AA), LazyThreadSafetyMode.None); + public CRangeFloat StartOffset { - get => new CRangeFloatImpl(_Handle + Schema.GetOffset(0x3663914269A449AA)); + get => new CRangeFloatImpl(_Handle + _StartOffsetOffset.Value); } + private static readonly Lazy _EndOffsetOffset = new(() => Schema.GetOffset(0x36639142C863E027), LazyThreadSafetyMode.None); + public CRangeFloat EndOffset { - get => new CRangeFloatImpl(_Handle + Schema.GetOffset(0x36639142C863E027)); + get => new CRangeFloatImpl(_Handle + _EndOffsetOffset.Value); } + private static readonly Lazy _FadeInOffset = new(() => Schema.GetOffset(0x36639142FCA835D2), LazyThreadSafetyMode.None); + public ref float FadeIn { - get => ref _Handle.AsRef(Schema.GetOffset(0x36639142FCA835D2)); + get => ref _Handle.AsRef(_FadeInOffset.Value); } + private static readonly Lazy _FadeOutOffset = new(() => Schema.GetOffset(0x36639142FEBCE80B), LazyThreadSafetyMode.None); + public ref float FadeOut { - get => ref _Handle.AsRef(Schema.GetOffset(0x36639142FEBCE80B)); + get => ref _Handle.AsRef(_FadeOutOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MoodAnimation_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MoodAnimation_tImpl.cs index ee2e9b589..749b27ef0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MoodAnimation_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MoodAnimation_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class MoodAnimation_tImpl : SchemaClass, MoodAnimation_t { public MoodAnimation_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x8982458763D22D49), LazyThreadSafetyMode.None); + public SchemaUntypedField Name { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8982458763D22D49)); + get => new SchemaUntypedField(_Handle + _NameOffset.Value); } + private static readonly Lazy _WeightOffset = new(() => Schema.GetOffset(0x898245877B81E7AB), LazyThreadSafetyMode.None); + public ref float Weight { - get => ref _Handle.AsRef(Schema.GetOffset(0x898245877B81E7AB)); + get => ref _Handle.AsRef(_WeightOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MotionBlendItemImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MotionBlendItemImpl.cs index 006c07fed..338d8997a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MotionBlendItemImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MotionBlendItemImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class MotionBlendItemImpl : SchemaClass, MotionBlendItem { public MotionBlendItemImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildOffset = new(() => Schema.GetOffset(0x6AF18B8D4A0B773F), LazyThreadSafetyMode.None); + public SchemaUntypedField Child { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x6AF18B8D4A0B773F)); + get => new SchemaUntypedField(_Handle + _ChildOffset.Value); } + private static readonly Lazy _KeyValueOffset = new(() => Schema.GetOffset(0x6AF18B8D039CE1D7), LazyThreadSafetyMode.None); + public ref float KeyValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x6AF18B8D039CE1D7)); + get => ref _Handle.AsRef(_KeyValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MotionDBIndexImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MotionDBIndexImpl.cs index 347504260..da726db38 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MotionDBIndexImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MotionDBIndexImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class MotionDBIndexImpl : SchemaClass, MotionDBIndex { public MotionDBIndexImpl(nint handle) : base(handle) { } + private static readonly Lazy _IndexOffset = new(() => Schema.GetOffset(0x35C035B7B73DBE67), LazyThreadSafetyMode.None); + public ref uint Index { - get => ref _Handle.AsRef(Schema.GetOffset(0x35C035B7B73DBE67)); + get => ref _Handle.AsRef(_IndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MotionIndexImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MotionIndexImpl.cs index 31dd8e18d..ae8ef1944 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MotionIndexImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MotionIndexImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class MotionIndexImpl : SchemaClass, MotionIndex { public MotionIndexImpl(nint handle) : base(handle) { } + private static readonly Lazy _GroupOffset = new(() => Schema.GetOffset(0x5914302D0CD16308), LazyThreadSafetyMode.None); + public ref ushort Group { - get => ref _Handle.AsRef(Schema.GetOffset(0x5914302D0CD16308)); + get => ref _Handle.AsRef(_GroupOffset.Value); } + private static readonly Lazy _MotionOffset = new(() => Schema.GetOffset(0x5914302DBB2E0DCB), LazyThreadSafetyMode.None); + public ref ushort Motion { - get => ref _Handle.AsRef(Schema.GetOffset(0x5914302DBB2E0DCB)); + get => ref _Handle.AsRef(_MotionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MovementGaitId_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MovementGaitId_tImpl.cs index d26068afe..03a320698 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/MovementGaitId_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/MovementGaitId_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class MovementGaitId_tImpl : SchemaClass, MovementGaitId_t { public MovementGaitId_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _IdOffset = new(() => Schema.GetOffset(0xD64B37F7C4A0BD8F), LazyThreadSafetyMode.None); + public ref CGlobalSymbol Id { - get => ref _Handle.AsRef(Schema.GetOffset(0xD64B37F7C4A0BD8F)); + get => ref _Handle.AsRef(_IdOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/NavGravity_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/NavGravity_tImpl.cs index d857e701e..8d358cc40 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/NavGravity_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/NavGravity_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class NavGravity_tImpl : SchemaClass, NavGravity_t { public NavGravity_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _GravityOffset = new(() => Schema.GetOffset(0xAF45EC63A5AE4779), LazyThreadSafetyMode.None); + public ref Vector Gravity { - get => ref _Handle.AsRef(Schema.GetOffset(0xAF45EC63A5AE4779)); + get => ref _Handle.AsRef(_GravityOffset.Value); } + private static readonly Lazy _DefaultOffset = new(() => Schema.GetOffset(0xAF45EC6385F067BE), LazyThreadSafetyMode.None); + public ref bool Default { - get => ref _Handle.AsRef(Schema.GetOffset(0xAF45EC6385F067BE)); + get => ref _Handle.AsRef(_DefaultOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmBoneMaskSetDefinition_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmBoneMaskSetDefinition_tImpl.cs index 30da881fb..31d9d3dee 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmBoneMaskSetDefinition_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmBoneMaskSetDefinition_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class NmBoneMaskSetDefinition_tImpl : SchemaClass, NmBoneMaskSe public NmBoneMaskSetDefinition_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _IDOffset = new(() => Schema.GetOffset(0xEA12116095066900), LazyThreadSafetyMode.None); + public ref CGlobalSymbol ID { - get => ref _Handle.AsRef(Schema.GetOffset(0xEA12116095066900)); + get => ref _Handle.AsRef(_IDOffset.Value); } + private static readonly Lazy _PrimaryWeightListOffset = new(() => Schema.GetOffset(0xEA1211603AF7FF49), LazyThreadSafetyMode.None); + public CNmBoneWeightList PrimaryWeightList { - get => new CNmBoneWeightListImpl(_Handle + Schema.GetOffset(0xEA1211603AF7FF49)); + get => new CNmBoneWeightListImpl(_Handle + _PrimaryWeightListOffset.Value); } + private static readonly Lazy _SecondaryWeightListsOffset = new(() => Schema.GetOffset(0xEA12116021DB2776), LazyThreadSafetyMode.None); + public ref CUtlLeanVector SecondaryWeightLists { - get => ref _Handle.AsRef>(Schema.GetOffset(0xEA12116021DB2776)); + get => ref _Handle.AsRef>(_SecondaryWeightListsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmCompressionSettings_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmCompressionSettings_tImpl.cs index e481a93a7..44554ae6e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmCompressionSettings_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmCompressionSettings_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class NmCompressionSettings_tImpl : SchemaClass, NmCompressionS public NmCompressionSettings_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TranslationRangeXOffset = new(() => Schema.GetOffset(0xA8EC8858BF2C2B), LazyThreadSafetyMode.None); + public NmCompressionSettings_t__QuantizationRange_t TranslationRangeX { - get => new NmCompressionSettings_t__QuantizationRange_tImpl(_Handle + Schema.GetOffset(0xA8EC8858BF2C2B)); + get => new NmCompressionSettings_t__QuantizationRange_tImpl(_Handle + _TranslationRangeXOffset.Value); } + private static readonly Lazy _TranslationRangeYOffset = new(() => Schema.GetOffset(0xA8EC8857BF2A98), LazyThreadSafetyMode.None); + public NmCompressionSettings_t__QuantizationRange_t TranslationRangeY { - get => new NmCompressionSettings_t__QuantizationRange_tImpl(_Handle + Schema.GetOffset(0xA8EC8857BF2A98)); + get => new NmCompressionSettings_t__QuantizationRange_tImpl(_Handle + _TranslationRangeYOffset.Value); } + private static readonly Lazy _TranslationRangeZOffset = new(() => Schema.GetOffset(0xA8EC885ABF2F51), LazyThreadSafetyMode.None); + public NmCompressionSettings_t__QuantizationRange_t TranslationRangeZ { - get => new NmCompressionSettings_t__QuantizationRange_tImpl(_Handle + Schema.GetOffset(0xA8EC885ABF2F51)); + get => new NmCompressionSettings_t__QuantizationRange_tImpl(_Handle + _TranslationRangeZOffset.Value); } + private static readonly Lazy _ScaleRangeOffset = new(() => Schema.GetOffset(0xA8EC88E96F803E), LazyThreadSafetyMode.None); + public NmCompressionSettings_t__QuantizationRange_t ScaleRange { - get => new NmCompressionSettings_t__QuantizationRange_tImpl(_Handle + Schema.GetOffset(0xA8EC88E96F803E)); + get => new NmCompressionSettings_t__QuantizationRange_tImpl(_Handle + _ScaleRangeOffset.Value); } + private static readonly Lazy _ConstantRotationOffset = new(() => Schema.GetOffset(0xA8EC88C609717F), LazyThreadSafetyMode.None); + public ref Quaternion ConstantRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8EC88C609717F)); + get => ref _Handle.AsRef(_ConstantRotationOffset.Value); } + private static readonly Lazy _IsRotationStaticOffset = new(() => Schema.GetOffset(0xA8EC88D75373C5), LazyThreadSafetyMode.None); + public ref bool IsRotationStatic { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8EC88D75373C5)); + get => ref _Handle.AsRef(_IsRotationStaticOffset.Value); } + private static readonly Lazy _IsTranslationStaticOffset = new(() => Schema.GetOffset(0xA8EC888ABDF382), LazyThreadSafetyMode.None); + public ref bool IsTranslationStatic { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8EC888ABDF382)); + get => ref _Handle.AsRef(_IsTranslationStaticOffset.Value); } + private static readonly Lazy _IsScaleStaticOffset = new(() => Schema.GetOffset(0xA8EC88FDB26607), LazyThreadSafetyMode.None); + public ref bool IsScaleStatic { - get => ref _Handle.AsRef(Schema.GetOffset(0xA8EC88FDB26607)); + get => ref _Handle.AsRef(_IsScaleStaticOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmCompressionSettings_t__QuantizationRange_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmCompressionSettings_t__QuantizationRange_tImpl.cs index da6233e49..0732b49b0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmCompressionSettings_t__QuantizationRange_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmCompressionSettings_t__QuantizationRange_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class NmCompressionSettings_t__QuantizationRange_tImpl : Schema public NmCompressionSettings_t__QuantizationRange_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _RangeStartOffset = new(() => Schema.GetOffset(0xA662A641F7D21E68), LazyThreadSafetyMode.None); + public ref float RangeStart { - get => ref _Handle.AsRef(Schema.GetOffset(0xA662A641F7D21E68)); + get => ref _Handle.AsRef(_RangeStartOffset.Value); } + private static readonly Lazy _RangeLengthOffset = new(() => Schema.GetOffset(0xA662A6418C3501A8), LazyThreadSafetyMode.None); + public ref float RangeLength { - get => ref _Handle.AsRef(Schema.GetOffset(0xA662A6418C3501A8)); + get => ref _Handle.AsRef(_RangeLengthOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmFloatCurveCompressionSettings_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmFloatCurveCompressionSettings_tImpl.cs index 5a2d63948..4f82cfae3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmFloatCurveCompressionSettings_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmFloatCurveCompressionSettings_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class NmFloatCurveCompressionSettings_tImpl : SchemaClass, NmFl public NmFloatCurveCompressionSettings_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _RangeOffset = new(() => Schema.GetOffset(0x5BD5686F3D639CF2), LazyThreadSafetyMode.None); + public NmCompressionSettings_t__QuantizationRange_t Range { - get => new NmCompressionSettings_t__QuantizationRange_tImpl(_Handle + Schema.GetOffset(0x5BD5686F3D639CF2)); + get => new NmCompressionSettings_t__QuantizationRange_tImpl(_Handle + _RangeOffset.Value); } + private static readonly Lazy _IsStaticOffset = new(() => Schema.GetOffset(0x5BD5686F57ECC7EB), LazyThreadSafetyMode.None); + public ref bool IsStatic { - get => ref _Handle.AsRef(Schema.GetOffset(0x5BD5686F57ECC7EB)); + get => ref _Handle.AsRef(_IsStaticOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmPercent_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmPercent_tImpl.cs index 95ebdd87d..21d1426cc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmPercent_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmPercent_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class NmPercent_tImpl : SchemaClass, NmPercent_t { public NmPercent_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xF12966B68DFCB984), LazyThreadSafetyMode.None); + public ref float Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xF12966B68DFCB984)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmSyncTrackTimeRange_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmSyncTrackTimeRange_tImpl.cs index c3a2109ac..90711cb3c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmSyncTrackTimeRange_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmSyncTrackTimeRange_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class NmSyncTrackTimeRange_tImpl : SchemaClass, NmSyncTrackTime public NmSyncTrackTimeRange_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0xAECBDADF6330E7EE), LazyThreadSafetyMode.None); + public NmSyncTrackTime_t StartTime { - get => new NmSyncTrackTime_tImpl(_Handle + Schema.GetOffset(0xAECBDADF6330E7EE)); + get => new NmSyncTrackTime_tImpl(_Handle + _StartTimeOffset.Value); } + private static readonly Lazy _EndTimeOffset = new(() => Schema.GetOffset(0xAECBDADFEAD1A94B), LazyThreadSafetyMode.None); + public NmSyncTrackTime_t EndTime { - get => new NmSyncTrackTime_tImpl(_Handle + Schema.GetOffset(0xAECBDADFEAD1A94B)); + get => new NmSyncTrackTime_tImpl(_Handle + _EndTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmSyncTrackTime_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmSyncTrackTime_tImpl.cs index 2750bac91..7163724fa 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmSyncTrackTime_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/NmSyncTrackTime_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class NmSyncTrackTime_tImpl : SchemaClass, NmSyncTrackTime_t { public NmSyncTrackTime_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _EventIdxOffset = new(() => Schema.GetOffset(0x12BF3F3C2A6FC8DA), LazyThreadSafetyMode.None); + public ref int EventIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x12BF3F3C2A6FC8DA)); + get => ref _Handle.AsRef(_EventIdxOffset.Value); } + private static readonly Lazy _PercentageThroughOffset = new(() => Schema.GetOffset(0x12BF3F3C77B731AA), LazyThreadSafetyMode.None); + public NmPercent_t PercentageThrough { - get => new NmPercent_tImpl(_Handle + Schema.GetOffset(0x12BF3F3C77B731AA)); + get => new NmPercent_tImpl(_Handle + _PercentageThroughOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/NodeData_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/NodeData_tImpl.cs index 57e8ceb55..4b6ef1f32 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/NodeData_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/NodeData_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,30 +17,44 @@ internal partial class NodeData_tImpl : SchemaClass, NodeData_t { public NodeData_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParentOffset = new(() => Schema.GetOffset(0xB09FAAA60AABB9D1), LazyThreadSafetyMode.None); + public ref int Parent { - get => ref _Handle.AsRef(Schema.GetOffset(0xB09FAAA60AABB9D1)); + get => ref _Handle.AsRef(_ParentOffset.Value); } + private static readonly Lazy _OriginOffset = new(() => Schema.GetOffset(0xB09FAAA6F26E589B), LazyThreadSafetyMode.None); + public ref Vector Origin { - get => ref _Handle.AsRef(Schema.GetOffset(0xB09FAAA6F26E589B)); + get => ref _Handle.AsRef(_OriginOffset.Value); } + private static readonly Lazy _MinBoundsOffset = new(() => Schema.GetOffset(0xB09FAAA6114799FE), LazyThreadSafetyMode.None); + public ref Vector MinBounds { - get => ref _Handle.AsRef(Schema.GetOffset(0xB09FAAA6114799FE)); + get => ref _Handle.AsRef(_MinBoundsOffset.Value); } + private static readonly Lazy _MaxBoundsOffset = new(() => Schema.GetOffset(0xB09FAAA6C0B4CE60), LazyThreadSafetyMode.None); + public ref Vector MaxBounds { - get => ref _Handle.AsRef(Schema.GetOffset(0xB09FAAA6C0B4CE60)); + get => ref _Handle.AsRef(_MaxBoundsOffset.Value); } + private static readonly Lazy _MinimumDistanceOffset = new(() => Schema.GetOffset(0xB09FAAA6D8B1200E), LazyThreadSafetyMode.None); + public ref float MinimumDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xB09FAAA6D8B1200E)); + get => ref _Handle.AsRef(_MinimumDistanceOffset.Value); } + private static readonly Lazy _ChildNodeIndicesOffset = new(() => Schema.GetOffset(0xB09FAAA63648C692), LazyThreadSafetyMode.None); + public ref CUtlVector ChildNodeIndices { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB09FAAA63648C692)); + get => ref _Handle.AsRef>(_ChildNodeIndicesOffset.Value); } + private static readonly Lazy _WorldNodePrefixOffset = new(() => Schema.GetOffset(0xB09FAAA662126457), LazyThreadSafetyMode.None); + public string WorldNodePrefix { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB09FAAA662126457)); + var ptr = _Handle.Read(_WorldNodePrefixOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB09FAAA662126457, value); + set => Schema.SetString(_Handle, _WorldNodePrefixOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/OldFeEdge_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/OldFeEdge_tImpl.cs index 92fcf7549..f46ee614e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/OldFeEdge_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/OldFeEdge_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,32 +20,50 @@ public OldFeEdge_tImpl(nint handle) : base(handle) { public ISchemaFixedArray K { get => new SchemaFixedArray(_Handle, 0xBAF074C17C12054C, 3, 4, 4); } + private static readonly Lazy _InvAOffset = new(() => Schema.GetOffset(0xBAF074C1518D5F7B), LazyThreadSafetyMode.None); + public ref float InvA { - get => ref _Handle.AsRef(Schema.GetOffset(0xBAF074C1518D5F7B)); + get => ref _Handle.AsRef(_InvAOffset.Value); } + private static readonly Lazy _TOffset = new(() => Schema.GetOffset(0xBAF074C1F10C3DA3), LazyThreadSafetyMode.None); + public ref float T { - get => ref _Handle.AsRef(Schema.GetOffset(0xBAF074C1F10C3DA3)); + get => ref _Handle.AsRef(_TOffset.Value); } + private static readonly Lazy _ThetaRelaxedOffset = new(() => Schema.GetOffset(0xBAF074C14C35B770), LazyThreadSafetyMode.None); + public ref float ThetaRelaxed { - get => ref _Handle.AsRef(Schema.GetOffset(0xBAF074C14C35B770)); + get => ref _Handle.AsRef(_ThetaRelaxedOffset.Value); } + private static readonly Lazy _ThetaFactorOffset = new(() => Schema.GetOffset(0xBAF074C165B8FFDA), LazyThreadSafetyMode.None); + public ref float ThetaFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0xBAF074C165B8FFDA)); + get => ref _Handle.AsRef(_ThetaFactorOffset.Value); } + private static readonly Lazy _C01Offset = new(() => Schema.GetOffset(0xBAF074C13DE93555), LazyThreadSafetyMode.None); + public ref float C01 { - get => ref _Handle.AsRef(Schema.GetOffset(0xBAF074C13DE93555)); + get => ref _Handle.AsRef(_C01Offset.Value); } + private static readonly Lazy _C02Offset = new(() => Schema.GetOffset(0xBAF074C13AE9309C), LazyThreadSafetyMode.None); + public ref float C02 { - get => ref _Handle.AsRef(Schema.GetOffset(0xBAF074C13AE9309C)); + get => ref _Handle.AsRef(_C02Offset.Value); } + private static readonly Lazy _C03Offset = new(() => Schema.GetOffset(0xBAF074C13BE9322F), LazyThreadSafetyMode.None); + public ref float C03 { - get => ref _Handle.AsRef(Schema.GetOffset(0xBAF074C13BE9322F)); + get => ref _Handle.AsRef(_C03Offset.Value); } + private static readonly Lazy _C04Offset = new(() => Schema.GetOffset(0xBAF074C138E92D76), LazyThreadSafetyMode.None); + public ref float C04 { - get => ref _Handle.AsRef(Schema.GetOffset(0xBAF074C138E92D76)); + get => ref _Handle.AsRef(_C04Offset.Value); } + private static readonly Lazy _AxialModelDistOffset = new(() => Schema.GetOffset(0xBAF074C1E53980E9), LazyThreadSafetyMode.None); + public ref float AxialModelDist { - get => ref _Handle.AsRef(Schema.GetOffset(0xBAF074C1E53980E9)); + get => ref _Handle.AsRef(_AxialModelDistOffset.Value); } public ISchemaFixedArray AxialModelWeights { get => new SchemaFixedArray(_Handle, 0xBAF074C1D9CDB73E, 4, 4, 4); diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/OutflowWithRequirements_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/OutflowWithRequirements_tImpl.cs index dcdf6da3e..e01118612 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/OutflowWithRequirements_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/OutflowWithRequirements_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class OutflowWithRequirements_tImpl : SchemaClass, OutflowWithR public OutflowWithRequirements_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ConnectionOffset = new(() => Schema.GetOffset(0x5BFC4DD4D4CD5F59), LazyThreadSafetyMode.None); + public CPulse_OutflowConnection Connection { - get => new CPulse_OutflowConnectionImpl(_Handle + Schema.GetOffset(0x5BFC4DD4D4CD5F59)); + get => new CPulse_OutflowConnectionImpl(_Handle + _ConnectionOffset.Value); } + private static readonly Lazy _DestinationFlowNodeIDOffset = new(() => Schema.GetOffset(0x5BFC4DD4C986A186), LazyThreadSafetyMode.None); + public PulseDocNodeID_t DestinationFlowNodeID { - get => new PulseDocNodeID_tImpl(_Handle + Schema.GetOffset(0x5BFC4DD4C986A186)); + get => new PulseDocNodeID_tImpl(_Handle + _DestinationFlowNodeIDOffset.Value); } + private static readonly Lazy _RequirementNodeIDsOffset = new(() => Schema.GetOffset(0x5BFC4DD47DAC9EFE), LazyThreadSafetyMode.None); + public ref CUtlVector RequirementNodeIDs { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5BFC4DD47DAC9EFE)); + get => ref _Handle.AsRef>(_RequirementNodeIDsOffset.Value); } + private static readonly Lazy _CursorStateBlockIndexOffset = new(() => Schema.GetOffset(0x5BFC4DD46CECC07B), LazyThreadSafetyMode.None); + public ref CUtlVector CursorStateBlockIndex { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5BFC4DD46CECC07B)); + get => ref _Handle.AsRef>(_CursorStateBlockIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PARTICLE_EHANDLE__Impl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PARTICLE_EHANDLE__Impl.cs index f280c9705..3f0c7d451 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PARTICLE_EHANDLE__Impl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PARTICLE_EHANDLE__Impl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PARTICLE_EHANDLE__Impl : SchemaClass, PARTICLE_EHANDLE__ public PARTICLE_EHANDLE__Impl(nint handle) : base(handle) { } + private static readonly Lazy _UnusedOffset = new(() => Schema.GetOffset(0x7E4CC5CF85CF281B), LazyThreadSafetyMode.None); + public ref int Unused { - get => ref _Handle.AsRef(Schema.GetOffset(0x7E4CC5CF85CF281B)); + get => ref _Handle.AsRef(_UnusedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PGDInstruction_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PGDInstruction_tImpl.cs index ca0654129..08f851813 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PGDInstruction_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PGDInstruction_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,65 @@ internal partial class PGDInstruction_tImpl : SchemaClass, PGDInstruction_t { public PGDInstruction_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CodeOffset = new(() => Schema.GetOffset(0xE64AC70782D034B8), LazyThreadSafetyMode.None); + public ref PulseInstructionCode_t Code { - get => ref _Handle.AsRef(Schema.GetOffset(0xE64AC70782D034B8)); + get => ref _Handle.AsRef(_CodeOffset.Value); } + private static readonly Lazy _VarOffset = new(() => Schema.GetOffset(0xE64AC707FD79AE3A), LazyThreadSafetyMode.None); + public PulseRuntimeVarIndex_t Var { - get => new PulseRuntimeVarIndex_tImpl(_Handle + Schema.GetOffset(0xE64AC707FD79AE3A)); + get => new PulseRuntimeVarIndex_tImpl(_Handle + _VarOffset.Value); } + private static readonly Lazy _Reg0Offset = new(() => Schema.GetOffset(0xE64AC707203A137B), LazyThreadSafetyMode.None); + public PulseRuntimeRegisterIndex_t Reg0 { - get => new PulseRuntimeRegisterIndex_tImpl(_Handle + Schema.GetOffset(0xE64AC707203A137B)); + get => new PulseRuntimeRegisterIndex_tImpl(_Handle + _Reg0Offset.Value); } + private static readonly Lazy _Reg1Offset = new(() => Schema.GetOffset(0xE64AC7071F3A11E8), LazyThreadSafetyMode.None); + public PulseRuntimeRegisterIndex_t Reg1 { - get => new PulseRuntimeRegisterIndex_tImpl(_Handle + Schema.GetOffset(0xE64AC7071F3A11E8)); + get => new PulseRuntimeRegisterIndex_tImpl(_Handle + _Reg1Offset.Value); } + private static readonly Lazy _Reg2Offset = new(() => Schema.GetOffset(0xE64AC707223A16A1), LazyThreadSafetyMode.None); + public PulseRuntimeRegisterIndex_t Reg2 { - get => new PulseRuntimeRegisterIndex_tImpl(_Handle + Schema.GetOffset(0xE64AC707223A16A1)); + get => new PulseRuntimeRegisterIndex_tImpl(_Handle + _Reg2Offset.Value); } + private static readonly Lazy _InvokeBindingIndexOffset = new(() => Schema.GetOffset(0xE64AC707758774C2), LazyThreadSafetyMode.None); + public PulseRuntimeInvokeIndex_t InvokeBindingIndex { - get => new PulseRuntimeInvokeIndex_tImpl(_Handle + Schema.GetOffset(0xE64AC707758774C2)); + get => new PulseRuntimeInvokeIndex_tImpl(_Handle + _InvokeBindingIndexOffset.Value); } + private static readonly Lazy _ChunkOffset = new(() => Schema.GetOffset(0xE64AC7071B1DB366), LazyThreadSafetyMode.None); + public PulseRuntimeChunkIndex_t Chunk { - get => new PulseRuntimeChunkIndex_tImpl(_Handle + Schema.GetOffset(0xE64AC7071B1DB366)); + get => new PulseRuntimeChunkIndex_tImpl(_Handle + _ChunkOffset.Value); } + private static readonly Lazy _DestInstructionOffset = new(() => Schema.GetOffset(0xE64AC7071C9BCE7B), LazyThreadSafetyMode.None); + public ref int DestInstruction { - get => ref _Handle.AsRef(Schema.GetOffset(0xE64AC7071C9BCE7B)); + get => ref _Handle.AsRef(_DestInstructionOffset.Value); } + private static readonly Lazy _CallInfoIndexOffset = new(() => Schema.GetOffset(0xE64AC7075A5CA29B), LazyThreadSafetyMode.None); + public PulseRuntimeCallInfoIndex_t CallInfoIndex { - get => new PulseRuntimeCallInfoIndex_tImpl(_Handle + Schema.GetOffset(0xE64AC7075A5CA29B)); + get => new PulseRuntimeCallInfoIndex_tImpl(_Handle + _CallInfoIndexOffset.Value); } + private static readonly Lazy _ConstIdxOffset = new(() => Schema.GetOffset(0xE64AC707800942FF), LazyThreadSafetyMode.None); + public PulseRuntimeConstantIndex_t ConstIdx { - get => new PulseRuntimeConstantIndex_tImpl(_Handle + Schema.GetOffset(0xE64AC707800942FF)); + get => new PulseRuntimeConstantIndex_tImpl(_Handle + _ConstIdxOffset.Value); } + private static readonly Lazy _DomainValueIdxOffset = new(() => Schema.GetOffset(0xE64AC70716115525), LazyThreadSafetyMode.None); + public PulseRuntimeDomainValueIndex_t DomainValueIdx { - get => new PulseRuntimeDomainValueIndex_tImpl(_Handle + Schema.GetOffset(0xE64AC70716115525)); + get => new PulseRuntimeDomainValueIndex_tImpl(_Handle + _DomainValueIdxOffset.Value); } + private static readonly Lazy _BlackboardReferenceIdxOffset = new(() => Schema.GetOffset(0xE64AC70727CB71C0), LazyThreadSafetyMode.None); + public PulseRuntimeBlackboardReferenceIndex_t BlackboardReferenceIdx { - get => new PulseRuntimeBlackboardReferenceIndex_tImpl(_Handle + Schema.GetOffset(0xE64AC70727CB71C0)); + get => new PulseRuntimeBlackboardReferenceIndex_tImpl(_Handle + _BlackboardReferenceIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PackedAABB_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PackedAABB_tImpl.cs index 8611fd692..976003a2f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PackedAABB_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PackedAABB_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class PackedAABB_tImpl : SchemaClass, PackedAABB_t { public PackedAABB_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _PackedMinOffset = new(() => Schema.GetOffset(0x868E43307AC1AEAF), LazyThreadSafetyMode.None); + public ref uint PackedMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x868E43307AC1AEAF)); + get => ref _Handle.AsRef(_PackedMinOffset.Value); } + private static readonly Lazy _PackedMaxOffset = new(() => Schema.GetOffset(0x868E433068AE0AA1), LazyThreadSafetyMode.None); + public ref uint PackedMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x868E433068AE0AA1)); + get => ref _Handle.AsRef(_PackedMaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParamSpanSample_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParamSpanSample_tImpl.cs index 37cefec0e..7ca2b4a52 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParamSpanSample_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParamSpanSample_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class ParamSpanSample_tImpl : SchemaClass, ParamSpanSample_t { public ParamSpanSample_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x37E203136B99AEEA), LazyThreadSafetyMode.None); + public SchemaUntypedField Value { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x37E203136B99AEEA)); + get => new SchemaUntypedField(_Handle + _ValueOffset.Value); } + private static readonly Lazy _CycleOffset = new(() => Schema.GetOffset(0x37E203130C77829F), LazyThreadSafetyMode.None); + public ref float Cycle { - get => ref _Handle.AsRef(Schema.GetOffset(0x37E203130C77829F)); + get => ref _Handle.AsRef(_CycleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParamSpan_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParamSpan_tImpl.cs index 7e2178e25..57a581ea6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParamSpan_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParamSpan_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class ParamSpan_tImpl : SchemaClass, ParamSpan_t { public ParamSpan_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SamplesOffset = new(() => Schema.GetOffset(0x5EE209D9364CA9DC), LazyThreadSafetyMode.None); + public ref CUtlVector Samples { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5EE209D9364CA9DC)); + get => ref _Handle.AsRef>(_SamplesOffset.Value); } + private static readonly Lazy _ParamOffset = new(() => Schema.GetOffset(0x5EE209D9679286A4), LazyThreadSafetyMode.None); + public CAnimParamHandle Param { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0x5EE209D9679286A4)); + get => new CAnimParamHandleImpl(_Handle + _ParamOffset.Value); } + private static readonly Lazy _ParamTypeOffset = new(() => Schema.GetOffset(0x5EE209D9F05DFDD9), LazyThreadSafetyMode.None); + public ref AnimParamType_t ParamType { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EE209D9F05DFDD9)); + get => ref _Handle.AsRef(_ParamTypeOffset.Value); } + private static readonly Lazy _StartCycleOffset = new(() => Schema.GetOffset(0x5EE209D9ABB46051), LazyThreadSafetyMode.None); + public ref float StartCycle { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EE209D9ABB46051)); + get => ref _Handle.AsRef(_StartCycleOffset.Value); } + private static readonly Lazy _EndCycleOffset = new(() => Schema.GetOffset(0x5EE209D9176E8F62), LazyThreadSafetyMode.None); + public ref float EndCycle { - get => ref _Handle.AsRef(Schema.GetOffset(0x5EE209D9176E8F62)); + get => ref _Handle.AsRef(_EndCycleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleAttributeIndex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleAttributeIndex_tImpl.cs index ce75fe07e..ce18f9239 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleAttributeIndex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleAttributeIndex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class ParticleAttributeIndex_tImpl : SchemaClass, ParticleAttri public ParticleAttributeIndex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xB44A6FC8DCB0894A), LazyThreadSafetyMode.None); + public ref int Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xB44A6FC8DCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleChildrenInfo_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleChildrenInfo_tImpl.cs index 8cc49a88b..35f4ac1f2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleChildrenInfo_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleChildrenInfo_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class ParticleChildrenInfo_tImpl : SchemaClass, ParticleChildre public ParticleChildrenInfo_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChildRefOffset = new(() => Schema.GetOffset(0x1EF548F3D87838A), LazyThreadSafetyMode.None); + public ref CStrongHandle ChildRef { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1EF548F3D87838A)); + get => ref _Handle.AsRef>(_ChildRefOffset.Value); } + private static readonly Lazy _DelayOffset = new(() => Schema.GetOffset(0x1EF548F7D68FD6E), LazyThreadSafetyMode.None); + public ref float Delay { - get => ref _Handle.AsRef(Schema.GetOffset(0x1EF548F7D68FD6E)); + get => ref _Handle.AsRef(_DelayOffset.Value); } + private static readonly Lazy _EndCapOffset = new(() => Schema.GetOffset(0x1EF548FC47CB04A), LazyThreadSafetyMode.None); + public ref bool EndCap { - get => ref _Handle.AsRef(Schema.GetOffset(0x1EF548FC47CB04A)); + get => ref _Handle.AsRef(_EndCapOffset.Value); } + private static readonly Lazy _DisableChildOffset = new(() => Schema.GetOffset(0x1EF548F81AECD9B), LazyThreadSafetyMode.None); + public ref bool DisableChild { - get => ref _Handle.AsRef(Schema.GetOffset(0x1EF548F81AECD9B)); + get => ref _Handle.AsRef(_DisableChildOffset.Value); } + private static readonly Lazy _DetailLevelOffset = new(() => Schema.GetOffset(0x1EF548F11D9E786), LazyThreadSafetyMode.None); + public ref ParticleDetailLevel_t DetailLevel { - get => ref _Handle.AsRef(Schema.GetOffset(0x1EF548F11D9E786)); + get => ref _Handle.AsRef(_DetailLevelOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleControlPointConfiguration_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleControlPointConfiguration_tImpl.cs index 49701e6d6..d5bb087d4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleControlPointConfiguration_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleControlPointConfiguration_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class ParticleControlPointConfiguration_tImpl : SchemaClass, Pa public ParticleControlPointConfiguration_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xC54E49C74D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xC54E49C74D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xC54E49C74D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _DriversOffset = new(() => Schema.GetOffset(0xC54E49C7C63563E4), LazyThreadSafetyMode.None); + public ref CUtlVector Drivers { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC54E49C7C63563E4)); + get => ref _Handle.AsRef>(_DriversOffset.Value); } + private static readonly Lazy _PreviewStateOffset = new(() => Schema.GetOffset(0xC54E49C79E440558), LazyThreadSafetyMode.None); + public ParticlePreviewState_t PreviewState { - get => new ParticlePreviewState_tImpl(_Handle + Schema.GetOffset(0xC54E49C79E440558)); + get => new ParticlePreviewState_tImpl(_Handle + _PreviewStateOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleControlPointDriver_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleControlPointDriver_tImpl.cs index dfe97f27a..c4ce4ee64 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleControlPointDriver_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleControlPointDriver_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,31 +17,43 @@ internal partial class ParticleControlPointDriver_tImpl : SchemaClass, ParticleC public ParticleControlPointDriver_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointOffset = new(() => Schema.GetOffset(0xB7C66843E9EC8FF5), LazyThreadSafetyMode.None); + public ref int ControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0xB7C66843E9EC8FF5)); + get => ref _Handle.AsRef(_ControlPointOffset.Value); } + private static readonly Lazy _AttachTypeOffset = new(() => Schema.GetOffset(0xB7C66843432E8381), LazyThreadSafetyMode.None); + public ref ParticleAttachment_t AttachType { - get => ref _Handle.AsRef(Schema.GetOffset(0xB7C66843432E8381)); + get => ref _Handle.AsRef(_AttachTypeOffset.Value); } + private static readonly Lazy _AttachmentNameOffset = new(() => Schema.GetOffset(0xB7C66843295DA9CB), LazyThreadSafetyMode.None); + public string AttachmentName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB7C66843295DA9CB)); + var ptr = _Handle.Read(_AttachmentNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB7C66843295DA9CB, value); + set => Schema.SetString(_Handle, _AttachmentNameOffset.Value, value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0xB7C66843BD25CC2A), LazyThreadSafetyMode.None); + public ref Vector Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0xB7C66843BD25CC2A)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _Offset1Offset = new(() => Schema.GetOffset(0xB7C6684346F6B3C0), LazyThreadSafetyMode.None); + public ref QAngle Offset1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xB7C6684346F6B3C0)); + get => ref _Handle.AsRef(_Offset1Offset.Value); } + private static readonly Lazy _EntityNameOffset = new(() => Schema.GetOffset(0xB7C6684380D1D3E1), LazyThreadSafetyMode.None); + public string EntityName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB7C6684380D1D3E1)); + var ptr = _Handle.Read(_EntityNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB7C6684380D1D3E1, value); + set => Schema.SetString(_Handle, _EntityNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleIndex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleIndex_tImpl.cs index 8ee406cdc..d9fe11324 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleIndex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleIndex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class ParticleIndex_tImpl : SchemaClass, ParticleIndex_t { public ParticleIndex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xA7ED25EEDCB0894A), LazyThreadSafetyMode.None); + public ref int Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xA7ED25EEDCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleNamedValueConfiguration_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleNamedValueConfiguration_tImpl.cs index 64ecd6c70..27226031c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleNamedValueConfiguration_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleNamedValueConfiguration_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,39 +17,51 @@ internal partial class ParticleNamedValueConfiguration_tImpl : SchemaClass, Part public ParticleNamedValueConfiguration_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ConfigNameOffset = new(() => Schema.GetOffset(0x4C42AD0EA7B74064), LazyThreadSafetyMode.None); + public string ConfigName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4C42AD0EA7B74064)); + var ptr = _Handle.Read(_ConfigNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x4C42AD0EA7B74064, value); + set => Schema.SetString(_Handle, _ConfigNameOffset.Value, value); } + private static readonly Lazy _ConfigValueOffset = new(() => Schema.GetOffset(0x4C42AD0ECF981D3C), LazyThreadSafetyMode.None); + public SchemaUntypedField ConfigValue { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x4C42AD0ECF981D3C)); + get => new SchemaUntypedField(_Handle + _ConfigValueOffset.Value); } + private static readonly Lazy _BoundValuePathOffset = new(() => Schema.GetOffset(0x4C42AD0ED4977C9F), LazyThreadSafetyMode.None); + public string BoundValuePath { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4C42AD0ED4977C9F)); + var ptr = _Handle.Read(_BoundValuePathOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x4C42AD0ED4977C9F, value); + set => Schema.SetString(_Handle, _BoundValuePathOffset.Value, value); } + private static readonly Lazy _AttachTypeOffset = new(() => Schema.GetOffset(0x4C42AD0E432E8381), LazyThreadSafetyMode.None); + public ref ParticleAttachment_t AttachType { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C42AD0E432E8381)); + get => ref _Handle.AsRef(_AttachTypeOffset.Value); } + private static readonly Lazy _StrEntityScopeOffset = new(() => Schema.GetOffset(0x4C42AD0ECCAF0621), LazyThreadSafetyMode.None); + public string StrEntityScope { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4C42AD0ECCAF0621)); + var ptr = _Handle.Read(_StrEntityScopeOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x4C42AD0ECCAF0621, value); + set => Schema.SetString(_Handle, _StrEntityScopeOffset.Value, value); } + private static readonly Lazy _StrAttachmentNameOffset = new(() => Schema.GetOffset(0x4C42AD0EEB143B4E), LazyThreadSafetyMode.None); + public string StrAttachmentName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4C42AD0EEB143B4E)); + var ptr = _Handle.Read(_StrAttachmentNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x4C42AD0EEB143B4E, value); + set => Schema.SetString(_Handle, _StrAttachmentNameOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleNamedValueSource_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleNamedValueSource_tImpl.cs index baa8db3b6..9df80303c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleNamedValueSource_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleNamedValueSource_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class ParticleNamedValueSource_tImpl : SchemaClass, ParticleNam public ParticleNamedValueSource_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x740B6BEFCAE8A266), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x740B6BEFCAE8A266)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x740B6BEFCAE8A266, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _IsPublicOffset = new(() => Schema.GetOffset(0x740B6BEFD2D88EB0), LazyThreadSafetyMode.None); + public ref bool IsPublic { - get => ref _Handle.AsRef(Schema.GetOffset(0x740B6BEFD2D88EB0)); + get => ref _Handle.AsRef(_IsPublicOffset.Value); } + private static readonly Lazy _ValueTypeOffset = new(() => Schema.GetOffset(0x740B6BEFC2A673CA), LazyThreadSafetyMode.None); + public SchemaUntypedField ValueType { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x740B6BEFC2A673CA)); + get => new SchemaUntypedField(_Handle + _ValueTypeOffset.Value); } + private static readonly Lazy _DefaultConfigOffset = new(() => Schema.GetOffset(0x740B6BEF05A58128), LazyThreadSafetyMode.None); + public ParticleNamedValueConfiguration_t DefaultConfig { - get => new ParticleNamedValueConfiguration_tImpl(_Handle + Schema.GetOffset(0x740B6BEF05A58128)); + get => new ParticleNamedValueConfiguration_tImpl(_Handle + _DefaultConfigOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleNode_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleNode_tImpl.cs index bfb5f24eb..577d27ca9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleNode_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticleNode_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class ParticleNode_tImpl : SchemaClass, ParticleNode_t { public ParticleNode_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _EntityOffset = new(() => Schema.GetOffset(0xBECF421C6EBADCB0), LazyThreadSafetyMode.None); + public ref CHandle Entity { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBECF421C6EBADCB0)); + get => ref _Handle.AsRef>(_EntityOffset.Value); } + private static readonly Lazy _IndexOffset = new(() => Schema.GetOffset(0xBECF421C8F270140), LazyThreadSafetyMode.None); + public ParticleIndex_t Index { - get => new ParticleIndex_tImpl(_Handle + Schema.GetOffset(0xBECF421C8F270140)); + get => new ParticleIndex_tImpl(_Handle + _IndexOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0xBECF421C67FE9DC4), LazyThreadSafetyMode.None); + public GameTime_t StartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xBECF421C67FE9DC4)); + get => new GameTime_tImpl(_Handle + _StartTimeOffset.Value); } + private static readonly Lazy _GrowthDurationOffset = new(() => Schema.GetOffset(0xBECF421CF0D91F70), LazyThreadSafetyMode.None); + public ref float GrowthDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0xBECF421CF0D91F70)); + get => ref _Handle.AsRef(_GrowthDurationOffset.Value); } + private static readonly Lazy _GrowthOriginOffset = new(() => Schema.GetOffset(0xBECF421C4A651090), LazyThreadSafetyMode.None); + public ref Vector GrowthOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0xBECF421C4A651090)); + get => ref _Handle.AsRef(_GrowthOriginOffset.Value); } + private static readonly Lazy _EndcapTimeOffset = new(() => Schema.GetOffset(0xBECF421CCF1342BD), LazyThreadSafetyMode.None); + public ref float EndcapTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xBECF421CCF1342BD)); + get => ref _Handle.AsRef(_EndcapTimeOffset.Value); } + private static readonly Lazy _MarkedForDeleteOffset = new(() => Schema.GetOffset(0xBECF421C6C9EC48F), LazyThreadSafetyMode.None); + public ref bool MarkedForDelete { - get => ref _Handle.AsRef(Schema.GetOffset(0xBECF421C6C9EC48F)); + get => ref _Handle.AsRef(_MarkedForDeleteOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticlePreviewBodyGroup_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticlePreviewBodyGroup_tImpl.cs index e741eae0c..5b1654433 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticlePreviewBodyGroup_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticlePreviewBodyGroup_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class ParticlePreviewBodyGroup_tImpl : SchemaClass, ParticlePre public ParticlePreviewBodyGroup_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BodyGroupNameOffset = new(() => Schema.GetOffset(0xB53436EB1E953217), LazyThreadSafetyMode.None); + public string BodyGroupName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB53436EB1E953217)); + var ptr = _Handle.Read(_BodyGroupNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB53436EB1E953217, value); + set => Schema.SetString(_Handle, _BodyGroupNameOffset.Value, value); } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xB53436EB077D337E), LazyThreadSafetyMode.None); + public ref int Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xB53436EB077D337E)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticlePreviewState_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticlePreviewState_tImpl.cs index 1658a34b8..965e64a9f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticlePreviewState_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ParticlePreviewState_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,72 +17,106 @@ internal partial class ParticlePreviewState_tImpl : SchemaClass, ParticlePreview public ParticlePreviewState_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _PreviewModelOffset = new(() => Schema.GetOffset(0x31FB1901BC4FDC14), LazyThreadSafetyMode.None); + public string PreviewModel { get { - var ptr = _Handle.Read(Schema.GetOffset(0x31FB1901BC4FDC14)); + var ptr = _Handle.Read(_PreviewModelOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x31FB1901BC4FDC14, value); + set => Schema.SetString(_Handle, _PreviewModelOffset.Value, value); } + private static readonly Lazy _ModSpecificDataOffset = new(() => Schema.GetOffset(0x31FB19011580A6CB), LazyThreadSafetyMode.None); + public ref uint ModSpecificData { - get => ref _Handle.AsRef(Schema.GetOffset(0x31FB19011580A6CB)); + get => ref _Handle.AsRef(_ModSpecificDataOffset.Value); } + private static readonly Lazy _GroundTypeOffset = new(() => Schema.GetOffset(0x31FB190132DE357E), LazyThreadSafetyMode.None); + public ref PetGroundType_t GroundType { - get => ref _Handle.AsRef(Schema.GetOffset(0x31FB190132DE357E)); + get => ref _Handle.AsRef(_GroundTypeOffset.Value); } + private static readonly Lazy _SequenceNameOffset = new(() => Schema.GetOffset(0x31FB19012B4A24CB), LazyThreadSafetyMode.None); + public string SequenceName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x31FB19012B4A24CB)); + var ptr = _Handle.Read(_SequenceNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x31FB19012B4A24CB, value); + set => Schema.SetString(_Handle, _SequenceNameOffset.Value, value); } + private static readonly Lazy _FireParticleOnSequenceFrameOffset = new(() => Schema.GetOffset(0x31FB19014432CB48), LazyThreadSafetyMode.None); + public ref int FireParticleOnSequenceFrame { - get => ref _Handle.AsRef(Schema.GetOffset(0x31FB19014432CB48)); + get => ref _Handle.AsRef(_FireParticleOnSequenceFrameOffset.Value); } + private static readonly Lazy _HitboxSetNameOffset = new(() => Schema.GetOffset(0x31FB19011ACA1CAE), LazyThreadSafetyMode.None); + public string HitboxSetName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x31FB19011ACA1CAE)); + var ptr = _Handle.Read(_HitboxSetNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x31FB19011ACA1CAE, value); + set => Schema.SetString(_Handle, _HitboxSetNameOffset.Value, value); } + private static readonly Lazy _MaterialGroupNameOffset = new(() => Schema.GetOffset(0x31FB1901A6930C68), LazyThreadSafetyMode.None); + public string MaterialGroupName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x31FB1901A6930C68)); + var ptr = _Handle.Read(_MaterialGroupNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x31FB1901A6930C68, value); + set => Schema.SetString(_Handle, _MaterialGroupNameOffset.Value, value); } + private static readonly Lazy _BodyGroupsOffset = new(() => Schema.GetOffset(0x31FB1901893FA01D), LazyThreadSafetyMode.None); + public ref CUtlVector BodyGroups { - get => ref _Handle.AsRef>(Schema.GetOffset(0x31FB1901893FA01D)); + get => ref _Handle.AsRef>(_BodyGroupsOffset.Value); } + private static readonly Lazy _PlaybackSpeedOffset = new(() => Schema.GetOffset(0x31FB1901FA2B402D), LazyThreadSafetyMode.None); + public ref float PlaybackSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x31FB1901FA2B402D)); + get => ref _Handle.AsRef(_PlaybackSpeedOffset.Value); } + private static readonly Lazy _ParticleSimulationRateOffset = new(() => Schema.GetOffset(0x31FB1901F9FAF9E0), LazyThreadSafetyMode.None); + public ref float ParticleSimulationRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x31FB1901F9FAF9E0)); + get => ref _Handle.AsRef(_ParticleSimulationRateOffset.Value); } + private static readonly Lazy _ShouldDrawHitboxesOffset = new(() => Schema.GetOffset(0x31FB19016D95117E), LazyThreadSafetyMode.None); + public ref bool ShouldDrawHitboxes { - get => ref _Handle.AsRef(Schema.GetOffset(0x31FB19016D95117E)); + get => ref _Handle.AsRef(_ShouldDrawHitboxesOffset.Value); } + private static readonly Lazy _ShouldDrawAttachmentsOffset = new(() => Schema.GetOffset(0x31FB19014EC43A36), LazyThreadSafetyMode.None); + public ref bool ShouldDrawAttachments { - get => ref _Handle.AsRef(Schema.GetOffset(0x31FB19014EC43A36)); + get => ref _Handle.AsRef(_ShouldDrawAttachmentsOffset.Value); } + private static readonly Lazy _ShouldDrawAttachmentNamesOffset = new(() => Schema.GetOffset(0x31FB1901177CB28B), LazyThreadSafetyMode.None); + public ref bool ShouldDrawAttachmentNames { - get => ref _Handle.AsRef(Schema.GetOffset(0x31FB1901177CB28B)); + get => ref _Handle.AsRef(_ShouldDrawAttachmentNamesOffset.Value); } + private static readonly Lazy _ShouldDrawControlPointAxesOffset = new(() => Schema.GetOffset(0x31FB1901A6A34D38), LazyThreadSafetyMode.None); + public ref bool ShouldDrawControlPointAxes { - get => ref _Handle.AsRef(Schema.GetOffset(0x31FB1901A6A34D38)); + get => ref _Handle.AsRef(_ShouldDrawControlPointAxesOffset.Value); } + private static readonly Lazy _AnimationNonLoopingOffset = new(() => Schema.GetOffset(0x31FB1901F0071FD6), LazyThreadSafetyMode.None); + public ref bool AnimationNonLooping { - get => ref _Handle.AsRef(Schema.GetOffset(0x31FB1901F0071FD6)); + get => ref _Handle.AsRef(_AnimationNonLoopingOffset.Value); } + private static readonly Lazy _SequenceNameIsAnimClipPathOffset = new(() => Schema.GetOffset(0x31FB19013BFE81C7), LazyThreadSafetyMode.None); + public ref bool SequenceNameIsAnimClipPath { - get => ref _Handle.AsRef(Schema.GetOffset(0x31FB19013BFE81C7)); + get => ref _Handle.AsRef(_SequenceNameIsAnimClipPathOffset.Value); } + private static readonly Lazy _PreviewGravityOffset = new(() => Schema.GetOffset(0x31FB1901A6B7913F), LazyThreadSafetyMode.None); + public ref Vector PreviewGravity { - get => ref _Handle.AsRef(Schema.GetOffset(0x31FB1901A6B7913F)); + get => ref _Handle.AsRef(_PreviewGravityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermEntityLumpData_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermEntityLumpData_tImpl.cs index a7faa4b1c..1e7fe2938 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermEntityLumpData_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermEntityLumpData_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class PermEntityLumpData_tImpl : SchemaClass, PermEntityLumpDat public PermEntityLumpData_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x47DA25F14D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x47DA25F14D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x47DA25F14D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _ChildLumpsOffset = new(() => Schema.GetOffset(0x47DA25F1AFDAF56C), LazyThreadSafetyMode.None); + public ref CUtlVector> ChildLumps { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x47DA25F1AFDAF56C)); + get => ref _Handle.AsRef>>(_ChildLumpsOffset.Value); } + private static readonly Lazy _EntityKeyValuesOffset = new(() => Schema.GetOffset(0x47DA25F1DBD62937), LazyThreadSafetyMode.None); + public ref CUtlLeanVector EntityKeyValues { - get => ref _Handle.AsRef>(Schema.GetOffset(0x47DA25F1DBD62937)); + get => ref _Handle.AsRef>(_EntityKeyValuesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermModelDataAnimatedMaterialAttribute_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermModelDataAnimatedMaterialAttribute_tImpl.cs index 1c131ecf3..5707f2831 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermModelDataAnimatedMaterialAttribute_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermModelDataAnimatedMaterialAttribute_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class PermModelDataAnimatedMaterialAttribute_tImpl : SchemaClas public PermModelDataAnimatedMaterialAttribute_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _AttributeNameOffset = new(() => Schema.GetOffset(0x6489C15F1408864C), LazyThreadSafetyMode.None); + public string AttributeName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6489C15F1408864C)); + var ptr = _Handle.Read(_AttributeNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6489C15F1408864C, value); + set => Schema.SetString(_Handle, _AttributeNameOffset.Value, value); } + private static readonly Lazy _NumChannelsOffset = new(() => Schema.GetOffset(0x6489C15FEA44FE77), LazyThreadSafetyMode.None); + public ref int NumChannels { - get => ref _Handle.AsRef(Schema.GetOffset(0x6489C15FEA44FE77)); + get => ref _Handle.AsRef(_NumChannelsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermModelData_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermModelData_tImpl.cs index 28a00c937..5f05ac0f9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermModelData_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermModelData_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,81 +17,127 @@ internal partial class PermModelData_tImpl : SchemaClass, PermModelData_t { public PermModelData_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x3E367D0B4D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x3E367D0B4D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x3E367D0B4D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _ModelInfoOffset = new(() => Schema.GetOffset(0x3E367D0B506D8FE2), LazyThreadSafetyMode.None); + public PermModelInfo_t ModelInfo { - get => new PermModelInfo_tImpl(_Handle + Schema.GetOffset(0x3E367D0B506D8FE2)); + get => new PermModelInfo_tImpl(_Handle + _ModelInfoOffset.Value); } + private static readonly Lazy _ExtPartsOffset = new(() => Schema.GetOffset(0x3E367D0B8564C2A6), LazyThreadSafetyMode.None); + public ref CUtlVector ExtParts { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3E367D0B8564C2A6)); + get => ref _Handle.AsRef>(_ExtPartsOffset.Value); } + private static readonly Lazy _RefMeshesOffset = new(() => Schema.GetOffset(0x3E367D0B9FB3727B), LazyThreadSafetyMode.None); + public ref CUtlVector> RefMeshes { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x3E367D0B9FB3727B)); + get => ref _Handle.AsRef>>(_RefMeshesOffset.Value); } + private static readonly Lazy _RefMeshGroupMasksOffset = new(() => Schema.GetOffset(0x3E367D0BDC56A19B), LazyThreadSafetyMode.None); + public ref CUtlVector RefMeshGroupMasks { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3E367D0BDC56A19B)); + get => ref _Handle.AsRef>(_RefMeshGroupMasksOffset.Value); } + private static readonly Lazy _RefPhysGroupMasksOffset = new(() => Schema.GetOffset(0x3E367D0B902CAAFA), LazyThreadSafetyMode.None); + public ref CUtlVector RefPhysGroupMasks { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3E367D0B902CAAFA)); + get => ref _Handle.AsRef>(_RefPhysGroupMasksOffset.Value); } + private static readonly Lazy _RefLODGroupMasksOffset = new(() => Schema.GetOffset(0x3E367D0B0FCE2099), LazyThreadSafetyMode.None); + public ref CUtlVector RefLODGroupMasks { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3E367D0B0FCE2099)); + get => ref _Handle.AsRef>(_RefLODGroupMasksOffset.Value); } + private static readonly Lazy _LodGroupSwitchDistancesOffset = new(() => Schema.GetOffset(0x3E367D0B52CCDE75), LazyThreadSafetyMode.None); + public ref CUtlVector LodGroupSwitchDistances { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3E367D0B52CCDE75)); + get => ref _Handle.AsRef>(_LodGroupSwitchDistancesOffset.Value); } + private static readonly Lazy _RefPhysicsDataOffset = new(() => Schema.GetOffset(0x3E367D0BF18951CB), LazyThreadSafetyMode.None); + public ref CUtlVector> RefPhysicsData { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x3E367D0BF18951CB)); + get => ref _Handle.AsRef>>(_RefPhysicsDataOffset.Value); } + private static readonly Lazy _RefPhysicsHitboxDataOffset = new(() => Schema.GetOffset(0x3E367D0B26C451DD), LazyThreadSafetyMode.None); + public ref CUtlVector> RefPhysicsHitboxData { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x3E367D0B26C451DD)); + get => ref _Handle.AsRef>>(_RefPhysicsHitboxDataOffset.Value); } + private static readonly Lazy _RefAnimGroupsOffset = new(() => Schema.GetOffset(0x3E367D0BDC24F793), LazyThreadSafetyMode.None); + public ref CUtlVector> RefAnimGroups { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x3E367D0BDC24F793)); + get => ref _Handle.AsRef>>(_RefAnimGroupsOffset.Value); } + private static readonly Lazy _RefSequenceGroupsOffset = new(() => Schema.GetOffset(0x3E367D0B823AD8A3), LazyThreadSafetyMode.None); + public ref CUtlVector> RefSequenceGroups { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x3E367D0B823AD8A3)); + get => ref _Handle.AsRef>>(_RefSequenceGroupsOffset.Value); } + private static readonly Lazy _MeshGroupsOffset = new(() => Schema.GetOffset(0x3E367D0B3EF7CCF4), LazyThreadSafetyMode.None); + public ref CUtlVector MeshGroups { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3E367D0B3EF7CCF4)); + get => ref _Handle.AsRef>(_MeshGroupsOffset.Value); } + private static readonly Lazy _MaterialGroupsOffset = new(() => Schema.GetOffset(0x3E367D0BDD36CD50), LazyThreadSafetyMode.None); + public ref CUtlVector MaterialGroups { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3E367D0BDD36CD50)); + get => ref _Handle.AsRef>(_MaterialGroupsOffset.Value); } + private static readonly Lazy _DefaultMeshGroupMaskOffset = new(() => Schema.GetOffset(0x3E367D0B7320202A), LazyThreadSafetyMode.None); + public ref ulong DefaultMeshGroupMask { - get => ref _Handle.AsRef(Schema.GetOffset(0x3E367D0B7320202A)); + get => ref _Handle.AsRef(_DefaultMeshGroupMaskOffset.Value); } + private static readonly Lazy _ModelSkeletonOffset = new(() => Schema.GetOffset(0x3E367D0BAFF3E579), LazyThreadSafetyMode.None); + public ModelSkeletonData_t ModelSkeleton { - get => new ModelSkeletonData_tImpl(_Handle + Schema.GetOffset(0x3E367D0BAFF3E579)); + get => new ModelSkeletonData_tImpl(_Handle + _ModelSkeletonOffset.Value); } + private static readonly Lazy _RemappingTableOffset = new(() => Schema.GetOffset(0x3E367D0B2AA12BB2), LazyThreadSafetyMode.None); + public ref CUtlVector RemappingTable { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3E367D0B2AA12BB2)); + get => ref _Handle.AsRef>(_RemappingTableOffset.Value); } + private static readonly Lazy _RemappingTableStartsOffset = new(() => Schema.GetOffset(0x3E367D0BE4304DFB), LazyThreadSafetyMode.None); + public ref CUtlVector RemappingTableStarts { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3E367D0BE4304DFB)); + get => ref _Handle.AsRef>(_RemappingTableStartsOffset.Value); } + private static readonly Lazy _BoneFlexDriversOffset = new(() => Schema.GetOffset(0x3E367D0B3670337F), LazyThreadSafetyMode.None); + public ref CUtlVector BoneFlexDrivers { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3E367D0B3670337F)); + get => ref _Handle.AsRef>(_BoneFlexDriversOffset.Value); } + private static readonly Lazy _ModelConfigListOffset = new(() => Schema.GetOffset(0x3E367D0B99085156), LazyThreadSafetyMode.None); + public CModelConfigList? ModelConfigList { get { - var ptr = _Handle.Read(Schema.GetOffset(0x3E367D0B99085156)); + var ptr = _Handle.Read(_ModelConfigListOffset.Value); return ptr.IsValidPtr() ? new CModelConfigListImpl(ptr) : null; } } + private static readonly Lazy _BodyGroupsHiddenInToolsOffset = new(() => Schema.GetOffset(0x3E367D0BE312FA8D), LazyThreadSafetyMode.None); + public ref CUtlVector BodyGroupsHiddenInTools { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3E367D0BE312FA8D)); + get => ref _Handle.AsRef>(_BodyGroupsHiddenInToolsOffset.Value); } + private static readonly Lazy _RefAnimIncludeModelsOffset = new(() => Schema.GetOffset(0x3E367D0BD99121D7), LazyThreadSafetyMode.None); + public ref CUtlVector> RefAnimIncludeModels { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x3E367D0BD99121D7)); + get => ref _Handle.AsRef>>(_RefAnimIncludeModelsOffset.Value); } + private static readonly Lazy _AnimatedMaterialAttributesOffset = new(() => Schema.GetOffset(0x3E367D0BC29D5124), LazyThreadSafetyMode.None); + public ref CUtlVector AnimatedMaterialAttributes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3E367D0BC29D5124)); + get => ref _Handle.AsRef>(_AnimatedMaterialAttributesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermModelExtPart_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermModelExtPart_tImpl.cs index 83e21468b..6fbb0c78e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermModelExtPart_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermModelExtPart_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,21 +17,29 @@ internal partial class PermModelExtPart_tImpl : SchemaClass, PermModelExtPart_t public PermModelExtPart_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TransformOffset = new(() => Schema.GetOffset(0xCA30851D6EC5209B), LazyThreadSafetyMode.None); + public ref CTransform Transform { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA30851D6EC5209B)); + get => ref _Handle.AsRef(_TransformOffset.Value); } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xCA30851DCAE8A266), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xCA30851DCAE8A266)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xCA30851DCAE8A266, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _ParentOffset = new(() => Schema.GetOffset(0xCA30851D0AABB9D1), LazyThreadSafetyMode.None); + public ref int Parent { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA30851D0AABB9D1)); + get => ref _Handle.AsRef(_ParentOffset.Value); } + private static readonly Lazy _RefModelOffset = new(() => Schema.GetOffset(0xCA30851D63E6E3DF), LazyThreadSafetyMode.None); + public ref CStrongHandle RefModel { - get => ref _Handle.AsRef>(Schema.GetOffset(0xCA30851D63E6E3DF)); + get => ref _Handle.AsRef>(_RefModelOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermModelInfo_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermModelInfo_tImpl.cs index 9e59c03c9..fbc76c185 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermModelInfo_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PermModelInfo_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,43 +17,63 @@ internal partial class PermModelInfo_tImpl : SchemaClass, PermModelInfo_t { public PermModelInfo_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x1B48585FCE6E9C28), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x1B48585FCE6E9C28)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _HullMinOffset = new(() => Schema.GetOffset(0x1B48585FAC1193D6), LazyThreadSafetyMode.None); + public ref Vector HullMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x1B48585FAC1193D6)); + get => ref _Handle.AsRef(_HullMinOffset.Value); } + private static readonly Lazy _HullMaxOffset = new(() => Schema.GetOffset(0x1B48585F9E269884), LazyThreadSafetyMode.None); + public ref Vector HullMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x1B48585F9E269884)); + get => ref _Handle.AsRef(_HullMaxOffset.Value); } + private static readonly Lazy _ViewMinOffset = new(() => Schema.GetOffset(0x1B48585F22A936E8), LazyThreadSafetyMode.None); + public ref Vector ViewMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x1B48585F22A936E8)); + get => ref _Handle.AsRef(_ViewMinOffset.Value); } + private static readonly Lazy _ViewMaxOffset = new(() => Schema.GetOffset(0x1B48585F18BCAEE2), LazyThreadSafetyMode.None); + public ref Vector ViewMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x1B48585F18BCAEE2)); + get => ref _Handle.AsRef(_ViewMaxOffset.Value); } + private static readonly Lazy _MassOffset = new(() => Schema.GetOffset(0x1B48585FCD83D263), LazyThreadSafetyMode.None); + public ref float Mass { - get => ref _Handle.AsRef(Schema.GetOffset(0x1B48585FCD83D263)); + get => ref _Handle.AsRef(_MassOffset.Value); } + private static readonly Lazy _EyePositionOffset = new(() => Schema.GetOffset(0x1B48585FA0F51EB1), LazyThreadSafetyMode.None); + public ref Vector EyePosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x1B48585FA0F51EB1)); + get => ref _Handle.AsRef(_EyePositionOffset.Value); } + private static readonly Lazy _MaxEyeDeflectionOffset = new(() => Schema.GetOffset(0x1B48585F1C6CE157), LazyThreadSafetyMode.None); + public ref float MaxEyeDeflection { - get => ref _Handle.AsRef(Schema.GetOffset(0x1B48585F1C6CE157)); + get => ref _Handle.AsRef(_MaxEyeDeflectionOffset.Value); } + private static readonly Lazy _SurfacePropertyOffset = new(() => Schema.GetOffset(0x1B48585F1A25534C), LazyThreadSafetyMode.None); + public string SurfaceProperty { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1B48585F1A25534C)); + var ptr = _Handle.Read(_SurfacePropertyOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1B48585F1A25534C, value); + set => Schema.SetString(_Handle, _SurfacePropertyOffset.Value, value); } + private static readonly Lazy _KeyValueTextOffset = new(() => Schema.GetOffset(0x1B48585F2156929E), LazyThreadSafetyMode.None); + public string KeyValueText { get { - var ptr = _Handle.Read(Schema.GetOffset(0x1B48585F2156929E)); + var ptr = _Handle.Read(_KeyValueTextOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x1B48585F2156929E, value); + set => Schema.SetString(_Handle, _KeyValueTextOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysFeModelDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysFeModelDesc_tImpl.cs index acdd65a1d..c0961530d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysFeModelDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysFeModelDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,329 +17,545 @@ internal partial class PhysFeModelDesc_tImpl : SchemaClass, PhysFeModelDesc_t { public PhysFeModelDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CtrlHashOffset = new(() => Schema.GetOffset(0x1BA439272E1897A4), LazyThreadSafetyMode.None); + public ref CUtlVector CtrlHash { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439272E1897A4)); + get => ref _Handle.AsRef>(_CtrlHashOffset.Value); } + private static readonly Lazy _CtrlNameOffset = new(() => Schema.GetOffset(0x1BA4392720EBC8FF), LazyThreadSafetyMode.None); + public ref CUtlVector CtrlName { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA4392720EBC8FF)); + get => ref _Handle.AsRef>(_CtrlNameOffset.Value); } + private static readonly Lazy _StaticNodeFlagsOffset = new(() => Schema.GetOffset(0x1BA43927491F024E), LazyThreadSafetyMode.None); + public ref uint StaticNodeFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA43927491F024E)); + get => ref _Handle.AsRef(_StaticNodeFlagsOffset.Value); } + private static readonly Lazy _DynamicNodeFlagsOffset = new(() => Schema.GetOffset(0x1BA439274F6F7661), LazyThreadSafetyMode.None); + public ref uint DynamicNodeFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA439274F6F7661)); + get => ref _Handle.AsRef(_DynamicNodeFlagsOffset.Value); } + private static readonly Lazy _LocalForceOffset = new(() => Schema.GetOffset(0x1BA439275E779595), LazyThreadSafetyMode.None); + public ref float LocalForce { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA439275E779595)); + get => ref _Handle.AsRef(_LocalForceOffset.Value); } + private static readonly Lazy _LocalRotationOffset = new(() => Schema.GetOffset(0x1BA4392731E3CCB4), LazyThreadSafetyMode.None); + public ref float LocalRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA4392731E3CCB4)); + get => ref _Handle.AsRef(_LocalRotationOffset.Value); } + private static readonly Lazy _NodeCountOffset = new(() => Schema.GetOffset(0x1BA4392709F73A00), LazyThreadSafetyMode.None); + public ref ushort NodeCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA4392709F73A00)); + get => ref _Handle.AsRef(_NodeCountOffset.Value); } + private static readonly Lazy _StaticNodesOffset = new(() => Schema.GetOffset(0x1BA43927A58AC0EC), LazyThreadSafetyMode.None); + public ref ushort StaticNodes { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA43927A58AC0EC)); + get => ref _Handle.AsRef(_StaticNodesOffset.Value); } + private static readonly Lazy _RotLockStaticNodesOffset = new(() => Schema.GetOffset(0x1BA43927B63C3930), LazyThreadSafetyMode.None); + public ref ushort RotLockStaticNodes { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA43927B63C3930)); + get => ref _Handle.AsRef(_RotLockStaticNodesOffset.Value); } + private static readonly Lazy _FirstPositionDrivenNodeOffset = new(() => Schema.GetOffset(0x1BA439272E0F5D4C), LazyThreadSafetyMode.None); + public ref ushort FirstPositionDrivenNode { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA439272E0F5D4C)); + get => ref _Handle.AsRef(_FirstPositionDrivenNodeOffset.Value); } + private static readonly Lazy _SimdTriCount1Offset = new(() => Schema.GetOffset(0x1BA439274F73E5EF), LazyThreadSafetyMode.None); + public ref ushort SimdTriCount1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA439274F73E5EF)); + get => ref _Handle.AsRef(_SimdTriCount1Offset.Value); } + private static readonly Lazy _SimdTriCount2Offset = new(() => Schema.GetOffset(0x1BA439275073E782), LazyThreadSafetyMode.None); + public ref ushort SimdTriCount2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA439275073E782)); + get => ref _Handle.AsRef(_SimdTriCount2Offset.Value); } + private static readonly Lazy _SimdQuadCount1Offset = new(() => Schema.GetOffset(0x1BA439275BC6C099), LazyThreadSafetyMode.None); + public ref ushort SimdQuadCount1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA439275BC6C099)); + get => ref _Handle.AsRef(_SimdQuadCount1Offset.Value); } + private static readonly Lazy _SimdQuadCount2Offset = new(() => Schema.GetOffset(0x1BA4392758C6BBE0), LazyThreadSafetyMode.None); + public ref ushort SimdQuadCount2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA4392758C6BBE0)); + get => ref _Handle.AsRef(_SimdQuadCount2Offset.Value); } + private static readonly Lazy _QuadCount1Offset = new(() => Schema.GetOffset(0x1BA439273BC36C10), LazyThreadSafetyMode.None); + public ref ushort QuadCount1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA439273BC36C10)); + get => ref _Handle.AsRef(_QuadCount1Offset.Value); } + private static readonly Lazy _QuadCount2Offset = new(() => Schema.GetOffset(0x1BA439273EC370C9), LazyThreadSafetyMode.None); + public ref ushort QuadCount2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA439273EC370C9)); + get => ref _Handle.AsRef(_QuadCount2Offset.Value); } + private static readonly Lazy _TreeDepthOffset = new(() => Schema.GetOffset(0x1BA439271295DF6E), LazyThreadSafetyMode.None); + public ref ushort TreeDepth { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA439271295DF6E)); + get => ref _Handle.AsRef(_TreeDepthOffset.Value); } + private static readonly Lazy _NodeBaseJiggleboneDependsCountOffset = new(() => Schema.GetOffset(0x1BA439277F14AD2C), LazyThreadSafetyMode.None); + public ref ushort NodeBaseJiggleboneDependsCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA439277F14AD2C)); + get => ref _Handle.AsRef(_NodeBaseJiggleboneDependsCountOffset.Value); } + private static readonly Lazy _RopeCountOffset = new(() => Schema.GetOffset(0x1BA43927DC972C90), LazyThreadSafetyMode.None); + public ref ushort RopeCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA43927DC972C90)); + get => ref _Handle.AsRef(_RopeCountOffset.Value); } + private static readonly Lazy _RopesOffset = new(() => Schema.GetOffset(0x1BA43927245D4F7A), LazyThreadSafetyMode.None); + public ref CUtlVector Ropes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927245D4F7A)); + get => ref _Handle.AsRef>(_RopesOffset.Value); } + private static readonly Lazy _NodeBasesOffset = new(() => Schema.GetOffset(0x1BA43927D78A7829), LazyThreadSafetyMode.None); + public ref CUtlVector NodeBases { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927D78A7829)); + get => ref _Handle.AsRef>(_NodeBasesOffset.Value); } + private static readonly Lazy _SimdNodeBasesOffset = new(() => Schema.GetOffset(0x1BA439276CEB34CE), LazyThreadSafetyMode.None); + public ref CUtlVector SimdNodeBases { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439276CEB34CE)); + get => ref _Handle.AsRef>(_SimdNodeBasesOffset.Value); } + private static readonly Lazy _QuadsOffset = new(() => Schema.GetOffset(0x1BA43927F0B96887), LazyThreadSafetyMode.None); + public ref CUtlVector Quads { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927F0B96887)); + get => ref _Handle.AsRef>(_QuadsOffset.Value); } + private static readonly Lazy _SimdQuadsOffset = new(() => Schema.GetOffset(0x1BA439272A528AEC), LazyThreadSafetyMode.None); + public ref CUtlVector SimdQuads { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439272A528AEC)); + get => ref _Handle.AsRef>(_SimdQuadsOffset.Value); } + private static readonly Lazy _SimdTrisOffset = new(() => Schema.GetOffset(0x1BA4392708B7DB8E), LazyThreadSafetyMode.None); + public ref CUtlVector SimdTris { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA4392708B7DB8E)); + get => ref _Handle.AsRef>(_SimdTrisOffset.Value); } + private static readonly Lazy _SimdRodsOffset = new(() => Schema.GetOffset(0x1BA4392772C6F02A), LazyThreadSafetyMode.None); + public ref CUtlVector SimdRods { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA4392772C6F02A)); + get => ref _Handle.AsRef>(_SimdRodsOffset.Value); } + private static readonly Lazy _SimdRodsAnimOffset = new(() => Schema.GetOffset(0x1BA439272F796453), LazyThreadSafetyMode.None); + public ref CUtlVector SimdRodsAnim { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439272F796453)); + get => ref _Handle.AsRef>(_SimdRodsAnimOffset.Value); } + private static readonly Lazy _InitPoseOffset = new(() => Schema.GetOffset(0x1BA439275E468732), LazyThreadSafetyMode.None); + public ref CUtlVector InitPose { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439275E468732)); + get => ref _Handle.AsRef>(_InitPoseOffset.Value); } + private static readonly Lazy _RodsOffset = new(() => Schema.GetOffset(0x1BA439276FC1D3D7), LazyThreadSafetyMode.None); + public ref CUtlVector Rods { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439276FC1D3D7)); + get => ref _Handle.AsRef>(_RodsOffset.Value); } + private static readonly Lazy _TwistsOffset = new(() => Schema.GetOffset(0x1BA439272079B489), LazyThreadSafetyMode.None); + public ref CUtlVector Twists { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439272079B489)); + get => ref _Handle.AsRef>(_TwistsOffset.Value); } + private static readonly Lazy _HingeLimitsOffset = new(() => Schema.GetOffset(0x1BA43927EDFF16F4), LazyThreadSafetyMode.None); + public ref CUtlVector HingeLimits { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927EDFF16F4)); + get => ref _Handle.AsRef>(_HingeLimitsOffset.Value); } + private static readonly Lazy _AntiTunnelBytecodeOffset = new(() => Schema.GetOffset(0x1BA43927FD33DEEC), LazyThreadSafetyMode.None); + public ref CUtlVector AntiTunnelBytecode { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927FD33DEEC)); + get => ref _Handle.AsRef>(_AntiTunnelBytecodeOffset.Value); } + private static readonly Lazy _DynKinLinksOffset = new(() => Schema.GetOffset(0x1BA439271F3CC98B), LazyThreadSafetyMode.None); + public ref CUtlVector DynKinLinks { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439271F3CC98B)); + get => ref _Handle.AsRef>(_DynKinLinksOffset.Value); } + private static readonly Lazy _AntiTunnelProbesOffset = new(() => Schema.GetOffset(0x1BA43927E34A5328), LazyThreadSafetyMode.None); + public ref CUtlVector AntiTunnelProbes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927E34A5328)); + get => ref _Handle.AsRef>(_AntiTunnelProbesOffset.Value); } + private static readonly Lazy _AntiTunnelTargetNodesOffset = new(() => Schema.GetOffset(0x1BA439275AB2DCE7), LazyThreadSafetyMode.None); + public ref CUtlVector AntiTunnelTargetNodes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439275AB2DCE7)); + get => ref _Handle.AsRef>(_AntiTunnelTargetNodesOffset.Value); } + private static readonly Lazy _AxialEdgesOffset = new(() => Schema.GetOffset(0x1BA43927DE90F268), LazyThreadSafetyMode.None); + public ref CUtlVector AxialEdges { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927DE90F268)); + get => ref _Handle.AsRef>(_AxialEdgesOffset.Value); } + private static readonly Lazy _NodeInvMassesOffset = new(() => Schema.GetOffset(0x1BA439274BC4CE04), LazyThreadSafetyMode.None); + public ref CUtlVector NodeInvMasses { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439274BC4CE04)); + get => ref _Handle.AsRef>(_NodeInvMassesOffset.Value); } + private static readonly Lazy _CtrlOffsetsOffset = new(() => Schema.GetOffset(0x1BA43927C1ACD824), LazyThreadSafetyMode.None); + public ref CUtlVector CtrlOffsets { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927C1ACD824)); + get => ref _Handle.AsRef>(_CtrlOffsetsOffset.Value); } + private static readonly Lazy _CtrlOsOffsetsOffset = new(() => Schema.GetOffset(0x1BA43927C7290656), LazyThreadSafetyMode.None); + public ref CUtlVector CtrlOsOffsets { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927C7290656)); + get => ref _Handle.AsRef>(_CtrlOsOffsetsOffset.Value); } + private static readonly Lazy _FollowNodesOffset = new(() => Schema.GetOffset(0x1BA43927ECF0783D), LazyThreadSafetyMode.None); + public ref CUtlVector FollowNodes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927ECF0783D)); + get => ref _Handle.AsRef>(_FollowNodesOffset.Value); } + private static readonly Lazy _CollisionPlanesOffset = new(() => Schema.GetOffset(0x1BA43927B367BFCC), LazyThreadSafetyMode.None); + public ref CUtlVector CollisionPlanes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927B367BFCC)); + get => ref _Handle.AsRef>(_CollisionPlanesOffset.Value); } + private static readonly Lazy _NodeIntegratorOffset = new(() => Schema.GetOffset(0x1BA43927940C5E1C), LazyThreadSafetyMode.None); + public ref CUtlVector NodeIntegrator { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927940C5E1C)); + get => ref _Handle.AsRef>(_NodeIntegratorOffset.Value); } + private static readonly Lazy _SpringIntegratorOffset = new(() => Schema.GetOffset(0x1BA4392725EF8295), LazyThreadSafetyMode.None); + public ref CUtlVector SpringIntegrator { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA4392725EF8295)); + get => ref _Handle.AsRef>(_SpringIntegratorOffset.Value); } + private static readonly Lazy _SimdSpringIntegratorOffset = new(() => Schema.GetOffset(0x1BA439273755280C), LazyThreadSafetyMode.None); + public ref CUtlVector SimdSpringIntegrator { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439273755280C)); + get => ref _Handle.AsRef>(_SimdSpringIntegratorOffset.Value); } + private static readonly Lazy _WorldCollisionParamsOffset = new(() => Schema.GetOffset(0x1BA43927BF45BE03), LazyThreadSafetyMode.None); + public ref CUtlVector WorldCollisionParams { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927BF45BE03)); + get => ref _Handle.AsRef>(_WorldCollisionParamsOffset.Value); } + private static readonly Lazy _LegacyStretchForceOffset = new(() => Schema.GetOffset(0x1BA43927C7AB43F6), LazyThreadSafetyMode.None); + public ref CUtlVector LegacyStretchForce { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927C7AB43F6)); + get => ref _Handle.AsRef>(_LegacyStretchForceOffset.Value); } + private static readonly Lazy _NodeCollisionRadiiOffset = new(() => Schema.GetOffset(0x1BA43927CD59A3E0), LazyThreadSafetyMode.None); + public ref CUtlVector NodeCollisionRadii { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927CD59A3E0)); + get => ref _Handle.AsRef>(_NodeCollisionRadiiOffset.Value); } + private static readonly Lazy _DynNodeFrictionOffset = new(() => Schema.GetOffset(0x1BA43927B935608E), LazyThreadSafetyMode.None); + public ref CUtlVector DynNodeFriction { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927B935608E)); + get => ref _Handle.AsRef>(_DynNodeFrictionOffset.Value); } + private static readonly Lazy _LocalRotation1Offset = new(() => Schema.GetOffset(0x1BA439275A8DBCEE), LazyThreadSafetyMode.None); + public ref CUtlVector LocalRotation1 { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439275A8DBCEE)); + get => ref _Handle.AsRef>(_LocalRotation1Offset.Value); } + private static readonly Lazy _LocalForce2Offset = new(() => Schema.GetOffset(0x1BA439275274CF1B), LazyThreadSafetyMode.None); + public ref CUtlVector LocalForce2 { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439275274CF1B)); + get => ref _Handle.AsRef>(_LocalForce2Offset.Value); } + private static readonly Lazy _TaperedCapsuleStretchesOffset = new(() => Schema.GetOffset(0x1BA439271F019DBC), LazyThreadSafetyMode.None); + public ref CUtlVector TaperedCapsuleStretches { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439271F019DBC)); + get => ref _Handle.AsRef>(_TaperedCapsuleStretchesOffset.Value); } + private static readonly Lazy _TaperedCapsuleRigidsOffset = new(() => Schema.GetOffset(0x1BA43927F74D1937), LazyThreadSafetyMode.None); + public ref CUtlVector TaperedCapsuleRigids { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927F74D1937)); + get => ref _Handle.AsRef>(_TaperedCapsuleRigidsOffset.Value); } + private static readonly Lazy _SphereRigidsOffset = new(() => Schema.GetOffset(0x1BA43927BAF34488), LazyThreadSafetyMode.None); + public ref CUtlVector SphereRigids { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927BAF34488)); + get => ref _Handle.AsRef>(_SphereRigidsOffset.Value); } + private static readonly Lazy _WorldCollisionNodesOffset = new(() => Schema.GetOffset(0x1BA43927FF7871EA), LazyThreadSafetyMode.None); + public ref CUtlVector WorldCollisionNodes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927FF7871EA)); + get => ref _Handle.AsRef>(_WorldCollisionNodesOffset.Value); } + private static readonly Lazy _TreeParentsOffset = new(() => Schema.GetOffset(0x1BA43927BCB1115A), LazyThreadSafetyMode.None); + public ref CUtlVector TreeParents { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927BCB1115A)); + get => ref _Handle.AsRef>(_TreeParentsOffset.Value); } + private static readonly Lazy _TreeCollisionMasksOffset = new(() => Schema.GetOffset(0x1BA43927E89C96B8), LazyThreadSafetyMode.None); + public ref CUtlVector TreeCollisionMasks { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927E89C96B8)); + get => ref _Handle.AsRef>(_TreeCollisionMasksOffset.Value); } + private static readonly Lazy _TreeChildrenOffset = new(() => Schema.GetOffset(0x1BA43927FE09F5A2), LazyThreadSafetyMode.None); + public ref CUtlVector TreeChildren { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927FE09F5A2)); + get => ref _Handle.AsRef>(_TreeChildrenOffset.Value); } + private static readonly Lazy _FreeNodesOffset = new(() => Schema.GetOffset(0x1BA43927DBDC2128), LazyThreadSafetyMode.None); + public ref CUtlVector FreeNodes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927DBDC2128)); + get => ref _Handle.AsRef>(_FreeNodesOffset.Value); } + private static readonly Lazy _FitMatricesOffset = new(() => Schema.GetOffset(0x1BA439273EA416A0), LazyThreadSafetyMode.None); + public ref CUtlVector FitMatrices { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439273EA416A0)); + get => ref _Handle.AsRef>(_FitMatricesOffset.Value); } + private static readonly Lazy _FitWeightsOffset = new(() => Schema.GetOffset(0x1BA43927C7FF749D), LazyThreadSafetyMode.None); + public ref CUtlVector FitWeights { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927C7FF749D)); + get => ref _Handle.AsRef>(_FitWeightsOffset.Value); } + private static readonly Lazy _ReverseOffsetsOffset = new(() => Schema.GetOffset(0x1BA439274F76269B), LazyThreadSafetyMode.None); + public ref CUtlVector ReverseOffsets { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439274F76269B)); + get => ref _Handle.AsRef>(_ReverseOffsetsOffset.Value); } + private static readonly Lazy _AnimStrayRadiiOffset = new(() => Schema.GetOffset(0x1BA4392702505672), LazyThreadSafetyMode.None); + public ref CUtlVector AnimStrayRadii { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA4392702505672)); + get => ref _Handle.AsRef>(_AnimStrayRadiiOffset.Value); } + private static readonly Lazy _SimdAnimStrayRadiiOffset = new(() => Schema.GetOffset(0x1BA43927BD404343), LazyThreadSafetyMode.None); + public ref CUtlVector SimdAnimStrayRadii { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927BD404343)); + get => ref _Handle.AsRef>(_SimdAnimStrayRadiiOffset.Value); } + private static readonly Lazy _KelagerBendsOffset = new(() => Schema.GetOffset(0x1BA439279DE7A8A0), LazyThreadSafetyMode.None); + public ref CUtlVector KelagerBends { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439279DE7A8A0)); + get => ref _Handle.AsRef>(_KelagerBendsOffset.Value); } + private static readonly Lazy _CtrlSoftOffsetsOffset = new(() => Schema.GetOffset(0x1BA439278C66B564), LazyThreadSafetyMode.None); + public ref CUtlVector CtrlSoftOffsets { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439278C66B564)); + get => ref _Handle.AsRef>(_CtrlSoftOffsetsOffset.Value); } + private static readonly Lazy _JiggleBonesOffset = new(() => Schema.GetOffset(0x1BA439274F458BCC), LazyThreadSafetyMode.None); + public ref CUtlVector JiggleBones { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439274F458BCC)); + get => ref _Handle.AsRef>(_JiggleBonesOffset.Value); } + private static readonly Lazy _SourceElemsOffset = new(() => Schema.GetOffset(0x1BA43927CF1C9DB0), LazyThreadSafetyMode.None); + public ref CUtlVector SourceElems { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927CF1C9DB0)); + get => ref _Handle.AsRef>(_SourceElemsOffset.Value); } + private static readonly Lazy _GoalDampedSpringIntegratorsOffset = new(() => Schema.GetOffset(0x1BA4392770492CEE), LazyThreadSafetyMode.None); + public ref CUtlVector GoalDampedSpringIntegrators { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA4392770492CEE)); + get => ref _Handle.AsRef>(_GoalDampedSpringIntegratorsOffset.Value); } + private static readonly Lazy _TrisOffset = new(() => Schema.GetOffset(0x1BA43927AD4316D7), LazyThreadSafetyMode.None); + public ref CUtlVector Tris { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927AD4316D7)); + get => ref _Handle.AsRef>(_TrisOffset.Value); } + private static readonly Lazy _TriCount1Offset = new(() => Schema.GetOffset(0x1BA43927DA287160), LazyThreadSafetyMode.None); + public ref ushort TriCount1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA43927DA287160)); + get => ref _Handle.AsRef(_TriCount1Offset.Value); } + private static readonly Lazy _TriCount2Offset = new(() => Schema.GetOffset(0x1BA43927DD287619), LazyThreadSafetyMode.None); + public ref ushort TriCount2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA43927DD287619)); + get => ref _Handle.AsRef(_TriCount2Offset.Value); } + private static readonly Lazy _ReservedUint8Offset = new(() => Schema.GetOffset(0x1BA439279DB35207), LazyThreadSafetyMode.None); + public ref byte ReservedUint8 { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA439279DB35207)); + get => ref _Handle.AsRef(_ReservedUint8Offset.Value); } + private static readonly Lazy _ExtraPressureIterationsOffset = new(() => Schema.GetOffset(0x1BA439270749204E), LazyThreadSafetyMode.None); + public ref byte ExtraPressureIterations { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA439270749204E)); + get => ref _Handle.AsRef(_ExtraPressureIterationsOffset.Value); } + private static readonly Lazy _ExtraGoalIterationsOffset = new(() => Schema.GetOffset(0x1BA43927628FA5BA), LazyThreadSafetyMode.None); + public ref byte ExtraGoalIterations { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA43927628FA5BA)); + get => ref _Handle.AsRef(_ExtraGoalIterationsOffset.Value); } + private static readonly Lazy _ExtraIterationsOffset = new(() => Schema.GetOffset(0x1BA4392737B28905), LazyThreadSafetyMode.None); + public ref byte ExtraIterations { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA4392737B28905)); + get => ref _Handle.AsRef(_ExtraIterationsOffset.Value); } + private static readonly Lazy _SDFRigidsOffset = new(() => Schema.GetOffset(0x1BA43927E4F15C2C), LazyThreadSafetyMode.None); + public ref CUtlVector SDFRigids { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927E4F15C2C)); + get => ref _Handle.AsRef>(_SDFRigidsOffset.Value); } + private static readonly Lazy _BoxRigidsOffset = new(() => Schema.GetOffset(0x1BA439273FF6F3EE), LazyThreadSafetyMode.None); + public ref CUtlVector BoxRigids { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439273FF6F3EE)); + get => ref _Handle.AsRef>(_BoxRigidsOffset.Value); } + private static readonly Lazy _DynNodeVertexSetOffset = new(() => Schema.GetOffset(0x1BA4392710AF881A), LazyThreadSafetyMode.None); + public ref CUtlVector DynNodeVertexSet { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA4392710AF881A)); + get => ref _Handle.AsRef>(_DynNodeVertexSetOffset.Value); } + private static readonly Lazy _VertexSetNamesOffset = new(() => Schema.GetOffset(0x1BA439270B557437), LazyThreadSafetyMode.None); + public ref CUtlVector VertexSetNames { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439270B557437)); + get => ref _Handle.AsRef>(_VertexSetNamesOffset.Value); } + private static readonly Lazy _RigidColliderPrioritiesOffset = new(() => Schema.GetOffset(0x1BA43927A6818704), LazyThreadSafetyMode.None); + public ref CUtlVector RigidColliderPriorities { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927A6818704)); + get => ref _Handle.AsRef>(_RigidColliderPrioritiesOffset.Value); } + private static readonly Lazy _MorphLayersOffset = new(() => Schema.GetOffset(0x1BA439279DF389BF), LazyThreadSafetyMode.None); + public ref CUtlVector MorphLayers { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439279DF389BF)); + get => ref _Handle.AsRef>(_MorphLayersOffset.Value); } + private static readonly Lazy _MorphSetDataOffset = new(() => Schema.GetOffset(0x1BA43927DA9B396B), LazyThreadSafetyMode.None); + public ref CUtlVector MorphSetData { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927DA9B396B)); + get => ref _Handle.AsRef>(_MorphSetDataOffset.Value); } + private static readonly Lazy _VertexMapsOffset = new(() => Schema.GetOffset(0x1BA4392727EEF7FC), LazyThreadSafetyMode.None); + public ref CUtlVector VertexMaps { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA4392727EEF7FC)); + get => ref _Handle.AsRef>(_VertexMapsOffset.Value); } + private static readonly Lazy _VertexMapValuesOffset = new(() => Schema.GetOffset(0x1BA43927EAF6DABD), LazyThreadSafetyMode.None); + public ref CUtlVector VertexMapValues { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927EAF6DABD)); + get => ref _Handle.AsRef>(_VertexMapValuesOffset.Value); } + private static readonly Lazy _EffectsOffset = new(() => Schema.GetOffset(0x1BA43927A60AA5E5), LazyThreadSafetyMode.None); + public ref CUtlVector Effects { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927A60AA5E5)); + get => ref _Handle.AsRef>(_EffectsOffset.Value); } + private static readonly Lazy _LockToParentOffset = new(() => Schema.GetOffset(0x1BA43927CFC56E77), LazyThreadSafetyMode.None); + public ref CUtlVector LockToParent { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927CFC56E77)); + get => ref _Handle.AsRef>(_LockToParentOffset.Value); } + private static readonly Lazy _LockToGoalOffset = new(() => Schema.GetOffset(0x1BA43927EF4703D8), LazyThreadSafetyMode.None); + public ref CUtlVector LockToGoal { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927EF4703D8)); + get => ref _Handle.AsRef>(_LockToGoalOffset.Value); } + private static readonly Lazy _SkelParentsOffset = new(() => Schema.GetOffset(0x1BA43927D2AAA7FB), LazyThreadSafetyMode.None); + public ref CUtlVector SkelParents { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA43927D2AAA7FB)); + get => ref _Handle.AsRef>(_SkelParentsOffset.Value); } + private static readonly Lazy _DynNodeWindBasesOffset = new(() => Schema.GetOffset(0x1BA439271ABAB644), LazyThreadSafetyMode.None); + public ref CUtlVector DynNodeWindBases { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA439271ABAB644)); + get => ref _Handle.AsRef>(_DynNodeWindBasesOffset.Value); } + private static readonly Lazy _InternalPressureOffset = new(() => Schema.GetOffset(0x1BA43927B3CC4239), LazyThreadSafetyMode.None); + public ref float InternalPressure { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA43927B3CC4239)); + get => ref _Handle.AsRef(_InternalPressureOffset.Value); } + private static readonly Lazy _DefaultTimeDilationOffset = new(() => Schema.GetOffset(0x1BA439271F1E706B), LazyThreadSafetyMode.None); + public ref float DefaultTimeDilation { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA439271F1E706B)); + get => ref _Handle.AsRef(_DefaultTimeDilationOffset.Value); } + private static readonly Lazy _WindageOffset = new(() => Schema.GetOffset(0x1BA43927606E3F48), LazyThreadSafetyMode.None); + public ref float Windage { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA43927606E3F48)); + get => ref _Handle.AsRef(_WindageOffset.Value); } + private static readonly Lazy _WindDragOffset = new(() => Schema.GetOffset(0x1BA4392753E238D7), LazyThreadSafetyMode.None); + public ref float WindDrag { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA4392753E238D7)); + get => ref _Handle.AsRef(_WindDragOffset.Value); } + private static readonly Lazy _DefaultSurfaceStretchOffset = new(() => Schema.GetOffset(0x1BA43927B772D9D0), LazyThreadSafetyMode.None); + public ref float DefaultSurfaceStretch { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA43927B772D9D0)); + get => ref _Handle.AsRef(_DefaultSurfaceStretchOffset.Value); } + private static readonly Lazy _DefaultThreadStretchOffset = new(() => Schema.GetOffset(0x1BA439271386FDD5), LazyThreadSafetyMode.None); + public ref float DefaultThreadStretch { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA439271386FDD5)); + get => ref _Handle.AsRef(_DefaultThreadStretchOffset.Value); } + private static readonly Lazy _DefaultGravityScaleOffset = new(() => Schema.GetOffset(0x1BA4392789AD0384), LazyThreadSafetyMode.None); + public ref float DefaultGravityScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA4392789AD0384)); + get => ref _Handle.AsRef(_DefaultGravityScaleOffset.Value); } + private static readonly Lazy _DefaultVelAirDragOffset = new(() => Schema.GetOffset(0x1BA439271833A0FB), LazyThreadSafetyMode.None); + public ref float DefaultVelAirDrag { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA439271833A0FB)); + get => ref _Handle.AsRef(_DefaultVelAirDragOffset.Value); } + private static readonly Lazy _DefaultExpAirDragOffset = new(() => Schema.GetOffset(0x1BA43927681CCE27), LazyThreadSafetyMode.None); + public ref float DefaultExpAirDrag { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA43927681CCE27)); + get => ref _Handle.AsRef(_DefaultExpAirDragOffset.Value); } + private static readonly Lazy _DefaultVelQuadAirDragOffset = new(() => Schema.GetOffset(0x1BA43927BF28F362), LazyThreadSafetyMode.None); + public ref float DefaultVelQuadAirDrag { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA43927BF28F362)); + get => ref _Handle.AsRef(_DefaultVelQuadAirDragOffset.Value); } + private static readonly Lazy _DefaultExpQuadAirDragOffset = new(() => Schema.GetOffset(0x1BA43927F16B8A2E), LazyThreadSafetyMode.None); + public ref float DefaultExpQuadAirDrag { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA43927F16B8A2E)); + get => ref _Handle.AsRef(_DefaultExpQuadAirDragOffset.Value); } + private static readonly Lazy _RodVelocitySmoothRateOffset = new(() => Schema.GetOffset(0x1BA439274EDA647F), LazyThreadSafetyMode.None); + public ref float RodVelocitySmoothRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA439274EDA647F)); + get => ref _Handle.AsRef(_RodVelocitySmoothRateOffset.Value); } + private static readonly Lazy _QuadVelocitySmoothRateOffset = new(() => Schema.GetOffset(0x1BA43927A5E06553), LazyThreadSafetyMode.None); + public ref float QuadVelocitySmoothRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA43927A5E06553)); + get => ref _Handle.AsRef(_QuadVelocitySmoothRateOffset.Value); } + private static readonly Lazy _AddWorldCollisionRadiusOffset = new(() => Schema.GetOffset(0x1BA43927EBFB7154), LazyThreadSafetyMode.None); + public ref float AddWorldCollisionRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA43927EBFB7154)); + get => ref _Handle.AsRef(_AddWorldCollisionRadiusOffset.Value); } + private static readonly Lazy _DefaultVolumetricSolveAmountOffset = new(() => Schema.GetOffset(0x1BA43927D69EF547), LazyThreadSafetyMode.None); + public ref float DefaultVolumetricSolveAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA43927D69EF547)); + get => ref _Handle.AsRef(_DefaultVolumetricSolveAmountOffset.Value); } + private static readonly Lazy _MotionSmoothCDTOffset = new(() => Schema.GetOffset(0x1BA439279C2571CC), LazyThreadSafetyMode.None); + public ref float MotionSmoothCDT { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA439279C2571CC)); + get => ref _Handle.AsRef(_MotionSmoothCDTOffset.Value); } + private static readonly Lazy _LocalDrag1Offset = new(() => Schema.GetOffset(0x1BA43927BE849FFB), LazyThreadSafetyMode.None); + public ref float LocalDrag1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA43927BE849FFB)); + get => ref _Handle.AsRef(_LocalDrag1Offset.Value); } + private static readonly Lazy _RodVelocitySmoothIterationsOffset = new(() => Schema.GetOffset(0x1BA439277B5933A3), LazyThreadSafetyMode.None); + public ref ushort RodVelocitySmoothIterations { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA439277B5933A3)); + get => ref _Handle.AsRef(_RodVelocitySmoothIterationsOffset.Value); } + private static readonly Lazy _QuadVelocitySmoothIterationsOffset = new(() => Schema.GetOffset(0x1BA4392761612B9B), LazyThreadSafetyMode.None); + public ref ushort QuadVelocitySmoothIterations { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA4392761612B9B)); + get => ref _Handle.AsRef(_QuadVelocitySmoothIterationsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysShapeMarkup_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysShapeMarkup_tImpl.cs index 575715941..c04061897 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysShapeMarkup_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysShapeMarkup_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class PhysShapeMarkup_tImpl : SchemaClass, PhysShapeMarkup_t { public PhysShapeMarkup_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BodyInAggregateOffset = new(() => Schema.GetOffset(0x87CE340954AFE651), LazyThreadSafetyMode.None); + public ref int BodyInAggregate { - get => ref _Handle.AsRef(Schema.GetOffset(0x87CE340954AFE651)); + get => ref _Handle.AsRef(_BodyInAggregateOffset.Value); } + private static readonly Lazy _ShapeInBodyOffset = new(() => Schema.GetOffset(0x87CE3409C45F6FDD), LazyThreadSafetyMode.None); + public ref int ShapeInBody { - get => ref _Handle.AsRef(Schema.GetOffset(0x87CE3409C45F6FDD)); + get => ref _Handle.AsRef(_ShapeInBodyOffset.Value); } + private static readonly Lazy _HitGroupOffset = new(() => Schema.GetOffset(0x87CE3409A13CBDEA), LazyThreadSafetyMode.None); + public ref CGlobalSymbol HitGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0x87CE3409A13CBDEA)); + get => ref _Handle.AsRef(_HitGroupOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysSoftbodyDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysSoftbodyDesc_tImpl.cs index e77e33fc2..eeeabd855 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysSoftbodyDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysSoftbodyDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class PhysSoftbodyDesc_tImpl : SchemaClass, PhysSoftbodyDesc_t public PhysSoftbodyDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParticleBoneHashOffset = new(() => Schema.GetOffset(0xD390C8BBCC44F471), LazyThreadSafetyMode.None); + public ref CUtlVector ParticleBoneHash { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD390C8BBCC44F471)); + get => ref _Handle.AsRef>(_ParticleBoneHashOffset.Value); } + private static readonly Lazy _ParticlesOffset = new(() => Schema.GetOffset(0xD390C8BB6C0747A4), LazyThreadSafetyMode.None); + public ref CUtlVector Particles { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD390C8BB6C0747A4)); + get => ref _Handle.AsRef>(_ParticlesOffset.Value); } + private static readonly Lazy _SpringsOffset = new(() => Schema.GetOffset(0xD390C8BB1AB5EB4D), LazyThreadSafetyMode.None); + public ref CUtlVector Springs { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD390C8BB1AB5EB4D)); + get => ref _Handle.AsRef>(_SpringsOffset.Value); } + private static readonly Lazy _CapsulesOffset = new(() => Schema.GetOffset(0xD390C8BBFC27BB2D), LazyThreadSafetyMode.None); + public ref CUtlVector Capsules { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD390C8BBFC27BB2D)); + get => ref _Handle.AsRef>(_CapsulesOffset.Value); } + private static readonly Lazy _InitPoseOffset = new(() => Schema.GetOffset(0xD390C8BB5E468732), LazyThreadSafetyMode.None); + public ref CUtlVector InitPose { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD390C8BB5E468732)); + get => ref _Handle.AsRef>(_InitPoseOffset.Value); } + private static readonly Lazy _ParticleBoneNameOffset = new(() => Schema.GetOffset(0xD390C8BB8D321086), LazyThreadSafetyMode.None); + public ref CUtlVector ParticleBoneName { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD390C8BB8D321086)); + get => ref _Handle.AsRef>(_ParticleBoneNameOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysicsParticleId_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysicsParticleId_tImpl.cs index dc936ed1e..00f9c1fd8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysicsParticleId_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysicsParticleId_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PhysicsParticleId_tImpl : SchemaClass, PhysicsParticleId_ public PhysicsParticleId_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xADF050DADCB0894A), LazyThreadSafetyMode.None); + public ref uint Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xADF050DADCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysicsRagdollPose_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysicsRagdollPose_tImpl.cs index 25f1c2fbb..58ed218db 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysicsRagdollPose_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PhysicsRagdollPose_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class PhysicsRagdollPose_tImpl : SchemaClass, PhysicsRagdollPos public PhysicsRagdollPose_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TransformsOffset = new(() => Schema.GetOffset(0x54A98BF4852CD38), LazyThreadSafetyMode.None); + public ref CUtlVector Transforms { - get => ref _Handle.AsRef>(Schema.GetOffset(0x54A98BF4852CD38)); + get => ref _Handle.AsRef>(_TransformsOffset.Value); } + private static readonly Lazy _OwnerOffset = new(() => Schema.GetOffset(0x54A98BFF6D89572), LazyThreadSafetyMode.None); + public ref CHandle Owner { - get => ref _Handle.AsRef>(Schema.GetOffset(0x54A98BFF6D89572)); + get => ref _Handle.AsRef>(_OwnerOffset.Value); } + private static readonly Lazy _SetFromDebugHistoryOffset = new(() => Schema.GetOffset(0x54A98BF136013F6), LazyThreadSafetyMode.None); + public ref bool SetFromDebugHistory { - get => ref _Handle.AsRef(Schema.GetOffset(0x54A98BF136013F6)); + get => ref _Handle.AsRef(_SetFromDebugHistoryOffset.Value); } public void TransformsUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PointCameraSettings_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PointCameraSettings_tImpl.cs index a9aa94459..e499979ea 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PointCameraSettings_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PointCameraSettings_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class PointCameraSettings_tImpl : SchemaClass, PointCameraSetti public PointCameraSettings_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NearBlurryDistanceOffset = new(() => Schema.GetOffset(0x4BE8175CEB0CA47E), LazyThreadSafetyMode.None); + public ref float NearBlurryDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BE8175CEB0CA47E)); + get => ref _Handle.AsRef(_NearBlurryDistanceOffset.Value); } + private static readonly Lazy _NearCrispDistanceOffset = new(() => Schema.GetOffset(0x4BE8175CF0C9A8C7), LazyThreadSafetyMode.None); + public ref float NearCrispDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BE8175CF0C9A8C7)); + get => ref _Handle.AsRef(_NearCrispDistanceOffset.Value); } + private static readonly Lazy _FarCrispDistanceOffset = new(() => Schema.GetOffset(0x4BE8175CE95AEE28), LazyThreadSafetyMode.None); + public ref float FarCrispDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BE8175CE95AEE28)); + get => ref _Handle.AsRef(_FarCrispDistanceOffset.Value); } + private static readonly Lazy _FarBlurryDistanceOffset = new(() => Schema.GetOffset(0x4BE8175CF8892257), LazyThreadSafetyMode.None); + public ref float FarBlurryDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0x4BE8175CF8892257)); + get => ref _Handle.AsRef(_FarBlurryDistanceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PointDefinitionWithTimeValues_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PointDefinitionWithTimeValues_tImpl.cs index 450005f1a..1255d7fcc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PointDefinitionWithTimeValues_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PointDefinitionWithTimeValues_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PointDefinitionWithTimeValues_tImpl : PointDefinition_tIm public PointDefinitionWithTimeValues_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TimeDurationOffset = new(() => Schema.GetOffset(0xF2BE4F108B84C052), LazyThreadSafetyMode.None); + public ref float TimeDuration { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BE4F108B84C052)); + get => ref _Handle.AsRef(_TimeDurationOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PointDefinition_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PointDefinition_tImpl.cs index 88be27268..396a95481 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PointDefinition_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PointDefinition_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class PointDefinition_tImpl : SchemaClass, PointDefinition_t { public PointDefinition_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ControlPointOffset = new(() => Schema.GetOffset(0x731F83DF0D0DDF8C), LazyThreadSafetyMode.None); + public ref int ControlPoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x731F83DF0D0DDF8C)); + get => ref _Handle.AsRef(_ControlPointOffset.Value); } + private static readonly Lazy _LocalCoordsOffset = new(() => Schema.GetOffset(0x731F83DF30E716DE), LazyThreadSafetyMode.None); + public ref bool LocalCoords { - get => ref _Handle.AsRef(Schema.GetOffset(0x731F83DF30E716DE)); + get => ref _Handle.AsRef(_LocalCoordsOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0x731F83DFFE159136), LazyThreadSafetyMode.None); + public ref Vector Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0x731F83DFFE159136)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingBloomParameters_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingBloomParameters_tImpl.cs index dc0841a25..14ca3388f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingBloomParameters_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingBloomParameters_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,47 +17,75 @@ internal partial class PostProcessingBloomParameters_tImpl : SchemaClass, PostPr public PostProcessingBloomParameters_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BlendModeOffset = new(() => Schema.GetOffset(0x30F41F3C8D5006AB), LazyThreadSafetyMode.None); + public ref BloomBlendMode_t BlendMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F41F3C8D5006AB)); + get => ref _Handle.AsRef(_BlendModeOffset.Value); } + private static readonly Lazy _BloomStrengthOffset = new(() => Schema.GetOffset(0x30F41F3C398A137F), LazyThreadSafetyMode.None); + public ref float BloomStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F41F3C398A137F)); + get => ref _Handle.AsRef(_BloomStrengthOffset.Value); } + private static readonly Lazy _ScreenBloomStrengthOffset = new(() => Schema.GetOffset(0x30F41F3CE8A0AA33), LazyThreadSafetyMode.None); + public ref float ScreenBloomStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F41F3CE8A0AA33)); + get => ref _Handle.AsRef(_ScreenBloomStrengthOffset.Value); } + private static readonly Lazy _BlurBloomStrengthOffset = new(() => Schema.GetOffset(0x30F41F3CF8D07238), LazyThreadSafetyMode.None); + public ref float BlurBloomStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F41F3CF8D07238)); + get => ref _Handle.AsRef(_BlurBloomStrengthOffset.Value); } + private static readonly Lazy _BloomThresholdOffset = new(() => Schema.GetOffset(0x30F41F3C06FD7D91), LazyThreadSafetyMode.None); + public ref float BloomThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F41F3C06FD7D91)); + get => ref _Handle.AsRef(_BloomThresholdOffset.Value); } + private static readonly Lazy _BloomThresholdWidthOffset = new(() => Schema.GetOffset(0x30F41F3CF71B95FB), LazyThreadSafetyMode.None); + public ref float BloomThresholdWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F41F3CF71B95FB)); + get => ref _Handle.AsRef(_BloomThresholdWidthOffset.Value); } + private static readonly Lazy _SkyboxBloomStrengthOffset = new(() => Schema.GetOffset(0x30F41F3C99229415), LazyThreadSafetyMode.None); + public ref float SkyboxBloomStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F41F3C99229415)); + get => ref _Handle.AsRef(_SkyboxBloomStrengthOffset.Value); } + private static readonly Lazy _BloomStartValueOffset = new(() => Schema.GetOffset(0x30F41F3C214727D7), LazyThreadSafetyMode.None); + public ref float BloomStartValue { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F41F3C214727D7)); + get => ref _Handle.AsRef(_BloomStartValueOffset.Value); } + private static readonly Lazy _ComputeBloomStrengthOffset = new(() => Schema.GetOffset(0x30F41F3C347885E6), LazyThreadSafetyMode.None); + public ref float ComputeBloomStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F41F3C347885E6)); + get => ref _Handle.AsRef(_ComputeBloomStrengthOffset.Value); } + private static readonly Lazy _ComputeBloomThresholdOffset = new(() => Schema.GetOffset(0x30F41F3C37939E0E), LazyThreadSafetyMode.None); + public ref float ComputeBloomThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F41F3C37939E0E)); + get => ref _Handle.AsRef(_ComputeBloomThresholdOffset.Value); } + private static readonly Lazy _ComputeBloomRadiusOffset = new(() => Schema.GetOffset(0x30F41F3C6AD33551), LazyThreadSafetyMode.None); + public ref float ComputeBloomRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F41F3C6AD33551)); + get => ref _Handle.AsRef(_ComputeBloomRadiusOffset.Value); } + private static readonly Lazy _ComputeBloomEffectsScaleOffset = new(() => Schema.GetOffset(0x30F41F3C7863A30F), LazyThreadSafetyMode.None); + public ref float ComputeBloomEffectsScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F41F3C7863A30F)); + get => ref _Handle.AsRef(_ComputeBloomEffectsScaleOffset.Value); } + private static readonly Lazy _ComputeBloomLensDirtStrengthOffset = new(() => Schema.GetOffset(0x30F41F3C7236C0F3), LazyThreadSafetyMode.None); + public ref float ComputeBloomLensDirtStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F41F3C7236C0F3)); + get => ref _Handle.AsRef(_ComputeBloomLensDirtStrengthOffset.Value); } + private static readonly Lazy _ComputeBloomLensDirtBlackLevelOffset = new(() => Schema.GetOffset(0x30F41F3CB4FB5025), LazyThreadSafetyMode.None); + public ref float ComputeBloomLensDirtBlackLevel { - get => ref _Handle.AsRef(Schema.GetOffset(0x30F41F3CB4FB5025)); + get => ref _Handle.AsRef(_ComputeBloomLensDirtBlackLevelOffset.Value); } public ISchemaFixedArray BlurWeight { get => new SchemaFixedArray(_Handle, 0x30F41F3CAF5FB432, 5, 4, 4); diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingFogScatteringParameters_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingFogScatteringParameters_tImpl.cs index 29db6af3b..59bf538e2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingFogScatteringParameters_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingFogScatteringParameters_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class PostProcessingFogScatteringParameters_tImpl : SchemaClass public PostProcessingFogScatteringParameters_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0xAE3B2EF52E1F6E07), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0xAE3B2EF52E1F6E07)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0xAE3B2EF555E6EFAD), LazyThreadSafetyMode.None); + public ref float Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0xAE3B2EF555E6EFAD)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _CubemapScaleOffset = new(() => Schema.GetOffset(0xAE3B2EF593A389D0), LazyThreadSafetyMode.None); + public ref float CubemapScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xAE3B2EF593A389D0)); + get => ref _Handle.AsRef(_CubemapScaleOffset.Value); } + private static readonly Lazy _VolumetricScaleOffset = new(() => Schema.GetOffset(0xAE3B2EF515A15A21), LazyThreadSafetyMode.None); + public ref float VolumetricScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xAE3B2EF515A15A21)); + get => ref _Handle.AsRef(_VolumetricScaleOffset.Value); } + private static readonly Lazy _GradientScaleOffset = new(() => Schema.GetOffset(0xAE3B2EF58473F465), LazyThreadSafetyMode.None); + public ref float GradientScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xAE3B2EF58473F465)); + get => ref _Handle.AsRef(_GradientScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingLocalContrastParameters_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingLocalContrastParameters_tImpl.cs index 375bba5eb..5ea51c335 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingLocalContrastParameters_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingLocalContrastParameters_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class PostProcessingLocalContrastParameters_tImpl : SchemaClass public PostProcessingLocalContrastParameters_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _LocalContrastStrengthOffset = new(() => Schema.GetOffset(0x43910BD66A89DF05), LazyThreadSafetyMode.None); + public ref float LocalContrastStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x43910BD66A89DF05)); + get => ref _Handle.AsRef(_LocalContrastStrengthOffset.Value); } + private static readonly Lazy _LocalContrastEdgeStrengthOffset = new(() => Schema.GetOffset(0x43910BD6CC517324), LazyThreadSafetyMode.None); + public ref float LocalContrastEdgeStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x43910BD6CC517324)); + get => ref _Handle.AsRef(_LocalContrastEdgeStrengthOffset.Value); } + private static readonly Lazy _LocalContrastVignetteStartOffset = new(() => Schema.GetOffset(0x43910BD633264BD6), LazyThreadSafetyMode.None); + public ref float LocalContrastVignetteStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x43910BD633264BD6)); + get => ref _Handle.AsRef(_LocalContrastVignetteStartOffset.Value); } + private static readonly Lazy _LocalContrastVignetteEndOffset = new(() => Schema.GetOffset(0x43910BD689634873), LazyThreadSafetyMode.None); + public ref float LocalContrastVignetteEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x43910BD689634873)); + get => ref _Handle.AsRef(_LocalContrastVignetteEndOffset.Value); } + private static readonly Lazy _LocalContrastVignetteBlurOffset = new(() => Schema.GetOffset(0x43910BD6D8C40957), LazyThreadSafetyMode.None); + public ref float LocalContrastVignetteBlur { - get => ref _Handle.AsRef(Schema.GetOffset(0x43910BD6D8C40957)); + get => ref _Handle.AsRef(_LocalContrastVignetteBlurOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingResource_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingResource_tImpl.cs index 93e7179c6..b2a02b849 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingResource_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingResource_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,70 @@ internal partial class PostProcessingResource_tImpl : SchemaClass, PostProcessin public PostProcessingResource_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _HasTonemapParamsOffset = new(() => Schema.GetOffset(0x81127543E6A6D70D), LazyThreadSafetyMode.None); + public ref bool HasTonemapParams { - get => ref _Handle.AsRef(Schema.GetOffset(0x81127543E6A6D70D)); + get => ref _Handle.AsRef(_HasTonemapParamsOffset.Value); } + private static readonly Lazy _ToneMapParamsOffset = new(() => Schema.GetOffset(0x811275437AD3669B), LazyThreadSafetyMode.None); + public PostProcessingTonemapParameters_t ToneMapParams { - get => new PostProcessingTonemapParameters_tImpl(_Handle + Schema.GetOffset(0x811275437AD3669B)); + get => new PostProcessingTonemapParameters_tImpl(_Handle + _ToneMapParamsOffset.Value); } + private static readonly Lazy _HasBloomParamsOffset = new(() => Schema.GetOffset(0x81127543754C1410), LazyThreadSafetyMode.None); + public ref bool HasBloomParams { - get => ref _Handle.AsRef(Schema.GetOffset(0x81127543754C1410)); + get => ref _Handle.AsRef(_HasBloomParamsOffset.Value); } + private static readonly Lazy _BloomParamsOffset = new(() => Schema.GetOffset(0x81127543CEC3092A), LazyThreadSafetyMode.None); + public PostProcessingBloomParameters_t BloomParams { - get => new PostProcessingBloomParameters_tImpl(_Handle + Schema.GetOffset(0x81127543CEC3092A)); + get => new PostProcessingBloomParameters_tImpl(_Handle + _BloomParamsOffset.Value); } + private static readonly Lazy _HasVignetteParamsOffset = new(() => Schema.GetOffset(0x81127543593E9813), LazyThreadSafetyMode.None); + public ref bool HasVignetteParams { - get => ref _Handle.AsRef(Schema.GetOffset(0x81127543593E9813)); + get => ref _Handle.AsRef(_HasVignetteParamsOffset.Value); } + private static readonly Lazy _VignetteParamsOffset = new(() => Schema.GetOffset(0x81127543FBBFC5B9), LazyThreadSafetyMode.None); + public PostProcessingVignetteParameters_t VignetteParams { - get => new PostProcessingVignetteParameters_tImpl(_Handle + Schema.GetOffset(0x81127543FBBFC5B9)); + get => new PostProcessingVignetteParameters_tImpl(_Handle + _VignetteParamsOffset.Value); } + private static readonly Lazy _HasLocalContrastParamsOffset = new(() => Schema.GetOffset(0x81127543247F8B76), LazyThreadSafetyMode.None); + public ref bool HasLocalContrastParams { - get => ref _Handle.AsRef(Schema.GetOffset(0x81127543247F8B76)); + get => ref _Handle.AsRef(_HasLocalContrastParamsOffset.Value); } + private static readonly Lazy _LocalConstrastParamsOffset = new(() => Schema.GetOffset(0x811275437AB7080F), LazyThreadSafetyMode.None); + public PostProcessingLocalContrastParameters_t LocalConstrastParams { - get => new PostProcessingLocalContrastParameters_tImpl(_Handle + Schema.GetOffset(0x811275437AB7080F)); + get => new PostProcessingLocalContrastParameters_tImpl(_Handle + _LocalConstrastParamsOffset.Value); } + private static readonly Lazy _ColorCorrectionVolumeDimOffset = new(() => Schema.GetOffset(0x81127543BF8A2F78), LazyThreadSafetyMode.None); + public ref int ColorCorrectionVolumeDim { - get => ref _Handle.AsRef(Schema.GetOffset(0x81127543BF8A2F78)); + get => ref _Handle.AsRef(_ColorCorrectionVolumeDimOffset.Value); } + private static readonly Lazy _ColorCorrectionVolumeDataOffset = new(() => Schema.GetOffset(0x81127543211CF8FA), LazyThreadSafetyMode.None); + public ref CUtlBinaryBlock ColorCorrectionVolumeData { - get => ref _Handle.AsRef(Schema.GetOffset(0x81127543211CF8FA)); + get => ref _Handle.AsRef(_ColorCorrectionVolumeDataOffset.Value); } + private static readonly Lazy _HasColorCorrectionOffset = new(() => Schema.GetOffset(0x811275434EDD24C6), LazyThreadSafetyMode.None); + public ref bool HasColorCorrection { - get => ref _Handle.AsRef(Schema.GetOffset(0x811275434EDD24C6)); + get => ref _Handle.AsRef(_HasColorCorrectionOffset.Value); } + private static readonly Lazy _HasFogScatteringParamsOffset = new(() => Schema.GetOffset(0x81127543EBB4887D), LazyThreadSafetyMode.None); + public ref bool HasFogScatteringParams { - get => ref _Handle.AsRef(Schema.GetOffset(0x81127543EBB4887D)); + get => ref _Handle.AsRef(_HasFogScatteringParamsOffset.Value); } + private static readonly Lazy _FogScatteringParamsOffset = new(() => Schema.GetOffset(0x8112754373861903), LazyThreadSafetyMode.None); + public PostProcessingFogScatteringParameters_t FogScatteringParams { - get => new PostProcessingFogScatteringParameters_tImpl(_Handle + Schema.GetOffset(0x8112754373861903)); + get => new PostProcessingFogScatteringParameters_tImpl(_Handle + _FogScatteringParamsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingTonemapParameters_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingTonemapParameters_tImpl.cs index 196f827dd..662514710 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingTonemapParameters_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingTonemapParameters_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,50 +17,80 @@ internal partial class PostProcessingTonemapParameters_tImpl : SchemaClass, Post public PostProcessingTonemapParameters_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ExposureBiasOffset = new(() => Schema.GetOffset(0x62C7E951BBF57613), LazyThreadSafetyMode.None); + public ref float ExposureBias { - get => ref _Handle.AsRef(Schema.GetOffset(0x62C7E951BBF57613)); + get => ref _Handle.AsRef(_ExposureBiasOffset.Value); } + private static readonly Lazy _ShoulderStrengthOffset = new(() => Schema.GetOffset(0x62C7E951F177A3EE), LazyThreadSafetyMode.None); + public ref float ShoulderStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x62C7E951F177A3EE)); + get => ref _Handle.AsRef(_ShoulderStrengthOffset.Value); } + private static readonly Lazy _LinearStrengthOffset = new(() => Schema.GetOffset(0x62C7E95172E93F83), LazyThreadSafetyMode.None); + public ref float LinearStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x62C7E95172E93F83)); + get => ref _Handle.AsRef(_LinearStrengthOffset.Value); } + private static readonly Lazy _LinearAngleOffset = new(() => Schema.GetOffset(0x62C7E951C16B14B1), LazyThreadSafetyMode.None); + public ref float LinearAngle { - get => ref _Handle.AsRef(Schema.GetOffset(0x62C7E951C16B14B1)); + get => ref _Handle.AsRef(_LinearAngleOffset.Value); } + private static readonly Lazy _ToeStrengthOffset = new(() => Schema.GetOffset(0x62C7E95168B1B908), LazyThreadSafetyMode.None); + public ref float ToeStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0x62C7E95168B1B908)); + get => ref _Handle.AsRef(_ToeStrengthOffset.Value); } + private static readonly Lazy _ToeNumOffset = new(() => Schema.GetOffset(0x62C7E951DCB0097B), LazyThreadSafetyMode.None); + public ref float ToeNum { - get => ref _Handle.AsRef(Schema.GetOffset(0x62C7E951DCB0097B)); + get => ref _Handle.AsRef(_ToeNumOffset.Value); } + private static readonly Lazy _ToeDenomOffset = new(() => Schema.GetOffset(0x62C7E951FFD477EC), LazyThreadSafetyMode.None); + public ref float ToeDenom { - get => ref _Handle.AsRef(Schema.GetOffset(0x62C7E951FFD477EC)); + get => ref _Handle.AsRef(_ToeDenomOffset.Value); } + private static readonly Lazy _WhitePointOffset = new(() => Schema.GetOffset(0x62C7E9518901AA8E), LazyThreadSafetyMode.None); + public ref float WhitePoint { - get => ref _Handle.AsRef(Schema.GetOffset(0x62C7E9518901AA8E)); + get => ref _Handle.AsRef(_WhitePointOffset.Value); } + private static readonly Lazy _LuminanceSourceOffset = new(() => Schema.GetOffset(0x62C7E9517B15A366), LazyThreadSafetyMode.None); + public ref float LuminanceSource { - get => ref _Handle.AsRef(Schema.GetOffset(0x62C7E9517B15A366)); + get => ref _Handle.AsRef(_LuminanceSourceOffset.Value); } + private static readonly Lazy _ExposureBiasShadowsOffset = new(() => Schema.GetOffset(0x62C7E951958A1C90), LazyThreadSafetyMode.None); + public ref float ExposureBiasShadows { - get => ref _Handle.AsRef(Schema.GetOffset(0x62C7E951958A1C90)); + get => ref _Handle.AsRef(_ExposureBiasShadowsOffset.Value); } + private static readonly Lazy _ExposureBiasHighlightsOffset = new(() => Schema.GetOffset(0x62C7E95105E519FE), LazyThreadSafetyMode.None); + public ref float ExposureBiasHighlights { - get => ref _Handle.AsRef(Schema.GetOffset(0x62C7E95105E519FE)); + get => ref _Handle.AsRef(_ExposureBiasHighlightsOffset.Value); } + private static readonly Lazy _MinShadowLumOffset = new(() => Schema.GetOffset(0x62C7E9511E2BE58D), LazyThreadSafetyMode.None); + public ref float MinShadowLum { - get => ref _Handle.AsRef(Schema.GetOffset(0x62C7E9511E2BE58D)); + get => ref _Handle.AsRef(_MinShadowLumOffset.Value); } + private static readonly Lazy _MaxShadowLumOffset = new(() => Schema.GetOffset(0x62C7E951269F61AB), LazyThreadSafetyMode.None); + public ref float MaxShadowLum { - get => ref _Handle.AsRef(Schema.GetOffset(0x62C7E951269F61AB)); + get => ref _Handle.AsRef(_MaxShadowLumOffset.Value); } + private static readonly Lazy _MinHighlightLumOffset = new(() => Schema.GetOffset(0x62C7E951A9EADF4F), LazyThreadSafetyMode.None); + public ref float MinHighlightLum { - get => ref _Handle.AsRef(Schema.GetOffset(0x62C7E951A9EADF4F)); + get => ref _Handle.AsRef(_MinHighlightLumOffset.Value); } + private static readonly Lazy _MaxHighlightLumOffset = new(() => Schema.GetOffset(0x62C7E9516352B9A5), LazyThreadSafetyMode.None); + public ref float MaxHighlightLum { - get => ref _Handle.AsRef(Schema.GetOffset(0x62C7E9516352B9A5)); + get => ref _Handle.AsRef(_MaxHighlightLumOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingVignetteParameters_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingVignetteParameters_tImpl.cs index 41dd91530..43c05d668 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingVignetteParameters_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PostProcessingVignetteParameters_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class PostProcessingVignetteParameters_tImpl : SchemaClass, Pos public PostProcessingVignetteParameters_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _VignetteStrengthOffset = new(() => Schema.GetOffset(0xC31FEB45110C062C), LazyThreadSafetyMode.None); + public ref float VignetteStrength { - get => ref _Handle.AsRef(Schema.GetOffset(0xC31FEB45110C062C)); + get => ref _Handle.AsRef(_VignetteStrengthOffset.Value); } + private static readonly Lazy _CenterOffset = new(() => Schema.GetOffset(0xC31FEB45C82A5908), LazyThreadSafetyMode.None); + public ref Vector2D Center { - get => ref _Handle.AsRef(Schema.GetOffset(0xC31FEB45C82A5908)); + get => ref _Handle.AsRef(_CenterOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0xC31FEB455ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0xC31FEB455ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _RoundnessOffset = new(() => Schema.GetOffset(0xC31FEB453987DB42), LazyThreadSafetyMode.None); + public ref float Roundness { - get => ref _Handle.AsRef(Schema.GetOffset(0xC31FEB453987DB42)); + get => ref _Handle.AsRef(_RoundnessOffset.Value); } + private static readonly Lazy _FeatherOffset = new(() => Schema.GetOffset(0xC31FEB455070E146), LazyThreadSafetyMode.None); + public ref float Feather { - get => ref _Handle.AsRef(Schema.GetOffset(0xC31FEB455070E146)); + get => ref _Handle.AsRef(_FeatherOffset.Value); } + private static readonly Lazy _ColorTintOffset = new(() => Schema.GetOffset(0xC31FEB45569A6EA9), LazyThreadSafetyMode.None); + public ref Vector ColorTint { - get => ref _Handle.AsRef(Schema.GetOffset(0xC31FEB45569A6EA9)); + get => ref _Handle.AsRef(_ColorTintOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PredictedDamageTag_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PredictedDamageTag_tImpl.cs index c4f77c3ee..3c375f537 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PredictedDamageTag_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PredictedDamageTag_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class PredictedDamageTag_tImpl : SchemaClass, PredictedDamageTa public PredictedDamageTag_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TagTickOffset = new(() => Schema.GetOffset(0x43420069BBCAAE16), LazyThreadSafetyMode.None); + public GameTick_t TagTick { - get => new GameTick_tImpl(_Handle + Schema.GetOffset(0x43420069BBCAAE16)); + get => new GameTick_tImpl(_Handle + _TagTickOffset.Value); } + private static readonly Lazy _FlinchModSmallOffset = new(() => Schema.GetOffset(0x4342006970E7E18A), LazyThreadSafetyMode.None); + public ref float FlinchModSmall { - get => ref _Handle.AsRef(Schema.GetOffset(0x4342006970E7E18A)); + get => ref _Handle.AsRef(_FlinchModSmallOffset.Value); } + private static readonly Lazy _FlinchModLargeOffset = new(() => Schema.GetOffset(0x43420069E052DA66), LazyThreadSafetyMode.None); + public ref float FlinchModLarge { - get => ref _Handle.AsRef(Schema.GetOffset(0x43420069E052DA66)); + get => ref _Handle.AsRef(_FlinchModLargeOffset.Value); } + private static readonly Lazy _FriendlyFireDamageReductionRatioOffset = new(() => Schema.GetOffset(0x43420069BA6A7F4D), LazyThreadSafetyMode.None); + public ref float FriendlyFireDamageReductionRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0x43420069BA6A7F4D)); + get => ref _Handle.AsRef(_FriendlyFireDamageReductionRatioOffset.Value); } public void TagTickUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseCursorID_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseCursorID_tImpl.cs index ad8bdc80e..8047bba7c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseCursorID_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseCursorID_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PulseCursorID_tImpl : SchemaClass, PulseCursorID_t { public PulseCursorID_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x823828BADCB0894A), LazyThreadSafetyMode.None); + public ref int Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x823828BADCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseCursorYieldToken_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseCursorYieldToken_tImpl.cs index 02ac231e8..385e71606 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseCursorYieldToken_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseCursorYieldToken_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PulseCursorYieldToken_tImpl : SchemaClass, PulseCursorYie public PulseCursorYieldToken_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xBA7B3561DCB0894A), LazyThreadSafetyMode.None); + public ref int Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xBA7B3561DCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseDocNodeID_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseDocNodeID_tImpl.cs index f4886141f..191bdc550 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseDocNodeID_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseDocNodeID_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PulseDocNodeID_tImpl : SchemaClass, PulseDocNodeID_t { public PulseDocNodeID_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xAD1381DADCB0894A), LazyThreadSafetyMode.None); + public ref int Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xAD1381DADCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseGraphExecutionHistoryCursorDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseGraphExecutionHistoryCursorDesc_tImpl.cs index b3c0f4991..0b413de19 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseGraphExecutionHistoryCursorDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseGraphExecutionHistoryCursorDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class PulseGraphExecutionHistoryCursorDesc_tImpl : SchemaClass, public PulseGraphExecutionHistoryCursorDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _AncestorCursorIDsOffset = new(() => Schema.GetOffset(0xC94C4C1C39FD1094), LazyThreadSafetyMode.None); + public ref CUtlVector AncestorCursorIDs { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC94C4C1C39FD1094)); + get => ref _Handle.AsRef>(_AncestorCursorIDsOffset.Value); } + private static readonly Lazy _SpawnNodeIDOffset = new(() => Schema.GetOffset(0xC94C4C1C95FE4E15), LazyThreadSafetyMode.None); + public PulseDocNodeID_t SpawnNodeID { - get => new PulseDocNodeID_tImpl(_Handle + Schema.GetOffset(0xC94C4C1C95FE4E15)); + get => new PulseDocNodeID_tImpl(_Handle + _SpawnNodeIDOffset.Value); } + private static readonly Lazy _RetiredAtNodeIDOffset = new(() => Schema.GetOffset(0xC94C4C1C7FD10E42), LazyThreadSafetyMode.None); + public PulseDocNodeID_t RetiredAtNodeID { - get => new PulseDocNodeID_tImpl(_Handle + Schema.GetOffset(0xC94C4C1C7FD10E42)); + get => new PulseDocNodeID_tImpl(_Handle + _RetiredAtNodeIDOffset.Value); } + private static readonly Lazy _LastReferencedOffset = new(() => Schema.GetOffset(0xC94C4C1C22F5B0C8), LazyThreadSafetyMode.None); + public ref float LastReferenced { - get => ref _Handle.AsRef(Schema.GetOffset(0xC94C4C1C22F5B0C8)); + get => ref _Handle.AsRef(_LastReferencedOffset.Value); } + private static readonly Lazy _LastValidEntryIdxOffset = new(() => Schema.GetOffset(0xC94C4C1CBFAF995E), LazyThreadSafetyMode.None); + public ref int LastValidEntryIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xC94C4C1CBFAF995E)); + get => ref _Handle.AsRef(_LastValidEntryIdxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseGraphExecutionHistoryEntry_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseGraphExecutionHistoryEntry_tImpl.cs index 22321111c..00f4ec32e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseGraphExecutionHistoryEntry_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseGraphExecutionHistoryEntry_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class PulseGraphExecutionHistoryEntry_tImpl : SchemaClass, Puls public PulseGraphExecutionHistoryEntry_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CursorIDOffset = new(() => Schema.GetOffset(0x9346B0AB0B44CBF6), LazyThreadSafetyMode.None); + public PulseCursorID_t CursorID { - get => new PulseCursorID_tImpl(_Handle + Schema.GetOffset(0x9346B0AB0B44CBF6)); + get => new PulseCursorID_tImpl(_Handle + _CursorIDOffset.Value); } + private static readonly Lazy _EditorIDOffset = new(() => Schema.GetOffset(0x9346B0AB74188E69), LazyThreadSafetyMode.None); + public PulseDocNodeID_t EditorID { - get => new PulseDocNodeID_tImpl(_Handle + Schema.GetOffset(0x9346B0AB74188E69)); + get => new PulseDocNodeID_tImpl(_Handle + _EditorIDOffset.Value); } + private static readonly Lazy _ExecTimeOffset = new(() => Schema.GetOffset(0x9346B0ABFAE08483), LazyThreadSafetyMode.None); + public ref float ExecTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x9346B0ABFAE08483)); + get => ref _Handle.AsRef(_ExecTimeOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x9346B0AB5E9538F5), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x9346B0AB5E9538F5)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _TagNameOffset = new(() => Schema.GetOffset(0x9346B0ABBD7B50F8), LazyThreadSafetyMode.None); + public SchemaUntypedField TagName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x9346B0ABBD7B50F8)); + get => new SchemaUntypedField(_Handle + _TagNameOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseGraphExecutionHistoryNodeDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseGraphExecutionHistoryNodeDesc_tImpl.cs index 2af2a793d..37950782a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseGraphExecutionHistoryNodeDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseGraphExecutionHistoryNodeDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class PulseGraphExecutionHistoryNodeDesc_tImpl : SchemaClass, P public PulseGraphExecutionHistoryNodeDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _StrCellDescOffset = new(() => Schema.GetOffset(0x7F4ECA02AD3F01DD), LazyThreadSafetyMode.None); + public ref CBufferString StrCellDesc { - get => ref _Handle.AsRef(Schema.GetOffset(0x7F4ECA02AD3F01DD)); + get => ref _Handle.AsRef(_StrCellDescOffset.Value); } + private static readonly Lazy _StrBindingNameOffset = new(() => Schema.GetOffset(0x7F4ECA021A5069AA), LazyThreadSafetyMode.None); + public SchemaUntypedField StrBindingName { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x7F4ECA021A5069AA)); + get => new SchemaUntypedField(_Handle + _StrBindingNameOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseGraphInstanceID_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseGraphInstanceID_tImpl.cs index a256a8d06..076c094f2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseGraphInstanceID_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseGraphInstanceID_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PulseGraphInstanceID_tImpl : SchemaClass, PulseGraphInsta public PulseGraphInstanceID_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x4291F7FFDCB0894A), LazyThreadSafetyMode.None); + public ref uint Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x4291F7FFDCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseNodeDynamicOutflows_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseNodeDynamicOutflows_tImpl.cs index 66d199fbf..4b03dcb25 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseNodeDynamicOutflows_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseNodeDynamicOutflows_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PulseNodeDynamicOutflows_tImpl : SchemaClass, PulseNodeDy public PulseNodeDynamicOutflows_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _OutflowsOffset = new(() => Schema.GetOffset(0x3F600DF58F0AFDF8), LazyThreadSafetyMode.None); + public ref CUtlVector Outflows { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3F600DF58F0AFDF8)); + get => ref _Handle.AsRef>(_OutflowsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseNodeDynamicOutflows_t__DynamicOutflow_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseNodeDynamicOutflows_t__DynamicOutflow_tImpl.cs index 69de43751..3cd71214c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseNodeDynamicOutflows_t__DynamicOutflow_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseNodeDynamicOutflows_t__DynamicOutflow_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class PulseNodeDynamicOutflows_t__DynamicOutflow_tImpl : Schema public PulseNodeDynamicOutflows_t__DynamicOutflow_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _OutflowIDOffset = new(() => Schema.GetOffset(0x4ACC8D59E16DD56), LazyThreadSafetyMode.None); + public ref CGlobalSymbol OutflowID { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ACC8D59E16DD56)); + get => ref _Handle.AsRef(_OutflowIDOffset.Value); } + private static readonly Lazy _ConnectionOffset = new(() => Schema.GetOffset(0x4ACC8D5D4CD5F59), LazyThreadSafetyMode.None); + public CPulse_OutflowConnection Connection { - get => new CPulse_OutflowConnectionImpl(_Handle + Schema.GetOffset(0x4ACC8D5D4CD5F59)); + get => new CPulse_OutflowConnectionImpl(_Handle + _ConnectionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseObservableBoolExpression_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseObservableBoolExpression_tImpl.cs index 73dac2b9a..7d580d5f8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseObservableBoolExpression_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseObservableBoolExpression_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class PulseObservableBoolExpression_tImpl : SchemaClass, PulseO public PulseObservableBoolExpression_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _EvaluateConnectionOffset = new(() => Schema.GetOffset(0x420AB396176904EE), LazyThreadSafetyMode.None); + public CPulse_OutflowConnection EvaluateConnection { - get => new CPulse_OutflowConnectionImpl(_Handle + Schema.GetOffset(0x420AB396176904EE)); + get => new CPulse_OutflowConnectionImpl(_Handle + _EvaluateConnectionOffset.Value); } + private static readonly Lazy _DependentObservableVarsOffset = new(() => Schema.GetOffset(0x420AB396C3F55B8B), LazyThreadSafetyMode.None); + public ref CUtlVector DependentObservableVars { - get => ref _Handle.AsRef>(Schema.GetOffset(0x420AB396C3F55B8B)); + get => ref _Handle.AsRef>(_DependentObservableVarsOffset.Value); } + private static readonly Lazy _DependentObservableBlackboardReferencesOffset = new(() => Schema.GetOffset(0x420AB3961EE1483A), LazyThreadSafetyMode.None); + public ref CUtlVector DependentObservableBlackboardReferences { - get => ref _Handle.AsRef>(Schema.GetOffset(0x420AB3961EE1483A)); + get => ref _Handle.AsRef>(_DependentObservableBlackboardReferencesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRegisterMap_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRegisterMap_tImpl.cs index bdb38f9c8..9e5148182 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRegisterMap_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRegisterMap_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class PulseRegisterMap_tImpl : SchemaClass, PulseRegisterMap_t public PulseRegisterMap_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _InparamsOffset = new(() => Schema.GetOffset(0x833FEA64B9B18E04), LazyThreadSafetyMode.None); + public SchemaUntypedField Inparams { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x833FEA64B9B18E04)); + get => new SchemaUntypedField(_Handle + _InparamsOffset.Value); } + private static readonly Lazy _InparamsWhichCanBeMovedOffset = new(() => Schema.GetOffset(0x833FEA6405245E23), LazyThreadSafetyMode.None); + public SchemaUntypedField InparamsWhichCanBeMoved { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x833FEA6405245E23)); + get => new SchemaUntypedField(_Handle + _InparamsWhichCanBeMovedOffset.Value); } + private static readonly Lazy _OutparamsOffset = new(() => Schema.GetOffset(0x833FEA64798D964D), LazyThreadSafetyMode.None); + public SchemaUntypedField Outparams { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x833FEA64798D964D)); + get => new SchemaUntypedField(_Handle + _OutparamsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeBlackboardReferenceIndex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeBlackboardReferenceIndex_tImpl.cs index df3953090..0f22556ac 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeBlackboardReferenceIndex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeBlackboardReferenceIndex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PulseRuntimeBlackboardReferenceIndex_tImpl : SchemaClass, public PulseRuntimeBlackboardReferenceIndex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xE01C0CE3DCB0894A), LazyThreadSafetyMode.None); + public ref short Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xE01C0CE3DCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeCallInfoIndex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeCallInfoIndex_tImpl.cs index be4d7f297..82bfbf34f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeCallInfoIndex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeCallInfoIndex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PulseRuntimeCallInfoIndex_tImpl : SchemaClass, PulseRunti public PulseRuntimeCallInfoIndex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xF715E3DDDCB0894A), LazyThreadSafetyMode.None); + public ref int Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xF715E3DDDCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeCellIndex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeCellIndex_tImpl.cs index 93a506046..32ca0a359 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeCellIndex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeCellIndex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PulseRuntimeCellIndex_tImpl : SchemaClass, PulseRuntimeCe public PulseRuntimeCellIndex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x21F81EE9DCB0894A), LazyThreadSafetyMode.None); + public ref int Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x21F81EE9DCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeChunkIndex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeChunkIndex_tImpl.cs index 3910942e1..cc401a8c1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeChunkIndex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeChunkIndex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PulseRuntimeChunkIndex_tImpl : SchemaClass, PulseRuntimeC public PulseRuntimeChunkIndex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xBC20E682DCB0894A), LazyThreadSafetyMode.None); + public ref int Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xBC20E682DCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeConstantIndex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeConstantIndex_tImpl.cs index 679eb4763..239e6481d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeConstantIndex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeConstantIndex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PulseRuntimeConstantIndex_tImpl : SchemaClass, PulseRunti public PulseRuntimeConstantIndex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xCEAFE609DCB0894A), LazyThreadSafetyMode.None); + public ref short Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xCEAFE609DCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeDomainValueIndex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeDomainValueIndex_tImpl.cs index 131ab1f29..cfa9ba7d0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeDomainValueIndex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeDomainValueIndex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PulseRuntimeDomainValueIndex_tImpl : SchemaClass, PulseRu public PulseRuntimeDomainValueIndex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xCA672082DCB0894A), LazyThreadSafetyMode.None); + public ref short Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xCA672082DCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeEntrypointIndex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeEntrypointIndex_tImpl.cs index 1d498907e..16e1a709a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeEntrypointIndex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeEntrypointIndex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PulseRuntimeEntrypointIndex_tImpl : SchemaClass, PulseRun public PulseRuntimeEntrypointIndex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x5C72FD47DCB0894A), LazyThreadSafetyMode.None); + public ref int Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x5C72FD47DCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeInvokeIndex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeInvokeIndex_tImpl.cs index f73eb6812..9b3b53f11 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeInvokeIndex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeInvokeIndex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PulseRuntimeInvokeIndex_tImpl : SchemaClass, PulseRuntime public PulseRuntimeInvokeIndex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xEFA175D1DCB0894A), LazyThreadSafetyMode.None); + public ref int Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xEFA175D1DCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeOutputIndex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeOutputIndex_tImpl.cs index 05cb66fb6..06d10a121 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeOutputIndex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeOutputIndex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PulseRuntimeOutputIndex_tImpl : SchemaClass, PulseRuntime public PulseRuntimeOutputIndex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x1E8606FEDCB0894A), LazyThreadSafetyMode.None); + public ref int Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x1E8606FEDCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeRegisterIndex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeRegisterIndex_tImpl.cs index 862c5f9f5..3a5021726 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeRegisterIndex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeRegisterIndex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PulseRuntimeRegisterIndex_tImpl : SchemaClass, PulseRunti public PulseRuntimeRegisterIndex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x9EE6795EDCB0894A), LazyThreadSafetyMode.None); + public ref short Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x9EE6795EDCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeStateOffset_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeStateOffset_tImpl.cs index 9b34ee1b3..cafc3c790 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeStateOffset_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeStateOffset_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PulseRuntimeStateOffset_tImpl : SchemaClass, PulseRuntime public PulseRuntimeStateOffset_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x6DB06DE3DCB0894A), LazyThreadSafetyMode.None); + public ref ushort Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x6DB06DE3DCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeVarIndex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeVarIndex_tImpl.cs index 2d0aabaf6..507c18d2e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeVarIndex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseRuntimeVarIndex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PulseRuntimeVarIndex_tImpl : SchemaClass, PulseRuntimeVar public PulseRuntimeVarIndex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0xDA229C32DCB0894A), LazyThreadSafetyMode.None); + public ref int Value { - get => ref _Handle.AsRef(Schema.GetOffset(0xDA229C32DCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseScriptedSequenceData_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseScriptedSequenceData_tImpl.cs index 208be2f1d..fce20728f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseScriptedSequenceData_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseScriptedSequenceData_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,57 +17,81 @@ internal partial class PulseScriptedSequenceData_tImpl : SchemaClass, PulseScrip public PulseScriptedSequenceData_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ActorIDOffset = new(() => Schema.GetOffset(0x7C7814728383E163), LazyThreadSafetyMode.None); + public ref int ActorID { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C7814728383E163)); + get => ref _Handle.AsRef(_ActorIDOffset.Value); } + private static readonly Lazy _PreIdleSequenceOffset = new(() => Schema.GetOffset(0x7C781472672B317E), LazyThreadSafetyMode.None); + public string PreIdleSequence { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7C781472672B317E)); + var ptr = _Handle.Read(_PreIdleSequenceOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7C781472672B317E, value); + set => Schema.SetString(_Handle, _PreIdleSequenceOffset.Value, value); } + private static readonly Lazy _EntrySequenceOffset = new(() => Schema.GetOffset(0x7C7814722635E511), LazyThreadSafetyMode.None); + public string EntrySequence { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7C7814722635E511)); + var ptr = _Handle.Read(_EntrySequenceOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7C7814722635E511, value); + set => Schema.SetString(_Handle, _EntrySequenceOffset.Value, value); } + private static readonly Lazy _SequenceOffset = new(() => Schema.GetOffset(0x7C78147209FFA3B5), LazyThreadSafetyMode.None); + public string Sequence { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7C78147209FFA3B5)); + var ptr = _Handle.Read(_SequenceOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7C78147209FFA3B5, value); + set => Schema.SetString(_Handle, _SequenceOffset.Value, value); } + private static readonly Lazy _ExitSequenceOffset = new(() => Schema.GetOffset(0x7C7814725F482845), LazyThreadSafetyMode.None); + public string ExitSequence { get { - var ptr = _Handle.Read(Schema.GetOffset(0x7C7814725F482845)); + var ptr = _Handle.Read(_ExitSequenceOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x7C7814725F482845, value); + set => Schema.SetString(_Handle, _ExitSequenceOffset.Value, value); } + private static readonly Lazy _MoveToOffset = new(() => Schema.GetOffset(0x7C781472A9282EB9), LazyThreadSafetyMode.None); + public ref ScriptedMoveTo_t MoveTo { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C781472A9282EB9)); + get => ref _Handle.AsRef(_MoveToOffset.Value); } + private static readonly Lazy _MoveToGaitOffset = new(() => Schema.GetOffset(0x7C7814721217E084), LazyThreadSafetyMode.None); + public ref SharedMovementGait_t MoveToGait { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C7814721217E084)); + get => ref _Handle.AsRef(_MoveToGaitOffset.Value); } + private static readonly Lazy _HeldWeaponBehaviorOffset = new(() => Schema.GetOffset(0x7C781472D545A524), LazyThreadSafetyMode.None); + public ref ScriptedHeldWeaponBehavior_t HeldWeaponBehavior { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C781472D545A524)); + get => ref _Handle.AsRef(_HeldWeaponBehaviorOffset.Value); } + private static readonly Lazy _LoopPreIdleSequenceOffset = new(() => Schema.GetOffset(0x7C7814728649E65F), LazyThreadSafetyMode.None); + public ref bool LoopPreIdleSequence { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C7814728649E65F)); + get => ref _Handle.AsRef(_LoopPreIdleSequenceOffset.Value); } + private static readonly Lazy _LoopActionSequenceOffset = new(() => Schema.GetOffset(0x7C78147242C7CFA4), LazyThreadSafetyMode.None); + public ref bool LoopActionSequence { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C78147242C7CFA4)); + get => ref _Handle.AsRef(_LoopActionSequenceOffset.Value); } + private static readonly Lazy _LoopPostIdleSequenceOffset = new(() => Schema.GetOffset(0x7C781472C17036CA), LazyThreadSafetyMode.None); + public ref bool LoopPostIdleSequence { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C781472C17036CA)); + get => ref _Handle.AsRef(_LoopPostIdleSequenceOffset.Value); } + private static readonly Lazy _IgnoreLookAtOffset = new(() => Schema.GetOffset(0x7C781472ECC380B5), LazyThreadSafetyMode.None); + public ref bool IgnoreLookAt { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C781472ECC380B5)); + get => ref _Handle.AsRef(_IgnoreLookAtOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseSelectorOutflowList_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseSelectorOutflowList_tImpl.cs index 8910e327e..f1b7d271e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseSelectorOutflowList_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/PulseSelectorOutflowList_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class PulseSelectorOutflowList_tImpl : SchemaClass, PulseSelect public PulseSelectorOutflowList_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _OutflowsOffset = new(() => Schema.GetOffset(0x2A880DD28F0AFDF8), LazyThreadSafetyMode.None); + public ref CUtlVector Outflows { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2A880DD28F0AFDF8)); + get => ref _Handle.AsRef>(_OutflowsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/QuestProgressImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/QuestProgressImpl.cs index 9301ba9fc..cc2a30f9f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/QuestProgressImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/QuestProgressImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RagdollCreationParams_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RagdollCreationParams_tImpl.cs index 2d754c90f..d0cc428df 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RagdollCreationParams_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RagdollCreationParams_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class RagdollCreationParams_tImpl : SchemaClass, RagdollCreatio public RagdollCreationParams_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ForceOffset = new(() => Schema.GetOffset(0xAF0FCC44E530B0A8), LazyThreadSafetyMode.None); + public ref Vector Force { - get => ref _Handle.AsRef(Schema.GetOffset(0xAF0FCC44E530B0A8)); + get => ref _Handle.AsRef(_ForceOffset.Value); } + private static readonly Lazy _ForceBoneOffset = new(() => Schema.GetOffset(0xAF0FCC44DDAC019E), LazyThreadSafetyMode.None); + public ref int ForceBone { - get => ref _Handle.AsRef(Schema.GetOffset(0xAF0FCC44DDAC019E)); + get => ref _Handle.AsRef(_ForceBoneOffset.Value); } + private static readonly Lazy _ForceCurrentWorldTransformOffset = new(() => Schema.GetOffset(0xAF0FCC443FC20379), LazyThreadSafetyMode.None); + public ref bool ForceCurrentWorldTransform { - get => ref _Handle.AsRef(Schema.GetOffset(0xAF0FCC443FC20379)); + get => ref _Handle.AsRef(_ForceCurrentWorldTransformOffset.Value); } + private static readonly Lazy _UseLRURetirementOffset = new(() => Schema.GetOffset(0xAF0FCC444DCF62FA), LazyThreadSafetyMode.None); + public ref bool UseLRURetirement { - get => ref _Handle.AsRef(Schema.GetOffset(0xAF0FCC444DCF62FA)); + get => ref _Handle.AsRef(_UseLRURetirementOffset.Value); } + private static readonly Lazy _HealthToGrantOffset = new(() => Schema.GetOffset(0xAF0FCC4414E28C5C), LazyThreadSafetyMode.None); + public ref int HealthToGrant { - get => ref _Handle.AsRef(Schema.GetOffset(0xAF0FCC4414E28C5C)); + get => ref _Handle.AsRef(_HealthToGrantOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RelationshipOverride_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RelationshipOverride_tImpl.cs index 2c8283530..6c741eb2d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RelationshipOverride_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RelationshipOverride_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class RelationshipOverride_tImpl : Relationship_tImpl, Relation public RelationshipOverride_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _EntityOffset = new(() => Schema.GetOffset(0x2EECEBE0D33FF5DA), LazyThreadSafetyMode.None); + public ref CHandle Entity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x2EECEBE0D33FF5DA)); + get => ref _Handle.AsRef>(_EntityOffset.Value); } + private static readonly Lazy _ClassTypeOffset = new(() => Schema.GetOffset(0x2EECEBE040A47427), LazyThreadSafetyMode.None); + public ref Class_T ClassType { - get => ref _Handle.AsRef(Schema.GetOffset(0x2EECEBE040A47427)); + get => ref _Handle.AsRef(_ClassTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/Relationship_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/Relationship_tImpl.cs index 49cd307eb..0021b7dcb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/Relationship_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/Relationship_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class Relationship_tImpl : SchemaClass, Relationship_t { public Relationship_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _DispositionOffset = new(() => Schema.GetOffset(0xD0FE62280D365234), LazyThreadSafetyMode.None); + public ref Disposition_t Disposition { - get => ref _Handle.AsRef(Schema.GetOffset(0xD0FE62280D365234)); + get => ref _Handle.AsRef(_DispositionOffset.Value); } + private static readonly Lazy _PriorityOffset = new(() => Schema.GetOffset(0xD0FE622894E4E309), LazyThreadSafetyMode.None); + public ref int Priority { - get => ref _Handle.AsRef(Schema.GetOffset(0xD0FE622894E4E309)); + get => ref _Handle.AsRef(_PriorityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RenderHairStrandInfo_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RenderHairStrandInfo_tImpl.cs index 797169646..ea3609818 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RenderHairStrandInfo_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RenderHairStrandInfo_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -27,14 +29,20 @@ public ISchemaFixedArray RootOffset_flLengthScale { public ISchemaFixedArray PackedBaseUv { get => new SchemaFixedArray(_Handle, 0x9037AEC6D5457D8B, 2, 2, 2); } + private static readonly Lazy _PackedSurfaceNormalOsOffset = new(() => Schema.GetOffset(0x9037AEC605444631), LazyThreadSafetyMode.None); + public ref uint PackedSurfaceNormalOs { - get => ref _Handle.AsRef(Schema.GetOffset(0x9037AEC605444631)); + get => ref _Handle.AsRef(_PackedSurfaceNormalOsOffset.Value); } + private static readonly Lazy _PackedSurfaceTangentOsOffset = new(() => Schema.GetOffset(0x9037AEC6FD9896F7), LazyThreadSafetyMode.None); + public ref uint PackedSurfaceTangentOs { - get => ref _Handle.AsRef(Schema.GetOffset(0x9037AEC6FD9896F7)); + get => ref _Handle.AsRef(_PackedSurfaceTangentOsOffset.Value); } + private static readonly Lazy _DataOffset_SegmentsOffset = new(() => Schema.GetOffset(0x9037AEC6BB31BC1D), LazyThreadSafetyMode.None); + public ref uint DataOffset_Segments { - get => ref _Handle.AsRef(Schema.GetOffset(0x9037AEC6BB31BC1D)); + get => ref _Handle.AsRef(_DataOffset_SegmentsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RenderInputLayoutField_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RenderInputLayoutField_tImpl.cs index 7a834eb91..655548839 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RenderInputLayoutField_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RenderInputLayoutField_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,31 +17,43 @@ internal partial class RenderInputLayoutField_tImpl : SchemaClass, RenderInputLa public RenderInputLayoutField_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SemanticNameOffset = new(() => Schema.GetOffset(0x752C88F08F25E44C), LazyThreadSafetyMode.None); + public string SemanticName { get { - var ptr = _Handle + Schema.GetOffset(0x752C88F08F25E44C); + var ptr = _Handle + _SemanticNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x752C88F08F25E44C, value, 32); + set => Schema.SetFixedString(_Handle, _SemanticNameOffset.Value, value, 32); } + private static readonly Lazy _SemanticIndexOffset = new(() => Schema.GetOffset(0x752C88F0AAC99783), LazyThreadSafetyMode.None); + public ref byte SemanticIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x752C88F0AAC99783)); + get => ref _Handle.AsRef(_SemanticIndexOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0x752C88F027734C8E), LazyThreadSafetyMode.None); + public ref short Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0x752C88F027734C8E)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _SlotOffset = new(() => Schema.GetOffset(0x752C88F08A37D215), LazyThreadSafetyMode.None); + public ref byte Slot { - get => ref _Handle.AsRef(Schema.GetOffset(0x752C88F08A37D215)); + get => ref _Handle.AsRef(_SlotOffset.Value); } + private static readonly Lazy _SlotTypeOffset = new(() => Schema.GetOffset(0x752C88F05072B95D), LazyThreadSafetyMode.None); + public ref RenderSlotType_t SlotType { - get => ref _Handle.AsRef(Schema.GetOffset(0x752C88F05072B95D)); + get => ref _Handle.AsRef(_SlotTypeOffset.Value); } + private static readonly Lazy _ShaderSemanticOffset = new(() => Schema.GetOffset(0x752C88F0897CAA95), LazyThreadSafetyMode.None); + public string ShaderSemantic { get { - var ptr = _Handle + Schema.GetOffset(0x752C88F0897CAA95); + var ptr = _Handle + _ShaderSemanticOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0x752C88F0897CAA95, value, 32); + set => Schema.SetFixedString(_Handle, _ShaderSemanticOffset.Value, value, 32); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RenderProjectedMaterial_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RenderProjectedMaterial_tImpl.cs index 0dee744cc..02cd5fe9f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RenderProjectedMaterial_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RenderProjectedMaterial_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class RenderProjectedMaterial_tImpl : SchemaClass, RenderProjec public RenderProjectedMaterial_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _MaterialOffset = new(() => Schema.GetOffset(0x62AF09D5888CE42E), LazyThreadSafetyMode.None); + public ref CStrongHandle Material { - get => ref _Handle.AsRef>(Schema.GetOffset(0x62AF09D5888CE42E)); + get => ref _Handle.AsRef>(_MaterialOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RenderSkeletonBone_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RenderSkeletonBone_tImpl.cs index 2d3b51108..34c848f7f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RenderSkeletonBone_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RenderSkeletonBone_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,28 +17,38 @@ internal partial class RenderSkeletonBone_tImpl : SchemaClass, RenderSkeletonBon public RenderSkeletonBone_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BoneNameOffset = new(() => Schema.GetOffset(0x6A3BCC9BFDEE0E0C), LazyThreadSafetyMode.None); + public string BoneName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6A3BCC9BFDEE0E0C)); + var ptr = _Handle.Read(_BoneNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6A3BCC9BFDEE0E0C, value); + set => Schema.SetString(_Handle, _BoneNameOffset.Value, value); } + private static readonly Lazy _ParentNameOffset = new(() => Schema.GetOffset(0x6A3BCC9BC45C5BBE), LazyThreadSafetyMode.None); + public string ParentName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6A3BCC9BC45C5BBE)); + var ptr = _Handle.Read(_ParentNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6A3BCC9BC45C5BBE, value); + set => Schema.SetString(_Handle, _ParentNameOffset.Value, value); } + private static readonly Lazy _InvBindPoseOffset = new(() => Schema.GetOffset(0x6A3BCC9B265CACBE), LazyThreadSafetyMode.None); + public ref matrix3x4_t InvBindPose { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A3BCC9B265CACBE)); + get => ref _Handle.AsRef(_InvBindPoseOffset.Value); } + private static readonly Lazy _BboxOffset = new(() => Schema.GetOffset(0x6A3BCC9B39392A72), LazyThreadSafetyMode.None); + public SkeletonBoneBounds_t Bbox { - get => new SkeletonBoneBounds_tImpl(_Handle + Schema.GetOffset(0x6A3BCC9B39392A72)); + get => new SkeletonBoneBounds_tImpl(_Handle + _BboxOffset.Value); } + private static readonly Lazy _SphereRadiusOffset = new(() => Schema.GetOffset(0x6A3BCC9B7AF55658), LazyThreadSafetyMode.None); + public ref float SphereRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x6A3BCC9B7AF55658)); + get => ref _Handle.AsRef(_SphereRadiusOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ResourceId_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ResourceId_tImpl.cs index 8999df996..ed0dcfcc7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ResourceId_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ResourceId_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class ResourceId_tImpl : SchemaClass, ResourceId_t { public ResourceId_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x21F7998BDCB0894A), LazyThreadSafetyMode.None); + public ref ulong Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x21F7998BDCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ResponseContext_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ResponseContext_tImpl.cs index 7113dcbbc..23211704e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ResponseContext_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ResponseContext_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,22 +17,28 @@ internal partial class ResponseContext_tImpl : SchemaClass, ResponseContext_t { public ResponseContext_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x8F5A90A274FF65FE), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x8F5A90A274FF65FE)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x8F5A90A274FF65FE, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x8F5A90A28044B702), LazyThreadSafetyMode.None); + public string Value { get { - var ptr = _Handle.Read(Schema.GetOffset(0x8F5A90A28044B702)); + var ptr = _Handle.Read(_ValueOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x8F5A90A28044B702, value); + set => Schema.SetString(_Handle, _ValueOffset.Value, value); } + private static readonly Lazy _ExpirationTimeOffset = new(() => Schema.GetOffset(0x8F5A90A20389142D), LazyThreadSafetyMode.None); + public GameTime_t ExpirationTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8F5A90A20389142D)); + get => new GameTime_tImpl(_Handle + _ExpirationTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ResponseFollowupImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ResponseFollowupImpl.cs index 23b48830b..7adbdc970 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ResponseFollowupImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ResponseFollowupImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,49 +17,65 @@ internal partial class ResponseFollowupImpl : SchemaClass, ResponseFollowup { public ResponseFollowupImpl(nint handle) : base(handle) { } + private static readonly Lazy _Followup_conceptOffset = new(() => Schema.GetOffset(0x6C93EDBE24539C9E), LazyThreadSafetyMode.None); + public string Followup_concept { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6C93EDBE24539C9E)); + var ptr = _Handle.Read(_Followup_conceptOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6C93EDBE24539C9E, value); + set => Schema.SetString(_Handle, _Followup_conceptOffset.Value, value); } + private static readonly Lazy _Followup_contextsOffset = new(() => Schema.GetOffset(0x6C93EDBE5C4196A6), LazyThreadSafetyMode.None); + public string Followup_contexts { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6C93EDBE5C4196A6)); + var ptr = _Handle.Read(_Followup_contextsOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6C93EDBE5C4196A6, value); + set => Schema.SetString(_Handle, _Followup_contextsOffset.Value, value); } + private static readonly Lazy _Followup_delayOffset = new(() => Schema.GetOffset(0x6C93EDBEC5E3BE49), LazyThreadSafetyMode.None); + public ref float Followup_delay { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C93EDBEC5E3BE49)); + get => ref _Handle.AsRef(_Followup_delayOffset.Value); } + private static readonly Lazy _Followup_targetOffset = new(() => Schema.GetOffset(0x6C93EDBEAD89F8D7), LazyThreadSafetyMode.None); + public string Followup_target { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6C93EDBEAD89F8D7)); + var ptr = _Handle.Read(_Followup_targetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6C93EDBEAD89F8D7, value); + set => Schema.SetString(_Handle, _Followup_targetOffset.Value, value); } + private static readonly Lazy _Followup_entityiotargetOffset = new(() => Schema.GetOffset(0x6C93EDBEFF990A74), LazyThreadSafetyMode.None); + public string Followup_entityiotarget { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6C93EDBEFF990A74)); + var ptr = _Handle.Read(_Followup_entityiotargetOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6C93EDBEFF990A74, value); + set => Schema.SetString(_Handle, _Followup_entityiotargetOffset.Value, value); } + private static readonly Lazy _Followup_entityioinputOffset = new(() => Schema.GetOffset(0x6C93EDBEAB6AD4B7), LazyThreadSafetyMode.None); + public string Followup_entityioinput { get { - var ptr = _Handle.Read(Schema.GetOffset(0x6C93EDBEAB6AD4B7)); + var ptr = _Handle.Read(_Followup_entityioinputOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x6C93EDBEAB6AD4B7, value); + set => Schema.SetString(_Handle, _Followup_entityioinputOffset.Value, value); } + private static readonly Lazy _Followup_entityiodelayOffset = new(() => Schema.GetOffset(0x6C93EDBE37A3C494), LazyThreadSafetyMode.None); + public ref float Followup_entityiodelay { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C93EDBE37A3C494)); + get => ref _Handle.AsRef(_Followup_entityiodelayOffset.Value); } + private static readonly Lazy _FiredOffset = new(() => Schema.GetOffset(0x6C93EDBE5ABF7B87), LazyThreadSafetyMode.None); + public ref bool Fired { - get => ref _Handle.AsRef(Schema.GetOffset(0x6C93EDBE5ABF7B87)); + get => ref _Handle.AsRef(_FiredOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ResponseParamsImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ResponseParamsImpl.cs index 083183892..20f2baa9f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ResponseParamsImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ResponseParamsImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,21 @@ internal partial class ResponseParamsImpl : SchemaClass, ResponseParams { public ResponseParamsImpl(nint handle) : base(handle) { } + private static readonly Lazy _OddsOffset = new(() => Schema.GetOffset(0x5C5BE8C4E9B76DD7), LazyThreadSafetyMode.None); + public ref short Odds { - get => ref _Handle.AsRef(Schema.GetOffset(0x5C5BE8C4E9B76DD7)); + get => ref _Handle.AsRef(_OddsOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x5C5BE8C49C677A2C), LazyThreadSafetyMode.None); + public ref short Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x5C5BE8C49C677A2C)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _FollowupOffset = new(() => Schema.GetOffset(0x5C5BE8C481D8C38F), LazyThreadSafetyMode.None); + public ResponseFollowup? Followup { get { - var ptr = _Handle.Read(Schema.GetOffset(0x5C5BE8C481D8C38F)); + var ptr = _Handle.Read(_FollowupOffset.Value); return ptr.IsValidPtr() ? new ResponseFollowupImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnBlendVertex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnBlendVertex_tImpl.cs index 9bb96d181..b60e087ca 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnBlendVertex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnBlendVertex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class RnBlendVertex_tImpl : SchemaClass, RnBlendVertex_t { public RnBlendVertex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _Weight0Offset = new(() => Schema.GetOffset(0xE168A4F195C99E6F), LazyThreadSafetyMode.None); + public ref ushort Weight0 { - get => ref _Handle.AsRef(Schema.GetOffset(0xE168A4F195C99E6F)); + get => ref _Handle.AsRef(_Weight0Offset.Value); } + private static readonly Lazy _Index0Offset = new(() => Schema.GetOffset(0xE168A4F1CD32A2F5), LazyThreadSafetyMode.None); + public ref ushort Index0 { - get => ref _Handle.AsRef(Schema.GetOffset(0xE168A4F1CD32A2F5)); + get => ref _Handle.AsRef(_Index0Offset.Value); } + private static readonly Lazy _Weight1Offset = new(() => Schema.GetOffset(0xE168A4F194C99CDC), LazyThreadSafetyMode.None); + public ref ushort Weight1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xE168A4F194C99CDC)); + get => ref _Handle.AsRef(_Weight1Offset.Value); } + private static readonly Lazy _Index1Offset = new(() => Schema.GetOffset(0xE168A4F1CC32A162), LazyThreadSafetyMode.None); + public ref ushort Index1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xE168A4F1CC32A162)); + get => ref _Handle.AsRef(_Index1Offset.Value); } + private static readonly Lazy _Weight2Offset = new(() => Schema.GetOffset(0xE168A4F197C9A195), LazyThreadSafetyMode.None); + public ref ushort Weight2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xE168A4F197C9A195)); + get => ref _Handle.AsRef(_Weight2Offset.Value); } + private static readonly Lazy _Index2Offset = new(() => Schema.GetOffset(0xE168A4F1CB329FCF), LazyThreadSafetyMode.None); + public ref ushort Index2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xE168A4F1CB329FCF)); + get => ref _Handle.AsRef(_Index2Offset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0xE168A4F1CE6E9C28), LazyThreadSafetyMode.None); + public ref ushort Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0xE168A4F1CE6E9C28)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _TargetIndexOffset = new(() => Schema.GetOffset(0xE168A4F1F1A91080), LazyThreadSafetyMode.None); + public ref ushort TargetIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xE168A4F1F1A91080)); + get => ref _Handle.AsRef(_TargetIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnBodyDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnBodyDesc_tImpl.cs index 984c7c8a7..285af6196 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnBodyDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnBodyDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,120 +17,192 @@ internal partial class RnBodyDesc_tImpl : SchemaClass, RnBodyDesc_t { public RnBodyDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _DebugNameOffset = new(() => Schema.GetOffset(0xB8BC96379D265F86), LazyThreadSafetyMode.None); + public string DebugName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB8BC96379D265F86)); + var ptr = _Handle.Read(_DebugNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB8BC96379D265F86, value); + set => Schema.SetString(_Handle, _DebugNameOffset.Value, value); } + private static readonly Lazy _PositionOffset = new(() => Schema.GetOffset(0xB8BC9637BD6A6C9E), LazyThreadSafetyMode.None); + public ref Vector Position { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC9637BD6A6C9E)); + get => ref _Handle.AsRef(_PositionOffset.Value); } + private static readonly Lazy _OrientationOffset = new(() => Schema.GetOffset(0xB8BC9637B94C5DF6), LazyThreadSafetyMode.None); + public SchemaUntypedField Orientation { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xB8BC9637B94C5DF6)); + get => new SchemaUntypedField(_Handle + _OrientationOffset.Value); } + private static readonly Lazy _LinearVelocityOffset = new(() => Schema.GetOffset(0xB8BC963756422B27), LazyThreadSafetyMode.None); + public ref Vector LinearVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC963756422B27)); + get => ref _Handle.AsRef(_LinearVelocityOffset.Value); } + private static readonly Lazy _AngularVelocityOffset = new(() => Schema.GetOffset(0xB8BC96378ACE7A12), LazyThreadSafetyMode.None); + public ref Vector AngularVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC96378ACE7A12)); + get => ref _Handle.AsRef(_AngularVelocityOffset.Value); } + private static readonly Lazy _LocalMassCenterOffset = new(() => Schema.GetOffset(0xB8BC9637AFDB4EDD), LazyThreadSafetyMode.None); + public ref Vector LocalMassCenter { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC9637AFDB4EDD)); + get => ref _Handle.AsRef(_LocalMassCenterOffset.Value); } public ISchemaFixedArray LocalInertiaInv { get => new SchemaFixedArray(_Handle, 0xB8BC9637AF2EEFAD, 3, 12, 4); } + private static readonly Lazy _MassInvOffset = new(() => Schema.GetOffset(0xB8BC96376218E3D2), LazyThreadSafetyMode.None); + public ref float MassInv { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC96376218E3D2)); + get => ref _Handle.AsRef(_MassInvOffset.Value); } + private static readonly Lazy _GameMassOffset = new(() => Schema.GetOffset(0xB8BC96373EB130F1), LazyThreadSafetyMode.None); + public ref float GameMass { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC96373EB130F1)); + get => ref _Handle.AsRef(_GameMassOffset.Value); } + private static readonly Lazy _MassScaleInvOffset = new(() => Schema.GetOffset(0xB8BC9637F3E9CDBA), LazyThreadSafetyMode.None); + public ref float MassScaleInv { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC9637F3E9CDBA)); + get => ref _Handle.AsRef(_MassScaleInvOffset.Value); } + private static readonly Lazy _InertiaScaleInvOffset = new(() => Schema.GetOffset(0xB8BC963772594E66), LazyThreadSafetyMode.None); + public ref float InertiaScaleInv { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC963772594E66)); + get => ref _Handle.AsRef(_InertiaScaleInvOffset.Value); } + private static readonly Lazy _LinearDampingOffset = new(() => Schema.GetOffset(0xB8BC96374E6B7F64), LazyThreadSafetyMode.None); + public ref float LinearDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC96374E6B7F64)); + get => ref _Handle.AsRef(_LinearDampingOffset.Value); } + private static readonly Lazy _AngularDampingOffset = new(() => Schema.GetOffset(0xB8BC96370E32E897), LazyThreadSafetyMode.None); + public ref float AngularDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC96370E32E897)); + get => ref _Handle.AsRef(_AngularDampingOffset.Value); } + private static readonly Lazy _LinearDragOffset = new(() => Schema.GetOffset(0xB8BC9637B3D686BC), LazyThreadSafetyMode.None); + public ref float LinearDrag { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC9637B3D686BC)); + get => ref _Handle.AsRef(_LinearDragOffset.Value); } + private static readonly Lazy _AngularDragOffset = new(() => Schema.GetOffset(0xB8BC9637DCE9A7D1), LazyThreadSafetyMode.None); + public ref float AngularDrag { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC9637DCE9A7D1)); + get => ref _Handle.AsRef(_AngularDragOffset.Value); } + private static readonly Lazy _LinearBuoyancyDragOffset = new(() => Schema.GetOffset(0xB8BC963766B37CD2), LazyThreadSafetyMode.None); + public ref float LinearBuoyancyDrag { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC963766B37CD2)); + get => ref _Handle.AsRef(_LinearBuoyancyDragOffset.Value); } + private static readonly Lazy _AngularBuoyancyDragOffset = new(() => Schema.GetOffset(0xB8BC963731B6B8C7), LazyThreadSafetyMode.None); + public ref float AngularBuoyancyDrag { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC963731B6B8C7)); + get => ref _Handle.AsRef(_AngularBuoyancyDragOffset.Value); } + private static readonly Lazy _LastAwakeForceAccumOffset = new(() => Schema.GetOffset(0xB8BC9637BE6733F6), LazyThreadSafetyMode.None); + public ref Vector LastAwakeForceAccum { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC9637BE6733F6)); + get => ref _Handle.AsRef(_LastAwakeForceAccumOffset.Value); } + private static readonly Lazy _LastAwakeTorqueAccumOffset = new(() => Schema.GetOffset(0xB8BC9637BC86B231), LazyThreadSafetyMode.None); + public ref Vector LastAwakeTorqueAccum { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC9637BC86B231)); + get => ref _Handle.AsRef(_LastAwakeTorqueAccumOffset.Value); } + private static readonly Lazy _BuoyancyFactorOffset = new(() => Schema.GetOffset(0xB8BC96374A0360BE), LazyThreadSafetyMode.None); + public ref float BuoyancyFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC96374A0360BE)); + get => ref _Handle.AsRef(_BuoyancyFactorOffset.Value); } + private static readonly Lazy _GravityScaleOffset = new(() => Schema.GetOffset(0xB8BC9637328A3947), LazyThreadSafetyMode.None); + public ref float GravityScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC9637328A3947)); + get => ref _Handle.AsRef(_GravityScaleOffset.Value); } + private static readonly Lazy _TimeScaleOffset = new(() => Schema.GetOffset(0xB8BC9637B49D735C), LazyThreadSafetyMode.None); + public ref float TimeScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC9637B49D735C)); + get => ref _Handle.AsRef(_TimeScaleOffset.Value); } + private static readonly Lazy _BodyTypeOffset = new(() => Schema.GetOffset(0xB8BC9637415309A9), LazyThreadSafetyMode.None); + public ref int BodyType { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC9637415309A9)); + get => ref _Handle.AsRef(_BodyTypeOffset.Value); } + private static readonly Lazy _GameIndexOffset = new(() => Schema.GetOffset(0xB8BC963764506BB1), LazyThreadSafetyMode.None); + public ref uint GameIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC963764506BB1)); + get => ref _Handle.AsRef(_GameIndexOffset.Value); } + private static readonly Lazy _GameFlagsOffset = new(() => Schema.GetOffset(0xB8BC96370C8F0212), LazyThreadSafetyMode.None); + public ref uint GameFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC96370C8F0212)); + get => ref _Handle.AsRef(_GameFlagsOffset.Value); } + private static readonly Lazy _MinVelocityIterationsOffset = new(() => Schema.GetOffset(0xB8BC9637F89809A8), LazyThreadSafetyMode.None); + public ref byte MinVelocityIterations { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC9637F89809A8)); + get => ref _Handle.AsRef(_MinVelocityIterationsOffset.Value); } + private static readonly Lazy _MinPositionIterationsOffset = new(() => Schema.GetOffset(0xB8BC963721060B7C), LazyThreadSafetyMode.None); + public ref byte MinPositionIterations { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC963721060B7C)); + get => ref _Handle.AsRef(_MinPositionIterationsOffset.Value); } + private static readonly Lazy _MassPriorityOffset = new(() => Schema.GetOffset(0xB8BC96377BA92709), LazyThreadSafetyMode.None); + public ref byte MassPriority { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC96377BA92709)); + get => ref _Handle.AsRef(_MassPriorityOffset.Value); } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0xB8BC96376154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC96376154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } + private static readonly Lazy _SleepingOffset = new(() => Schema.GetOffset(0xB8BC9637024A38E0), LazyThreadSafetyMode.None); + public ref bool Sleeping { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC9637024A38E0)); + get => ref _Handle.AsRef(_SleepingOffset.Value); } + private static readonly Lazy _IsContinuousEnabledOffset = new(() => Schema.GetOffset(0xB8BC9637361FE49F), LazyThreadSafetyMode.None); + public ref bool IsContinuousEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC9637361FE49F)); + get => ref _Handle.AsRef(_IsContinuousEnabledOffset.Value); } + private static readonly Lazy _DragEnabledOffset = new(() => Schema.GetOffset(0xB8BC96370FDF5278), LazyThreadSafetyMode.None); + public ref bool DragEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC96370FDF5278)); + get => ref _Handle.AsRef(_DragEnabledOffset.Value); } + private static readonly Lazy _BuoyancyDragEnabledOffset = new(() => Schema.GetOffset(0xB8BC96378B215DDA), LazyThreadSafetyMode.None); + public ref bool BuoyancyDragEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC96378B215DDA)); + get => ref _Handle.AsRef(_BuoyancyDragEnabledOffset.Value); } + private static readonly Lazy _GravityOffset = new(() => Schema.GetOffset(0xB8BC9637A5AE4779), LazyThreadSafetyMode.None); + public ref Vector Gravity { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC9637A5AE4779)); + get => ref _Handle.AsRef(_GravityOffset.Value); } + private static readonly Lazy _SpeculativeEnabledOffset = new(() => Schema.GetOffset(0xB8BC963753C4B251), LazyThreadSafetyMode.None); + public ref bool SpeculativeEnabled { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC963753C4B251)); + get => ref _Handle.AsRef(_SpeculativeEnabledOffset.Value); } + private static readonly Lazy _HasShadowControllerOffset = new(() => Schema.GetOffset(0xB8BC9637FA7D743F), LazyThreadSafetyMode.None); + public ref bool HasShadowController { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC9637FA7D743F)); + get => ref _Handle.AsRef(_HasShadowControllerOffset.Value); } + private static readonly Lazy _DynamicContinuousContactBehaviorOffset = new(() => Schema.GetOffset(0xB8BC96374846D0CD), LazyThreadSafetyMode.None); + public ref DynamicContinuousContactBehavior_t DynamicContinuousContactBehavior { - get => ref _Handle.AsRef(Schema.GetOffset(0xB8BC96374846D0CD)); + get => ref _Handle.AsRef(_DynamicContinuousContactBehaviorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnCapsuleDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnCapsuleDesc_tImpl.cs index 20f2389cc..96329304a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnCapsuleDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnCapsuleDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class RnCapsuleDesc_tImpl : RnShapeDesc_tImpl, RnCapsuleDesc_t public RnCapsuleDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CapsuleOffset = new(() => Schema.GetOffset(0x842345E29A32484C), LazyThreadSafetyMode.None); + public RnCapsule_t Capsule { - get => new RnCapsule_tImpl(_Handle + Schema.GetOffset(0x842345E29A32484C)); + get => new RnCapsule_tImpl(_Handle + _CapsuleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnCapsule_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnCapsule_tImpl.cs index b83048cfb..d610aca05 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnCapsule_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnCapsule_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,8 +20,10 @@ public RnCapsule_tImpl(nint handle) : base(handle) { public ISchemaFixedArray Center { get => new SchemaFixedArray(_Handle, 0xA2412C03C82A5908, 2, 12, 4); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0xA2412C035ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0xA2412C035ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnFace_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnFace_tImpl.cs index 963678e51..a74f694f9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnFace_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnFace_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class RnFace_tImpl : SchemaClass, RnFace_t { public RnFace_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _EdgeOffset = new(() => Schema.GetOffset(0xE71D75B3E2949FC8), LazyThreadSafetyMode.None); + public ref byte Edge { - get => ref _Handle.AsRef(Schema.GetOffset(0xE71D75B3E2949FC8)); + get => ref _Handle.AsRef(_EdgeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnHalfEdge_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnHalfEdge_tImpl.cs index e89638782..1000a9e2e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnHalfEdge_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnHalfEdge_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class RnHalfEdge_tImpl : SchemaClass, RnHalfEdge_t { public RnHalfEdge_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NextOffset = new(() => Schema.GetOffset(0xB67DE42E8D575D9C), LazyThreadSafetyMode.None); + public ref byte Next { - get => ref _Handle.AsRef(Schema.GetOffset(0xB67DE42E8D575D9C)); + get => ref _Handle.AsRef(_NextOffset.Value); } + private static readonly Lazy _TwinOffset = new(() => Schema.GetOffset(0xB67DE42EF8C9A257), LazyThreadSafetyMode.None); + public ref byte Twin { - get => ref _Handle.AsRef(Schema.GetOffset(0xB67DE42EF8C9A257)); + get => ref _Handle.AsRef(_TwinOffset.Value); } + private static readonly Lazy _OriginOffset = new(() => Schema.GetOffset(0xB67DE42E57B6C543), LazyThreadSafetyMode.None); + public ref byte Origin { - get => ref _Handle.AsRef(Schema.GetOffset(0xB67DE42E57B6C543)); + get => ref _Handle.AsRef(_OriginOffset.Value); } + private static readonly Lazy _FaceOffset = new(() => Schema.GetOffset(0xB67DE42EABBCFB38), LazyThreadSafetyMode.None); + public ref byte Face { - get => ref _Handle.AsRef(Schema.GetOffset(0xB67DE42EABBCFB38)); + get => ref _Handle.AsRef(_FaceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnHullDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnHullDesc_tImpl.cs index e8709060e..bc5773bd0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnHullDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnHullDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class RnHullDesc_tImpl : RnShapeDesc_tImpl, RnHullDesc_t { public RnHullDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _HullOffset = new(() => Schema.GetOffset(0xBB74EDD8AC535D36), LazyThreadSafetyMode.None); + public RnHull_t Hull { - get => new RnHull_tImpl(_Handle + Schema.GetOffset(0xBB74EDD8AC535D36)); + get => new RnHull_tImpl(_Handle + _HullOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnHull_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnHull_tImpl.cs index b50e40c16..f4ed9bc00 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnHull_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnHull_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,48 +17,76 @@ internal partial class RnHull_tImpl : SchemaClass, RnHull_t { public RnHull_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CentroidOffset = new(() => Schema.GetOffset(0x856EB4A1107DFFF1), LazyThreadSafetyMode.None); + public ref Vector Centroid { - get => ref _Handle.AsRef(Schema.GetOffset(0x856EB4A1107DFFF1)); + get => ref _Handle.AsRef(_CentroidOffset.Value); } + private static readonly Lazy _MaxAngularRadiusOffset = new(() => Schema.GetOffset(0x856EB4A1EF22DA79), LazyThreadSafetyMode.None); + public ref float MaxAngularRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x856EB4A1EF22DA79)); + get => ref _Handle.AsRef(_MaxAngularRadiusOffset.Value); } + private static readonly Lazy _BoundsOffset = new(() => Schema.GetOffset(0x856EB4A1ABF76288), LazyThreadSafetyMode.None); + public AABB_t Bounds { - get => new AABB_tImpl(_Handle + Schema.GetOffset(0x856EB4A1ABF76288)); + get => new AABB_tImpl(_Handle + _BoundsOffset.Value); } + private static readonly Lazy _OrthographicAreasOffset = new(() => Schema.GetOffset(0x856EB4A1B74855D3), LazyThreadSafetyMode.None); + public ref Vector OrthographicAreas { - get => ref _Handle.AsRef(Schema.GetOffset(0x856EB4A1B74855D3)); + get => ref _Handle.AsRef(_OrthographicAreasOffset.Value); } + private static readonly Lazy _MassPropertiesOffset = new(() => Schema.GetOffset(0x856EB4A1492CEDF8), LazyThreadSafetyMode.None); + public ref matrix3x4_t MassProperties { - get => ref _Handle.AsRef(Schema.GetOffset(0x856EB4A1492CEDF8)); + get => ref _Handle.AsRef(_MassPropertiesOffset.Value); } + private static readonly Lazy _VolumeOffset = new(() => Schema.GetOffset(0x856EB4A17647E0C9), LazyThreadSafetyMode.None); + public ref float Volume { - get => ref _Handle.AsRef(Schema.GetOffset(0x856EB4A17647E0C9)); + get => ref _Handle.AsRef(_VolumeOffset.Value); } + private static readonly Lazy _SurfaceAreaOffset = new(() => Schema.GetOffset(0x856EB4A1E4AE7C2F), LazyThreadSafetyMode.None); + public ref float SurfaceArea { - get => ref _Handle.AsRef(Schema.GetOffset(0x856EB4A1E4AE7C2F)); + get => ref _Handle.AsRef(_SurfaceAreaOffset.Value); } + private static readonly Lazy _VerticesOffset = new(() => Schema.GetOffset(0x856EB4A1E4F9760E), LazyThreadSafetyMode.None); + public ref CUtlVector Vertices { - get => ref _Handle.AsRef>(Schema.GetOffset(0x856EB4A1E4F9760E)); + get => ref _Handle.AsRef>(_VerticesOffset.Value); } + private static readonly Lazy _VertexPositionsOffset = new(() => Schema.GetOffset(0x856EB4A1E553E225), LazyThreadSafetyMode.None); + public ref CUtlVector VertexPositions { - get => ref _Handle.AsRef>(Schema.GetOffset(0x856EB4A1E553E225)); + get => ref _Handle.AsRef>(_VertexPositionsOffset.Value); } + private static readonly Lazy _EdgesOffset = new(() => Schema.GetOffset(0x856EB4A1CFE839DD), LazyThreadSafetyMode.None); + public ref CUtlVector Edges { - get => ref _Handle.AsRef>(Schema.GetOffset(0x856EB4A1CFE839DD)); + get => ref _Handle.AsRef>(_EdgesOffset.Value); } + private static readonly Lazy _FacesOffset = new(() => Schema.GetOffset(0x856EB4A1B57F1DFD), LazyThreadSafetyMode.None); + public ref CUtlVector Faces { - get => ref _Handle.AsRef>(Schema.GetOffset(0x856EB4A1B57F1DFD)); + get => ref _Handle.AsRef>(_FacesOffset.Value); } + private static readonly Lazy _FacePlanesOffset = new(() => Schema.GetOffset(0x856EB4A1FE0AFD57), LazyThreadSafetyMode.None); + public ref CUtlVector FacePlanes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x856EB4A1FE0AFD57)); + get => ref _Handle.AsRef>(_FacePlanesOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x856EB4A1CE6E9C28), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x856EB4A1CE6E9C28)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _RegionSVMOffset = new(() => Schema.GetOffset(0x856EB4A18AD82DC9), LazyThreadSafetyMode.None); + public CRegionSVM? RegionSVM { get { - var ptr = _Handle.Read(Schema.GetOffset(0x856EB4A18AD82DC9)); + var ptr = _Handle.Read(_RegionSVMOffset.Value); return ptr.IsValidPtr() ? new CRegionSVMImpl(ptr) : null; } } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnMeshDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnMeshDesc_tImpl.cs index e0231b7f1..29f2955ca 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnMeshDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnMeshDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class RnMeshDesc_tImpl : RnShapeDesc_tImpl, RnMeshDesc_t { public RnMeshDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _MeshOffset = new(() => Schema.GetOffset(0xB236F002DEAFA33C), LazyThreadSafetyMode.None); + public RnMesh_t Mesh { - get => new RnMesh_tImpl(_Handle + Schema.GetOffset(0xB236F002DEAFA33C)); + get => new RnMesh_tImpl(_Handle + _MeshOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnMesh_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnMesh_tImpl.cs index c51b0ae4a..35bcdd10b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnMesh_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnMesh_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class RnMesh_tImpl : SchemaClass, RnMesh_t { public RnMesh_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinOffset = new(() => Schema.GetOffset(0x5F23FA63F4B0AA63), LazyThreadSafetyMode.None); + public ref Vector Min { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F23FA63F4B0AA63)); + get => ref _Handle.AsRef(_MinOffset.Value); } + private static readonly Lazy _MaxOffset = new(() => Schema.GetOffset(0x5F23FA63EAC4225D), LazyThreadSafetyMode.None); + public ref Vector Max { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F23FA63EAC4225D)); + get => ref _Handle.AsRef(_MaxOffset.Value); } + private static readonly Lazy _NodesOffset = new(() => Schema.GetOffset(0x5F23FA63EBA045DA), LazyThreadSafetyMode.None); + public ref CUtlVector Nodes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5F23FA63EBA045DA)); + get => ref _Handle.AsRef>(_NodesOffset.Value); } + private static readonly Lazy _VerticesOffset = new(() => Schema.GetOffset(0x5F23FA63E4F9760E), LazyThreadSafetyMode.None); + public SchemaUntypedField Vertices { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x5F23FA63E4F9760E)); + get => new SchemaUntypedField(_Handle + _VerticesOffset.Value); } + private static readonly Lazy _TrianglesOffset = new(() => Schema.GetOffset(0x5F23FA6365BD00C2), LazyThreadSafetyMode.None); + public ref CUtlVector Triangles { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5F23FA6365BD00C2)); + get => ref _Handle.AsRef>(_TrianglesOffset.Value); } + private static readonly Lazy _WingsOffset = new(() => Schema.GetOffset(0x5F23FA63B34C1A4B), LazyThreadSafetyMode.None); + public ref CUtlVector Wings { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5F23FA63B34C1A4B)); + get => ref _Handle.AsRef>(_WingsOffset.Value); } + private static readonly Lazy _TriangleEdgeFlagsOffset = new(() => Schema.GetOffset(0x5F23FA6379FF46EF), LazyThreadSafetyMode.None); + public ref CUtlVector TriangleEdgeFlags { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5F23FA6379FF46EF)); + get => ref _Handle.AsRef>(_TriangleEdgeFlagsOffset.Value); } + private static readonly Lazy _MaterialsOffset = new(() => Schema.GetOffset(0x5F23FA639E4B1B69), LazyThreadSafetyMode.None); + public ref CUtlVector Materials { - get => ref _Handle.AsRef>(Schema.GetOffset(0x5F23FA639E4B1B69)); + get => ref _Handle.AsRef>(_MaterialsOffset.Value); } + private static readonly Lazy _OrthographicAreasOffset = new(() => Schema.GetOffset(0x5F23FA63B74855D3), LazyThreadSafetyMode.None); + public ref Vector OrthographicAreas { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F23FA63B74855D3)); + get => ref _Handle.AsRef(_OrthographicAreasOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x5F23FA63CE6E9C28), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F23FA63CE6E9C28)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _DebugFlagsOffset = new(() => Schema.GetOffset(0x5F23FA6321AEBFEF), LazyThreadSafetyMode.None); + public ref uint DebugFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0x5F23FA6321AEBFEF)); + get => ref _Handle.AsRef(_DebugFlagsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnNode_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnNode_tImpl.cs index 1d57367dc..0e3ff1fdf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnNode_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnNode_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class RnNode_tImpl : SchemaClass, RnNode_t { public RnNode_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinOffset = new(() => Schema.GetOffset(0x7C7D54E2F4B0AA63), LazyThreadSafetyMode.None); + public ref Vector Min { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C7D54E2F4B0AA63)); + get => ref _Handle.AsRef(_MinOffset.Value); } + private static readonly Lazy _ChildrenOffset = new(() => Schema.GetOffset(0x7C7D54E2D0F4635E), LazyThreadSafetyMode.None); + public ref uint Children { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C7D54E2D0F4635E)); + get => ref _Handle.AsRef(_ChildrenOffset.Value); } + private static readonly Lazy _MaxOffset = new(() => Schema.GetOffset(0x7C7D54E2EAC4225D), LazyThreadSafetyMode.None); + public ref Vector Max { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C7D54E2EAC4225D)); + get => ref _Handle.AsRef(_MaxOffset.Value); } + private static readonly Lazy _TriangleOffsetOffset = new(() => Schema.GetOffset(0x7C7D54E2AFE22CE6), LazyThreadSafetyMode.None); + public ref uint TriangleOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x7C7D54E2AFE22CE6)); + get => ref _Handle.AsRef(_TriangleOffsetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnPlane_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnPlane_tImpl.cs index 0bdebb2a1..19b49aa78 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnPlane_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnPlane_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class RnPlane_tImpl : SchemaClass, RnPlane_t { public RnPlane_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NormalOffset = new(() => Schema.GetOffset(0xEAF5B7BAAFB36E96), LazyThreadSafetyMode.None); + public ref Vector Normal { - get => ref _Handle.AsRef(Schema.GetOffset(0xEAF5B7BAAFB36E96)); + get => ref _Handle.AsRef(_NormalOffset.Value); } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0xEAF5B7BA7F14BA34), LazyThreadSafetyMode.None); + public ref float Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0xEAF5B7BA7F14BA34)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnShapeDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnShapeDesc_tImpl.cs index 21eb72580..e57035be7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnShapeDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnShapeDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,27 +17,39 @@ internal partial class RnShapeDesc_tImpl : SchemaClass, RnShapeDesc_t { public RnShapeDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CollisionAttributeIndexOffset = new(() => Schema.GetOffset(0xA24D7D10C7B64DF7), LazyThreadSafetyMode.None); + public ref uint CollisionAttributeIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xA24D7D10C7B64DF7)); + get => ref _Handle.AsRef(_CollisionAttributeIndexOffset.Value); } + private static readonly Lazy _SurfacePropertyIndexOffset = new(() => Schema.GetOffset(0xA24D7D106DED6187), LazyThreadSafetyMode.None); + public ref uint SurfacePropertyIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xA24D7D106DED6187)); + get => ref _Handle.AsRef(_SurfacePropertyIndexOffset.Value); } + private static readonly Lazy _UserFriendlyNameOffset = new(() => Schema.GetOffset(0xA24D7D1000D4523E), LazyThreadSafetyMode.None); + public string UserFriendlyName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xA24D7D1000D4523E)); + var ptr = _Handle.Read(_UserFriendlyNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xA24D7D1000D4523E, value); + set => Schema.SetString(_Handle, _UserFriendlyNameOffset.Value, value); } + private static readonly Lazy _UserFriendlyNameSealedOffset = new(() => Schema.GetOffset(0xA24D7D1076DBAE3A), LazyThreadSafetyMode.None); + public ref bool UserFriendlyNameSealed { - get => ref _Handle.AsRef(Schema.GetOffset(0xA24D7D1076DBAE3A)); + get => ref _Handle.AsRef(_UserFriendlyNameSealedOffset.Value); } + private static readonly Lazy _UserFriendlyNameLongOffset = new(() => Schema.GetOffset(0xA24D7D10F02591B8), LazyThreadSafetyMode.None); + public ref bool UserFriendlyNameLong { - get => ref _Handle.AsRef(Schema.GetOffset(0xA24D7D10F02591B8)); + get => ref _Handle.AsRef(_UserFriendlyNameLongOffset.Value); } + private static readonly Lazy _ToolMaterialHashOffset = new(() => Schema.GetOffset(0xA24D7D105C3E2DDE), LazyThreadSafetyMode.None); + public ref uint ToolMaterialHash { - get => ref _Handle.AsRef(Schema.GetOffset(0xA24D7D105C3E2DDE)); + get => ref _Handle.AsRef(_ToolMaterialHashOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnSoftbodyCapsule_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnSoftbodyCapsule_tImpl.cs index 14e55e21b..3d99720c1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnSoftbodyCapsule_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnSoftbodyCapsule_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,8 +20,10 @@ public RnSoftbodyCapsule_tImpl(nint handle) : base(handle) { public ISchemaFixedArray Center { get => new SchemaFixedArray(_Handle, 0x896978BC82A5908, 2, 12, 4); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x896978B5ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x896978B5ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } public ISchemaFixedArray Particle { get => new SchemaFixedArray(_Handle, 0x896978B863A8E83, 2, 2, 2); diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnSoftbodyParticle_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnSoftbodyParticle_tImpl.cs index 1b2202278..d6afd2ca1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnSoftbodyParticle_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnSoftbodyParticle_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class RnSoftbodyParticle_tImpl : SchemaClass, RnSoftbodyParticl public RnSoftbodyParticle_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _MassInvOffset = new(() => Schema.GetOffset(0xFC49E2986218E3D2), LazyThreadSafetyMode.None); + public ref float MassInv { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC49E2986218E3D2)); + get => ref _Handle.AsRef(_MassInvOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnSoftbodySpring_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnSoftbodySpring_tImpl.cs index 15fd79074..046728691 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnSoftbodySpring_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnSoftbodySpring_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,8 +20,10 @@ public RnSoftbodySpring_tImpl(nint handle) : base(handle) { public ISchemaFixedArray Particle { get => new SchemaFixedArray(_Handle, 0xAB4E9C9B863A8E83, 2, 2, 2); } + private static readonly Lazy _LengthOffset = new(() => Schema.GetOffset(0xAB4E9C9BFF9776DF), LazyThreadSafetyMode.None); + public ref float Length { - get => ref _Handle.AsRef(Schema.GetOffset(0xAB4E9C9BFF9776DF)); + get => ref _Handle.AsRef(_LengthOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnSphereDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnSphereDesc_tImpl.cs index b3a874ad1..6dc75bec3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnSphereDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnSphereDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class RnSphereDesc_tImpl : RnShapeDesc_tImpl, RnSphereDesc_t { public RnSphereDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SphereOffset = new(() => Schema.GetOffset(0x6187F5E1E7A3D98), LazyThreadSafetyMode.None); + public SchemaUntypedField Sphere { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x6187F5E1E7A3D98)); + get => new SchemaUntypedField(_Handle + _SphereOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnTriangle_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnTriangle_tImpl.cs index c3a8262a8..cde9e88a2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnTriangle_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnTriangle_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnVertex_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnVertex_tImpl.cs index ba1317d9d..a7db6de7b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnVertex_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnVertex_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class RnVertex_tImpl : SchemaClass, RnVertex_t { public RnVertex_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _EdgeOffset = new(() => Schema.GetOffset(0xA2F56A80E2949FC8), LazyThreadSafetyMode.None); + public ref byte Edge { - get => ref _Handle.AsRef(Schema.GetOffset(0xA2F56A80E2949FC8)); + get => ref _Handle.AsRef(_EdgeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnWing_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnWing_tImpl.cs index 61330b44c..eaec8f464 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnWing_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RnWing_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RotatorHistoryEntry_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RotatorHistoryEntry_tImpl.cs index e63645ae1..16df8d867 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RotatorHistoryEntry_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RotatorHistoryEntry_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class RotatorHistoryEntry_tImpl : SchemaClass, RotatorHistoryEn public RotatorHistoryEntry_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _InvChangeOffset = new(() => Schema.GetOffset(0xB27D5BA9A4E4D41B), LazyThreadSafetyMode.None); + public ref Quaternion InvChange { - get => ref _Handle.AsRef(Schema.GetOffset(0xB27D5BA9A4E4D41B)); + get => ref _Handle.AsRef(_InvChangeOffset.Value); } + private static readonly Lazy _TimeRotationStartOffset = new(() => Schema.GetOffset(0xB27D5BA9A2B2E208), LazyThreadSafetyMode.None); + public GameTime_t TimeRotationStart { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xB27D5BA9A2B2E208)); + get => new GameTime_tImpl(_Handle + _TimeRotationStartOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RotatorQueueEntry_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RotatorQueueEntry_tImpl.cs index 2a6eb559c..aab335989 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RotatorQueueEntry_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RotatorQueueEntry_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class RotatorQueueEntry_tImpl : SchemaClass, RotatorQueueEntry_ public RotatorQueueEntry_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TargetOffset = new(() => Schema.GetOffset(0x2A6B84384FFCC265), LazyThreadSafetyMode.None); + public ref Quaternion Target { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A6B84384FFCC265)); + get => ref _Handle.AsRef(_TargetOffset.Value); } + private static readonly Lazy _SpaceOffset = new(() => Schema.GetOffset(0x2A6B8438EC1BD596), LazyThreadSafetyMode.None); + public ref RotatorTargetSpace_t Space { - get => ref _Handle.AsRef(Schema.GetOffset(0x2A6B8438EC1BD596)); + get => ref _Handle.AsRef(_SpaceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RsBlendStateDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RsBlendStateDesc_tImpl.cs index aa44efc84..04eddbbc3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RsBlendStateDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RsBlendStateDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class RsBlendStateDesc_tImpl : SchemaClass, RsBlendStateDesc_t public RsBlendStateDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SrcBlendBitsOffset = new(() => Schema.GetOffset(0x5A78EC788B3147C4), LazyThreadSafetyMode.None); + public ref uint SrcBlendBits { - get => ref _Handle.AsRef(Schema.GetOffset(0x5A78EC788B3147C4)); + get => ref _Handle.AsRef(_SrcBlendBitsOffset.Value); } + private static readonly Lazy _DestBlendBitsOffset = new(() => Schema.GetOffset(0x5A78EC78E23CD0E0), LazyThreadSafetyMode.None); + public ref uint DestBlendBits { - get => ref _Handle.AsRef(Schema.GetOffset(0x5A78EC78E23CD0E0)); + get => ref _Handle.AsRef(_DestBlendBitsOffset.Value); } + private static readonly Lazy _SrcBlendAlphaBitsOffset = new(() => Schema.GetOffset(0x5A78EC78E2820E60), LazyThreadSafetyMode.None); + public ref uint SrcBlendAlphaBits { - get => ref _Handle.AsRef(Schema.GetOffset(0x5A78EC78E2820E60)); + get => ref _Handle.AsRef(_SrcBlendAlphaBitsOffset.Value); } + private static readonly Lazy _DestBlendAlphaBitsOffset = new(() => Schema.GetOffset(0x5A78EC784217BA4C), LazyThreadSafetyMode.None); + public ref uint DestBlendAlphaBits { - get => ref _Handle.AsRef(Schema.GetOffset(0x5A78EC784217BA4C)); + get => ref _Handle.AsRef(_DestBlendAlphaBitsOffset.Value); } + private static readonly Lazy _RenderTargetWriteMaskBitsOffset = new(() => Schema.GetOffset(0x5A78EC78CB45C38F), LazyThreadSafetyMode.None); + public ref uint RenderTargetWriteMaskBits { - get => ref _Handle.AsRef(Schema.GetOffset(0x5A78EC78CB45C38F)); + get => ref _Handle.AsRef(_RenderTargetWriteMaskBitsOffset.Value); } + private static readonly Lazy _BlendOpBitsOffset = new(() => Schema.GetOffset(0x5A78EC7824A9742B), LazyThreadSafetyMode.None); + public SchemaUntypedField BlendOpBits { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x5A78EC7824A9742B)); + get => new SchemaUntypedField(_Handle + _BlendOpBitsOffset.Value); } + private static readonly Lazy _AlphaToCoverageEnableOffset = new(() => Schema.GetOffset(0x5A78EC7860C58F3B), LazyThreadSafetyMode.None); + public SchemaUntypedField AlphaToCoverageEnable { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x5A78EC7860C58F3B)); + get => new SchemaUntypedField(_Handle + _AlphaToCoverageEnableOffset.Value); } + private static readonly Lazy _IndependentBlendEnableOffset = new(() => Schema.GetOffset(0x5A78EC78E42575C7), LazyThreadSafetyMode.None); + public SchemaUntypedField IndependentBlendEnable { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x5A78EC78E42575C7)); + get => new SchemaUntypedField(_Handle + _IndependentBlendEnableOffset.Value); } + private static readonly Lazy _BlendOpAlphaBitsOffset = new(() => Schema.GetOffset(0x5A78EC788F0DF1ED), LazyThreadSafetyMode.None); + public ref uint BlendOpAlphaBits { - get => ref _Handle.AsRef(Schema.GetOffset(0x5A78EC788F0DF1ED)); + get => ref _Handle.AsRef(_BlendOpAlphaBitsOffset.Value); } + private static readonly Lazy _BlendEnableBitsOffset = new(() => Schema.GetOffset(0x5A78EC780FE207F3), LazyThreadSafetyMode.None); + public ref byte BlendEnableBits { - get => ref _Handle.AsRef(Schema.GetOffset(0x5A78EC780FE207F3)); + get => ref _Handle.AsRef(_BlendEnableBitsOffset.Value); } + private static readonly Lazy _SrgbWriteEnableBitsOffset = new(() => Schema.GetOffset(0x5A78EC783E54A99F), LazyThreadSafetyMode.None); + public ref byte SrgbWriteEnableBits { - get => ref _Handle.AsRef(Schema.GetOffset(0x5A78EC783E54A99F)); + get => ref _Handle.AsRef(_SrgbWriteEnableBitsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RsDepthStencilStateDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RsDepthStencilStateDesc_tImpl.cs index 5615f7e7a..2f5a9fed6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RsDepthStencilStateDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RsDepthStencilStateDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class RsDepthStencilStateDesc_tImpl : SchemaClass, RsDepthStenc public RsDepthStencilStateDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _DepthTestEnableOffset = new(() => Schema.GetOffset(0x9026AFA806421799), LazyThreadSafetyMode.None); + public SchemaUntypedField DepthTestEnable { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x9026AFA806421799)); + get => new SchemaUntypedField(_Handle + _DepthTestEnableOffset.Value); } + private static readonly Lazy _DepthWriteEnableOffset = new(() => Schema.GetOffset(0x9026AFA88D8085FE), LazyThreadSafetyMode.None); + public SchemaUntypedField DepthWriteEnable { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x9026AFA88D8085FE)); + get => new SchemaUntypedField(_Handle + _DepthWriteEnableOffset.Value); } + private static readonly Lazy _DepthFuncOffset = new(() => Schema.GetOffset(0x9026AFA8B47FC61C), LazyThreadSafetyMode.None); + public ref RsComparison_t DepthFunc { - get => ref _Handle.AsRef(Schema.GetOffset(0x9026AFA8B47FC61C)); + get => ref _Handle.AsRef(_DepthFuncOffset.Value); } + private static readonly Lazy _StencilStateOffset = new(() => Schema.GetOffset(0x9026AFA828EA33C4), LazyThreadSafetyMode.None); + public RsStencilStateDesc_t StencilState { - get => new RsStencilStateDesc_tImpl(_Handle + Schema.GetOffset(0x9026AFA828EA33C4)); + get => new RsStencilStateDesc_tImpl(_Handle + _StencilStateOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RsRasterizerStateDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RsRasterizerStateDesc_tImpl.cs index 054bf03e9..65dac2ab1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RsRasterizerStateDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RsRasterizerStateDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class RsRasterizerStateDesc_tImpl : SchemaClass, RsRasterizerSt public RsRasterizerStateDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FillModeOffset = new(() => Schema.GetOffset(0x9C50E9DEFBCF0B4F), LazyThreadSafetyMode.None); + public ref RsFillMode_t FillMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C50E9DEFBCF0B4F)); + get => ref _Handle.AsRef(_FillModeOffset.Value); } + private static readonly Lazy _CullModeOffset = new(() => Schema.GetOffset(0x9C50E9DE9B5ACDB6), LazyThreadSafetyMode.None); + public ref RsCullMode_t CullMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C50E9DE9B5ACDB6)); + get => ref _Handle.AsRef(_CullModeOffset.Value); } + private static readonly Lazy _DepthClipEnableOffset = new(() => Schema.GetOffset(0x9C50E9DED003B21B), LazyThreadSafetyMode.None); + public ref bool DepthClipEnable { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C50E9DED003B21B)); + get => ref _Handle.AsRef(_DepthClipEnableOffset.Value); } + private static readonly Lazy _MultisampleEnableOffset = new(() => Schema.GetOffset(0x9C50E9DEA3D615E7), LazyThreadSafetyMode.None); + public ref bool MultisampleEnable { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C50E9DEA3D615E7)); + get => ref _Handle.AsRef(_MultisampleEnableOffset.Value); } + private static readonly Lazy _DepthBiasOffset = new(() => Schema.GetOffset(0x9C50E9DE7042005B), LazyThreadSafetyMode.None); + public ref int DepthBias { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C50E9DE7042005B)); + get => ref _Handle.AsRef(_DepthBiasOffset.Value); } + private static readonly Lazy _DepthBiasClampOffset = new(() => Schema.GetOffset(0x9C50E9DEA541A904), LazyThreadSafetyMode.None); + public ref float DepthBiasClamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C50E9DEA541A904)); + get => ref _Handle.AsRef(_DepthBiasClampOffset.Value); } + private static readonly Lazy _SlopeScaledDepthBiasOffset = new(() => Schema.GetOffset(0x9C50E9DE4E34B6FC), LazyThreadSafetyMode.None); + public ref float SlopeScaledDepthBias { - get => ref _Handle.AsRef(Schema.GetOffset(0x9C50E9DE4E34B6FC)); + get => ref _Handle.AsRef(_SlopeScaledDepthBiasOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RsStencilStateDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RsStencilStateDesc_tImpl.cs index 8913791ba..0463a7b78 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/RsStencilStateDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/RsStencilStateDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,38 +17,60 @@ internal partial class RsStencilStateDesc_tImpl : SchemaClass, RsStencilStateDes public RsStencilStateDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _StencilEnableOffset = new(() => Schema.GetOffset(0xA65B7AC54518B5FC), LazyThreadSafetyMode.None); + public SchemaUntypedField StencilEnable { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA65B7AC54518B5FC)); + get => new SchemaUntypedField(_Handle + _StencilEnableOffset.Value); } + private static readonly Lazy _FrontStencilFailOpOffset = new(() => Schema.GetOffset(0xA65B7AC59A6D86EF), LazyThreadSafetyMode.None); + public SchemaUntypedField FrontStencilFailOp { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA65B7AC59A6D86EF)); + get => new SchemaUntypedField(_Handle + _FrontStencilFailOpOffset.Value); } + private static readonly Lazy _FrontStencilDepthFailOpOffset = new(() => Schema.GetOffset(0xA65B7AC5E8761D3E), LazyThreadSafetyMode.None); + public SchemaUntypedField FrontStencilDepthFailOp { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA65B7AC5E8761D3E)); + get => new SchemaUntypedField(_Handle + _FrontStencilDepthFailOpOffset.Value); } + private static readonly Lazy _FrontStencilPassOpOffset = new(() => Schema.GetOffset(0xA65B7AC586875BA2), LazyThreadSafetyMode.None); + public SchemaUntypedField FrontStencilPassOp { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA65B7AC586875BA2)); + get => new SchemaUntypedField(_Handle + _FrontStencilPassOpOffset.Value); } + private static readonly Lazy _FrontStencilFuncOffset = new(() => Schema.GetOffset(0xA65B7AC581FBEC02), LazyThreadSafetyMode.None); + public SchemaUntypedField FrontStencilFunc { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA65B7AC581FBEC02)); + get => new SchemaUntypedField(_Handle + _FrontStencilFuncOffset.Value); } + private static readonly Lazy _BackStencilFailOpOffset = new(() => Schema.GetOffset(0xA65B7AC557603E59), LazyThreadSafetyMode.None); + public SchemaUntypedField BackStencilFailOp { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA65B7AC557603E59)); + get => new SchemaUntypedField(_Handle + _BackStencilFailOpOffset.Value); } + private static readonly Lazy _BackStencilDepthFailOpOffset = new(() => Schema.GetOffset(0xA65B7AC5EA6F7BAC), LazyThreadSafetyMode.None); + public SchemaUntypedField BackStencilDepthFailOp { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA65B7AC5EA6F7BAC)); + get => new SchemaUntypedField(_Handle + _BackStencilDepthFailOpOffset.Value); } + private static readonly Lazy _BackStencilPassOpOffset = new(() => Schema.GetOffset(0xA65B7AC51276F800), LazyThreadSafetyMode.None); + public SchemaUntypedField BackStencilPassOp { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA65B7AC51276F800)); + get => new SchemaUntypedField(_Handle + _BackStencilPassOpOffset.Value); } + private static readonly Lazy _BackStencilFuncOffset = new(() => Schema.GetOffset(0xA65B7AC520B49048), LazyThreadSafetyMode.None); + public SchemaUntypedField BackStencilFunc { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA65B7AC520B49048)); + get => new SchemaUntypedField(_Handle + _BackStencilFuncOffset.Value); } + private static readonly Lazy _StencilReadMaskOffset = new(() => Schema.GetOffset(0xA65B7AC5C9D7494F), LazyThreadSafetyMode.None); + public ref byte StencilReadMask { - get => ref _Handle.AsRef(Schema.GetOffset(0xA65B7AC5C9D7494F)); + get => ref _Handle.AsRef(_StencilReadMaskOffset.Value); } + private static readonly Lazy _StencilWriteMaskOffset = new(() => Schema.GetOffset(0xA65B7AC5E50288E2), LazyThreadSafetyMode.None); + public ref byte StencilWriteMask { - get => ref _Handle.AsRef(Schema.GetOffset(0xA65B7AC5E50288E2)); + get => ref _Handle.AsRef(_StencilWriteMaskOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SampleCodeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SampleCodeImpl.cs index 87eade09f..9c5888ce3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SampleCodeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SampleCodeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SceneEventId_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SceneEventId_tImpl.cs index e7a362f2b..207f10bc4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SceneEventId_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SceneEventId_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class SceneEventId_tImpl : SchemaClass, SceneEventId_t { public SceneEventId_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x73B0927FDCB0894A), LazyThreadSafetyMode.None); + public ref uint Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x73B0927FDCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SceneObject_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SceneObject_tImpl.cs index bce1b5219..d1872fb3e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SceneObject_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SceneObject_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,51 +17,77 @@ internal partial class SceneObject_tImpl : SchemaClass, SceneObject_t { public SceneObject_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ObjectIDOffset = new(() => Schema.GetOffset(0xD71D99937D1B0793), LazyThreadSafetyMode.None); + public ref uint ObjectID { - get => ref _Handle.AsRef(Schema.GetOffset(0xD71D99937D1B0793)); + get => ref _Handle.AsRef(_ObjectIDOffset.Value); } public ISchemaFixedArray Transform { get => new SchemaFixedArray(_Handle, 0xD71D9993EAAE256F, 3, 16, 4); } + private static readonly Lazy _FadeStartDistanceOffset = new(() => Schema.GetOffset(0xD71D99931AE7B71C), LazyThreadSafetyMode.None); + public ref float FadeStartDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xD71D99931AE7B71C)); + get => ref _Handle.AsRef(_FadeStartDistanceOffset.Value); } + private static readonly Lazy _FadeEndDistanceOffset = new(() => Schema.GetOffset(0xD71D999328802B3D), LazyThreadSafetyMode.None); + public ref float FadeEndDistance { - get => ref _Handle.AsRef(Schema.GetOffset(0xD71D999328802B3D)); + get => ref _Handle.AsRef(_FadeEndDistanceOffset.Value); } + private static readonly Lazy _TintColorOffset = new(() => Schema.GetOffset(0xD71D999350AFF21F), LazyThreadSafetyMode.None); + public ref Vector4D TintColor { - get => ref _Handle.AsRef(Schema.GetOffset(0xD71D999350AFF21F)); + get => ref _Handle.AsRef(_TintColorOffset.Value); } + private static readonly Lazy _SkinOffset = new(() => Schema.GetOffset(0xD71D9993F1469658), LazyThreadSafetyMode.None); + public string Skin { get { - var ptr = _Handle.Read(Schema.GetOffset(0xD71D9993F1469658)); + var ptr = _Handle.Read(_SkinOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xD71D9993F1469658, value); + set => Schema.SetString(_Handle, _SkinOffset.Value, value); } + private static readonly Lazy _ObjectTypeFlagsOffset = new(() => Schema.GetOffset(0xD71D9993D9506A69), LazyThreadSafetyMode.None); + public ref ObjectTypeFlags_t ObjectTypeFlags { - get => ref _Handle.AsRef(Schema.GetOffset(0xD71D9993D9506A69)); + get => ref _Handle.AsRef(_ObjectTypeFlagsOffset.Value); } + private static readonly Lazy _LightingOriginOffset = new(() => Schema.GetOffset(0xD71D9993384A57CF), LazyThreadSafetyMode.None); + public ref Vector LightingOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0xD71D9993384A57CF)); + get => ref _Handle.AsRef(_LightingOriginOffset.Value); } + private static readonly Lazy _OverlayRenderOrderOffset = new(() => Schema.GetOffset(0xD71D99935F955EED), LazyThreadSafetyMode.None); + public ref short OverlayRenderOrder { - get => ref _Handle.AsRef(Schema.GetOffset(0xD71D99935F955EED)); + get => ref _Handle.AsRef(_OverlayRenderOrderOffset.Value); } + private static readonly Lazy _LODOverrideOffset = new(() => Schema.GetOffset(0xD71D999301DBC0FC), LazyThreadSafetyMode.None); + public ref short LODOverride { - get => ref _Handle.AsRef(Schema.GetOffset(0xD71D999301DBC0FC)); + get => ref _Handle.AsRef(_LODOverrideOffset.Value); } + private static readonly Lazy _CubeMapPrecomputedHandshakeOffset = new(() => Schema.GetOffset(0xD71D99939B8535E1), LazyThreadSafetyMode.None); + public ref int CubeMapPrecomputedHandshake { - get => ref _Handle.AsRef(Schema.GetOffset(0xD71D99939B8535E1)); + get => ref _Handle.AsRef(_CubeMapPrecomputedHandshakeOffset.Value); } + private static readonly Lazy _LightProbeVolumePrecomputedHandshakeOffset = new(() => Schema.GetOffset(0xD71D9993C6233022), LazyThreadSafetyMode.None); + public ref int LightProbeVolumePrecomputedHandshake { - get => ref _Handle.AsRef(Schema.GetOffset(0xD71D9993C6233022)); + get => ref _Handle.AsRef(_LightProbeVolumePrecomputedHandshakeOffset.Value); } + private static readonly Lazy _RenderableModelOffset = new(() => Schema.GetOffset(0xD71D99932AEEFA82), LazyThreadSafetyMode.None); + public ref CStrongHandle RenderableModel { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD71D99932AEEFA82)); + get => ref _Handle.AsRef>(_RenderableModelOffset.Value); } + private static readonly Lazy _RenderableOffset = new(() => Schema.GetOffset(0xD71D9993972EF84D), LazyThreadSafetyMode.None); + public ref CStrongHandle Renderable { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD71D9993972EF84D)); + get => ref _Handle.AsRef>(_RenderableOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SceneViewId_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SceneViewId_tImpl.cs index 1f757a9db..6e081ad2b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SceneViewId_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SceneViewId_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class SceneViewId_tImpl : SchemaClass, SceneViewId_t { public SceneViewId_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ViewIdOffset = new(() => Schema.GetOffset(0x66190338AE3CB1A1), LazyThreadSafetyMode.None); + public ref ulong ViewId { - get => ref _Handle.AsRef(Schema.GetOffset(0x66190338AE3CB1A1)); + get => ref _Handle.AsRef(_ViewIdOffset.Value); } + private static readonly Lazy _FrameCountOffset = new(() => Schema.GetOffset(0x661903381DBCD049), LazyThreadSafetyMode.None); + public ref ulong FrameCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x661903381DBCD049)); + get => ref _Handle.AsRef(_FrameCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ScriptInfo_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ScriptInfo_tImpl.cs index 76ea4bc1a..5fa7ebb78 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ScriptInfo_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ScriptInfo_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,24 +17,34 @@ internal partial class ScriptInfo_tImpl : SchemaClass, ScriptInfo_t { public ScriptInfo_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CodeOffset = new(() => Schema.GetOffset(0xDB402399B70C9D94), LazyThreadSafetyMode.None); + public string Code { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDB402399B70C9D94)); + var ptr = _Handle.Read(_CodeOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDB402399B70C9D94, value); + set => Schema.SetString(_Handle, _CodeOffset.Value, value); } + private static readonly Lazy _ParamsModifiedOffset = new(() => Schema.GetOffset(0xDB402399E9EAFC30), LazyThreadSafetyMode.None); + public ref CUtlVector ParamsModified { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDB402399E9EAFC30)); + get => ref _Handle.AsRef>(_ParamsModifiedOffset.Value); } + private static readonly Lazy _ProxyReadParamsOffset = new(() => Schema.GetOffset(0xDB40239944FCCB9D), LazyThreadSafetyMode.None); + public ref CUtlVector ProxyReadParams { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDB40239944FCCB9D)); + get => ref _Handle.AsRef>(_ProxyReadParamsOffset.Value); } + private static readonly Lazy _ProxyWriteParamsOffset = new(() => Schema.GetOffset(0xDB4023993EAFD134), LazyThreadSafetyMode.None); + public ref CUtlVector ProxyWriteParams { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDB4023993EAFD134)); + get => ref _Handle.AsRef>(_ProxyWriteParamsOffset.Value); } + private static readonly Lazy _ScriptTypeOffset = new(() => Schema.GetOffset(0xDB40239949576EFB), LazyThreadSafetyMode.None); + public ref AnimScriptType ScriptType { - get => ref _Handle.AsRef(Schema.GetOffset(0xDB40239949576EFB)); + get => ref _Handle.AsRef(_ScriptTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SelectedEditItemInfo_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SelectedEditItemInfo_tImpl.cs index 1043273d2..beb2e53f5 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SelectedEditItemInfo_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SelectedEditItemInfo_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class SelectedEditItemInfo_tImpl : SchemaClass, SelectedEditIte public SelectedEditItemInfo_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _EditItemsOffset = new(() => Schema.GetOffset(0xDF4D8E78F11EB01B), LazyThreadSafetyMode.None); + public ref CUtlVector EditItems { - get => ref _Handle.AsRef>(Schema.GetOffset(0xDF4D8E78F11EB01B)); + get => ref _Handle.AsRef>(_EditItemsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SellbackPurchaseEntry_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SellbackPurchaseEntry_tImpl.cs index a2180727a..009eddcca 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SellbackPurchaseEntry_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SellbackPurchaseEntry_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class SellbackPurchaseEntry_tImpl : SchemaClass, SellbackPurcha public SellbackPurchaseEntry_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _DefIdxOffset = new(() => Schema.GetOffset(0xAC9E0914F02DD274), LazyThreadSafetyMode.None); + public ref ushort DefIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0xAC9E0914F02DD274)); + get => ref _Handle.AsRef(_DefIdxOffset.Value); } + private static readonly Lazy _CostOffset = new(() => Schema.GetOffset(0xAC9E0914919660C4), LazyThreadSafetyMode.None); + public ref int Cost { - get => ref _Handle.AsRef(Schema.GetOffset(0xAC9E0914919660C4)); + get => ref _Handle.AsRef(_CostOffset.Value); } + private static readonly Lazy _PrevArmorOffset = new(() => Schema.GetOffset(0xAC9E09143A18A19B), LazyThreadSafetyMode.None); + public ref int PrevArmor { - get => ref _Handle.AsRef(Schema.GetOffset(0xAC9E09143A18A19B)); + get => ref _Handle.AsRef(_PrevArmorOffset.Value); } + private static readonly Lazy _PrevHelmetOffset = new(() => Schema.GetOffset(0xAC9E0914DA638D65), LazyThreadSafetyMode.None); + public ref bool PrevHelmet { - get => ref _Handle.AsRef(Schema.GetOffset(0xAC9E0914DA638D65)); + get => ref _Handle.AsRef(_PrevHelmetOffset.Value); } + private static readonly Lazy _ItemOffset = new(() => Schema.GetOffset(0xAC9E091452FF0710), LazyThreadSafetyMode.None); + public ref CHandle Item { - get => ref _Handle.AsRef>(Schema.GetOffset(0xAC9E091452FF0710)); + get => ref _Handle.AsRef>(_ItemOffset.Value); } public void DefIdxUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SequenceHistory_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SequenceHistory_tImpl.cs index 866d711b8..98faa2b38 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SequenceHistory_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SequenceHistory_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class SequenceHistory_tImpl : SchemaClass, SequenceHistory_t { public SequenceHistory_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SequenceOffset = new(() => Schema.GetOffset(0x8B1B0C2BE0A0598E), LazyThreadSafetyMode.None); + public HSequence Sequence { - get => new HSequenceImpl(_Handle + Schema.GetOffset(0x8B1B0C2BE0A0598E)); + get => new HSequenceImpl(_Handle + _SequenceOffset.Value); } + private static readonly Lazy _SeqStartTimeOffset = new(() => Schema.GetOffset(0x8B1B0C2B9120356F), LazyThreadSafetyMode.None); + public GameTime_t SeqStartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x8B1B0C2B9120356F)); + get => new GameTime_tImpl(_Handle + _SeqStartTimeOffset.Value); } + private static readonly Lazy _SeqFixedCycleOffset = new(() => Schema.GetOffset(0x8B1B0C2B77103EAE), LazyThreadSafetyMode.None); + public ref float SeqFixedCycle { - get => ref _Handle.AsRef(Schema.GetOffset(0x8B1B0C2B77103EAE)); + get => ref _Handle.AsRef(_SeqFixedCycleOffset.Value); } + private static readonly Lazy _SeqLoopModeOffset = new(() => Schema.GetOffset(0x8B1B0C2BB011340D), LazyThreadSafetyMode.None); + public ref AnimLoopMode_t SeqLoopMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x8B1B0C2BB011340D)); + get => ref _Handle.AsRef(_SeqLoopModeOffset.Value); } + private static readonly Lazy _PlaybackRateOffset = new(() => Schema.GetOffset(0x8B1B0C2BC396F9D8), LazyThreadSafetyMode.None); + public ref float PlaybackRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x8B1B0C2BC396F9D8)); + get => ref _Handle.AsRef(_PlaybackRateOffset.Value); } + private static readonly Lazy _CyclesPerSecondOffset = new(() => Schema.GetOffset(0x8B1B0C2B44417193), LazyThreadSafetyMode.None); + public ref float CyclesPerSecond { - get => ref _Handle.AsRef(Schema.GetOffset(0x8B1B0C2B44417193)); + get => ref _Handle.AsRef(_CyclesPerSecondOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SequenceWeightedList_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SequenceWeightedList_tImpl.cs index 20d7181d0..47aab65b4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SequenceWeightedList_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SequenceWeightedList_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class SequenceWeightedList_tImpl : SchemaClass, SequenceWeighte public SequenceWeightedList_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SequenceOffset = new(() => Schema.GetOffset(0x9BB15AFE3775D33C), LazyThreadSafetyMode.None); + public ref int Sequence { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BB15AFE3775D33C)); + get => ref _Handle.AsRef(_SequenceOffset.Value); } + private static readonly Lazy _RelativeWeightOffset = new(() => Schema.GetOffset(0x9BB15AFE1BC599BB), LazyThreadSafetyMode.None); + public ref float RelativeWeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x9BB15AFE1BC599BB)); + get => ref _Handle.AsRef(_RelativeWeightOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ServerAuthoritativeWeaponSlot_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ServerAuthoritativeWeaponSlot_tImpl.cs index 7bf44d4f1..fc773b614 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ServerAuthoritativeWeaponSlot_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ServerAuthoritativeWeaponSlot_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class ServerAuthoritativeWeaponSlot_tImpl : SchemaClass, Server public ServerAuthoritativeWeaponSlot_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ClassOffset = new(() => Schema.GetOffset(0x8AF3F5CAECD2A54A), LazyThreadSafetyMode.None); + public ref ushort Class { - get => ref _Handle.AsRef(Schema.GetOffset(0x8AF3F5CAECD2A54A)); + get => ref _Handle.AsRef(_ClassOffset.Value); } + private static readonly Lazy _SlotOffset = new(() => Schema.GetOffset(0x8AF3F5CAF5443C5E), LazyThreadSafetyMode.None); + public ref ushort Slot { - get => ref _Handle.AsRef(Schema.GetOffset(0x8AF3F5CAF5443C5E)); + get => ref _Handle.AsRef(_SlotOffset.Value); } + private static readonly Lazy _ItemDefIdxOffset = new(() => Schema.GetOffset(0x8AF3F5CA7BE26777), LazyThreadSafetyMode.None); + public ref ushort ItemDefIdx { - get => ref _Handle.AsRef(Schema.GetOffset(0x8AF3F5CA7BE26777)); + get => ref _Handle.AsRef(_ItemDefIdxOffset.Value); } public void ClassUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SheetSequenceIntegerId_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SheetSequenceIntegerId_tImpl.cs index 688a018aa..b993f339a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SheetSequenceIntegerId_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SheetSequenceIntegerId_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class SheetSequenceIntegerId_tImpl : SchemaClass, SheetSequence public SheetSequenceIntegerId_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ValueOffset = new(() => Schema.GetOffset(0x7578626BDCB0894A), LazyThreadSafetyMode.None); + public ref uint Value { - get => ref _Handle.AsRef(Schema.GetOffset(0x7578626BDCB0894A)); + get => ref _Handle.AsRef(_ValueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SignatureOutflow_ContinueImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SignatureOutflow_ContinueImpl.cs index 0432933af..79cee36d4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SignatureOutflow_ContinueImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SignatureOutflow_ContinueImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SignatureOutflow_ResumeImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SignatureOutflow_ResumeImpl.cs index 80a3ba5b0..be181fcc2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SignatureOutflow_ResumeImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SignatureOutflow_ResumeImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SimpleConstraintSoundProfileImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SimpleConstraintSoundProfileImpl.cs index e5cb90006..e00c633b4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SimpleConstraintSoundProfileImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SimpleConstraintSoundProfileImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class SimpleConstraintSoundProfileImpl : SchemaClass, SimpleCon public SimpleConstraintSoundProfileImpl(nint handle) : base(handle) { } + private static readonly Lazy _KeypointsOffset = new(() => Schema.GetOffset(0xB768AA94AE55150C), LazyThreadSafetyMode.None); + public ref SimpleConstraintSoundProfile__SimpleConstraintsSoundProfileKeypoints_t Keypoints { - get => ref _Handle.AsRef(Schema.GetOffset(0xB768AA94AE55150C)); + get => ref _Handle.AsRef(_KeypointsOffset.Value); } public ISchemaFixedArray KeyPoints { get => new SchemaFixedArray(_Handle, 0xB768AA9449DA0463, 2, 4, 4); diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_tImpl.cs index 3f4e6e0d0..8130d6655 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,43 +17,63 @@ internal partial class SkeletonAnimCapture_tImpl : SchemaClass, SkeletonAnimCapt public SkeletonAnimCapture_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _EntIndexOffset = new(() => Schema.GetOffset(0x79FB6D7C5558C54A), LazyThreadSafetyMode.None); + public ref uint EntIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x79FB6D7C5558C54A)); + get => ref _Handle.AsRef(_EntIndexOffset.Value); } + private static readonly Lazy _EntParentOffset = new(() => Schema.GetOffset(0x79FB6D7C7D9203A6), LazyThreadSafetyMode.None); + public ref uint EntParent { - get => ref _Handle.AsRef(Schema.GetOffset(0x79FB6D7C7D9203A6)); + get => ref _Handle.AsRef(_EntParentOffset.Value); } + private static readonly Lazy _ImportedCollisionOffset = new(() => Schema.GetOffset(0x79FB6D7C5A900B2F), LazyThreadSafetyMode.None); + public ref CUtlVector ImportedCollision { - get => ref _Handle.AsRef>(Schema.GetOffset(0x79FB6D7C5A900B2F)); + get => ref _Handle.AsRef>(_ImportedCollisionOffset.Value); } + private static readonly Lazy _ModelNameOffset = new(() => Schema.GetOffset(0x79FB6D7CD7A1D881), LazyThreadSafetyMode.None); + public string ModelName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x79FB6D7CD7A1D881)); + var ptr = _Handle.Read(_ModelNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x79FB6D7CD7A1D881, value); + set => Schema.SetString(_Handle, _ModelNameOffset.Value, value); } + private static readonly Lazy _CaptureNameOffset = new(() => Schema.GetOffset(0x79FB6D7CB508C2DA), LazyThreadSafetyMode.None); + public string CaptureName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x79FB6D7CB508C2DA)); + var ptr = _Handle.Read(_CaptureNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x79FB6D7CB508C2DA, value); + set => Schema.SetString(_Handle, _CaptureNameOffset.Value, value); } + private static readonly Lazy _ModelBindPoseOffset = new(() => Schema.GetOffset(0x79FB6D7C9960EBF8), LazyThreadSafetyMode.None); + public ref CUtlVector ModelBindPose { - get => ref _Handle.AsRef>(Schema.GetOffset(0x79FB6D7C9960EBF8)); + get => ref _Handle.AsRef>(_ModelBindPoseOffset.Value); } + private static readonly Lazy _FeModelInitPoseOffset = new(() => Schema.GetOffset(0x79FB6D7C0F3CC12E), LazyThreadSafetyMode.None); + public ref CUtlVector FeModelInitPose { - get => ref _Handle.AsRef>(Schema.GetOffset(0x79FB6D7C0F3CC12E)); + get => ref _Handle.AsRef>(_FeModelInitPoseOffset.Value); } + private static readonly Lazy _FlexControllersOffset = new(() => Schema.GetOffset(0x79FB6D7C024CF17F), LazyThreadSafetyMode.None); + public ref int FlexControllers { - get => ref _Handle.AsRef(Schema.GetOffset(0x79FB6D7C024CF17F)); + get => ref _Handle.AsRef(_FlexControllersOffset.Value); } + private static readonly Lazy _PredictedOffset = new(() => Schema.GetOffset(0x79FB6D7C419B6D9B), LazyThreadSafetyMode.None); + public ref bool Predicted { - get => ref _Handle.AsRef(Schema.GetOffset(0x79FB6D7C419B6D9B)); + get => ref _Handle.AsRef(_PredictedOffset.Value); } + private static readonly Lazy _FramesOffset = new(() => Schema.GetOffset(0x79FB6D7CEA11EACF), LazyThreadSafetyMode.None); + public ref CUtlVector Frames { - get => ref _Handle.AsRef>(Schema.GetOffset(0x79FB6D7CEA11EACF)); + get => ref _Handle.AsRef>(_FramesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_t__Bone_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_t__Bone_tImpl.cs index ea8d8ed12..69fb77595 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_t__Bone_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_t__Bone_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,18 +17,24 @@ internal partial class SkeletonAnimCapture_t__Bone_tImpl : SchemaClass, Skeleton public SkeletonAnimCapture_t__Bone_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x30D396FDCAE8A266), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x30D396FDCAE8A266)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x30D396FDCAE8A266, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _BindPoseOffset = new(() => Schema.GetOffset(0x30D396FDE664FE63), LazyThreadSafetyMode.None); + public ref CTransform BindPose { - get => ref _Handle.AsRef(Schema.GetOffset(0x30D396FDE664FE63)); + get => ref _Handle.AsRef(_BindPoseOffset.Value); } + private static readonly Lazy _ParentOffset = new(() => Schema.GetOffset(0x30D396FD0AABB9D1), LazyThreadSafetyMode.None); + public ref int Parent { - get => ref _Handle.AsRef(Schema.GetOffset(0x30D396FD0AABB9D1)); + get => ref _Handle.AsRef(_ParentOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_t__Camera_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_t__Camera_tImpl.cs index 82b831df4..ab2d4f3da 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_t__Camera_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_t__Camera_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class SkeletonAnimCapture_t__Camera_tImpl : SchemaClass, Skelet public SkeletonAnimCapture_t__Camera_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TmCameraOffset = new(() => Schema.GetOffset(0xEBD053249D7ED559), LazyThreadSafetyMode.None); + public ref CTransform TmCamera { - get => ref _Handle.AsRef(Schema.GetOffset(0xEBD053249D7ED559)); + get => ref _Handle.AsRef(_TmCameraOffset.Value); } + private static readonly Lazy _TimeOffset = new(() => Schema.GetOffset(0xEBD05324C957229E), LazyThreadSafetyMode.None); + public ref float Time { - get => ref _Handle.AsRef(Schema.GetOffset(0xEBD05324C957229E)); + get => ref _Handle.AsRef(_TimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_t__FrameStamp_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_t__FrameStamp_tImpl.cs index 9bece5406..836b16729 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_t__FrameStamp_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_t__FrameStamp_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class SkeletonAnimCapture_t__FrameStamp_tImpl : SchemaClass, Sk public SkeletonAnimCapture_t__FrameStamp_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TimeOffset = new(() => Schema.GetOffset(0x4ECAEB4FC957229E), LazyThreadSafetyMode.None); + public ref float Time { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ECAEB4FC957229E)); + get => ref _Handle.AsRef(_TimeOffset.Value); } + private static readonly Lazy _EntitySimTimeOffset = new(() => Schema.GetOffset(0x4ECAEB4FAE2BAB2E), LazyThreadSafetyMode.None); + public ref float EntitySimTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ECAEB4FAE2BAB2E)); + get => ref _Handle.AsRef(_EntitySimTimeOffset.Value); } + private static readonly Lazy _TeleportTickOffset = new(() => Schema.GetOffset(0x4ECAEB4F7068242B), LazyThreadSafetyMode.None); + public ref bool TeleportTick { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ECAEB4F7068242B)); + get => ref _Handle.AsRef(_TeleportTickOffset.Value); } + private static readonly Lazy _PredictedOffset = new(() => Schema.GetOffset(0x4ECAEB4F419B6D9B), LazyThreadSafetyMode.None); + public ref bool Predicted { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ECAEB4F419B6D9B)); + get => ref _Handle.AsRef(_PredictedOffset.Value); } + private static readonly Lazy _CurTimeOffset = new(() => Schema.GetOffset(0x4ECAEB4F08036F9A), LazyThreadSafetyMode.None); + public ref float CurTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ECAEB4F08036F9A)); + get => ref _Handle.AsRef(_CurTimeOffset.Value); } + private static readonly Lazy _RealTimeOffset = new(() => Schema.GetOffset(0x4ECAEB4F1168EC02), LazyThreadSafetyMode.None); + public ref float RealTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ECAEB4F1168EC02)); + get => ref _Handle.AsRef(_RealTimeOffset.Value); } + private static readonly Lazy _FrameCountOffset = new(() => Schema.GetOffset(0x4ECAEB4F1DBCD049), LazyThreadSafetyMode.None); + public ref int FrameCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ECAEB4F1DBCD049)); + get => ref _Handle.AsRef(_FrameCountOffset.Value); } + private static readonly Lazy _TickCountOffset = new(() => Schema.GetOffset(0x4ECAEB4FE25E6B27), LazyThreadSafetyMode.None); + public ref int TickCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x4ECAEB4FE25E6B27)); + get => ref _Handle.AsRef(_TickCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_t__Frame_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_t__Frame_tImpl.cs index 02d8644da..addc134dc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_t__Frame_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonAnimCapture_t__Frame_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class SkeletonAnimCapture_t__Frame_tImpl : SchemaClass, Skeleto public SkeletonAnimCapture_t__Frame_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TimeOffset = new(() => Schema.GetOffset(0x413CC2EEC957229E), LazyThreadSafetyMode.None); + public ref float Time { - get => ref _Handle.AsRef(Schema.GetOffset(0x413CC2EEC957229E)); + get => ref _Handle.AsRef(_TimeOffset.Value); } + private static readonly Lazy _StampOffset = new(() => Schema.GetOffset(0x413CC2EE11943004), LazyThreadSafetyMode.None); + public SkeletonAnimCapture_t__FrameStamp_t Stamp { - get => new SkeletonAnimCapture_t__FrameStamp_tImpl(_Handle + Schema.GetOffset(0x413CC2EE11943004)); + get => new SkeletonAnimCapture_t__FrameStamp_tImpl(_Handle + _StampOffset.Value); } + private static readonly Lazy _TransformOffset = new(() => Schema.GetOffset(0x413CC2EE6EC5209B), LazyThreadSafetyMode.None); + public ref CTransform Transform { - get => ref _Handle.AsRef(Schema.GetOffset(0x413CC2EE6EC5209B)); + get => ref _Handle.AsRef(_TransformOffset.Value); } + private static readonly Lazy _TeleportOffset = new(() => Schema.GetOffset(0x413CC2EEE663C11E), LazyThreadSafetyMode.None); + public ref bool Teleport { - get => ref _Handle.AsRef(Schema.GetOffset(0x413CC2EEE663C11E)); + get => ref _Handle.AsRef(_TeleportOffset.Value); } + private static readonly Lazy _CompositeBonesOffset = new(() => Schema.GetOffset(0x413CC2EE5F49062B), LazyThreadSafetyMode.None); + public ref CUtlVector CompositeBones { - get => ref _Handle.AsRef>(Schema.GetOffset(0x413CC2EE5F49062B)); + get => ref _Handle.AsRef>(_CompositeBonesOffset.Value); } + private static readonly Lazy _SimStateBonesOffset = new(() => Schema.GetOffset(0x413CC2EE5DAE9398), LazyThreadSafetyMode.None); + public ref CUtlVector SimStateBones { - get => ref _Handle.AsRef>(Schema.GetOffset(0x413CC2EE5DAE9398)); + get => ref _Handle.AsRef>(_SimStateBonesOffset.Value); } + private static readonly Lazy _FeModelAnimsOffset = new(() => Schema.GetOffset(0x413CC2EE62EC797D), LazyThreadSafetyMode.None); + public ref CUtlVector FeModelAnims { - get => ref _Handle.AsRef>(Schema.GetOffset(0x413CC2EE62EC797D)); + get => ref _Handle.AsRef>(_FeModelAnimsOffset.Value); } + private static readonly Lazy _FeModelPosOffset = new(() => Schema.GetOffset(0x413CC2EECA74E7F5), LazyThreadSafetyMode.None); + public ref CUtlVector FeModelPos { - get => ref _Handle.AsRef>(Schema.GetOffset(0x413CC2EECA74E7F5)); + get => ref _Handle.AsRef>(_FeModelPosOffset.Value); } + private static readonly Lazy _FlexControllerWeightsOffset = new(() => Schema.GetOffset(0x413CC2EECA3D8033), LazyThreadSafetyMode.None); + public ref CUtlVector FlexControllerWeights { - get => ref _Handle.AsRef>(Schema.GetOffset(0x413CC2EECA3D8033)); + get => ref _Handle.AsRef>(_FlexControllerWeightsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonBoneBounds_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonBoneBounds_tImpl.cs index 9912b52c1..c2552ce38 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonBoneBounds_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonBoneBounds_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class SkeletonBoneBounds_tImpl : SchemaClass, SkeletonBoneBound public SkeletonBoneBounds_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CenterOffset = new(() => Schema.GetOffset(0xFF0CF520FA3A6E4), LazyThreadSafetyMode.None); + public ref Vector Center { - get => ref _Handle.AsRef(Schema.GetOffset(0xFF0CF520FA3A6E4)); + get => ref _Handle.AsRef(_CenterOffset.Value); } + private static readonly Lazy _SizeOffset = new(() => Schema.GetOffset(0xFF0CF52DABBAEBC), LazyThreadSafetyMode.None); + public ref Vector Size { - get => ref _Handle.AsRef(Schema.GetOffset(0xFF0CF52DABBAEBC)); + get => ref _Handle.AsRef(_SizeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonDemoDb_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonDemoDb_tImpl.cs index 1faceba65..f572ca635 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonDemoDb_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SkeletonDemoDb_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class SkeletonDemoDb_tImpl : SchemaClass, SkeletonDemoDb_t { public SkeletonDemoDb_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _AnimCapturesOffset = new(() => Schema.GetOffset(0xF4F5DA643E069D13), LazyThreadSafetyMode.None); + public ref CUtlVector> AnimCaptures { - get => ref _Handle.AsRef>>(Schema.GetOffset(0xF4F5DA643E069D13)); + get => ref _Handle.AsRef>>(_AnimCapturesOffset.Value); } + private static readonly Lazy _CameraTrackOffset = new(() => Schema.GetOffset(0xF4F5DA64EFF0F8DD), LazyThreadSafetyMode.None); + public ref CUtlVector CameraTrack { - get => ref _Handle.AsRef>(Schema.GetOffset(0xF4F5DA64EFF0F8DD)); + get => ref _Handle.AsRef>(_CameraTrackOffset.Value); } + private static readonly Lazy _RecordingTimeOffset = new(() => Schema.GetOffset(0xF4F5DA64D29049CB), LazyThreadSafetyMode.None); + public ref float RecordingTime { - get => ref _Handle.AsRef(Schema.GetOffset(0xF4F5DA64D29049CB)); + get => ref _Handle.AsRef(_RecordingTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SolveIKChainPoseOpFixedSettings_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SolveIKChainPoseOpFixedSettings_tImpl.cs index d18cf2373..d30271cb6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SolveIKChainPoseOpFixedSettings_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SolveIKChainPoseOpFixedSettings_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class SolveIKChainPoseOpFixedSettings_tImpl : SchemaClass, Solv public SolveIKChainPoseOpFixedSettings_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ChainsToSolveDataOffset = new(() => Schema.GetOffset(0x983BF8BD94B979E5), LazyThreadSafetyMode.None); + public ref CUtlVector ChainsToSolveData { - get => ref _Handle.AsRef>(Schema.GetOffset(0x983BF8BD94B979E5)); + get => ref _Handle.AsRef>(_ChainsToSolveDataOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SosEditItemInfo_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SosEditItemInfo_tImpl.cs index 342cd4d5a..048aff202 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SosEditItemInfo_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SosEditItemInfo_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,42 @@ internal partial class SosEditItemInfo_tImpl : SchemaClass, SosEditItemInfo_t { public SosEditItemInfo_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ItemTypeOffset = new(() => Schema.GetOffset(0x8E29E1C0C91C9136), LazyThreadSafetyMode.None); + public ref SosEditItemType_t ItemType { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E29E1C0C91C9136)); + get => ref _Handle.AsRef(_ItemTypeOffset.Value); } + private static readonly Lazy _ItemNameOffset = new(() => Schema.GetOffset(0x8E29E1C0575A2B25), LazyThreadSafetyMode.None); + public string ItemName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x8E29E1C0575A2B25)); + var ptr = _Handle.Read(_ItemNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x8E29E1C0575A2B25, value); + set => Schema.SetString(_Handle, _ItemNameOffset.Value, value); } + private static readonly Lazy _ItemTypeNameOffset = new(() => Schema.GetOffset(0x8E29E1C0B2F8CB75), LazyThreadSafetyMode.None); + public string ItemTypeName { get { - var ptr = _Handle.Read(Schema.GetOffset(0x8E29E1C0B2F8CB75)); + var ptr = _Handle.Read(_ItemTypeNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x8E29E1C0B2F8CB75, value); + set => Schema.SetString(_Handle, _ItemTypeNameOffset.Value, value); } + private static readonly Lazy _ItemKVStringOffset = new(() => Schema.GetOffset(0x8E29E1C0A0151DD6), LazyThreadSafetyMode.None); + public string ItemKVString { get { - var ptr = _Handle.Read(Schema.GetOffset(0x8E29E1C0A0151DD6)); + var ptr = _Handle.Read(_ItemKVStringOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x8E29E1C0A0151DD6, value); + set => Schema.SetString(_Handle, _ItemKVStringOffset.Value, value); } + private static readonly Lazy _ItemPosOffset = new(() => Schema.GetOffset(0x8E29E1C0AB2D0B6C), LazyThreadSafetyMode.None); + public ref Vector2D ItemPos { - get => ref _Handle.AsRef(Schema.GetOffset(0x8E29E1C0AB2D0B6C)); + get => ref _Handle.AsRef(_ItemPosOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SoundOpvarTraceResult_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SoundOpvarTraceResult_tImpl.cs index 2393a2444..b60019afe 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SoundOpvarTraceResult_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SoundOpvarTraceResult_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class SoundOpvarTraceResult_tImpl : SchemaClass, SoundOpvarTrac public SoundOpvarTraceResult_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _PosOffset = new(() => Schema.GetOffset(0xF93EB0CBE5D6FAFD), LazyThreadSafetyMode.None); + public ref Vector Pos { - get => ref _Handle.AsRef(Schema.GetOffset(0xF93EB0CBE5D6FAFD)); + get => ref _Handle.AsRef(_PosOffset.Value); } + private static readonly Lazy _DidHitOffset = new(() => Schema.GetOffset(0xF93EB0CBA8217B9F), LazyThreadSafetyMode.None); + public ref bool DidHit { - get => ref _Handle.AsRef(Schema.GetOffset(0xF93EB0CBA8217B9F)); + get => ref _Handle.AsRef(_DidHitOffset.Value); } + private static readonly Lazy _DistSqrToCenterOffset = new(() => Schema.GetOffset(0xF93EB0CB96618227), LazyThreadSafetyMode.None); + public ref float DistSqrToCenter { - get => ref _Handle.AsRef(Schema.GetOffset(0xF93EB0CB96618227)); + get => ref _Handle.AsRef(_DistSqrToCenterOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SoundeventPathCornerPairNetworked_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SoundeventPathCornerPairNetworked_tImpl.cs index 7f8732907..bcf0d7866 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SoundeventPathCornerPairNetworked_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SoundeventPathCornerPairNetworked_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class SoundeventPathCornerPairNetworked_tImpl : SchemaClass, So public SoundeventPathCornerPairNetworked_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _P1Offset = new(() => Schema.GetOffset(0x138FC2E2CD01805E), LazyThreadSafetyMode.None); + public ref Vector P1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x138FC2E2CD01805E)); + get => ref _Handle.AsRef(_P1Offset.Value); } + private static readonly Lazy _P2Offset = new(() => Schema.GetOffset(0x138FC2E2CC017ECB), LazyThreadSafetyMode.None); + public ref Vector P2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x138FC2E2CC017ECB)); + get => ref _Handle.AsRef(_P2Offset.Value); } + private static readonly Lazy _PathLengthSqrOffset = new(() => Schema.GetOffset(0x138FC2E284D826AA), LazyThreadSafetyMode.None); + public ref float PathLengthSqr { - get => ref _Handle.AsRef(Schema.GetOffset(0x138FC2E284D826AA)); + get => ref _Handle.AsRef(_PathLengthSqrOffset.Value); } + private static readonly Lazy _P1PctOffset = new(() => Schema.GetOffset(0x138FC2E258AEE12B), LazyThreadSafetyMode.None); + public ref float P1Pct { - get => ref _Handle.AsRef(Schema.GetOffset(0x138FC2E258AEE12B)); + get => ref _Handle.AsRef(_P1PctOffset.Value); } + private static readonly Lazy _P2PctOffset = new(() => Schema.GetOffset(0x138FC2E294B6CBA8), LazyThreadSafetyMode.None); + public ref float P2Pct { - get => ref _Handle.AsRef(Schema.GetOffset(0x138FC2E294B6CBA8)); + get => ref _Handle.AsRef(_P2PctOffset.Value); } public void P1Updated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SpawnPointImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SpawnPointImpl.cs index ea783e3db..02e196c48 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SpawnPointImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SpawnPointImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class SpawnPointImpl : CServerOnlyPointEntityImpl, SpawnPoint { public SpawnPointImpl(nint handle) : base(handle) { } + private static readonly Lazy _PriorityOffset = new(() => Schema.GetOffset(0x72527C0E6224A30C), LazyThreadSafetyMode.None); + public ref int Priority { - get => ref _Handle.AsRef(Schema.GetOffset(0x72527C0E6224A30C)); + get => ref _Handle.AsRef(_PriorityOffset.Value); } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0x72527C0E6154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x72527C0E6154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x72527C0E18853D59), LazyThreadSafetyMode.None); + public ref int Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x72527C0E18853D59)); + get => ref _Handle.AsRef(_TypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/StanceInfo_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/StanceInfo_tImpl.cs index 199754fed..256cacc7a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/StanceInfo_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/StanceInfo_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class StanceInfo_tImpl : SchemaClass, StanceInfo_t { public StanceInfo_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _PositionOffset = new(() => Schema.GetOffset(0x5DBAB98EBD6A6C9E), LazyThreadSafetyMode.None); + public ref Vector Position { - get => ref _Handle.AsRef(Schema.GetOffset(0x5DBAB98EBD6A6C9E)); + get => ref _Handle.AsRef(_PositionOffset.Value); } + private static readonly Lazy _DirectionOffset = new(() => Schema.GetOffset(0x5DBAB98E28D81988), LazyThreadSafetyMode.None); + public ref float Direction { - get => ref _Handle.AsRef(Schema.GetOffset(0x5DBAB98E28D81988)); + get => ref _Handle.AsRef(_DirectionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SummaryTakeDamageInfo_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SummaryTakeDamageInfo_tImpl.cs index e3b59c97c..3123a1e50 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/SummaryTakeDamageInfo_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/SummaryTakeDamageInfo_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class SummaryTakeDamageInfo_tImpl : SchemaClass, SummaryTakeDam public SummaryTakeDamageInfo_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SummarisedCountOffset = new(() => Schema.GetOffset(0x8A8061E2B62D7D04), LazyThreadSafetyMode.None); + public ref int SummarisedCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A8061E2B62D7D04)); + get => ref _Handle.AsRef(_SummarisedCountOffset.Value); } + private static readonly Lazy _InfoOffset = new(() => Schema.GetOffset(0x8A8061E20FB40705), LazyThreadSafetyMode.None); + public ref CTakeDamageInfo Info { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A8061E20FB40705)); + get => ref _Handle.AsRef(_InfoOffset.Value); } + private static readonly Lazy _ResultOffset = new(() => Schema.GetOffset(0x8A8061E20A377624), LazyThreadSafetyMode.None); + public ref CTakeDamageResult Result { - get => ref _Handle.AsRef(Schema.GetOffset(0x8A8061E20A377624)); + get => ref _Handle.AsRef(_ResultOffset.Value); } + private static readonly Lazy _TargetOffset = new(() => Schema.GetOffset(0x8A8061E295A3933A), LazyThreadSafetyMode.None); + public ref CHandle Target { - get => ref _Handle.AsRef>(Schema.GetOffset(0x8A8061E295A3933A)); + get => ref _Handle.AsRef>(_TargetOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/TagSpan_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/TagSpan_tImpl.cs index 2e61fc79b..bed82d6f0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/TagSpan_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/TagSpan_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class TagSpan_tImpl : SchemaClass, TagSpan_t { public TagSpan_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TagIndexOffset = new(() => Schema.GetOffset(0xA2611404D66997C9), LazyThreadSafetyMode.None); + public ref int TagIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xA2611404D66997C9)); + get => ref _Handle.AsRef(_TagIndexOffset.Value); } + private static readonly Lazy _StartCycleOffset = new(() => Schema.GetOffset(0xA26114043A764D4F), LazyThreadSafetyMode.None); + public ref float StartCycle { - get => ref _Handle.AsRef(Schema.GetOffset(0xA26114043A764D4F)); + get => ref _Handle.AsRef(_StartCycleOffset.Value); } + private static readonly Lazy _EndCycleOffset = new(() => Schema.GetOffset(0xA26114040B523694), LazyThreadSafetyMode.None); + public ref float EndCycle { - get => ref _Handle.AsRef(Schema.GetOffset(0xA26114040B523694)); + get => ref _Handle.AsRef(_EndCycleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/TextureControls_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/TextureControls_tImpl.cs index f703485f5..7eede368e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/TextureControls_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/TextureControls_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,53 +17,85 @@ internal partial class TextureControls_tImpl : SchemaClass, TextureControls_t { public TextureControls_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FinalTextureScaleUOffset = new(() => Schema.GetOffset(0x6019C255986FEDD1), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput FinalTextureScaleU { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x6019C255986FEDD1)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _FinalTextureScaleUOffset.Value); } + private static readonly Lazy _FinalTextureScaleVOffset = new(() => Schema.GetOffset(0x6019C255956FE918), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput FinalTextureScaleV { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x6019C255956FE918)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _FinalTextureScaleVOffset.Value); } + private static readonly Lazy _FinalTextureOffsetUOffset = new(() => Schema.GetOffset(0x6019C25524B7447E), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput FinalTextureOffsetU { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x6019C25524B7447E)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _FinalTextureOffsetUOffset.Value); } + private static readonly Lazy _FinalTextureOffsetVOffset = new(() => Schema.GetOffset(0x6019C25523B742EB), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput FinalTextureOffsetV { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x6019C25523B742EB)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _FinalTextureOffsetVOffset.Value); } + private static readonly Lazy _FinalTextureUVRotationOffset = new(() => Schema.GetOffset(0x6019C2550D61C771), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput FinalTextureUVRotation { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x6019C2550D61C771)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _FinalTextureUVRotationOffset.Value); } + private static readonly Lazy _ZoomScaleOffset = new(() => Schema.GetOffset(0x6019C25565643B72), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput ZoomScale { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x6019C25565643B72)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _ZoomScaleOffset.Value); } + private static readonly Lazy _DistortionOffset = new(() => Schema.GetOffset(0x6019C25570283608), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput Distortion { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x6019C25570283608)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _DistortionOffset.Value); } + private static readonly Lazy _RandomizeOffsetsOffset = new(() => Schema.GetOffset(0x6019C25541B7E31C), LazyThreadSafetyMode.None); + public ref bool RandomizeOffsets { - get => ref _Handle.AsRef(Schema.GetOffset(0x6019C25541B7E31C)); + get => ref _Handle.AsRef(_RandomizeOffsetsOffset.Value); } + private static readonly Lazy _ClampUVsOffset = new(() => Schema.GetOffset(0x6019C255993F389C), LazyThreadSafetyMode.None); + public ref bool ClampUVs { - get => ref _Handle.AsRef(Schema.GetOffset(0x6019C255993F389C)); + get => ref _Handle.AsRef(_ClampUVsOffset.Value); } + private static readonly Lazy _PerParticleBlendOffset = new(() => Schema.GetOffset(0x6019C25569A29D11), LazyThreadSafetyMode.None); + public ref SpriteCardPerParticleScale_t PerParticleBlend { - get => ref _Handle.AsRef(Schema.GetOffset(0x6019C25569A29D11)); + get => ref _Handle.AsRef(_PerParticleBlendOffset.Value); } + private static readonly Lazy _PerParticleScaleOffset = new(() => Schema.GetOffset(0x6019C255E1BE0540), LazyThreadSafetyMode.None); + public ref SpriteCardPerParticleScale_t PerParticleScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x6019C255E1BE0540)); + get => ref _Handle.AsRef(_PerParticleScaleOffset.Value); } + private static readonly Lazy _PerParticleOffsetUOffset = new(() => Schema.GetOffset(0x6019C2559749CC58), LazyThreadSafetyMode.None); + public ref SpriteCardPerParticleScale_t PerParticleOffsetU { - get => ref _Handle.AsRef(Schema.GetOffset(0x6019C2559749CC58)); + get => ref _Handle.AsRef(_PerParticleOffsetUOffset.Value); } + private static readonly Lazy _PerParticleOffsetVOffset = new(() => Schema.GetOffset(0x6019C2559A49D111), LazyThreadSafetyMode.None); + public ref SpriteCardPerParticleScale_t PerParticleOffsetV { - get => ref _Handle.AsRef(Schema.GetOffset(0x6019C2559A49D111)); + get => ref _Handle.AsRef(_PerParticleOffsetVOffset.Value); } + private static readonly Lazy _PerParticleRotationOffset = new(() => Schema.GetOffset(0x6019C2557AD51358), LazyThreadSafetyMode.None); + public ref SpriteCardPerParticleScale_t PerParticleRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0x6019C2557AD51358)); + get => ref _Handle.AsRef(_PerParticleRotationOffset.Value); } + private static readonly Lazy _PerParticleZoomOffset = new(() => Schema.GetOffset(0x6019C255F0492151), LazyThreadSafetyMode.None); + public ref SpriteCardPerParticleScale_t PerParticleZoom { - get => ref _Handle.AsRef(Schema.GetOffset(0x6019C255F0492151)); + get => ref _Handle.AsRef(_PerParticleZoomOffset.Value); } + private static readonly Lazy _PerParticleDistortionOffset = new(() => Schema.GetOffset(0x6019C2553A9977DD), LazyThreadSafetyMode.None); + public ref SpriteCardPerParticleScale_t PerParticleDistortion { - get => ref _Handle.AsRef(Schema.GetOffset(0x6019C2553A9977DD)); + get => ref _Handle.AsRef(_PerParticleDistortionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/TextureGroup_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/TextureGroup_tImpl.cs index 1130635bf..aaf71f659 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/TextureGroup_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/TextureGroup_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class TextureGroup_tImpl : SchemaClass, TextureGroup_t { public TextureGroup_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0x3186D8346154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x3186D8346154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } + private static readonly Lazy _ReplaceTextureWithGradientOffset = new(() => Schema.GetOffset(0x3186D8344E3CBC5A), LazyThreadSafetyMode.None); + public ref bool ReplaceTextureWithGradient { - get => ref _Handle.AsRef(Schema.GetOffset(0x3186D8344E3CBC5A)); + get => ref _Handle.AsRef(_ReplaceTextureWithGradientOffset.Value); } + private static readonly Lazy _TextureOffset = new(() => Schema.GetOffset(0x3186D8348C0A2FB6), LazyThreadSafetyMode.None); + public ref CStrongHandle Texture { - get => ref _Handle.AsRef>(Schema.GetOffset(0x3186D8348C0A2FB6)); + get => ref _Handle.AsRef>(_TextureOffset.Value); } + private static readonly Lazy _GradientOffset = new(() => Schema.GetOffset(0x3186D83405C95F25), LazyThreadSafetyMode.None); + public SchemaUntypedField Gradient { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x3186D83405C95F25)); + get => new SchemaUntypedField(_Handle + _GradientOffset.Value); } + private static readonly Lazy _TextureTypeOffset = new(() => Schema.GetOffset(0x3186D834499BE6C8), LazyThreadSafetyMode.None); + public ref SpriteCardTextureType_t TextureType { - get => ref _Handle.AsRef(Schema.GetOffset(0x3186D834499BE6C8)); + get => ref _Handle.AsRef(_TextureTypeOffset.Value); } + private static readonly Lazy _TextureChannelsOffset = new(() => Schema.GetOffset(0x3186D834AB4AA2E8), LazyThreadSafetyMode.None); + public ref SpriteCardTextureChannel_t TextureChannels { - get => ref _Handle.AsRef(Schema.GetOffset(0x3186D834AB4AA2E8)); + get => ref _Handle.AsRef(_TextureChannelsOffset.Value); } + private static readonly Lazy _TextureBlendModeOffset = new(() => Schema.GetOffset(0x3186D83467D79D64), LazyThreadSafetyMode.None); + public ref ParticleTextureLayerBlendType_t TextureBlendMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x3186D83467D79D64)); + get => ref _Handle.AsRef(_TextureBlendModeOffset.Value); } + private static readonly Lazy _TextureBlendOffset = new(() => Schema.GetOffset(0x3186D8343577569D), LazyThreadSafetyMode.None); + public CParticleCollectionRendererFloatInput TextureBlend { - get => new CParticleCollectionRendererFloatInputImpl(_Handle + Schema.GetOffset(0x3186D8343577569D)); + get => new CParticleCollectionRendererFloatInputImpl(_Handle + _TextureBlendOffset.Value); } + private static readonly Lazy _TextureControlsOffset = new(() => Schema.GetOffset(0x3186D834AD3B9D2E), LazyThreadSafetyMode.None); + public TextureControls_t TextureControls { - get => new TextureControls_tImpl(_Handle + Schema.GetOffset(0x3186D834AD3B9D2E)); + get => new TextureControls_tImpl(_Handle + _TextureControlsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/TraceSettings_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/TraceSettings_tImpl.cs index ea9e06bb7..a93b6664e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/TraceSettings_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/TraceSettings_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class TraceSettings_tImpl : SchemaClass, TraceSettings_t { public TraceSettings_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TraceHeightOffset = new(() => Schema.GetOffset(0x6983A048EFB858CF), LazyThreadSafetyMode.None); + public ref float TraceHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x6983A048EFB858CF)); + get => ref _Handle.AsRef(_TraceHeightOffset.Value); } + private static readonly Lazy _TraceRadiusOffset = new(() => Schema.GetOffset(0x6983A0489A33E452), LazyThreadSafetyMode.None); + public ref float TraceRadius { - get => ref _Handle.AsRef(Schema.GetOffset(0x6983A0489A33E452)); + get => ref _Handle.AsRef(_TraceRadiusOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/TwoBoneIKSettings_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/TwoBoneIKSettings_tImpl.cs index 5a565d0ac..74cdfb3c2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/TwoBoneIKSettings_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/TwoBoneIKSettings_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,50 +17,80 @@ internal partial class TwoBoneIKSettings_tImpl : SchemaClass, TwoBoneIKSettings_ public TwoBoneIKSettings_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _EndEffectorTypeOffset = new(() => Schema.GetOffset(0xBE091551687CB4CE), LazyThreadSafetyMode.None); + public ref IkEndEffectorType EndEffectorType { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE091551687CB4CE)); + get => ref _Handle.AsRef(_EndEffectorTypeOffset.Value); } + private static readonly Lazy _EndEffectorAttachmentOffset = new(() => Schema.GetOffset(0xBE0915516872873B), LazyThreadSafetyMode.None); + public CAnimAttachment EndEffectorAttachment { - get => new CAnimAttachmentImpl(_Handle + Schema.GetOffset(0xBE0915516872873B)); + get => new CAnimAttachmentImpl(_Handle + _EndEffectorAttachmentOffset.Value); } + private static readonly Lazy _TargetTypeOffset = new(() => Schema.GetOffset(0xBE09155113C167A0), LazyThreadSafetyMode.None); + public ref IkTargetType TargetType { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE09155113C167A0)); + get => ref _Handle.AsRef(_TargetTypeOffset.Value); } + private static readonly Lazy _TargetAttachmentOffset = new(() => Schema.GetOffset(0xBE091551C90DDA55), LazyThreadSafetyMode.None); + public CAnimAttachment TargetAttachment { - get => new CAnimAttachmentImpl(_Handle + Schema.GetOffset(0xBE091551C90DDA55)); + get => new CAnimAttachmentImpl(_Handle + _TargetAttachmentOffset.Value); } + private static readonly Lazy _TargetBoneIndexOffset = new(() => Schema.GetOffset(0xBE091551D1D2A3DA), LazyThreadSafetyMode.None); + public ref int TargetBoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE091551D1D2A3DA)); + get => ref _Handle.AsRef(_TargetBoneIndexOffset.Value); } + private static readonly Lazy _PositionParamOffset = new(() => Schema.GetOffset(0xBE091551FF710245), LazyThreadSafetyMode.None); + public CAnimParamHandle PositionParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xBE091551FF710245)); + get => new CAnimParamHandleImpl(_Handle + _PositionParamOffset.Value); } + private static readonly Lazy _RotationParamOffset = new(() => Schema.GetOffset(0xBE09155193200F16), LazyThreadSafetyMode.None); + public CAnimParamHandle RotationParam { - get => new CAnimParamHandleImpl(_Handle + Schema.GetOffset(0xBE09155193200F16)); + get => new CAnimParamHandleImpl(_Handle + _RotationParamOffset.Value); } + private static readonly Lazy _AlwaysUseFallbackHingeOffset = new(() => Schema.GetOffset(0xBE09155158B8E174), LazyThreadSafetyMode.None); + public ref bool AlwaysUseFallbackHinge { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE09155158B8E174)); + get => ref _Handle.AsRef(_AlwaysUseFallbackHingeOffset.Value); } + private static readonly Lazy _LsFallbackHingeAxisOffset = new(() => Schema.GetOffset(0xBE0915517DF22B04), LazyThreadSafetyMode.None); + public ref Vector LsFallbackHingeAxis { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE0915517DF22B04)); + get => ref _Handle.AsRef(_LsFallbackHingeAxisOffset.Value); } + private static readonly Lazy _FixedBoneIndexOffset = new(() => Schema.GetOffset(0xBE091551D1DD1DC5), LazyThreadSafetyMode.None); + public ref int FixedBoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE091551D1DD1DC5)); + get => ref _Handle.AsRef(_FixedBoneIndexOffset.Value); } + private static readonly Lazy _MiddleBoneIndexOffset = new(() => Schema.GetOffset(0xBE091551489C3976), LazyThreadSafetyMode.None); + public ref int MiddleBoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE091551489C3976)); + get => ref _Handle.AsRef(_MiddleBoneIndexOffset.Value); } + private static readonly Lazy _EndBoneIndexOffset = new(() => Schema.GetOffset(0xBE09155146E23D1C), LazyThreadSafetyMode.None); + public ref int EndBoneIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE09155146E23D1C)); + get => ref _Handle.AsRef(_EndBoneIndexOffset.Value); } + private static readonly Lazy _MatchTargetOrientationOffset = new(() => Schema.GetOffset(0xBE09155142E0C3DB), LazyThreadSafetyMode.None); + public ref bool MatchTargetOrientation { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE09155142E0C3DB)); + get => ref _Handle.AsRef(_MatchTargetOrientationOffset.Value); } + private static readonly Lazy _ConstrainTwistOffset = new(() => Schema.GetOffset(0xBE091551DB3DB7ED), LazyThreadSafetyMode.None); + public ref bool ConstrainTwist { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE091551DB3DB7ED)); + get => ref _Handle.AsRef(_ConstrainTwistOffset.Value); } + private static readonly Lazy _MaxTwistOffset = new(() => Schema.GetOffset(0xBE091551A898EE6E), LazyThreadSafetyMode.None); + public ref float MaxTwist { - get => ref _Handle.AsRef(Schema.GetOffset(0xBE091551A898EE6E)); + get => ref _Handle.AsRef(_MaxTwistOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMapResourceData_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMapResourceData_tImpl.cs index 507d3976b..6ab0aad9f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMapResourceData_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMapResourceData_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixAutoFilterDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixAutoFilterDesc_tImpl.cs index b1f0515dd..c02d48928 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixAutoFilterDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixAutoFilterDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class VMixAutoFilterDesc_tImpl : SchemaClass, VMixAutoFilterDes public VMixAutoFilterDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _EnvelopeAmountOffset = new(() => Schema.GetOffset(0xCE0A02A0EB3F257), LazyThreadSafetyMode.None); + public ref float EnvelopeAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE0A02A0EB3F257)); + get => ref _Handle.AsRef(_EnvelopeAmountOffset.Value); } + private static readonly Lazy _AttackTimeMSOffset = new(() => Schema.GetOffset(0xCE0A02AD4A28216), LazyThreadSafetyMode.None); + public ref float AttackTimeMS { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE0A02AD4A28216)); + get => ref _Handle.AsRef(_AttackTimeMSOffset.Value); } + private static readonly Lazy _ReleaseTimeMSOffset = new(() => Schema.GetOffset(0xCE0A02AEBB62791), LazyThreadSafetyMode.None); + public ref float ReleaseTimeMS { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE0A02AEBB62791)); + get => ref _Handle.AsRef(_ReleaseTimeMSOffset.Value); } + private static readonly Lazy _FilterOffset = new(() => Schema.GetOffset(0xCE0A02A634A7917), LazyThreadSafetyMode.None); + public VMixFilterDesc_t Filter { - get => new VMixFilterDesc_tImpl(_Handle + Schema.GetOffset(0xCE0A02A634A7917)); + get => new VMixFilterDesc_tImpl(_Handle + _FilterOffset.Value); } + private static readonly Lazy _LFOAmountOffset = new(() => Schema.GetOffset(0xCE0A02ACA44783A), LazyThreadSafetyMode.None); + public ref float LFOAmount { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE0A02ACA44783A)); + get => ref _Handle.AsRef(_LFOAmountOffset.Value); } + private static readonly Lazy _LFORateOffset = new(() => Schema.GetOffset(0xCE0A02A6E717CE4), LazyThreadSafetyMode.None); + public ref float LFORate { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE0A02A6E717CE4)); + get => ref _Handle.AsRef(_LFORateOffset.Value); } + private static readonly Lazy _PhaseOffset = new(() => Schema.GetOffset(0xCE0A02A3C22A9CA), LazyThreadSafetyMode.None); + public ref float Phase { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE0A02A3C22A9CA)); + get => ref _Handle.AsRef(_PhaseOffset.Value); } + private static readonly Lazy _LFOShapeOffset = new(() => Schema.GetOffset(0xCE0A02AD7FB3149), LazyThreadSafetyMode.None); + public ref VMixLFOShape_t LFOShape { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE0A02AD7FB3149)); + get => ref _Handle.AsRef(_LFOShapeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixBoxverb2Desc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixBoxverb2Desc_tImpl.cs index c4bddef47..d39b6dd90 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixBoxverb2Desc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixBoxverb2Desc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,56 +17,90 @@ internal partial class VMixBoxverb2Desc_tImpl : SchemaClass, VMixBoxverb2Desc_t public VMixBoxverb2Desc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SizeMaxOffset = new(() => Schema.GetOffset(0x319C01FDB9D7F5B8), LazyThreadSafetyMode.None); + public ref float SizeMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x319C01FDB9D7F5B8)); + get => ref _Handle.AsRef(_SizeMaxOffset.Value); } + private static readonly Lazy _SizeMinOffset = new(() => Schema.GetOffset(0x319C01FDAFEB6DB2), LazyThreadSafetyMode.None); + public ref float SizeMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x319C01FDAFEB6DB2)); + get => ref _Handle.AsRef(_SizeMinOffset.Value); } + private static readonly Lazy _ComplexityOffset = new(() => Schema.GetOffset(0x319C01FDF222266B), LazyThreadSafetyMode.None); + public ref float Complexity { - get => ref _Handle.AsRef(Schema.GetOffset(0x319C01FDF222266B)); + get => ref _Handle.AsRef(_ComplexityOffset.Value); } + private static readonly Lazy _DiffusionOffset = new(() => Schema.GetOffset(0x319C01FDCDBE8936), LazyThreadSafetyMode.None); + public ref float Diffusion { - get => ref _Handle.AsRef(Schema.GetOffset(0x319C01FDCDBE8936)); + get => ref _Handle.AsRef(_DiffusionOffset.Value); } + private static readonly Lazy _ModDepthOffset = new(() => Schema.GetOffset(0x319C01FDF59E0B82), LazyThreadSafetyMode.None); + public ref float ModDepth { - get => ref _Handle.AsRef(Schema.GetOffset(0x319C01FDF59E0B82)); + get => ref _Handle.AsRef(_ModDepthOffset.Value); } + private static readonly Lazy _ModRateOffset = new(() => Schema.GetOffset(0x319C01FD0EA039FF), LazyThreadSafetyMode.None); + public ref float ModRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x319C01FD0EA039FF)); + get => ref _Handle.AsRef(_ModRateOffset.Value); } + private static readonly Lazy _ParallelOffset = new(() => Schema.GetOffset(0x319C01FD8971ED92), LazyThreadSafetyMode.None); + public ref bool Parallel { - get => ref _Handle.AsRef(Schema.GetOffset(0x319C01FD8971ED92)); + get => ref _Handle.AsRef(_ParallelOffset.Value); } + private static readonly Lazy _FilterTypeOffset = new(() => Schema.GetOffset(0x319C01FD7E582F6F), LazyThreadSafetyMode.None); + public VMixFilterDesc_t FilterType { - get => new VMixFilterDesc_tImpl(_Handle + Schema.GetOffset(0x319C01FD7E582F6F)); + get => new VMixFilterDesc_tImpl(_Handle + _FilterTypeOffset.Value); } + private static readonly Lazy _WidthOffset = new(() => Schema.GetOffset(0x319C01FDB91935E1), LazyThreadSafetyMode.None); + public ref float Width { - get => ref _Handle.AsRef(Schema.GetOffset(0x319C01FDB91935E1)); + get => ref _Handle.AsRef(_WidthOffset.Value); } + private static readonly Lazy _HeightOffset = new(() => Schema.GetOffset(0x319C01FDEADD7FB0), LazyThreadSafetyMode.None); + public ref float Height { - get => ref _Handle.AsRef(Schema.GetOffset(0x319C01FDEADD7FB0)); + get => ref _Handle.AsRef(_HeightOffset.Value); } + private static readonly Lazy _DepthOffset = new(() => Schema.GetOffset(0x319C01FDD3AD54E8), LazyThreadSafetyMode.None); + public ref float Depth { - get => ref _Handle.AsRef(Schema.GetOffset(0x319C01FDD3AD54E8)); + get => ref _Handle.AsRef(_DepthOffset.Value); } + private static readonly Lazy _FeedbackScaleOffset = new(() => Schema.GetOffset(0x319C01FD2CE35D6E), LazyThreadSafetyMode.None); + public ref float FeedbackScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x319C01FD2CE35D6E)); + get => ref _Handle.AsRef(_FeedbackScaleOffset.Value); } + private static readonly Lazy _FeedbackWidthOffset = new(() => Schema.GetOffset(0x319C01FD50275950), LazyThreadSafetyMode.None); + public ref float FeedbackWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0x319C01FD50275950)); + get => ref _Handle.AsRef(_FeedbackWidthOffset.Value); } + private static readonly Lazy _FeedbackHeightOffset = new(() => Schema.GetOffset(0x319C01FDFB780A47), LazyThreadSafetyMode.None); + public ref float FeedbackHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x319C01FDFB780A47)); + get => ref _Handle.AsRef(_FeedbackHeightOffset.Value); } + private static readonly Lazy _FeedbackDepthOffset = new(() => Schema.GetOffset(0x319C01FDB71B2D09), LazyThreadSafetyMode.None); + public ref float FeedbackDepth { - get => ref _Handle.AsRef(Schema.GetOffset(0x319C01FDB71B2D09)); + get => ref _Handle.AsRef(_FeedbackDepthOffset.Value); } + private static readonly Lazy _OutputGainOffset = new(() => Schema.GetOffset(0x319C01FD73DB9445), LazyThreadSafetyMode.None); + public ref float OutputGain { - get => ref _Handle.AsRef(Schema.GetOffset(0x319C01FD73DB9445)); + get => ref _Handle.AsRef(_OutputGainOffset.Value); } + private static readonly Lazy _TapsOffset = new(() => Schema.GetOffset(0x319C01FD5C502CB9), LazyThreadSafetyMode.None); + public ref float Taps { - get => ref _Handle.AsRef(Schema.GetOffset(0x319C01FD5C502CB9)); + get => ref _Handle.AsRef(_TapsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixBoxverbDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixBoxverbDesc_tImpl.cs index 8309b2159..09efa9797 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixBoxverbDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixBoxverbDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,56 +17,90 @@ internal partial class VMixBoxverbDesc_tImpl : SchemaClass, VMixBoxverbDesc_t { public VMixBoxverbDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SizeMaxOffset = new(() => Schema.GetOffset(0x70C7542DB9D7F5B8), LazyThreadSafetyMode.None); + public ref float SizeMax { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C7542DB9D7F5B8)); + get => ref _Handle.AsRef(_SizeMaxOffset.Value); } + private static readonly Lazy _SizeMinOffset = new(() => Schema.GetOffset(0x70C7542DAFEB6DB2), LazyThreadSafetyMode.None); + public ref float SizeMin { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C7542DAFEB6DB2)); + get => ref _Handle.AsRef(_SizeMinOffset.Value); } + private static readonly Lazy _ComplexityOffset = new(() => Schema.GetOffset(0x70C7542DF222266B), LazyThreadSafetyMode.None); + public ref float Complexity { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C7542DF222266B)); + get => ref _Handle.AsRef(_ComplexityOffset.Value); } + private static readonly Lazy _DiffusionOffset = new(() => Schema.GetOffset(0x70C7542DCDBE8936), LazyThreadSafetyMode.None); + public ref float Diffusion { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C7542DCDBE8936)); + get => ref _Handle.AsRef(_DiffusionOffset.Value); } + private static readonly Lazy _ModDepthOffset = new(() => Schema.GetOffset(0x70C7542DF59E0B82), LazyThreadSafetyMode.None); + public ref float ModDepth { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C7542DF59E0B82)); + get => ref _Handle.AsRef(_ModDepthOffset.Value); } + private static readonly Lazy _ModRateOffset = new(() => Schema.GetOffset(0x70C7542D0EA039FF), LazyThreadSafetyMode.None); + public ref float ModRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C7542D0EA039FF)); + get => ref _Handle.AsRef(_ModRateOffset.Value); } + private static readonly Lazy _ParallelOffset = new(() => Schema.GetOffset(0x70C7542D8971ED92), LazyThreadSafetyMode.None); + public ref bool Parallel { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C7542D8971ED92)); + get => ref _Handle.AsRef(_ParallelOffset.Value); } + private static readonly Lazy _FilterTypeOffset = new(() => Schema.GetOffset(0x70C7542D7E582F6F), LazyThreadSafetyMode.None); + public VMixFilterDesc_t FilterType { - get => new VMixFilterDesc_tImpl(_Handle + Schema.GetOffset(0x70C7542D7E582F6F)); + get => new VMixFilterDesc_tImpl(_Handle + _FilterTypeOffset.Value); } + private static readonly Lazy _WidthOffset = new(() => Schema.GetOffset(0x70C7542DB91935E1), LazyThreadSafetyMode.None); + public ref float Width { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C7542DB91935E1)); + get => ref _Handle.AsRef(_WidthOffset.Value); } + private static readonly Lazy _HeightOffset = new(() => Schema.GetOffset(0x70C7542DEADD7FB0), LazyThreadSafetyMode.None); + public ref float Height { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C7542DEADD7FB0)); + get => ref _Handle.AsRef(_HeightOffset.Value); } + private static readonly Lazy _DepthOffset = new(() => Schema.GetOffset(0x70C7542DD3AD54E8), LazyThreadSafetyMode.None); + public ref float Depth { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C7542DD3AD54E8)); + get => ref _Handle.AsRef(_DepthOffset.Value); } + private static readonly Lazy _FeedbackScaleOffset = new(() => Schema.GetOffset(0x70C7542D2CE35D6E), LazyThreadSafetyMode.None); + public ref float FeedbackScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C7542D2CE35D6E)); + get => ref _Handle.AsRef(_FeedbackScaleOffset.Value); } + private static readonly Lazy _FeedbackWidthOffset = new(() => Schema.GetOffset(0x70C7542D50275950), LazyThreadSafetyMode.None); + public ref float FeedbackWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C7542D50275950)); + get => ref _Handle.AsRef(_FeedbackWidthOffset.Value); } + private static readonly Lazy _FeedbackHeightOffset = new(() => Schema.GetOffset(0x70C7542DFB780A47), LazyThreadSafetyMode.None); + public ref float FeedbackHeight { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C7542DFB780A47)); + get => ref _Handle.AsRef(_FeedbackHeightOffset.Value); } + private static readonly Lazy _FeedbackDepthOffset = new(() => Schema.GetOffset(0x70C7542DB71B2D09), LazyThreadSafetyMode.None); + public ref float FeedbackDepth { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C7542DB71B2D09)); + get => ref _Handle.AsRef(_FeedbackDepthOffset.Value); } + private static readonly Lazy _OutputGainOffset = new(() => Schema.GetOffset(0x70C7542D73DB9445), LazyThreadSafetyMode.None); + public ref float OutputGain { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C7542D73DB9445)); + get => ref _Handle.AsRef(_OutputGainOffset.Value); } + private static readonly Lazy _TapsOffset = new(() => Schema.GetOffset(0x70C7542D5C502CB9), LazyThreadSafetyMode.None); + public ref float Taps { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C7542D5C502CB9)); + get => ref _Handle.AsRef(_TapsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixConvolutionDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixConvolutionDesc_tImpl.cs index fe27e1ad1..52658ad4e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixConvolutionDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixConvolutionDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class VMixConvolutionDesc_tImpl : SchemaClass, VMixConvolutionD public VMixConvolutionDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FldbGainOffset = new(() => Schema.GetOffset(0x451C060B31BF2DF2), LazyThreadSafetyMode.None); + public ref float FldbGain { - get => ref _Handle.AsRef(Schema.GetOffset(0x451C060B31BF2DF2)); + get => ref _Handle.AsRef(_FldbGainOffset.Value); } + private static readonly Lazy _PreDelayMSOffset = new(() => Schema.GetOffset(0x451C060B4EFEC8E7), LazyThreadSafetyMode.None); + public ref float PreDelayMS { - get => ref _Handle.AsRef(Schema.GetOffset(0x451C060B4EFEC8E7)); + get => ref _Handle.AsRef(_PreDelayMSOffset.Value); } + private static readonly Lazy _WetMixOffset = new(() => Schema.GetOffset(0x451C060BD5453C15), LazyThreadSafetyMode.None); + public ref float WetMix { - get => ref _Handle.AsRef(Schema.GetOffset(0x451C060BD5453C15)); + get => ref _Handle.AsRef(_WetMixOffset.Value); } + private static readonly Lazy _FldbLowOffset = new(() => Schema.GetOffset(0x451C060B18EB7345), LazyThreadSafetyMode.None); + public ref float FldbLow { - get => ref _Handle.AsRef(Schema.GetOffset(0x451C060B18EB7345)); + get => ref _Handle.AsRef(_FldbLowOffset.Value); } + private static readonly Lazy _FldbMidOffset = new(() => Schema.GetOffset(0x451C060BCF183661), LazyThreadSafetyMode.None); + public ref float FldbMid { - get => ref _Handle.AsRef(Schema.GetOffset(0x451C060BCF183661)); + get => ref _Handle.AsRef(_FldbMidOffset.Value); } + private static readonly Lazy _FldbHighOffset = new(() => Schema.GetOffset(0x451C060B4A2BCD39), LazyThreadSafetyMode.None); + public ref float FldbHigh { - get => ref _Handle.AsRef(Schema.GetOffset(0x451C060B4A2BCD39)); + get => ref _Handle.AsRef(_FldbHighOffset.Value); } + private static readonly Lazy _LowCutoffFreqOffset = new(() => Schema.GetOffset(0x451C060B1E9A1CCC), LazyThreadSafetyMode.None); + public ref float LowCutoffFreq { - get => ref _Handle.AsRef(Schema.GetOffset(0x451C060B1E9A1CCC)); + get => ref _Handle.AsRef(_LowCutoffFreqOffset.Value); } + private static readonly Lazy _HighCutoffFreqOffset = new(() => Schema.GetOffset(0x451C060B3FE556C8), LazyThreadSafetyMode.None); + public ref float HighCutoffFreq { - get => ref _Handle.AsRef(Schema.GetOffset(0x451C060B3FE556C8)); + get => ref _Handle.AsRef(_HighCutoffFreqOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDelayDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDelayDesc_tImpl.cs index bb3a97eff..1db70f460 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDelayDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDelayDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class VMixDelayDesc_tImpl : SchemaClass, VMixDelayDesc_t { public VMixDelayDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FeedbackFilterOffset = new(() => Schema.GetOffset(0x4C891F427C227CDC), LazyThreadSafetyMode.None); + public VMixFilterDesc_t FeedbackFilter { - get => new VMixFilterDesc_tImpl(_Handle + Schema.GetOffset(0x4C891F427C227CDC)); + get => new VMixFilterDesc_tImpl(_Handle + _FeedbackFilterOffset.Value); } + private static readonly Lazy _EnableFilterOffset = new(() => Schema.GetOffset(0x4C891F42A12F9BE8), LazyThreadSafetyMode.None); + public ref bool EnableFilter { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C891F42A12F9BE8)); + get => ref _Handle.AsRef(_EnableFilterOffset.Value); } + private static readonly Lazy _DelayOffset = new(() => Schema.GetOffset(0x4C891F427D68FD6E), LazyThreadSafetyMode.None); + public ref float Delay { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C891F427D68FD6E)); + get => ref _Handle.AsRef(_DelayOffset.Value); } + private static readonly Lazy _DirectGainOffset = new(() => Schema.GetOffset(0x4C891F42C6ABC039), LazyThreadSafetyMode.None); + public ref float DirectGain { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C891F42C6ABC039)); + get => ref _Handle.AsRef(_DirectGainOffset.Value); } + private static readonly Lazy _DelayGainOffset = new(() => Schema.GetOffset(0x4C891F42708E6A21), LazyThreadSafetyMode.None); + public ref float DelayGain { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C891F42708E6A21)); + get => ref _Handle.AsRef(_DelayGainOffset.Value); } + private static readonly Lazy _FeedbackGainOffset = new(() => Schema.GetOffset(0x4C891F427CACF477), LazyThreadSafetyMode.None); + public ref float FeedbackGain { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C891F427CACF477)); + get => ref _Handle.AsRef(_FeedbackGainOffset.Value); } + private static readonly Lazy _WidthOffset = new(() => Schema.GetOffset(0x4C891F42B91935E1), LazyThreadSafetyMode.None); + public ref float Width { - get => ref _Handle.AsRef(Schema.GetOffset(0x4C891F42B91935E1)); + get => ref _Handle.AsRef(_WidthOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDiffusorDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDiffusorDesc_tImpl.cs index 8e6a89835..c6365545c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDiffusorDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDiffusorDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class VMixDiffusorDesc_tImpl : SchemaClass, VMixDiffusorDesc_t public VMixDiffusorDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SizeOffset = new(() => Schema.GetOffset(0xC24C1D694CF0EBC6), LazyThreadSafetyMode.None); + public ref float Size { - get => ref _Handle.AsRef(Schema.GetOffset(0xC24C1D694CF0EBC6)); + get => ref _Handle.AsRef(_SizeOffset.Value); } + private static readonly Lazy _ComplexityOffset = new(() => Schema.GetOffset(0xC24C1D69F222266B), LazyThreadSafetyMode.None); + public ref float Complexity { - get => ref _Handle.AsRef(Schema.GetOffset(0xC24C1D69F222266B)); + get => ref _Handle.AsRef(_ComplexityOffset.Value); } + private static readonly Lazy _FeedbackOffset = new(() => Schema.GetOffset(0xC24C1D69CD5446D4), LazyThreadSafetyMode.None); + public ref float Feedback { - get => ref _Handle.AsRef(Schema.GetOffset(0xC24C1D69CD5446D4)); + get => ref _Handle.AsRef(_FeedbackOffset.Value); } + private static readonly Lazy _OutputGainOffset = new(() => Schema.GetOffset(0xC24C1D6973DB9445), LazyThreadSafetyMode.None); + public ref float OutputGain { - get => ref _Handle.AsRef(Schema.GetOffset(0xC24C1D6973DB9445)); + get => ref _Handle.AsRef(_OutputGainOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDualCompressorDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDualCompressorDesc_tImpl.cs index f5ca3061f..0eedc63fb 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDualCompressorDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDualCompressorDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class VMixDualCompressorDesc_tImpl : SchemaClass, VMixDualCompr public VMixDualCompressorDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _RMSTimeMSOffset = new(() => Schema.GetOffset(0x6B9BDFD8FB749526), LazyThreadSafetyMode.None); + public ref float RMSTimeMS { - get => ref _Handle.AsRef(Schema.GetOffset(0x6B9BDFD8FB749526)); + get => ref _Handle.AsRef(_RMSTimeMSOffset.Value); } + private static readonly Lazy _FldbKneeWidthOffset = new(() => Schema.GetOffset(0x6B9BDFD835532FF2), LazyThreadSafetyMode.None); + public ref float FldbKneeWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0x6B9BDFD835532FF2)); + get => ref _Handle.AsRef(_FldbKneeWidthOffset.Value); } + private static readonly Lazy _WetMixOffset = new(() => Schema.GetOffset(0x6B9BDFD8D5453C15), LazyThreadSafetyMode.None); + public ref float WetMix { - get => ref _Handle.AsRef(Schema.GetOffset(0x6B9BDFD8D5453C15)); + get => ref _Handle.AsRef(_WetMixOffset.Value); } + private static readonly Lazy _PeakModeOffset = new(() => Schema.GetOffset(0x6B9BDFD887DF35F9), LazyThreadSafetyMode.None); + public ref bool PeakMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x6B9BDFD887DF35F9)); + get => ref _Handle.AsRef(_PeakModeOffset.Value); } + private static readonly Lazy _BandDescOffset = new(() => Schema.GetOffset(0x6B9BDFD804203F47), LazyThreadSafetyMode.None); + public VMixDynamicsBand_t BandDesc { - get => new VMixDynamicsBand_tImpl(_Handle + Schema.GetOffset(0x6B9BDFD804203F47)); + get => new VMixDynamicsBand_tImpl(_Handle + _BandDescOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDynamics3BandDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDynamics3BandDesc_tImpl.cs index 2579aa119..b2dc965db 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDynamics3BandDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDynamics3BandDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class VMixDynamics3BandDesc_tImpl : SchemaClass, VMixDynamics3B public VMixDynamics3BandDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FldbGainOutputOffset = new(() => Schema.GetOffset(0xA4A1000DFC3C16D3), LazyThreadSafetyMode.None); + public ref float FldbGainOutput { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4A1000DFC3C16D3)); + get => ref _Handle.AsRef(_FldbGainOutputOffset.Value); } + private static readonly Lazy _RMSTimeMSOffset = new(() => Schema.GetOffset(0xA4A1000DFB749526), LazyThreadSafetyMode.None); + public ref float RMSTimeMS { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4A1000DFB749526)); + get => ref _Handle.AsRef(_RMSTimeMSOffset.Value); } + private static readonly Lazy _FldbKneeWidthOffset = new(() => Schema.GetOffset(0xA4A1000D35532FF2), LazyThreadSafetyMode.None); + public ref float FldbKneeWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4A1000D35532FF2)); + get => ref _Handle.AsRef(_FldbKneeWidthOffset.Value); } + private static readonly Lazy _DepthOffset = new(() => Schema.GetOffset(0xA4A1000DD3AD54E8), LazyThreadSafetyMode.None); + public ref float Depth { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4A1000DD3AD54E8)); + get => ref _Handle.AsRef(_DepthOffset.Value); } + private static readonly Lazy _WetMixOffset = new(() => Schema.GetOffset(0xA4A1000DD5453C15), LazyThreadSafetyMode.None); + public ref float WetMix { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4A1000DD5453C15)); + get => ref _Handle.AsRef(_WetMixOffset.Value); } + private static readonly Lazy _TimeScaleOffset = new(() => Schema.GetOffset(0xA4A1000DB49D735C), LazyThreadSafetyMode.None); + public ref float TimeScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4A1000DB49D735C)); + get => ref _Handle.AsRef(_TimeScaleOffset.Value); } + private static readonly Lazy _LowCutoffFreqOffset = new(() => Schema.GetOffset(0xA4A1000D1E9A1CCC), LazyThreadSafetyMode.None); + public ref float LowCutoffFreq { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4A1000D1E9A1CCC)); + get => ref _Handle.AsRef(_LowCutoffFreqOffset.Value); } + private static readonly Lazy _HighCutoffFreqOffset = new(() => Schema.GetOffset(0xA4A1000D3FE556C8), LazyThreadSafetyMode.None); + public ref float HighCutoffFreq { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4A1000D3FE556C8)); + get => ref _Handle.AsRef(_HighCutoffFreqOffset.Value); } + private static readonly Lazy _PeakModeOffset = new(() => Schema.GetOffset(0xA4A1000D87DF35F9), LazyThreadSafetyMode.None); + public ref bool PeakMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xA4A1000D87DF35F9)); + get => ref _Handle.AsRef(_PeakModeOffset.Value); } + private static readonly Lazy _BandDescOffset = new(() => Schema.GetOffset(0xA4A1000D04203F47), LazyThreadSafetyMode.None); + public SchemaUntypedField BandDesc { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xA4A1000D04203F47)); + get => new SchemaUntypedField(_Handle + _BandDescOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDynamicsBand_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDynamicsBand_tImpl.cs index da6d18662..eafcedcc1 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDynamicsBand_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDynamicsBand_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class VMixDynamicsBand_tImpl : SchemaClass, VMixDynamicsBand_t public VMixDynamicsBand_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FldbGainInputOffset = new(() => Schema.GetOffset(0xC3A63113E9F143B6), LazyThreadSafetyMode.None); + public ref float FldbGainInput { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3A63113E9F143B6)); + get => ref _Handle.AsRef(_FldbGainInputOffset.Value); } + private static readonly Lazy _FldbGainOutputOffset = new(() => Schema.GetOffset(0xC3A63113FC3C16D3), LazyThreadSafetyMode.None); + public ref float FldbGainOutput { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3A63113FC3C16D3)); + get => ref _Handle.AsRef(_FldbGainOutputOffset.Value); } + private static readonly Lazy _FldbThresholdBelowOffset = new(() => Schema.GetOffset(0xC3A6311311693729), LazyThreadSafetyMode.None); + public ref float FldbThresholdBelow { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3A6311311693729)); + get => ref _Handle.AsRef(_FldbThresholdBelowOffset.Value); } + private static readonly Lazy _FldbThresholdAboveOffset = new(() => Schema.GetOffset(0xC3A631134516A525), LazyThreadSafetyMode.None); + public ref float FldbThresholdAbove { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3A631134516A525)); + get => ref _Handle.AsRef(_FldbThresholdAboveOffset.Value); } + private static readonly Lazy _RatioBelowOffset = new(() => Schema.GetOffset(0xC3A63113560F0E57), LazyThreadSafetyMode.None); + public ref float RatioBelow { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3A63113560F0E57)); + get => ref _Handle.AsRef(_RatioBelowOffset.Value); } + private static readonly Lazy _RatioAboveOffset = new(() => Schema.GetOffset(0xC3A631139E701FCB), LazyThreadSafetyMode.None); + public ref float RatioAbove { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3A631139E701FCB)); + get => ref _Handle.AsRef(_RatioAboveOffset.Value); } + private static readonly Lazy _AttackTimeMSOffset = new(() => Schema.GetOffset(0xC3A63113D4A28216), LazyThreadSafetyMode.None); + public ref float AttackTimeMS { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3A63113D4A28216)); + get => ref _Handle.AsRef(_AttackTimeMSOffset.Value); } + private static readonly Lazy _ReleaseTimeMSOffset = new(() => Schema.GetOffset(0xC3A63113EBB62791), LazyThreadSafetyMode.None); + public ref float ReleaseTimeMS { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3A63113EBB62791)); + get => ref _Handle.AsRef(_ReleaseTimeMSOffset.Value); } + private static readonly Lazy _EnableOffset = new(() => Schema.GetOffset(0xC3A6311313C00D2E), LazyThreadSafetyMode.None); + public ref bool Enable { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3A6311313C00D2E)); + get => ref _Handle.AsRef(_EnableOffset.Value); } + private static readonly Lazy _SoloOffset = new(() => Schema.GetOffset(0xC3A63113CF623EAA), LazyThreadSafetyMode.None); + public ref bool Solo { - get => ref _Handle.AsRef(Schema.GetOffset(0xC3A63113CF623EAA)); + get => ref _Handle.AsRef(_SoloOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDynamicsCompressorDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDynamicsCompressorDesc_tImpl.cs index 06f4370b4..41e95438a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDynamicsCompressorDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDynamicsCompressorDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class VMixDynamicsCompressorDesc_tImpl : SchemaClass, VMixDynam public VMixDynamicsCompressorDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FldbOutputGainOffset = new(() => Schema.GetOffset(0x4AC2D50067F97C23), LazyThreadSafetyMode.None); + public ref float FldbOutputGain { - get => ref _Handle.AsRef(Schema.GetOffset(0x4AC2D50067F97C23)); + get => ref _Handle.AsRef(_FldbOutputGainOffset.Value); } + private static readonly Lazy _FldbCompressionThresholdOffset = new(() => Schema.GetOffset(0x4AC2D500C45CDA7C), LazyThreadSafetyMode.None); + public ref float FldbCompressionThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0x4AC2D500C45CDA7C)); + get => ref _Handle.AsRef(_FldbCompressionThresholdOffset.Value); } + private static readonly Lazy _FldbKneeWidthOffset = new(() => Schema.GetOffset(0x4AC2D50035532FF2), LazyThreadSafetyMode.None); + public ref float FldbKneeWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0x4AC2D50035532FF2)); + get => ref _Handle.AsRef(_FldbKneeWidthOffset.Value); } + private static readonly Lazy _CompressionRatioOffset = new(() => Schema.GetOffset(0x4AC2D5008B1A1E1A), LazyThreadSafetyMode.None); + public ref float CompressionRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0x4AC2D5008B1A1E1A)); + get => ref _Handle.AsRef(_CompressionRatioOffset.Value); } + private static readonly Lazy _AttackTimeMSOffset = new(() => Schema.GetOffset(0x4AC2D500D4A28216), LazyThreadSafetyMode.None); + public ref float AttackTimeMS { - get => ref _Handle.AsRef(Schema.GetOffset(0x4AC2D500D4A28216)); + get => ref _Handle.AsRef(_AttackTimeMSOffset.Value); } + private static readonly Lazy _ReleaseTimeMSOffset = new(() => Schema.GetOffset(0x4AC2D500EBB62791), LazyThreadSafetyMode.None); + public ref float ReleaseTimeMS { - get => ref _Handle.AsRef(Schema.GetOffset(0x4AC2D500EBB62791)); + get => ref _Handle.AsRef(_ReleaseTimeMSOffset.Value); } + private static readonly Lazy _RMSTimeMSOffset = new(() => Schema.GetOffset(0x4AC2D500FB749526), LazyThreadSafetyMode.None); + public ref float RMSTimeMS { - get => ref _Handle.AsRef(Schema.GetOffset(0x4AC2D500FB749526)); + get => ref _Handle.AsRef(_RMSTimeMSOffset.Value); } + private static readonly Lazy _WetMixOffset = new(() => Schema.GetOffset(0x4AC2D500D5453C15), LazyThreadSafetyMode.None); + public ref float WetMix { - get => ref _Handle.AsRef(Schema.GetOffset(0x4AC2D500D5453C15)); + get => ref _Handle.AsRef(_WetMixOffset.Value); } + private static readonly Lazy _PeakModeOffset = new(() => Schema.GetOffset(0x4AC2D50087DF35F9), LazyThreadSafetyMode.None); + public ref bool PeakMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x4AC2D50087DF35F9)); + get => ref _Handle.AsRef(_PeakModeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDynamicsDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDynamicsDesc_tImpl.cs index f5e36445f..0a4ed2518 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDynamicsDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixDynamicsDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,65 @@ internal partial class VMixDynamicsDesc_tImpl : SchemaClass, VMixDynamicsDesc_t public VMixDynamicsDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FldbGainOffset = new(() => Schema.GetOffset(0xC4119B7931BF2DF2), LazyThreadSafetyMode.None); + public ref float FldbGain { - get => ref _Handle.AsRef(Schema.GetOffset(0xC4119B7931BF2DF2)); + get => ref _Handle.AsRef(_FldbGainOffset.Value); } + private static readonly Lazy _FldbNoiseGateThresholdOffset = new(() => Schema.GetOffset(0xC4119B799838FE4D), LazyThreadSafetyMode.None); + public ref float FldbNoiseGateThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0xC4119B799838FE4D)); + get => ref _Handle.AsRef(_FldbNoiseGateThresholdOffset.Value); } + private static readonly Lazy _FldbCompressionThresholdOffset = new(() => Schema.GetOffset(0xC4119B79C45CDA7C), LazyThreadSafetyMode.None); + public ref float FldbCompressionThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0xC4119B79C45CDA7C)); + get => ref _Handle.AsRef(_FldbCompressionThresholdOffset.Value); } + private static readonly Lazy _FldbLimiterThresholdOffset = new(() => Schema.GetOffset(0xC4119B79CC95E7EA), LazyThreadSafetyMode.None); + public ref float FldbLimiterThreshold { - get => ref _Handle.AsRef(Schema.GetOffset(0xC4119B79CC95E7EA)); + get => ref _Handle.AsRef(_FldbLimiterThresholdOffset.Value); } + private static readonly Lazy _FldbKneeWidthOffset = new(() => Schema.GetOffset(0xC4119B7935532FF2), LazyThreadSafetyMode.None); + public ref float FldbKneeWidth { - get => ref _Handle.AsRef(Schema.GetOffset(0xC4119B7935532FF2)); + get => ref _Handle.AsRef(_FldbKneeWidthOffset.Value); } + private static readonly Lazy _RatioOffset = new(() => Schema.GetOffset(0xC4119B79DEAD31EA), LazyThreadSafetyMode.None); + public ref float Ratio { - get => ref _Handle.AsRef(Schema.GetOffset(0xC4119B79DEAD31EA)); + get => ref _Handle.AsRef(_RatioOffset.Value); } + private static readonly Lazy _LimiterRatioOffset = new(() => Schema.GetOffset(0xC4119B79A8D830FC), LazyThreadSafetyMode.None); + public ref float LimiterRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0xC4119B79A8D830FC)); + get => ref _Handle.AsRef(_LimiterRatioOffset.Value); } + private static readonly Lazy _AttackTimeMSOffset = new(() => Schema.GetOffset(0xC4119B79D4A28216), LazyThreadSafetyMode.None); + public ref float AttackTimeMS { - get => ref _Handle.AsRef(Schema.GetOffset(0xC4119B79D4A28216)); + get => ref _Handle.AsRef(_AttackTimeMSOffset.Value); } + private static readonly Lazy _ReleaseTimeMSOffset = new(() => Schema.GetOffset(0xC4119B79EBB62791), LazyThreadSafetyMode.None); + public ref float ReleaseTimeMS { - get => ref _Handle.AsRef(Schema.GetOffset(0xC4119B79EBB62791)); + get => ref _Handle.AsRef(_ReleaseTimeMSOffset.Value); } + private static readonly Lazy _RMSTimeMSOffset = new(() => Schema.GetOffset(0xC4119B79FB749526), LazyThreadSafetyMode.None); + public ref float RMSTimeMS { - get => ref _Handle.AsRef(Schema.GetOffset(0xC4119B79FB749526)); + get => ref _Handle.AsRef(_RMSTimeMSOffset.Value); } + private static readonly Lazy _WetMixOffset = new(() => Schema.GetOffset(0xC4119B79D5453C15), LazyThreadSafetyMode.None); + public ref float WetMix { - get => ref _Handle.AsRef(Schema.GetOffset(0xC4119B79D5453C15)); + get => ref _Handle.AsRef(_WetMixOffset.Value); } + private static readonly Lazy _PeakModeOffset = new(() => Schema.GetOffset(0xC4119B7987DF35F9), LazyThreadSafetyMode.None); + public ref bool PeakMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xC4119B7987DF35F9)); + get => ref _Handle.AsRef(_PeakModeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixEQ8Desc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixEQ8Desc_tImpl.cs index 1c29ea391..5740cee1c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixEQ8Desc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixEQ8Desc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class VMixEQ8Desc_tImpl : SchemaClass, VMixEQ8Desc_t { public VMixEQ8Desc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _StagesOffset = new(() => Schema.GetOffset(0xBF8A6F07B955349A), LazyThreadSafetyMode.None); + public SchemaUntypedField Stages { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xBF8A6F07B955349A)); + get => new SchemaUntypedField(_Handle + _StagesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixEffectChainDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixEffectChainDesc_tImpl.cs index 8d1e6e63c..37c2a249d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixEffectChainDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixEffectChainDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class VMixEffectChainDesc_tImpl : SchemaClass, VMixEffectChainD public VMixEffectChainDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CrossfadeTimeOffset = new(() => Schema.GetOffset(0x993FEE3C5C1DD52), LazyThreadSafetyMode.None); + public ref float CrossfadeTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x993FEE3C5C1DD52)); + get => ref _Handle.AsRef(_CrossfadeTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixEnvelopeDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixEnvelopeDesc_tImpl.cs index 2ecb2f76d..18f23a48f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixEnvelopeDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixEnvelopeDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class VMixEnvelopeDesc_tImpl : SchemaClass, VMixEnvelopeDesc_t public VMixEnvelopeDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _AttackTimeMSOffset = new(() => Schema.GetOffset(0xEF93602BD4A28216), LazyThreadSafetyMode.None); + public ref float AttackTimeMS { - get => ref _Handle.AsRef(Schema.GetOffset(0xEF93602BD4A28216)); + get => ref _Handle.AsRef(_AttackTimeMSOffset.Value); } + private static readonly Lazy _HoldTimeMSOffset = new(() => Schema.GetOffset(0xEF93602B028BA44F), LazyThreadSafetyMode.None); + public ref float HoldTimeMS { - get => ref _Handle.AsRef(Schema.GetOffset(0xEF93602B028BA44F)); + get => ref _Handle.AsRef(_HoldTimeMSOffset.Value); } + private static readonly Lazy _ReleaseTimeMSOffset = new(() => Schema.GetOffset(0xEF93602BEBB62791), LazyThreadSafetyMode.None); + public ref float ReleaseTimeMS { - get => ref _Handle.AsRef(Schema.GetOffset(0xEF93602BEBB62791)); + get => ref _Handle.AsRef(_ReleaseTimeMSOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixFilterDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixFilterDesc_tImpl.cs index 9aa4db978..7d80548fc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixFilterDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixFilterDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class VMixFilterDesc_tImpl : SchemaClass, VMixFilterDesc_t { public VMixFilterDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FilterTypeOffset = new(() => Schema.GetOffset(0x39A87B6971861EDB), LazyThreadSafetyMode.None); + public ref VMixFilterType_t FilterType { - get => ref _Handle.AsRef(Schema.GetOffset(0x39A87B6971861EDB)); + get => ref _Handle.AsRef(_FilterTypeOffset.Value); } + private static readonly Lazy _FilterSlopeOffset = new(() => Schema.GetOffset(0x39A87B696387D992), LazyThreadSafetyMode.None); + public ref VMixFilterSlope_t FilterSlope { - get => ref _Handle.AsRef(Schema.GetOffset(0x39A87B696387D992)); + get => ref _Handle.AsRef(_FilterSlopeOffset.Value); } + private static readonly Lazy _EnabledOffset = new(() => Schema.GetOffset(0x39A87B696154EB7E), LazyThreadSafetyMode.None); + public ref bool Enabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x39A87B696154EB7E)); + get => ref _Handle.AsRef(_EnabledOffset.Value); } + private static readonly Lazy _FldbGainOffset = new(() => Schema.GetOffset(0x39A87B6931BF2DF2), LazyThreadSafetyMode.None); + public ref float FldbGain { - get => ref _Handle.AsRef(Schema.GetOffset(0x39A87B6931BF2DF2)); + get => ref _Handle.AsRef(_FldbGainOffset.Value); } + private static readonly Lazy _CutoffFreqOffset = new(() => Schema.GetOffset(0x39A87B691E8CBE8C), LazyThreadSafetyMode.None); + public ref float CutoffFreq { - get => ref _Handle.AsRef(Schema.GetOffset(0x39A87B691E8CBE8C)); + get => ref _Handle.AsRef(_CutoffFreqOffset.Value); } + private static readonly Lazy _QOffset = new(() => Schema.GetOffset(0x39A87B6996122E3A), LazyThreadSafetyMode.None); + public ref float Q { - get => ref _Handle.AsRef(Schema.GetOffset(0x39A87B6996122E3A)); + get => ref _Handle.AsRef(_QOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixFreeverbDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixFreeverbDesc_tImpl.cs index 1fe975058..16f046f1d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixFreeverbDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixFreeverbDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class VMixFreeverbDesc_tImpl : SchemaClass, VMixFreeverbDesc_t public VMixFreeverbDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _RoomSizeOffset = new(() => Schema.GetOffset(0xF9EB6BF8DEA95199), LazyThreadSafetyMode.None); + public ref float RoomSize { - get => ref _Handle.AsRef(Schema.GetOffset(0xF9EB6BF8DEA95199)); + get => ref _Handle.AsRef(_RoomSizeOffset.Value); } + private static readonly Lazy _DampOffset = new(() => Schema.GetOffset(0xF9EB6BF851CA5395), LazyThreadSafetyMode.None); + public ref float Damp { - get => ref _Handle.AsRef(Schema.GetOffset(0xF9EB6BF851CA5395)); + get => ref _Handle.AsRef(_DampOffset.Value); } + private static readonly Lazy _WidthOffset = new(() => Schema.GetOffset(0xF9EB6BF8B91935E1), LazyThreadSafetyMode.None); + public ref float Width { - get => ref _Handle.AsRef(Schema.GetOffset(0xF9EB6BF8B91935E1)); + get => ref _Handle.AsRef(_WidthOffset.Value); } + private static readonly Lazy _LateReflectionsOffset = new(() => Schema.GetOffset(0xF9EB6BF830A49ADF), LazyThreadSafetyMode.None); + public ref float LateReflections { - get => ref _Handle.AsRef(Schema.GetOffset(0xF9EB6BF830A49ADF)); + get => ref _Handle.AsRef(_LateReflectionsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixModDelayDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixModDelayDesc_tImpl.cs index aecefaa77..a20d3180a 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixModDelayDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixModDelayDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,50 @@ internal partial class VMixModDelayDesc_tImpl : SchemaClass, VMixModDelayDesc_t public VMixModDelayDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FeedbackFilterOffset = new(() => Schema.GetOffset(0x7E7D84907C227CDC), LazyThreadSafetyMode.None); + public VMixFilterDesc_t FeedbackFilter { - get => new VMixFilterDesc_tImpl(_Handle + Schema.GetOffset(0x7E7D84907C227CDC)); + get => new VMixFilterDesc_tImpl(_Handle + _FeedbackFilterOffset.Value); } + private static readonly Lazy _PhaseInvertOffset = new(() => Schema.GetOffset(0x7E7D849098B8BD4C), LazyThreadSafetyMode.None); + public ref bool PhaseInvert { - get => ref _Handle.AsRef(Schema.GetOffset(0x7E7D849098B8BD4C)); + get => ref _Handle.AsRef(_PhaseInvertOffset.Value); } + private static readonly Lazy _GlideTimeOffset = new(() => Schema.GetOffset(0x7E7D8490F7DC34FD), LazyThreadSafetyMode.None); + public ref float GlideTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x7E7D8490F7DC34FD)); + get => ref _Handle.AsRef(_GlideTimeOffset.Value); } + private static readonly Lazy _DelayOffset = new(() => Schema.GetOffset(0x7E7D84907D68FD6E), LazyThreadSafetyMode.None); + public ref float Delay { - get => ref _Handle.AsRef(Schema.GetOffset(0x7E7D84907D68FD6E)); + get => ref _Handle.AsRef(_DelayOffset.Value); } + private static readonly Lazy _OutputGainOffset = new(() => Schema.GetOffset(0x7E7D849073DB9445), LazyThreadSafetyMode.None); + public ref float OutputGain { - get => ref _Handle.AsRef(Schema.GetOffset(0x7E7D849073DB9445)); + get => ref _Handle.AsRef(_OutputGainOffset.Value); } + private static readonly Lazy _FeedbackGainOffset = new(() => Schema.GetOffset(0x7E7D84907CACF477), LazyThreadSafetyMode.None); + public ref float FeedbackGain { - get => ref _Handle.AsRef(Schema.GetOffset(0x7E7D84907CACF477)); + get => ref _Handle.AsRef(_FeedbackGainOffset.Value); } + private static readonly Lazy _ModRateOffset = new(() => Schema.GetOffset(0x7E7D84900EA039FF), LazyThreadSafetyMode.None); + public ref float ModRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x7E7D84900EA039FF)); + get => ref _Handle.AsRef(_ModRateOffset.Value); } + private static readonly Lazy _ModDepthOffset = new(() => Schema.GetOffset(0x7E7D8490F59E0B82), LazyThreadSafetyMode.None); + public ref float ModDepth { - get => ref _Handle.AsRef(Schema.GetOffset(0x7E7D8490F59E0B82)); + get => ref _Handle.AsRef(_ModDepthOffset.Value); } + private static readonly Lazy _ApplyAntialiasingOffset = new(() => Schema.GetOffset(0x7E7D84906B0E9697), LazyThreadSafetyMode.None); + public ref bool ApplyAntialiasing { - get => ref _Handle.AsRef(Schema.GetOffset(0x7E7D84906B0E9697)); + get => ref _Handle.AsRef(_ApplyAntialiasingOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixOscDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixOscDesc_tImpl.cs index 611327323..a851e13d7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixOscDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixOscDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class VMixOscDesc_tImpl : SchemaClass, VMixOscDesc_t { public VMixOscDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _OscTypeOffset = new(() => Schema.GetOffset(0x414F0016106B4054), LazyThreadSafetyMode.None); + public ref VMixLFOShape_t OscType { - get => ref _Handle.AsRef(Schema.GetOffset(0x414F0016106B4054)); + get => ref _Handle.AsRef(_OscTypeOffset.Value); } + private static readonly Lazy _FreqOffset = new(() => Schema.GetOffset(0x414F00164E0B0897), LazyThreadSafetyMode.None); + public ref float Freq { - get => ref _Handle.AsRef(Schema.GetOffset(0x414F00164E0B0897)); + get => ref _Handle.AsRef(_FreqOffset.Value); } + private static readonly Lazy _PhaseOffset = new(() => Schema.GetOffset(0x414F00163C22A9CA), LazyThreadSafetyMode.None); + public ref float Phase { - get => ref _Handle.AsRef(Schema.GetOffset(0x414F00163C22A9CA)); + get => ref _Handle.AsRef(_PhaseOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixPannerDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixPannerDesc_tImpl.cs index b85b0a1ec..a2ca694a4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixPannerDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixPannerDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class VMixPannerDesc_tImpl : SchemaClass, VMixPannerDesc_t { public VMixPannerDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x13827FF70F04B4ED), LazyThreadSafetyMode.None); + public ref VMixPannerType_t Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x13827FF70F04B4ED)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _StrengthOffset = new(() => Schema.GetOffset(0x13827FF78F67AF1A), LazyThreadSafetyMode.None); + public ref float Strength { - get => ref _Handle.AsRef(Schema.GetOffset(0x13827FF78F67AF1A)); + get => ref _Handle.AsRef(_StrengthOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixPitchShiftDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixPitchShiftDesc_tImpl.cs index 774a11a18..320fd09be 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixPitchShiftDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixPitchShiftDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class VMixPitchShiftDesc_tImpl : SchemaClass, VMixPitchShiftDes public VMixPitchShiftDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _GrainSampleCountOffset = new(() => Schema.GetOffset(0xE7EEA08D6AA1D059), LazyThreadSafetyMode.None); + public ref int GrainSampleCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7EEA08D6AA1D059)); + get => ref _Handle.AsRef(_GrainSampleCountOffset.Value); } + private static readonly Lazy _PitchShiftOffset = new(() => Schema.GetOffset(0xE7EEA08DD8E35569), LazyThreadSafetyMode.None); + public ref float PitchShift { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7EEA08DD8E35569)); + get => ref _Handle.AsRef(_PitchShiftOffset.Value); } + private static readonly Lazy _QualityOffset = new(() => Schema.GetOffset(0xE7EEA08D60857B42), LazyThreadSafetyMode.None); + public ref int Quality { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7EEA08D60857B42)); + get => ref _Handle.AsRef(_QualityOffset.Value); } + private static readonly Lazy _ProcTypeOffset = new(() => Schema.GetOffset(0xE7EEA08DB256235D), LazyThreadSafetyMode.None); + public ref int ProcType { - get => ref _Handle.AsRef(Schema.GetOffset(0xE7EEA08DB256235D)); + get => ref _Handle.AsRef(_ProcTypeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixPlateverbDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixPlateverbDesc_tImpl.cs index f3b409cd4..dfd9129a0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixPlateverbDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixPlateverbDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,26 +17,40 @@ internal partial class VMixPlateverbDesc_tImpl : SchemaClass, VMixPlateverbDesc_ public VMixPlateverbDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _PrefilterOffset = new(() => Schema.GetOffset(0xFF651FB0FAF1E06A), LazyThreadSafetyMode.None); + public ref float Prefilter { - get => ref _Handle.AsRef(Schema.GetOffset(0xFF651FB0FAF1E06A)); + get => ref _Handle.AsRef(_PrefilterOffset.Value); } + private static readonly Lazy _InputDiffusion1Offset = new(() => Schema.GetOffset(0xFF651FB039884B67), LazyThreadSafetyMode.None); + public ref float InputDiffusion1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xFF651FB039884B67)); + get => ref _Handle.AsRef(_InputDiffusion1Offset.Value); } + private static readonly Lazy _InputDiffusion2Offset = new(() => Schema.GetOffset(0xFF651FB03A884CFA), LazyThreadSafetyMode.None); + public ref float InputDiffusion2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xFF651FB03A884CFA)); + get => ref _Handle.AsRef(_InputDiffusion2Offset.Value); } + private static readonly Lazy _DecayOffset = new(() => Schema.GetOffset(0xFF651FB0E24ABC67), LazyThreadSafetyMode.None); + public ref float Decay { - get => ref _Handle.AsRef(Schema.GetOffset(0xFF651FB0E24ABC67)); + get => ref _Handle.AsRef(_DecayOffset.Value); } + private static readonly Lazy _DampOffset = new(() => Schema.GetOffset(0xFF651FB051CA5395), LazyThreadSafetyMode.None); + public ref float Damp { - get => ref _Handle.AsRef(Schema.GetOffset(0xFF651FB051CA5395)); + get => ref _Handle.AsRef(_DampOffset.Value); } + private static readonly Lazy _FeedbackDiffusion1Offset = new(() => Schema.GetOffset(0xFF651FB0A53A60E2), LazyThreadSafetyMode.None); + public ref float FeedbackDiffusion1 { - get => ref _Handle.AsRef(Schema.GetOffset(0xFF651FB0A53A60E2)); + get => ref _Handle.AsRef(_FeedbackDiffusion1Offset.Value); } + private static readonly Lazy _FeedbackDiffusion2Offset = new(() => Schema.GetOffset(0xFF651FB0A43A5F4F), LazyThreadSafetyMode.None); + public ref float FeedbackDiffusion2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xFF651FB0A43A5F4F)); + get => ref _Handle.AsRef(_FeedbackDiffusion2Offset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixShaperDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixShaperDesc_tImpl.cs index 9126c0959..718318c77 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixShaperDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixShaperDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class VMixShaperDesc_tImpl : SchemaClass, VMixShaperDesc_t { public VMixShaperDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ShapeOffset = new(() => Schema.GetOffset(0x80E2A73621208A02), LazyThreadSafetyMode.None); + public ref int Shape { - get => ref _Handle.AsRef(Schema.GetOffset(0x80E2A73621208A02)); + get => ref _Handle.AsRef(_ShapeOffset.Value); } + private static readonly Lazy _FldbDriveOffset = new(() => Schema.GetOffset(0x80E2A7360E12679B), LazyThreadSafetyMode.None); + public ref float FldbDrive { - get => ref _Handle.AsRef(Schema.GetOffset(0x80E2A7360E12679B)); + get => ref _Handle.AsRef(_FldbDriveOffset.Value); } + private static readonly Lazy _FldbOutputGainOffset = new(() => Schema.GetOffset(0x80E2A73667F97C23), LazyThreadSafetyMode.None); + public ref float FldbOutputGain { - get => ref _Handle.AsRef(Schema.GetOffset(0x80E2A73667F97C23)); + get => ref _Handle.AsRef(_FldbOutputGainOffset.Value); } + private static readonly Lazy _WetMixOffset = new(() => Schema.GetOffset(0x80E2A736D5453C15), LazyThreadSafetyMode.None); + public ref float WetMix { - get => ref _Handle.AsRef(Schema.GetOffset(0x80E2A736D5453C15)); + get => ref _Handle.AsRef(_WetMixOffset.Value); } + private static readonly Lazy _OversampleFactorOffset = new(() => Schema.GetOffset(0x80E2A736142D0AF2), LazyThreadSafetyMode.None); + public ref int OversampleFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0x80E2A736142D0AF2)); + get => ref _Handle.AsRef(_OversampleFactorOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixSubgraphSwitchDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixSubgraphSwitchDesc_tImpl.cs index 9829b7f50..10a4ef29b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixSubgraphSwitchDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixSubgraphSwitchDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class VMixSubgraphSwitchDesc_tImpl : SchemaClass, VMixSubgraphS public VMixSubgraphSwitchDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _InterpolationModeOffset = new(() => Schema.GetOffset(0x9671DF890C06348A), LazyThreadSafetyMode.None); + public ref VMixSubgraphSwitchInterpolationType_t InterpolationMode { - get => ref _Handle.AsRef(Schema.GetOffset(0x9671DF890C06348A)); + get => ref _Handle.AsRef(_InterpolationModeOffset.Value); } + private static readonly Lazy _OnlyTailsOnFadeOutOffset = new(() => Schema.GetOffset(0x9671DF89B74519D7), LazyThreadSafetyMode.None); + public ref bool OnlyTailsOnFadeOut { - get => ref _Handle.AsRef(Schema.GetOffset(0x9671DF89B74519D7)); + get => ref _Handle.AsRef(_OnlyTailsOnFadeOutOffset.Value); } + private static readonly Lazy _InterpolationTimeOffset = new(() => Schema.GetOffset(0x9671DF896D3B0FB6), LazyThreadSafetyMode.None); + public ref float InterpolationTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x9671DF896D3B0FB6)); + get => ref _Handle.AsRef(_InterpolationTimeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixUtilityDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixUtilityDesc_tImpl.cs index 800528d1a..278a75295 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixUtilityDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixUtilityDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class VMixUtilityDesc_tImpl : SchemaClass, VMixUtilityDesc_t { public VMixUtilityDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _OpOffset = new(() => Schema.GetOffset(0x9B3640C11384687E), LazyThreadSafetyMode.None); + public ref VMixChannelOperation_t Op { - get => ref _Handle.AsRef(Schema.GetOffset(0x9B3640C11384687E)); + get => ref _Handle.AsRef(_OpOffset.Value); } + private static readonly Lazy _InputPanOffset = new(() => Schema.GetOffset(0x9B3640C17E813E04), LazyThreadSafetyMode.None); + public ref float InputPan { - get => ref _Handle.AsRef(Schema.GetOffset(0x9B3640C17E813E04)); + get => ref _Handle.AsRef(_InputPanOffset.Value); } + private static readonly Lazy _OutputBalanceOffset = new(() => Schema.GetOffset(0x9B3640C1730ED266), LazyThreadSafetyMode.None); + public ref float OutputBalance { - get => ref _Handle.AsRef(Schema.GetOffset(0x9B3640C1730ED266)); + get => ref _Handle.AsRef(_OutputBalanceOffset.Value); } + private static readonly Lazy _FldbOutputGainOffset = new(() => Schema.GetOffset(0x9B3640C167F97C23), LazyThreadSafetyMode.None); + public ref float FldbOutputGain { - get => ref _Handle.AsRef(Schema.GetOffset(0x9B3640C167F97C23)); + get => ref _Handle.AsRef(_FldbOutputGainOffset.Value); } + private static readonly Lazy _BassMonoOffset = new(() => Schema.GetOffset(0x9B3640C1C65EDB7D), LazyThreadSafetyMode.None); + public ref bool BassMono { - get => ref _Handle.AsRef(Schema.GetOffset(0x9B3640C1C65EDB7D)); + get => ref _Handle.AsRef(_BassMonoOffset.Value); } + private static readonly Lazy _BassFreqOffset = new(() => Schema.GetOffset(0x9B3640C13E71CC5A), LazyThreadSafetyMode.None); + public ref float BassFreq { - get => ref _Handle.AsRef(Schema.GetOffset(0x9B3640C13E71CC5A)); + get => ref _Handle.AsRef(_BassFreqOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixVocoderDesc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixVocoderDesc_tImpl.cs index 4ea5ee8ed..3a06fb9c7 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixVocoderDesc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VMixVocoderDesc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,35 +17,55 @@ internal partial class VMixVocoderDesc_tImpl : SchemaClass, VMixVocoderDesc_t { public VMixVocoderDesc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BandCountOffset = new(() => Schema.GetOffset(0xFBAB3A2972E16EF9), LazyThreadSafetyMode.None); + public ref int BandCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xFBAB3A2972E16EF9)); + get => ref _Handle.AsRef(_BandCountOffset.Value); } + private static readonly Lazy _BandwidthOffset = new(() => Schema.GetOffset(0xFBAB3A29BB43932C), LazyThreadSafetyMode.None); + public ref float Bandwidth { - get => ref _Handle.AsRef(Schema.GetOffset(0xFBAB3A29BB43932C)); + get => ref _Handle.AsRef(_BandwidthOffset.Value); } + private static readonly Lazy _FldBModGainOffset = new(() => Schema.GetOffset(0xFBAB3A291EEAC180), LazyThreadSafetyMode.None); + public ref float FldBModGain { - get => ref _Handle.AsRef(Schema.GetOffset(0xFBAB3A291EEAC180)); + get => ref _Handle.AsRef(_FldBModGainOffset.Value); } + private static readonly Lazy _FreqRangeStartOffset = new(() => Schema.GetOffset(0xFBAB3A29B4752A4E), LazyThreadSafetyMode.None); + public ref float FreqRangeStart { - get => ref _Handle.AsRef(Schema.GetOffset(0xFBAB3A29B4752A4E)); + get => ref _Handle.AsRef(_FreqRangeStartOffset.Value); } + private static readonly Lazy _FreqRangeEndOffset = new(() => Schema.GetOffset(0xFBAB3A29884ECF5B), LazyThreadSafetyMode.None); + public ref float FreqRangeEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0xFBAB3A29884ECF5B)); + get => ref _Handle.AsRef(_FreqRangeEndOffset.Value); } + private static readonly Lazy _FldBUnvoicedGainOffset = new(() => Schema.GetOffset(0xFBAB3A29B45A3DEF), LazyThreadSafetyMode.None); + public ref float FldBUnvoicedGain { - get => ref _Handle.AsRef(Schema.GetOffset(0xFBAB3A29B45A3DEF)); + get => ref _Handle.AsRef(_FldBUnvoicedGainOffset.Value); } + private static readonly Lazy _AttackTimeMSOffset = new(() => Schema.GetOffset(0xFBAB3A29D4A28216), LazyThreadSafetyMode.None); + public ref float AttackTimeMS { - get => ref _Handle.AsRef(Schema.GetOffset(0xFBAB3A29D4A28216)); + get => ref _Handle.AsRef(_AttackTimeMSOffset.Value); } + private static readonly Lazy _ReleaseTimeMSOffset = new(() => Schema.GetOffset(0xFBAB3A29EBB62791), LazyThreadSafetyMode.None); + public ref float ReleaseTimeMS { - get => ref _Handle.AsRef(Schema.GetOffset(0xFBAB3A29EBB62791)); + get => ref _Handle.AsRef(_ReleaseTimeMSOffset.Value); } + private static readonly Lazy _DebugBandOffset = new(() => Schema.GetOffset(0xFBAB3A296E77C31B), LazyThreadSafetyMode.None); + public ref int DebugBand { - get => ref _Handle.AsRef(Schema.GetOffset(0xFBAB3A296E77C31B)); + get => ref _Handle.AsRef(_DebugBandOffset.Value); } + private static readonly Lazy _PeakModeOffset = new(() => Schema.GetOffset(0xFBAB3A2987DF35F9), LazyThreadSafetyMode.None); + public ref bool PeakMode { - get => ref _Handle.AsRef(Schema.GetOffset(0xFBAB3A2987DF35F9)); + get => ref _Handle.AsRef(_PeakModeOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXAggregateData_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXAggregateData_tImpl.cs index 21b1a9107..512486ead 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXAggregateData_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXAggregateData_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,63 +17,97 @@ internal partial class VPhysXAggregateData_tImpl : SchemaClass, VPhysXAggregateD public VPhysXAggregateData_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0xB689D5A1CE6E9C28), LazyThreadSafetyMode.None); + public ref ushort Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0xB689D5A1CE6E9C28)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _RefCounterOffset = new(() => Schema.GetOffset(0xB689D5A17E36A3B6), LazyThreadSafetyMode.None); + public ref ushort RefCounter { - get => ref _Handle.AsRef(Schema.GetOffset(0xB689D5A17E36A3B6)); + get => ref _Handle.AsRef(_RefCounterOffset.Value); } + private static readonly Lazy _BonesHashOffset = new(() => Schema.GetOffset(0xB689D5A191F01C74), LazyThreadSafetyMode.None); + public ref CUtlVector BonesHash { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB689D5A191F01C74)); + get => ref _Handle.AsRef>(_BonesHashOffset.Value); } + private static readonly Lazy _BoneNamesOffset = new(() => Schema.GetOffset(0xB689D5A13CC0D1ED), LazyThreadSafetyMode.None); + public ref CUtlVector BoneNames { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB689D5A13CC0D1ED)); + get => ref _Handle.AsRef>(_BoneNamesOffset.Value); } + private static readonly Lazy _IndexNamesOffset = new(() => Schema.GetOffset(0xB689D5A15B7383D9), LazyThreadSafetyMode.None); + public ref CUtlVector IndexNames { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB689D5A15B7383D9)); + get => ref _Handle.AsRef>(_IndexNamesOffset.Value); } + private static readonly Lazy _IndexHashOffset = new(() => Schema.GetOffset(0xB689D5A1FDBDCAEB), LazyThreadSafetyMode.None); + public ref CUtlVector IndexHash { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB689D5A1FDBDCAEB)); + get => ref _Handle.AsRef>(_IndexHashOffset.Value); } + private static readonly Lazy _BindPoseOffset = new(() => Schema.GetOffset(0xB689D5A1751196C3), LazyThreadSafetyMode.None); + public ref CUtlVector BindPose { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB689D5A1751196C3)); + get => ref _Handle.AsRef>(_BindPoseOffset.Value); } + private static readonly Lazy _PartsOffset = new(() => Schema.GetOffset(0xB689D5A1C7044545), LazyThreadSafetyMode.None); + public ref CUtlVector Parts { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB689D5A1C7044545)); + get => ref _Handle.AsRef>(_PartsOffset.Value); } + private static readonly Lazy _ShapeMarkupsOffset = new(() => Schema.GetOffset(0xB689D5A109755123), LazyThreadSafetyMode.None); + public ref CUtlVector ShapeMarkups { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB689D5A109755123)); + get => ref _Handle.AsRef>(_ShapeMarkupsOffset.Value); } + private static readonly Lazy _Constraints2Offset = new(() => Schema.GetOffset(0xB689D5A10539BEDB), LazyThreadSafetyMode.None); + public ref CUtlVector Constraints2 { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB689D5A10539BEDB)); + get => ref _Handle.AsRef>(_Constraints2Offset.Value); } + private static readonly Lazy _JointsOffset = new(() => Schema.GetOffset(0xB689D5A15E6E8FEC), LazyThreadSafetyMode.None); + public ref CUtlVector Joints { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB689D5A15E6E8FEC)); + get => ref _Handle.AsRef>(_JointsOffset.Value); } + private static readonly Lazy _FeModelOffset = new(() => Schema.GetOffset(0xB689D5A1299418A7), LazyThreadSafetyMode.None); + public PhysFeModelDesc_t? FeModel { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB689D5A1299418A7)); + var ptr = _Handle.Read(_FeModelOffset.Value); return ptr.IsValidPtr() ? new PhysFeModelDesc_tImpl(ptr) : null; } } + private static readonly Lazy _BoneParentsOffset = new(() => Schema.GetOffset(0xB689D5A171828F04), LazyThreadSafetyMode.None); + public ref CUtlVector BoneParents { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB689D5A171828F04)); + get => ref _Handle.AsRef>(_BoneParentsOffset.Value); } + private static readonly Lazy _SurfacePropertyHashesOffset = new(() => Schema.GetOffset(0xB689D5A16C35E0E5), LazyThreadSafetyMode.None); + public ref CUtlVector SurfacePropertyHashes { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB689D5A16C35E0E5)); + get => ref _Handle.AsRef>(_SurfacePropertyHashesOffset.Value); } + private static readonly Lazy _CollisionAttributesOffset = new(() => Schema.GetOffset(0xB689D5A1FA66F6C2), LazyThreadSafetyMode.None); + public ref CUtlVector CollisionAttributes { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB689D5A1FA66F6C2)); + get => ref _Handle.AsRef>(_CollisionAttributesOffset.Value); } + private static readonly Lazy _DebugPartNamesOffset = new(() => Schema.GetOffset(0xB689D5A174B4FFC7), LazyThreadSafetyMode.None); + public ref CUtlVector DebugPartNames { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB689D5A174B4FFC7)); + get => ref _Handle.AsRef>(_DebugPartNamesOffset.Value); } + private static readonly Lazy _EmbeddedKeyvaluesOffset = new(() => Schema.GetOffset(0xB689D5A1C004AF5C), LazyThreadSafetyMode.None); + public string EmbeddedKeyvalues { get { - var ptr = _Handle.Read(Schema.GetOffset(0xB689D5A1C004AF5C)); + var ptr = _Handle.Read(_EmbeddedKeyvaluesOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xB689D5A1C004AF5C, value); + set => Schema.SetString(_Handle, _EmbeddedKeyvaluesOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXBodyPart_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXBodyPart_tImpl.cs index 436345dbf..bc70b4634 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXBodyPart_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXBodyPart_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,41 +17,65 @@ internal partial class VPhysXBodyPart_tImpl : SchemaClass, VPhysXBodyPart_t { public VPhysXBodyPart_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x53DE59CDCE6E9C28), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x53DE59CDCE6E9C28)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _MassOffset = new(() => Schema.GetOffset(0x53DE59CDCD83D263), LazyThreadSafetyMode.None); + public ref float Mass { - get => ref _Handle.AsRef(Schema.GetOffset(0x53DE59CDCD83D263)); + get => ref _Handle.AsRef(_MassOffset.Value); } + private static readonly Lazy _RnShapeOffset = new(() => Schema.GetOffset(0x53DE59CDD69E7012), LazyThreadSafetyMode.None); + public VPhysics2ShapeDef_t RnShape { - get => new VPhysics2ShapeDef_tImpl(_Handle + Schema.GetOffset(0x53DE59CDD69E7012)); + get => new VPhysics2ShapeDef_tImpl(_Handle + _RnShapeOffset.Value); } + private static readonly Lazy _CollisionAttributeIndexOffset = new(() => Schema.GetOffset(0x53DE59CDC7B64DF7), LazyThreadSafetyMode.None); + public ref ushort CollisionAttributeIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x53DE59CDC7B64DF7)); + get => ref _Handle.AsRef(_CollisionAttributeIndexOffset.Value); } + private static readonly Lazy _ReservedOffset = new(() => Schema.GetOffset(0x53DE59CD94BD4B01), LazyThreadSafetyMode.None); + public ref ushort Reserved { - get => ref _Handle.AsRef(Schema.GetOffset(0x53DE59CD94BD4B01)); + get => ref _Handle.AsRef(_ReservedOffset.Value); } + private static readonly Lazy _InertiaScaleOffset = new(() => Schema.GetOffset(0x53DE59CD4E6CAB2F), LazyThreadSafetyMode.None); + public ref float InertiaScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x53DE59CD4E6CAB2F)); + get => ref _Handle.AsRef(_InertiaScaleOffset.Value); } + private static readonly Lazy _LinearDampingOffset = new(() => Schema.GetOffset(0x53DE59CD4E6B7F64), LazyThreadSafetyMode.None); + public ref float LinearDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0x53DE59CD4E6B7F64)); + get => ref _Handle.AsRef(_LinearDampingOffset.Value); } + private static readonly Lazy _AngularDampingOffset = new(() => Schema.GetOffset(0x53DE59CD0E32E897), LazyThreadSafetyMode.None); + public ref float AngularDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0x53DE59CD0E32E897)); + get => ref _Handle.AsRef(_AngularDampingOffset.Value); } + private static readonly Lazy _LinearDragOffset = new(() => Schema.GetOffset(0x53DE59CDB3D686BC), LazyThreadSafetyMode.None); + public ref float LinearDrag { - get => ref _Handle.AsRef(Schema.GetOffset(0x53DE59CDB3D686BC)); + get => ref _Handle.AsRef(_LinearDragOffset.Value); } + private static readonly Lazy _AngularDragOffset = new(() => Schema.GetOffset(0x53DE59CDDCE9A7D1), LazyThreadSafetyMode.None); + public ref float AngularDrag { - get => ref _Handle.AsRef(Schema.GetOffset(0x53DE59CDDCE9A7D1)); + get => ref _Handle.AsRef(_AngularDragOffset.Value); } + private static readonly Lazy _OverrideMassCenterOffset = new(() => Schema.GetOffset(0x53DE59CD19E47DF8), LazyThreadSafetyMode.None); + public ref bool OverrideMassCenter { - get => ref _Handle.AsRef(Schema.GetOffset(0x53DE59CD19E47DF8)); + get => ref _Handle.AsRef(_OverrideMassCenterOffset.Value); } + private static readonly Lazy _MassCenterOverrideOffset = new(() => Schema.GetOffset(0x53DE59CD7249FAE4), LazyThreadSafetyMode.None); + public ref Vector MassCenterOverride { - get => ref _Handle.AsRef(Schema.GetOffset(0x53DE59CD7249FAE4)); + get => ref _Handle.AsRef(_MassCenterOverrideOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXCollisionAttributes_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXCollisionAttributes_tImpl.cs index 0265cf954..cf8c58e9b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXCollisionAttributes_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXCollisionAttributes_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,33 +17,49 @@ internal partial class VPhysXCollisionAttributes_tImpl : SchemaClass, VPhysXColl public VPhysXCollisionAttributes_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CollisionGroupOffset = new(() => Schema.GetOffset(0xBD3263AF91BF7016), LazyThreadSafetyMode.None); + public ref uint CollisionGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0xBD3263AF91BF7016)); + get => ref _Handle.AsRef(_CollisionGroupOffset.Value); } + private static readonly Lazy _InteractAsOffset = new(() => Schema.GetOffset(0xBD3263AF4FBB627B), LazyThreadSafetyMode.None); + public ref CUtlVector InteractAs { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBD3263AF4FBB627B)); + get => ref _Handle.AsRef>(_InteractAsOffset.Value); } + private static readonly Lazy _InteractWithOffset = new(() => Schema.GetOffset(0xBD3263AFAD426A97), LazyThreadSafetyMode.None); + public ref CUtlVector InteractWith { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBD3263AFAD426A97)); + get => ref _Handle.AsRef>(_InteractWithOffset.Value); } + private static readonly Lazy _InteractExcludeOffset = new(() => Schema.GetOffset(0xBD3263AFC5ECE843), LazyThreadSafetyMode.None); + public ref CUtlVector InteractExclude { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBD3263AFC5ECE843)); + get => ref _Handle.AsRef>(_InteractExcludeOffset.Value); } + private static readonly Lazy _CollisionGroupStringOffset = new(() => Schema.GetOffset(0xBD3263AFCF0517E7), LazyThreadSafetyMode.None); + public string CollisionGroupString { get { - var ptr = _Handle.Read(Schema.GetOffset(0xBD3263AFCF0517E7)); + var ptr = _Handle.Read(_CollisionGroupStringOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xBD3263AFCF0517E7, value); + set => Schema.SetString(_Handle, _CollisionGroupStringOffset.Value, value); } + private static readonly Lazy _InteractAsStringsOffset = new(() => Schema.GetOffset(0xBD3263AF7A4D07B7), LazyThreadSafetyMode.None); + public ref CUtlVector InteractAsStrings { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBD3263AF7A4D07B7)); + get => ref _Handle.AsRef>(_InteractAsStringsOffset.Value); } + private static readonly Lazy _InteractWithStringsOffset = new(() => Schema.GetOffset(0xBD3263AF691AB483), LazyThreadSafetyMode.None); + public ref CUtlVector InteractWithStrings { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBD3263AF691AB483)); + get => ref _Handle.AsRef>(_InteractWithStringsOffset.Value); } + private static readonly Lazy _InteractExcludeStringsOffset = new(() => Schema.GetOffset(0xBD3263AF97DC23CF), LazyThreadSafetyMode.None); + public ref CUtlVector InteractExcludeStrings { - get => ref _Handle.AsRef>(Schema.GetOffset(0xBD3263AF97DC23CF)); + get => ref _Handle.AsRef>(_InteractExcludeStringsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXConstraint2_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXConstraint2_tImpl.cs index 3a185e9a6..030ee2090 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXConstraint2_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXConstraint2_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class VPhysXConstraint2_tImpl : SchemaClass, VPhysXConstraint2_ public VPhysXConstraint2_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x6FB758FDCE6E9C28), LazyThreadSafetyMode.None); + public ref uint Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x6FB758FDCE6E9C28)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _ParentOffset = new(() => Schema.GetOffset(0x6FB758FD0AABB9D1), LazyThreadSafetyMode.None); + public ref ushort Parent { - get => ref _Handle.AsRef(Schema.GetOffset(0x6FB758FD0AABB9D1)); + get => ref _Handle.AsRef(_ParentOffset.Value); } + private static readonly Lazy _ChildOffset = new(() => Schema.GetOffset(0x6FB758FDFE653481), LazyThreadSafetyMode.None); + public ref ushort Child { - get => ref _Handle.AsRef(Schema.GetOffset(0x6FB758FDFE653481)); + get => ref _Handle.AsRef(_ChildOffset.Value); } + private static readonly Lazy _ParamsOffset = new(() => Schema.GetOffset(0x6FB758FD640EA8F3), LazyThreadSafetyMode.None); + public VPhysXConstraintParams_t Params { - get => new VPhysXConstraintParams_tImpl(_Handle + Schema.GetOffset(0x6FB758FD640EA8F3)); + get => new VPhysXConstraintParams_tImpl(_Handle + _ParamsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXConstraintParams_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXConstraintParams_tImpl.cs index 53b94e083..d9d9e6fd8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXConstraintParams_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXConstraintParams_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,143 +17,233 @@ internal partial class VPhysXConstraintParams_tImpl : SchemaClass, VPhysXConstra public VPhysXConstraintParams_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0xF2BDF6AD18853D59), LazyThreadSafetyMode.None); + public ref byte Type { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD18853D59)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _TranslateMotionOffset = new(() => Schema.GetOffset(0xF2BDF6AD2A710A0B), LazyThreadSafetyMode.None); + public ref byte TranslateMotion { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD2A710A0B)); + get => ref _Handle.AsRef(_TranslateMotionOffset.Value); } + private static readonly Lazy _RotateMotionOffset = new(() => Schema.GetOffset(0xF2BDF6AD5EF89394), LazyThreadSafetyMode.None); + public ref byte RotateMotion { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD5EF89394)); + get => ref _Handle.AsRef(_RotateMotionOffset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0xF2BDF6ADCE6E9C28), LazyThreadSafetyMode.None); + public ref byte Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6ADCE6E9C28)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } public ISchemaFixedArray Anchor { get => new SchemaFixedArray(_Handle, 0xF2BDF6AD23E10E54, 2, 12, 4); } + private static readonly Lazy _AxesOffset = new(() => Schema.GetOffset(0xF2BDF6AD23115F58), LazyThreadSafetyMode.None); + public SchemaUntypedField Axes { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xF2BDF6AD23115F58)); + get => new SchemaUntypedField(_Handle + _AxesOffset.Value); } + private static readonly Lazy _MaxForceOffset = new(() => Schema.GetOffset(0xF2BDF6ADFA9D37B8), LazyThreadSafetyMode.None); + public ref float MaxForce { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6ADFA9D37B8)); + get => ref _Handle.AsRef(_MaxForceOffset.Value); } + private static readonly Lazy _MaxTorqueOffset = new(() => Schema.GetOffset(0xF2BDF6AD7880BF37), LazyThreadSafetyMode.None); + public ref float MaxTorque { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD7880BF37)); + get => ref _Handle.AsRef(_MaxTorqueOffset.Value); } + private static readonly Lazy _LinearLimitValueOffset = new(() => Schema.GetOffset(0xF2BDF6ADB813ABE0), LazyThreadSafetyMode.None); + public ref float LinearLimitValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6ADB813ABE0)); + get => ref _Handle.AsRef(_LinearLimitValueOffset.Value); } + private static readonly Lazy _LinearLimitRestitutionOffset = new(() => Schema.GetOffset(0xF2BDF6AD4EB00271), LazyThreadSafetyMode.None); + public ref float LinearLimitRestitution { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD4EB00271)); + get => ref _Handle.AsRef(_LinearLimitRestitutionOffset.Value); } + private static readonly Lazy _LinearLimitSpringOffset = new(() => Schema.GetOffset(0xF2BDF6ADD69EE39A), LazyThreadSafetyMode.None); + public ref float LinearLimitSpring { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6ADD69EE39A)); + get => ref _Handle.AsRef(_LinearLimitSpringOffset.Value); } + private static readonly Lazy _LinearLimitDampingOffset = new(() => Schema.GetOffset(0xF2BDF6AD0F807887), LazyThreadSafetyMode.None); + public ref float LinearLimitDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD0F807887)); + get => ref _Handle.AsRef(_LinearLimitDampingOffset.Value); } + private static readonly Lazy _TwistLowLimitValueOffset = new(() => Schema.GetOffset(0xF2BDF6AD2D2A931E), LazyThreadSafetyMode.None); + public ref float TwistLowLimitValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD2D2A931E)); + get => ref _Handle.AsRef(_TwistLowLimitValueOffset.Value); } + private static readonly Lazy _TwistLowLimitRestitutionOffset = new(() => Schema.GetOffset(0xF2BDF6AD58A6205B), LazyThreadSafetyMode.None); + public ref float TwistLowLimitRestitution { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD58A6205B)); + get => ref _Handle.AsRef(_TwistLowLimitRestitutionOffset.Value); } + private static readonly Lazy _TwistLowLimitSpringOffset = new(() => Schema.GetOffset(0xF2BDF6ADFD3EA378), LazyThreadSafetyMode.None); + public ref float TwistLowLimitSpring { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6ADFD3EA378)); + get => ref _Handle.AsRef(_TwistLowLimitSpringOffset.Value); } + private static readonly Lazy _TwistLowLimitDampingOffset = new(() => Schema.GetOffset(0xF2BDF6AD1C805229), LazyThreadSafetyMode.None); + public ref float TwistLowLimitDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD1C805229)); + get => ref _Handle.AsRef(_TwistLowLimitDampingOffset.Value); } + private static readonly Lazy _TwistHighLimitValueOffset = new(() => Schema.GetOffset(0xF2BDF6ADE29F5844), LazyThreadSafetyMode.None); + public ref float TwistHighLimitValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6ADE29F5844)); + get => ref _Handle.AsRef(_TwistHighLimitValueOffset.Value); } + private static readonly Lazy _TwistHighLimitRestitutionOffset = new(() => Schema.GetOffset(0xF2BDF6AD6CDC5C9D), LazyThreadSafetyMode.None); + public ref float TwistHighLimitRestitution { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD6CDC5C9D)); + get => ref _Handle.AsRef(_TwistHighLimitRestitutionOffset.Value); } + private static readonly Lazy _TwistHighLimitSpringOffset = new(() => Schema.GetOffset(0xF2BDF6AD572B2446), LazyThreadSafetyMode.None); + public ref float TwistHighLimitSpring { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD572B2446)); + get => ref _Handle.AsRef(_TwistHighLimitSpringOffset.Value); } + private static readonly Lazy _TwistHighLimitDampingOffset = new(() => Schema.GetOffset(0xF2BDF6ADA25A11AB), LazyThreadSafetyMode.None); + public ref float TwistHighLimitDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6ADA25A11AB)); + get => ref _Handle.AsRef(_TwistHighLimitDampingOffset.Value); } + private static readonly Lazy _Swing1LimitValueOffset = new(() => Schema.GetOffset(0xF2BDF6AD895D1418), LazyThreadSafetyMode.None); + public ref float Swing1LimitValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD895D1418)); + get => ref _Handle.AsRef(_Swing1LimitValueOffset.Value); } + private static readonly Lazy _Swing1LimitRestitutionOffset = new(() => Schema.GetOffset(0xF2BDF6ADEB0D3459), LazyThreadSafetyMode.None); + public ref float Swing1LimitRestitution { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6ADEB0D3459)); + get => ref _Handle.AsRef(_Swing1LimitRestitutionOffset.Value); } + private static readonly Lazy _Swing1LimitSpringOffset = new(() => Schema.GetOffset(0xF2BDF6ADE1EEAF92), LazyThreadSafetyMode.None); + public ref float Swing1LimitSpring { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6ADE1EEAF92)); + get => ref _Handle.AsRef(_Swing1LimitSpringOffset.Value); } + private static readonly Lazy _Swing1LimitDampingOffset = new(() => Schema.GetOffset(0xF2BDF6AD610E7A3F), LazyThreadSafetyMode.None); + public ref float Swing1LimitDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD610E7A3F)); + get => ref _Handle.AsRef(_Swing1LimitDampingOffset.Value); } + private static readonly Lazy _Swing2LimitValueOffset = new(() => Schema.GetOffset(0xF2BDF6AD09643191), LazyThreadSafetyMode.None); + public ref float Swing2LimitValue { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD09643191)); + get => ref _Handle.AsRef(_Swing2LimitValueOffset.Value); } + private static readonly Lazy _Swing2LimitRestitutionOffset = new(() => Schema.GetOffset(0xF2BDF6ADFA0A151C), LazyThreadSafetyMode.None); + public ref float Swing2LimitRestitution { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6ADFA0A151C)); + get => ref _Handle.AsRef(_Swing2LimitRestitutionOffset.Value); } + private static readonly Lazy _Swing2LimitSpringOffset = new(() => Schema.GetOffset(0xF2BDF6AD9258456D), LazyThreadSafetyMode.None); + public ref float Swing2LimitSpring { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD9258456D)); + get => ref _Handle.AsRef(_Swing2LimitSpringOffset.Value); } + private static readonly Lazy _Swing2LimitDampingOffset = new(() => Schema.GetOffset(0xF2BDF6AD80E51186), LazyThreadSafetyMode.None); + public ref float Swing2LimitDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD80E51186)); + get => ref _Handle.AsRef(_Swing2LimitDampingOffset.Value); } + private static readonly Lazy _GoalPositionOffset = new(() => Schema.GetOffset(0xF2BDF6AD02ACD9A1), LazyThreadSafetyMode.None); + public ref Vector GoalPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD02ACD9A1)); + get => ref _Handle.AsRef(_GoalPositionOffset.Value); } + private static readonly Lazy _GoalOrientationOffset = new(() => Schema.GetOffset(0xF2BDF6ADA64626A8), LazyThreadSafetyMode.None); + public SchemaUntypedField GoalOrientation { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0xF2BDF6ADA64626A8)); + get => new SchemaUntypedField(_Handle + _GoalOrientationOffset.Value); } + private static readonly Lazy _GoalAngularVelocityOffset = new(() => Schema.GetOffset(0xF2BDF6AD3FA6751F), LazyThreadSafetyMode.None); + public ref Vector GoalAngularVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD3FA6751F)); + get => ref _Handle.AsRef(_GoalAngularVelocityOffset.Value); } + private static readonly Lazy _DriveSpringXOffset = new(() => Schema.GetOffset(0xF2BDF6ADC4001382), LazyThreadSafetyMode.None); + public ref float DriveSpringX { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6ADC4001382)); + get => ref _Handle.AsRef(_DriveSpringXOffset.Value); } + private static readonly Lazy _DriveSpringYOffset = new(() => Schema.GetOffset(0xF2BDF6ADC5001515), LazyThreadSafetyMode.None); + public ref float DriveSpringY { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6ADC5001515)); + get => ref _Handle.AsRef(_DriveSpringYOffset.Value); } + private static readonly Lazy _DriveSpringZOffset = new(() => Schema.GetOffset(0xF2BDF6ADC200105C), LazyThreadSafetyMode.None); + public ref float DriveSpringZ { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6ADC200105C)); + get => ref _Handle.AsRef(_DriveSpringZOffset.Value); } + private static readonly Lazy _DriveDampingXOffset = new(() => Schema.GetOffset(0xF2BDF6AD65958311), LazyThreadSafetyMode.None); + public ref float DriveDampingX { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD65958311)); + get => ref _Handle.AsRef(_DriveDampingXOffset.Value); } + private static readonly Lazy _DriveDampingYOffset = new(() => Schema.GetOffset(0xF2BDF6AD6495817E), LazyThreadSafetyMode.None); + public ref float DriveDampingY { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD6495817E)); + get => ref _Handle.AsRef(_DriveDampingYOffset.Value); } + private static readonly Lazy _DriveDampingZOffset = new(() => Schema.GetOffset(0xF2BDF6AD63957FEB), LazyThreadSafetyMode.None); + public ref float DriveDampingZ { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD63957FEB)); + get => ref _Handle.AsRef(_DriveDampingZOffset.Value); } + private static readonly Lazy _DriveSpringTwistOffset = new(() => Schema.GetOffset(0xF2BDF6AD779F67D1), LazyThreadSafetyMode.None); + public ref float DriveSpringTwist { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD779F67D1)); + get => ref _Handle.AsRef(_DriveSpringTwistOffset.Value); } + private static readonly Lazy _DriveSpringSwingOffset = new(() => Schema.GetOffset(0xF2BDF6ADE2653378), LazyThreadSafetyMode.None); + public ref float DriveSpringSwing { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6ADE2653378)); + get => ref _Handle.AsRef(_DriveSpringSwingOffset.Value); } + private static readonly Lazy _DriveSpringSlerpOffset = new(() => Schema.GetOffset(0xF2BDF6AD8422D78E), LazyThreadSafetyMode.None); + public ref float DriveSpringSlerp { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD8422D78E)); + get => ref _Handle.AsRef(_DriveSpringSlerpOffset.Value); } + private static readonly Lazy _DriveDampingTwistOffset = new(() => Schema.GetOffset(0xF2BDF6AD013F8FEA), LazyThreadSafetyMode.None); + public ref float DriveDampingTwist { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD013F8FEA)); + get => ref _Handle.AsRef(_DriveDampingTwistOffset.Value); } + private static readonly Lazy _DriveDampingSwingOffset = new(() => Schema.GetOffset(0xF2BDF6AD948D0F6B), LazyThreadSafetyMode.None); + public ref float DriveDampingSwing { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD948D0F6B)); + get => ref _Handle.AsRef(_DriveDampingSwingOffset.Value); } + private static readonly Lazy _DriveDampingSlerpOffset = new(() => Schema.GetOffset(0xF2BDF6ADDDD15859), LazyThreadSafetyMode.None); + public ref float DriveDampingSlerp { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6ADDDD15859)); + get => ref _Handle.AsRef(_DriveDampingSlerpOffset.Value); } + private static readonly Lazy _SolverIterationCountOffset = new(() => Schema.GetOffset(0xF2BDF6ADCB9C71C4), LazyThreadSafetyMode.None); + public ref int SolverIterationCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6ADCB9C71C4)); + get => ref _Handle.AsRef(_SolverIterationCountOffset.Value); } + private static readonly Lazy _ProjectionLinearToleranceOffset = new(() => Schema.GetOffset(0xF2BDF6AD644662E4), LazyThreadSafetyMode.None); + public ref float ProjectionLinearTolerance { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD644662E4)); + get => ref _Handle.AsRef(_ProjectionLinearToleranceOffset.Value); } + private static readonly Lazy _ProjectionAngularToleranceOffset = new(() => Schema.GetOffset(0xF2BDF6AD95309A51), LazyThreadSafetyMode.None); + public ref float ProjectionAngularTolerance { - get => ref _Handle.AsRef(Schema.GetOffset(0xF2BDF6AD95309A51)); + get => ref _Handle.AsRef(_ProjectionAngularToleranceOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXJoint_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXJoint_tImpl.cs index 8f00f58d2..992589aa3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXJoint_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXJoint_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,99 +17,159 @@ internal partial class VPhysXJoint_tImpl : SchemaClass, VPhysXJoint_t { public VPhysXJoint_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x336EF6EE18853D59), LazyThreadSafetyMode.None); + public ref ushort Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EE18853D59)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _Body1Offset = new(() => Schema.GetOffset(0x336EF6EEAFA36950), LazyThreadSafetyMode.None); + public ref ushort Body1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EEAFA36950)); + get => ref _Handle.AsRef(_Body1Offset.Value); } + private static readonly Lazy _Body2Offset = new(() => Schema.GetOffset(0x336EF6EEB2A36E09), LazyThreadSafetyMode.None); + public ref ushort Body2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EEB2A36E09)); + get => ref _Handle.AsRef(_Body2Offset.Value); } + private static readonly Lazy _FlagsOffset = new(() => Schema.GetOffset(0x336EF6EECE6E9C28), LazyThreadSafetyMode.None); + public ref ushort Flags { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EECE6E9C28)); + get => ref _Handle.AsRef(_FlagsOffset.Value); } + private static readonly Lazy _Frame1Offset = new(() => Schema.GetOffset(0x336EF6EEAC118935), LazyThreadSafetyMode.None); + public ref CTransform Frame1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EEAC118935)); + get => ref _Handle.AsRef(_Frame1Offset.Value); } + private static readonly Lazy _Frame2Offset = new(() => Schema.GetOffset(0x336EF6EEA911847C), LazyThreadSafetyMode.None); + public ref CTransform Frame2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EEA911847C)); + get => ref _Handle.AsRef(_Frame2Offset.Value); } + private static readonly Lazy _EnableCollisionOffset = new(() => Schema.GetOffset(0x336EF6EE1E5412CE), LazyThreadSafetyMode.None); + public ref bool EnableCollision { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EE1E5412CE)); + get => ref _Handle.AsRef(_EnableCollisionOffset.Value); } + private static readonly Lazy _IsLinearConstraintDisabledOffset = new(() => Schema.GetOffset(0x336EF6EE83052497), LazyThreadSafetyMode.None); + public ref bool IsLinearConstraintDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EE83052497)); + get => ref _Handle.AsRef(_IsLinearConstraintDisabledOffset.Value); } + private static readonly Lazy _IsAngularConstraintDisabledOffset = new(() => Schema.GetOffset(0x336EF6EE9A8810AE), LazyThreadSafetyMode.None); + public ref bool IsAngularConstraintDisabled { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EE9A8810AE)); + get => ref _Handle.AsRef(_IsAngularConstraintDisabledOffset.Value); } + private static readonly Lazy _EnableLinearLimitOffset = new(() => Schema.GetOffset(0x336EF6EE706DAE52), LazyThreadSafetyMode.None); + public ref bool EnableLinearLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EE706DAE52)); + get => ref _Handle.AsRef(_EnableLinearLimitOffset.Value); } + private static readonly Lazy _LinearLimitOffset = new(() => Schema.GetOffset(0x336EF6EE6B07DCE3), LazyThreadSafetyMode.None); + public VPhysXRange_t LinearLimit { - get => new VPhysXRange_tImpl(_Handle + Schema.GetOffset(0x336EF6EE6B07DCE3)); + get => new VPhysXRange_tImpl(_Handle + _LinearLimitOffset.Value); } + private static readonly Lazy _EnableLinearMotorOffset = new(() => Schema.GetOffset(0x336EF6EE97738F64), LazyThreadSafetyMode.None); + public ref bool EnableLinearMotor { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EE97738F64)); + get => ref _Handle.AsRef(_EnableLinearMotorOffset.Value); } + private static readonly Lazy _LinearTargetVelocityOffset = new(() => Schema.GetOffset(0x336EF6EE73CF8AE2), LazyThreadSafetyMode.None); + public ref Vector LinearTargetVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EE73CF8AE2)); + get => ref _Handle.AsRef(_LinearTargetVelocityOffset.Value); } + private static readonly Lazy _MaxForceOffset = new(() => Schema.GetOffset(0x336EF6EEB637FDD2), LazyThreadSafetyMode.None); + public ref float MaxForce { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EEB637FDD2)); + get => ref _Handle.AsRef(_MaxForceOffset.Value); } + private static readonly Lazy _EnableSwingLimitOffset = new(() => Schema.GetOffset(0x336EF6EEDADAC14B), LazyThreadSafetyMode.None); + public ref bool EnableSwingLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EEDADAC14B)); + get => ref _Handle.AsRef(_EnableSwingLimitOffset.Value); } + private static readonly Lazy _SwingLimitOffset = new(() => Schema.GetOffset(0x336EF6EEB5B3FDD8), LazyThreadSafetyMode.None); + public VPhysXRange_t SwingLimit { - get => new VPhysXRange_tImpl(_Handle + Schema.GetOffset(0x336EF6EEB5B3FDD8)); + get => new VPhysXRange_tImpl(_Handle + _SwingLimitOffset.Value); } + private static readonly Lazy _EnableTwistLimitOffset = new(() => Schema.GetOffset(0x336EF6EE7DBEA570), LazyThreadSafetyMode.None); + public ref bool EnableTwistLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EE7DBEA570)); + get => ref _Handle.AsRef(_EnableTwistLimitOffset.Value); } + private static readonly Lazy _TwistLimitOffset = new(() => Schema.GetOffset(0x336EF6EE42713723), LazyThreadSafetyMode.None); + public VPhysXRange_t TwistLimit { - get => new VPhysXRange_tImpl(_Handle + Schema.GetOffset(0x336EF6EE42713723)); + get => new VPhysXRange_tImpl(_Handle + _TwistLimitOffset.Value); } + private static readonly Lazy _EnableAngularMotorOffset = new(() => Schema.GetOffset(0x336EF6EEA68A4ADD), LazyThreadSafetyMode.None); + public ref bool EnableAngularMotor { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EEA68A4ADD)); + get => ref _Handle.AsRef(_EnableAngularMotorOffset.Value); } + private static readonly Lazy _AngularTargetVelocityOffset = new(() => Schema.GetOffset(0x336EF6EE9FAD55DB), LazyThreadSafetyMode.None); + public ref Vector AngularTargetVelocity { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EE9FAD55DB)); + get => ref _Handle.AsRef(_AngularTargetVelocityOffset.Value); } + private static readonly Lazy _MaxTorqueOffset = new(() => Schema.GetOffset(0x336EF6EE45444085), LazyThreadSafetyMode.None); + public ref float MaxTorque { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EE45444085)); + get => ref _Handle.AsRef(_MaxTorqueOffset.Value); } + private static readonly Lazy _LinearFrequencyOffset = new(() => Schema.GetOffset(0x336EF6EE2FE6B034), LazyThreadSafetyMode.None); + public ref float LinearFrequency { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EE2FE6B034)); + get => ref _Handle.AsRef(_LinearFrequencyOffset.Value); } + private static readonly Lazy _LinearDampingRatioOffset = new(() => Schema.GetOffset(0x336EF6EE82438FAF), LazyThreadSafetyMode.None); + public ref float LinearDampingRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EE82438FAF)); + get => ref _Handle.AsRef(_LinearDampingRatioOffset.Value); } + private static readonly Lazy _AngularFrequencyOffset = new(() => Schema.GetOffset(0x336EF6EE36D56C7B), LazyThreadSafetyMode.None); + public ref float AngularFrequency { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EE36D56C7B)); + get => ref _Handle.AsRef(_AngularFrequencyOffset.Value); } + private static readonly Lazy _AngularDampingRatioOffset = new(() => Schema.GetOffset(0x336EF6EE689E74E2), LazyThreadSafetyMode.None); + public ref float AngularDampingRatio { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EE689E74E2)); + get => ref _Handle.AsRef(_AngularDampingRatioOffset.Value); } + private static readonly Lazy _FrictionOffset = new(() => Schema.GetOffset(0x336EF6EE6F5FEBA1), LazyThreadSafetyMode.None); + public ref float Friction { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EE6F5FEBA1)); + get => ref _Handle.AsRef(_FrictionOffset.Value); } + private static readonly Lazy _ElasticityOffset = new(() => Schema.GetOffset(0x336EF6EE4EC38DF6), LazyThreadSafetyMode.None); + public ref float Elasticity { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EE4EC38DF6)); + get => ref _Handle.AsRef(_ElasticityOffset.Value); } + private static readonly Lazy _ElasticDampingOffset = new(() => Schema.GetOffset(0x336EF6EE66E6B750), LazyThreadSafetyMode.None); + public ref float ElasticDamping { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EE66E6B750)); + get => ref _Handle.AsRef(_ElasticDampingOffset.Value); } + private static readonly Lazy _PlasticityOffset = new(() => Schema.GetOffset(0x336EF6EE5843D1D7), LazyThreadSafetyMode.None); + public ref float Plasticity { - get => ref _Handle.AsRef(Schema.GetOffset(0x336EF6EE5843D1D7)); + get => ref _Handle.AsRef(_PlasticityOffset.Value); } + private static readonly Lazy _TagOffset = new(() => Schema.GetOffset(0x336EF6EE218D8313), LazyThreadSafetyMode.None); + public string Tag { get { - var ptr = _Handle.Read(Schema.GetOffset(0x336EF6EE218D8313)); + var ptr = _Handle.Read(_TagOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x336EF6EE218D8313, value); + set => Schema.SetString(_Handle, _TagOffset.Value, value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXRange_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXRange_tImpl.cs index e8143bfad..d25a53b2d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXRange_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysXRange_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class VPhysXRange_tImpl : SchemaClass, VPhysXRange_t { public VPhysXRange_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinOffset = new(() => Schema.GetOffset(0x7A251AB33B1A5649), LazyThreadSafetyMode.None); + public ref float Min { - get => ref _Handle.AsRef(Schema.GetOffset(0x7A251AB33B1A5649)); + get => ref _Handle.AsRef(_MinOffset.Value); } + private static readonly Lazy _MaxOffset = new(() => Schema.GetOffset(0x7A251AB32D06B887), LazyThreadSafetyMode.None); + public ref float Max { - get => ref _Handle.AsRef(Schema.GetOffset(0x7A251AB32D06B887)); + get => ref _Handle.AsRef(_MaxOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysics2ShapeDef_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysics2ShapeDef_tImpl.cs index d325df25d..b2fc2c71f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysics2ShapeDef_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysics2ShapeDef_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class VPhysics2ShapeDef_tImpl : SchemaClass, VPhysics2ShapeDef_ public VPhysics2ShapeDef_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SpheresOffset = new(() => Schema.GetOffset(0xB5A68CEBBFDA8091), LazyThreadSafetyMode.None); + public ref CUtlVector Spheres { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB5A68CEBBFDA8091)); + get => ref _Handle.AsRef>(_SpheresOffset.Value); } + private static readonly Lazy _CapsulesOffset = new(() => Schema.GetOffset(0xB5A68CEBF8737C4D), LazyThreadSafetyMode.None); + public ref CUtlVector Capsules { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB5A68CEBF8737C4D)); + get => ref _Handle.AsRef>(_CapsulesOffset.Value); } + private static readonly Lazy _HullsOffset = new(() => Schema.GetOffset(0xB5A68CEB31F7453F), LazyThreadSafetyMode.None); + public ref CUtlVector Hulls { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB5A68CEB31F7453F)); + get => ref _Handle.AsRef>(_HullsOffset.Value); } + private static readonly Lazy _MeshesOffset = new(() => Schema.GetOffset(0xB5A68CEBC0F01FD8), LazyThreadSafetyMode.None); + public ref CUtlVector Meshes { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB5A68CEBC0F01FD8)); + get => ref _Handle.AsRef>(_MeshesOffset.Value); } + private static readonly Lazy _CollisionAttributeIndicesOffset = new(() => Schema.GetOffset(0xB5A68CEB86453EB2), LazyThreadSafetyMode.None); + public ref CUtlVector CollisionAttributeIndices { - get => ref _Handle.AsRef>(Schema.GetOffset(0xB5A68CEB86453EB2)); + get => ref _Handle.AsRef>(_CollisionAttributeIndicesOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysicsCollisionAttribute_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysicsCollisionAttribute_tImpl.cs index b8bd92448..bc0cdb04d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysicsCollisionAttribute_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VPhysicsCollisionAttribute_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,45 @@ internal partial class VPhysicsCollisionAttribute_tImpl : SchemaClass, VPhysicsC public VPhysicsCollisionAttribute_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _InteractsAsOffset = new(() => Schema.GetOffset(0x7E9FC931062B2708), LazyThreadSafetyMode.None); + public ref ulong InteractsAs { - get => ref _Handle.AsRef(Schema.GetOffset(0x7E9FC931062B2708)); + get => ref _Handle.AsRef(_InteractsAsOffset.Value); } + private static readonly Lazy _InteractsWithOffset = new(() => Schema.GetOffset(0x7E9FC93139179720), LazyThreadSafetyMode.None); + public ref ulong InteractsWith { - get => ref _Handle.AsRef(Schema.GetOffset(0x7E9FC93139179720)); + get => ref _Handle.AsRef(_InteractsWithOffset.Value); } + private static readonly Lazy _InteractsExcludeOffset = new(() => Schema.GetOffset(0x7E9FC9314D765732), LazyThreadSafetyMode.None); + public ref ulong InteractsExclude { - get => ref _Handle.AsRef(Schema.GetOffset(0x7E9FC9314D765732)); + get => ref _Handle.AsRef(_InteractsExcludeOffset.Value); } + private static readonly Lazy _EntityIdOffset = new(() => Schema.GetOffset(0x7E9FC9312E71588B), LazyThreadSafetyMode.None); + public ref uint EntityId { - get => ref _Handle.AsRef(Schema.GetOffset(0x7E9FC9312E71588B)); + get => ref _Handle.AsRef(_EntityIdOffset.Value); } + private static readonly Lazy _OwnerIdOffset = new(() => Schema.GetOffset(0x7E9FC931DD9F9E45), LazyThreadSafetyMode.None); + public ref uint OwnerId { - get => ref _Handle.AsRef(Schema.GetOffset(0x7E9FC931DD9F9E45)); + get => ref _Handle.AsRef(_OwnerIdOffset.Value); } + private static readonly Lazy _HierarchyIdOffset = new(() => Schema.GetOffset(0x7E9FC931E2479899), LazyThreadSafetyMode.None); + public ref ushort HierarchyId { - get => ref _Handle.AsRef(Schema.GetOffset(0x7E9FC931E2479899)); + get => ref _Handle.AsRef(_HierarchyIdOffset.Value); } + private static readonly Lazy _CollisionGroupOffset = new(() => Schema.GetOffset(0x7E9FC9310AC0C752), LazyThreadSafetyMode.None); + public ref byte CollisionGroup { - get => ref _Handle.AsRef(Schema.GetOffset(0x7E9FC9310AC0C752)); + get => ref _Handle.AsRef(_CollisionGroupOffset.Value); } + private static readonly Lazy _CollisionFunctionMaskOffset = new(() => Schema.GetOffset(0x7E9FC931FC7E6DAF), LazyThreadSafetyMode.None); + public ref byte CollisionFunctionMask { - get => ref _Handle.AsRef(Schema.GetOffset(0x7E9FC931FC7E6DAF)); + get => ref _Handle.AsRef(_CollisionFunctionMaskOffset.Value); } public void InteractsAsUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VariableInfo_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VariableInfo_tImpl.cs index cf0225757..19064f71c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VariableInfo_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VariableInfo_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,27 +17,39 @@ internal partial class VariableInfo_tImpl : SchemaClass, VariableInfo_t { public VariableInfo_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xED8F756E4D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0xED8F756E4D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xED8F756E4D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _NameTokenOffset = new(() => Schema.GetOffset(0xED8F756E9293FEF3), LazyThreadSafetyMode.None); + public ref CUtlStringToken NameToken { - get => ref _Handle.AsRef(Schema.GetOffset(0xED8F756E9293FEF3)); + get => ref _Handle.AsRef(_NameTokenOffset.Value); } + private static readonly Lazy _IndexOffset = new(() => Schema.GetOffset(0xED8F756EB73DBE67), LazyThreadSafetyMode.None); + public FuseVariableIndex_t Index { - get => new FuseVariableIndex_tImpl(_Handle + Schema.GetOffset(0xED8F756EB73DBE67)); + get => new FuseVariableIndex_tImpl(_Handle + _IndexOffset.Value); } + private static readonly Lazy _NumComponentsOffset = new(() => Schema.GetOffset(0xED8F756EC5454F4B), LazyThreadSafetyMode.None); + public ref byte NumComponents { - get => ref _Handle.AsRef(Schema.GetOffset(0xED8F756EC5454F4B)); + get => ref _Handle.AsRef(_NumComponentsOffset.Value); } + private static readonly Lazy _VarTypeOffset = new(() => Schema.GetOffset(0xED8F756E3AC34F99), LazyThreadSafetyMode.None); + public ref FuseVariableType_t VarType { - get => ref _Handle.AsRef(Schema.GetOffset(0xED8F756E3AC34F99)); + get => ref _Handle.AsRef(_VarTypeOffset.Value); } + private static readonly Lazy _AccessOffset = new(() => Schema.GetOffset(0xED8F756E73907152), LazyThreadSafetyMode.None); + public ref FuseVariableAccess_t Access { - get => ref _Handle.AsRef(Schema.GetOffset(0xED8F756E73907152)); + get => ref _Handle.AsRef(_AccessOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VecInputMaterialVariable_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VecInputMaterialVariable_tImpl.cs index 977ff1861..df5e1c3a0 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VecInputMaterialVariable_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VecInputMaterialVariable_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class VecInputMaterialVariable_tImpl : SchemaClass, VecInputMat public VecInputMaterialVariable_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _StrVariableOffset = new(() => Schema.GetOffset(0x3A84C75DA52C3390), LazyThreadSafetyMode.None); + public string StrVariable { get { - var ptr = _Handle.Read(Schema.GetOffset(0x3A84C75DA52C3390)); + var ptr = _Handle.Read(_StrVariableOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x3A84C75DA52C3390, value); + set => Schema.SetString(_Handle, _StrVariableOffset.Value, value); } + private static readonly Lazy _InputOffset = new(() => Schema.GetOffset(0x3A84C75D1EA0ED5B), LazyThreadSafetyMode.None); + public CParticleCollectionVecInput Input { - get => new CParticleCollectionVecInputImpl(_Handle + Schema.GetOffset(0x3A84C75D1EA0ED5B)); + get => new CParticleCollectionVecInputImpl(_Handle + _InputOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VelocitySamplerImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VelocitySamplerImpl.cs index 5d0925766..bf406ea6e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VelocitySamplerImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VelocitySamplerImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class VelocitySamplerImpl : SchemaClass, VelocitySampler { public VelocitySamplerImpl(nint handle) : base(handle) { } + private static readonly Lazy _PrevSampleOffset = new(() => Schema.GetOffset(0x5547216E1BCE7EF2), LazyThreadSafetyMode.None); + public ref Vector PrevSample { - get => ref _Handle.AsRef(Schema.GetOffset(0x5547216E1BCE7EF2)); + get => ref _Handle.AsRef(_PrevSampleOffset.Value); } + private static readonly Lazy _PrevSampleTimeOffset = new(() => Schema.GetOffset(0x5547216E0D491EE7), LazyThreadSafetyMode.None); + public GameTime_t PrevSampleTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x5547216E0D491EE7)); + get => new GameTime_tImpl(_Handle + _PrevSampleTimeOffset.Value); } + private static readonly Lazy _IdealSampleRateOffset = new(() => Schema.GetOffset(0x5547216EF1562586), LazyThreadSafetyMode.None); + public ref float IdealSampleRate { - get => ref _Handle.AsRef(Schema.GetOffset(0x5547216EF1562586)); + get => ref _Handle.AsRef(_IdealSampleRateOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VertexPositionColor_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VertexPositionColor_tImpl.cs index e666d2446..f9884815d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VertexPositionColor_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VertexPositionColor_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class VertexPositionColor_tImpl : SchemaClass, VertexPositionCo public VertexPositionColor_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _PositionOffset = new(() => Schema.GetOffset(0x9E531188BD6A6C9E), LazyThreadSafetyMode.None); + public ref Vector Position { - get => ref _Handle.AsRef(Schema.GetOffset(0x9E531188BD6A6C9E)); + get => ref _Handle.AsRef(_PositionOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VertexPositionNormal_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VertexPositionNormal_tImpl.cs index c36e73de6..ec0275819 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VertexPositionNormal_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VertexPositionNormal_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class VertexPositionNormal_tImpl : SchemaClass, VertexPositionN public VertexPositionNormal_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _PositionOffset = new(() => Schema.GetOffset(0x47BDE764BD6A6C9E), LazyThreadSafetyMode.None); + public ref Vector Position { - get => ref _Handle.AsRef(Schema.GetOffset(0x47BDE764BD6A6C9E)); + get => ref _Handle.AsRef(_PositionOffset.Value); } + private static readonly Lazy _NormalOffset = new(() => Schema.GetOffset(0x47BDE764AFB36E96), LazyThreadSafetyMode.None); + public ref Vector Normal { - get => ref _Handle.AsRef(Schema.GetOffset(0x47BDE764AFB36E96)); + get => ref _Handle.AsRef(_NormalOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ViewAngleServerChange_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ViewAngleServerChange_tImpl.cs index 2f6cff868..79c334980 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ViewAngleServerChange_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ViewAngleServerChange_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,14 +17,20 @@ internal partial class ViewAngleServerChange_tImpl : SchemaClass, ViewAngleServe public ViewAngleServerChange_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _TypeOffset = new(() => Schema.GetOffset(0x84AFC64BEEF036F9), LazyThreadSafetyMode.None); + public ref FixAngleSet_t Type { - get => ref _Handle.AsRef(Schema.GetOffset(0x84AFC64BEEF036F9)); + get => ref _Handle.AsRef(_TypeOffset.Value); } + private static readonly Lazy _AngleOffset = new(() => Schema.GetOffset(0x84AFC64B64F7DFC7), LazyThreadSafetyMode.None); + public ref QAngle Angle { - get => ref _Handle.AsRef(Schema.GetOffset(0x84AFC64B64F7DFC7)); + get => ref _Handle.AsRef(_AngleOffset.Value); } + private static readonly Lazy _IndexOffset = new(() => Schema.GetOffset(0x84AFC64BA1A45087), LazyThreadSafetyMode.None); + public ref uint Index { - get => ref _Handle.AsRef(Schema.GetOffset(0x84AFC64BA1A45087)); + get => ref _Handle.AsRef(_IndexOffset.Value); } public void TypeUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VoxelVisBlockOffset_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VoxelVisBlockOffset_tImpl.cs index c1c0f646b..18ffee91b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VoxelVisBlockOffset_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VoxelVisBlockOffset_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class VoxelVisBlockOffset_tImpl : SchemaClass, VoxelVisBlockOff public VoxelVisBlockOffset_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _OffsetOffset = new(() => Schema.GetOffset(0x17D2B49827734C8E), LazyThreadSafetyMode.None); + public ref uint Offset { - get => ref _Handle.AsRef(Schema.GetOffset(0x17D2B49827734C8E)); + get => ref _Handle.AsRef(_OffsetOffset.Value); } + private static readonly Lazy _ElementCountOffset = new(() => Schema.GetOffset(0x17D2B49851A2EF12), LazyThreadSafetyMode.None); + public ref uint ElementCount { - get => ref _Handle.AsRef(Schema.GetOffset(0x17D2B49851A2EF12)); + get => ref _Handle.AsRef(_ElementCountOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VsInputSignatureElement_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VsInputSignatureElement_tImpl.cs index ed46dd474..3fa64652d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VsInputSignatureElement_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VsInputSignatureElement_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,29 +17,37 @@ internal partial class VsInputSignatureElement_tImpl : SchemaClass, VsInputSigna public VsInputSignatureElement_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0xFD3BBE5B5B47C92C), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle + Schema.GetOffset(0xFD3BBE5B5B47C92C); + var ptr = _Handle + _NameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xFD3BBE5B5B47C92C, value, 64); + set => Schema.SetFixedString(_Handle, _NameOffset.Value, value, 64); } + private static readonly Lazy _SemanticOffset = new(() => Schema.GetOffset(0xFD3BBE5B14684E6F), LazyThreadSafetyMode.None); + public string Semantic { get { - var ptr = _Handle + Schema.GetOffset(0xFD3BBE5B14684E6F); + var ptr = _Handle + _SemanticOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xFD3BBE5B14684E6F, value, 64); + set => Schema.SetFixedString(_Handle, _SemanticOffset.Value, value, 64); } + private static readonly Lazy _D3DSemanticNameOffset = new(() => Schema.GetOffset(0xFD3BBE5B66524995), LazyThreadSafetyMode.None); + public string D3DSemanticName { get { - var ptr = _Handle + Schema.GetOffset(0xFD3BBE5B66524995); + var ptr = _Handle + _D3DSemanticNameOffset.Value; return Schema.GetString(ptr); } - set => Schema.SetFixedString(_Handle, 0xFD3BBE5B66524995, value, 64); + set => Schema.SetFixedString(_Handle, _D3DSemanticNameOffset.Value, value, 64); } + private static readonly Lazy _D3DSemanticIndexOffset = new(() => Schema.GetOffset(0xFD3BBE5B67F2BA80), LazyThreadSafetyMode.None); + public ref int D3DSemanticIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xFD3BBE5B67F2BA80)); + get => ref _Handle.AsRef(_D3DSemanticIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VsInputSignature_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VsInputSignature_tImpl.cs index fb53fc17b..3a54e598c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/VsInputSignature_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/VsInputSignature_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class VsInputSignature_tImpl : SchemaClass, VsInputSignature_t public VsInputSignature_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ElemsOffset = new(() => Schema.GetOffset(0xA7BF24E33F2FC92B), LazyThreadSafetyMode.None); + public ref CUtlVector Elems { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA7BF24E33F2FC92B)); + get => ref _Handle.AsRef>(_ElemsOffset.Value); } + private static readonly Lazy _Depth_elemsOffset = new(() => Schema.GetOffset(0xA7BF24E3C1AC112D), LazyThreadSafetyMode.None); + public ref CUtlVector Depth_elems { - get => ref _Handle.AsRef>(Schema.GetOffset(0xA7BF24E3C1AC112D)); + get => ref _Handle.AsRef>(_Depth_elemsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/WaterWheelDrag_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/WaterWheelDrag_tImpl.cs index 4e4186de1..d4f02eab3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/WaterWheelDrag_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/WaterWheelDrag_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class WaterWheelDrag_tImpl : SchemaClass, WaterWheelDrag_t { public WaterWheelDrag_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FractionOfWheelSubmergedOffset = new(() => Schema.GetOffset(0x51DDFA66F2D4C09B), LazyThreadSafetyMode.None); + public ref float FractionOfWheelSubmerged { - get => ref _Handle.AsRef(Schema.GetOffset(0x51DDFA66F2D4C09B)); + get => ref _Handle.AsRef(_FractionOfWheelSubmergedOffset.Value); } + private static readonly Lazy _WheelDragOffset = new(() => Schema.GetOffset(0x51DDFA66B996F340), LazyThreadSafetyMode.None); + public ref float WheelDrag { - get => ref _Handle.AsRef(Schema.GetOffset(0x51DDFA66B996F340)); + get => ref _Handle.AsRef(_WheelDragOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/WaterWheelFrictionScale_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/WaterWheelFrictionScale_tImpl.cs index 3ce9f6f2f..f6dc5eee8 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/WaterWheelFrictionScale_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/WaterWheelFrictionScale_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class WaterWheelFrictionScale_tImpl : SchemaClass, WaterWheelFr public WaterWheelFrictionScale_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FractionOfWheelSubmergedOffset = new(() => Schema.GetOffset(0x79315E8EF2D4C09B), LazyThreadSafetyMode.None); + public ref float FractionOfWheelSubmerged { - get => ref _Handle.AsRef(Schema.GetOffset(0x79315E8EF2D4C09B)); + get => ref _Handle.AsRef(_FractionOfWheelSubmergedOffset.Value); } + private static readonly Lazy _FrictionScaleOffset = new(() => Schema.GetOffset(0x79315E8ECB7D1875), LazyThreadSafetyMode.None); + public ref float FrictionScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x79315E8ECB7D1875)); + get => ref _Handle.AsRef(_FrictionScaleOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/WeaponPurchaseCount_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/WeaponPurchaseCount_tImpl.cs index ff552ac26..4e64327c2 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/WeaponPurchaseCount_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/WeaponPurchaseCount_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class WeaponPurchaseCount_tImpl : SchemaClass, WeaponPurchaseCo public WeaponPurchaseCount_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ItemDefIndexOffset = new(() => Schema.GetOffset(0xF7F0C6E61BF10FB7), LazyThreadSafetyMode.None); + public ref ushort ItemDefIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0xF7F0C6E61BF10FB7)); + get => ref _Handle.AsRef(_ItemDefIndexOffset.Value); } + private static readonly Lazy _CountOffset = new(() => Schema.GetOffset(0xF7F0C6E67D31AC08), LazyThreadSafetyMode.None); + public ref ushort Count { - get => ref _Handle.AsRef(Schema.GetOffset(0xF7F0C6E67D31AC08)); + get => ref _Handle.AsRef(_CountOffset.Value); } public void ItemDefIndexUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/WeaponPurchaseTracker_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/WeaponPurchaseTracker_tImpl.cs index 2d7998d99..8dd06aa1e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/WeaponPurchaseTracker_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/WeaponPurchaseTracker_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class WeaponPurchaseTracker_tImpl : SchemaClass, WeaponPurchase public WeaponPurchaseTracker_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _WeaponPurchasesOffset = new(() => Schema.GetOffset(0xD558F475988247C7), LazyThreadSafetyMode.None); + public ref CUtlVector WeaponPurchases { - get => ref _Handle.AsRef>(Schema.GetOffset(0xD558F475988247C7)); + get => ref _Handle.AsRef>(_WeaponPurchasesOffset.Value); } public void WeaponPurchasesUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/WeightListImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/WeightListImpl.cs index 539216775..1b87e28a3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/WeightListImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/WeightListImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,15 +17,19 @@ internal partial class WeightListImpl : SchemaClass, WeightList { public WeightListImpl(nint handle) : base(handle) { } + private static readonly Lazy _NameOffset = new(() => Schema.GetOffset(0x4A08DD454D8F5786), LazyThreadSafetyMode.None); + public string Name { get { - var ptr = _Handle.Read(Schema.GetOffset(0x4A08DD454D8F5786)); + var ptr = _Handle.Read(_NameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x4A08DD454D8F5786, value); + set => Schema.SetString(_Handle, _NameOffset.Value, value); } + private static readonly Lazy _WeightsOffset = new(() => Schema.GetOffset(0x4A08DD4577B2F91E), LazyThreadSafetyMode.None); + public ref CUtlVector Weights { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4A08DD4577B2F91E)); + get => ref _Handle.AsRef>(_WeightsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/WorldBuilderParams_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/WorldBuilderParams_tImpl.cs index 2651d1223..c7eda578b 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/WorldBuilderParams_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/WorldBuilderParams_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class WorldBuilderParams_tImpl : SchemaClass, WorldBuilderParam public WorldBuilderParams_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinDrawVolumeSizeOffset = new(() => Schema.GetOffset(0x37270ACBA9648390), LazyThreadSafetyMode.None); + public ref float MinDrawVolumeSize { - get => ref _Handle.AsRef(Schema.GetOffset(0x37270ACBA9648390)); + get => ref _Handle.AsRef(_MinDrawVolumeSizeOffset.Value); } + private static readonly Lazy _BuildBakedLightingOffset = new(() => Schema.GetOffset(0x37270ACBCF369FF6), LazyThreadSafetyMode.None); + public ref bool BuildBakedLighting { - get => ref _Handle.AsRef(Schema.GetOffset(0x37270ACBCF369FF6)); + get => ref _Handle.AsRef(_BuildBakedLightingOffset.Value); } + private static readonly Lazy _AggregateInstanceStreamsOffset = new(() => Schema.GetOffset(0x37270ACB36B2AE78), LazyThreadSafetyMode.None); + public ref bool AggregateInstanceStreams { - get => ref _Handle.AsRef(Schema.GetOffset(0x37270ACB36B2AE78)); + get => ref _Handle.AsRef(_AggregateInstanceStreamsOffset.Value); } + private static readonly Lazy _BakedLightingInfoOffset = new(() => Schema.GetOffset(0x37270ACBC2128E04), LazyThreadSafetyMode.None); + public BakedLightingInfo_t BakedLightingInfo { - get => new BakedLightingInfo_tImpl(_Handle + Schema.GetOffset(0x37270ACBC2128E04)); + get => new BakedLightingInfo_tImpl(_Handle + _BakedLightingInfoOffset.Value); } + private static readonly Lazy _CompileTimestampOffset = new(() => Schema.GetOffset(0x37270ACB1CAADE3A), LazyThreadSafetyMode.None); + public ref ulong CompileTimestamp { - get => ref _Handle.AsRef(Schema.GetOffset(0x37270ACB1CAADE3A)); + get => ref _Handle.AsRef(_CompileTimestampOffset.Value); } + private static readonly Lazy _CompileFingerprintOffset = new(() => Schema.GetOffset(0x37270ACB98F6F58A), LazyThreadSafetyMode.None); + public ref ulong CompileFingerprint { - get => ref _Handle.AsRef(Schema.GetOffset(0x37270ACB98F6F58A)); + get => ref _Handle.AsRef(_CompileFingerprintOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/WorldNodeOnDiskBufferData_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/WorldNodeOnDiskBufferData_tImpl.cs index 6c539ab42..10992e072 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/WorldNodeOnDiskBufferData_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/WorldNodeOnDiskBufferData_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class WorldNodeOnDiskBufferData_tImpl : SchemaClass, WorldNodeO public WorldNodeOnDiskBufferData_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ElementCountOffset = new(() => Schema.GetOffset(0xC4F557DA51A2EF12), LazyThreadSafetyMode.None); + public ref int ElementCount { - get => ref _Handle.AsRef(Schema.GetOffset(0xC4F557DA51A2EF12)); + get => ref _Handle.AsRef(_ElementCountOffset.Value); } + private static readonly Lazy _ElementSizeInBytesOffset = new(() => Schema.GetOffset(0xC4F557DAF602975C), LazyThreadSafetyMode.None); + public ref int ElementSizeInBytes { - get => ref _Handle.AsRef(Schema.GetOffset(0xC4F557DAF602975C)); + get => ref _Handle.AsRef(_ElementSizeInBytesOffset.Value); } + private static readonly Lazy _InputLayoutFieldsOffset = new(() => Schema.GetOffset(0xC4F557DAFDECA2D8), LazyThreadSafetyMode.None); + public ref CUtlVector InputLayoutFields { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC4F557DAFDECA2D8)); + get => ref _Handle.AsRef>(_InputLayoutFieldsOffset.Value); } + private static readonly Lazy _DataOffset = new(() => Schema.GetOffset(0xC4F557DA27938BB7), LazyThreadSafetyMode.None); + public ref CUtlVector Data { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC4F557DA27938BB7)); + get => ref _Handle.AsRef>(_DataOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/WorldNode_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/WorldNode_tImpl.cs index c7d2f0fdc..50b2777dc 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/WorldNode_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/WorldNode_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,51 +17,79 @@ internal partial class WorldNode_tImpl : SchemaClass, WorldNode_t { public WorldNode_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _SceneObjectsOffset = new(() => Schema.GetOffset(0xFC310480332235A1), LazyThreadSafetyMode.None); + public ref CUtlVector SceneObjects { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFC310480332235A1)); + get => ref _Handle.AsRef>(_SceneObjectsOffset.Value); } + private static readonly Lazy _VisClusterMembershipOffset = new(() => Schema.GetOffset(0xFC310480F2C828CD), LazyThreadSafetyMode.None); + public ref CUtlVector VisClusterMembership { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFC310480F2C828CD)); + get => ref _Handle.AsRef>(_VisClusterMembershipOffset.Value); } + private static readonly Lazy _AggregateSceneObjectsOffset = new(() => Schema.GetOffset(0xFC31048072C832FC), LazyThreadSafetyMode.None); + public ref CUtlVector AggregateSceneObjects { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFC31048072C832FC)); + get => ref _Handle.AsRef>(_AggregateSceneObjectsOffset.Value); } + private static readonly Lazy _ClutterSceneObjectsOffset = new(() => Schema.GetOffset(0xFC310480CB15C9CA), LazyThreadSafetyMode.None); + public ref CUtlVector ClutterSceneObjects { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFC310480CB15C9CA)); + get => ref _Handle.AsRef>(_ClutterSceneObjectsOffset.Value); } + private static readonly Lazy _ExtraVertexStreamOverridesOffset = new(() => Schema.GetOffset(0xFC310480E2732A38), LazyThreadSafetyMode.None); + public ref CUtlVector ExtraVertexStreamOverrides { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFC310480E2732A38)); + get => ref _Handle.AsRef>(_ExtraVertexStreamOverridesOffset.Value); } + private static readonly Lazy _MaterialOverridesOffset = new(() => Schema.GetOffset(0xFC3104809D810D99), LazyThreadSafetyMode.None); + public ref CUtlVector MaterialOverrides { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFC3104809D810D99)); + get => ref _Handle.AsRef>(_MaterialOverridesOffset.Value); } + private static readonly Lazy _ExtraVertexStreamsOffset = new(() => Schema.GetOffset(0xFC310480544F1AA0), LazyThreadSafetyMode.None); + public ref CUtlVector ExtraVertexStreams { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFC310480544F1AA0)); + get => ref _Handle.AsRef>(_ExtraVertexStreamsOffset.Value); } + private static readonly Lazy _AggregateInstanceStreamsOffset = new(() => Schema.GetOffset(0xFC31048038CAE4B8), LazyThreadSafetyMode.None); + public ref CUtlVector AggregateInstanceStreams { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFC31048038CAE4B8)); + get => ref _Handle.AsRef>(_AggregateInstanceStreamsOffset.Value); } + private static readonly Lazy _VertexAlbedoStreamsOffset = new(() => Schema.GetOffset(0xFC3104803DD793DB), LazyThreadSafetyMode.None); + public ref CUtlVector VertexAlbedoStreams { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFC3104803DD793DB)); + get => ref _Handle.AsRef>(_VertexAlbedoStreamsOffset.Value); } + private static readonly Lazy _LayerNamesOffset = new(() => Schema.GetOffset(0xFC3104806E877012), LazyThreadSafetyMode.None); + public ref CUtlVector LayerNames { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFC3104806E877012)); + get => ref _Handle.AsRef>(_LayerNamesOffset.Value); } + private static readonly Lazy _SceneObjectLayerIndicesOffset = new(() => Schema.GetOffset(0xFC310480F769C8CA), LazyThreadSafetyMode.None); + public ref CUtlVector SceneObjectLayerIndices { - get => ref _Handle.AsRef>(Schema.GetOffset(0xFC310480F769C8CA)); + get => ref _Handle.AsRef>(_SceneObjectLayerIndicesOffset.Value); } + private static readonly Lazy _GrassFileNameOffset = new(() => Schema.GetOffset(0xFC310480FDDFCFE0), LazyThreadSafetyMode.None); + public string GrassFileName { get { - var ptr = _Handle.Read(Schema.GetOffset(0xFC310480FDDFCFE0)); + var ptr = _Handle.Read(_GrassFileNameOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xFC310480FDDFCFE0, value); + set => Schema.SetString(_Handle, _GrassFileNameOffset.Value, value); } + private static readonly Lazy _NodeLightingInfoOffset = new(() => Schema.GetOffset(0xFC3104800E25D839), LazyThreadSafetyMode.None); + public BakedLightingInfo_t NodeLightingInfo { - get => new BakedLightingInfo_tImpl(_Handle + Schema.GetOffset(0xFC3104800E25D839)); + get => new BakedLightingInfo_tImpl(_Handle + _NodeLightingInfoOffset.Value); } + private static readonly Lazy _HasBakedGeometryFlagOffset = new(() => Schema.GetOffset(0xFC310480943F4594), LazyThreadSafetyMode.None); + public ref bool HasBakedGeometryFlag { - get => ref _Handle.AsRef(Schema.GetOffset(0xFC310480943F4594)); + get => ref _Handle.AsRef(_HasBakedGeometryFlagOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/World_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/World_tImpl.cs index d369a9558..b1c9db4da 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/World_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/World_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class World_tImpl : SchemaClass, World_t { public World_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _BuilderParamsOffset = new(() => Schema.GetOffset(0x4CBF8350CE4EEF26), LazyThreadSafetyMode.None); + public WorldBuilderParams_t BuilderParams { - get => new WorldBuilderParams_tImpl(_Handle + Schema.GetOffset(0x4CBF8350CE4EEF26)); + get => new WorldBuilderParams_tImpl(_Handle + _BuilderParamsOffset.Value); } + private static readonly Lazy _WorldNodesOffset = new(() => Schema.GetOffset(0x4CBF835064F33530), LazyThreadSafetyMode.None); + public ref CUtlVector WorldNodes { - get => ref _Handle.AsRef>(Schema.GetOffset(0x4CBF835064F33530)); + get => ref _Handle.AsRef>(_WorldNodesOffset.Value); } + private static readonly Lazy _WorldLightingInfoOffset = new(() => Schema.GetOffset(0x4CBF83508B843A17), LazyThreadSafetyMode.None); + public BakedLightingInfo_t WorldLightingInfo { - get => new BakedLightingInfo_tImpl(_Handle + Schema.GetOffset(0x4CBF83508B843A17)); + get => new BakedLightingInfo_tImpl(_Handle + _WorldLightingInfoOffset.Value); } + private static readonly Lazy _EntityLumpsOffset = new(() => Schema.GetOffset(0x4CBF8350E4A85021), LazyThreadSafetyMode.None); + public ref CUtlVector> EntityLumps { - get => ref _Handle.AsRef>>(Schema.GetOffset(0x4CBF8350E4A85021)); + get => ref _Handle.AsRef>>(_EntityLumpsOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/WrappedPhysicsJoint_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/WrappedPhysicsJoint_tImpl.cs index 9640f8d04..a3cf35391 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/WrappedPhysicsJoint_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/WrappedPhysicsJoint_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/audioparams_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/audioparams_tImpl.cs index ccb340411..d9cdb5d5d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/audioparams_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/audioparams_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -18,17 +20,25 @@ public audioparams_tImpl(nint handle) : base(handle) { public ISchemaFixedArray LocalSound { get => new SchemaFixedArray(_Handle, 0x6D349E3CCE184A47, 8, 12, 4); } + private static readonly Lazy _SoundscapeIndexOffset = new(() => Schema.GetOffset(0x6D349E3C046FCFEE), LazyThreadSafetyMode.None); + public ref int SoundscapeIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x6D349E3C046FCFEE)); + get => ref _Handle.AsRef(_SoundscapeIndexOffset.Value); } + private static readonly Lazy _LocalBitsOffset = new(() => Schema.GetOffset(0x6D349E3C1DE85B60), LazyThreadSafetyMode.None); + public ref byte LocalBits { - get => ref _Handle.AsRef(Schema.GetOffset(0x6D349E3C1DE85B60)); + get => ref _Handle.AsRef(_LocalBitsOffset.Value); } + private static readonly Lazy _SoundscapeEntityListIndexOffset = new(() => Schema.GetOffset(0x6D349E3CA4E4FB9B), LazyThreadSafetyMode.None); + public ref int SoundscapeEntityListIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x6D349E3CA4E4FB9B)); + get => ref _Handle.AsRef(_SoundscapeEntityListIndexOffset.Value); } + private static readonly Lazy _SoundEventHashOffset = new(() => Schema.GetOffset(0x6D349E3C335E17CC), LazyThreadSafetyMode.None); + public ref uint SoundEventHash { - get => ref _Handle.AsRef(Schema.GetOffset(0x6D349E3C335E17CC)); + get => ref _Handle.AsRef(_SoundEventHashOffset.Value); } public void LocalSoundUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/constraint_axislimit_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/constraint_axislimit_tImpl.cs index 9b2d2b08e..659e9fb5d 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/constraint_axislimit_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/constraint_axislimit_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class constraint_axislimit_tImpl : SchemaClass, constraint_axis public constraint_axislimit_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _MinRotationOffset = new(() => Schema.GetOffset(0x610A06522A8C970B), LazyThreadSafetyMode.None); + public ref float MinRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0x610A06522A8C970B)); + get => ref _Handle.AsRef(_MinRotationOffset.Value); } + private static readonly Lazy _MaxRotationOffset = new(() => Schema.GetOffset(0x610A0652FEB73D49), LazyThreadSafetyMode.None); + public ref float MaxRotation { - get => ref _Handle.AsRef(Schema.GetOffset(0x610A0652FEB73D49)); + get => ref _Handle.AsRef(_MaxRotationOffset.Value); } + private static readonly Lazy _MotorTargetAngSpeedOffset = new(() => Schema.GetOffset(0x610A0652C783A98E), LazyThreadSafetyMode.None); + public ref float MotorTargetAngSpeed { - get => ref _Handle.AsRef(Schema.GetOffset(0x610A0652C783A98E)); + get => ref _Handle.AsRef(_MotorTargetAngSpeedOffset.Value); } + private static readonly Lazy _MotorMaxTorqueOffset = new(() => Schema.GetOffset(0x610A0652808C4A00), LazyThreadSafetyMode.None); + public ref float MotorMaxTorque { - get => ref _Handle.AsRef(Schema.GetOffset(0x610A0652808C4A00)); + get => ref _Handle.AsRef(_MotorMaxTorqueOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/constraint_breakableparams_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/constraint_breakableparams_tImpl.cs index 7436e9090..ef15d251e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/constraint_breakableparams_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/constraint_breakableparams_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,28 @@ internal partial class constraint_breakableparams_tImpl : SchemaClass, constrain public constraint_breakableparams_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _StrengthOffset = new(() => Schema.GetOffset(0xEDA0F377E07A18B0), LazyThreadSafetyMode.None); + public ref float Strength { - get => ref _Handle.AsRef(Schema.GetOffset(0xEDA0F377E07A18B0)); + get => ref _Handle.AsRef(_StrengthOffset.Value); } + private static readonly Lazy _ForceLimitOffset = new(() => Schema.GetOffset(0xEDA0F3777F2D0897), LazyThreadSafetyMode.None); + public ref float ForceLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0xEDA0F3777F2D0897)); + get => ref _Handle.AsRef(_ForceLimitOffset.Value); } + private static readonly Lazy _TorqueLimitOffset = new(() => Schema.GetOffset(0xEDA0F37777EB0DDE), LazyThreadSafetyMode.None); + public ref float TorqueLimit { - get => ref _Handle.AsRef(Schema.GetOffset(0xEDA0F37777EB0DDE)); + get => ref _Handle.AsRef(_TorqueLimitOffset.Value); } public ISchemaFixedArray BodyMassScale { get => new SchemaFixedArray(_Handle, 0xEDA0F3775BED8FB5, 2, 4, 4); } + private static readonly Lazy _IsActiveOffset = new(() => Schema.GetOffset(0xEDA0F3773D94F45F), LazyThreadSafetyMode.None); + public ref bool IsActive { - get => ref _Handle.AsRef(Schema.GetOffset(0xEDA0F3773D94F45F)); + get => ref _Handle.AsRef(_IsActiveOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/constraint_hingeparams_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/constraint_hingeparams_tImpl.cs index f60b91b6e..ef20e3b7f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/constraint_hingeparams_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/constraint_hingeparams_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class constraint_hingeparams_tImpl : SchemaClass, constraint_hi public constraint_hingeparams_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _WorldPositionOffset = new(() => Schema.GetOffset(0x790804C3F16C2360), LazyThreadSafetyMode.None); + public ref Vector WorldPosition { - get => ref _Handle.AsRef(Schema.GetOffset(0x790804C3F16C2360)); + get => ref _Handle.AsRef(_WorldPositionOffset.Value); } + private static readonly Lazy _WorldAxisDirectionOffset = new(() => Schema.GetOffset(0x790804C3637CEB43), LazyThreadSafetyMode.None); + public ref Vector WorldAxisDirection { - get => ref _Handle.AsRef(Schema.GetOffset(0x790804C3637CEB43)); + get => ref _Handle.AsRef(_WorldAxisDirectionOffset.Value); } + private static readonly Lazy _HingeAxisOffset = new(() => Schema.GetOffset(0x790804C33BD096FD), LazyThreadSafetyMode.None); + public constraint_axislimit_t HingeAxis { - get => new constraint_axislimit_tImpl(_Handle + Schema.GetOffset(0x790804C33BD096FD)); + get => new constraint_axislimit_tImpl(_Handle + _HingeAxisOffset.Value); } + private static readonly Lazy _ConstraintOffset = new(() => Schema.GetOffset(0x790804C3B822E25A), LazyThreadSafetyMode.None); + public constraint_breakableparams_t Constraint { - get => new constraint_breakableparams_tImpl(_Handle + Schema.GetOffset(0x790804C3B822E25A)); + get => new constraint_breakableparams_tImpl(_Handle + _ConstraintOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/dynpitchvol_base_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/dynpitchvol_base_tImpl.cs index e695d1f38..6bf944fc3 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/dynpitchvol_base_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/dynpitchvol_base_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,80 +17,130 @@ internal partial class dynpitchvol_base_tImpl : SchemaClass, dynpitchvol_base_t public dynpitchvol_base_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _PresetOffset = new(() => Schema.GetOffset(0x43D191DAF510291E), LazyThreadSafetyMode.None); + public ref int Preset { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DAF510291E)); + get => ref _Handle.AsRef(_PresetOffset.Value); } + private static readonly Lazy _PitchrunOffset = new(() => Schema.GetOffset(0x43D191DA742593BE), LazyThreadSafetyMode.None); + public ref int Pitchrun { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DA742593BE)); + get => ref _Handle.AsRef(_PitchrunOffset.Value); } + private static readonly Lazy _PitchstartOffset = new(() => Schema.GetOffset(0x43D191DA4CEFD303), LazyThreadSafetyMode.None); + public ref int Pitchstart { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DA4CEFD303)); + get => ref _Handle.AsRef(_PitchstartOffset.Value); } + private static readonly Lazy _SpinupOffset = new(() => Schema.GetOffset(0x43D191DAD188EC9C), LazyThreadSafetyMode.None); + public ref int Spinup { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DAD188EC9C)); + get => ref _Handle.AsRef(_SpinupOffset.Value); } + private static readonly Lazy _SpindownOffset = new(() => Schema.GetOffset(0x43D191DA2231BF89), LazyThreadSafetyMode.None); + public ref int Spindown { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DA2231BF89)); + get => ref _Handle.AsRef(_SpindownOffset.Value); } + private static readonly Lazy _VolrunOffset = new(() => Schema.GetOffset(0x43D191DA3F973C1B), LazyThreadSafetyMode.None); + public ref int Volrun { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DA3F973C1B)); + get => ref _Handle.AsRef(_VolrunOffset.Value); } + private static readonly Lazy _VolstartOffset = new(() => Schema.GetOffset(0x43D191DAF69D02A2), LazyThreadSafetyMode.None); + public ref int Volstart { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DAF69D02A2)); + get => ref _Handle.AsRef(_VolstartOffset.Value); } + private static readonly Lazy _FadeinOffset = new(() => Schema.GetOffset(0x43D191DAAE01FB20), LazyThreadSafetyMode.None); + public ref int Fadein { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DAAE01FB20)); + get => ref _Handle.AsRef(_FadeinOffset.Value); } + private static readonly Lazy _FadeoutOffset = new(() => Schema.GetOffset(0x43D191DA20407665), LazyThreadSafetyMode.None); + public ref int Fadeout { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DA20407665)); + get => ref _Handle.AsRef(_FadeoutOffset.Value); } + private static readonly Lazy _LfotypeOffset = new(() => Schema.GetOffset(0x43D191DAF7F77640), LazyThreadSafetyMode.None); + public ref int Lfotype { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DAF7F77640)); + get => ref _Handle.AsRef(_LfotypeOffset.Value); } + private static readonly Lazy _LforateOffset = new(() => Schema.GetOffset(0x43D191DA51C3D86A), LazyThreadSafetyMode.None); + public ref int Lforate { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DA51C3D86A)); + get => ref _Handle.AsRef(_LforateOffset.Value); } + private static readonly Lazy _LfomodpitchOffset = new(() => Schema.GetOffset(0x43D191DAA31EEA52), LazyThreadSafetyMode.None); + public ref int Lfomodpitch { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DAA31EEA52)); + get => ref _Handle.AsRef(_LfomodpitchOffset.Value); } + private static readonly Lazy _LfomodvolOffset = new(() => Schema.GetOffset(0x43D191DA23BDFF5D), LazyThreadSafetyMode.None); + public ref int Lfomodvol { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DA23BDFF5D)); + get => ref _Handle.AsRef(_LfomodvolOffset.Value); } + private static readonly Lazy _CspinupOffset = new(() => Schema.GetOffset(0x43D191DAB6785957), LazyThreadSafetyMode.None); + public ref int Cspinup { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DAB6785957)); + get => ref _Handle.AsRef(_CspinupOffset.Value); } + private static readonly Lazy _CspincountOffset = new(() => Schema.GetOffset(0x43D191DAEF206411), LazyThreadSafetyMode.None); + public ref int Cspincount { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DAEF206411)); + get => ref _Handle.AsRef(_CspincountOffset.Value); } + private static readonly Lazy _PitchOffset = new(() => Schema.GetOffset(0x43D191DABD324AB1), LazyThreadSafetyMode.None); + public ref int Pitch { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DABD324AB1)); + get => ref _Handle.AsRef(_PitchOffset.Value); } + private static readonly Lazy _SpinupsavOffset = new(() => Schema.GetOffset(0x43D191DA49CF0B06), LazyThreadSafetyMode.None); + public ref int Spinupsav { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DA49CF0B06)); + get => ref _Handle.AsRef(_SpinupsavOffset.Value); } + private static readonly Lazy _SpindownsavOffset = new(() => Schema.GetOffset(0x43D191DA495B8411), LazyThreadSafetyMode.None); + public ref int Spindownsav { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DA495B8411)); + get => ref _Handle.AsRef(_SpindownsavOffset.Value); } + private static readonly Lazy _PitchfracOffset = new(() => Schema.GetOffset(0x43D191DAB47FB19D), LazyThreadSafetyMode.None); + public ref int Pitchfrac { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DAB47FB19D)); + get => ref _Handle.AsRef(_PitchfracOffset.Value); } + private static readonly Lazy _VolOffset = new(() => Schema.GetOffset(0x43D191DA9821809A), LazyThreadSafetyMode.None); + public ref int Vol { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DA9821809A)); + get => ref _Handle.AsRef(_VolOffset.Value); } + private static readonly Lazy _FadeinsavOffset = new(() => Schema.GetOffset(0x43D191DAB42E3AEA), LazyThreadSafetyMode.None); + public ref int Fadeinsav { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DAB42E3AEA)); + get => ref _Handle.AsRef(_FadeinsavOffset.Value); } + private static readonly Lazy _FadeoutsavOffset = new(() => Schema.GetOffset(0x43D191DA6D891B1D), LazyThreadSafetyMode.None); + public ref int Fadeoutsav { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DA6D891B1D)); + get => ref _Handle.AsRef(_FadeoutsavOffset.Value); } + private static readonly Lazy _VolfracOffset = new(() => Schema.GetOffset(0x43D191DAB7D22B7E), LazyThreadSafetyMode.None); + public ref int Volfrac { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DAB7D22B7E)); + get => ref _Handle.AsRef(_VolfracOffset.Value); } + private static readonly Lazy _LfofracOffset = new(() => Schema.GetOffset(0x43D191DAC4C70DD8), LazyThreadSafetyMode.None); + public ref int Lfofrac { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DAC4C70DD8)); + get => ref _Handle.AsRef(_LfofracOffset.Value); } + private static readonly Lazy _LfomultOffset = new(() => Schema.GetOffset(0x43D191DAE90F60A6), LazyThreadSafetyMode.None); + public ref int Lfomult { - get => ref _Handle.AsRef(Schema.GetOffset(0x43D191DAE90F60A6)); + get => ref _Handle.AsRef(_LfomultOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/dynpitchvol_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/dynpitchvol_tImpl.cs index 59fbd116b..61fad151e 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/dynpitchvol_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/dynpitchvol_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/fogparams_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/fogparams_tImpl.cs index 846532de1..8efb3b497 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/fogparams_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/fogparams_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,80 +17,130 @@ internal partial class fogparams_tImpl : SchemaClass, fogparams_t { public fogparams_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _DirPrimaryOffset = new(() => Schema.GetOffset(0xCE352DA69D025A12), LazyThreadSafetyMode.None); + public ref Vector DirPrimary { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA69D025A12)); + get => ref _Handle.AsRef(_DirPrimaryOffset.Value); } + private static readonly Lazy _ColorPrimaryOffset = new(() => Schema.GetOffset(0xCE352DA6B7CCC646), LazyThreadSafetyMode.None); + public ref Color ColorPrimary { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA6B7CCC646)); + get => ref _Handle.AsRef(_ColorPrimaryOffset.Value); } + private static readonly Lazy _ColorSecondaryOffset = new(() => Schema.GetOffset(0xCE352DA69E5EDE5A), LazyThreadSafetyMode.None); + public ref Color ColorSecondary { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA69E5EDE5A)); + get => ref _Handle.AsRef(_ColorSecondaryOffset.Value); } + private static readonly Lazy _ColorPrimaryLerpToOffset = new(() => Schema.GetOffset(0xCE352DA6702FBD96), LazyThreadSafetyMode.None); + public ref Color ColorPrimaryLerpTo { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA6702FBD96)); + get => ref _Handle.AsRef(_ColorPrimaryLerpToOffset.Value); } + private static readonly Lazy _ColorSecondaryLerpToOffset = new(() => Schema.GetOffset(0xCE352DA627E54D7A), LazyThreadSafetyMode.None); + public ref Color ColorSecondaryLerpTo { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA627E54D7A)); + get => ref _Handle.AsRef(_ColorSecondaryLerpToOffset.Value); } + private static readonly Lazy _StartOffset = new(() => Schema.GetOffset(0xCE352DA6652B04DF), LazyThreadSafetyMode.None); + public ref float Start { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA6652B04DF)); + get => ref _Handle.AsRef(_StartOffset.Value); } + private static readonly Lazy _EndOffset = new(() => Schema.GetOffset(0xCE352DA66A8E75AA), LazyThreadSafetyMode.None); + public ref float End { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA66A8E75AA)); + get => ref _Handle.AsRef(_EndOffset.Value); } + private static readonly Lazy _FarzOffset = new(() => Schema.GetOffset(0xCE352DA60E9043FC), LazyThreadSafetyMode.None); + public ref float Farz { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA60E9043FC)); + get => ref _Handle.AsRef(_FarzOffset.Value); } + private static readonly Lazy _MaxdensityOffset = new(() => Schema.GetOffset(0xCE352DA6C8F29F97), LazyThreadSafetyMode.None); + public ref float Maxdensity { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA6C8F29F97)); + get => ref _Handle.AsRef(_MaxdensityOffset.Value); } + private static readonly Lazy _ExponentOffset = new(() => Schema.GetOffset(0xCE352DA632F1D446), LazyThreadSafetyMode.None); + public ref float Exponent { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA632F1D446)); + get => ref _Handle.AsRef(_ExponentOffset.Value); } + private static readonly Lazy _HDRColorScaleOffset = new(() => Schema.GetOffset(0xCE352DA6E4EAF0DE), LazyThreadSafetyMode.None); + public ref float HDRColorScale { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA6E4EAF0DE)); + get => ref _Handle.AsRef(_HDRColorScaleOffset.Value); } + private static readonly Lazy _SkyboxFogFactorOffset = new(() => Schema.GetOffset(0xCE352DA6A7ADD816), LazyThreadSafetyMode.None); + public ref float SkyboxFogFactor { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA6A7ADD816)); + get => ref _Handle.AsRef(_SkyboxFogFactorOffset.Value); } + private static readonly Lazy _SkyboxFogFactorLerpToOffset = new(() => Schema.GetOffset(0xCE352DA6F366AC46), LazyThreadSafetyMode.None); + public ref float SkyboxFogFactorLerpTo { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA6F366AC46)); + get => ref _Handle.AsRef(_SkyboxFogFactorLerpToOffset.Value); } + private static readonly Lazy _StartLerpToOffset = new(() => Schema.GetOffset(0xCE352DA6FF7E14AB), LazyThreadSafetyMode.None); + public ref float StartLerpTo { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA6FF7E14AB)); + get => ref _Handle.AsRef(_StartLerpToOffset.Value); } + private static readonly Lazy _EndLerpToOffset = new(() => Schema.GetOffset(0xCE352DA6AB5FC36A), LazyThreadSafetyMode.None); + public ref float EndLerpTo { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA6AB5FC36A)); + get => ref _Handle.AsRef(_EndLerpToOffset.Value); } + private static readonly Lazy _MaxdensityLerpToOffset = new(() => Schema.GetOffset(0xCE352DA6B2204BA3), LazyThreadSafetyMode.None); + public ref float MaxdensityLerpTo { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA6B2204BA3)); + get => ref _Handle.AsRef(_MaxdensityLerpToOffset.Value); } + private static readonly Lazy _LerptimeOffset = new(() => Schema.GetOffset(0xCE352DA6F1157821), LazyThreadSafetyMode.None); + public GameTime_t Lerptime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xCE352DA6F1157821)); + get => new GameTime_tImpl(_Handle + _LerptimeOffset.Value); } + private static readonly Lazy _DurationOffset = new(() => Schema.GetOffset(0xCE352DA62FA0FD0D), LazyThreadSafetyMode.None); + public ref float Duration { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA62FA0FD0D)); + get => ref _Handle.AsRef(_DurationOffset.Value); } + private static readonly Lazy _BlendtobackgroundOffset = new(() => Schema.GetOffset(0xCE352DA617A07511), LazyThreadSafetyMode.None); + public ref float Blendtobackground { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA617A07511)); + get => ref _Handle.AsRef(_BlendtobackgroundOffset.Value); } + private static readonly Lazy _ScatteringOffset = new(() => Schema.GetOffset(0xCE352DA6A6DF1F9F), LazyThreadSafetyMode.None); + public ref float Scattering { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA6A6DF1F9F)); + get => ref _Handle.AsRef(_ScatteringOffset.Value); } + private static readonly Lazy _LocallightscaleOffset = new(() => Schema.GetOffset(0xCE352DA6D520D236), LazyThreadSafetyMode.None); + public ref float Locallightscale { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA6D520D236)); + get => ref _Handle.AsRef(_LocallightscaleOffset.Value); } + private static readonly Lazy _EnableOffset = new(() => Schema.GetOffset(0xCE352DA6AF8BB8CE), LazyThreadSafetyMode.None); + public ref bool Enable { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA6AF8BB8CE)); + get => ref _Handle.AsRef(_EnableOffset.Value); } + private static readonly Lazy _BlendOffset = new(() => Schema.GetOffset(0xCE352DA60BBC40D8), LazyThreadSafetyMode.None); + public ref bool Blend { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA60BBC40D8)); + get => ref _Handle.AsRef(_BlendOffset.Value); } + private static readonly Lazy _Padding2Offset = new(() => Schema.GetOffset(0xCE352DA6BC87772C), LazyThreadSafetyMode.None); + public ref bool Padding2 { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA6BC87772C)); + get => ref _Handle.AsRef(_Padding2Offset.Value); } + private static readonly Lazy _PaddingOffset = new(() => Schema.GetOffset(0xCE352DA6DC7CD796), LazyThreadSafetyMode.None); + public ref bool Padding { - get => ref _Handle.AsRef(Schema.GetOffset(0xCE352DA6DC7CD796)); + get => ref _Handle.AsRef(_PaddingOffset.Value); } public void DirPrimaryUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/fogplayerparams_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/fogplayerparams_tImpl.cs index 31a3de9e1..50b1e6fec 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/fogplayerparams_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/fogplayerparams_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,47 +17,75 @@ internal partial class fogplayerparams_tImpl : SchemaClass, fogplayerparams_t { public fogplayerparams_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _CtrlOffset = new(() => Schema.GetOffset(0x1BA99C4F34496C96), LazyThreadSafetyMode.None); + public ref CHandle Ctrl { - get => ref _Handle.AsRef>(Schema.GetOffset(0x1BA99C4F34496C96)); + get => ref _Handle.AsRef>(_CtrlOffset.Value); } + private static readonly Lazy _TransitionTimeOffset = new(() => Schema.GetOffset(0x1BA99C4F8D4BFC39), LazyThreadSafetyMode.None); + public ref float TransitionTime { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA99C4F8D4BFC39)); + get => ref _Handle.AsRef(_TransitionTimeOffset.Value); } + private static readonly Lazy _OldColorOffset = new(() => Schema.GetOffset(0x1BA99C4F1F716E59), LazyThreadSafetyMode.None); + public ref Color OldColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA99C4F1F716E59)); + get => ref _Handle.AsRef(_OldColorOffset.Value); } + private static readonly Lazy _OldStartOffset = new(() => Schema.GetOffset(0x1BA99C4F0740B77C), LazyThreadSafetyMode.None); + public ref float OldStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA99C4F0740B77C)); + get => ref _Handle.AsRef(_OldStartOffset.Value); } + private static readonly Lazy _OldEndOffset = new(() => Schema.GetOffset(0x1BA99C4FEE04BB65), LazyThreadSafetyMode.None); + public ref float OldEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA99C4FEE04BB65)); + get => ref _Handle.AsRef(_OldEndOffset.Value); } + private static readonly Lazy _OldMaxDensityOffset = new(() => Schema.GetOffset(0x1BA99C4FA685F86A), LazyThreadSafetyMode.None); + public ref float OldMaxDensity { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA99C4FA685F86A)); + get => ref _Handle.AsRef(_OldMaxDensityOffset.Value); } + private static readonly Lazy _OldHDRColorScaleOffset = new(() => Schema.GetOffset(0x1BA99C4F8E3D5ED1), LazyThreadSafetyMode.None); + public ref float OldHDRColorScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA99C4F8E3D5ED1)); + get => ref _Handle.AsRef(_OldHDRColorScaleOffset.Value); } + private static readonly Lazy _OldFarZOffset = new(() => Schema.GetOffset(0x1BA99C4FB28AACA1), LazyThreadSafetyMode.None); + public ref float OldFarZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA99C4FB28AACA1)); + get => ref _Handle.AsRef(_OldFarZOffset.Value); } + private static readonly Lazy _NewColorOffset = new(() => Schema.GetOffset(0x1BA99C4F855F3ED4), LazyThreadSafetyMode.None); + public ref Color NewColor { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA99C4F855F3ED4)); + get => ref _Handle.AsRef(_NewColorOffset.Value); } + private static readonly Lazy _NewStartOffset = new(() => Schema.GetOffset(0x1BA99C4FFC7C3DE5), LazyThreadSafetyMode.None); + public ref float NewStart { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA99C4FFC7C3DE5)); + get => ref _Handle.AsRef(_NewStartOffset.Value); } + private static readonly Lazy _NewEndOffset = new(() => Schema.GetOffset(0x1BA99C4F25D277DC), LazyThreadSafetyMode.None); + public ref float NewEnd { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA99C4F25D277DC)); + get => ref _Handle.AsRef(_NewEndOffset.Value); } + private static readonly Lazy _NewMaxDensityOffset = new(() => Schema.GetOffset(0x1BA99C4F0EE45F19), LazyThreadSafetyMode.None); + public ref float NewMaxDensity { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA99C4F0EE45F19)); + get => ref _Handle.AsRef(_NewMaxDensityOffset.Value); } + private static readonly Lazy _NewHDRColorScaleOffset = new(() => Schema.GetOffset(0x1BA99C4F70AAB448), LazyThreadSafetyMode.None); + public ref float NewHDRColorScale { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA99C4F70AAB448)); + get => ref _Handle.AsRef(_NewHDRColorScaleOffset.Value); } + private static readonly Lazy _NewFarZOffset = new(() => Schema.GetOffset(0x1BA99C4FDDA6CA3A), LazyThreadSafetyMode.None); + public ref float NewFarZ { - get => ref _Handle.AsRef(Schema.GetOffset(0x1BA99C4FDDA6CA3A)); + get => ref _Handle.AsRef(_NewFarZOffset.Value); } public void CtrlUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/hudtextparms_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/hudtextparms_tImpl.cs index b39bddd4f..08c0a88e6 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/hudtextparms_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/hudtextparms_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class hudtextparms_tImpl : SchemaClass, hudtextparms_t { public hudtextparms_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _Color1Offset = new(() => Schema.GetOffset(0x827B8DBF36F4EB4B), LazyThreadSafetyMode.None); + public ref Color Color1 { - get => ref _Handle.AsRef(Schema.GetOffset(0x827B8DBF36F4EB4B)); + get => ref _Handle.AsRef(_Color1Offset.Value); } + private static readonly Lazy _Color2Offset = new(() => Schema.GetOffset(0x827B8DBF37F4ECDE), LazyThreadSafetyMode.None); + public ref Color Color2 { - get => ref _Handle.AsRef(Schema.GetOffset(0x827B8DBF37F4ECDE)); + get => ref _Handle.AsRef(_Color2Offset.Value); } + private static readonly Lazy _EffectOffset = new(() => Schema.GetOffset(0x827B8DBF6E6E8D54), LazyThreadSafetyMode.None); + public ref byte Effect { - get => ref _Handle.AsRef(Schema.GetOffset(0x827B8DBF6E6E8D54)); + get => ref _Handle.AsRef(_EffectOffset.Value); } + private static readonly Lazy _ChannelOffset = new(() => Schema.GetOffset(0x827B8DBF21C252A4), LazyThreadSafetyMode.None); + public ref byte Channel { - get => ref _Handle.AsRef(Schema.GetOffset(0x827B8DBF21C252A4)); + get => ref _Handle.AsRef(_ChannelOffset.Value); } + private static readonly Lazy _XOffset = new(() => Schema.GetOffset(0x827B8DBFFD0C5087), LazyThreadSafetyMode.None); + public ref float X { - get => ref _Handle.AsRef(Schema.GetOffset(0x827B8DBFFD0C5087)); + get => ref _Handle.AsRef(_XOffset.Value); } + private static readonly Lazy _YOffset = new(() => Schema.GetOffset(0x827B8DBFFC0C4EF4), LazyThreadSafetyMode.None); + public ref float Y { - get => ref _Handle.AsRef(Schema.GetOffset(0x827B8DBFFC0C4EF4)); + get => ref _Handle.AsRef(_YOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/lerpdata_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/lerpdata_tImpl.cs index 18e3ce299..62d3cb5e9 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/lerpdata_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/lerpdata_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class lerpdata_tImpl : SchemaClass, lerpdata_t { public lerpdata_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _EntOffset = new(() => Schema.GetOffset(0x70C58DAB8BBDB334), LazyThreadSafetyMode.None); + public ref CHandle Ent { - get => ref _Handle.AsRef>(Schema.GetOffset(0x70C58DAB8BBDB334)); + get => ref _Handle.AsRef>(_EntOffset.Value); } + private static readonly Lazy _MoveTypeOffset = new(() => Schema.GetOffset(0x70C58DAB90BCCC1C), LazyThreadSafetyMode.None); + public ref MoveType_t MoveType { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C58DAB90BCCC1C)); + get => ref _Handle.AsRef(_MoveTypeOffset.Value); } + private static readonly Lazy _StartTimeOffset = new(() => Schema.GetOffset(0x70C58DAB67FE9DC4), LazyThreadSafetyMode.None); + public GameTime_t StartTime { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0x70C58DAB67FE9DC4)); + get => new GameTime_tImpl(_Handle + _StartTimeOffset.Value); } + private static readonly Lazy _StartOriginOffset = new(() => Schema.GetOffset(0x70C58DAB7C574331), LazyThreadSafetyMode.None); + public ref Vector StartOrigin { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C58DAB7C574331)); + get => ref _Handle.AsRef(_StartOriginOffset.Value); } + private static readonly Lazy _StartRotOffset = new(() => Schema.GetOffset(0x70C58DAB6246A06D), LazyThreadSafetyMode.None); + public ref Quaternion StartRot { - get => ref _Handle.AsRef(Schema.GetOffset(0x70C58DAB6246A06D)); + get => ref _Handle.AsRef(_StartRotOffset.Value); } + private static readonly Lazy _FXIndexOffset = new(() => Schema.GetOffset(0x70C58DAB1E8452FD), LazyThreadSafetyMode.None); + public ParticleIndex_t FXIndex { - get => new ParticleIndex_tImpl(_Handle + Schema.GetOffset(0x70C58DAB1E8452FD)); + get => new ParticleIndex_tImpl(_Handle + _FXIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/locksound_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/locksound_tImpl.cs index 47964b93d..fa8d7920f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/locksound_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/locksound_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,22 +17,28 @@ internal partial class locksound_tImpl : SchemaClass, locksound_t { public locksound_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _LockedSoundOffset = new(() => Schema.GetOffset(0xDAD0AE229881D7AB), LazyThreadSafetyMode.None); + public string LockedSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDAD0AE229881D7AB)); + var ptr = _Handle.Read(_LockedSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDAD0AE229881D7AB, value); + set => Schema.SetString(_Handle, _LockedSoundOffset.Value, value); } + private static readonly Lazy _UnlockedSoundOffset = new(() => Schema.GetOffset(0xDAD0AE227EE88276), LazyThreadSafetyMode.None); + public string UnlockedSound { get { - var ptr = _Handle.Read(Schema.GetOffset(0xDAD0AE227EE88276)); + var ptr = _Handle.Read(_UnlockedSoundOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0xDAD0AE227EE88276, value); + set => Schema.SetString(_Handle, _UnlockedSoundOffset.Value, value); } + private static readonly Lazy _FlwaitSoundOffset = new(() => Schema.GetOffset(0xDAD0AE2297A4A845), LazyThreadSafetyMode.None); + public GameTime_t FlwaitSound { - get => new GameTime_tImpl(_Handle + Schema.GetOffset(0xDAD0AE2297A4A845)); + get => new GameTime_tImpl(_Handle + _FlwaitSoundOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/magnetted_objects_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/magnetted_objects_tImpl.cs index df4af1292..21e8447b4 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/magnetted_objects_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/magnetted_objects_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class magnetted_objects_tImpl : SchemaClass, magnetted_objects_ public magnetted_objects_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _EntityOffset = new(() => Schema.GetOffset(0x494D696825B27FD0), LazyThreadSafetyMode.None); + public ref CHandle Entity { - get => ref _Handle.AsRef>(Schema.GetOffset(0x494D696825B27FD0)); + get => ref _Handle.AsRef>(_EntityOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ragdoll_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ragdoll_tImpl.cs index 765afea52..95688d40c 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ragdoll_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ragdoll_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,20 +17,30 @@ internal partial class ragdoll_tImpl : SchemaClass, ragdoll_t { public ragdoll_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ListOffset = new(() => Schema.GetOffset(0xC7E89F530CFB5881), LazyThreadSafetyMode.None); + public ref CUtlVector List { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC7E89F530CFB5881)); + get => ref _Handle.AsRef>(_ListOffset.Value); } + private static readonly Lazy _HierarchyJointsOffset = new(() => Schema.GetOffset(0xC7E89F534421F4B5), LazyThreadSafetyMode.None); + public ref CUtlVector HierarchyJoints { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC7E89F534421F4B5)); + get => ref _Handle.AsRef>(_HierarchyJointsOffset.Value); } + private static readonly Lazy _BoneIndexOffset = new(() => Schema.GetOffset(0xC7E89F534FEF9075), LazyThreadSafetyMode.None); + public ref CUtlVector BoneIndex { - get => ref _Handle.AsRef>(Schema.GetOffset(0xC7E89F534FEF9075)); + get => ref _Handle.AsRef>(_BoneIndexOffset.Value); } + private static readonly Lazy _AllowStretchOffset = new(() => Schema.GetOffset(0xC7E89F5350E37D6F), LazyThreadSafetyMode.None); + public ref bool AllowStretch { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7E89F5350E37D6F)); + get => ref _Handle.AsRef(_AllowStretchOffset.Value); } + private static readonly Lazy _UnusedOffset = new(() => Schema.GetOffset(0xC7E89F5385CF281B), LazyThreadSafetyMode.None); + public ref bool Unused { - get => ref _Handle.AsRef(Schema.GetOffset(0xC7E89F5385CF281B)); + get => ref _Handle.AsRef(_UnusedOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ragdollelement_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ragdollelement_tImpl.cs index a0ede21bd..bae36c905 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ragdollelement_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ragdollelement_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class ragdollelement_tImpl : SchemaClass, ragdollelement_t { public ragdollelement_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _OriginParentSpaceOffset = new(() => Schema.GetOffset(0x6DFDA0AB476AA8AB), LazyThreadSafetyMode.None); + public ref Vector OriginParentSpace { - get => ref _Handle.AsRef(Schema.GetOffset(0x6DFDA0AB476AA8AB)); + get => ref _Handle.AsRef(_OriginParentSpaceOffset.Value); } + private static readonly Lazy _ParentIndexOffset = new(() => Schema.GetOffset(0x6DFDA0ABFE49C863), LazyThreadSafetyMode.None); + public ref int ParentIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x6DFDA0ABFE49C863)); + get => ref _Handle.AsRef(_ParentIndexOffset.Value); } + private static readonly Lazy _RadiusOffset = new(() => Schema.GetOffset(0x6DFDA0AB5ACFC08D), LazyThreadSafetyMode.None); + public ref float Radius { - get => ref _Handle.AsRef(Schema.GetOffset(0x6DFDA0AB5ACFC08D)); + get => ref _Handle.AsRef(_RadiusOffset.Value); } + private static readonly Lazy _HeightOffset = new(() => Schema.GetOffset(0x6DFDA0ABCAB61C56), LazyThreadSafetyMode.None); + public ref int Height { - get => ref _Handle.AsRef(Schema.GetOffset(0x6DFDA0ABCAB61C56)); + get => ref _Handle.AsRef(_HeightOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ragdollhierarchyjoint_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ragdollhierarchyjoint_tImpl.cs index d165e8532..5f5c8e626 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/ragdollhierarchyjoint_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/ragdollhierarchyjoint_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,11 +17,15 @@ internal partial class ragdollhierarchyjoint_tImpl : SchemaClass, ragdollhierarc public ragdollhierarchyjoint_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ParentIndexOffset = new(() => Schema.GetOffset(0x3D7AD556FE49C863), LazyThreadSafetyMode.None); + public ref int ParentIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D7AD556FE49C863)); + get => ref _Handle.AsRef(_ParentIndexOffset.Value); } + private static readonly Lazy _ChildIndexOffset = new(() => Schema.GetOffset(0x3D7AD556226EC483), LazyThreadSafetyMode.None); + public ref int ChildIndex { - get => ref _Handle.AsRef(Schema.GetOffset(0x3D7AD556226EC483)); + get => ref _Handle.AsRef(_ChildIndexOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/shard_model_desc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/shard_model_desc_tImpl.cs index e744828a9..75c39d020 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/shard_model_desc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/shard_model_desc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,44 +17,70 @@ internal partial class shard_model_desc_tImpl : SchemaClass, shard_model_desc_t public shard_model_desc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ModelIDOffset = new(() => Schema.GetOffset(0x89B25B20B2007E9B), LazyThreadSafetyMode.None); + public ref int ModelID { - get => ref _Handle.AsRef(Schema.GetOffset(0x89B25B20B2007E9B)); + get => ref _Handle.AsRef(_ModelIDOffset.Value); } + private static readonly Lazy _MaterialBaseOffset = new(() => Schema.GetOffset(0x89B25B201F6E1593), LazyThreadSafetyMode.None); + public ref CStrongHandle MaterialBase { - get => ref _Handle.AsRef>(Schema.GetOffset(0x89B25B201F6E1593)); + get => ref _Handle.AsRef>(_MaterialBaseOffset.Value); } + private static readonly Lazy _MaterialDamageOverlayOffset = new(() => Schema.GetOffset(0x89B25B200B167839), LazyThreadSafetyMode.None); + public ref CStrongHandle MaterialDamageOverlay { - get => ref _Handle.AsRef>(Schema.GetOffset(0x89B25B200B167839)); + get => ref _Handle.AsRef>(_MaterialDamageOverlayOffset.Value); } + private static readonly Lazy _SolidOffset = new(() => Schema.GetOffset(0x89B25B20F14DA214), LazyThreadSafetyMode.None); + public ref ShardSolid_t Solid { - get => ref _Handle.AsRef(Schema.GetOffset(0x89B25B20F14DA214)); + get => ref _Handle.AsRef(_SolidOffset.Value); } + private static readonly Lazy _PanelSizeOffset = new(() => Schema.GetOffset(0x89B25B20E61D2D9C), LazyThreadSafetyMode.None); + public ref Vector2D PanelSize { - get => ref _Handle.AsRef(Schema.GetOffset(0x89B25B20E61D2D9C)); + get => ref _Handle.AsRef(_PanelSizeOffset.Value); } + private static readonly Lazy _StressPositionAOffset = new(() => Schema.GetOffset(0x89B25B20107A2271), LazyThreadSafetyMode.None); + public ref Vector2D StressPositionA { - get => ref _Handle.AsRef(Schema.GetOffset(0x89B25B20107A2271)); + get => ref _Handle.AsRef(_StressPositionAOffset.Value); } + private static readonly Lazy _StressPositionBOffset = new(() => Schema.GetOffset(0x89B25B200D7A1DB8), LazyThreadSafetyMode.None); + public ref Vector2D StressPositionB { - get => ref _Handle.AsRef(Schema.GetOffset(0x89B25B200D7A1DB8)); + get => ref _Handle.AsRef(_StressPositionBOffset.Value); } + private static readonly Lazy _PanelVerticesOffset = new(() => Schema.GetOffset(0x89B25B2049BB3ECE), LazyThreadSafetyMode.None); + public ref CUtlVector PanelVertices { - get => ref _Handle.AsRef>(Schema.GetOffset(0x89B25B2049BB3ECE)); + get => ref _Handle.AsRef>(_PanelVerticesOffset.Value); } + private static readonly Lazy _InitialPanelVerticesOffset = new(() => Schema.GetOffset(0x89B25B2039117F58), LazyThreadSafetyMode.None); + public ref CUtlVector InitialPanelVertices { - get => ref _Handle.AsRef>(Schema.GetOffset(0x89B25B2039117F58)); + get => ref _Handle.AsRef>(_InitialPanelVerticesOffset.Value); } + private static readonly Lazy _GlassHalfThicknessOffset = new(() => Schema.GetOffset(0x89B25B20359D8B9E), LazyThreadSafetyMode.None); + public ref float GlassHalfThickness { - get => ref _Handle.AsRef(Schema.GetOffset(0x89B25B20359D8B9E)); + get => ref _Handle.AsRef(_GlassHalfThicknessOffset.Value); } + private static readonly Lazy _HasParentOffset = new(() => Schema.GetOffset(0x89B25B20A613E04B), LazyThreadSafetyMode.None); + public ref bool HasParent { - get => ref _Handle.AsRef(Schema.GetOffset(0x89B25B20A613E04B)); + get => ref _Handle.AsRef(_HasParentOffset.Value); } + private static readonly Lazy _ParentFrozenOffset = new(() => Schema.GetOffset(0x89B25B206FE526AB), LazyThreadSafetyMode.None); + public ref bool ParentFrozen { - get => ref _Handle.AsRef(Schema.GetOffset(0x89B25B206FE526AB)); + get => ref _Handle.AsRef(_ParentFrozenOffset.Value); } + private static readonly Lazy _SurfacePropStringTokenOffset = new(() => Schema.GetOffset(0x89B25B2055336E6D), LazyThreadSafetyMode.None); + public ref CUtlStringToken SurfacePropStringToken { - get => ref _Handle.AsRef(Schema.GetOffset(0x89B25B2055336E6D)); + get => ref _Handle.AsRef(_SurfacePropStringTokenOffset.Value); } public void ModelIDUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/sky3dparams_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/sky3dparams_tImpl.cs index 9750c42b1..6cb2869bf 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/sky3dparams_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/sky3dparams_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,23 +17,35 @@ internal partial class sky3dparams_tImpl : SchemaClass, sky3dparams_t { public sky3dparams_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _ScaleOffset = new(() => Schema.GetOffset(0x49687CC482971C71), LazyThreadSafetyMode.None); + public ref short Scale { - get => ref _Handle.AsRef(Schema.GetOffset(0x49687CC482971C71)); + get => ref _Handle.AsRef(_ScaleOffset.Value); } + private static readonly Lazy _OriginOffset = new(() => Schema.GetOffset(0x49687CC4D97F9A4F), LazyThreadSafetyMode.None); + public ref Vector Origin { - get => ref _Handle.AsRef(Schema.GetOffset(0x49687CC4D97F9A4F)); + get => ref _Handle.AsRef(_OriginOffset.Value); } + private static readonly Lazy _Clip3DSkyBoxNearToWorldFarOffset = new(() => Schema.GetOffset(0x49687CC482943804), LazyThreadSafetyMode.None); + public ref bool Clip3DSkyBoxNearToWorldFar { - get => ref _Handle.AsRef(Schema.GetOffset(0x49687CC482943804)); + get => ref _Handle.AsRef(_Clip3DSkyBoxNearToWorldFarOffset.Value); } + private static readonly Lazy _Clip3DSkyBoxNearToWorldFarOffsetOffset = new(() => Schema.GetOffset(0x49687CC49D6E9441), LazyThreadSafetyMode.None); + public ref float Clip3DSkyBoxNearToWorldFarOffset { - get => ref _Handle.AsRef(Schema.GetOffset(0x49687CC49D6E9441)); + get => ref _Handle.AsRef(_Clip3DSkyBoxNearToWorldFarOffsetOffset.Value); } + private static readonly Lazy _FogOffset = new(() => Schema.GetOffset(0x49687CC4A1F3723F), LazyThreadSafetyMode.None); + public fogparams_t Fog { - get => new fogparams_tImpl(_Handle + Schema.GetOffset(0x49687CC4A1F3723F)); + get => new fogparams_tImpl(_Handle + _FogOffset.Value); } + private static readonly Lazy _WorldGroupIDOffset = new(() => Schema.GetOffset(0x49687CC49414E3F3), LazyThreadSafetyMode.None); + public ref uint WorldGroupID { - get => ref _Handle.AsRef(Schema.GetOffset(0x49687CC49414E3F3)); + get => ref _Handle.AsRef(_WorldGroupIDOffset.Value); } public void ScaleUpdated() { diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/sndopvarlatchdata_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/sndopvarlatchdata_tImpl.cs index 2a36cb1d2..7db34a726 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/sndopvarlatchdata_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/sndopvarlatchdata_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,32 +17,42 @@ internal partial class sndopvarlatchdata_tImpl : SchemaClass, sndopvarlatchdata_ public sndopvarlatchdata_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _StackOffset = new(() => Schema.GetOffset(0x8347C0D511ACB037), LazyThreadSafetyMode.None); + public string Stack { get { - var ptr = _Handle.Read(Schema.GetOffset(0x8347C0D511ACB037)); + var ptr = _Handle.Read(_StackOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x8347C0D511ACB037, value); + set => Schema.SetString(_Handle, _StackOffset.Value, value); } + private static readonly Lazy _OperatorOffset = new(() => Schema.GetOffset(0x8347C0D55D107B55), LazyThreadSafetyMode.None); + public string Operator { get { - var ptr = _Handle.Read(Schema.GetOffset(0x8347C0D55D107B55)); + var ptr = _Handle.Read(_OperatorOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x8347C0D55D107B55, value); + set => Schema.SetString(_Handle, _OperatorOffset.Value, value); } + private static readonly Lazy _OpvarOffset = new(() => Schema.GetOffset(0x8347C0D508A9F41F), LazyThreadSafetyMode.None); + public string Opvar { get { - var ptr = _Handle.Read(Schema.GetOffset(0x8347C0D508A9F41F)); + var ptr = _Handle.Read(_OpvarOffset.Value); return Schema.GetString(ptr); } - set => Schema.SetString(_Handle, 0x8347C0D508A9F41F, value); + set => Schema.SetString(_Handle, _OpvarOffset.Value, value); } + private static readonly Lazy _ValOffset = new(() => Schema.GetOffset(0x8347C0D5E31D0C86), LazyThreadSafetyMode.None); + public ref float Val { - get => ref _Handle.AsRef(Schema.GetOffset(0x8347C0D5E31D0C86)); + get => ref _Handle.AsRef(_ValOffset.Value); } + private static readonly Lazy _PosOffset = new(() => Schema.GetOffset(0x8347C0D5DE9CFC5D), LazyThreadSafetyMode.None); + public ref Vector Pos { - get => ref _Handle.AsRef(Schema.GetOffset(0x8347C0D5DE9CFC5D)); + get => ref _Handle.AsRef(_PosOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/thinkfunc_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/thinkfunc_tImpl.cs index 31486aa08..6237faf05 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/thinkfunc_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/thinkfunc_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,17 +17,25 @@ internal partial class thinkfunc_tImpl : SchemaClass, thinkfunc_t { public thinkfunc_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _FnOffset = new(() => Schema.GetOffset(0x8ED693FAD922E237), LazyThreadSafetyMode.None); + public SchemaUntypedField Fn { - get => new SchemaUntypedField(_Handle + Schema.GetOffset(0x8ED693FAD922E237)); + get => new SchemaUntypedField(_Handle + _FnOffset.Value); } + private static readonly Lazy _ContextOffset = new(() => Schema.GetOffset(0x8ED693FAB16905F8), LazyThreadSafetyMode.None); + public ref CUtlStringToken Context { - get => ref _Handle.AsRef(Schema.GetOffset(0x8ED693FAB16905F8)); + get => ref _Handle.AsRef(_ContextOffset.Value); } + private static readonly Lazy _NextThinkTickOffset = new(() => Schema.GetOffset(0x8ED693FAB7CEF021), LazyThreadSafetyMode.None); + public GameTick_t NextThinkTick { - get => new GameTick_tImpl(_Handle + Schema.GetOffset(0x8ED693FAB7CEF021)); + get => new GameTick_tImpl(_Handle + _NextThinkTickOffset.Value); } + private static readonly Lazy _LastThinkTickOffset = new(() => Schema.GetOffset(0x8ED693FACE8FE7F2), LazyThreadSafetyMode.None); + public GameTick_t LastThinkTick { - get => new GameTick_tImpl(_Handle + Schema.GetOffset(0x8ED693FACE8FE7F2)); + get => new GameTick_tImpl(_Handle + _LastThinkTickOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Classes/vphysics_save_cphysicsbody_tImpl.cs b/managed/src/SwiftlyS2.Generated/Schemas/Classes/vphysics_save_cphysicsbody_tImpl.cs index 712effadf..2d3651213 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Classes/vphysics_save_cphysicsbody_tImpl.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Classes/vphysics_save_cphysicsbody_tImpl.cs @@ -2,6 +2,8 @@ #pragma warning disable CS0108 #nullable enable +using System; +using System.Threading; using SwiftlyS2.Core.Schemas; using SwiftlyS2.Shared.Schemas; using SwiftlyS2.Shared.SchemaDefinitions; @@ -15,8 +17,10 @@ internal partial class vphysics_save_cphysicsbody_tImpl : RnBodyDesc_tImpl, vphy public vphysics_save_cphysicsbody_tImpl(nint handle) : base(handle) { } + private static readonly Lazy _OldPointerOffset = new(() => Schema.GetOffset(0xC6818B0AA60623F3), LazyThreadSafetyMode.None); + public ref ulong OldPointer { - get => ref _Handle.AsRef(Schema.GetOffset(0xC6818B0AA60623F3)); + get => ref _Handle.AsRef(_OldPointerOffset.Value); } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Enums/WeaponGameplayAnimState.cs b/managed/src/SwiftlyS2.Generated/Schemas/Enums/WeaponGameplayAnimState.cs index aa441fe70..cc9178470 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Enums/WeaponGameplayAnimState.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Enums/WeaponGameplayAnimState.cs @@ -58,7 +58,11 @@ public enum WeaponGameplayAnimState : ushort { WPN_ANIMSTATE_INSPECT_OUTRO = 1001, - WPN_ANIMSTATE_END_VALID = 1100, + WPN_ANIMSTATE_INVENTORY_UI_TUMBLE = 1500, - WEAPON_LEGACY_STATE_CLEAR_FIRING = 1101, + WPN_ANIMSTATE_INVENTORY_UI_KEYCHAIN_APPLY = 1501, + + WPN_ANIMSTATE_END_VALID = 2000, + + WEAPON_LEGACY_STATE_CLEAR_FIRING = 2001, } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Interfaces/CCS2WeaponGraphController.cs b/managed/src/SwiftlyS2.Generated/Schemas/Interfaces/CCS2WeaponGraphController.cs index 5e21ee375..c28824931 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Interfaces/CCS2WeaponGraphController.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Interfaces/CCS2WeaponGraphController.cs @@ -11,7 +11,7 @@ namespace SwiftlyS2.Shared.SchemaDefinitions; public partial interface CCS2WeaponGraphController : CAnimGraphControllerBase, ISchemaClass { static CCS2WeaponGraphController ISchemaClass.From(nint handle) => new CCS2WeaponGraphControllerImpl(handle); - static int ISchemaClass.Size => 1512; + static int ISchemaClass.Size => 1536; // CAnimGraph2ParamOptionalRef< CGlobalSymbol > @@ -20,6 +20,9 @@ public partial interface CCS2WeaponGraphController : CAnimGraphControllerBase, I // CAnimGraph2ParamOptionalRef< bool > public SchemaUntypedField ActionReset { get; } + // CAnimGraph2ParamOptionalRef< float32 > + public SchemaUntypedField WeaponActionSpeedScale { get; } + // CAnimGraph2ParamOptionalRef< CGlobalSymbol > public SchemaUntypedField WeaponCategory { get; } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Interfaces/CCSPlayer_WeaponServices.cs b/managed/src/SwiftlyS2.Generated/Schemas/Interfaces/CCSPlayer_WeaponServices.cs index b8273d6fc..8e2425530 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Interfaces/CCSPlayer_WeaponServices.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Interfaces/CCSPlayer_WeaponServices.cs @@ -11,7 +11,7 @@ namespace SwiftlyS2.Shared.SchemaDefinitions; public partial interface CCSPlayer_WeaponServices : CPlayer_WeaponServices, ISchemaClass { static CCSPlayer_WeaponServices ISchemaClass.From(nint handle) => new CCSPlayer_WeaponServicesImpl(handle); - static int ISchemaClass.Size => 6368; + static int ISchemaClass.Size => 6392; public GameTime_t NextAttack { get; } diff --git a/managed/src/SwiftlyS2.Generated/Schemas/Interfaces/CDecalInstance.cs b/managed/src/SwiftlyS2.Generated/Schemas/Interfaces/CDecalInstance.cs index c2629f815..5b5a04b7f 100644 --- a/managed/src/SwiftlyS2.Generated/Schemas/Interfaces/CDecalInstance.cs +++ b/managed/src/SwiftlyS2.Generated/Schemas/Interfaces/CDecalInstance.cs @@ -44,6 +44,8 @@ public partial interface CDecalInstance : ISchemaClass { public ref float AnimationScale { get; } + public ref float AnimationStartTime { get; } + public GameTime_t PlaceTime { get; } public ref float FadeStartTime { get; } diff --git a/managed/src/SwiftlyS2.Generated/SteamAPI/Types/SteamClientPublic/CSteamID.cs b/managed/src/SwiftlyS2.Generated/SteamAPI/Types/SteamClientPublic/CSteamID.cs index 40adc8291..f864c6cea 100644 --- a/managed/src/SwiftlyS2.Generated/SteamAPI/Types/SteamClientPublic/CSteamID.cs +++ b/managed/src/SwiftlyS2.Generated/SteamAPI/Types/SteamClientPublic/CSteamID.cs @@ -1,301 +1,433 @@ using System.Runtime.InteropServices; -using IntPtr = System.IntPtr; +using System.Text.RegularExpressions; -namespace SwiftlyS2.Shared.SteamAPI +namespace SwiftlyS2.Shared.SteamAPI; + +public partial class SteamIdParser { - [System.Serializable] - [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 4)] - public struct CSteamID : System.IEquatable, System.IComparable - { - public static readonly CSteamID Nil = new CSteamID(); - public static readonly CSteamID OutofDateGS = new CSteamID(new AccountID_t(0), 0, EUniverse.k_EUniverseInvalid, EAccountType.k_EAccountTypeInvalid); - public static readonly CSteamID LanModeGS = new CSteamID(new AccountID_t(0), 0, EUniverse.k_EUniversePublic, EAccountType.k_EAccountTypeInvalid); - public static readonly CSteamID NotInitYetGS = new CSteamID(new AccountID_t(1), 0, EUniverse.k_EUniverseInvalid, EAccountType.k_EAccountTypeInvalid); - public static readonly CSteamID NonSteamGS = new CSteamID(new AccountID_t(2), 0, EUniverse.k_EUniverseInvalid, EAccountType.k_EAccountTypeInvalid); - public ulong m_SteamID; - - public CSteamID(AccountID_t unAccountID, EUniverse eUniverse, EAccountType eAccountType) - { - m_SteamID = 0; - Set(unAccountID, eUniverse, eAccountType); - } + private const ulong STEAM_ID_BASE = 76561197960265728; - public CSteamID(AccountID_t unAccountID, uint unAccountInstance, EUniverse eUniverse, EAccountType eAccountType) - { - m_SteamID = 0; + private static readonly Regex SteamId64Regex = MyRegex(); + private static readonly Regex SteamIdRegex = MyRegex1(); + private static readonly Regex SteamId3Regex = MyRegex2(); + + public static ulong? ParseToSteamId64( string input ) + { + if (string.IsNullOrWhiteSpace(input)) + return null; + + input = input.Trim(); + + if (TryParseSteamId64(input, out var steamId64)) + return steamId64; + + if (TryParseSteamId(input, out steamId64)) + return steamId64; + + if (TryParseSteamId3(input, out steamId64)) + return steamId64; + + return null; + } + + private static bool TryParseSteamId64( string input, out ulong steamId64 ) + { + steamId64 = 0; + + if (!SteamId64Regex.IsMatch(input)) + return false; + + return ulong.TryParse(input, out steamId64) && steamId64 >= STEAM_ID_BASE; + } + + private static bool TryParseSteamId( string input, out ulong steamId64 ) + { + steamId64 = 0; + + var match = SteamIdRegex.Match(input); + if (!match.Success) + return false; + + if (!uint.TryParse(match.Groups[1].Value, out uint y)) + return false; + + if (!uint.TryParse(match.Groups[2].Value, out uint z)) + return false; + + if (y > 1) + return false; + + steamId64 = STEAM_ID_BASE + (z * 2) + y; + return true; + } + + private static bool TryParseSteamId3( string input, out ulong steamId64 ) + { + steamId64 = 0; + + var match = SteamId3Regex.Match(input); + if (!match.Success) + return false; + + if (!uint.TryParse(match.Groups[1].Value, out uint accountId)) + return false; + + steamId64 = STEAM_ID_BASE + accountId; + return true; + } + + public static bool IsValidSteamId64( ulong steamId64 ) + { + return steamId64 >= STEAM_ID_BASE; + } + + public static string ToSteamId( ulong steamId64 ) + { + if (!IsValidSteamId64(steamId64)) + return null; + + var accountId = steamId64 - STEAM_ID_BASE; + var y = accountId % 2; + var z = accountId / 2; + + return $"STEAM_0:{y}:{z}"; + } + + public static string ToSteamId3( ulong steamId64 ) + { + if (!IsValidSteamId64(steamId64)) + return null; + + var accountId = steamId64 - STEAM_ID_BASE; + return $"[U:1:{accountId}]"; + } + + [GeneratedRegex(@"^7656119[0-9]{10}$")] + private static partial Regex MyRegex(); + + [GeneratedRegex(@"^STEAM_[0-5]:([0-1]):([0-9]+)$")] + private static partial Regex MyRegex1(); + + [GeneratedRegex(@"^\[U:1:([0-9]+)\]$")] + private static partial Regex MyRegex2(); +} + + +[Serializable] +[StructLayout(LayoutKind.Sequential, Pack = 4)] +public struct CSteamID : IEquatable, IComparable +{ + public static readonly CSteamID Nil = new(); + public static readonly CSteamID OutofDateGS = new(new AccountID_t(0), 0, EUniverse.k_EUniverseInvalid, EAccountType.k_EAccountTypeInvalid); + public static readonly CSteamID LanModeGS = new(new AccountID_t(0), 0, EUniverse.k_EUniversePublic, EAccountType.k_EAccountTypeInvalid); + public static readonly CSteamID NotInitYetGS = new(new AccountID_t(1), 0, EUniverse.k_EUniverseInvalid, EAccountType.k_EAccountTypeInvalid); + public static readonly CSteamID NonSteamGS = new(new AccountID_t(2), 0, EUniverse.k_EUniverseInvalid, EAccountType.k_EAccountTypeInvalid); + public ulong m_SteamID; + + public CSteamID( AccountID_t unAccountID, EUniverse eUniverse, EAccountType eAccountType ) + { + m_SteamID = 0; + Set(unAccountID, eUniverse, eAccountType); + } + + public CSteamID( AccountID_t unAccountID, uint unAccountInstance, EUniverse eUniverse, EAccountType eAccountType ) + { + m_SteamID = 0; #if _SERVER && Assert Assert( ! ( ( EAccountType.k_EAccountTypeIndividual == eAccountType ) && ( unAccountInstance > k_unSteamUserWebInstance ) ) ); // enforce that for individual accounts, instance is always 1 #endif // _SERVER - InstancedSet(unAccountID, unAccountInstance, eUniverse, eAccountType); - } - - public CSteamID(ulong ulSteamID) - { - m_SteamID = ulSteamID; - } + InstancedSet(unAccountID, unAccountInstance, eUniverse, eAccountType); + } - public void Set(AccountID_t unAccountID, EUniverse eUniverse, EAccountType eAccountType) - { - SetAccountID(unAccountID); - SetEUniverse(eUniverse); - SetEAccountType(eAccountType); - - if (eAccountType == EAccountType.k_EAccountTypeClan || eAccountType == EAccountType.k_EAccountTypeGameServer) - { - SetAccountInstance(0); - } - else - { - SetAccountInstance(Constants.k_unSteamUserDefaultInstance); - } - } + public CSteamID( ulong ulSteamID ) + { + m_SteamID = ulSteamID; + } - public void InstancedSet(AccountID_t unAccountID, uint unInstance, EUniverse eUniverse, EAccountType eAccountType) - { - SetAccountID(unAccountID); - SetEUniverse(eUniverse); - SetEAccountType(eAccountType); - SetAccountInstance(unInstance); - } + public CSteamID( string sSteamID ) + { + m_SteamID = SteamIdParser.ParseToSteamId64(sSteamID) ?? 0; + } - public void Clear() - { - m_SteamID = 0; - } + public void Set( AccountID_t unAccountID, EUniverse eUniverse, EAccountType eAccountType ) + { + SetAccountID(unAccountID); + SetEUniverse(eUniverse); + SetEAccountType(eAccountType); - public void CreateBlankAnonLogon(EUniverse eUniverse) + if (eAccountType == EAccountType.k_EAccountTypeClan || eAccountType == EAccountType.k_EAccountTypeGameServer) { - SetAccountID(new AccountID_t(0)); - SetEUniverse(eUniverse); - SetEAccountType(EAccountType.k_EAccountTypeAnonGameServer); SetAccountInstance(0); } - - public void CreateBlankAnonUserLogon(EUniverse eUniverse) + else { - SetAccountID(new AccountID_t(0)); - SetEUniverse(eUniverse); - SetEAccountType(EAccountType.k_EAccountTypeAnonUser); - SetAccountInstance(0); + SetAccountInstance(Constants.k_unSteamUserDefaultInstance); } + } - //----------------------------------------------------------------------------- - // Purpose: Is this an anonymous game server login that will be filled in? - //----------------------------------------------------------------------------- - public bool BBlankAnonAccount() - { - return GetAccountID() == new AccountID_t(0) && BAnonAccount() && GetUnAccountInstance() == 0; - } + public void InstancedSet( AccountID_t unAccountID, uint unInstance, EUniverse eUniverse, EAccountType eAccountType ) + { + SetAccountID(unAccountID); + SetEUniverse(eUniverse); + SetEAccountType(eAccountType); + SetAccountInstance(unInstance); + } - //----------------------------------------------------------------------------- - // Purpose: Is this a game server account id? (Either persistent or anonymous) - //----------------------------------------------------------------------------- - public bool BGameServerAccount() - { - return GetEAccountType() == EAccountType.k_EAccountTypeGameServer || GetEAccountType() == EAccountType.k_EAccountTypeAnonGameServer; - } + public void Clear() + { + m_SteamID = 0; + } - //----------------------------------------------------------------------------- - // Purpose: Is this a persistent (not anonymous) game server account id? - //----------------------------------------------------------------------------- - public bool BPersistentGameServerAccount() - { - return GetEAccountType() == EAccountType.k_EAccountTypeGameServer; - } + public void CreateBlankAnonLogon( EUniverse eUniverse ) + { + SetAccountID(new AccountID_t(0)); + SetEUniverse(eUniverse); + SetEAccountType(EAccountType.k_EAccountTypeAnonGameServer); + SetAccountInstance(0); + } - //----------------------------------------------------------------------------- - // Purpose: Is this an anonymous game server account id? - //----------------------------------------------------------------------------- - public bool BAnonGameServerAccount() - { - return GetEAccountType() == EAccountType.k_EAccountTypeAnonGameServer; - } + public void CreateBlankAnonUserLogon( EUniverse eUniverse ) + { + SetAccountID(new AccountID_t(0)); + SetEUniverse(eUniverse); + SetEAccountType(EAccountType.k_EAccountTypeAnonUser); + SetAccountInstance(0); + } - //----------------------------------------------------------------------------- - // Purpose: Is this a content server account id? - //----------------------------------------------------------------------------- - public bool BContentServerAccount() - { - return GetEAccountType() == EAccountType.k_EAccountTypeContentServer; - } + //----------------------------------------------------------------------------- + // Purpose: Is this an anonymous game server login that will be filled in? + //----------------------------------------------------------------------------- + public bool BBlankAnonAccount() + { + return GetAccountID() == new AccountID_t(0) && BAnonAccount() && GetUnAccountInstance() == 0; + } + //----------------------------------------------------------------------------- + // Purpose: Is this a game server account id? (Either persistent or anonymous) + //----------------------------------------------------------------------------- + public bool BGameServerAccount() + { + return GetEAccountType() == EAccountType.k_EAccountTypeGameServer || GetEAccountType() == EAccountType.k_EAccountTypeAnonGameServer; + } - //----------------------------------------------------------------------------- - // Purpose: Is this a clan account id? - //----------------------------------------------------------------------------- - public bool BClanAccount() - { - return GetEAccountType() == EAccountType.k_EAccountTypeClan; - } + //----------------------------------------------------------------------------- + // Purpose: Is this a persistent (not anonymous) game server account id? + //----------------------------------------------------------------------------- + public bool BPersistentGameServerAccount() + { + return GetEAccountType() == EAccountType.k_EAccountTypeGameServer; + } + //----------------------------------------------------------------------------- + // Purpose: Is this an anonymous game server account id? + //----------------------------------------------------------------------------- + public bool BAnonGameServerAccount() + { + return GetEAccountType() == EAccountType.k_EAccountTypeAnonGameServer; + } - //----------------------------------------------------------------------------- - // Purpose: Is this a chat account id? - //----------------------------------------------------------------------------- - public bool BChatAccount() - { - return GetEAccountType() == EAccountType.k_EAccountTypeChat; - } + //----------------------------------------------------------------------------- + // Purpose: Is this a content server account id? + //----------------------------------------------------------------------------- + public bool BContentServerAccount() + { + return GetEAccountType() == EAccountType.k_EAccountTypeContentServer; + } - //----------------------------------------------------------------------------- - // Purpose: Is this a chat account id? - //----------------------------------------------------------------------------- - public bool IsLobby() - { - return (GetEAccountType() == EAccountType.k_EAccountTypeChat) - && (GetUnAccountInstance() & (int)EChatSteamIDInstanceFlags.k_EChatInstanceFlagLobby) != 0; - } + + //----------------------------------------------------------------------------- + // Purpose: Is this a clan account id? + //----------------------------------------------------------------------------- + public bool BClanAccount() + { + return GetEAccountType() == EAccountType.k_EAccountTypeClan; + } - //----------------------------------------------------------------------------- - // Purpose: Is this an individual user account id? - //----------------------------------------------------------------------------- - public bool BIndividualAccount() - { - return GetEAccountType() == EAccountType.k_EAccountTypeIndividual || GetEAccountType() == EAccountType.k_EAccountTypeConsoleUser; - } + //----------------------------------------------------------------------------- + // Purpose: Is this a chat account id? + //----------------------------------------------------------------------------- + public bool BChatAccount() + { + return GetEAccountType() == EAccountType.k_EAccountTypeChat; + } + //----------------------------------------------------------------------------- + // Purpose: Is this a chat account id? + //----------------------------------------------------------------------------- + public bool IsLobby() + { + return (GetEAccountType() == EAccountType.k_EAccountTypeChat) + && (GetUnAccountInstance() & (int)EChatSteamIDInstanceFlags.k_EChatInstanceFlagLobby) != 0; + } - //----------------------------------------------------------------------------- - // Purpose: Is this an anonymous account? - //----------------------------------------------------------------------------- - public bool BAnonAccount() - { - return GetEAccountType() == EAccountType.k_EAccountTypeAnonUser || GetEAccountType() == EAccountType.k_EAccountTypeAnonGameServer; - } - //----------------------------------------------------------------------------- - // Purpose: Is this an anonymous user account? ( used to create an account or reset a password ) - //----------------------------------------------------------------------------- - public bool BAnonUserAccount() - { - return GetEAccountType() == EAccountType.k_EAccountTypeAnonUser; - } + //----------------------------------------------------------------------------- + // Purpose: Is this an individual user account id? + //----------------------------------------------------------------------------- + public bool BIndividualAccount() + { + return GetEAccountType() == EAccountType.k_EAccountTypeIndividual || GetEAccountType() == EAccountType.k_EAccountTypeConsoleUser; + } - //----------------------------------------------------------------------------- - // Purpose: Is this a faked up Steam ID for a PSN friend account? - //----------------------------------------------------------------------------- - public bool BConsoleUserAccount() - { - return GetEAccountType() == EAccountType.k_EAccountTypeConsoleUser; - } - public void SetAccountID(AccountID_t other) - { - m_SteamID = (m_SteamID & ~(0xFFFFFFFFul << (ushort)0)) | (((ulong)(other) & 0xFFFFFFFFul) << (ushort)0); - } + //----------------------------------------------------------------------------- + // Purpose: Is this an anonymous account? + //----------------------------------------------------------------------------- + public bool BAnonAccount() + { + return GetEAccountType() == EAccountType.k_EAccountTypeAnonUser || GetEAccountType() == EAccountType.k_EAccountTypeAnonGameServer; + } - public void SetAccountInstance(uint other) - { - m_SteamID = (m_SteamID & ~(0xFFFFFul << (ushort)32)) | (((ulong)(other) & 0xFFFFFul) << (ushort)32); - } + //----------------------------------------------------------------------------- + // Purpose: Is this an anonymous user account? ( used to create an account or reset a password ) + //----------------------------------------------------------------------------- + public bool BAnonUserAccount() + { + return GetEAccountType() == EAccountType.k_EAccountTypeAnonUser; + } - // This is a non standard/custom function not found in C++ Steamworks - public void SetEAccountType(EAccountType other) - { - m_SteamID = (m_SteamID & ~(0xFul << (ushort)52)) | (((ulong)(other) & 0xFul) << (ushort)52); - } + //----------------------------------------------------------------------------- + // Purpose: Is this a faked up Steam ID for a PSN friend account? + //----------------------------------------------------------------------------- + public bool BConsoleUserAccount() + { + return GetEAccountType() == EAccountType.k_EAccountTypeConsoleUser; + } - public void SetEUniverse(EUniverse other) - { - m_SteamID = (m_SteamID & ~(0xFFul << (ushort)56)) | (((ulong)(other) & 0xFFul) << (ushort)56); - } + public void SetAccountID( AccountID_t other ) + { + m_SteamID = (m_SteamID & ~(0xFFFFFFFFul << (ushort)0)) | (((ulong)(other) & 0xFFFFFFFFul) << (ushort)0); + } - public AccountID_t GetAccountID() - { - return new AccountID_t((uint)(m_SteamID & 0xFFFFFFFFul)); - } + public void SetAccountInstance( uint other ) + { + m_SteamID = (m_SteamID & ~(0xFFFFFul << (ushort)32)) | (((ulong)(other) & 0xFFFFFul) << (ushort)32); + } - public uint GetUnAccountInstance() - { - return (uint)((m_SteamID >> 32) & 0xFFFFFul); - } + // This is a non standard/custom function not found in C++ Steamworks + public void SetEAccountType( EAccountType other ) + { + m_SteamID = (m_SteamID & ~(0xFul << (ushort)52)) | (((ulong)(other) & 0xFul) << (ushort)52); + } - public EAccountType GetEAccountType() - { - return (EAccountType)((m_SteamID >> 52) & 0xFul); - } + public void SetEUniverse( EUniverse other ) + { + m_SteamID = (m_SteamID & ~(0xFFul << (ushort)56)) | (((ulong)(other) & 0xFFul) << (ushort)56); + } - public EUniverse GetEUniverse() - { - return (EUniverse)((m_SteamID >> 56) & 0xFFul); - } + public AccountID_t GetAccountID() + { + return new AccountID_t((uint)(m_SteamID & 0xFFFFFFFFul)); + } - public bool IsValid() - { - if (GetEAccountType() <= EAccountType.k_EAccountTypeInvalid || GetEAccountType() >= EAccountType.k_EAccountTypeMax) - return false; + public uint GetUnAccountInstance() + { + return (uint)((m_SteamID >> 32) & 0xFFFFFul); + } - if (GetEUniverse() <= EUniverse.k_EUniverseInvalid || GetEUniverse() >= EUniverse.k_EUniverseMax) - return false; + public EAccountType GetEAccountType() + { + return (EAccountType)((m_SteamID >> 52) & 0xFul); + } - if (GetEAccountType() == EAccountType.k_EAccountTypeIndividual) - { - if (GetAccountID() == new AccountID_t(0) || GetUnAccountInstance() > Constants.k_unSteamUserDefaultInstance) - return false; - } - - if (GetEAccountType() == EAccountType.k_EAccountTypeClan) - { - if (GetAccountID() == new AccountID_t(0) || GetUnAccountInstance() != 0) - return false; - } - - if (GetEAccountType() == EAccountType.k_EAccountTypeGameServer) - { - if (GetAccountID() == new AccountID_t(0)) - return false; - // Any limit on instances? We use them for local users and bots - } - return true; - } + public EUniverse GetEUniverse() + { + return (EUniverse)((m_SteamID >> 56) & 0xFFul); + } - #region Overrides - public override string ToString() - { - return m_SteamID.ToString(); - } + public bool IsValid() + { + if (GetEAccountType() <= EAccountType.k_EAccountTypeInvalid || GetEAccountType() >= EAccountType.k_EAccountTypeMax) + return false; - public override bool Equals(object other) - { - return other is CSteamID && this == (CSteamID)other; - } + if (GetEUniverse() <= EUniverse.k_EUniverseInvalid || GetEUniverse() >= EUniverse.k_EUniverseMax) + return false; - public override int GetHashCode() + if (GetEAccountType() == EAccountType.k_EAccountTypeIndividual) { - return m_SteamID.GetHashCode(); + if (GetAccountID() == new AccountID_t(0) || GetUnAccountInstance() > Constants.k_unSteamUserDefaultInstance) + return false; } - public static bool operator ==(CSteamID x, CSteamID y) + if (GetEAccountType() == EAccountType.k_EAccountTypeClan) { - return x.m_SteamID == y.m_SteamID; + if (GetAccountID() == new AccountID_t(0) || GetUnAccountInstance() != 0) + return false; } - public static bool operator !=(CSteamID x, CSteamID y) + if (GetEAccountType() == EAccountType.k_EAccountTypeGameServer) { - return !(x == y); + if (GetAccountID() == new AccountID_t(0)) + return false; + // Any limit on instances? We use them for local users and bots } + return true; + } - public static explicit operator CSteamID(ulong value) - { - return new CSteamID(value); - } - public static explicit operator ulong(CSteamID that) - { - return that.m_SteamID; - } + public ulong GetSteamID64() + { + return m_SteamID; + } - public bool Equals(CSteamID other) - { - return m_SteamID == other.m_SteamID; - } + public string GetSteamID() + { + return SteamIdParser.ToSteamId(m_SteamID); + } - public int CompareTo(CSteamID other) - { - return m_SteamID.CompareTo(other.m_SteamID); - } - #endregion + public string GetSteamID3() + { + return SteamIdParser.ToSteamId3(m_SteamID); } -} + public uint GetSteamID32() + { + return GetAccountID().m_AccountID; + } + + #region Overrides + public override string ToString() + { + return m_SteamID.ToString(); + } + + public override bool Equals( object other ) + { + return other is CSteamID && this == (CSteamID)other; + } + + public override int GetHashCode() + { + return m_SteamID.GetHashCode(); + } + + public static bool operator ==( CSteamID x, CSteamID y ) + { + return x.m_SteamID == y.m_SteamID; + } + public static bool operator !=( CSteamID x, CSteamID y ) + { + return !(x == y); + } + + public static explicit operator CSteamID( ulong value ) + { + return new CSteamID(value); + } + public static explicit operator ulong( CSteamID that ) + { + return that.m_SteamID; + } + + public bool Equals( CSteamID other ) + { + return m_SteamID == other.m_SteamID; + } + + public int CompareTo( CSteamID other ) + { + return m_SteamID.CompareTo(other.m_SteamID); + } + #endregion +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Helper.cs b/managed/src/SwiftlyS2.Shared/Helper.cs index 49cd0b2ba..fd68ebc39 100644 --- a/managed/src/SwiftlyS2.Shared/Helper.cs +++ b/managed/src/SwiftlyS2.Shared/Helper.cs @@ -1,123 +1,170 @@ +using System.Globalization; using SwiftlyS2.Shared.Schemas; namespace SwiftlyS2.Shared; public static class Helper { + private static readonly Dictionary ColorCodes = new() + { + { "[default]", "\x01" }, + { "[/]", "\x01" }, + { "[white]", "\x01" }, + { "[darkred]", "\x02" }, + { "[lightpurple]", "\x03" }, + { "[green]", "\x04" }, + { "[olive]", "\x05" }, + { "[lime]", "\x06" }, + { "[red]", "\x07" }, + { "[gray]", "\x08" }, + { "[grey]", "\x08" }, + { "[lightyellow]", "\x09" }, + { "[yellow]", "\x09" }, + { "[silver]", "\x0A" }, + { "[bluegrey]", "\x0A" }, + { "[lightblue]", "\x0B" }, + { "[blue]", "\x0B" }, + { "[darkblue]", "\x0C" }, + { "[purple]", "\x0E" }, + { "[magenta]", "\x0E" }, + { "[lightred]", "\x0F" }, + { "[gold]", "\x10" }, + { "[orange]", "\x10" } + }; + + public static class ChatColors + { + public static string Default = "[/]"; + public static string White = "[white]"; + public static string DarkRed = "[darkred]"; + public static string Green = "[green]"; + public static string LightYellow = "[lightyellow]"; + public static string LightBlue = "[lightblue]"; + public static string Olive = "[olive]"; + public static string Lime = "[lime]"; + public static string Red = "[red]"; + public static string LightPurple = "[lightpurple]"; + public static string Purple = "[purple]"; + public static string Grey = "[grey]"; + public static string Yellow = "[yellow]"; + public static string Gold = "[gold]"; + public static string Silver = "[silver]"; + public static string Blue = "[blue]"; + public static string DarkBlue = "[darkblue]"; + public static string BlueGrey = "[bluegrey]"; + public static string Magenta = "[magenta]"; + public static string LightRed = "[lightred]"; + public static string Orange = "[orange]"; + } - private static readonly Dictionary ColorCodes = new() - { - { "[default]", "\x01" }, - { "[/]", "\x01" }, - { "[white]", "\x01" }, - { "[darkred]", "\x02" }, - { "[lightpurple]", "\x03" }, - { "[green]", "\x04" }, - { "[olive]", "\x05" }, - { "[lime]", "\x06" }, - { "[red]", "\x07" }, - { "[gray]", "\x08" }, - { "[grey]", "\x08" }, - { "[lightyellow]", "\x09" }, - { "[yellow]", "\x09" }, - { "[silver]", "\x0A" }, - { "[bluegrey]", "\x0A" }, - { "[lightblue]", "\x0B" }, - { "[blue]", "\x0B" }, - { "[darkblue]", "\x0C" }, - { "[purple]", "\x0E" }, - { "[magenta]", "\x0E" }, - { "[lightred]", "\x0F" }, - { "[gold]", "\x10" }, - { "[orange]", "\x10" } - }; + /// + /// Replace the color codes in the text with the corresponding color codes. + /// + /// The text to replace the color codes in. + /// The text with the color codes replaced. + public static string Colored( this string text ) + { + if (text.StartsWith("[")) + { + text = " " + text; + } - public static class ChatColors - { - public static string Default = "[/]"; - public static string White = "[white]"; - public static string DarkRed = "[darkred]"; - public static string Green = "[green]"; - public static string LightYellow = "[lightyellow]"; - public static string LightBlue = "[lightblue]"; - public static string Olive = "[olive]"; - public static string Lime = "[lime]"; - public static string Red = "[red]"; - public static string LightPurple = "[lightpurple]"; - public static string Purple = "[purple]"; - public static string Grey = "[grey]"; - public static string Yellow = "[yellow]"; - public static string Gold = "[gold]"; - public static string Silver = "[silver]"; - public static string Blue = "[blue]"; - public static string DarkBlue = "[darkblue]"; - public static string BlueGrey = "[bluegrey]"; - public static string Magenta = "[magenta]"; - public static string LightRed = "[lightred]"; - public static string Orange = "[orange]"; - } + foreach (var color in ColorCodes) + { + text = text.Replace(color.Key, color.Value); + } - /// - /// Replace the color codes in the text with the corresponding color codes. - /// - /// The text to replace the color codes in. - /// The text with the color codes replaced. - public static string Colored(this string text) - { - if (text.StartsWith("[")) - text = " " + text; + return text; + } - foreach (var color in ColorCodes) + /// + /// Convert the pointer to the schema class. + /// + /// The schema class to convert to. + /// The pointer to the schema class. + /// The schema class. + public static T AsSchema( nint ptr ) where T : ISchemaClass { - text = text.Replace(color.Key, color.Value); + return T.From(ptr); } - return text; - } + /// + /// Estimates the display width of a character based on its type. + /// Inspired by: https://github.com/spectreconsole/wcwidth + /// + /// The character to measure. + /// The estimated display width in relative units. + public static float GetCharWidth( char c ) => c switch { + >= '\u4E00' and <= '\u9FFF' => 2.0f, // CJK Unified Ideographs + >= '\u3000' and <= '\u303F' => 2.0f, // CJK Symbols and Punctuation + >= '\uFF00' and <= '\uFFEF' => 2.0f, // Halfwidth and Fullwidth Forms + >= '\uAC00' and <= '\uD7AF' => 2.2f, // Hangul Syllables + >= '\u1100' and <= '\u11FF' => 2.2f, // Hangul Jamo + >= '\u3130' and <= '\u318F' => 2.2f, // Hangul Compatibility Jamo + >= '\u3040' and <= '\u309F' => 2.05f, // Hiragana + >= '\u30A0' and <= '\u30FF' => 2.05f, // Katakana + >= '\u31F0' and <= '\u31FF' => 2.05f, // Katakana Phonetic Extensions + >= 'A' and <= 'Z' => 1.2f, + >= 'a' and <= 'z' => 1.0f, + >= '0' and <= '9' => 1.0f, + ' ' => 0.5f, + >= '!' and <= '/' => 0.8f, + >= ':' and <= '@' => 0.8f, + >= '[' and <= '`' => 0.8f, + >= '{' and <= '~' => 0.8f, + _ => 1.0f + }; - /// - /// Convert the pointer to the schema class. - /// - /// The schema class to convert to. - /// The pointer to the schema class. - /// The schema class. - public static T AsSchema(nint ptr) where T : ISchemaClass - { - return T.From(ptr); - } + /// + /// Estimates the display width of a text string based on character types. + /// + /// The text string to measure. + /// The estimated display width in relative units. + public static float EstimateTextWidth( string text ) => text.Sum(GetCharWidth); - /// - /// Estimates the display width of a character based on its type. - /// Inspired by: https://github.com/spectreconsole/wcwidth - /// - /// The character to measure. - /// The estimated display width in relative units. - public static float GetCharWidth(char c) => c switch - { - >= '\u4E00' and <= '\u9FFF' => 2.0f, // CJK Unified Ideographs - >= '\u3000' and <= '\u303F' => 2.0f, // CJK Symbols and Punctuation - >= '\uFF00' and <= '\uFFEF' => 2.0f, // Halfwidth and Fullwidth Forms - >= '\uAC00' and <= '\uD7AF' => 2.2f, // Hangul Syllables - >= '\u1100' and <= '\u11FF' => 2.2f, // Hangul Jamo - >= '\u3130' and <= '\u318F' => 2.2f, // Hangul Compatibility Jamo - >= '\u3040' and <= '\u309F' => 2.05f, // Hiragana - >= '\u30A0' and <= '\u30FF' => 2.05f, // Katakana - >= '\u31F0' and <= '\u31FF' => 2.05f, // Katakana Phonetic Extensions - >= 'A' and <= 'Z' => 1.2f, - >= 'a' and <= 'z' => 1.0f, - >= '0' and <= '9' => 1.0f, - ' ' => 0.5f, - >= '!' and <= '/' => 0.8f, - >= ':' and <= '@' => 0.8f, - >= '[' and <= '`' => 0.8f, - >= '{' and <= '~' => 0.8f, - _ => 1.0f - }; + /// + /// Parses a hex color string and returns the RGBA color components. + /// + /// The hex color string to parse. + /// Whether alpha component comes first (ARGB format). Default is false (RGBA format). + /// Color components (R, G, B, A) or nulls if invalid. Alpha defaults to 255 for RGB format. + public static (int? r, int? g, int? b, int? a) ParseHexColor( string hexColor, bool alphaFirst = false ) + { + if (string.IsNullOrWhiteSpace(hexColor) || !hexColor.StartsWith('#')) + { + return (null, null, null, null); + } + + var hexPart = hexColor[1..]; + if (hexPart.Length == 0 || !hexPart.All(char.IsAsciiHexDigit)) + { + return (null, null, null, null); + } + + foreach (var groupCount in new[] { 3, 4 }) + { + if (hexPart.Length % groupCount != 0) + { + continue; + } - /// - /// Estimates the display width of a text string based on character types. - /// - /// The text string to measure. - /// The estimated display width in relative units. - public static float EstimateTextWidth(string text) => text.Sum(GetCharWidth); + var groupSize = hexPart.Length / groupCount; + var groups = Enumerable.Range(0, groupCount) + .Select(i => hexPart.Substring(i * groupSize, groupSize)) + .Select(g => int.TryParse(g, NumberStyles.HexNumber, null, out var v) && v is >= 0 and <= 255 ? v : (int?)null) + .ToArray(); + + if (groups.All(g => g.HasValue)) + { + return groupCount switch { + 3 => (groups[0], groups[1], groups[2], 255), // RGB + 4 when alphaFirst => (groups[1], groups[2], groups[3], groups[0]), // ARGB → RGBA + 4 => (groups[0], groups[1], groups[2], groups[3]), // RGBA + _ => (null, null, null, null) + }; + } + } + + return (null, null, null, null); + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/HtmlGradient.cs b/managed/src/SwiftlyS2.Shared/HtmlGradient.cs index cb6c6310a..fed2f4aa3 100644 --- a/managed/src/SwiftlyS2.Shared/HtmlGradient.cs +++ b/managed/src/SwiftlyS2.Shared/HtmlGradient.cs @@ -12,9 +12,9 @@ public static class HtmlGradient /// The starting color in hex format (e.g., "#FF0000"). /// The ending color in hex format (e.g., "#0000FF"). /// HTML string with each character wrapped in a colored font tag. - public static string GenerateGradientText(string text, string startColor, string endColor) + public static string GenerateGradientText( string text, string startColor, string endColor ) { - if (string.IsNullOrEmpty(text)) + if (string.IsNullOrWhiteSpace(text)) { return text; } @@ -23,12 +23,12 @@ public static string GenerateGradientText(string text, string startColor, string var (endR, endG, endB) = ParseHexColor(endColor); var length = text.Length; - return string.Concat(text.Select((ch, i) => + return string.Concat(text.Select(( ch, i ) => { var ratio = length > 1 ? (float)i / (length - 1) : 0f; - var r = (int)(startR + (endR - startR) * ratio); - var g = (int)(startG + (endG - startG) * ratio); - var b = (int)(startB + (endB - startB) * ratio); + var r = (int)(startR + ((endR - startR) * ratio)); + var g = (int)(startG + ((endG - startG) * ratio)); + var b = (int)(startB + ((endB - startB) * ratio)); return $"{ch}"; })); } @@ -39,20 +39,65 @@ public static string GenerateGradientText(string text, string startColor, string /// The text to apply gradient to. /// Array of color stops in hex format (e.g., "#FF0000", "#00FF00", "#0000FF"). /// HTML string with each character wrapped in a colored font tag. - public static string GenerateGradientText(string text, params string[] colors) => (text, colors) switch - { + public static string GenerateGradientText( string text, params string[] colors ) => (text, colors) switch { (null or "", _) => string.Empty, (_, []) => text, (_, [var single]) => $"{text}", _ => GenerateMultiColorGradient(text, colors) }; - private static string GenerateMultiColorGradient(string text, string[] colors) + /// + /// Generates gradient colored text by interpolating between two SwiftlyS2 native colors. + /// + /// The text to apply gradient to. + /// The starting SwiftlyS2 native color. + /// The ending SwiftlyS2 native color. + /// HTML string with each character wrapped in a colored font tag. + public static string GenerateGradientText( string text, Natives.Color startColor, Natives.Color endColor ) + { + return GenerateGradientText(text, startColor.ToHex(), endColor.ToHex()); + } + + /// + /// Generates gradient colored text by interpolating between two System.Drawing colors. + /// + /// The text to apply gradient to. + /// The starting System.Drawing color. + /// The ending System.Drawing color. + /// HTML string with each character wrapped in a colored font tag. + public static string GenerateGradientText( string text, System.Drawing.Color startColor, System.Drawing.Color endColor ) + { + return GenerateGradientText(text, $"#{startColor.R:X2}{startColor.G:X2}{startColor.B:X2}", $"#{endColor.R:X2}{endColor.G:X2}{endColor.B:X2}"); + } + + /// + /// Generates gradient colored text by interpolating across multiple SwiftlyS2 native color stops. + /// + /// The text to apply gradient to. + /// Array of SwiftlyS2 native color stops. + /// HTML string with each character wrapped in a colored font tag. + public static string GenerateGradientText( string text, params Natives.Color[] colors ) + { + return GenerateGradientText(text, colors.Select(c => c.ToHex()).ToArray()); + } + + /// + /// Generates gradient colored text by interpolating across multiple System.Drawing color stops. + /// + /// The text to apply gradient to. + /// Array of System.Drawing color stops. + /// HTML string with each character wrapped in a colored font tag. + public static string GenerateGradientText( string text, params System.Drawing.Color[] colors ) + { + return GenerateGradientText(text, colors.Select(c => $"#{c.R:X2}{c.G:X2}{c.B:X2}").ToArray()); + } + + private static string GenerateMultiColorGradient( string text, string[] colors ) { var parsedColors = colors.Select(ParseHexColor).ToArray(); var length = text.Length; - return string.Concat(text.Select((ch, i) => + return string.Concat(text.Select(( ch, i ) => { var position = length > 1 ? (float)i / (length - 1) : 0f; var segmentIndex = position * (parsedColors.Length - 1); @@ -71,8 +116,6 @@ private static string GenerateMultiColorGradient(string text, string[] colors) })); } - private static (int R, int G, int B) ParseHexColor(string hex) => - hex.TrimStart('#') is { Length: 6 } h - ? (Convert.ToInt32(h[..2], 16), Convert.ToInt32(h[2..4], 16), Convert.ToInt32(h[4..6], 16)) - : (255, 255, 255); + private static (int R, int G, int B) ParseHexColor( string hex ) => + Helper.ParseHexColor(hex) is var (r, g, b, _) ? (r ?? 255, g ?? 255, b ?? 255) : (255, 255, 255); } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/ISwiftlyCore.cs b/managed/src/SwiftlyS2.Shared/ISwiftlyCore.cs index 047898531..418c818a3 100644 --- a/managed/src/SwiftlyS2.Shared/ISwiftlyCore.cs +++ b/managed/src/SwiftlyS2.Shared/ISwiftlyCore.cs @@ -7,6 +7,7 @@ using SwiftlyS2.Shared.Database; using SwiftlyS2.Shared.EntitySystem; using SwiftlyS2.Shared.Events; +using SwiftlyS2.Shared.FileSystem; using SwiftlyS2.Shared.GameEvents; using SwiftlyS2.Shared.Helpers; using SwiftlyS2.Shared.Memory; @@ -26,150 +27,161 @@ namespace SwiftlyS2.Shared; /// public interface ISwiftlyCore { - /// - /// Custom event subscriber. - /// - public IEventSubscriber Event { get; } - - /// - /// Gets the engine service used to perform core engine operations. - /// - public IEngineService Engine { get; } - - /// - /// Game event service. - /// - public IGameEventService GameEvent { get; } - - /// - /// Net message service. - /// - public INetMessageService NetMessage { get; } - - /// - /// Helpers service. - /// - public IHelpers Helpers { get; } - - /// - /// Command service. - /// - public ICommandService Command { get; } - - /// - /// Console output service. - /// - public IConsoleOutputService ConsoleOutput { get; } - - /// - /// Entity system service. - /// - public IEntitySystemService EntitySystem { get; } - - /// - /// Convar service. - /// - public IConVarService ConVar { get; } - - /// - /// Configuration service. - /// - public IPluginConfigurationService Configuration { get; } - - /// - /// Game data service. - /// - public IGameDataService GameData { get; } - - /// - /// Player manager service. - /// - public IPlayerManagerService PlayerManager { get; } - - - /// - /// Memory service. - /// - public IMemoryService Memory { get; } - - /// - /// Logger factory. - /// - public ILoggerFactory LoggerFactory { get; } - - /// - /// Default logger. - /// - public ILogger Logger { get; } - - /// - /// Profiler service. - /// - public IContextedProfilerService Profiler { get; } - - /// - /// Gets the trace manager used to control and configure tracing operations within the game. - /// - public ITraceManager Trace { get; } - - /// - /// Scheduler service. - /// - public ISchedulerService Scheduler { get; } - - /// - /// Database service. - /// - public IDatabaseService Database { get; } - - /// - /// Translation service. - /// - public ITranslationService Translation { get; } - - /// - /// Localizer. - /// - public ILocalizer Localizer { get; } - - /// - /// Permission manager. - /// - public IPermissionManager Permission { get; } - - /// - /// Registrator service. - /// - public IRegistratorService Registrator { get; } - - /// - /// Menu manager. - /// - public IMenuManager Menus { get; } - - /// - /// Command line. - /// - public ICommandLine CommandLine { get; } - - /// - /// Gets the file path to the plugin directory. - /// - public string PluginPath { get; } - - /// - /// Gets the absolute file path to the `game/csgo` directory. - /// - public string CSGODirectory { get; } - - /// - /// Gets the absolute file path to the game's root directory. - /// - public string GameDirectory { get; } - - /// - /// Gets the file path to the plugin data directory. - /// This directory is ensured to exist by the framework. - /// - public string PluginDataDirectory { get; } + /// + /// Custom event subscriber. + /// + public IEventSubscriber Event { get; } + + /// + /// Gets the engine service used to perform core engine operations. + /// + public IEngineService Engine { get; } + + /// + /// Game event service. + /// + public IGameEventService GameEvent { get; } + + /// + /// Net message service. + /// + public INetMessageService NetMessage { get; } + + /// + /// Helpers service. + /// + public IHelpers Helpers { get; } + + /// + /// Command service. + /// + public ICommandService Command { get; } + + /// + /// Console output service. + /// + public IConsoleOutputService ConsoleOutput { get; } + + /// + /// Entity system service. + /// + public IEntitySystemService EntitySystem { get; } + + /// + /// Convar service. + /// + public IConVarService ConVar { get; } + + /// + /// Configuration service. + /// + public IPluginConfigurationService Configuration { get; } + + /// + /// Game data service. + /// + public IGameDataService GameData { get; } + + /// + /// Player manager service. + /// + public IPlayerManagerService PlayerManager { get; } + + + /// + /// Memory service. + /// + public IMemoryService Memory { get; } + + /// + /// Logger factory. + /// + public ILoggerFactory LoggerFactory { get; } + + /// + /// Default logger. + /// + public ILogger Logger { get; } + + /// + /// Profiler service. + /// + public IContextedProfilerService Profiler { get; } + + /// + /// Gets the trace manager used to control and configure tracing operations within the game. + /// + public ITraceManager Trace { get; } + + /// + /// Scheduler service. + /// + public ISchedulerService Scheduler { get; } + + /// + /// Database service. + /// + public IDatabaseService Database { get; } + + /// + /// Translation service. + /// + public ITranslationService Translation { get; } + + /// + /// Localizer. + /// + public ILocalizer Localizer { get; } + + /// + /// Permission manager. + /// + public IPermissionManager Permission { get; } + + /// + /// Registrator service. + /// + public IRegistratorService Registrator { get; } + + // /// + // /// Menu manager. + // /// + // [Obsolete("IMenuManager will be deprecared at the release of SwiftlyS2. Please use IMenuManagerAPI instead")] + // public IMenuManager Menus { get; } + + /// + /// Menu manager API. + /// + public IMenuManagerAPI MenusAPI { get; } + + /// + /// Command line. + /// + public ICommandLine CommandLine { get; } + + /// + /// Gets the file path to the plugin directory. + /// + public string PluginPath { get; } + + /// + /// Gets the absolute file path to the `game/csgo` directory. + /// + public string CSGODirectory { get; } + + /// + /// Gets the absolute file path to the game's root directory. + /// + public string GameDirectory { get; } + + /// + /// Gets the file path to the plugin data directory. + /// This directory is ensured to exist by the framework. + /// + public string PluginDataDirectory { get; } + + /// + /// Game file system interface. + /// + public IGameFileSystem GameFileSystem { get; } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Misc/ConsoleRedirector.cs b/managed/src/SwiftlyS2.Shared/Misc/ConsoleRedirector.cs index c2df698f8..e4475c8ee 100644 --- a/managed/src/SwiftlyS2.Shared/Misc/ConsoleRedirector.cs +++ b/managed/src/SwiftlyS2.Shared/Misc/ConsoleRedirector.cs @@ -6,7 +6,7 @@ namespace SwiftlyS2.Shared.Misc; class ConsoleRedirector : TextWriter { private readonly TextWriter originalOut; - private readonly object lockObject = new object(); + private readonly Lock lockObject = new(); private bool isRedirecting = false; public ConsoleRedirector() @@ -16,7 +16,7 @@ public ConsoleRedirector() public override Encoding Encoding => originalOut.Encoding; - public override void WriteLine(string? value) + public override void WriteLine( string? value ) { lock (lockObject) { @@ -38,7 +38,7 @@ public override void WriteLine(string? value) } } - public override void Write(string? value) + public override void Write( string? value ) { lock (lockObject) { diff --git a/managed/src/SwiftlyS2.Shared/Modules/Commands/ICommandService.cs b/managed/src/SwiftlyS2.Shared/Modules/Commands/ICommandService.cs index 95d1e2f3f..00b7a6d9f 100644 --- a/managed/src/SwiftlyS2.Shared/Modules/Commands/ICommandService.cs +++ b/managed/src/SwiftlyS2.Shared/Modules/Commands/ICommandService.cs @@ -10,7 +10,7 @@ public interface ICommandService /// The listener for the command. /// /// The command context. - delegate void CommandListener(ICommandContext context); + delegate void CommandListener( ICommandContext context ); /// /// The handler for the client command hook. @@ -18,7 +18,7 @@ public interface ICommandService /// The player id. /// The command line. /// Whether the command should continue to be sent. - delegate HookResult ClientCommandHandler(int playerId, string commandLine); + delegate HookResult ClientCommandHandler( int playerId, string commandLine ); /// @@ -29,7 +29,7 @@ public interface ICommandService /// Whether the text is for team only. /// Whether the text should continue to be sent. - delegate HookResult ClientChatHandler(int playerId, string text, bool teamonly); + delegate HookResult ClientChatHandler( int playerId, string text, bool teamonly ); /// /// Registers a command. @@ -39,7 +39,7 @@ public interface ICommandService /// If set to false, the command will not starts with a `sw_` prefix. /// The permission required to use the command. /// The guid of the command. - Guid RegisterCommand(string commandName, CommandListener handler, bool registerRaw = false, string permission = ""); + Guid RegisterCommand( string commandName, CommandListener handler, bool registerRaw = false, string permission = "" ); /// /// Registers a command alias. @@ -47,43 +47,42 @@ public interface ICommandService /// The command name. /// The alias. /// If set to false, the alias will not starts with a `sw_` prefix. - void RegisterCommandAlias(string commandName, string alias, bool registerRaw = false); + void RegisterCommandAlias( string commandName, string alias, bool registerRaw = false ); /// /// Unregisters a command. /// /// The guid of the command. - void UnregisterCommand(Guid guid); + void UnregisterCommand( Guid guid ); /// /// Unregisters all command listeners with the specified command name. /// /// The command name. - void UnregisterCommand(string commandName); - + void UnregisterCommand( string commandName ); /// /// Hooks client commands, will be fired when a player sends any command. /// /// The handler callback for the client command. - void HookClientCommand(ClientCommandHandler handler); + Guid HookClientCommand( ClientCommandHandler handler ); /// /// Unhooks a client command. /// /// The guid of the client command. - void UnhookClientCommand(Guid guid); + void UnhookClientCommand( Guid guid ); /// /// Hooks client chat, will be fired when a player sends any chat message. /// /// The handler callback for the client chat. - Guid HookClientChat(ClientChatHandler handler); + Guid HookClientChat( ClientChatHandler handler ); /// /// Unhooks a client chat. /// /// The guid of the client chat. - void UnhookClientChat(Guid guid); + void UnhookClientChat( Guid guid ); } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/Convars/IConVar.cs b/managed/src/SwiftlyS2.Shared/Modules/Convars/IConVar.cs index c959f889f..4ad0ef09e 100644 --- a/managed/src/SwiftlyS2.Shared/Modules/Convars/IConVar.cs +++ b/managed/src/SwiftlyS2.Shared/Modules/Convars/IConVar.cs @@ -11,34 +11,44 @@ public interface IConVar { T Value { get; set; } /// - /// Add flags to the convar. + /// The max value of the convar. + /// + /// Thrown when the convar is not a min/max type or doesn't have a max value. /// - /// flags. - void AddFlags(ConvarFlags flags); + T MaxValue { get; set; } /// - /// Remove flags from the convar. + /// The min value of the convar. + /// + /// Thrown when the convar is not a min/max type or doesn't have a min value. /// - /// flags. - void RemoveFlags(ConvarFlags flags); + T MinValue { get; set; } /// - /// Clear all flags from the convar. + /// The default value of the convar. /// - void ClearFlags(); + T DefaultValue { get; set; } /// - /// Get the flags of the convar. + /// Whether the convar has a default value. /// - /// The flags of the convar. - ConvarFlags GetFlags(); + bool HasDefaultValue { get; } /// - /// Check if the convar has the given flags. + /// Whether the convar has a min value. /// - /// flags. - /// True if the convar has all the given flags, false otherwise. - bool HasFlags(ConvarFlags flags); + bool HasMinValue { get; } + + /// + /// Whether the convar has a max value. + /// + bool HasMaxValue { get; } + + /// + /// The flags of the convar. + /// + ConvarFlags Flags { get; set; } + /// /// Internally set the value of the convar. @@ -57,6 +67,27 @@ public interface IConVar { /// Query the value of the convar from specified client. /// /// - /// The action to execute with the value. + /// The action to execute with the value. void QueryClient(int clientId, Action callback); + + /// + /// Try to get the min value of the convar. + /// + /// The min value of the convar. + /// True if the min value is found, false otherwise. + bool TryGetMinValue(out T minValue); + + /// + /// Try to get the max value of the convar. + /// + /// The max value of the convar. + /// True if the max value is found, false otherwise. + bool TryGetMaxValue(out T maxValue); + + /// + /// Try to get the default value of the convar. + /// + /// The default value of the convar. + /// True if the default value is found, false otherwise. + bool TryGetDefaultValue(out T defaultValue); } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/Convars/IConVarService.cs b/managed/src/SwiftlyS2.Shared/Modules/Convars/IConVarService.cs index 670b34c66..38bbafd6a 100644 --- a/managed/src/SwiftlyS2.Shared/Modules/Convars/IConVarService.cs +++ b/managed/src/SwiftlyS2.Shared/Modules/Convars/IConVarService.cs @@ -33,5 +33,29 @@ public interface IConVarService { /// The min value of the convar. /// The max value of the convar. /// The created convar. - IConVar Create(string name, string helpMessage, T defaultValue, T? minValue = null, T? maxValue = null, ConvarFlags flags = ConvarFlags.NONE) where T: unmanaged; + IConVar Create(string name, string helpMessage, T defaultValue, T? minValue, T? maxValue, ConvarFlags flags = ConvarFlags.NONE) where T: unmanaged; + + /// + /// Create a new convar or find an existing one by name. + /// + /// The type of the convar. + /// The name of the convar. + /// The help message of the convar. + /// The default value of the convar. + /// The flags of the convar. + /// The created or found convar. + IConVar CreateOrFind(string name, string helpMessage, T defaultValue, ConvarFlags flags = ConvarFlags.NONE); + + /// + /// Create a new convar or find an existing one by name with min and max values. + /// + /// The type of the convar. + /// The name of the convar. + /// The help message of the convar. + /// The default value of the convar. + /// The min value of the convar. + /// The max value of the convar. + /// The flags of the convar. + /// The created or found convar. + IConVar CreateOrFind(string name, string helpMessage, T defaultValue, T? minValue, T? maxValue, ConvarFlags flags = ConvarFlags.NONE) where T: unmanaged; } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/Engine/ITraceManager.cs b/managed/src/SwiftlyS2.Shared/Modules/Engine/ITraceManager.cs index 06dd9adc8..ddb21e25f 100644 --- a/managed/src/SwiftlyS2.Shared/Modules/Engine/ITraceManager.cs +++ b/managed/src/SwiftlyS2.Shared/Modules/Engine/ITraceManager.cs @@ -15,7 +15,7 @@ public interface ITraceManager /// The trace filter used to determine which entities or surfaces are considered during the trace operation. /// A reference to a CGameTrace object that receives the results of the trace, including collision information and /// hit details. - void TracePlayerBBox(Vector start, Vector end, BBox_t bounds, CTraceFilter filter, ref CGameTrace trace); + public void TracePlayerBBox(Vector start, Vector end, BBox_t bounds, CTraceFilter filter, ref CGameTrace trace); /// /// Performs a trace operation from the specified start point to the end point using the given ray and filter, and /// populates the trace result with collision information. @@ -26,5 +26,5 @@ public interface ITraceManager /// The filter that determines which entities or surfaces are considered during the trace. /// A reference to a CGameTrace structure that receives the results of the trace, including hit information and /// surface details. - void TraceShape(Vector start, Vector end, Ray_t ray, CTraceFilter filter, ref CGameTrace trace); + public void TraceShape(Vector start, Vector end, Ray_t ray, CTraceFilter filter, ref CGameTrace trace); } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/Events/KeyKind.cs b/managed/src/SwiftlyS2.Shared/Modules/Events/KeyKind.cs index 034695b35..daa2cff66 100644 --- a/managed/src/SwiftlyS2.Shared/Modules/Events/KeyKind.cs +++ b/managed/src/SwiftlyS2.Shared/Modules/Events/KeyKind.cs @@ -1,23 +1,64 @@ +using SwiftlyS2.Shared.Menus; + namespace SwiftlyS2.Shared.Events; -public enum KeyKind : int { - Mouse1, - Mouse2, - Space, - Ctrl, - W, - A, - S, - D, - E, - Esc, - R, - Alt, - Shift, - Weapon1, - Weapon2, - Grenade1, - Grenade2, - Tab, - F, +public enum KeyKind : int +{ + Mouse1, + Mouse2, + Space, + Ctrl, + W, + A, + S, + D, + E, + Esc, + R, + Alt, + Shift, + Weapon1, + Weapon2, + Grenade1, + Grenade2, + Tab, + F, +} + +/// +/// Provides extension methods for . +/// +internal static class KeyKindExtensions +{ + /// + /// Converts a enum value to its corresponding enum value. + /// + /// The value to convert. + /// The corresponding enum value. + /// Thrown when the is not recognized. + public static KeyBind ToKeyBind( this KeyKind keyKind ) + { + return keyKind switch { + KeyKind.Mouse1 => KeyBind.Mouse1, + KeyKind.Mouse2 => KeyBind.Mouse2, + KeyKind.Space => KeyBind.Space, + KeyKind.Ctrl => KeyBind.Ctrl, + KeyKind.W => KeyBind.W, + KeyKind.A => KeyBind.A, + KeyKind.S => KeyBind.S, + KeyKind.D => KeyBind.D, + KeyKind.E => KeyBind.E, + KeyKind.Esc => KeyBind.Esc, + KeyKind.R => KeyBind.R, + KeyKind.Alt => KeyBind.Alt, + KeyKind.Shift => KeyBind.Shift, + KeyKind.Weapon1 => KeyBind.Weapon1, + KeyKind.Weapon2 => KeyBind.Weapon2, + KeyKind.Grenade1 => KeyBind.Grenade1, + KeyKind.Grenade2 => KeyBind.Grenade2, + KeyKind.Tab => KeyBind.Tab, + KeyKind.F => KeyBind.F, + _ => throw new ArgumentException($"Unknown key kind: {keyKind}.") + }; + } } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/FileSystem/GetSearchPathTypes_t.cs b/managed/src/SwiftlyS2.Shared/Modules/FileSystem/GetSearchPathTypes_t.cs new file mode 100644 index 000000000..eb2b7d52d --- /dev/null +++ b/managed/src/SwiftlyS2.Shared/Modules/FileSystem/GetSearchPathTypes_t.cs @@ -0,0 +1,8 @@ +namespace SwiftlyS2.Shared.FileSystem; + +public enum GetSearchPathTypes_t +{ + GET_SEARCH_PATH_NO_PACK_FILES = 0, + GET_SEARCH_PATH_NO_AUTO_MOUNTED = 1, + GET_SEARCH_PATH_ALL = 2, +}; \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/FileSystem/IGameFileSystem.cs b/managed/src/SwiftlyS2.Shared/Modules/FileSystem/IGameFileSystem.cs new file mode 100644 index 000000000..1a01e932d --- /dev/null +++ b/managed/src/SwiftlyS2.Shared/Modules/FileSystem/IGameFileSystem.cs @@ -0,0 +1,101 @@ +namespace SwiftlyS2.Shared.FileSystem; + +public interface IGameFileSystem +{ + /// + /// Prints the current search paths to the console. + /// + public void PrintSearchPaths(); + + /// + /// Checks if a directory exists at the given path and path ID. + /// + /// The path to check. + /// The ID of the path to search in. + /// True if the directory exists, false otherwise. + public bool IsDirectory( string path, string pathId ); + + /// + /// Removes a search path from the file system. + /// + /// The path to remove. + /// The ID of the path to remove in. + /// True if the path was removed successfully, false otherwise. + public bool RemoveSearchPath( string path, string pathId ); + + /// + /// Adds a search path to the file system. + /// + /// The path to add. + /// The ID of the path to add in. + /// The type of addition to perform. + /// The priority of the search path. + public void AddSearchPath( string path, string pathId, SearchPathAdd_t addType, SearchPathPriority_t priority ); + + /// + /// Checks if a file exists at the given file path and path ID. + /// + /// The file path to check. + /// The ID of the path to check in. + /// True if the file exists, false otherwise. + public bool FileExists( string filePath, string pathId ); + + /// + /// Gets the search path(s) for the given path ID and search path type. + /// + /// The ID of the path to get the search paths for. + /// The type of search path to get. + /// The number of search paths to get. + /// The search path(s) for the given path ID and search path type. + public string GetSearchPath( string pathId, GetSearchPathTypes_t searchPathType, int searchPathsToGet ); + + /// + /// Reads the contents of a file at the given file path and path ID. + /// + /// The path to the file to read. + /// The ID of the path to read the file from. + /// The contents of the file as a string. + public string ReadFile( string filePath, string pathId ); + + /// + /// Writes content to a file at the given file path and path ID. + /// + /// The path to the file to write. + /// The ID of the path to write the file to. + /// The content to write to the file. + /// True if the file was written successfully, false otherwise. + public bool WriteFile( string filePath, string pathId, string content ); + + /// + /// Gets the size of a file at the given file path and path ID. + /// + /// The path to the file to get the size of. + /// The ID of the path to get the file size from. + /// The size of the file in bytes. + public uint GetFileSize( string filePath, string pathId ); + + /// + /// Precaches a file at the given file path and path ID. + /// + /// The path to the file to precache. + /// The ID of the path to precache the file in. + /// True if the file was precached successfully, false otherwise. + public bool PrecacheFile( string filePath, string pathId ); + + /// + /// Checks if a file is writable at the given file path and path ID. + /// + /// The path to the file to check. + /// The ID of the path to check in. + /// True if the file is writable, false otherwise. + public bool IsFileWritable( string filePath, string pathId ); + + /// + /// Sets the writable status of a file at the given file path and path ID. + /// + /// The path to the file to set the writable status for. + /// The ID of the path to set the writable status in. + /// True to make the file writable, false to make it read-only. + /// True if the writable status was set successfully, false otherwise. + public bool SetFileWritable( string filePath, string pathId, bool writable ); +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/FileSystem/SearchPathAdd_t.cs b/managed/src/SwiftlyS2.Shared/Modules/FileSystem/SearchPathAdd_t.cs new file mode 100644 index 000000000..1c8c3717c --- /dev/null +++ b/managed/src/SwiftlyS2.Shared/Modules/FileSystem/SearchPathAdd_t.cs @@ -0,0 +1,8 @@ +namespace SwiftlyS2.Shared.FileSystem; + +public enum SearchPathAdd_t +{ + PATH_ADD_TO_HEAD, + PATH_ADD_TO_TAIL, + PATH_ADD_TO_TAIL_ATINDEX, +}; \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/FileSystem/SearchPathPriority_t.cs b/managed/src/SwiftlyS2.Shared/Modules/FileSystem/SearchPathPriority_t.cs new file mode 100644 index 000000000..e25efd320 --- /dev/null +++ b/managed/src/SwiftlyS2.Shared/Modules/FileSystem/SearchPathPriority_t.cs @@ -0,0 +1,8 @@ +namespace SwiftlyS2.Shared.FileSystem; + +public enum SearchPathPriority_t +{ + SEARCH_PATH_PRIORITY_DEFAULT = 0, + SEARCH_PATH_PRIORITY_LOOSE_FILES = 1, + SEARCH_PATH_PRIORITY_VPK = 2, +}; \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/Helpers/IHelpers.cs b/managed/src/SwiftlyS2.Shared/Modules/Helpers/IHelpers.cs index 9f1e39d64..90dff8cfe 100644 --- a/managed/src/SwiftlyS2.Shared/Modules/Helpers/IHelpers.cs +++ b/managed/src/SwiftlyS2.Shared/Modules/Helpers/IHelpers.cs @@ -2,6 +2,89 @@ namespace SwiftlyS2.Shared.Helpers; +public enum ItemDefinitionIndex +{ + // Pistols + Deagle = 1, + Elite = 2, + FiveSeven = 3, + Glock = 4, + Tec9 = 30, + HkP2000 = 32, + P250 = 36, + UspSilencer = 61, + Cz75a = 63, + Revolver = 64, + + // Rifles + Ak47 = 7, + Aug = 8, + Awp = 9, + Famas = 10, + G3sg1 = 11, + Galilar = 13, + M249 = 14, + M4a1 = 16, + Mac10 = 17, + P90 = 19, + Mp5sd = 23, + Ump45 = 24, + Xm1014 = 25, + Bizon = 26, + Mag7 = 27, + Negev = 28, + Sawedoff = 29, + Mp7 = 33, + Mp9 = 34, + Nova = 35, + Scar20 = 38, + Sg556 = 39, + Ssg08 = 40, + M4a1Silencer = 60, + + // Grenades + Flashbang = 43, + Hegrenade = 44, + Smokegrenade = 45, + Molotov = 46, + Decoy = 47, + Incgrenade = 48, + + // Knives and Equipment + Taser = 31, + Knifegg = 41, + Knife = 42, + C4 = 49, + KnifeT = 59, + Bayonet = 500, + KnifeCss = 503, + KnifeFlip = 505, + KnifeGut = 506, + KnifeKarambit = 507, + KnifeM9Bayonet = 508, + KnifeTactical = 509, + KnifeFalchion = 512, + KnifeSurvivalBowie = 514, + KnifeButterfly = 515, + KnifePush = 516, + KnifeCord = 517, + KnifeCanis = 518, + KnifeUrsus = 519, + KnifeGypsyJackknife = 520, + KnifeOutdoor = 521, + KnifeStiletto = 522, + KnifeWidowmaker = 523, + KnifeSkeleton = 525, + KnifeKukri = 526, + + // Utility + ItemKevlar = 50, + ItemAssaultsuit = 51, + ItemHeavyassaultsuit = 52, + ItemDefuser = 55, + Ammo50ae = 0 +} + public interface IHelpers { /// @@ -19,5 +102,18 @@ public interface IHelpers /// The weapon vdata. public CCSWeaponBaseVData? GetWeaponCSDataFromKey(int itemDefinitionIndex); + /// + /// Get weapon classname from item definition index. + /// + /// The item definition index of the weapon. + /// The weapon classname (e.g., "weapon_awp") or null if not found. + public string? GetClassnameByDefinitionIndex(int itemDefinitionIndex); + + /// + /// Get item definition index from weapon classname. + /// + /// The weapon classname (e.g., "weapon_awp"). + /// The item definition index or null if not found. + public int? GetDefinitionIndexByClassname(string classname); -} \ No newline at end of file +} diff --git a/managed/src/SwiftlyS2.Shared/Modules/Memory/IMemoryService.cs b/managed/src/SwiftlyS2.Shared/Modules/Memory/IMemoryService.cs index 7b76c4ad8..76183859a 100644 --- a/managed/src/SwiftlyS2.Shared/Modules/Memory/IMemoryService.cs +++ b/managed/src/SwiftlyS2.Shared/Modules/Memory/IMemoryService.cs @@ -58,6 +58,27 @@ public interface IMemoryService /// The resolved address. nint ResolveXrefAddress(nint xrefAddress); + /// + /// Get the vtable name of an object pointer. + /// + /// The address of the object pointer. + /// The vtable name. Return null if not found. + string? GetObjectPtrVtableName(nint address); + + /// + /// Check if an object pointer has a vtable. + /// + /// The address of the object pointer. + /// True if the object pointer has a vtable, false otherwise. + bool ObjectPtrHasVtable(nint address); + + /// + /// Check if an object pointer has a base class. + /// + /// The address of the object pointer. + /// The name of the base class. + /// True if the object pointer has the base class, false otherwise. + bool ObjectPtrHasBaseClass(nint address, string baseClassName); /// /// Convert a raw address to a schema class. diff --git a/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenu.cs b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenu.cs index 21561214e..3083cbde7 100644 --- a/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenu.cs +++ b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenu.cs @@ -1,381 +1,385 @@ -using System.Collections.Concurrent; -using SwiftlyS2.Shared.Natives; -using SwiftlyS2.Shared.Players; - -namespace SwiftlyS2.Shared.Menus; - -/// -/// Represents a menu interface that provides functionality for creating and managing interactive menus for players. -/// Supports customizable options, events, and rendering behavior. -/// -public interface IMenu -{ - /// - /// Gets or sets the title of the menu that will be displayed to players. - /// - public string Title { get; set; } - - /// - /// Gets the list of options available in this menu. - /// Each option represents a selectable item that players can interact with. - /// - public List Options { get; } - - /// - /// Gets a value indicating whether the menu has associated sounds for interactions. - /// - public bool HasSound { get; set; } - - /// - /// Gets or sets the parent menu for hierarchical menu navigation. - /// When set, allows players to navigate back to the parent menu. - /// - public IMenu? Parent { get; set; } - - /// - /// Gets or sets a concurrent dictionary that tracks auto-close cancellation tokens for each player. - /// Used to manage automatic menu closing functionality per player. - /// - public ConcurrentDictionary AutoCloseCancelTokens { get; set; } - - /// - /// Gets or sets custom button overrides for menu navigation. - /// Allows customization of default menu control buttons. - /// - public IMenuButtonOverrides? ButtonOverrides { get; set; } - - /// - /// Gets or sets the maximum number of options visible at once in the menu. - /// When there are more options than this limit, the menu will be paginated. - /// - public int MaxVisibleOptions { get; set; } - - /// - /// Gets or sets whether the player should be frozen while the menu is open. - /// When true, prevents player movement during menu interaction. - /// - public bool? ShouldFreeze { get; set; } - - /// - /// Gets or sets whether the menu should automatically close when an option is selected. - /// When true, the menu closes after any option selection. - /// - public bool? CloseOnSelect { get; set; } - - /// - /// Gets or sets the color used for rendering the menu. - /// Affects the visual appearance of the menu display. - /// - public Color RenderColor { get; set; } - - /// - /// Gets or sets the menu manager responsible for handling this menu. - /// Provides access to menu management functionality and state. - /// - public IMenuManager MenuManager { get; set; } - - /// - /// Gets or sets the time in seconds after which the menu will automatically close. - /// Set to 0 or negative value to disable auto-close functionality. - /// - public float AutoCloseAfter { get; set; } - - /// - /// Gets a value indicating whether the menu should be re-rendered on each game tick. - /// - public bool RenderOntick { get; set; } - - /// - /// Gets the menu builder used to construct and configure this menu. - /// Provides fluent API for menu construction and modification. - /// - public IMenuBuilder Builder { get; } - - /// - /// Event triggered when the menu is opened for a player. - /// Provides the player instance as event argument. - /// - event Action? OnOpen; - - /// - /// Event triggered when the menu is closed for a player. - /// Provides the player instance as event argument. - /// - event Action? OnClose; - - /// - /// Event triggered when a player moves their selection within the menu. - /// Provides the player instance as event argument. - /// - event Action? OnMove; - - /// - /// Event triggered when a player selects a menu option. - /// Provides both the player instance and the selected option as event arguments. - /// - event Action? OnItemSelected; - - /// - /// Event triggered when a player hovers over a menu option. - /// Provides both the player instance and the hovered option as event arguments. - /// - event Action? OnItemHovered; - - /// - /// Event triggered before the menu is rendered for a player. - /// Allows for last-minute modifications or preparations before display. - /// - event Action? BeforeRender; - - /// - /// Event triggered after the menu has been rendered for a player. - /// Useful for post-render operations or logging. - /// - event Action? AfterRender; - - /// - /// Shows the menu to the specified player. - /// Displays the menu interface and begins player interaction. - /// - /// The player to show the menu to. - public void Show( IPlayer player ); - - /// - /// Closes the menu for the specified player. - /// Hides the menu interface and ends player interaction. - /// - /// The player to close the menu for. - public void Close( IPlayer player ); - - /// - /// Moves the player's selection by the specified offset. - /// Positive values move down, negative values move up in the menu. - /// - /// The player whose selection to move. - /// The number of positions to move the selection. - public void MoveSelection( IPlayer player, int offset ); - - /// - /// Activates the currently selected option for the specified player. - /// Triggers the selected option's action or behavior. - /// - /// The player whose current selection to use. - public void UseSelection( IPlayer player ); - - /// - /// Handles slide option interaction for the specified player. - /// Used for options that support left/right navigation or value adjustment. - /// - /// The player interacting with the slide option. - /// True if sliding right, false if sliding left. - public void UseSlideOption( IPlayer player, bool isRight ); - - /// - /// Forces a re-render of the menu for the specified player. - /// Updates the menu display with current state and options. - /// - /// The player to re-render the menu for. - /// True to update horizontal style, false to render without updating horizontal style. - public void Rerender( IPlayer player, bool updateHorizontalStyle = false ); - - [Obsolete("Use GetCurrentOption instead")] - public bool IsCurrentOptionSelectable( IPlayer player ); - - [Obsolete("Use GetCurrentOption instead")] - public bool IsOptionSlider( IPlayer player ); - - /// - /// Gets the currently selected option for the specified player. - /// - /// The player to get the current option for. - /// The currently selected option, or null if no option is selected. - public IOption? GetCurrentOption( IPlayer player ); - - /// - /// Sets the freeze state for the specified player while the menu is active. - /// Controls whether the player can move while interacting with the menu. - /// - /// The player to set the freeze state for. - /// True to freeze the player, false to unfreeze. - public void SetFreezeState( IPlayer player, bool freeze ); - - /// - /// Gets or sets the vertical scroll style for the menu navigation. - /// Determines how the selection arrow moves when navigating through options. - /// - public MenuVerticalScrollStyle VerticalScrollStyle { get; set; } - - /// - /// Gets or sets the horizontal text display style for menu options. - /// Controls maximum text width and overflow behavior. Null means no horizontal restrictions. - /// - public MenuHorizontalStyle? HorizontalStyle { get; set; } -} - -/// -/// Defines the vertical scroll behavior style for menu navigation. -/// -public enum MenuVerticalScrollStyle -{ - /// - /// Linear vertical scrolling mode where the selection indicator moves within the visible area. - /// Content displays linearly without wrapping, indicator adjusts position as selection changes. - /// - LinearScroll, - - /// - /// Attempts to always keep the selection indicator at the preset center position. - /// Content scrolls vertically in a circular manner around the center, allowing wrap-around display (e.g., 7 8 1 2 3). - /// - CenterFixed, - - /// - /// Waits for the selection indicator to reach the preset center, then maintains it there. - /// Indicator adjusts position at the edges but stays centered during mid-range vertical navigation. - /// - WaitingCenter -} - -/// -/// Defines the horizontal text overflow behavior for menu options. -/// -public enum MenuHorizontalOverflowStyle -{ - /// - /// Truncates text at the end when it exceeds the maximum width, keeping the start portion. - /// Example: "Very Long Text Item" becomes "Very Long..." - /// - TruncateEnd, - - /// - /// Truncates text from both ends when it exceeds the maximum width, keeping the middle portion. - /// Example: "Very Long Text Item" becomes "Long Text" - /// - TruncateBothEnds, - - /// - /// Scrolls text to the left with fade-out effect. - /// Text scrolls left and gradually fades out at the left edge. - /// - ScrollLeftFade, - - /// - /// Scrolls text to the right with fade-out effect. - /// Text scrolls right and gradually fades out at the right edge. - /// - ScrollRightFade, - - /// - /// Scrolls text to the left in a continuous loop. - /// Text exits from the left edge and re-enters from the right edge. - /// - ScrollLeftLoop, - - /// - /// Scrolls text to the right in a continuous loop. - /// Text exits from the right edge and re-enters from the left edge. - /// - ScrollRightLoop -} - -/// -/// Horizontal text display style configuration for menu options. -/// -public readonly record struct MenuHorizontalStyle -{ - private readonly float maxWidth; - - /// - /// The maximum display width for menu option text in relative units. - /// - public required float MaxWidth { - get => maxWidth; - init { - if (value < 1f) - { - Spectre.Console.AnsiConsole.WriteException(new ArgumentOutOfRangeException(nameof(MaxWidth), $"MaxWidth: value {value:F3} is out of range.")); - maxWidth = 1f; - } - else - { - maxWidth = value; - } - } - } - - /// - /// The overflow behavior to apply when text exceeds MaxWidth. - /// - public MenuHorizontalOverflowStyle OverflowStyle { get; init; } - - /// - /// Number of ticks before scrolling by one character. - /// - public int TicksPerScroll { get; init; } - - /// - /// Number of ticks to pause after completing one scroll loop. - /// - public int PauseTicks { get; init; } - - public MenuHorizontalStyle() - { - OverflowStyle = MenuHorizontalOverflowStyle.TruncateEnd; - TicksPerScroll = 16; - PauseTicks = 0; - } - - /// - /// Creates a horizontal style with default behavior. - /// - public static MenuHorizontalStyle Default => - new() { MaxWidth = 26, OverflowStyle = MenuHorizontalOverflowStyle.TruncateEnd }; - - /// - /// Creates a horizontal style with truncate end behavior. - /// - public static MenuHorizontalStyle TruncateEnd( float maxWidth ) => - new() { MaxWidth = maxWidth, OverflowStyle = MenuHorizontalOverflowStyle.TruncateEnd }; - - /// - /// Creates a horizontal style with truncate both ends behavior. - /// - public static MenuHorizontalStyle TruncateBothEnds( float maxWidth ) => - new() { MaxWidth = maxWidth, OverflowStyle = MenuHorizontalOverflowStyle.TruncateBothEnds }; - - /// - /// Creates a horizontal style with scroll left fade behavior. - /// - /// Maximum display width for text. - /// Number of ticks before scrolling by one character. - /// Number of ticks to pause after completing one scroll loop. - public static MenuHorizontalStyle ScrollLeftFade( float maxWidth, int ticksPerScroll = 16, int pauseTicks = 0 ) => - new() { MaxWidth = maxWidth, OverflowStyle = MenuHorizontalOverflowStyle.ScrollLeftFade, TicksPerScroll = ticksPerScroll, PauseTicks = pauseTicks }; - - /// - /// Creates a horizontal style with scroll right fade behavior. - /// - /// Maximum display width for text. - /// Number of ticks before scrolling by one character. - /// Number of ticks to pause after completing one scroll loop. - public static MenuHorizontalStyle ScrollRightFade( float maxWidth, int ticksPerScroll = 16, int pauseTicks = 0 ) => - new() { MaxWidth = maxWidth, OverflowStyle = MenuHorizontalOverflowStyle.ScrollRightFade, TicksPerScroll = ticksPerScroll, PauseTicks = pauseTicks }; - - /// - /// Creates a horizontal style with scroll left loop behavior. - /// - /// Maximum display width for text. - /// Number of ticks before scrolling by one character. - /// Number of ticks to pause after completing one scroll loop. - public static MenuHorizontalStyle ScrollLeftLoop( float maxWidth, int ticksPerScroll = 16, int pauseTicks = 0 ) => - new() { MaxWidth = maxWidth, OverflowStyle = MenuHorizontalOverflowStyle.ScrollLeftLoop, TicksPerScroll = ticksPerScroll, PauseTicks = pauseTicks }; - - /// - /// Creates a horizontal style with scroll right loop behavior. - /// - /// Maximum display width for text. - /// Number of ticks before scrolling by one character. - /// Number of ticks to pause after completing one scroll loop. - public static MenuHorizontalStyle ScrollRightLoop( float maxWidth, int ticksPerScroll = 16, int pauseTicks = 0 ) => - new() { MaxWidth = maxWidth, OverflowStyle = MenuHorizontalOverflowStyle.ScrollRightLoop, TicksPerScroll = ticksPerScroll, PauseTicks = pauseTicks }; -} \ No newline at end of file +// using System.Collections.Concurrent; +// using SwiftlyS2.Shared.Natives; +// using SwiftlyS2.Shared.Players; + +// namespace SwiftlyS2.Shared.Menus; + +// /// +// /// Represents a menu interface that provides functionality for creating and managing interactive menus for players. +// /// Supports customizable options, events, and rendering behavior. +// /// +// [Obsolete("IMenu will be deprecared at the release of SwiftlyS2. Please use IMenuAPI instead")] +// public interface IMenu +// { +// /// +// /// Gets or sets the title of the menu that will be displayed to players. +// /// +// public string Title { get; set; } + +// /// +// /// Gets the list of options available in this menu. +// /// Each option represents a selectable item that players can interact with. +// /// +// public List Options { get; } + +// /// +// /// Gets a value indicating whether the menu has associated sounds for interactions. +// /// +// public bool HasSound { get; set; } + +// /// +// /// Gets or sets the parent menu for hierarchical menu navigation. +// /// When set, allows players to navigate back to the parent menu. +// /// +// public IMenu? Parent { get; set; } + +// /// +// /// Gets or sets a concurrent dictionary that tracks auto-close cancellation tokens for each player. +// /// Used to manage automatic menu closing functionality per player. +// /// +// public ConcurrentDictionary AutoCloseCancelTokens { get; set; } + +// /// +// /// Gets or sets custom button overrides for menu navigation. +// /// Allows customization of default menu control buttons. +// /// +// public IMenuButtonOverrides? ButtonOverrides { get; set; } + +// /// +// /// Gets or sets the maximum number of options visible at once in the menu. +// /// When there are more options than this limit, the menu will be paginated. +// /// +// public int MaxVisibleOptions { get; set; } + +// /// +// /// Gets or sets whether the player should be frozen while the menu is open. +// /// When true, prevents player movement during menu interaction. +// /// +// public bool? ShouldFreeze { get; set; } + +// /// +// /// Gets or sets whether the menu should automatically close when an option is selected. +// /// When true, the menu closes after any option selection. +// /// +// public bool? CloseOnSelect { get; set; } + +// /// +// /// Gets or sets the color used for rendering the menu. +// /// Affects the visual appearance of the menu display. +// /// +// public Color RenderColor { get; set; } + +// /// +// /// Gets or sets the menu manager responsible for handling this menu. +// /// Provides access to menu management functionality and state. +// /// +// public IMenuManager MenuManager { get; set; } + +// /// +// /// Gets or sets the time in seconds after which the menu will automatically close. +// /// Set to 0 or negative value to disable auto-close functionality. +// /// +// public float AutoCloseAfter { get; set; } + +// /// +// /// Gets a value indicating whether the menu should be re-rendered on each game tick. +// /// +// public bool RenderOntick { get; set; } + +// /// +// /// Gets the menu builder used to construct and configure this menu. +// /// Provides fluent API for menu construction and modification. +// /// +// public IMenuBuilder Builder { get; } + +// /// +// /// Event triggered when the menu is opened for a player. +// /// Provides the player instance as event argument. +// /// +// event Action? OnOpen; + +// /// +// /// Event triggered when the menu is closed for a player. +// /// Provides the player instance as event argument. +// /// +// event Action? OnClose; + +// /// +// /// Event triggered when a player moves their selection within the menu. +// /// Provides the player instance as event argument. +// /// +// event Action? OnMove; + +// /// +// /// Event triggered when a player selects a menu option. +// /// Provides both the player instance and the selected option as event arguments. +// /// +// event Action? OnItemSelected; + +// /// +// /// Event triggered when a player hovers over a menu option. +// /// Provides both the player instance and the hovered option as event arguments. +// /// +// event Action? OnItemHovered; + +// /// +// /// Event triggered before the menu is rendered for a player. +// /// Allows for last-minute modifications or preparations before display. +// /// +// event Action? BeforeRender; + +// /// +// /// Event triggered after the menu has been rendered for a player. +// /// Useful for post-render operations or logging. +// /// +// event Action? AfterRender; + +// /// +// /// Shows the menu to the specified player. +// /// Displays the menu interface and begins player interaction. +// /// +// /// The player to show the menu to. +// public void Show( IPlayer player ); + +// /// +// /// Closes the menu for the specified player. +// /// Hides the menu interface and ends player interaction. +// /// +// /// The player to close the menu for. +// public void Close( IPlayer player ); + +// /// +// /// Moves the player's selection by the specified offset. +// /// Positive values move down, negative values move up in the menu. +// /// +// /// The player whose selection to move. +// /// The number of positions to move the selection. +// public void MoveSelection( IPlayer player, int offset ); + +// /// +// /// Activates the currently selected option for the specified player. +// /// Triggers the selected option's action or behavior. +// /// +// /// The player whose current selection to use. +// public void UseSelection( IPlayer player ); + +// /// +// /// Handles slide option interaction for the specified player. +// /// Used for options that support left/right navigation or value adjustment. +// /// +// /// The player interacting with the slide option. +// /// True if sliding right, false if sliding left. +// public void UseSlideOption( IPlayer player, bool isRight ); + +// /// +// /// Forces a re-render of the menu for the specified player. +// /// Updates the menu display with current state and options. +// /// +// /// The player to re-render the menu for. +// /// True to update horizontal style, false to render without updating horizontal style. +// public void Rerender( IPlayer player, bool updateHorizontalStyle = false ); + +// [Obsolete("Use GetCurrentOption instead")] +// public bool IsCurrentOptionSelectable( IPlayer player ); + +// [Obsolete("Use GetCurrentOption instead")] +// public bool IsOptionSlider( IPlayer player ); + +// /// +// /// Gets the currently selected option for the specified player. +// /// +// /// The player to get the current option for. +// /// The currently selected option, or null if no option is selected. +// public IOption? GetCurrentOption( IPlayer player ); + +// /// +// /// Sets the freeze state for the specified player while the menu is active. +// /// Controls whether the player can move while interacting with the menu. +// /// +// /// The player to set the freeze state for. +// /// True to freeze the player, false to unfreeze. +// public void SetFreezeState( IPlayer player, bool freeze ); + +// /// +// /// Gets or sets the vertical scroll style for the menu navigation. +// /// Determines how the selection arrow moves when navigating through options. +// /// +// public MenuVerticalScrollStyle VerticalScrollStyle { get; set; } + +// /// +// /// Gets or sets the horizontal text display style for menu options. +// /// Controls maximum text width and overflow behavior. Null means no horizontal restrictions. +// /// +// public MenuHorizontalStyle? HorizontalStyle { get; set; } +// } + +// /// +// /// Defines the vertical scroll behavior style for menu navigation. +// /// +// [Obsolete("MenuVerticalScrollStyle will be deprecared at the release of SwiftlyS2. Please use OptionScrollStyle instead")] +// public enum MenuVerticalScrollStyle +// { +// /// +// /// Linear vertical scrolling mode where the selection indicator moves within the visible area. +// /// Content displays linearly without wrapping, indicator adjusts position as selection changes. +// /// +// LinearScroll, + +// /// +// /// Attempts to always keep the selection indicator at the preset center position. +// /// Content scrolls vertically in a circular manner around the center, allowing wrap-around display (e.g., 7 8 1 2 3). +// /// +// CenterFixed, + +// /// +// /// Waits for the selection indicator to reach the preset center, then maintains it there. +// /// Indicator adjusts position at the edges but stays centered during mid-range vertical navigation. +// /// +// WaitingCenter +// } + +// /// +// /// Defines the horizontal text overflow behavior for menu options. +// /// +// [Obsolete("MenuHorizontalOverflowStyle will be deprecared at the release of SwiftlyS2. Please use MenuOptionTextStyle instead")] +// public enum MenuHorizontalOverflowStyle +// { +// /// +// /// Truncates text at the end when it exceeds the maximum width, keeping the start portion. +// /// Example: "Very Long Text Item" becomes "Very Long..." +// /// +// TruncateEnd, + +// /// +// /// Truncates text from both ends when it exceeds the maximum width, keeping the middle portion. +// /// Example: "Very Long Text Item" becomes "Long Text" +// /// +// TruncateBothEnds, + +// /// +// /// Scrolls text to the left with fade-out effect. +// /// Text scrolls left and gradually fades out at the left edge. +// /// +// ScrollLeftFade, + +// /// +// /// Scrolls text to the right with fade-out effect. +// /// Text scrolls right and gradually fades out at the right edge. +// /// +// ScrollRightFade, + +// /// +// /// Scrolls text to the left in a continuous loop. +// /// Text exits from the left edge and re-enters from the right edge. +// /// +// ScrollLeftLoop, + +// /// +// /// Scrolls text to the right in a continuous loop. +// /// Text exits from the right edge and re-enters from the left edge. +// /// +// ScrollRightLoop +// } + +// /// +// /// Horizontal text display style configuration for menu options. +// /// +// [Obsolete("MenuHorizontalStyle will be deprecared at the release of SwiftlyS2.")] +// public readonly record struct MenuHorizontalStyle +// { +// private readonly float maxWidth; + +// /// +// /// The maximum display width for menu option text in relative units. +// /// +// public required float MaxWidth { +// get => maxWidth; +// init { +// if (value < 1f) +// { +// Spectre.Console.AnsiConsole.WriteException(new ArgumentOutOfRangeException(nameof(MaxWidth), $"MaxWidth: value {value:F3} is out of range.")); +// maxWidth = 1f; +// } +// else +// { +// maxWidth = value; +// } +// } +// } + +// /// +// /// The overflow behavior to apply when text exceeds MaxWidth. +// /// +// public MenuHorizontalOverflowStyle OverflowStyle { get; init; } + +// /// +// /// Number of ticks before scrolling by one character. +// /// +// public int TicksPerScroll { get; init; } + +// /// +// /// Number of ticks to pause after completing one scroll loop. +// /// +// public int PauseTicks { get; init; } + +// public MenuHorizontalStyle() +// { +// OverflowStyle = MenuHorizontalOverflowStyle.TruncateEnd; +// TicksPerScroll = 16; +// PauseTicks = 0; +// } + +// /// +// /// Creates a horizontal style with default behavior. +// /// +// public static MenuHorizontalStyle Default => +// new() { MaxWidth = 26, OverflowStyle = MenuHorizontalOverflowStyle.TruncateEnd }; + +// /// +// /// Creates a horizontal style with truncate end behavior. +// /// +// public static MenuHorizontalStyle TruncateEnd( float maxWidth ) => +// new() { MaxWidth = maxWidth, OverflowStyle = MenuHorizontalOverflowStyle.TruncateEnd }; + +// /// +// /// Creates a horizontal style with truncate both ends behavior. +// /// +// public static MenuHorizontalStyle TruncateBothEnds( float maxWidth ) => +// new() { MaxWidth = maxWidth, OverflowStyle = MenuHorizontalOverflowStyle.TruncateBothEnds }; + +// /// +// /// Creates a horizontal style with scroll left fade behavior. +// /// +// /// Maximum display width for text. +// /// Number of ticks before scrolling by one character. +// /// Number of ticks to pause after completing one scroll loop. +// public static MenuHorizontalStyle ScrollLeftFade( float maxWidth, int ticksPerScroll = 16, int pauseTicks = 0 ) => +// new() { MaxWidth = maxWidth, OverflowStyle = MenuHorizontalOverflowStyle.ScrollLeftFade, TicksPerScroll = ticksPerScroll, PauseTicks = pauseTicks }; + +// /// +// /// Creates a horizontal style with scroll right fade behavior. +// /// +// /// Maximum display width for text. +// /// Number of ticks before scrolling by one character. +// /// Number of ticks to pause after completing one scroll loop. +// public static MenuHorizontalStyle ScrollRightFade( float maxWidth, int ticksPerScroll = 16, int pauseTicks = 0 ) => +// new() { MaxWidth = maxWidth, OverflowStyle = MenuHorizontalOverflowStyle.ScrollRightFade, TicksPerScroll = ticksPerScroll, PauseTicks = pauseTicks }; + +// /// +// /// Creates a horizontal style with scroll left loop behavior. +// /// +// /// Maximum display width for text. +// /// Number of ticks before scrolling by one character. +// /// Number of ticks to pause after completing one scroll loop. +// public static MenuHorizontalStyle ScrollLeftLoop( float maxWidth, int ticksPerScroll = 16, int pauseTicks = 0 ) => +// new() { MaxWidth = maxWidth, OverflowStyle = MenuHorizontalOverflowStyle.ScrollLeftLoop, TicksPerScroll = ticksPerScroll, PauseTicks = pauseTicks }; + +// /// +// /// Creates a horizontal style with scroll right loop behavior. +// /// +// /// Maximum display width for text. +// /// Number of ticks before scrolling by one character. +// /// Number of ticks to pause after completing one scroll loop. +// public static MenuHorizontalStyle ScrollRightLoop( float maxWidth, int ticksPerScroll = 16, int pauseTicks = 0 ) => +// new() { MaxWidth = maxWidth, OverflowStyle = MenuHorizontalOverflowStyle.ScrollRightLoop, TicksPerScroll = ticksPerScroll, PauseTicks = pauseTicks }; +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuAPI.cs b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuAPI.cs new file mode 100644 index 000000000..55fa4454e --- /dev/null +++ b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuAPI.cs @@ -0,0 +1,387 @@ +using SwiftlyS2.Shared.Players; + +namespace SwiftlyS2.Shared.Menus; + +/// +/// Defines configuration settings that control menu behavior. +/// +/// +/// Configuration settings that control menu behavior, appearance, and player interaction. +/// Defines various aspects of menu functionality including navigation, input handling, audio feedback, and display options. +/// +public record class MenuConfiguration +{ + private int maxVisibleItems = -1; + private string? navigationMarkerColor = null; + private string? footerColor = null; + private string? visualGuideLineColor = null; + private string? disabledColor = null; + + /// + /// The title of the menu. + /// + public string Title { get; set; } = "Menu"; + + /// + /// Whether to hide the menu title. + /// + public bool HideTitle { get; set; } = false; + + /// + /// Whether to hide the menu footer. + /// + public bool HideFooter { get; set; } = false; + + /// + /// Whether to play sounds when players interact with the menu. + /// + public bool PlaySound { get; set; } = true; + + /// + /// Maximum number of menu options displayed on screen at once. + /// + /// + /// Valid range is [1, 5]. If set to a value outside this range, an exception will be thrown and the value will be set to -1. + /// + /// When set to -1, the maximum visible items per page will use the ItemsPerPage value from the configuration file. + /// + /// + public int MaxVisibleItems { + get => maxVisibleItems; + set { + if (value < 1 || value > 5) + { + Spectre.Console.AnsiConsole.WriteException(new ArgumentOutOfRangeException(nameof(value), $"MaxVisibleItems: value {value} is out of range [1, 5].")); + maxVisibleItems = -1; + } + else + { + maxVisibleItems = value; + } + } + } + + /// + /// Whether to automatically increase when or is enabled. + /// Each hidden section adds 1 to the visible items count. + /// + /// + /// This does not modify the actual value. + /// Instead, the increase is applied during rendering calculations only. + /// + public bool AutoIncreaseVisibleItems { get; set; } = true; + + /// + /// Whether to freeze player movement while the menu is open. + /// + public bool FreezePlayer { get; set; } = false; + + /// + /// Time in seconds before the menu automatically closes. Set to 0 or less to disable auto-close. + /// + public float AutoCloseAfter { get; set; } = 0f; + + /// + /// The color of navigation markers (selection indicators, page indicators, etc.) in hex format. + /// + /// + /// Supports "#RGB", "#RGBA", "#RRGGBB", and "#RRGGBBAA" formats. + /// + public string? NavigationMarkerColor { + get => navigationMarkerColor; + set { + if (string.IsNullOrWhiteSpace(value) || Helper.ParseHexColor(value) is not (not null, not null, not null, _)) + { + Spectre.Console.AnsiConsole.WriteException(new ArgumentException($"NavigationMarkerColor: '{value}' is not a valid hex color format. Expected '#RRGGBB'.", nameof(value))); + navigationMarkerColor = null; + } + else + { + navigationMarkerColor = value; + } + } + } + + /// + /// The color of the menu footer in hex format. + /// + /// + /// Supports "#RGB", "#RGBA", "#RRGGBB", and "#RRGGBBAA" formats. + /// + public string? FooterColor { + get => footerColor; + set { + if (string.IsNullOrWhiteSpace(value) || Helper.ParseHexColor(value) is not (not null, not null, not null, _)) + { + Spectre.Console.AnsiConsole.WriteException(new ArgumentException($"FooterColor: '{value}' is not a valid hex color format. Expected '#RRGGBB'.", nameof(value))); + footerColor = null; + } + else + { + footerColor = value; + } + } + } + + /// + /// The color of visual guide lines in hex format. + /// + /// + /// Supports "#RGB", "#RGBA", "#RRGGBB", and "#RRGGBBAA" formats. + /// + public string? VisualGuideLineColor { + get => visualGuideLineColor; + set { + if (string.IsNullOrWhiteSpace(value) || Helper.ParseHexColor(value) is not (not null, not null, not null, _)) + { + Spectre.Console.AnsiConsole.WriteException(new ArgumentException($"VisualGuideLineColor: '{value}' is not a valid hex color format. Expected '#RRGGBB'.", nameof(value))); + visualGuideLineColor = null; + } + else + { + visualGuideLineColor = value; + } + } + } + + /// + /// The color of disabled menu options in hex format. + /// + /// + /// Supports "#RGB", "#RGBA", "#RRGGBB", and "#RRGGBBAA" formats. + /// + public string? DisabledColor { + get => disabledColor; + set { + if (string.IsNullOrWhiteSpace(value) || Helper.ParseHexColor(value) is not (not null, not null, not null, _)) + { + Spectre.Console.AnsiConsole.WriteException(new ArgumentException($"DisabledColor: '{value}' is not a valid hex color format. Expected '#RRGGBB'.", nameof(value))); + disabledColor = null; + } + else + { + disabledColor = value; + } + } + } +} + +/// +/// Custom key bindings for menu actions. +/// Each property can be set to override the default bindings, or left null to use defaults. +/// +/// +/// NOTE: For WASD input mode, any key binding overrides will not take effect. +/// +public readonly record struct MenuKeybindOverrides +{ + /// + /// Key binding for selecting or activating the highlighted menu option. + /// + public KeyBind? Select { get; init; } + + /// + /// Key binding for moving forward through menu options. + /// + public KeyBind? Move { get; init; } + + /// + /// Key binding for moving backward through menu options. + /// + public KeyBind? MoveBack { get; init; } + + /// + /// Key binding for closing the menu. + /// + public KeyBind? Exit { get; init; } +} + +/// +/// Provides event data for menu-related events. +/// +public sealed class MenuEventArgs : EventArgs +{ + /// + /// The player who triggered this menu event. + /// + public IPlayer? Player { get; init; } = null; + + /// + /// The menu options involved in this event. + /// + public IReadOnlyList? Options { get; init; } = null; +} + +/// +/// Represents an interactive menu that can be displayed to players. +/// +public interface IMenuAPI : IDisposable +{ + /// + /// The menu manager that this menu belongs to. + /// + public IMenuManagerAPI MenuManager { get; } + + /// + /// Configuration settings for this menu. + /// + public MenuConfiguration Configuration { get; } + + /// + /// Keybind overrides for this menu. + /// + public MenuKeybindOverrides KeybindOverrides { get; } + + /// + /// The scroll style for this menu options. + /// + public MenuOptionScrollStyle OptionScrollStyle { get; } + + // /// + // /// The text overflow style for menu options. + // /// + // public MenuOptionTextStyle OptionTextStyle { get; } + + /// + /// The builder used to construct and configure this menu. + /// + public IMenuBuilderAPI? Builder { get; } + + /// + /// Gets or sets an object that contains data about this menu. + /// + public object? Tag { get; set; } + + /// + /// The parent hierarchy information in a hierarchical menu structure. + /// + /// + /// ParentMenu is the parent menu instance, null for top-level menus. + /// TriggerOption is the menu option that triggered this submenu, null for top-level or directly created menus. + /// + public (IMenuAPI? ParentMenu, IMenuOption? TriggerOption) Parent { get; } + + /// + /// Read-only collection of all options in this menu. + /// + public IReadOnlyList Options { get; } + + // /// + // /// Fired before a player navigates to a different menu option. + // /// + // public event EventHandler? BeforeSelectionMove; + + // /// + // /// Fired after a player navigates to a different menu option. + // /// + // public event EventHandler? AfterSelectionMove; + + /// + /// Fired when the selection pointer is hovering over an option. + /// + public event EventHandler? OptionHovering; + + // /// + // /// Fired when an option is about to enter the visible viewport. + // /// + // public event EventHandler? OptionEntering; + + // /// + // /// Fired when an option is about to leave the visible viewport. + // /// + // public event EventHandler? OptionLeaving; + + /// + /// Shows this menu to the specified player by displaying its content. + /// + /// The player who will see the menu. + /// + /// This method only displays the menu visually. To properly open a menu (which handles state management, + /// closing other menus, and triggering events), use instead. + /// + public void ShowForPlayer( IPlayer player ); + + /// + /// Hides this menu for the specified player by removing its visual display. + /// + /// The player whose menu will be hidden. + /// + /// This method only hides the menu visually. To properly close a menu (which handles state cleanup, + /// triggering events, and reopening parent menus), use instead. + /// + public void HideForPlayer( IPlayer player ); + + /// + /// Adds a new option to this menu. + /// + /// The menu option to add. + public void AddOption( IMenuOption option ); + + /// + /// Removes an option from this menu. + /// + /// The menu option to remove. + /// True if the option was successfully removed, false if the option was not found. + public bool RemoveOption( IMenuOption option ); + + /// + /// Moves the player's selection to the specified option. + /// + /// The player whose selection to move. + /// The option to move the selection to. + /// True if the move was successful, false if the option was not found. + public bool MoveToOption( IPlayer player, IMenuOption option ); + + /// + /// Moves the player's selection to the specified option index. + /// + /// The player whose selection to move. + /// The index of the option to move the selection to. + /// True if the move was successful, false if the index was out of bounds. + public bool MoveToOptionIndex( IPlayer player, int index ); + + /// + /// Gets the menu option currently highlighted by the specified player. + /// + /// The player whose current selection to retrieve. + /// The currently selected option, or null if nothing is selected. + public IMenuOption? GetCurrentOption( IPlayer player ); + + /// + /// Gets the index of the currently highlighted option for the specified player. + /// + /// The player whose current selection index to retrieve. + /// The index of the currently selected option, or -1 if nothing is selected. + public int GetCurrentOptionIndex( IPlayer player ); + + // /// + // /// Gets the display line index of the currently highlighted option for the specified player. + // /// + // /// The player whose current selection display line to retrieve. + // /// The display line index of the currently selected option, or -1 if nothing is selected. + // public int GetCurrentOptionDisplayLine( IPlayer player ); +} + +/// +/// Defines how the menu scrolls when navigating between options. +/// +public enum MenuOptionScrollStyle +{ + /// + /// The selection indicator moves up and down through the visible menu area. + /// The menu content stays fixed until the indicator reaches the edge. + /// + LinearScroll, + + /// + /// The selection indicator always stays in the center position. + /// Menu options scroll circularly around it, wrapping from bottom to top (e.g., ...7, 8, 1, 2, 3...). + /// + CenterFixed, + + /// + /// The selection indicator moves until it reaches the center, then stays there. + /// At the top and bottom edges, the indicator can move away from center. + /// + WaitingCenter +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuBuilder.cs b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuBuilder.cs index fd080c889..25cb2c859 100644 --- a/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuBuilder.cs +++ b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuBuilder.cs @@ -1,388 +1,389 @@ -using SwiftlyS2.Shared.Natives; -using SwiftlyS2.Shared.Players; - -namespace SwiftlyS2.Shared.Menus; - -/// -/// Provides a fluent interface for building and configuring menus with various option types and behaviors. -/// Supports method chaining for easy menu construction and customization. -/// -public interface IMenuBuilder -{ - IMenuDesign Design { get; } - - /// - /// Sets the menu instance that this builder will modify. - /// This method is typically called internally to associate the builder with a specific menu. - /// - /// The menu instance to build and configure. - /// The current menu builder instance for method chaining. - IMenuBuilder SetMenu( IMenu menu ); - - /// - /// Sets whether the menu should have associated sounds for interactions. - /// - /// Enables/disables sound effects for menu interactions. - /// The current menu builder instance for method chaining. - IMenuBuilder HasSound( bool hasSound ); - - /// - /// Adds a clickable button option to the menu. - /// When selected, executes the provided action with the player as parameter. - /// - /// The display text for the button. - /// Optional action to execute when the button is clicked. Receives the player as parameter. - /// The text size for the button display. Defaults to Medium. - /// The overflow style for the text. Defaults to null. - /// The current menu builder instance for method chaining. - IMenuBuilder AddButton( string text, Action? onClick = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); - - /// - /// Adds a clickable button option to the menu. - /// When selected, executes the provided action with the player and option as parameters. - /// - /// The display text for the button. - /// Optional action to execute when the button is clicked. Receives the player and option as parameters. - /// The text size for the button display. Defaults to Medium. - /// The overflow style for the text. Defaults to null. - /// The current menu builder instance for method chaining. - IMenuBuilder AddButton( string text, Action? onClick, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); - - /// - /// Adds a toggle switch option to the menu that can be turned on or off. - /// Players can interact with this option to change its boolean state. - /// - /// The display text for the toggle option. - /// The initial state of the toggle. Defaults to false. - /// Optional action to execute when the toggle state changes. Receives the player and new boolean value. - /// The text size for the toggle display. Defaults to Medium. - /// The overflow style for the text. Defaults to null. - /// The current menu builder instance for method chaining. - IMenuBuilder AddToggle( string text, bool defaultValue = false, Action? onToggle = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); - - /// - /// Adds a toggle switch option to the menu that can be turned on or off. - /// Players can interact with this option to change its boolean state. - /// - /// The display text for the toggle option. - /// The initial state of the toggle. Defaults to false. - /// Optional action to execute when the toggle state changes. Receives the player, option, and new boolean value. - /// The text size for the toggle display. Defaults to Medium. - /// The overflow style for the text. Defaults to null. - /// The current menu builder instance for method chaining. - IMenuBuilder AddToggle( string text, bool defaultValue, Action? onToggle, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); - - /// - /// Adds a slider option to the menu for selecting numeric values within a specified range. - /// Players can adjust the value using left/right navigation. - /// - /// The display text for the slider option. - /// The minimum allowed value for the slider. - /// The maximum allowed value for the slider. - /// The initial value of the slider. - /// The increment/decrement step size. Defaults to 1. - /// Optional action to execute when the slider value changes. Receives the player and new float value. - /// The text size for the slider display. Defaults to Medium. - /// The overflow style for the text. Defaults to null. - /// The current menu builder instance for method chaining. - IMenuBuilder AddSlider( string text, float min, float max, float defaultValue, float step = 1, Action? onChange = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); - - /// - /// Adds a slider option to the menu for selecting numeric values within a specified range. - /// Players can adjust the value using left/right navigation. - /// - /// The display text for the slider option. - /// The minimum allowed value for the slider. - /// The maximum allowed value for the slider. - /// The initial value of the slider. - /// The increment/decrement step size. - /// Optional action to execute when the slider value changes. Receives the player, option, and new float value. - /// The text size for the slider display. Defaults to Medium. - /// The overflow style for the text. Defaults to null. - /// The current menu builder instance for method chaining. - IMenuBuilder AddSlider( string text, float min, float max, float defaultValue, float step, Action? onChange, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); - - /// - /// Adds an asynchronous button option to the menu that executes async operations. - /// When selected, executes the provided async function with the player as parameter. - /// - /// The display text for the async button. - /// The async function to execute when the button is clicked. Receives the player as parameter. - /// The text size for the button display. Defaults to Medium. - /// The overflow style for the text. Defaults to null. - /// The current menu builder instance for method chaining. - IMenuBuilder AddAsyncButton( string text, Func onClickAsync, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); - - /// - /// Adds an asynchronous button option to the menu that executes async operations. - /// When selected, executes the provided async function with the player and option as parameters. - /// - /// The display text for the async button. - /// The async function to execute when the button is clicked. Receives the player and option as parameters. - /// The text size for the button display. Defaults to Medium. - /// The overflow style for the text. Defaults to null. - /// The current menu builder instance for method chaining. - IMenuBuilder AddAsyncButton( string text, Func onClickAsync, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); - - /// - /// Adds a non-interactive text display option to the menu. - /// Used for showing information, headers, or descriptions within the menu. - /// - /// The text content to display. - /// The text alignment within the menu. Defaults to Left. - /// The text size for the display. Defaults to Medium. - /// The overflow style for the text. Defaults to null. - /// The current menu builder instance for method chaining. - IMenuBuilder AddText( string text, ITextAlign alignment = ITextAlign.Left, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); - - /// - /// Adds a submenu option that navigates to another menu when selected. - /// Creates a hierarchical menu structure with parent-child relationships. - /// - /// The display text for the submenu option. - /// The submenu instance to navigate to. - /// The text size for the submenu display. Defaults to Medium. - /// The current menu builder instance for method chaining. - IMenuBuilder AddSubmenu( string text, IMenu submenu, IMenuTextSize size = IMenuTextSize.Medium ); - - /// - /// Adds a submenu option that navigates to another menu when selected. - /// Creates a hierarchical menu structure with parent-child relationships. - /// - /// The display text for the submenu option. - /// The submenu instance to navigate to. - /// The current menu builder instance for method chaining. - IMenuBuilder AddSubmenu( string text, IMenu submenu ); - - /// - /// Adds a submenu option that creates and navigates to a dynamically built menu when selected. - /// The submenu is constructed on-demand using the provided builder function. - /// - /// The display text for the submenu option. - /// A function that returns the submenu instance when called. - /// The text size for the submenu display. Defaults to Medium. - /// The current menu builder instance for method chaining. - IMenuBuilder AddSubmenu( string text, Func submenuBuilder, IMenuTextSize size = IMenuTextSize.Medium ); - - /// - /// Adds a submenu option that creates and navigates to a dynamically built menu when selected. - /// The submenu is constructed on-demand using the provided builder function. - /// - /// The display text for the submenu option. - /// A function that returns the submenu instance when called. - /// The current menu builder instance for method chaining. - IMenuBuilder AddSubmenu( string text, Func submenuBuilder ); - - /// - /// Adds a submenu option that creates and navigates to a dynamically built menu when selected. - /// The submenu is constructed on-demand using the provided asynchronous builder function. - /// - /// The display text for the submenu option. - /// An asynchronous function that returns the submenu instance when called. - /// The text size for the submenu display. Defaults to Medium. - /// The current menu builder instance for method chaining. - IMenuBuilder AddSubmenu( string text, Func> submenuBuilder, IMenuTextSize size = IMenuTextSize.Medium ); - - /// - /// Adds a submenu option that creates and navigates to a dynamically built menu when selected. - /// The submenu is constructed on-demand using the provided asynchronous builder function. - /// - /// The display text for the submenu option. - /// An asynchronous function that returns the submenu instance when called. - /// The current menu builder instance for method chaining. - IMenuBuilder AddSubmenu( string text, Func> submenuBuilder ); - - /// - /// Adds a choice selection option that allows players to select from multiple predefined options. - /// Players can cycle through the available choices using left/right navigation. - /// - /// The display text for the choice option. - /// An array of available choice strings. - /// The initially selected choice. Defaults to null (first choice). - /// Optional action to execute when the choice changes. Receives the player and selected choice string. - /// The text size for the choice display. Defaults to Medium. - /// The overflow style for the text. Defaults to null. - /// The current menu builder instance for method chaining. - IMenuBuilder AddChoice( string text, string[] choices, string? defaultChoice = null, Action? onChange = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); - - // /// - // /// Adds a choice selection option that allows players to select from multiple predefined options. - // /// Players can cycle through the available choices using left/right navigation. - // /// - // /// The display text for the choice option. - // /// An array of available choice strings. - // /// The initially selected choice. - // /// Optional action to execute when the choice changes. Receives the player and selected choice string. - // /// The overflow style for the text. Defaults to null. - // /// The current menu builder instance for method chaining. - // [Obsolete("This overload causes ambiguity. Use AddChoice(text, choices, defaultChoice, onChange, IMenuTextSize.Medium, overflowStyle) instead.")] - // IMenuBuilder AddChoice(string text, string[] choices, string? defaultChoice, Action? onChange, MenuHorizontalStyle? overflowStyle = null); - - /// - /// Adds a choice selection option that allows players to select from multiple predefined options. - /// Players can cycle through the available choices using left/right navigation. - /// - /// The display text for the choice option. - /// An array of available choice strings. - /// The initially selected choice. - /// Optional action to execute when the choice changes. Receives the player, option, and selected choice string. - /// The text size for the choice display. Defaults to Medium. - /// The overflow style for the text. Defaults to null. - /// The current menu builder instance for method chaining. - IMenuBuilder AddChoice( string text, string[] choices, string? defaultChoice, Action? onChange, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); - - /// - /// Adds a visual separator line to the menu for organizing content. - /// Creates a non-interactive divider between menu sections. - /// - /// The current menu builder instance for method chaining. - IMenuBuilder AddSeparator(); - - /// - /// Adds a progress bar display option that shows dynamic progress information. - /// The progress value is retrieved from the provided function and updated automatically. - /// - /// The display text for the progress bar. - /// A function that returns the current progress value (0.0 to 1.0). - /// The character width of the progress bar. Defaults to 20. - /// The text size for the progress bar display. Defaults to Medium. - /// The overflow style for the text. Defaults to null. - /// The current menu builder instance for method chaining. - IMenuBuilder AddProgressBar( string text, Func progressProvider, int barWidth = 20, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); - - /// - /// Adds a progress bar display option that shows dynamic progress information. - /// The progress value is retrieved from the provided function and updated automatically. - /// - /// The display text for the progress bar. - /// A function that returns the current progress value (0.0 to 1.0). - /// The character width of the progress bar. - /// The overflow style for the text. Defaults to null. - /// The current menu builder instance for method chaining. - IMenuBuilder AddProgressBar( string text, Func progressProvider, int barWidth, MenuHorizontalStyle? overflowStyle = null ); - - /// - /// Sets the parent menu for the menu being built, creating a hierarchical menu structure. - /// Allows players to navigate back to the parent menu from the current menu. - /// - /// The parent menu instance. - /// The current menu builder instance for method chaining. - IMenuBuilder WithParent( IMenu parent ); - - /// - /// Sets a condition that determines when the menu should be visible to players. - /// The menu will only be shown to players for whom the condition returns true. - /// - /// A function that takes a player and returns true if the menu should be visible. - /// The current menu builder instance for method chaining. - IMenuBuilder VisibleWhen( Func condition ); - - /// - /// Sets a condition that determines when the menu should be enabled for interaction. - /// When disabled, the menu may be visible but not interactive. - /// - /// A function that takes a player and returns true if the menu should be enabled. - /// The current menu builder instance for method chaining. - IMenuBuilder EnabledWhen( Func condition ); - - /// - /// Configures the menu to automatically close when any option is selected. - /// Useful for action menus where selection should immediately close the menu. - /// - /// The current menu builder instance for method chaining. - IMenuBuilder CloseOnSelect(); - - /// - /// Sets an automatic close timer for the menu. - /// The menu will automatically close after the specified number of seconds. - /// - /// The number of seconds after which to automatically close the menu. - /// The current menu builder instance for method chaining. - IMenuBuilder AutoClose( float seconds ); - - /// - /// Overrides the default button(s) used for selecting menu options. - /// Allows customization of the input controls for menu interaction. - /// - /// The names of the buttons to use for selection. - /// The current menu builder instance for method chaining. - [Obsolete("Use Design.OverrideSelectButton instead")] - IMenuBuilder OverrideSelectButton( params string[] buttonNames ); - - /// - /// Overrides the default button(s) used for moving through menu options. - /// Allows customization of the input controls for menu navigation. - /// - /// The names of the buttons to use for movement. - /// The current menu builder instance for method chaining. - [Obsolete("Use Design.OverrideMoveButton instead")] - IMenuBuilder OverrideMoveButton( params string[] buttonNames ); - - /// - /// Overrides the default button(s) used for exiting or closing the menu. - /// Allows customization of the input controls for menu exit. - /// - /// The names of the buttons to use for exiting. - /// The current menu builder instance for method chaining. - [Obsolete("Use Design.OverrideExitButton instead")] - IMenuBuilder OverrideExitButton( params string[] buttonNames ); - - /// - /// Sets the maximum number of menu items visible at once. - /// When there are more items than this limit, the menu will be paginated. - /// - /// The maximum number of visible items. - /// The current menu builder instance for method chaining. - /// - /// If the provided count is less than 1, it will be clamped to 1. - /// If the provided count is greater than 5, it will be clamped to 5. - /// A warning will be logged when clamping occurs. - /// - [Obsolete("Use Design.MaxVisibleItems instead")] - IMenuBuilder MaxVisibleItems( int count ); - - /// - /// Configures the menu to not freeze player movement when displayed. - /// Players will be able to move around while the menu is open. - /// - /// The current menu builder instance for method chaining. - IMenuBuilder NoFreeze(); - - /// - /// Configures the menu to freeze player movement when displayed. - /// Players will be unable to move while the menu is open. - /// - /// The current menu builder instance for method chaining. - IMenuBuilder ForceFreeze(); - - /// - /// Sets the color used for rendering the menu. - /// Affects the visual appearance and styling of the menu display. - /// - /// The color to use for menu rendering. - /// The current menu builder instance for method chaining. - [Obsolete("Use Design.SetColor instead")] - IMenuBuilder SetColor( Color color ); -} - -/// -/// Defines text alignment options for menu text elements. -/// Used to control how text is positioned within menu displays. -/// -public enum ITextAlign -{ - /// - /// Aligns text to the left side of the display area. - /// - Left, - - /// - /// Centers text horizontally within the display area. - /// - Center, - - /// - /// Aligns text to the right side of the display area. - /// - Right -} \ No newline at end of file +// using SwiftlyS2.Shared.Natives; +// using SwiftlyS2.Shared.Players; + +// namespace SwiftlyS2.Shared.Menus; + +// /// +// /// Provides a fluent interface for building and configuring menus with various option types and behaviors. +// /// Supports method chaining for easy menu construction and customization. +// /// +// [Obsolete("IMenuBuilder will be deprecared at the release of SwiftlyS2. Please use IMenuBuilderAPI instead")] +// public interface IMenuBuilder +// { +// IMenuDesign Design { get; } + +// /// +// /// Sets the menu instance that this builder will modify. +// /// This method is typically called internally to associate the builder with a specific menu. +// /// +// /// The menu instance to build and configure. +// /// The current menu builder instance for method chaining. +// IMenuBuilder SetMenu( IMenu menu ); + +// /// +// /// Sets whether the menu should have associated sounds for interactions. +// /// +// /// Enables/disables sound effects for menu interactions. +// /// The current menu builder instance for method chaining. +// IMenuBuilder HasSound( bool hasSound ); + +// /// +// /// Adds a clickable button option to the menu. +// /// When selected, executes the provided action with the player as parameter. +// /// +// /// The display text for the button. +// /// Optional action to execute when the button is clicked. Receives the player as parameter. +// /// The text size for the button display. Defaults to Medium. +// /// The overflow style for the text. Defaults to null. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddButton( string text, Action? onClick = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); + +// /// +// /// Adds a clickable button option to the menu. +// /// When selected, executes the provided action with the player and option as parameters. +// /// +// /// The display text for the button. +// /// Optional action to execute when the button is clicked. Receives the player and option as parameters. +// /// The text size for the button display. Defaults to Medium. +// /// The overflow style for the text. Defaults to null. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddButton( string text, Action? onClick, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); + +// /// +// /// Adds a toggle switch option to the menu that can be turned on or off. +// /// Players can interact with this option to change its boolean state. +// /// +// /// The display text for the toggle option. +// /// The initial state of the toggle. Defaults to false. +// /// Optional action to execute when the toggle state changes. Receives the player and new boolean value. +// /// The text size for the toggle display. Defaults to Medium. +// /// The overflow style for the text. Defaults to null. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddToggle( string text, bool defaultValue = false, Action? onToggle = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); + +// /// +// /// Adds a toggle switch option to the menu that can be turned on or off. +// /// Players can interact with this option to change its boolean state. +// /// +// /// The display text for the toggle option. +// /// The initial state of the toggle. Defaults to false. +// /// Optional action to execute when the toggle state changes. Receives the player, option, and new boolean value. +// /// The text size for the toggle display. Defaults to Medium. +// /// The overflow style for the text. Defaults to null. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddToggle( string text, bool defaultValue, Action? onToggle, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); + +// /// +// /// Adds a slider option to the menu for selecting numeric values within a specified range. +// /// Players can adjust the value using left/right navigation. +// /// +// /// The display text for the slider option. +// /// The minimum allowed value for the slider. +// /// The maximum allowed value for the slider. +// /// The initial value of the slider. +// /// The increment/decrement step size. Defaults to 1. +// /// Optional action to execute when the slider value changes. Receives the player and new float value. +// /// The text size for the slider display. Defaults to Medium. +// /// The overflow style for the text. Defaults to null. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddSlider( string text, float min, float max, float defaultValue, float step = 1, Action? onChange = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); + +// /// +// /// Adds a slider option to the menu for selecting numeric values within a specified range. +// /// Players can adjust the value using left/right navigation. +// /// +// /// The display text for the slider option. +// /// The minimum allowed value for the slider. +// /// The maximum allowed value for the slider. +// /// The initial value of the slider. +// /// The increment/decrement step size. +// /// Optional action to execute when the slider value changes. Receives the player, option, and new float value. +// /// The text size for the slider display. Defaults to Medium. +// /// The overflow style for the text. Defaults to null. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddSlider( string text, float min, float max, float defaultValue, float step, Action? onChange, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); + +// /// +// /// Adds an asynchronous button option to the menu that executes async operations. +// /// When selected, executes the provided async function with the player as parameter. +// /// +// /// The display text for the async button. +// /// The async function to execute when the button is clicked. Receives the player as parameter. +// /// The text size for the button display. Defaults to Medium. +// /// The overflow style for the text. Defaults to null. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddAsyncButton( string text, Func onClickAsync, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); + +// /// +// /// Adds an asynchronous button option to the menu that executes async operations. +// /// When selected, executes the provided async function with the player and option as parameters. +// /// +// /// The display text for the async button. +// /// The async function to execute when the button is clicked. Receives the player and option as parameters. +// /// The text size for the button display. Defaults to Medium. +// /// The overflow style for the text. Defaults to null. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddAsyncButton( string text, Func onClickAsync, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); + +// /// +// /// Adds a non-interactive text display option to the menu. +// /// Used for showing information, headers, or descriptions within the menu. +// /// +// /// The text content to display. +// /// The text alignment within the menu. Defaults to Left. +// /// The text size for the display. Defaults to Medium. +// /// The overflow style for the text. Defaults to null. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddText( string text, ITextAlign alignment = ITextAlign.Left, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); + +// /// +// /// Adds a submenu option that navigates to another menu when selected. +// /// Creates a hierarchical menu structure with parent-child relationships. +// /// +// /// The display text for the submenu option. +// /// The submenu instance to navigate to. +// /// The text size for the submenu display. Defaults to Medium. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddSubmenu( string text, IMenu submenu, IMenuTextSize size = IMenuTextSize.Medium ); + +// /// +// /// Adds a submenu option that navigates to another menu when selected. +// /// Creates a hierarchical menu structure with parent-child relationships. +// /// +// /// The display text for the submenu option. +// /// The submenu instance to navigate to. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddSubmenu( string text, IMenu submenu ); + +// /// +// /// Adds a submenu option that creates and navigates to a dynamically built menu when selected. +// /// The submenu is constructed on-demand using the provided builder function. +// /// +// /// The display text for the submenu option. +// /// A function that returns the submenu instance when called. +// /// The text size for the submenu display. Defaults to Medium. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddSubmenu( string text, Func submenuBuilder, IMenuTextSize size = IMenuTextSize.Medium ); + +// /// +// /// Adds a submenu option that creates and navigates to a dynamically built menu when selected. +// /// The submenu is constructed on-demand using the provided builder function. +// /// +// /// The display text for the submenu option. +// /// A function that returns the submenu instance when called. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddSubmenu( string text, Func submenuBuilder ); + +// /// +// /// Adds a submenu option that creates and navigates to a dynamically built menu when selected. +// /// The submenu is constructed on-demand using the provided asynchronous builder function. +// /// +// /// The display text for the submenu option. +// /// An asynchronous function that returns the submenu instance when called. +// /// The text size for the submenu display. Defaults to Medium. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddSubmenu( string text, Func> submenuBuilder, IMenuTextSize size = IMenuTextSize.Medium ); + +// /// +// /// Adds a submenu option that creates and navigates to a dynamically built menu when selected. +// /// The submenu is constructed on-demand using the provided asynchronous builder function. +// /// +// /// The display text for the submenu option. +// /// An asynchronous function that returns the submenu instance when called. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddSubmenu( string text, Func> submenuBuilder ); + +// /// +// /// Adds a choice selection option that allows players to select from multiple predefined options. +// /// Players can cycle through the available choices using left/right navigation. +// /// +// /// The display text for the choice option. +// /// An array of available choice strings. +// /// The initially selected choice. Defaults to null (first choice). +// /// Optional action to execute when the choice changes. Receives the player and selected choice string. +// /// The text size for the choice display. Defaults to Medium. +// /// The overflow style for the text. Defaults to null. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddChoice( string text, string[] choices, string? defaultChoice = null, Action? onChange = null, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); + +// // /// +// // /// Adds a choice selection option that allows players to select from multiple predefined options. +// // /// Players can cycle through the available choices using left/right navigation. +// // /// +// // /// The display text for the choice option. +// // /// An array of available choice strings. +// // /// The initially selected choice. +// // /// Optional action to execute when the choice changes. Receives the player and selected choice string. +// // /// The overflow style for the text. Defaults to null. +// // /// The current menu builder instance for method chaining. +// // [Obsolete("This overload causes ambiguity. Use AddChoice(text, choices, defaultChoice, onChange, IMenuTextSize.Medium, overflowStyle) instead.")] +// // IMenuBuilder AddChoice(string text, string[] choices, string? defaultChoice, Action? onChange, MenuHorizontalStyle? overflowStyle = null); + +// /// +// /// Adds a choice selection option that allows players to select from multiple predefined options. +// /// Players can cycle through the available choices using left/right navigation. +// /// +// /// The display text for the choice option. +// /// An array of available choice strings. +// /// The initially selected choice. +// /// Optional action to execute when the choice changes. Receives the player, option, and selected choice string. +// /// The text size for the choice display. Defaults to Medium. +// /// The overflow style for the text. Defaults to null. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddChoice( string text, string[] choices, string? defaultChoice, Action? onChange, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); + +// /// +// /// Adds a visual separator line to the menu for organizing content. +// /// Creates a non-interactive divider between menu sections. +// /// +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddSeparator(); + +// /// +// /// Adds a progress bar display option that shows dynamic progress information. +// /// The progress value is retrieved from the provided function and updated automatically. +// /// +// /// The display text for the progress bar. +// /// A function that returns the current progress value (0.0 to 1.0). +// /// The character width of the progress bar. Defaults to 20. +// /// The text size for the progress bar display. Defaults to Medium. +// /// The overflow style for the text. Defaults to null. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddProgressBar( string text, Func progressProvider, int barWidth = 20, IMenuTextSize size = IMenuTextSize.Medium, MenuHorizontalStyle? overflowStyle = null ); + +// /// +// /// Adds a progress bar display option that shows dynamic progress information. +// /// The progress value is retrieved from the provided function and updated automatically. +// /// +// /// The display text for the progress bar. +// /// A function that returns the current progress value (0.0 to 1.0). +// /// The character width of the progress bar. +// /// The overflow style for the text. Defaults to null. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AddProgressBar( string text, Func progressProvider, int barWidth, MenuHorizontalStyle? overflowStyle = null ); + +// /// +// /// Sets the parent menu for the menu being built, creating a hierarchical menu structure. +// /// Allows players to navigate back to the parent menu from the current menu. +// /// +// /// The parent menu instance. +// /// The current menu builder instance for method chaining. +// IMenuBuilder WithParent( IMenu parent ); + +// /// +// /// Sets a condition that determines when the menu should be visible to players. +// /// The menu will only be shown to players for whom the condition returns true. +// /// +// /// A function that takes a player and returns true if the menu should be visible. +// /// The current menu builder instance for method chaining. +// IMenuBuilder VisibleWhen( Func condition ); + +// /// +// /// Sets a condition that determines when the menu should be enabled for interaction. +// /// When disabled, the menu may be visible but not interactive. +// /// +// /// A function that takes a player and returns true if the menu should be enabled. +// /// The current menu builder instance for method chaining. +// IMenuBuilder EnabledWhen( Func condition ); + +// /// +// /// Configures the menu to automatically close when any option is selected. +// /// Useful for action menus where selection should immediately close the menu. +// /// +// /// The current menu builder instance for method chaining. +// IMenuBuilder CloseOnSelect(); + +// /// +// /// Sets an automatic close timer for the menu. +// /// The menu will automatically close after the specified number of seconds. +// /// +// /// The number of seconds after which to automatically close the menu. +// /// The current menu builder instance for method chaining. +// IMenuBuilder AutoClose( float seconds ); + +// /// +// /// Overrides the default button(s) used for selecting menu options. +// /// Allows customization of the input controls for menu interaction. +// /// +// /// The names of the buttons to use for selection. +// /// The current menu builder instance for method chaining. +// [Obsolete("Use Design.OverrideSelectButton instead")] +// IMenuBuilder OverrideSelectButton( params string[] buttonNames ); + +// /// +// /// Overrides the default button(s) used for moving through menu options. +// /// Allows customization of the input controls for menu navigation. +// /// +// /// The names of the buttons to use for movement. +// /// The current menu builder instance for method chaining. +// [Obsolete("Use Design.OverrideMoveButton instead")] +// IMenuBuilder OverrideMoveButton( params string[] buttonNames ); + +// /// +// /// Overrides the default button(s) used for exiting or closing the menu. +// /// Allows customization of the input controls for menu exit. +// /// +// /// The names of the buttons to use for exiting. +// /// The current menu builder instance for method chaining. +// [Obsolete("Use Design.OverrideExitButton instead")] +// IMenuBuilder OverrideExitButton( params string[] buttonNames ); + +// /// +// /// Sets the maximum number of menu items visible at once. +// /// When there are more items than this limit, the menu will be paginated. +// /// +// /// The maximum number of visible items. +// /// The current menu builder instance for method chaining. +// /// +// /// If the provided count is less than 1, it will be clamped to 1. +// /// If the provided count is greater than 5, it will be clamped to 5. +// /// A warning will be logged when clamping occurs. +// /// +// [Obsolete("Use Design.MaxVisibleItems instead")] +// IMenuBuilder MaxVisibleItems( int count ); + +// /// +// /// Configures the menu to not freeze player movement when displayed. +// /// Players will be able to move around while the menu is open. +// /// +// /// The current menu builder instance for method chaining. +// IMenuBuilder NoFreeze(); + +// /// +// /// Configures the menu to freeze player movement when displayed. +// /// Players will be unable to move while the menu is open. +// /// +// /// The current menu builder instance for method chaining. +// IMenuBuilder ForceFreeze(); + +// /// +// /// Sets the color used for rendering the menu. +// /// Affects the visual appearance and styling of the menu display. +// /// +// /// The color to use for menu rendering. +// /// The current menu builder instance for method chaining. +// [Obsolete("Use Design.SetColor instead")] +// IMenuBuilder SetColor( Color color ); +// } + +// /// +// /// Defines text alignment options for menu text elements. +// /// Used to control how text is positioned within menu displays. +// /// +// public enum ITextAlign +// { +// /// +// /// Aligns text to the left side of the display area. +// /// +// Left, + +// /// +// /// Centers text horizontally within the display area. +// /// +// Center, + +// /// +// /// Aligns text to the right side of the display area. +// /// +// Right +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuBuilderAPI.cs b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuBuilderAPI.cs new file mode 100644 index 000000000..e96ced844 --- /dev/null +++ b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuBuilderAPI.cs @@ -0,0 +1,107 @@ +namespace SwiftlyS2.Shared.Menus; + +/// +/// Provides a fluent builder interface for creating and configuring menus. +/// All methods support chaining for convenient menu construction. +/// +public interface IMenuBuilderAPI +{ + /// + /// Gets the design interface for this menu. + /// + public IMenuDesignAPI Design { get; } + + /// + /// Binds this menu to a parent menu, creating a hierarchical navigation structure. + /// + /// The parent menu. + /// This builder for method chaining. + public IMenuBuilderAPI BindToParent( IMenuAPI parent ); + + /// + /// Adds a menu option to the menu. + /// + /// The menu option to add. + /// This builder for method chaining. + public IMenuBuilderAPI AddOption( IMenuOption option ); + + /// + /// Enables sound effects for menu interactions. + /// + /// This builder for method chaining. + public IMenuBuilderAPI EnableSound(); + + /// + /// Disables sound effects for menu interactions. + /// + /// This builder for method chaining. + public IMenuBuilderAPI DisableSound(); + + /// + /// Controls whether player movement is frozen while the menu is open. + /// + /// True to freeze player movement, false to allow movement. Default is false. + /// This builder for method chaining. + public IMenuBuilderAPI SetPlayerFrozen( bool frozen = false ); + + /// + /// Sets the automatic close delay for the menu. + /// + /// Time in seconds before the menu automatically closes. Set to 0 to disable auto-close. Default is 0. + /// This builder for method chaining. + public IMenuBuilderAPI SetAutoCloseDelay( float seconds = 0f ); + + /// + /// Overrides the default key binding for selecting menu options. + /// + /// The key binding to use. + /// This builder for method chaining. + /// + /// This overrides the default select button behavior. + /// Supports multiple key bindings using the bitwise OR operator. + /// Example: KeyBind.Mouse1 | KeyBind.E allows either Mouse1 or E to select options. + /// + public IMenuBuilderAPI SetSelectButton( KeyBind keyBind ); + + /// + /// Overrides the default key binding for moving forward through menu options. + /// + /// The key binding to use. + /// This builder for method chaining. + /// + /// This overrides the default move forward button behavior. + /// Supports multiple key bindings using the bitwise OR operator. + /// Example: KeyBind.W | KeyBind.Mouse1 allows either W or Mouse1 to move forward. + /// + public IMenuBuilderAPI SetMoveForwardButton( KeyBind keyBind ); + + /// + /// Overrides the default key binding for moving backward through menu options. + /// + /// The key binding to use. + /// This builder for method chaining. + /// + /// This overrides the default move backward button behavior. + /// Supports multiple key bindings using the bitwise OR operator. + /// Example: KeyBind.S | KeyBind.Mouse2 allows either S or Mouse2 to move backward. + /// + public IMenuBuilderAPI SetMoveBackwardButton( KeyBind keyBind ); + + /// + /// Overrides the default key binding for closing the menu. + /// + /// The key binding to use. + /// This builder for method chaining. + /// + /// This overrides the default exit button behavior. + /// Supports multiple key bindings using the bitwise OR operator. + /// Example: KeyBind.Esc | KeyBind.A allows either Esc or A to close the menu. + /// + public IMenuBuilderAPI SetExitButton( KeyBind keyBind ); + + /// + /// Builds the menu and returns the final menu instance. + /// + /// The built menu instance. + public IMenuAPI Build(); +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuButtonOverrides.cs b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuButtonOverrides.cs index e0b6e214b..5d4e4c233 100644 --- a/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuButtonOverrides.cs +++ b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuButtonOverrides.cs @@ -1,38 +1,39 @@ -using SwiftlyS2.Shared.Events; +// using SwiftlyS2.Shared.Events; -namespace SwiftlyS2.Shared.Menus; +// namespace SwiftlyS2.Shared.Menus; -/// -/// Defines custom button overrides for menu navigation and interaction. -/// Allows customization of the default key bindings used for menu operations. -/// -public interface IMenuButtonOverrides -{ - /// - /// Gets or sets the key binding used for selecting menu options. - /// When set, overrides the default key used to activate or select the currently highlighted menu item. - /// Set to null to use the default selection key binding. - /// - public KeyKind? Select { get; set; } +// /// +// /// Defines custom button overrides for menu navigation and interaction. +// /// Allows customization of the default key bindings used for menu operations. +// /// +// [Obsolete("IMenuButtonOverrides will be deprecared at the release of SwiftlyS2. Please use MenuKeybindOverrides instead")] +// public interface IMenuButtonOverrides +// { +// /// +// /// Gets or sets the key binding used for selecting menu options. +// /// When set, overrides the default key used to activate or select the currently highlighted menu item. +// /// Set to null to use the default selection key binding. +// /// +// public KeyKind? Select { get; set; } - /// - /// Gets or sets the key binding used for moving through menu options. - /// When set, overrides the default keys used to navigate up and down through menu items. - /// Set to null to use the default movement key bindings. - /// - public KeyKind? Move { get; set; } +// /// +// /// Gets or sets the key binding used for moving through menu options. +// /// When set, overrides the default keys used to navigate up and down through menu items. +// /// Set to null to use the default movement key bindings. +// /// +// public KeyKind? Move { get; set; } - /// - /// Gets or sets the key binding used for moving back through menu options. - /// When set, overrides the default key used to navigate back up in menus. - /// Set to null to use the default back key binding. - /// - public KeyKind? MoveBack { get; set; } +// /// +// /// Gets or sets the key binding used for moving back through menu options. +// /// When set, overrides the default key used to navigate back up in menus. +// /// Set to null to use the default back key binding. +// /// +// public KeyKind? MoveBack { get; set; } - /// - /// Gets or sets the key binding used for exiting or closing the menu. - /// When set, overrides the default key used to close the menu and return to the game. - /// Set to null to use the default exit key binding. - /// - public KeyKind? Exit { get; set; } -} \ No newline at end of file +// /// +// /// Gets or sets the key binding used for exiting or closing the menu. +// /// When set, overrides the default key used to close the menu and return to the game. +// /// Set to null to use the default exit key binding. +// /// +// public KeyKind? Exit { get; set; } +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuDesign.cs b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuDesign.cs index 86accb061..53288fe5f 100644 --- a/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuDesign.cs +++ b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuDesign.cs @@ -1,66 +1,67 @@ -using SwiftlyS2.Shared.Natives; +// using SwiftlyS2.Shared.Natives; -namespace SwiftlyS2.Shared.Menus; +// namespace SwiftlyS2.Shared.Menus; -public interface IMenuDesign -{ - /// - /// Overrides the default button(s) used for selecting menu options. - /// Allows customization of the input controls for menu interaction. - /// - /// The names of the buttons to use for selection. - /// The current menu design instance for method chaining. - IMenuDesign OverrideSelectButton(params string[] buttonNames); +// [Obsolete("IMenuDesign will be deprecared at the release of SwiftlyS2. Please use IMenuDesignAPI instead")] +// public interface IMenuDesign +// { +// /// +// /// Overrides the default button(s) used for selecting menu options. +// /// Allows customization of the input controls for menu interaction. +// /// +// /// The names of the buttons to use for selection. +// /// The current menu design instance for method chaining. +// IMenuDesign OverrideSelectButton( params string[] buttonNames ); - /// - /// Overrides the default button(s) used for moving through menu options. - /// Allows customization of the input controls for menu navigation. - /// - /// The names of the buttons to use for movement. - /// The current menu design instance for method chaining. - IMenuDesign OverrideMoveButton(params string[] buttonNames); +// /// +// /// Overrides the default button(s) used for moving through menu options. +// /// Allows customization of the input controls for menu navigation. +// /// +// /// The names of the buttons to use for movement. +// /// The current menu design instance for method chaining. +// IMenuDesign OverrideMoveButton( params string[] buttonNames ); - /// - /// Overrides the default button(s) used for exiting or closing the menu. - /// Allows customization of the input controls for menu exit. - /// - /// The names of the buttons to use for exiting. - /// The current menu design instance for method chaining. - IMenuDesign OverrideExitButton(params string[] buttonNames); +// /// +// /// Overrides the default button(s) used for exiting or closing the menu. +// /// Allows customization of the input controls for menu exit. +// /// +// /// The names of the buttons to use for exiting. +// /// The current menu design instance for method chaining. +// IMenuDesign OverrideExitButton( params string[] buttonNames ); - /// - /// Sets the maximum number of menu items visible at once. - /// When there are more items than this limit, the menu will be paginated. - /// - /// The maximum number of visible items. - /// The current menu design instance for method chaining. - /// - /// If the provided count is less than 1, it will be clamped to 1. - /// If the provided count is greater than 5, it will be clamped to 5. - /// A warning will be logged when clamping occurs. - /// - IMenuDesign MaxVisibleItems(int count); +// /// +// /// Sets the maximum number of menu items visible at once. +// /// When there are more items than this limit, the menu will be paginated. +// /// +// /// The maximum number of visible items. +// /// The current menu design instance for method chaining. +// /// +// /// If the provided count is less than 1, it will be clamped to 1. +// /// If the provided count is greater than 5, it will be clamped to 5. +// /// A warning will be logged when clamping occurs. +// /// +// IMenuDesign MaxVisibleItems( int count ); - /// - /// Sets the color used for rendering the menu. - /// Affects the visual appearance and styling of the menu display. - /// - /// The color to use for menu rendering. - /// The current menu design instance for method chaining. - IMenuDesign SetColor(Color color); +// /// +// /// Sets the color used for rendering the menu. +// /// Affects the visual appearance and styling of the menu display. +// /// +// /// The color to use for menu rendering. +// /// The current menu design instance for method chaining. +// IMenuDesign SetColor( Color color ); - /// - /// Sets the vertical scroll style for the menu navigation. - /// - /// The vertical scroll style to use. - /// The current menu design instance for method chaining. - IMenuDesign SetVerticalScrollStyle(MenuVerticalScrollStyle style); +// /// +// /// Sets the vertical scroll style for the menu navigation. +// /// +// /// The vertical scroll style to use. +// /// The current menu design instance for method chaining. +// IMenuDesign SetVerticalScrollStyle( MenuVerticalScrollStyle style ); - /// - /// Sets the global horizontal style for menu option text display. - /// Controls maximum text width and overflow behavior for all menu options. - /// - /// The global horizontal style to apply. - /// The current menu design instance for method chaining. - IMenuDesign SetGlobalHorizontalStyle(MenuHorizontalStyle style); -} \ No newline at end of file +// /// +// /// Sets the global horizontal style for menu option text display. +// /// Controls maximum text width and overflow behavior for all menu options. +// /// +// /// The global horizontal style to apply. +// /// The current menu design instance for method chaining. +// IMenuDesign SetGlobalHorizontalStyle( MenuHorizontalStyle style ); +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuDesignAPI.cs b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuDesignAPI.cs new file mode 100644 index 000000000..463ec6ac3 --- /dev/null +++ b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuDesignAPI.cs @@ -0,0 +1,153 @@ +namespace SwiftlyS2.Shared.Menus; + +public interface IMenuDesignAPI +{ + /// + /// Sets the title text displayed at the top of the menu. + /// + /// The title text. Pass null to clear the title. + /// The menu builder for method chaining. + public IMenuBuilderAPI SetMenuTitle( string? title = null ); + + /// + /// Controls the visibility of the menu title. + /// + /// True to show the title, false to hide it. Default is true. + /// The menu builder for method chaining. + public IMenuBuilderAPI SetMenuTitleVisible( bool visible = true ); + + /// + /// Controls the visibility of the menu footer. + /// + /// True to show the footer, false to hide it. Default is true. + /// The menu builder for method chaining. + public IMenuBuilderAPI SetMenuFooterVisible( bool visible = true ); + + /// + /// Sets the maximum number of menu options visible on screen at once. + /// + /// The maximum visible item count. Valid range is 1-5. Default is 5. + /// The menu builder for method chaining. + /// + /// Values outside the range of 1-5 will be automatically clamped to the nearest valid value. + /// Menus with more options than this limit will be paginated. + /// + public IMenuBuilderAPI SetMaxVisibleItems( int count = 5 ); + + /// + /// Enables automatic adjustment of visible items when title or footer is hidden. + /// + /// The menu builder for method chaining. + /// + /// When enabled, hiding the title or footer will increase the effective visible item count + /// during rendering without modifying the configured value. + /// + public IMenuBuilderAPI EnableAutoAdjustVisibleItems(); + + /// + /// Disables automatic adjustment of visible items when title or footer is hidden. + /// + /// The menu builder for method chaining. + public IMenuBuilderAPI DisableAutoAdjustVisibleItems(); + + /// + /// Sets the default scroll animation style for all menu options. + /// + /// The scroll style to apply globally. + /// The menu builder for method chaining. + /// + /// Individual options can override this global setting. + /// + public IMenuBuilderAPI SetGlobalScrollStyle( MenuOptionScrollStyle style ); + + /// + /// Sets the color of the navigation markers using hex color format. + /// + /// The color in hex format (e.g., "#FFFFFF" for white). Pass null to reset to default. + /// The menu builder for method chaining. + public IMenuBuilderAPI SetNavigationMarkerColor( string? hexColor = null ); + + /// + /// Sets the color of the navigation markers using SwiftlyS2 native color. + /// + /// The SwiftlyS2 native color to apply to the navigation markers. + /// The menu builder for method chaining. + public IMenuBuilderAPI SetNavigationMarkerColor( Natives.Color color ); + + /// + /// Sets the color of the navigation markers using System.Drawing color. + /// + /// The System.Drawing color to apply to the navigation markers. + /// The menu builder for method chaining. + public IMenuBuilderAPI SetNavigationMarkerColor( System.Drawing.Color color ); + + /// + /// Sets the color of the menu footer using hex color format. + /// + /// The color in hex format (e.g., "#FF0000" for red). Pass null to reset to default. + /// The menu builder for method chaining. + public IMenuBuilderAPI SetMenuFooterColor( string? hexColor = null ); + + /// + /// Sets the color of the menu footer using SwiftlyS2 native color. + /// + /// The SwiftlyS2 native color to apply to the footer. + /// The menu builder for method chaining. + public IMenuBuilderAPI SetMenuFooterColor( Natives.Color color ); + + /// + /// Sets the color of the menu footer using System.Drawing color. + /// + /// The System.Drawing color to apply to the footer. + /// The menu builder for method chaining. + public IMenuBuilderAPI SetMenuFooterColor( System.Drawing.Color color ); + + /// + /// Sets the color of the visual guide lines using hex color format. + /// + /// The color in hex format (e.g., "#FFFFFF" for white). Pass null to reset to default. + /// The menu builder for method chaining. + public IMenuBuilderAPI SetVisualGuideLineColor( string? hexColor = null ); + + /// + /// Sets the color of the visual guide lines using SwiftlyS2 native color. + /// + /// The SwiftlyS2 native color to apply to the guide lines. + /// The menu builder for method chaining. + public IMenuBuilderAPI SetVisualGuideLineColor( Natives.Color color ); + + /// + /// Sets the color of the visual guide lines using System.Drawing color. + /// + /// The System.Drawing color to apply to the guide lines. + /// The menu builder for method chaining. + public IMenuBuilderAPI SetVisualGuideLineColor( System.Drawing.Color color ); + + /// + /// Sets the color of disabled menu options using hex color format. + /// + /// The color in hex format (e.g., "#808080" for gray). Pass null to reset to default. + /// The menu builder for method chaining. + public IMenuBuilderAPI SetDisabledColor( string? hexColor = null ); + + /// + /// Sets the color of disabled menu options using SwiftlyS2 native color. + /// + /// The SwiftlyS2 native color to apply to disabled options. + /// The menu builder for method chaining. + public IMenuBuilderAPI SetDisabledColor( Natives.Color color ); + + /// + /// Sets the color of disabled menu options using System.Drawing color. + /// + /// The System.Drawing color to apply to disabled options. + /// The menu builder for method chaining. + public IMenuBuilderAPI SetDisabledColor( System.Drawing.Color color ); + + // /// + // /// Sets the global option text style for the menu. + // /// + // /// The text style to apply to all options in the menu. + // /// The menu builder for method chaining. + // public IMenuBuilderAPI SetGlobalOptionTextStyle( MenuOptionTextStyle style ); +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuManager.cs b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuManager.cs index 541b5a53f..44c3fe4ab 100644 --- a/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuManager.cs +++ b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuManager.cs @@ -1,179 +1,181 @@ -using SwiftlyS2.Shared.Players; - -namespace SwiftlyS2.Shared.Menus; - -/// -/// Configuration settings for menu behavior, appearance, and interaction. -/// Defines various aspects of menu functionality including navigation, input handling, audio feedback, and display options. -/// -public struct MenuSettings -{ - /// - /// The prefix used for menu navigation commands and identifiers. - /// Used to distinguish menu-related commands from other game commands. - /// - public string NavigationPrefix; - - /// - /// The input mode used for menu interaction. - /// Determines how player input is captured and processed for menu navigation. - /// - public string InputMode; - - /// - /// The button configuration used for selecting or using menu options. - /// Defines which keys or buttons players press to activate menu items. - /// - public string ButtonsUse; - - /// - /// The button configuration used for scrolling through menu options. - /// Defines which keys or buttons players use to navigate up and down in menus. - /// - public string ButtonsScroll; - - /// - /// The button configuration used for scrolling back through menu options. - /// Defines which keys or buttons players use to navigate back up in menus. - /// - public string ButtonsScrollBack; - - /// - /// The button configuration used for exiting or closing menus. - /// Defines which keys or buttons players press to close the current menu. - /// - public string ButtonsExit; - - /// - /// The name of the sound effect played when a menu option is selected or used. - /// References a sound file or identifier in the game's audio system. - /// - public string SoundUseName; - - /// - /// The volume level for the sound effect played when using menu options. - /// Typically a value between 0.0 (silent) and 1.0 (full volume). - /// - public float SoundUseVolume; - - /// - /// The name of the sound effect played when scrolling through menu options. - /// References a sound file or identifier in the game's audio system. - /// - public string SoundScrollName; - - /// - /// The volume level for the sound effect played when scrolling through menus. - /// Typically a value between 0.0 (silent) and 1.0 (full volume). - /// - public float SoundScrollVolume; - - /// - /// The name of the sound effect played when exiting or closing menus. - /// References a sound file or identifier in the game's audio system. - /// - public string SoundExitName; - - /// - /// The volume level for the sound effect played when exiting menus. - /// Typically a value between 0.0 (silent) and 1.0 (full volume). - /// - public float SoundExitVolume; - - /// - /// The maximum number of menu items displayed on a single page. - /// When a menu has more items than this value, pagination is used to split the menu across multiple pages. - /// - public int ItemsPerPage; -} - - -/// -/// Manages menu instances and provides functionality for creating, opening, closing, and tracking menus for players. -/// Serves as the central hub for menu operations and maintains menu state across the application. -/// -public interface IMenuManager -{ - /// - /// Creates a new menu instance with the specified title. - /// The created menu can be customized using its builder and then opened for players. - /// - /// The title to display at the top of the menu. - /// A new menu instance ready for configuration and use. - public IMenu CreateMenu(string title); - - /// - /// Retrieves the currently active menu for the specified player. - /// Returns null if the player does not have any menu currently open. - /// - /// The player whose current menu to retrieve. - /// The player's current menu, or null if no menu is open. - public IMenu? GetMenu(IPlayer player); - - /// - /// Closes all open menus for all players. - /// This includes all menus in the parent chain. - /// - public void CloseAllMenus(); - - /// - /// Closes the specified menu for all players who currently have it open. - /// This will trigger the OnClose event for each affected player. - /// - /// The menu instance to close. - public void CloseMenu(IMenu menu); - - /// - /// Closes any currently open menu for the specified player. - /// If the player has no menu open, this method has no effect. - /// - /// The player whose menu should be closed. - public void CloseMenuForPlayer(IPlayer player); - - /// - /// Closes all menus with the specified title. - /// Can perform either exact title matching or partial matching based on the exact parameter. - /// - /// The title of the menu(s) to close. - /// If true, only menus with exactly matching titles are closed. If false, menus containing the title are closed. Defaults to false. - public void CloseMenuByTitle(string title, bool exact = false); - - /// - /// Opens the specified menu for the given player. - /// If the player already has a menu open, it will be closed first before opening the new menu. - /// - /// The player to open the menu for. - /// The menu instance to open. - public void OpenMenu(IPlayer player, IMenu menu); - - /// - /// Checks if the specified player currently has any menu open. - /// - /// The player to check if the menu is open for. - public bool HasMenuOpen(IPlayer player); - - /// - /// Event triggered when a menu is closed for a player. - /// Provides both the player and the menu that was closed as event arguments. - /// - event Action? OnMenuClosed; - - /// - /// Event triggered when a menu is opened for a player. - /// Provides both the player and the menu that was opened as event arguments. - /// - event Action? OnMenuOpened; - - /// - /// Event triggered when a menu is rendered for a player. - /// Provides both the player and the menu that was rendered as event arguments. - /// Useful for tracking menu display events or implementing custom rendering logic. - /// - event Action? OnMenuRendered; - - /// - /// Gets the current menu settings configuration. - /// Contains various settings that control menu behavior, appearance, audio feedback, and interaction parameters. - /// - public MenuSettings Settings { get; } -} \ No newline at end of file +// using SwiftlyS2.Shared.Players; + +// namespace SwiftlyS2.Shared.Menus; + +// /// +// /// Configuration settings for menu behavior, appearance, and interaction. +// /// Defines various aspects of menu functionality including navigation, input handling, audio feedback, and display options. +// /// +// [Obsolete("MenuSettings will be deprecared at the release of SwiftlyS2. Please use MenuConfig instead")] +// public struct MenuSettings +// { +// /// +// /// The prefix used for menu navigation commands and identifiers. +// /// Used to distinguish menu-related commands from other game commands. +// /// +// public string NavigationPrefix; + +// /// +// /// The input mode used for menu interaction. +// /// Determines how player input is captured and processed for menu navigation. +// /// +// public string InputMode; + +// /// +// /// The button configuration used for selecting or using menu options. +// /// Defines which keys or buttons players press to activate menu items. +// /// +// public string ButtonsUse; + +// /// +// /// The button configuration used for scrolling through menu options. +// /// Defines which keys or buttons players use to navigate up and down in menus. +// /// +// public string ButtonsScroll; + +// /// +// /// The button configuration used for scrolling back through menu options. +// /// Defines which keys or buttons players use to navigate back up in menus. +// /// +// public string ButtonsScrollBack; + +// /// +// /// The button configuration used for exiting or closing menus. +// /// Defines which keys or buttons players press to close the current menu. +// /// +// public string ButtonsExit; + +// /// +// /// The name of the sound effect played when a menu option is selected or used. +// /// References a sound file or identifier in the game's audio system. +// /// +// public string SoundUseName; + +// /// +// /// The volume level for the sound effect played when using menu options. +// /// Typically a value between 0.0 (silent) and 1.0 (full volume). +// /// +// public float SoundUseVolume; + +// /// +// /// The name of the sound effect played when scrolling through menu options. +// /// References a sound file or identifier in the game's audio system. +// /// +// public string SoundScrollName; + +// /// +// /// The volume level for the sound effect played when scrolling through menus. +// /// Typically a value between 0.0 (silent) and 1.0 (full volume). +// /// +// public float SoundScrollVolume; + +// /// +// /// The name of the sound effect played when exiting or closing menus. +// /// References a sound file or identifier in the game's audio system. +// /// +// public string SoundExitName; + +// /// +// /// The volume level for the sound effect played when exiting menus. +// /// Typically a value between 0.0 (silent) and 1.0 (full volume). +// /// +// public float SoundExitVolume; + +// /// +// /// The maximum number of menu items displayed on a single page. +// /// When a menu has more items than this value, pagination is used to split the menu across multiple pages. +// /// +// public int ItemsPerPage; +// } + + +// /// +// /// Manages menu instances and provides functionality for creating, opening, closing, and tracking menus for players. +// /// Serves as the central hub for menu operations and maintains menu state across the application. +// /// +// [Obsolete("IMenuManager will be deprecared at the release of SwiftlyS2. Please use IMenuManagerAPI instead")] +// public interface IMenuManager +// { +// /// +// /// Creates a new menu instance with the specified title. +// /// The created menu can be customized using its builder and then opened for players. +// /// +// /// The title to display at the top of the menu. +// /// A new menu instance ready for configuration and use. +// public IMenu CreateMenu( string title ); + +// /// +// /// Retrieves the currently active menu for the specified player. +// /// Returns null if the player does not have any menu currently open. +// /// +// /// The player whose current menu to retrieve. +// /// The player's current menu, or null if no menu is open. +// public IMenu? GetMenu( IPlayer player ); + +// /// +// /// Closes all open menus for all players. +// /// This includes all menus in the parent chain. +// /// +// public void CloseAllMenus(); + +// /// +// /// Closes the specified menu for all players who currently have it open. +// /// This will trigger the OnClose event for each affected player. +// /// +// /// The menu instance to close. +// public void CloseMenu( IMenu menu ); + +// /// +// /// Closes any currently open menu for the specified player. +// /// If the player has no menu open, this method has no effect. +// /// +// /// The player whose menu should be closed. +// public void CloseMenuForPlayer( IPlayer player ); + +// /// +// /// Closes all menus with the specified title. +// /// Can perform either exact title matching or partial matching based on the exact parameter. +// /// +// /// The title of the menu(s) to close. +// /// If true, only menus with exactly matching titles are closed. If false, menus containing the title are closed. Defaults to false. +// public void CloseMenuByTitle( string title, bool exact = false ); + +// /// +// /// Opens the specified menu for the given player. +// /// If the player already has a menu open, it will be closed first before opening the new menu. +// /// +// /// The player to open the menu for. +// /// The menu instance to open. +// public void OpenMenu( IPlayer player, IMenu menu ); + +// /// +// /// Checks if the specified player currently has any menu open. +// /// +// /// The player to check if the menu is open for. +// public bool HasMenuOpen( IPlayer player ); + +// /// +// /// Event triggered when a menu is closed for a player. +// /// Provides both the player and the menu that was closed as event arguments. +// /// +// event Action? OnMenuClosed; + +// /// +// /// Event triggered when a menu is opened for a player. +// /// Provides both the player and the menu that was opened as event arguments. +// /// +// event Action? OnMenuOpened; + +// /// +// /// Event triggered when a menu is rendered for a player. +// /// Provides both the player and the menu that was rendered as event arguments. +// /// Useful for tracking menu display events or implementing custom rendering logic. +// /// +// event Action? OnMenuRendered; + +// /// +// /// Gets the current menu settings configuration. +// /// Contains various settings that control menu behavior, appearance, audio feedback, and interaction parameters. +// /// +// public MenuSettings Settings { get; } +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuManagerAPI.cs b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuManagerAPI.cs new file mode 100644 index 000000000..0ec4d7f81 --- /dev/null +++ b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuManagerAPI.cs @@ -0,0 +1,186 @@ +using SwiftlyS2.Shared.Players; + +namespace SwiftlyS2.Shared.Menus; + +/// +/// Configuration settings that control menu behavior, appearance, and player interaction. +/// +public readonly record struct MenuManagerConfiguration +{ + /// + /// Prefix used for menu navigation commands to distinguish them from other game commands. + /// + public required string NavigationPrefix { get; init; } + + /// + /// Input mode that determines how player input is captured for menu navigation. + /// + public required string InputMode { get; init; } + + /// + /// Button configuration for selecting and activating menu options. + /// + public required string ButtonsUse { get; init; } + + /// + /// Button configuration for scrolling down through menu options. + /// + public required string ButtonsScroll { get; init; } + + /// + /// Button configuration for scrolling up through menu options. + /// + public required string ButtonsScrollBack { get; init; } + + /// + /// Button configuration for closing menus. + /// + public required string ButtonsExit { get; init; } + + /// + /// Sound effect name played when selecting a menu option. + /// + public required string SoundUseName { get; init; } + + /// + /// Volume level for the selection sound (0.0 to 1.0). + /// + public required float SoundUseVolume { get; init; } + + /// + /// Sound effect name played when scrolling through menu options. + /// + public required string SoundScrollName { get; init; } + + /// + /// Volume level for the scroll sound (0.0 to 1.0). + /// + public required float SoundScrollVolume { get; init; } + + /// + /// Sound effect name played when exiting menus. + /// + public required string SoundExitName { get; init; } + + /// + /// Volume level for the exit sound (0.0 to 1.0). + /// + public required float SoundExitVolume { get; init; } + + /// + /// Maximum items per page. Menus exceeding this limit will be paginated. + /// + public required int ItemsPerPage { get; init; } +} + +/// +/// Provides event data for menu manager events. +/// +public sealed class MenuManagerEventArgs : EventArgs +{ + /// + /// The player involved in this menu event. + /// + public IPlayer? Player { get; init; } + + /// + /// The menu involved in this event. + /// + public IMenuAPI? Menu { get; init; } +} + +/// +/// Central manager for creating and controlling all player menus. +/// +public interface IMenuManagerAPI +{ + /// + /// The SwiftlyS2 core instance. + /// + public ISwiftlyCore Core { get; } + + /// + /// Global configuration settings for all menus. + /// + public MenuManagerConfiguration Configuration { get; } + + /// + /// Fired when a menu is closed for a player. + /// + public event EventHandler? MenuClosed; + + /// + /// Fired when a menu is opened for a player. + /// + public event EventHandler? MenuOpened; + + /// + /// Creates a new menu builder. + /// + /// A new menu builder instance. + public IMenuBuilderAPI CreateBuilder(); + + /// + /// Creates a new menu with an optional title. + /// + /// The configuration for the menu. + /// The keybind overrides for the menu. + /// The parent menu, or null for no parent. + /// The scroll style for the menu options. + /// The text overflow style for the menu options. + /// A new menu instance ready to be configured. + public IMenuAPI CreateMenu( MenuConfiguration configuration, MenuKeybindOverrides keybindOverrides, IMenuAPI? parent = null, MenuOptionScrollStyle optionScrollStyle = MenuOptionScrollStyle.CenterFixed, MenuOptionTextStyle optionTextStyle = MenuOptionTextStyle.TruncateEnd ); + + /// + /// Gets the menu currently open for the specified player. + /// + /// The player to check. + /// The player's active menu, or null if they have no menu open. + public IMenuAPI? GetCurrentMenu( IPlayer player ); + + /// + /// Opens the specified menu for all players. + /// + /// The menu to display. + public void OpenMenu( IMenuAPI menu ); + + /// + /// Opens the specified menu for all players. + /// + /// The menu to display. + /// Callback invoked when the menu is closed. + public void OpenMenu( IMenuAPI menu, Action onClosed ); + + /// + /// Opens the specified menu for a player. Any currently open menu will be closed first. + /// + /// The player who will see the menu. + /// The menu to display. + public void OpenMenuForPlayer( IPlayer player, IMenuAPI menu ); + + /// + /// Opens the specified menu for a player. Any currently open menu will be closed first. + /// + /// The player who will see the menu. + /// The menu to display. + /// Callback invoked when the menu is closed for the player. + public void OpenMenuForPlayer( IPlayer player, IMenuAPI menu, Action onClosed ); + + /// + /// Closes the specified menu for all players who have it open. + /// + /// The menu to close. + public void CloseMenu( IMenuAPI menu ); + + /// + /// Closes the specified menu for a player. If the menu is not open for that player, this has no effect. + /// + /// The player whose menu will be closed. + /// The menu to close. + public void CloseMenuForPlayer( IPlayer player, IMenuAPI menu ); + + /// + /// Closes every open menu for every player. + /// + public void CloseAllMenus(); +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuOption.cs b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuOption.cs new file mode 100644 index 000000000..71841a2ff --- /dev/null +++ b/managed/src/SwiftlyS2.Shared/Modules/Menus/IMenuOption.cs @@ -0,0 +1,452 @@ +using SwiftlyS2.Shared.Players; + +namespace SwiftlyS2.Shared.Menus; + +/// +/// Represents an asynchronous event handler that returns a ValueTask. +/// +/// The type of event arguments. +/// The source of the event. +/// Event data. +/// A task that represents the asynchronous operation. +public delegate ValueTask AsyncEventHandler( object? sender, TEventArgs args ) where TEventArgs : EventArgs; + +/// +/// Provides event data for menu option events. +/// +/// +/// The Player property will be null for this event since it's a global property change. +/// +public sealed class MenuOptionEventArgs : EventArgs +{ + /// + /// The player who triggered this menu event. + /// + public IPlayer? Player { get; init; } + + /// + /// The menu option involved in this event, or null for lifecycle events like opening or closing the menu. + /// + public IMenuOption? Option { get; init; } +} + +/// +/// Provides event data for menu option HTML formatting events. +/// +public sealed class MenuOptionFormattingEventArgs : EventArgs +{ + /// + /// The player for whom the option is being formatted. + /// + public required IPlayer Player { get; init; } + + /// + /// The menu option being formatted. + /// + public required IMenuOption Option { get; init; } + + /// + /// Gets or sets custom text to use instead of the default text during HTML assembly. + /// + public string? CustomText { get; set; } +} + +/// +/// Provides event data for menu option validation events. +/// +public sealed class MenuOptionValidatingEventArgs : EventArgs +{ + /// + /// The player attempting to interact with the option. + /// + public required IPlayer Player { get; init; } + + /// + /// The menu option being validated. + /// + public required IMenuOption Option { get; init; } + + /// + /// Gets or sets a value indicating whether the interaction should be canceled. + /// + public bool Cancel { get; set; } + + /// + /// Gets or sets the reason why the interaction was canceled. + /// + public string? CancelReason { get; set; } +} + +/// +/// Provides event data for menu option click events. +/// +/// +/// NOTE: When handling click events, the sender parameter must be passed as IMenuOption. +/// +public sealed class MenuOptionClickEventArgs : EventArgs +{ + /// + /// The player who clicked the option. + /// + public required IPlayer Player { get; init; } + + // /// + // /// The menu option that was clicked. + // /// + // public required IMenuOption Option { get; init; } + + /// + /// Gets a value indicating whether the menu should be closed after handling the click. + /// + public bool CloseMenu { get; internal set; } +} + +/// +/// Event arguments for when a menu option's value changes. +/// +/// The type of the value. +public sealed class MenuOptionValueChangedEventArgs : EventArgs +{ + /// + /// Gets the player who triggered the value change. + /// + public required IPlayer Player { get; init; } + + /// + /// Gets the menu option whose value changed. + /// + public required IMenuOption Option { get; init; } + + /// + /// Gets the previous value before the change. + /// + public required T OldValue { get; init; } + + /// + /// Gets the new value after the change. + /// + public required T NewValue { get; init; } +} + +/// +/// Represents a menu option that can be displayed and interacted with by players. +/// +public interface IMenuOption : IDisposable +{ + /// + /// Gets the menu that this option belongs to. + /// + /// + /// This property will be null until the option is added to a menu via . + /// When implementing custom menu options, avoid accessing this property in the constructor as it will not be set yet. + /// + public IMenuAPI? Menu { get; } + + /// + /// Gets the number of lines this option requests to occupy in the menu. + /// + public int LineCount { get; } + + /// + /// Gets or sets the text content displayed for this menu option. + /// + /// + /// This is a global property. Changing it will affect what all players see. + /// + public string Text { get; set; } + + /// + /// The maximum display width for menu option text in relative units. + /// + public float MaxWidth { get; set; } + + /// + /// Gets or sets a value indicating whether this option is visible in the menu. + /// + /// + /// This is a global property. Changing it will affect what all players see. + /// + public bool Visible { get; set; } + + /// + /// Gets or sets a value indicating whether this option can be interacted with. + /// + /// + /// This is a global property. Changing it will affect what all players see. + /// + public bool Enabled { get; set; } + + /// + /// Gets a value indicating whether the menu should be closed after handling the click. + /// + public bool CloseAfterClick { get; } + + /// + /// Gets or sets an object that contains data about this option. + /// + public object? Tag { get; set; } + + /// + /// Gets or sets the text size for this option. + /// + public MenuOptionTextSize TextSize { get; set; } + + /// + /// Gets or sets the text overflow style for this option. + /// + public MenuOptionTextStyle TextStyle { get; set; } + + /// + /// Gets or sets a value indicating whether a sound should play when this option is selected. + /// + public bool PlaySound { get; set; } + + /// + /// Occurs when the visibility of the option changes. + /// + public event EventHandler? VisibilityChanged; + + /// + /// Occurs when the enabled state of the option changes. + /// + public event EventHandler? EnabledChanged; + + /// + /// Occurs when the text of the option changes. + /// + public event EventHandler? TextChanged; + + /// + /// Occurs before a event is processed, allowing validation and cancellation. + /// + public event EventHandler? Validating; + + /// + /// Occurs when the option is clicked by a player. + /// + public event AsyncEventHandler? Click; + + // /// + // /// Occurs when a player's cursor enters this option. + // /// + // public event EventHandler? Hover; + + /// + /// Occurs before HTML markup is assembled, allowing customization of the text content. + /// + public event EventHandler? BeforeFormat; + + /// + /// Occurs after HTML markup is assembled, allowing customization of the final HTML output. + /// + public event EventHandler? AfterFormat; + + /// + /// Determines whether the click task for the specified player is completed. + /// + /// The player to check. + /// True if the click task is completed; otherwise, false. + public bool IsClickTaskCompleted( IPlayer player ); + + /// + /// Determines whether this option is visible to the specified player. + /// + /// The player to check visibility for. + /// True if the option is visible to the player, otherwise, false. + public bool GetVisible( IPlayer player ); + + /// + /// Sets the visibility of this option for a specific player. + /// + /// The player to set visibility for. + /// True to make the option visible to the player; false to hide it. + /// + /// The per-player visibility has lower priority than the global property. + /// + public void SetVisible( IPlayer player, bool visible ); + + /// + /// Determines whether this option is enabled for the specified player. + /// + /// The player to check enabled state for. + /// True if the option is enabled for the player, otherwise, false. + public bool GetEnabled( IPlayer player ); + + /// + /// Sets the enabled state of this option for a specific player. + /// + /// The player to set enabled state for. + /// True to enable the option for the player; false to disable it. + /// + /// The per-player enabled state has lower priority than the global property. + /// + public void SetEnabled( IPlayer player, bool enabled ); + + // /// + // /// Gets the text to display for this option for the specified player. + // /// + // /// The player requesting the text. + // /// The text to display. + // public string GetText( IPlayer player ); + + // /// + // /// Gets the formatted HTML markup for this option. + // /// + // /// The player to format for. + // /// The formatted HTML string. + // public string GetFormattedHtmlText( IPlayer player ); + + /// + /// Gets the display text for this option as it should appear to the specified player. + /// + /// The player requesting the display text. + /// The display line index of the option. + /// The formatted display text for the option. + /// + /// When a menu option occupies multiple lines, MenuAPI may only need to display a specific line of that option. + /// + /// When LineCount=1: The displayLine parameter is not needed; return the HTML-formatted string directly. + /// When LineCount>=2: Check the displayLine parameter: + /// + /// displayLine=0: Return all content + /// displayLine=1: Return only the first line content + /// displayLine=2: Return only the second line content + /// And so on... + /// + /// + /// + /// Note: MenuAPI ensures that the displayLine parameter will not exceed the option's LineCount. + /// + public string GetDisplayText( IPlayer player, int displayLine = 0 ); + + /// + /// Validates whether the specified player can interact with this option. + /// + /// The player to validate. + /// A task that represents the asynchronous operation. The task result is true if validation succeeds; otherwise, false. + public ValueTask OnValidatingAsync( IPlayer player ); + + // /// + // /// Handles the click action for this option. + // /// + // /// The player who clicked the option. + // /// Whether to close the menu after handling the click. + // /// A task that represents the asynchronous operation. + // public ValueTask OnClickAsync( IPlayer player, bool closeMenu = false ); + + /// + /// Handles the click action for this option. + /// + /// The player who clicked the option. + /// A task that represents the asynchronous operation. + public ValueTask OnClickAsync( IPlayer player ); +} + +/// +/// Defines the available text size options for menu items. +/// +public enum MenuOptionTextSize +{ + /// + /// Extra small text size (fontSize-xs). + /// + ExtraSmall, + + /// + /// Small text size (fontSize-s). + /// + Small, + + /// + /// Small-medium text size (fontSize-sm). + /// + SmallMedium, + + /// + /// Medium text size (fontSize-m). + /// + Medium, + + /// + /// Medium-large text size (fontSize-ml). + /// + MediumLarge, + + /// + /// Large text size (fontSize-l). + /// + Large, + + /// + /// Extra large text size (fontSize-xl). + /// + ExtraLarge +} + +/// +/// Provides extension methods for . +/// +internal static class MenuOptionTextSizeExtensions +{ + /// + /// Converts a value to its corresponding CSS class name. + /// + /// The text size to convert. + /// The CSS class name for the specified size. + /// Thrown when is not recognized. + public static string ToCssClass( this MenuOptionTextSize textSize ) + { + return textSize switch { + MenuOptionTextSize.ExtraSmall => "fontSize-xs", + MenuOptionTextSize.Small => "fontSize-s", + MenuOptionTextSize.SmallMedium => "fontSize-sm", + MenuOptionTextSize.Medium => "fontSize-m", + MenuOptionTextSize.MediumLarge => "fontSize-ml", + MenuOptionTextSize.Large => "fontSize-l", + MenuOptionTextSize.ExtraLarge => "fontSize-xl", + _ => throw new ArgumentException($"Unknown text size: {textSize}.") + }; + } +} + +/// +/// Defines the horizontal text overflow behavior for menu options. +/// +public enum MenuOptionTextStyle +{ + /// + /// Truncates text at the end when it exceeds the maximum width, keeping the start portion. + /// Example: "Very Long Text Item" becomes "Very Long..." + /// + TruncateEnd, + + /// + /// Truncates text from both ends when it exceeds the maximum width, keeping the middle portion. + /// Example: "Very Long Text Item" becomes "Long Text" + /// + TruncateBothEnds, + + /// + /// Scrolls text to the left with fade-out effect. + /// Text scrolls left and gradually fades out at the left edge. + /// + ScrollLeftFade, + + /// + /// Scrolls text to the right with fade-out effect. + /// Text scrolls right and gradually fades out at the right edge. + /// + ScrollRightFade, + + /// + /// Scrolls text to the left in a continuous loop. + /// Text exits from the left edge and re-enters from the right edge. + /// + ScrollLeftLoop, + + /// + /// Scrolls text to the right in a continuous loop. + /// Text exits from the right edge and re-enters from the left edge. + /// + ScrollRightLoop +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/Menus/IOption.cs b/managed/src/SwiftlyS2.Shared/Modules/Menus/IOption.cs index cfc86b565..22543ab7b 100644 --- a/managed/src/SwiftlyS2.Shared/Modules/Menus/IOption.cs +++ b/managed/src/SwiftlyS2.Shared/Modules/Menus/IOption.cs @@ -1,109 +1,110 @@ -using SwiftlyS2.Shared.Players; - -namespace SwiftlyS2.Shared.Menus; - -/// -/// Represents a menu option that can be displayed and interacted with by players. -/// -public interface IOption -{ - /// - /// Gets or sets the text content of the menu option. - /// - public string Text { get; set; } - - /// - /// Gets a value indicating whether the option is visible in the menu. - /// - public bool Visible { get; } - - /// - /// Gets a value indicating whether the option can be interacted with. - /// - public bool Enabled { get; } - - /// - /// Gets the menu that this option belongs to, or null if not associated with a menu. - /// - public IMenu? Menu { get; set; } - - /// - /// Gets the horizontal overflow style for this option's text display. - /// - public MenuHorizontalStyle? OverflowStyle { get; } - - /// - /// Determines whether this option should be shown to the specified player. - /// - /// The player to check visibility for. - /// True if the option should be shown to the player; otherwise, false. - public bool ShouldShow( IPlayer player ); - - /// - /// Determines whether the specified player can interact with this option. - /// - /// The player to check interaction capability for. - /// True if the player can interact with the option; otherwise, false. - public bool CanInteract( IPlayer player ); - - /// - /// Gets the display text for this option as it should appear to the specified player. - /// - /// The player requesting the display text. - /// Indicates whether to update the horizontal style of the text. - /// The formatted display text for the option. - public string GetDisplayText( IPlayer player, bool updateHorizontalStyle ); - - /// - /// Gets the text size configuration for this option. - /// - /// The text size setting for the option. - public IMenuTextSize GetTextSize(); - - /// - /// Determines whether this option should play a sound when selected. - /// - /// True if the option should play a sound; otherwise, false. - public bool HasSound(); -} - -/// -/// Defines the available text size options for menu items. -/// -public enum IMenuTextSize -{ - /// - /// Extra small text size (fontSize-xs). - /// - ExtraSmall, - - /// - /// Small text size (fontSize-s). - /// - Small, - - /// - /// Small-medium text size (fontSize-sm). - /// - SmallMedium, - - /// - /// Medium text size (fontSize-m). - /// - Medium, - - /// - /// Medium-large text size (fontSize-ml). - /// - MediumLarge, - - /// - /// Large text size (fontSize-l). - /// - Large, - - /// - /// Extra large text size (fontSize-xl). - /// - ExtraLarge -} \ No newline at end of file +// using SwiftlyS2.Shared.Players; + +// namespace SwiftlyS2.Shared.Menus; + +// /// +// /// Represents a menu option that can be displayed and interacted with by players. +// /// +// [Obsolete("IOption will be deprecared at the release of SwiftlyS2. Please use IMenuOption instead")] +// public interface IOption +// { +// /// +// /// Gets or sets the text content of the menu option. +// /// +// public string Text { get; set; } + +// /// +// /// Gets a value indicating whether the option is visible in the menu. +// /// +// public bool Visible { get; } + +// /// +// /// Gets a value indicating whether the option can be interacted with. +// /// +// public bool Enabled { get; } + +// /// +// /// Gets the menu that this option belongs to, or null if not associated with a menu. +// /// +// public IMenu? Menu { get; set; } + +// /// +// /// Gets the horizontal overflow style for this option's text display. +// /// +// public MenuHorizontalStyle? OverflowStyle { get; } + +// /// +// /// Determines whether this option should be shown to the specified player. +// /// +// /// The player to check visibility for. +// /// True if the option should be shown to the player; otherwise, false. +// public bool ShouldShow( IPlayer player ); + +// /// +// /// Determines whether the specified player can interact with this option. +// /// +// /// The player to check interaction capability for. +// /// True if the player can interact with the option; otherwise, false. +// public bool CanInteract( IPlayer player ); + +// /// +// /// Gets the display text for this option as it should appear to the specified player. +// /// +// /// The player requesting the display text. +// /// Indicates whether to update the horizontal style of the text. +// /// The formatted display text for the option. +// public string GetDisplayText( IPlayer player, bool updateHorizontalStyle ); + +// /// +// /// Gets the text size configuration for this option. +// /// +// /// The text size setting for the option. +// public IMenuTextSize GetTextSize(); + +// /// +// /// Determines whether this option should play a sound when selected. +// /// +// /// True if the option should play a sound; otherwise, false. +// public bool HasSound(); +// } + +// /// +// /// Defines the available text size options for menu items. +// /// +// public enum IMenuTextSize +// { +// /// +// /// Extra small text size (fontSize-xs). +// /// +// ExtraSmall, + +// /// +// /// Small text size (fontSize-s). +// /// +// Small, + +// /// +// /// Small-medium text size (fontSize-sm). +// /// +// SmallMedium, + +// /// +// /// Medium text size (fontSize-m). +// /// +// Medium, + +// /// +// /// Medium-large text size (fontSize-ml). +// /// +// MediumLarge, + +// /// +// /// Large text size (fontSize-l). +// /// +// Large, + +// /// +// /// Extra large text size (fontSize-xl). +// /// +// ExtraLarge +// } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/Menus/KeyBind.cs b/managed/src/SwiftlyS2.Shared/Modules/Menus/KeyBind.cs new file mode 100644 index 000000000..7e1258c57 --- /dev/null +++ b/managed/src/SwiftlyS2.Shared/Modules/Menus/KeyBind.cs @@ -0,0 +1,25 @@ +namespace SwiftlyS2.Shared.Menus; + +[Flags] +public enum KeyBind : uint +{ + Mouse1 = 1 << 0, + Mouse2 = 1 << 1, + Space = 1 << 2, + Ctrl = 1 << 3, + W = 1 << 4, + A = 1 << 5, + S = 1 << 6, + D = 1 << 7, + E = 1 << 8, + Esc = 1 << 9, + R = 1 << 10, + Alt = 1 << 11, + Shift = 1 << 12, + Weapon1 = 1 << 13, + Weapon2 = 1 << 14, + Grenade1 = 1 << 15, + Grenade2 = 1 << 16, + Tab = 1 << 17, + F = 1 << 18, +} \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/Players/IPlayer.cs b/managed/src/SwiftlyS2.Shared/Modules/Players/IPlayer.cs index a7644ff88..9dd30dc54 100644 --- a/managed/src/SwiftlyS2.Shared/Modules/Players/IPlayer.cs +++ b/managed/src/SwiftlyS2.Shared/Modules/Players/IPlayer.cs @@ -49,7 +49,50 @@ public interface IPlayer : IEquatable /// /// The type of message to send. Determines how the message is processed or displayed. /// The content of the message to send. Cannot be null. - public void SendMessage(MessageType kind, string message); + public void SendMessage( MessageType kind, string message ); + /// + /// Sends a message of the specified type to the player with a custom HTML duration. + /// + /// The type of message to send. Determines how the message is processed or displayed. + /// The content of the message to send. Cannot be null. + /// The duration, in milliseconds, for which the message should be displayed in HTML format. + public void SendMessage( MessageType kind, string message, int htmlDuration = 5000 ); + /// + /// Sends a notify message to the player. + /// + /// The content of the message to send. Cannot be null. + public void SendNotify( string message ); + /// + /// Sends a console message to the player. + /// + /// The content of the message to send. Cannot be null. + public void SendConsole( string message ); + /// + /// Sends a chat message to the player. + /// + /// The content of the message to send. Cannot be null. + public void SendChat( string message ); + /// + /// Sends a center message to the player. + /// + /// The content of the message to send. Cannot be null. + public void SendCenter( string message ); + /// + /// Sends an alert message to the player. + /// + /// The content of the message to send. Cannot be null. + public void SendAlert( string message ); + /// + /// Sends a center HTML message to the player. + /// + /// The content of the message to send. Cannot be null. + /// The duration, in milliseconds, for which the message should be displayed in HTML format. + public void SendCenterHTML( string message, int duration = 5000 ); + /// + /// Sends an end-of-text chat message to the player. + /// + /// The content of the message to send. Cannot be null. + public void SendChatEOT( string message ); /// /// Whether the client is a bot. /// @@ -123,20 +166,20 @@ public interface IPlayer : IEquatable /// The message describing the reason for the disconnection. This message may be displayed to the user. Cannot be /// null or empty. /// The disconnection reason code indicating the type of network disconnection to perform. - public void Kick(string reason, ENetworkDisconnectionReason gameReason); + public void Kick( string reason, ENetworkDisconnectionReason gameReason ); /// /// Sets whether transmission of the specified entity should be blocked. /// /// The unique identifier of the entity whose transmission status is to be updated. /// A value indicating whether transmission for the entity should be blocked. Specify to /// block transmission; otherwise, . - public void ShouldBlockTransmitEntity(int entityid, bool shouldBlockTransmit); + public void ShouldBlockTransmitEntity( int entityid, bool shouldBlockTransmit ); /// /// Determines whether the specified entity is currently blocked from transmitting data. /// /// The unique identifier of the entity to check for transmit blocking. Must be a valid entity ID. /// true if the entity is blocked from transmitting; otherwise, false. - public bool IsTransmitEntityBlocked(int entityid); + public bool IsTransmitEntityBlocked( int entityid ); /// /// Removes all entity blocks from the transmit buffer, discarding any pending data scheduled for transmission. /// @@ -146,36 +189,36 @@ public interface IPlayer : IEquatable /// /// The identifier of the player whose listen override setting will be updated. Must be a valid player index. /// The listen override value to apply to the specified player. - public void SetListenOverride(int player, ListenOverride listenOverride); + public void SetListenOverride( int player, ListenOverride listenOverride ); /// /// Retrieves the listen override settings for the specified player. /// /// The identifier of the player whose listen override settings are to be retrieved. Must be a valid player index. /// A ListenOverride object containing the listen override settings for the specified player. - public ListenOverride GetListenOverride(int player); + public ListenOverride GetListenOverride( int player ); /// /// Applies damage to the entity based on the specified damage information. /// /// An object containing details about the damage to be applied, including the amount, type, and source. Cannot be /// null. - public void TakeDamage(CTakeDamageInfo damageInfo); + public void TakeDamage( CTakeDamageInfo damageInfo ); /// /// Teleports the entity to the specified position, orientation, and velocity. /// /// The target position to teleport the entity to, represented as a . /// The orientation to apply to the entity after teleportation, represented as a . /// The velocity to assign to the entity upon arrival, represented as a . - public void Teleport(Vector pos, QAngle angle, Vector velocity); + public void Teleport( Vector pos, QAngle angle, Vector velocity ); /// /// Switches the player's team. /// /// The team to switch to. Cannot be null. - public void SwitchTeam(Team team); + public void SwitchTeam( Team team ); /// /// Changes the player's team. /// /// The team to assign. Cannot be null. - public void ChangeTeam(Team team); + public void ChangeTeam( Team team ); /// /// Respawns the player. @@ -184,5 +227,5 @@ public interface IPlayer : IEquatable /// /// Executes a command on behalf of the player. /// - public void ExecuteCommand(string command); + public void ExecuteCommand( string command ); } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Modules/Players/IPlayerManager.cs b/managed/src/SwiftlyS2.Shared/Modules/Players/IPlayerManager.cs index 3fdc7c9ed..1dca917db 100644 --- a/managed/src/SwiftlyS2.Shared/Modules/Players/IPlayerManager.cs +++ b/managed/src/SwiftlyS2.Shared/Modules/Players/IPlayerManager.cs @@ -6,7 +6,7 @@ public interface IPlayerManagerService /// Checks whether a specific player is currently online and connected to the server. /// /// True if the player is online, false otherwise. - public bool IsPlayerOnline(int playerid); + public bool IsPlayerOnline( int playerid ); /// /// Gets the number of players currently in the game. @@ -23,12 +23,55 @@ public interface IPlayerManagerService /// /// The type of message display. /// The text content to send to players. - public void SendMessage(MessageType kind, string message); + public void SendMessage( MessageType kind, string message ); + /// + /// Sends a message of the specified type to the players with a custom HTML duration. + /// + /// The type of message to send. Determines how the message is processed or displayed. + /// The content of the message to send. Cannot be null. + /// The duration, in milliseconds, for which the message should be displayed in HTML format. + public void SendMessage( MessageType kind, string message, int htmlDuration = 5000 ); + /// + /// Sends a notify message to the players. + /// + /// The content of the message to send. Cannot be null. + public void SendNotify( string message ); + /// + /// Sends a console message to the players. + /// + /// The content of the message to send. Cannot be null. + public void SendConsole( string message ); + /// + /// Sends a chat message to the players. + /// + /// The content of the message to send. Cannot be null. + public void SendChat( string message ); + /// + /// Sends a center message to the players. + /// + /// The content of the message to send. Cannot be null. + public void SendCenter( string message ); + /// + /// Sends an alert message to the players. + /// + /// The content of the message to send. Cannot be null. + public void SendAlert( string message ); + /// + /// Sends a center HTML message to the players. + /// + /// The content of the message to send. Cannot be null. + /// The duration, in milliseconds, for which the message should be displayed in HTML format. + public void SendCenterHTML( string message, int duration = 5000 ); + /// + /// Sends an end-of-text chat message to the players. + /// + /// The content of the message to send. Cannot be null. + public void SendChatEOT( string message ); /// /// Controls whether a specific entity should be blocked from being transmitted/synchronized to clients. /// - public void ShouldBlockTransmitEntity(int entityid, bool shouldBlockTransmit); + public void ShouldBlockTransmitEntity( int entityid, bool shouldBlockTransmit ); /// /// Removes all entity transmission blocks, allowing all previously blocked entities to be transmitted to clients again. @@ -41,7 +84,7 @@ public interface IPlayerManagerService /// The unique identifier of the player to retrieve. Must be a valid player ID. /// An instance representing the player with the specified ID, or null if no such /// player exists. - public IPlayer GetPlayer(int playerid); + public IPlayer GetPlayer( int playerid ); /// /// Retrieves all players currently online. @@ -56,5 +99,5 @@ public interface IPlayerManagerService /// The target player name or identifier. /// The search mode to apply. /// A collection of players matching the search criteria. - public IEnumerable FindTargettedPlayers(IPlayer player, string target, TargetSearchMode searchMode); + public IEnumerable FindTargettedPlayers( IPlayer player, string target, TargetSearchMode searchMode ); } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Natives/Structs/CRecipientFilter.cs b/managed/src/SwiftlyS2.Shared/Natives/Structs/CRecipientFilter.cs index c59d6278b..39c50a688 100644 --- a/managed/src/SwiftlyS2.Shared/Natives/Structs/CRecipientFilter.cs +++ b/managed/src/SwiftlyS2.Shared/Natives/Structs/CRecipientFilter.cs @@ -60,13 +60,7 @@ public ulong ToMask() public void AddAllPlayers() { - for (var i = 0; i < NativePlayerManager.GetPlayerCap(); i++) - { - if (NativePlayerManager.IsPlayerOnline(i)) - { - AddRecipient(i); - } - } + RecipientsMask = 0xFFFFFFFFFFFFFFFF; } public void RemoveAllPlayers() diff --git a/managed/src/SwiftlyS2.Shared/Natives/Structs/CUtlString.cs b/managed/src/SwiftlyS2.Shared/Natives/Structs/CUtlString.cs index b27774fda..442905c9a 100644 --- a/managed/src/SwiftlyS2.Shared/Natives/Structs/CUtlString.cs +++ b/managed/src/SwiftlyS2.Shared/Natives/Structs/CUtlString.cs @@ -16,9 +16,8 @@ public string Value { return Marshal.PtrToStringUTF8(_ptr)!; } set => _ptr = StringPool.Allocate(value); - } public static implicit operator string(CUtlString str) => str.Value; - public static implicit operator CUtlString(string str) => new CUtlString { _ptr = StringPool.Allocate(str) }; + public static implicit operator CUtlString(string str) => new() { _ptr = StringPool.Allocate(str) }; } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Natives/Structs/Color.cs b/managed/src/SwiftlyS2.Shared/Natives/Structs/Color.cs index fbc10ff6a..95f82d67f 100644 --- a/managed/src/SwiftlyS2.Shared/Natives/Structs/Color.cs +++ b/managed/src/SwiftlyS2.Shared/Natives/Structs/Color.cs @@ -1,81 +1,83 @@ -using System.Drawing; using System.Runtime.InteropServices; namespace SwiftlyS2.Shared.Natives; [StructLayout(LayoutKind.Sequential, Size = 4)] -public struct Color : IEquatable { - public byte R; - public byte G; - public byte B; - public byte A; - - public Color(byte r, byte g, byte b, byte a) { - R = r; - G = g; - B = b; - A = a; - } - - public Color(byte r, byte g, byte b) : this(r, g, b, byte.MaxValue) { - } - - public Color(int r, int g, int b) : this((byte)r, (byte)g, (byte)b, byte.MaxValue) { - } - public Color(int r, int g, int b, int a) : this((byte)r, (byte)g, (byte)b, (byte)a) - { - } - public Color(char r, char g, char b, char a) : this((byte)r, (byte)g, (byte)b, (byte)a) { - } - - public Color(char r, char g, char b) : this((byte)r, (byte)g, (byte)b, byte.MaxValue) { - } +public struct Color : IEquatable +{ + public byte R; + public byte G; + public byte B; + public byte A; + + public Color( byte r, byte g, byte b, byte a ) + { + R = r; + G = g; + B = b; + A = a; + } - public static Color FromBuiltin(System.Drawing.Color color) { - return new Color(color.R, color.G, color.B, color.A); - } + public Color( byte r, byte g, byte b ) : this(r, g, b, byte.MaxValue) + { + } - public System.Drawing.Color ToBuiltin() { - return System.Drawing.Color.FromArgb(A, R, G, B); - } + public Color( int r, int g, int b ) : this((byte)r, (byte)g, (byte)b, byte.MaxValue) + { + } + public Color( int r, int g, int b, int a ) : this((byte)r, (byte)g, (byte)b, (byte)a) + { + } + public Color( char r, char g, char b, char a ) : this((byte)r, (byte)g, (byte)b, (byte)a) + { + } - public static Color FromHex(string hex) { - if (hex.StartsWith("#")) { - hex = hex.Substring(1); + public Color( char r, char g, char b ) : this((byte)r, (byte)g, (byte)b, byte.MaxValue) + { } - if (hex.Length == 6) { - return new Color((byte)int.Parse(hex.Substring(0, 2), System.Globalization.NumberStyles.HexNumber), (byte)int.Parse(hex.Substring(2, 2), System.Globalization.NumberStyles.HexNumber), (byte)int.Parse(hex.Substring(4, 2), System.Globalization.NumberStyles.HexNumber), byte.MaxValue); + + public static Color FromInt32( int color ) + { + return new Color((byte)(color >> 24), (byte)(color >> 16), (byte)(color >> 8), (byte)color); } - if (hex.Length == 8) { - return new Color((byte)int.Parse(hex.Substring(0, 2), System.Globalization.NumberStyles.HexNumber), (byte)int.Parse(hex.Substring(2, 2), System.Globalization.NumberStyles.HexNumber), (byte)int.Parse(hex.Substring(4, 2), System.Globalization.NumberStyles.HexNumber), (byte)int.Parse(hex.Substring(6, 2), System.Globalization.NumberStyles.HexNumber)); + + public static Color FromBuiltin( System.Drawing.Color color ) + { + return new Color(color.R, color.G, color.B, color.A); } - throw new ArgumentException("Hex color must be 6 or 8 characters long."); - } - public string ToHex(bool includeAlpha = false) { - return $"#{R:X2}{G:X2}{B:X2}{(includeAlpha ? $"{A:X2}" : "")}"; - } + public static Color FromHex( string hex ) + { + var (r, g, b, a) = Helper.ParseHexColor(hex); + return r == null || g == null || b == null + ? throw new ArgumentException($"Invalid hex color format: '{hex}'. Expected #RGB, #RGBA, #RRGGBB, or #RRGGBBAA.") + : new Color(r.Value, g.Value, b.Value, a ?? 255); + } - public override string ToString() { - return $"Color({R}, {G}, {B}, {A})"; - } + public readonly System.Drawing.Color ToBuiltin() + { + return System.Drawing.Color.FromArgb(A, R, G, B); + } - public int ToInt32() { - return (R << 24) | (G << 16) | (B << 8) | A; - } + public readonly int ToInt32() + { + return (R << 24) | (G << 16) | (B << 8) | A; + } - public static Color FromInt32(int color) { - return new Color((byte)(color >> 24), (byte)(color >> 16), (byte)(color >> 8), (byte)color); - } + public readonly string ToHex( bool includeAlpha = false ) + { + return $"#{R:X2}{G:X2}{B:X2}{(includeAlpha ? $"{A:X2}" : "")}"; + } - public override bool Equals(object? obj) => obj is Color color && this.Equals(color); - public override int GetHashCode() => HashCode.Combine(R, G, B, A); + public readonly bool Equals( Color other ) + { + return R == other.R && G == other.G && B == other.B && A == other.A; + } - public bool Equals(Color other) - { - return R == other.R && G == other.G && B == other.B && A == other.A; - } + public override string ToString() => $"Color({R}, {G}, {B}, {A})"; + public override bool Equals( object? obj ) => obj is Color color && Equals(color); + public override int GetHashCode() => HashCode.Combine(R, G, B, A); - public static bool operator ==(Color left, Color right) => left.Equals(right); - public static bool operator !=(Color left, Color right) => !left.Equals(right); + public static bool operator ==( Color left, Color right ) => left.Equals(right); + public static bool operator !=( Color left, Color right ) => !left.Equals(right); } \ No newline at end of file diff --git a/managed/src/SwiftlyS2.Shared/Natives/Structs/RoundEndReason.cs b/managed/src/SwiftlyS2.Shared/Natives/Structs/RoundEndReason.cs new file mode 100644 index 000000000..c7d5c467b --- /dev/null +++ b/managed/src/SwiftlyS2.Shared/Natives/Structs/RoundEndReason.cs @@ -0,0 +1,27 @@ +namespace SwiftlyS2.Shared.Natives; + +public enum RoundEndReason : uint +{ + Unknown = 0x0u, + TargetBombed = 0x1u, + TerroristsEscaped = 0x4u, + CTsPreventEscape = 0x5u, + EscapingTerroristsNeutralized = 0x6u, + BombDefused = 0x7u, + CTsWin = 0x8u, + TerroristsWin = 0x9u, + RoundDraw = 0xAu, + AllHostageRescued = 0xBu, + TargetSaved = 0xCu, + HostagesNotRescued = 0xDu, + TerroristsNotEscaped = 0xEu, + GameCommencing = 0x10u, + + TerroristsSurrender = 0x11u, + CTsSurrender = 0x12u, + + TerroristsPlanted = 0x13u, + CTsReachedHostage = 0x14u, + SurvivalWin = 0x15u, + SurvivalDraw = 0x16u, +} \ No newline at end of file diff --git a/managed/src/TestPlugin/TestPlugin.cs b/managed/src/TestPlugin/TestPlugin.cs index 21eebf47f..d29722c08 100644 --- a/managed/src/TestPlugin/TestPlugin.cs +++ b/managed/src/TestPlugin/TestPlugin.cs @@ -1,6 +1,8 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; +using Tomlyn.Extensions.Configuration; +using System.Text.RegularExpressions; using SwiftlyS2.Shared; using SwiftlyS2.Shared.Commands; using SwiftlyS2.Shared.GameEventDefinitions; @@ -30,6 +32,10 @@ using BenchmarkDotNet.Loggers; using SwiftlyS2.Shared.Menus; using SwiftlyS2.Shared.SteamAPI; +using SwiftlyS2.Core.Menus.OptionsBase; +using System.Collections.Concurrent; +using Dia2Lib; +using System.Reflection.Metadata; namespace TestPlugin; @@ -149,6 +155,7 @@ public override void Load( bool hotReload ) .Configure(( builder ) => { builder.AddJsonFile("test.jsonc", optional: false, reloadOnChange: true); + builder.AddTomlFile("test.toml", optional: true, reloadOnChange: true); }); ServiceCollection services = new(); @@ -447,6 +454,13 @@ public void TestCommand6( ICommandContext context ) Console.WriteLine("TestPlugin TestCommand6"); } + [Command("tt99")] + public void TestCommand99( ICommandContext context ) + { + Console.WriteLine(context.Sender!.SteamID); + Console.WriteLine(context.Sender!.UnauthorizedSteamID); + } + [Command("tt7")] public void TestCommand7( ICommandContext context ) { @@ -529,24 +543,21 @@ public HookResult TestGameEventHandler( EventPlayerJump @e ) public HookResult TestServerNetMessageHandler( CCSUsrMsg_SendPlayerItemDrops msg ) { Console.WriteLine("FIRED"); - // foreach(var item in msg.Accessor) { - // Console.WriteLine($"TestPlugin ServerNetMessageHandler: {item.EconItem.Defindex}"); - // } return HookResult.Continue; } - private Callback _authTicketResponse; + private Callback _authTicketResponse; [EventListener] public void OnSteamAPIActivated() { Console.WriteLine("TestPlugin OnSteamAPIActivated"); - _authTicketResponse = Callback.Create(AuthResponse); + _authTicketResponse = Callback.Create(AuthResponse); } - public void AuthResponse( ValidateAuthTicketResponse_t param ) + public void AuthResponse( GCMessageAvailable_t param ) { - Console.WriteLine($"AuthResponse {param.m_eAuthSessionResponse} -> {param.m_SteamID.m_SteamID}"); + Console.WriteLine($"AuthResponse {param.m_nMessageSize}"); } [Command("getip")] @@ -555,191 +566,328 @@ public void GetIpCommand( ICommandContext context ) context.Reply(SteamGameServer.GetPublicIP().ToString()); } - [Command("i76")] - public void TestIssue76Command( ICommandContext context ) - { - var player = context.Sender!; - IMenu settingsMenu = Core.Menus.CreateMenu("Settings"); - // Add the following code to render text properly - //settingsMenu.Builder.AddText("123", overflowStyle: MenuHorizontalStyle.ScrollLeftLoop(25f)); - settingsMenu.Builder.AddText("123"); - settingsMenu.Builder.AddText("1234"); - settingsMenu.Builder.AddText("12345"); - - Core.Menus.OpenMenu(player, settingsMenu); - } - - [Command("i77")] - public void TestIssue77Command( ICommandContext context ) + // [Command("i76")] + // public void TestIssue76Command( ICommandContext context ) + // { + // var player = context.Sender!; + // IMenu settingsMenu = Core.Menus.CreateMenu("Settings"); + // // Add the following code to render text properly + // //settingsMenu.Builder.AddText("123", overflowStyle: MenuHorizontalStyle.ScrollLeftLoop(25f)); + // settingsMenu.Builder.AddText("123"); + // settingsMenu.Builder.AddText("1234"); + // settingsMenu.Builder.AddText("12345"); + + // Core.Menus.OpenMenu(player, settingsMenu); + // } + + // [Command("i77")] + // public void TestIssue77Command( ICommandContext context ) + // { + // var player = context.Sender!; + // IMenu settingsMenu = Core.Menus.CreateMenu("Settings"); + + // settingsMenu.Builder.AddText("123"); + // settingsMenu.Builder.AddSubmenu("Submenu", () => + // { + // var menu = Core.Menus.CreateMenu("Submenu"); + // menu.Builder.AddText("1234"); + // return menu; + // }); + + // settingsMenu.Builder.AddSubmenu("Async Submenu", async () => + // { + // await Task.Delay(5000); + // var menu = Core.Menus.CreateMenu("Async Submenu"); + // menu.Builder.AddText("12345"); + // return menu; + // }); + + // Core.Menus.OpenMenu(player, settingsMenu); + // } + + // [Command("i78")] + // public void TestIssue78Command( ICommandContext context ) + // { + // var player = context.Sender!; + // IMenu settingsMenu = Core.Menus.CreateMenu("Settings"); + // settingsMenu.Builder.AddButton("123", ( p ) => + // { + // player.SendMessage(MessageType.Chat, "Button"); + // }); + + // settingsMenu.Builder.Design.OverrideExitButton("shift"); + // settingsMenu.Builder.Design.OverrideSelectButton("e"); + + // Core.Menus.OpenMenu(player, settingsMenu); + // } + + [Command("tm")] + public void TestMenuCommand( ICommandContext context ) { - var player = context.Sender!; - IMenu settingsMenu = Core.Menus.CreateMenu("Settings"); - - settingsMenu.Builder.AddText("123"); - settingsMenu.Builder.AddSubmenu("Submenu", () => + var buyButton = new ButtonMenuOption("Purchase") { CloseAfterClick = true }; + buyButton.Click += async ( sender, args ) => { - var menu = Core.Menus.CreateMenu("Submenu"); - menu.Builder.AddText("1234"); - return menu; - }); + await Task.Delay(1000); - settingsMenu.Builder.AddSubmenu("Async Submenu", async () => - { - await Task.Delay(5000); - var menu = Core.Menus.CreateMenu("Async Submenu"); - menu.Builder.AddText("12345"); - return menu; - }); - - Core.Menus.OpenMenu(player, settingsMenu); - } + if (sender is MenuOptionBase option) + { + var triggerOption = option!.Menu!.Parent.TriggerOption; + triggerOption!.Enabled = false; + args.Player.SendChat($"Purchase completed -> {triggerOption!.Text}"); + // option!.Menu!.Tag = ("Purchase", System.Diagnostics.Stopwatch.GetTimestamp()); + } + }; - [Command("i78")] - public void TestIssue78Command( ICommandContext context ) - { - var player = context.Sender!; - IMenu settingsMenu = Core.Menus.CreateMenu("Settings"); - settingsMenu.Builder.AddButton("123", ( p ) => + var confirmMenu = Core.MenusAPI + .CreateBuilder() + .Design.SetMenuTitle("Confirmation Menu") + .AddOption(buyButton) + .AddOption(new ButtonMenuOption("Cancel") { CloseAfterClick = true }) + .Build(); + + var menu = Core.MenusAPI + .CreateBuilder() + .Design.SetMenuTitle("Shop Menu") + .AddOption(new SubmenuMenuOption("Item 1", confirmMenu)) + .AddOption(new SubmenuMenuOption("Item 2", confirmMenu)) + .AddOption(new SubmenuMenuOption("Item 3", confirmMenu)) + .AddOption(new SubmenuMenuOption("Item 4", confirmMenu)) + .Build(); + + Core.MenusAPI.OpenMenu(menu, ( player, menu ) => { - player.SendMessage(MessageType.Chat, "Button"); + Console.WriteLine($"{menu.Configuration.Title} closed for player: {player.Controller.PlayerName}"); }); - settingsMenu.Builder.Design.OverrideExitButton("shift"); - settingsMenu.Builder.Design.OverrideSelectButton("e"); + // Core.MenusAPI.OpenMenuForPlayer(context.Sender!, menu, ( player, menu ) => + // { + // Console.WriteLine($"{menu.Configuration.Title} closed for player: {player.Controller.PlayerName}"); + // }); - Core.Menus.OpenMenu(player, settingsMenu); + // Core.MenusAPI.MenuClosed += ( sender, args ) => + // { + // if (args.Menu?.Tag is (string, long)) + // { + // Console.WriteLine($"Purchase completed -> {args.Menu.Tag}"); + // } + // }; } - [Command("mt")] - public void MenuTestCommand( ICommandContext context ) + [Command("rmt")] + public void RefactoredMenuTestCommand( ICommandContext context ) { - var player = context.Sender!; - - IMenu settingsMenu = Core.Menus.CreateMenu("MenuTest"); - - settingsMenu.Builder.Design.MaxVisibleItems(5); - - // settingsMenu.Builder.Design.MaxVisibleItems(Random.Shared.Next(-2, 8)); - if (context.Args.Length < 1 || !int.TryParse(context.Args[0], out int vtype)) vtype = 0; - settingsMenu.Builder.Design.SetVerticalScrollStyle(vtype switch { - 1 => MenuVerticalScrollStyle.LinearScroll, - 2 => MenuVerticalScrollStyle.WaitingCenter, - _ => MenuVerticalScrollStyle.CenterFixed - }); - - if (context.Args.Length < 2 || !int.TryParse(context.Args[1], out int htype)) htype = 0; - settingsMenu.Builder.Design.SetGlobalHorizontalStyle(htype switch { - 0 => MenuHorizontalStyle.Default, - 1 => MenuHorizontalStyle.TruncateBothEnds(26f), - 2 => MenuHorizontalStyle.ScrollLeftFade(26f, 8, 128), - 3 => MenuHorizontalStyle.ScrollLeftLoop(26f, 8, 128), - 1337 => MenuHorizontalStyle.TruncateEnd(0f), - _ => MenuHorizontalStyle.TruncateEnd(26f) - }); - - settingsMenu.Builder.AddButton("1. AButton", ( p ) => - { - player.SendMessage(MessageType.Chat, "Button"); - }); - - settingsMenu.Builder.AddToggle("2. Toggle", defaultValue: true, ( p, value ) => - { - player.SendMessage(MessageType.Chat, $"AddToggle {value}"); - }); - - settingsMenu.Builder.AddSlider("3. Slider", min: 0, max: 100, defaultValue: 10, step: 10, ( p, value ) => + var button = new ButtonMenuOption(HtmlGradient.GenerateGradientText("Swiftlys2 向这广袤世界致以温柔问候", "#FFE4E1", "#FFC0CB", "#FF69B4")) { TextStyle = MenuOptionTextStyle.ScrollLeftLoop/*, CloseAfterClick = true*/ }; + button.Click += ( sender, args ) => { - player.SendMessage(MessageType.Chat, $"AddSlider {value}"); - }); + args.Player.SendMessage(MessageType.Chat, "Swiftlys2 向这广袤世界致以温柔问候"); + button.Enabled = false; + _ = Task.Run(async () => + { + await Task.Delay(1000); + button.Enabled = true; + }); + return ValueTask.CompletedTask; + }; - settingsMenu.Builder.AddAsyncButton("4. AsyncButton", async ( p ) => + var toggle = new ToggleMenuOption("12"); + toggle.ValueChanged += ( sender, args ) => { - await Task.Delay(2000); - }); - - settingsMenu.Builder.AddText("5. Text"); - settingsMenu.Builder.AddText("6. Text"); - settingsMenu.Builder.AddText("7. Text"); - settingsMenu.Builder.AddText("8. Text"); - settingsMenu.Builder.AddText("9. Text"); - settingsMenu.Builder.AddSeparator(); - settingsMenu.Builder.AddText($"{HtmlGradient.GenerateGradientText("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", "#FFE4E1", "#FFC0CB", "#FF69B4")}", overflowStyle: MenuHorizontalStyle.TruncateEnd(26f)); - settingsMenu.Builder.AddText($"{HtmlGradient.GenerateGradientText("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", "#FFE5CC", "#FFAB91", "#FF7043")}", overflowStyle: MenuHorizontalStyle.TruncateBothEnds(26f)); - settingsMenu.Builder.AddText($"{HtmlGradient.GenerateGradientText("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", "#E6E6FA", "#00FFFF", "#FF1493")}", overflowStyle: MenuHorizontalStyle.ScrollRightFade(26f, 8)); - settingsMenu.Builder.AddText($"{HtmlGradient.GenerateGradientText("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", "#AFEEEE", "#7FFFD4", "#40E0D0")}", overflowStyle: MenuHorizontalStyle.ScrollLeftLoop(26f, 8)); - settingsMenu.Builder.AddText("12345678901234567890split12345678901234567890", overflowStyle: MenuHorizontalStyle.ScrollLeftFade(26f, 8, 128)); - settingsMenu.Builder.AddText("一二三四五六七八九十分割一二三四五六七八九十", overflowStyle: MenuHorizontalStyle.ScrollRightLoop(26f, 8, 64)); - settingsMenu.Builder.AddSeparator(); - settingsMenu.Builder.AddText("Swiftlys2 向这广袤世界致以温柔问候", overflowStyle: MenuHorizontalStyle.ScrollRightLoop(26f, 8)); - settingsMenu.Builder.AddText("Swiftlys2 からこの広大なる世界へ温かい挨拶を"); - settingsMenu.Builder.AddText("Swiftlys2 가 이 넓은 세상에 따뜻한 인사를 전합니다"); - settingsMenu.Builder.AddText("Swiftlys2 приветствует этот прекрасный мир"); - settingsMenu.Builder.AddText("Swiftlys2 salută această lume minunată"); - settingsMenu.Builder.AddText("Swiftlys2 extends warmest greetings to this wondrous world"); - settingsMenu.Builder.AddText("Swiftlys2 sendas korajn salutojn al ĉi tiu mirinda mondo"); - settingsMenu.Builder.AddSeparator(); - settingsMenu.Builder.AddAsyncButton("AsyncButton|AsyncButton|AsyncButton", async ( p ) => await Task.Delay(2000)); - settingsMenu.Builder.AddButton("Button|Button|Button|Button", ( p ) => { }); - settingsMenu.Builder.AddChoice("Choice|Choice|Choice|Choice", ["Option 1", "Option 2", "Option 3"], "Option 1", ( p, value ) => { }, overflowStyle: MenuHorizontalStyle.TruncateEnd(8f)); - settingsMenu.Builder.AddProgressBar("ProgressBar|ProgressBar|ProgressBar", () => (float)Random.Shared.NextDouble(), overflowStyle: MenuHorizontalStyle.ScrollLeftLoop(26f, 12)); - settingsMenu.Builder.AddSlider("Slider|Slider|Slider|Slider", 0f, 100f, 0f, 1f, ( p, value ) => { }, overflowStyle: MenuHorizontalStyle.ScrollRightLoop(8f, 12)); - // settingsMenu.Builder.AddSubmenu("Submenu"); - settingsMenu.Builder.AddToggle("Toggle|Toggle|Toggle|Toggle", true, ( p, value ) => { }); - settingsMenu.Builder.AddSeparator(); - - Core.Menus.OpenMenu(player, settingsMenu); - } + args.Player.SendChat($"OldValue: {args.OldValue}({args.OldValue.GetType().Name}), NewValue: {args.NewValue}({args.NewValue.GetType().Name})"); + }; - [Command("menu")] - public void MenuCommand( ICommandContext context ) - { var player = context.Sender!; - var menu = Core.Menus.CreateMenu("Test Menu"); - - menu.Builder - .AddButton("Button 1", ( ctx ) => - { - player.SendMessage(MessageType.Chat, "You clicked Button 1"); - }) - .AddButton("Button 2", ( ctx ) => - { - player.SendMessage(MessageType.Chat, "You clicked Button 2"); - }) - .AddButton("Button 3", ( ctx ) => + var menu = Core.MenusAPI + .CreateBuilder() + .SetPlayerFrozen(false) + .Design.SetMaxVisibleItems(5) + .Design.SetMenuTitle($"{HtmlGradient.GenerateGradientText("Redesigned Menu", "#00FA9A", "#F5FFFA")}") + .Design.SetMenuTitleVisible(true) + .Design.SetMenuFooterVisible(true) + .Design.SetMenuFooterColor("#0F0") + .Design.SetNavigationMarkerColor("#F0F8FFFF") + .Design.SetVisualGuideLineColor("#FFFFFF") + .Design.SetDisabledColor("#808080") + .Design.EnableAutoAdjustVisibleItems() + .Design.SetGlobalScrollStyle(MenuOptionScrollStyle.WaitingCenter) + .AddOption(new TextMenuOption("1") { Visible = false }) + .AddOption(toggle) + .AddOption(new ChoiceMenuOption("123", ["Option 1", "Option 2", "Option 3"])) + .AddOption(new SliderMenuOption("1234")) + .AddOption(new ProgressBarMenuOption("12345", () => (float)new Random().NextDouble(), multiLine: false)) + .AddOption(new SubmenuMenuOption("123456", async () => { - player.SendMessage(MessageType.Chat, "You clicked Button 3"); - }) - .AddButton("Button 4", ( ctx ) => + await Task.Delay(1000); + var menu = Core.MenusAPI.CreateBuilder() + .SetPlayerFrozen(true) + .Design.SetMenuTitle("Async Submenu") + .AddOption(new TextMenuOption("123456")) + .Build(); + return menu; + })) + .AddOption(new InputMenuOption("1234567")) + .AddOption(new TextMenuOption() { Text = "12345678", TextStyle = MenuOptionTextStyle.ScrollLeftLoop }) + .AddOption(new TextMenuOption("123456789")) + .AddOption(new TextMenuOption("1234567890") { Visible = false }) + .AddOption(button) + .AddOption(new TextMenuOption(HtmlGradient.GenerateGradientText("Swiftlys2 からこの広大なる世界へ温かい挨拶を", "#FFE5CC", "#FFAB91", "#FF7043")) { TextStyle = MenuOptionTextStyle.ScrollRightLoop }) + .AddOption(new TextMenuOption(HtmlGradient.GenerateGradientText("Swiftlys2 가 이 넓은 세상에 따뜻한 인사를 전합니다", "#E6E6FA", "#00FFFF", "#FF1493")) { TextStyle = MenuOptionTextStyle.ScrollLeftFade }) + .AddOption(new TextMenuOption(HtmlGradient.GenerateGradientText("Swiftlys2 приветствует этот прекрасный мир", "#AFEEEE", "#7FFFD4", "#40E0D0")) { TextStyle = MenuOptionTextStyle.ScrollRightFade }) + .AddOption(new TextMenuOption("Swiftlys2 salută această lume minunată") { TextStyle = MenuOptionTextStyle.TruncateEnd }) + .AddOption(new TextMenuOption("Swiftlys2 extends warmest greetings to this wondrous world") { TextStyle = MenuOptionTextStyle.TruncateBothEnds }) + // .AddOption(new TextMenuOption("Swiftlys2 sendas korajn salutojn al ĉi tiu mirinda mondo")) + .AddOption(new TextMenuOption("1234567890") { Visible = false }) + .AddOption(new TextMenuOption("123456789")) + .AddOption(new TextMenuOption("12345678") { TextStyle = MenuOptionTextStyle.ScrollRightLoop }) + .AddOption(new InputMenuOption("1234567")) + .AddOption(new SubmenuMenuOption("123456", () => { - player.SendMessage(MessageType.Chat, "You clicked Button 4"); - }) - .AddButton("Button 5", ( ctx ) => - { - player.SendMessage(MessageType.Chat, "You clicked Button 5"); - }) - .AddButton("Button 6", ( ctx ) => - { - player.SendMessage(MessageType.Chat, "You clicked Button 6"); - }) - .AddButton("Button 7", ( ctx ) => - { - player.SendMessage(MessageType.Chat, "You clicked Button 7"); - }) - .AddButton("Button 8", ( ctx ) => - { - player.SendMessage(MessageType.Chat, "You clicked Button 8"); - }) - .AddSeparator() - .AddText("hello!", size: IMenuTextSize.ExtraLarge) - .AutoClose(15f) - .HasSound(true) - .ForceFreeze(); - - menu.Builder.Design.SetColor(new(0, 186, 105, 255)); - - Core.Menus.OpenMenu(player, menu); + var menu = Core.MenusAPI.CreateBuilder() + .Design.SetMenuTitle("Async Submenu") + .AddOption(new TextMenuOption("123456")) + .Build(); + return menu; + })) + .AddOption(new ProgressBarMenuOption("12345", () => (float)new Random().NextDouble(), multiLine: false)) + .AddOption(new SliderMenuOption("1234")) + .AddOption(new ChoiceMenuOption("123", ["Option 1", "Option 2", "Option 3"])) + .AddOption(new ToggleMenuOption("12", false, "O", "X")) + .AddOption(new TextMenuOption("1") { Visible = false }) + .Build(); + + Core.MenusAPI.OpenMenu(menu); + // Core.MenusAPI.OpenMenuForPlayer(player, menu); } + // [Command("mt")] + // public void MenuTestCommand( ICommandContext context ) + // { + // var player = context.Sender!; + + // IMenu settingsMenu = Core.Menus.CreateMenu("MenuTest"); + + // settingsMenu.Builder.Design.MaxVisibleItems(5); + + // // settingsMenu.Builder.Design.MaxVisibleItems(Random.Shared.Next(-2, 8)); + // if (context.Args.Length < 1 || !int.TryParse(context.Args[0], out int vtype)) vtype = 0; + // settingsMenu.Builder.Design.SetVerticalScrollStyle(vtype switch { + // 1 => MenuVerticalScrollStyle.LinearScroll, + // 2 => MenuVerticalScrollStyle.WaitingCenter, + // _ => MenuVerticalScrollStyle.CenterFixed + // }); + + // if (context.Args.Length < 2 || !int.TryParse(context.Args[1], out int htype)) htype = 0; + // settingsMenu.Builder.Design.SetGlobalHorizontalStyle(htype switch { + // 0 => MenuHorizontalStyle.Default, + // 1 => MenuHorizontalStyle.TruncateBothEnds(26f), + // 2 => MenuHorizontalStyle.ScrollLeftFade(26f, 8, 128), + // 3 => MenuHorizontalStyle.ScrollLeftLoop(26f, 8, 128), + // 1337 => MenuHorizontalStyle.TruncateEnd(0f), + // _ => MenuHorizontalStyle.TruncateEnd(26f) + // }); + + // settingsMenu.Builder.AddButton("1. AButton", ( p ) => + // { + // player.SendMessage(MessageType.Chat, "Button"); + // }); + + // settingsMenu.Builder.AddToggle("2. Toggle", defaultValue: true, ( p, value ) => + // { + // player.SendMessage(MessageType.Chat, $"AddToggle {value}"); + // }); + + // settingsMenu.Builder.AddSlider("3. Slider", min: 0, max: 100, defaultValue: 10, step: 10, ( p, value ) => + // { + // player.SendMessage(MessageType.Chat, $"AddSlider {value}"); + // }); + + // settingsMenu.Builder.AddAsyncButton("4. AsyncButton", async ( p ) => + // { + // await Task.Delay(2000); + // }); + + // settingsMenu.Builder.AddText("5. Text"); + // settingsMenu.Builder.AddText("6. Text"); + // settingsMenu.Builder.AddText("7. Text"); + // settingsMenu.Builder.AddText("8. Text"); + // settingsMenu.Builder.AddText("9. Text"); + // settingsMenu.Builder.AddSeparator(); + // settingsMenu.Builder.AddText($"{HtmlGradient.GenerateGradientText("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", "#FFE4E1", "#FFC0CB", "#FF69B4")}", overflowStyle: MenuHorizontalStyle.TruncateEnd(26f)); + // settingsMenu.Builder.AddText($"{HtmlGradient.GenerateGradientText("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", "#FFE5CC", "#FFAB91", "#FF7043")}", overflowStyle: MenuHorizontalStyle.TruncateBothEnds(26f)); + // settingsMenu.Builder.AddText($"{HtmlGradient.GenerateGradientText("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", "#E6E6FA", "#00FFFF", "#FF1493")}", overflowStyle: MenuHorizontalStyle.ScrollRightFade(26f, 8)); + // settingsMenu.Builder.AddText($"{HtmlGradient.GenerateGradientText("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", "#AFEEEE", "#7FFFD4", "#40E0D0")}", overflowStyle: MenuHorizontalStyle.ScrollLeftLoop(26f, 8)); + // settingsMenu.Builder.AddText("12345678901234567890split12345678901234567890", overflowStyle: MenuHorizontalStyle.ScrollLeftFade(26f, 8, 128)); + // settingsMenu.Builder.AddText("一二三四五六七八九十分割一二三四五六七八九十", overflowStyle: MenuHorizontalStyle.ScrollRightLoop(26f, 8, 64)); + // settingsMenu.Builder.AddSeparator(); + // settingsMenu.Builder.AddText("Swiftlys2 向这广袤世界致以温柔问候", overflowStyle: MenuHorizontalStyle.ScrollRightLoop(26f, 8)); + // settingsMenu.Builder.AddText("Swiftlys2 からこの広大なる世界へ温かい挨拶を"); + // settingsMenu.Builder.AddText("Swiftlys2 가 이 넓은 세상에 따뜻한 인사를 전합니다"); + // settingsMenu.Builder.AddText("Swiftlys2 приветствует этот прекрасный мир"); + // settingsMenu.Builder.AddText("Swiftlys2 salută această lume minunată"); + // settingsMenu.Builder.AddText("Swiftlys2 extends warmest greetings to this wondrous world"); + // settingsMenu.Builder.AddText("Swiftlys2 sendas korajn salutojn al ĉi tiu mirinda mondo"); + // settingsMenu.Builder.AddSeparator(); + // settingsMenu.Builder.AddAsyncButton("AsyncButton|AsyncButton|AsyncButton", async ( p ) => await Task.Delay(2000)); + // settingsMenu.Builder.AddButton("Button|Button|Button|Button", ( p ) => { }); + // settingsMenu.Builder.AddChoice("Choice|Choice|Choice|Choice", ["Option 1", "Option 2", "Option 3"], "Option 1", ( p, value ) => { }, overflowStyle: MenuHorizontalStyle.TruncateEnd(8f)); + // settingsMenu.Builder.AddProgressBar("ProgressBar|ProgressBar|ProgressBar", () => (float)Random.Shared.NextDouble(), overflowStyle: MenuHorizontalStyle.ScrollLeftLoop(26f, 12)); + // settingsMenu.Builder.AddSlider("Slider|Slider|Slider|Slider", 0f, 100f, 0f, 1f, ( p, value ) => { }, overflowStyle: MenuHorizontalStyle.ScrollRightLoop(8f, 12)); + // // settingsMenu.Builder.AddSubmenu("Submenu"); + // settingsMenu.Builder.AddToggle("Toggle|Toggle|Toggle|Toggle", true, ( p, value ) => { }); + // settingsMenu.Builder.AddSeparator(); + + // Core.Menus.OpenMenu(player, settingsMenu); + // } + + // [Command("menu")] + // public void MenuCommand( ICommandContext context ) + // { + // var player = context.Sender!; + // var menu = Core.Menus.CreateMenu("Test Menu"); + + // menu.Builder + // .AddButton("Button 1", ( ctx ) => + // { + // player.SendMessage(MessageType.Chat, "You clicked Button 1"); + // }) + // .AddButton("Button 2", ( ctx ) => + // { + // player.SendMessage(MessageType.Chat, "You clicked Button 2"); + // }) + // .AddButton("Button 3", ( ctx ) => + // { + // player.SendMessage(MessageType.Chat, "You clicked Button 3"); + // }) + // .AddButton("Button 4", ( ctx ) => + // { + // player.SendMessage(MessageType.Chat, "You clicked Button 4"); + // }) + // .AddButton("Button 5", ( ctx ) => + // { + // player.SendMessage(MessageType.Chat, "You clicked Button 5"); + // }) + // .AddButton("Button 6", ( ctx ) => + // { + // player.SendMessage(MessageType.Chat, "You clicked Button 6"); + // }) + // .AddButton("Button 7", ( ctx ) => + // { + // player.SendMessage(MessageType.Chat, "You clicked Button 7"); + // }) + // .AddButton("Button 8", ( ctx ) => + // { + // player.SendMessage(MessageType.Chat, "You clicked Button 8"); + // }) + // .AddSeparator() + // .AddText("hello!", size: IMenuTextSize.ExtraLarge) + // .AutoClose(15f) + // .HasSound(true) + // .ForceFreeze(); + + // menu.Builder.Design.SetColor(new(0, 186, 105, 255)); + + // Core.Menus.OpenMenu(player, menu); + // } + public override void Unload() { Console.WriteLine("TestPlugin unloaded"); diff --git a/managed/src/TestPlugin/TestPlugin.csproj b/managed/src/TestPlugin/TestPlugin.csproj index 1aceea1e1..da8249f20 100644 --- a/managed/src/TestPlugin/TestPlugin.csproj +++ b/managed/src/TestPlugin/TestPlugin.csproj @@ -1,30 +1,31 @@ - - - - net8.0 - enable - enable - true - true - true - ..\..\build\ - $(BaseOutputPath)Release\TestPlugin - TestPlugin - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + net10.0 + enable + enable + true + true + true + ..\..\build\ + $(BaseOutputPath)Release\TestPlugin + TestPlugin + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/natives/benchmark.native b/natives/benchmark.native new file mode 100644 index 000000000..32d21863c --- /dev/null +++ b/natives/benchmark.native @@ -0,0 +1,27 @@ +class Benchmark + +void VoidToVoid = void +bool GetBool = void +int32 GetInt32 = void +uint32 GetUInt32 = void +int64 GetInt64 = void +uint64 GetUInt64 = void +float GetFloat = void +double GetDouble = void +ptr GetPtr = void +bool BoolToBool = bool value +int32 Int32ToInt32 = int32 value +uint32 UInt32ToUInt32 = uint32 value +int64 Int64ToInt64 = int64 value +uint64 UInt64ToUInt64 = uint64 value +float FloatToFloat = float value +double DoubleToDouble = double value +ptr PtrToPtr = ptr value +string StringToString = string value +ptr StringToPtr = string value +int32 MultiPrimitives = ptr p1, int32 i1, float f1, bool b1, uint64 u1 +int32 MultiWithOneString = ptr p1, string s1, ptr p2, int32 i1, float f1 +void MultiWithTwoStrings = ptr p1, string s1, ptr p2, string s2, int32 i1 +void VectorToVector = ptr result, vector value +void QAngleToQAngle = ptr result, qangle value +void ComplexWithString = ptr entity, vector pos, string name, qangle angle \ No newline at end of file diff --git a/natives/engine/convars.native b/natives/engine/convars.native index 4d6912017..1656d728d 100644 --- a/natives/engine/convars.native +++ b/natives/engine/convars.native @@ -27,53 +27,15 @@ void CreateConvarString = string cvarName, int32 cvarType, uint64 cvarFlags, str void DeleteConvar = string cvarName bool ExistsConvar = string cvarName int32 GetConvarType = string cvarName -ptr GetConvarDataAddress = string cvarName -int16 GetConvarValueInt16 = string cvarName -uint16 GetConvarValueUInt16 = string cvarName -int32 GetConvarValueInt32 = string cvarName -uint32 GetConvarValueUInt32 = string cvarName -int64 GetConvarValueInt64 = string cvarName -uint64 GetConvarValueUInt64 = string cvarName -bool GetConvarValueBool = string cvarName -float GetConvarValueFloat = string cvarName -double GetConvarValueDouble = string cvarName -color GetConvarValueColor = string cvarName -vector2 GetConvarValueVector2D = string cvarName -vector GetConvarValueVector = string cvarName -vector4 GetConvarValueVector4D = string cvarName -qangle GetConvarValueQAngle = string cvarName -string GetConvarValueString = string cvarName -void SetConvarValueInt16 = string cvarName, int16 defaultValue -void SetConvarValueUInt16 = string cvarName, uint16 defaultValue -void SetConvarValueInt32 = string cvarName, int32 defaultValue -void SetConvarValueUInt32 = string cvarName, uint32 defaultValue -void SetConvarValueInt64 = string cvarName, int64 defaultValue -void SetConvarValueUInt64 = string cvarName, uint64 defaultValue -void SetConvarValueBool = string cvarName, bool defaultValue -void SetConvarValueFloat = string cvarName, float defaultValue -void SetConvarValueDouble = string cvarName, double defaultValue -void SetConvarValueColor = string cvarName, color defaultValue -void SetConvarValueVector2D = string cvarName, vector2 defaultValue -void SetConvarValueVector = string cvarName, vector defaultValue -void SetConvarValueVector4D = string cvarName, vector4 defaultValue -void SetConvarValueQAngle = string cvarName, qangle defaultValue -void SetConvarValueString = string cvarName, string defaultValue -void SetClientConvarValueInt16 = int32 playerid, string cvarName, int16 defaultValue -void SetClientConvarValueUInt16 = int32 playerid, string cvarName, uint16 defaultValue -void SetClientConvarValueInt32 = int32 playerid, string cvarName, int32 defaultValue -void SetClientConvarValueUInt32 = int32 playerid, string cvarName, uint32 defaultValue -void SetClientConvarValueInt64 = int32 playerid, string cvarName, int64 defaultValue -void SetClientConvarValueUInt64 = int32 playerid, string cvarName, uint64 defaultValue -void SetClientConvarValueBool = int32 playerid, string cvarName, bool defaultValue -void SetClientConvarValueFloat = int32 playerid, string cvarName, float defaultValue -void SetClientConvarValueDouble = int32 playerid, string cvarName, double defaultValue -void SetClientConvarValueColor = int32 playerid, string cvarName, color defaultValue -void SetClientConvarValueVector2D = int32 playerid, string cvarName, vector2 defaultValue -void SetClientConvarValueVector = int32 playerid, string cvarName, vector defaultValue -void SetClientConvarValueVector4D = int32 playerid, string cvarName, vector4 defaultValue -void SetClientConvarValueQAngle = int32 playerid, string cvarName, qangle defaultValue void SetClientConvarValueString = int32 playerid, string cvarName, string defaultValue -void AddFlags = string cvarName, uint64 flags -void RemoveFlags = string cvarName, uint64 flags -void ClearFlags = string cvarName -uint64 GetFlags = string cvarName \ No newline at end of file +uint64 GetFlags = string cvarName +void SetFlags = string cvarName, uint64 flags +ptr GetMinValuePtrPtr = string cvarName +ptr GetMaxValuePtrPtr = string cvarName +bool HasDefaultValue = string cvarName +ptr GetDefaultValuePtr = string cvarName +void SetDefaultValue = string cvarName, ptr defaultValue +void SetDefaultValueString = string cvarName, string defaultValue +ptr GetValuePtr = string cvarName +void SetValuePtr = string cvarName, ptr value +void SetValueInternalPtr = string cvarName, ptr value \ No newline at end of file diff --git a/natives/engine/filesystem.native b/natives/engine/filesystem.native new file mode 100644 index 000000000..5aa6a9fdc --- /dev/null +++ b/natives/engine/filesystem.native @@ -0,0 +1,14 @@ +class FileSystem + +string GetSearchPath = string pathId, int32 searchPathType, int32 searchPathsToGet +void AddSearchPath = string path, string pathId, int32 searchPathAdd, int32 searchPathPriority +bool RemoveSearchPath = string path, string pathId +bool FileExists = string fileName, string pathId +bool IsDirectory = string path, string pathId +void PrintSearchPaths = void +string ReadFile = string fileName, string pathId +bool WriteFile = string fileName, string pathId, string content +uint32 GetFileSize = string fileName, string pathId +bool PrecacheFile = string fileName, string pathId +bool IsFileWritable = string fileName, string pathId +bool SetFileWritable = string fileName, string pathId, bool writable \ No newline at end of file diff --git a/natives/engine/helpers.native b/natives/engine/helpers.native index e28af9db3..296a4fcf5 100644 --- a/natives/engine/helpers.native +++ b/natives/engine/helpers.native @@ -1,5 +1,6 @@ class EngineHelpers +string GetIP = void bool IsMapValid = string map_name // it can be map name, or workshop id void ExecuteCommand = string command ptr FindGameSystemByName = string name diff --git a/natives/memory/helpers.native b/natives/memory/helpers.native index aabdca363..32c1bbfb3 100644 --- a/natives/memory/helpers.native +++ b/natives/memory/helpers.native @@ -2,4 +2,7 @@ class MemoryHelpers ptr FetchInterfaceByName = string ifaceName // supports both internal interface system, but also valve interface system ptr GetVirtualTableAddress = string library, string vtableName -ptr GetAddressBySignature = string library, string sig, int32 len, bool rawBytes \ No newline at end of file +ptr GetAddressBySignature = string library, string sig, int32 len, bool rawBytes +string GetObjectPtrVtableName = ptr objptr +bool ObjectPtrHasVtable = ptr objptr +bool ObjectPtrHasBaseClass = ptr objptr, string baseClassName \ No newline at end of file diff --git a/natives/server/player.native b/natives/server/player.native index 17e396c23..30ae29fc5 100644 --- a/natives/server/player.native +++ b/natives/server/player.native @@ -1,6 +1,6 @@ class Player -void SendMessage = int32 playerid, int32 kind, string message +void SendMessage = int32 playerid, int32 kind, string message, int32 htmlDuration bool IsFakeClient = int32 playerid bool IsAuthorized = int32 playerid uint32 GetConnectedTime = int32 playerid diff --git a/natives/server/playermanager.native b/natives/server/playermanager.native index 241c0fba5..2007d46a9 100644 --- a/natives/server/playermanager.native +++ b/natives/server/playermanager.native @@ -3,6 +3,6 @@ class PlayerManager bool IsPlayerOnline = int32 playerid int32 GetPlayerCount = void int32 GetPlayerCap = void -void SendMessage = int32 kind, string message +void SendMessage = int32 kind, string message, int32 duration void ShouldBlockTransmitEntity = int32 entityidx, bool shouldBlockTransmit void ClearAllBlockedTransmitEntity = void \ No newline at end of file diff --git a/plugin_files/configs/core.example.jsonc b/plugin_files/configs/core.example.jsonc index 4dddb9b7f..f2a5ac9f3 100644 --- a/plugin_files/configs/core.example.jsonc +++ b/plugin_files/configs/core.example.jsonc @@ -22,11 +22,11 @@ "Use": "e" }, "InputMode": "button", - "KindSettings": { - "Center": { - "ItemsPerPage": 4 - } - }, + // "KindSettings": { + // "Center": { + // "ItemsPerPage": 4 + // } + // }, "NavigationPrefix": "➤", "Sound": { "Exit": { @@ -41,7 +41,8 @@ "Name": "Vote.Cast.Yes", "Volume": 0.75 } - } + }, + "ItemsPerPage": 5 }, "PatchesToPerform": [], "SteamAuth": { diff --git a/plugin_files/gamedata/cs2/core/offsets.jsonc b/plugin_files/gamedata/cs2/core/offsets.jsonc index 774b2b328..1a22868b4 100644 --- a/plugin_files/gamedata/cs2/core/offsets.jsonc +++ b/plugin_files/gamedata/cs2/core/offsets.jsonc @@ -140,22 +140,6 @@ "windows": 12, "linux": 13 }, - "IEngineServiceMgr::RegisterLoopMode": { - "windows": 13, - "linux": 13 - }, - "IEngineServiceMgr::UnregisterLoopMode": { - "windows": 14, - "linux": 14 - }, - "ILoopModeFactory::CreateLoopMode": { - "windows": 2, - "linux": 2 - }, - "ILoopModeFactory::DestroyLoopMode": { - "windows": 3, - "linux": 3 - }, "ILoopMode::LoopInit": { "windows": 0, "linux": 0 diff --git a/protobufs/cs2/cs_gameevents.proto b/protobufs/cs2/cs_gameevents.proto index e9c35c458..4277df8c7 100644 --- a/protobufs/cs2/cs_gameevents.proto +++ b/protobufs/cs2/cs_gameevents.proto @@ -4,6 +4,7 @@ enum ECsgoGameEvents { GE_PlayerAnimEventId = 450; GE_RadioIconEventId = 451; GE_FireBulletsId = 452; + GE_PlayerBulletHitId = 453; } message CMsgTEPlayerAnimEvent { @@ -43,5 +44,18 @@ message CMsgTEFireBullets { optional .CMsgVector ent_origin = 13; optional uint32 num_bullets_remaining = 14; optional uint32 attack_type = 15; + optional bool player_inair = 17; + optional bool player_scoped = 18; + optional int32 tick = 19; optional .CMsgTEFireBullets.Extra extra = 16; } + +message CMsgPlayerBulletHit { + optional int32 attacker_slot = 1 [default = -1]; + optional int32 victim_slot = 2 [default = -1]; + optional .CMsgVector victim_pos = 3; + optional int32 hit_group = 4; + optional int32 damage = 5; + optional int32 penetration_count = 6; + optional bool is_kill = 7; +} diff --git a/protobufs/cs2/cstrike15_gcmessages.proto b/protobufs/cs2/cstrike15_gcmessages.proto index 221fa475b..0185ec830 100644 --- a/protobufs/cs2/cstrike15_gcmessages.proto +++ b/protobufs/cs2/cstrike15_gcmessages.proto @@ -924,6 +924,7 @@ message CEconItemPreviewDataBlock { optional float offset_z = 9; optional uint32 pattern = 10; optional uint32 highlight_reel = 11; + optional uint32 wrapped_sticker = 12; } optional uint32 accountid = 1; diff --git a/protobufs/cs2/econ_gcmessages.proto b/protobufs/cs2/econ_gcmessages.proto index 42d0aa1fd..ebcc3ce61 100644 --- a/protobufs/cs2/econ_gcmessages.proto +++ b/protobufs/cs2/econ_gcmessages.proto @@ -186,6 +186,8 @@ enum EGCItemCustomizationNotification { k_EGCItemCustomizationNotification_NameBaseItem = 1019; k_EGCItemCustomizationNotification_RemoveItemName = 1030; k_EGCItemCustomizationNotification_RemoveSticker = 1053; + k_EGCItemCustomizationNotification_ExtractSticker = 1054; + k_EGCItemCustomizationNotification_EncapsulateSticker = 1055; k_EGCItemCustomizationNotification_ApplySticker = 1086; k_EGCItemCustomizationNotification_StatTrakSwap = 1088; k_EGCItemCustomizationNotification_RemovePatch = 1089; diff --git a/src/api/engine/convars/convars.h b/src/api/engine/convars/convars.h index caccd37bb..8b27fc554 100644 --- a/src/api/engine/convars/convars.h +++ b/src/api/engine/convars/convars.h @@ -51,7 +51,7 @@ class IConvarManager virtual ConvarValue GetConvarValue(std::string cvar_name) = 0; virtual void SetConvarValue(std::string cvar_name, ConvarValue value) = 0; - virtual void SetClientConvar(int playerid, std::string cvar_name, ConvarValue value) = 0; + virtual void SetClientConvar(int playerid, const std::string& cvar_name, const std::string& value) = 0; virtual void AddFlags(std::string cvar_name, uint64_t flags) = 0; virtual void RemoveFlags(std::string cvar_name, uint64_t flags) = 0; diff --git a/src/api/server/players/manager.h b/src/api/server/players/manager.h index d00c551d8..054f58ff5 100644 --- a/src/api/server/players/manager.h +++ b/src/api/server/players/manager.h @@ -37,7 +37,7 @@ class IPlayerManager virtual int GetPlayerCount() = 0; virtual int GetPlayerCap() = 0; - virtual void SendMsg(MessageType type, const std::string& message) = 0; + virtual void SendMsg(MessageType type, const std::string& message, int duration) = 0; virtual void SteamAPIServerActivated() = 0; }; diff --git a/src/api/server/players/player.h b/src/api/server/players/player.h index d8284ecbc..4515e5556 100644 --- a/src/api/server/players/player.h +++ b/src/api/server/players/player.h @@ -52,7 +52,7 @@ class IPlayer virtual void Initialize(int playerid) = 0; virtual void Shutdown() = 0; - virtual void SendMsg(MessageType type, const std::string& message) = 0; + virtual void SendMsg(MessageType type, const std::string& message, int duration) = 0; virtual bool IsFakeClient() = 0; virtual bool IsAuthorized() = 0; diff --git a/src/core/entrypoint.cpp b/src/core/entrypoint.cpp index 5bdf9416f..e7852fb48 100644 --- a/src/core/entrypoint.cpp +++ b/src/core/entrypoint.cpp @@ -17,35 +17,40 @@ ************************************************************************************************/ #include "entrypoint.h" -#include +#include "console/colors.h" #include -#include +#include #include -#include "console/colors.h" +#include #include + #include "managed/host/dynlib.h" #include "managed/host/strconv.h" -#include #include +#include #include #include + #include #include +#include #include #include -#include -#include + #include +#include + #include -#include #include +#include + #include @@ -54,27 +59,27 @@ SwiftlyCore g_SwiftlyCore; InterfacesManager g_ifaceService; +INetworkMessages* networkMessages = nullptr; + IVFunctionHook* g_pGameServerSteamAPIActivated = nullptr; IVFunctionHook* g_pGameServerSteamAPIDeactivated = nullptr; -IVFunctionHook* g_pRegisterLoopModeHook = nullptr; -IVFunctionHook* g_pUnregisterLoopModeHook = nullptr; - -IVFunctionHook* g_pCreateLoopModeHook = nullptr; -IVFunctionHook* g_pDestroyLoopModeHook = nullptr; - IVFunctionHook* g_pLoopInitHook = nullptr; IVFunctionHook* g_pLoopShutdownHook = nullptr; +// // Simple benchmark function for P/Invoke testing +// #ifdef _WIN32 +// extern "C" __declspec(dllexport) int32_t SwiftlyS2_Benchmark_PInvoke() +// #else +// extern "C" __attribute__((visibility("default"))) int32_t SwiftlyS2_Benchmark_PInvoke() +// #endif +// { +// return 1337; +// } + void GameServerSteamAPIActivatedHook(void* _this); void GameServerSteamAPIDeactivatedHook(void* _this); -void RegisterLoopModeHook(void* _this, const char* loopModeName, void* factory, void** ppGlobalPtr); -void UnregisterLoopModeHook(void* _this, const char* loopModeName, void* factory, void** ppGlobalPtr); - -void* CreateLoopModeHook(void* _this); -void DestroyLoopModeHook(void* _this, void* loopmode); - bool LoopInitHook(void* _this, KeyValues* pKeyValues, void* pRegistry); void LoopShutdownHook(void* _this); @@ -86,31 +91,45 @@ bool SwiftlyCore::Load(BridgeKind_t kind) SetupConsoleColors(); s2binlib_initialize(Plat_GetGameDirectory(), "csgo"); - s2binlib_set_module_base_from_pointer("server", g_ifaceService.FetchInterface(INTERFACEVERSION_SERVERGAMEDLL)); - s2binlib_set_module_base_from_pointer("engine2", g_ifaceService.FetchInterface(INTERFACEVERSION_VENGINESERVER)); + +#ifdef _WIN32 + void* libServer = load_library((const char_t*)WIN_LINUX(StringWide((Plat_GetGameDirectory() + std::string("\\csgo\\bin\\win64\\server.dll"))).c_str(), (Plat_GetGameDirectory() + std::string("/csgo/bin/linuxsteamrt64/libserver.so")).c_str())); + + void* libEngine = load_library((const char_t*)WIN_LINUX(StringWide(Plat_GetGameDirectory() + std::string("\\bin\\win64\\engine2.dll")).c_str(), (Plat_GetGameDirectory() + std::string("/bin/linuxsteamrt64/libengine2.so")).c_str())); + + s2binlib_set_module_base_from_pointer("server", libServer); + s2binlib_set_module_base_from_pointer("engine2", libEngine); +#endif auto cvars = g_ifaceService.FetchInterface(CVAR_INTERFACE_VERSION); g_pCVar = cvars; ConVar_Register(FCVAR_RELEASE | FCVAR_SERVER_CAN_EXECUTE | FCVAR_CLIENT_CAN_EXECUTE | FCVAR_GAMEDLL, nullptr, nullptr); + networkMessages = g_ifaceService.FetchInterface(NETWORKMESSAGES_INTERFACE_VERSION); + auto logger = g_ifaceService.FetchInterface(LOGGER_INTERFACE_VERSION); - if (GetCurrentGame() == "unknown") { + if (GetCurrentGame() == "unknown") + { auto engine = g_ifaceService.FetchInterface(INTERFACEVERSION_VENGINESERVER); - if (engine) logger->Error("Entrypoint", fmt::format("Unknown game detected. App ID: {}", engine->GetAppID())); - else logger->Error("Entrypoint", "Unknown game detected. No engine interface available."); + if (engine) + logger->Error("Entrypoint", fmt::format("Unknown game detected. App ID: {}", engine->GetAppID())); + else + logger->Error("Entrypoint", "Unknown game detected. No engine interface available."); return false; } m_sCorePath = CommandLine()->ParmValue(CUtlStringToken("-sw_path"), WIN_LINUX("addons\\swiftlys2", "addons/swiftlys2")); - if (!ends_with(m_sCorePath, WIN_LINUX("\\", "/"))) m_sCorePath += WIN_LINUX("\\", "/"); + if (!ends_with(m_sCorePath, WIN_LINUX("\\", "/"))) + m_sCorePath += WIN_LINUX("\\", "/"); auto configuration = g_ifaceService.FetchInterface(CONFIGURATION_INTERFACE_VERSION); configuration->InitializeExamples(); - if (!configuration->Load()) { + if (!configuration->Load()) + { logger->Error("Entrypoint", "Couldn't load the core configuration."); return false; } @@ -124,14 +143,18 @@ bool SwiftlyCore::Load(BridgeKind_t kind) gamedata->GetSignatures()->Load(GetCurrentGame()); gamedata->GetPatches()->Load(GetCurrentGame()); - if (std::string* s = std::get_if(&configuration->GetValue("core.PatchesToPerform"))) { + if (std::string* s = std::get_if(&configuration->GetValue("core.PatchesToPerform"))) + { auto patches = explodeToSet(*s, " "); - for (const auto& patch : patches) { - if (gamedata->GetPatches()->Exists(patch)) { + for (const auto& patch : patches) + { + if (gamedata->GetPatches()->Exists(patch)) + { gamedata->GetPatches()->Apply(patch); logger->Info("Patching", fmt::format("Applied patch: {}", patch)); } - else { + else + { logger->Warning("Patching", fmt::format("Couldn't find patch: {}", patch)); } } @@ -140,7 +163,8 @@ bool SwiftlyCore::Load(BridgeKind_t kind) auto consoleoutput = g_ifaceService.FetchInterface(CONSOLEOUTPUT_INTERFACE_VERSION); consoleoutput->Initialize(); if (bool* b = std::get_if(&configuration->GetValue("core.ConsoleFilter"))) - if (*b) consoleoutput->ToggleFilter(); + if (*b) + consoleoutput->ToggleFilter(); auto entsystem = g_ifaceService.FetchInterface(ENTITYSYSTEM_INTERFACE_VERSION); entsystem->Initialize(); @@ -151,7 +175,8 @@ bool SwiftlyCore::Load(BridgeKind_t kind) auto evmanager = g_ifaceService.FetchInterface(GAMEEVENTMANAGER_INTERFACE_VERSION); evmanager->Initialize(GetCurrentGame()); - if (!InitGameSystem()) { + if (!InitGameSystem()) + { logger->Error("Game System", "Couldn't initialize the Game System.\n"); return false; } @@ -174,16 +199,16 @@ bool SwiftlyCore::Load(BridgeKind_t kind) auto hooksmanager = g_ifaceService.FetchInterface(HOOKSMANAGER_INTERFACE_VERSION); hooksmanager->Initialize(); - void* engineservicemgr = nullptr; - s2binlib_find_vtable("engine2", "CEngineServiceMgr", &engineservicemgr); + void* loopmodeLevelLoad = nullptr; + s2binlib_find_vtable("engine2", "CLoopModeLevelLoad", &loopmodeLevelLoad); - g_pRegisterLoopModeHook = hooksmanager->CreateVFunctionHook(); - g_pRegisterLoopModeHook->SetHookFunction(engineservicemgr, gamedata->GetOffsets()->Fetch("IEngineServiceMgr::RegisterLoopMode"), (void*)RegisterLoopModeHook, true); - g_pRegisterLoopModeHook->Enable(); + g_pLoopInitHook = hooksmanager->CreateVFunctionHook(); + g_pLoopInitHook->SetHookFunction(loopmodeLevelLoad, gamedata->GetOffsets()->Fetch("ILoopMode::LoopInit"), (void*)LoopInitHook, true); + g_pLoopInitHook->Enable(); - g_pUnregisterLoopModeHook = hooksmanager->CreateVFunctionHook(); - g_pUnregisterLoopModeHook->SetHookFunction(engineservicemgr, gamedata->GetOffsets()->Fetch("IEngineServiceMgr::UnregisterLoopMode"), (void*)UnregisterLoopModeHook, true); - g_pUnregisterLoopModeHook->Enable(); + g_pLoopShutdownHook = hooksmanager->CreateVFunctionHook(); + g_pLoopShutdownHook->SetHookFunction(loopmodeLevelLoad, gamedata->GetOffsets()->Fetch("ILoopMode::LoopShutdown"), (void*)LoopShutdownHook, true); + g_pLoopShutdownHook->Enable(); void* servervtable = nullptr; s2binlib_find_vtable("server", "CSource2Server", &servervtable); @@ -276,87 +301,6 @@ void GameServerSteamAPIDeactivatedHook(void* _this) return reinterpret_cast(g_pGameServerSteamAPIDeactivated->GetOriginal())(_this); } -void RegisterLoopModeHook(void* _this, const char* loopModeName, void* factory, void** ppGlobalPtr) -{ - if (std::string(loopModeName) == "game") - { - auto hooksmanager = g_ifaceService.FetchInterface(HOOKSMANAGER_INTERFACE_VERSION); - auto gamedata = g_ifaceService.FetchInterface(GAMEDATA_INTERFACE_VERSION); - - g_pCreateLoopModeHook = hooksmanager->CreateVFunctionHook(); - g_pCreateLoopModeHook->SetHookFunction(factory, gamedata->GetOffsets()->Fetch("ILoopModeFactory::CreateLoopMode"), (void*)CreateLoopModeHook, false); - g_pCreateLoopModeHook->Enable(); - - g_pDestroyLoopModeHook = hooksmanager->CreateVFunctionHook(); - g_pDestroyLoopModeHook->SetHookFunction(factory, gamedata->GetOffsets()->Fetch("ILoopModeFactory::DestroyLoopMode"), (void*)DestroyLoopModeHook, false); - g_pDestroyLoopModeHook->Enable(); - } - - return reinterpret_cast(g_pRegisterLoopModeHook->GetOriginal())(_this, loopModeName, factory, ppGlobalPtr); -} - -void UnregisterLoopModeHook(void* _this, const char* loopModeName, void* factory, void** ppGlobalPtr) -{ - if (std::string(loopModeName) == "game") - { - auto hooksmanager = g_ifaceService.FetchInterface(HOOKSMANAGER_INTERFACE_VERSION); - if (g_pCreateLoopModeHook) - { - g_pCreateLoopModeHook->Disable(); - hooksmanager->DestroyVFunctionHook(g_pCreateLoopModeHook); - g_pCreateLoopModeHook = nullptr; - } - - if (g_pDestroyLoopModeHook) - { - g_pDestroyLoopModeHook->Disable(); - hooksmanager->DestroyVFunctionHook(g_pDestroyLoopModeHook); - g_pDestroyLoopModeHook = nullptr; - } - } - - return reinterpret_cast(g_pUnregisterLoopModeHook->GetOriginal())(_this, loopModeName, factory, ppGlobalPtr); -} - -void* CreateLoopModeHook(void* _this) -{ - void* ret = reinterpret_cast(g_pCreateLoopModeHook->GetOriginal())(_this); - - auto hooksmanager = g_ifaceService.FetchInterface(HOOKSMANAGER_INTERFACE_VERSION); - auto gamedata = g_ifaceService.FetchInterface(GAMEDATA_INTERFACE_VERSION); - - g_pLoopInitHook = hooksmanager->CreateVFunctionHook(); - g_pLoopInitHook->SetHookFunction(ret, gamedata->GetOffsets()->Fetch("ILoopMode::LoopInit"), (void*)LoopInitHook, false); - g_pLoopInitHook->Enable(); - - g_pLoopShutdownHook = hooksmanager->CreateVFunctionHook(); - g_pLoopShutdownHook->SetHookFunction(ret, gamedata->GetOffsets()->Fetch("ILoopMode::LoopShutdown"), (void*)LoopShutdownHook, false); - g_pLoopShutdownHook->Enable(); - - return ret; -} - -void DestroyLoopModeHook(void* _this, void* loopmode) -{ - auto hooksmanager = g_ifaceService.FetchInterface(HOOKSMANAGER_INTERFACE_VERSION); - - if (g_pLoopInitHook) - { - g_pLoopInitHook->Disable(); - hooksmanager->DestroyVFunctionHook(g_pLoopInitHook); - g_pLoopInitHook = nullptr; - } - - if (g_pLoopShutdownHook) - { - g_pLoopShutdownHook->Disable(); - hooksmanager->DestroyVFunctionHook(g_pLoopShutdownHook); - g_pLoopShutdownHook = nullptr; - } - - return reinterpret_cast(g_pDestroyLoopModeHook->GetOriginal())(_this, loopmode); -} - bool LoopInitHook(void* _this, KeyValues* pKeyValues, void* pRegistry) { bool ret = reinterpret_cast(g_pLoopInitHook->GetOriginal())(_this, pKeyValues, pRegistry); @@ -382,13 +326,13 @@ void SwiftlyCore::OnMapLoad(std::string map_name) current_map = map_name; if (g_pOnMapLoadCallback) - reinterpret_cast(g_pOnMapLoadCallback)(map_name.c_str()); + reinterpret_cast(g_pOnMapLoadCallback)(map_name.c_str()); } void SwiftlyCore::OnMapUnload() { if (g_pOnMapUnloadCallback) - reinterpret_cast(g_pOnMapUnloadCallback)(current_map.c_str()); + reinterpret_cast(g_pOnMapUnloadCallback)(current_map.c_str()); current_map = ""; } @@ -403,63 +347,39 @@ void* SwiftlyCore::GetInterface(const std::string& interface_name) void* ifaceptr = nullptr; void* ifaceCreate = nullptr; - if (INTERFACEVERSION_SERVERGAMEDLL == interface_name || INTERFACEVERSION_SERVERGAMECLIENTS == interface_name || SOURCE2GAMEENTITIES_INTERFACE_VERSION == interface_name) { - void* lib = load_library( - (const char_t*)WIN_LINUX( - StringWide((Plat_GetGameDirectory() + std::string("\\csgo\\bin\\win64\\server.dll"))).c_str(), - (Plat_GetGameDirectory() + std::string("/csgo/bin/linuxsteamrt64/libserver.so")).c_str() - ) - ); + if (INTERFACEVERSION_SERVERGAMEDLL == interface_name || INTERFACEVERSION_SERVERGAMECLIENTS == interface_name || SOURCE2GAMEENTITIES_INTERFACE_VERSION == interface_name) + { + void* lib = load_library((const char_t*)WIN_LINUX(StringWide((Plat_GetGameDirectory() + std::string("\\csgo\\bin\\win64\\server.dll"))).c_str(), (Plat_GetGameDirectory() + std::string("/csgo/bin/linuxsteamrt64/libserver.so")).c_str())); ifaceCreate = get_export(lib, "CreateInterface"); unload_library(lib); } - else if (SCHEMASYSTEM_INTERFACE_VERSION == interface_name) { - void* lib = load_library( - (const char_t*)WIN_LINUX( - StringWide(Plat_GetGameDirectory() + std::string("\\bin\\win64\\schemasystem.dll")).c_str(), - (Plat_GetGameDirectory() + std::string("/bin/linuxsteamrt64/libschemasystem.so")).c_str() - ) - ); + else if (SCHEMASYSTEM_INTERFACE_VERSION == interface_name) + { + void* lib = load_library((const char_t*)WIN_LINUX(StringWide(Plat_GetGameDirectory() + std::string("\\bin\\win64\\schemasystem.dll")).c_str(), (Plat_GetGameDirectory() + std::string("/bin/linuxsteamrt64/libschemasystem.so")).c_str())); ifaceCreate = get_export(lib, "CreateInterface"); unload_library(lib); } - else if (CVAR_INTERFACE_VERSION == interface_name) { - void* lib = load_library( - (const char_t*)WIN_LINUX( - StringWide(Plat_GetGameDirectory() + std::string("\\bin\\win64\\tier0.dll")).c_str(), - (Plat_GetGameDirectory() + std::string("/bin/linuxsteamrt64/libtier0.so")).c_str() - ) - ); + else if (CVAR_INTERFACE_VERSION == interface_name) + { + void* lib = load_library((const char_t*)WIN_LINUX(StringWide(Plat_GetGameDirectory() + std::string("\\bin\\win64\\tier0.dll")).c_str(), (Plat_GetGameDirectory() + std::string("/bin/linuxsteamrt64/libtier0.so")).c_str())); ifaceCreate = get_export(lib, "CreateInterface"); unload_library(lib); } - else if (NETWORKMESSAGES_INTERFACE_VERSION == interface_name) { - void* lib = load_library( - (const char_t*)WIN_LINUX( - StringWide(Plat_GetGameDirectory() + std::string("\\bin\\win64\\networksystem.dll")).c_str(), - (Plat_GetGameDirectory() + std::string("/bin/linuxsteamrt64/libnetworksystem.so")).c_str() - ) - ); + else if (NETWORKMESSAGES_INTERFACE_VERSION == interface_name || NETWORKSYSTEM_INTERFACE_VERSION == interface_name) + { + void* lib = load_library((const char_t*)WIN_LINUX(StringWide(Plat_GetGameDirectory() + std::string("\\bin\\win64\\networksystem.dll")).c_str(), (Plat_GetGameDirectory() + std::string("/bin/linuxsteamrt64/libnetworksystem.so")).c_str())); ifaceCreate = get_export(lib, "CreateInterface"); unload_library(lib); } - else if (SOUNDSYSTEM_INTERFACE_VERSION == interface_name || SOUNDOPSYSTEM_INTERFACE_VERSION == interface_name) { - void* lib = load_library( - (const char_t*)WIN_LINUX( - StringWide(Plat_GetGameDirectory() + std::string("\\bin\\win64\\soundsystem.dll")).c_str(), - (Plat_GetGameDirectory() + std::string("/bin/linuxsteamrt64/libsoundsystem.so")).c_str() - ) - ); + else if (SOUNDSYSTEM_INTERFACE_VERSION == interface_name || SOUNDOPSYSTEM_INTERFACE_VERSION == interface_name) + { + void* lib = load_library((const char_t*)WIN_LINUX(StringWide(Plat_GetGameDirectory() + std::string("\\bin\\win64\\soundsystem.dll")).c_str(), (Plat_GetGameDirectory() + std::string("/bin/linuxsteamrt64/libsoundsystem.so")).c_str())); ifaceCreate = get_export(lib, "CreateInterface"); unload_library(lib); } - else { - void* lib = load_library( - (const char_t*)WIN_LINUX( - StringWide(Plat_GetGameDirectory() + std::string("\\bin\\win64\\engine2.dll")).c_str(), - (Plat_GetGameDirectory() + std::string("/bin/linuxsteamrt64/libengine2.so")).c_str() - ) - ); + else + { + void* lib = load_library((const char_t*)WIN_LINUX(StringWide(Plat_GetGameDirectory() + std::string("\\bin\\win64\\engine2.dll")).c_str(), (Plat_GetGameDirectory() + std::string("/bin/linuxsteamrt64/libengine2.so")).c_str())); ifaceCreate = get_export(lib, "CreateInterface"); unload_library(lib); } @@ -469,7 +389,8 @@ void* SwiftlyCore::GetInterface(const std::string& interface_name) ifaceptr = reinterpret_cast(ifaceCreate)(interface_name.c_str(), nullptr); } - if (ifaceptr != nullptr) g_mInterfacesCache.insert({ interface_name, ifaceptr }); + if (ifaceptr != nullptr) + g_mInterfacesCache.insert({interface_name, ifaceptr}); return ifaceptr; } @@ -482,22 +403,30 @@ void SwiftlyCore::SendConsoleMessage(const std::string& message) std::string SwiftlyCore::GetCurrentGame() { auto engine = g_ifaceService.FetchInterface(INTERFACEVERSION_VENGINESERVER); - if (!engine) return "unknown"; + if (!engine) + return "unknown"; - switch (engine->GetAppID()) { - case 730: return "cs2"; - default: return "unknown"; + switch (engine->GetAppID()) + { + case 730: + return "cs2"; + default: + return "unknown"; } } int SwiftlyCore::GetMaxGameClients() { auto engine = g_ifaceService.FetchInterface(INTERFACEVERSION_VENGINESERVER); - if (!engine) return 0; + if (!engine) + return 0; - switch (engine->GetAppID()) { - case 730: return 64; - default: return 0; + switch (engine->GetAppID()) + { + case 730: + return 64; + default: + return 0; } } diff --git a/src/core/managed/libs/dotnet/coreclr_delegates.h b/src/core/managed/libs/dotnet/coreclr_delegates.h index e972b5c61..1a175803e 100644 --- a/src/core/managed/libs/dotnet/coreclr_delegates.h +++ b/src/core/managed/libs/dotnet/coreclr_delegates.h @@ -1,12 +1,17 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#ifndef __CORECLR_DELEGATES_H__ -#define __CORECLR_DELEGATES_H__ +#ifndef HAVE_CORECLR_DELEGATES_H +#define HAVE_CORECLR_DELEGATES_H #include #include +#ifdef __cplusplus +extern "C" +{ +#endif + #if defined(_WIN32) #define CORECLR_DELEGATE_CALLTYPE __stdcall #ifdef _WCHAR_T_DEFINED @@ -58,4 +63,8 @@ typedef int (CORECLR_DELEGATE_CALLTYPE *load_assembly_bytes_fn)( void *load_context /* Extensibility parameter (currently unused and must be 0) */, void *reserved /* Extensibility parameter (currently unused and must be 0) */); -#endif // __CORECLR_DELEGATES_H__ +#ifdef __cplusplus +} +#endif // __cplusplus + +#endif // HAVE_CORECLR_DELEGATES_H diff --git a/src/core/managed/libs/dotnet/hostfxr.h b/src/core/managed/libs/dotnet/hostfxr.h index a19636b9e..3b203a894 100644 --- a/src/core/managed/libs/dotnet/hostfxr.h +++ b/src/core/managed/libs/dotnet/hostfxr.h @@ -1,12 +1,17 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#ifndef __HOSTFXR_H__ -#define __HOSTFXR_H__ +#ifndef HAVE_HOSTFXR_H +#define HAVE_HOSTFXR_H #include #include +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + #if defined(_WIN32) #define HOSTFXR_CALLTYPE __cdecl #ifdef _WCHAR_T_DEFINED @@ -130,7 +135,7 @@ typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_initialize_for_dotnet_command_line_fn) // Success - Hosting components were successfully initialized // Success_HostAlreadyInitialized - Config is compatible with already initialized hosting components // Success_DifferentRuntimeProperties - Config has runtime properties that differ from already initialized hosting components -// CoreHostIncompatibleConfig - Config is incompatible with already initialized hosting components +// HostIncompatibleConfig - Config is incompatible with already initialized hosting components // // This function will process the .runtimeconfig.json to resolve frameworks and prepare everything needed // to load the runtime. It will only process the .deps.json from frameworks (not any app/component that @@ -296,10 +301,6 @@ struct hostfxr_dotnet_environment_sdk_info const char_t* path; }; -typedef void(HOSTFXR_CALLTYPE* hostfxr_get_dotnet_environment_info_result_fn)( - const struct hostfxr_dotnet_environment_info* info, - void* result_context); - struct hostfxr_dotnet_environment_framework_info { size_t size; @@ -322,6 +323,10 @@ struct hostfxr_dotnet_environment_info const struct hostfxr_dotnet_environment_framework_info* frameworks; }; +typedef void(HOSTFXR_CALLTYPE* hostfxr_get_dotnet_environment_info_result_fn)( + const struct hostfxr_dotnet_environment_info* info, + void* result_context); + // // Returns available SDKs and frameworks. // @@ -355,7 +360,7 @@ struct hostfxr_dotnet_environment_info // // String encoding: // Windows - UTF-16 (pal::char_t is 2 byte wchar_t) -// Unix - UTF-8 (pal::char_t is 1 byte char) +// Non-Windows - UTF-8 (pal::char_t is 1 byte char) // typedef int32_t(HOSTFXR_CALLTYPE* hostfxr_get_dotnet_environment_info_fn)( const char_t* dotnet_root, @@ -363,4 +368,60 @@ typedef int32_t(HOSTFXR_CALLTYPE* hostfxr_get_dotnet_environment_info_fn)( hostfxr_get_dotnet_environment_info_result_fn result, void* result_context); -#endif //__HOSTFXR_H__ +struct hostfxr_framework_result +{ + size_t size; + const char_t* name; + const char_t* requested_version; + const char_t* resolved_version; + const char_t* resolved_path; +}; + +struct hostfxr_resolve_frameworks_result +{ + size_t size; + + size_t resolved_count; + const struct hostfxr_framework_result* resolved_frameworks; + + size_t unresolved_count; + const struct hostfxr_framework_result* unresolved_frameworks; +}; + +typedef void (HOSTFXR_CALLTYPE* hostfxr_resolve_frameworks_result_fn)( + const struct hostfxr_resolve_frameworks_result* result, + void* result_context); + +// +// Resolves frameworks for a runtime config +// +// Parameters: +// runtime_config_path +// Path to the .runtimeconfig.json file +// parameters +// Optional. Additional parameters for initialization. +// If null or dotnet_root is null, the root corresponding to the running hostfx is used. +// callback +// Optional. Result callback invoked with result of the resolution. +// Structs and their elements are valid for the duration of the call. +// result_context +// Optional. Additional context passed to the result callback. +// +// Return value: +// 0 on success, otherwise failure. +// +// String encoding: +// Windows - UTF-16 (pal::char_t is 2-byte wchar_t) +// Non-Windows - UTF-8 (pal::char_t is 1-byte char) +// +typedef int32_t(HOSTFXR_CALLTYPE* hostfxr_resolve_frameworks_for_runtime_config_fn)( + const char_t* runtime_config_path, + /*opt*/ const struct hostfxr_initialize_parameters* parameters, + /*opt*/ hostfxr_resolve_frameworks_result_fn callback, + /*opt*/ void* result_context); + +#ifdef __cplusplus +} +#endif // __cplusplus + +#endif // HAVE_HOSTFXR_H diff --git a/src/core/managed/libs/dotnet/linuxsteamrt64/libhostfxr.so b/src/core/managed/libs/dotnet/linuxsteamrt64/libhostfxr.so index 339827ea9..f98028432 100644 Binary files a/src/core/managed/libs/dotnet/linuxsteamrt64/libhostfxr.so and b/src/core/managed/libs/dotnet/linuxsteamrt64/libhostfxr.so differ diff --git a/src/core/managed/libs/dotnet/linuxsteamrt64/libnethost.a b/src/core/managed/libs/dotnet/linuxsteamrt64/libnethost.a index ccee00428..502c04683 100644 Binary files a/src/core/managed/libs/dotnet/linuxsteamrt64/libnethost.a and b/src/core/managed/libs/dotnet/linuxsteamrt64/libnethost.a differ diff --git a/src/core/managed/libs/dotnet/nethost.h b/src/core/managed/libs/dotnet/nethost.h index eaca17535..ef420e81b 100644 --- a/src/core/managed/libs/dotnet/nethost.h +++ b/src/core/managed/libs/dotnet/nethost.h @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#ifndef __NETHOST_H__ -#define __NETHOST_H__ +#ifndef HAVE_NETHOST_H +#define HAVE_NETHOST_H #include @@ -37,7 +37,8 @@ #endif #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif // Parameters for get_hostfxr_path @@ -93,7 +94,7 @@ NETHOST_API int NETHOST_CALLTYPE get_hostfxr_path( const struct get_hostfxr_parameters *parameters); #ifdef __cplusplus -} // extern "C" -#endif +} +#endif // __cplusplus -#endif // __NETHOST_H__ +#endif // HAVE_NETHOST_H diff --git a/src/core/managed/libs/dotnet/win64/hostfxr.dll b/src/core/managed/libs/dotnet/win64/hostfxr.dll index bed0e6fe0..d13f87e5c 100644 Binary files a/src/core/managed/libs/dotnet/win64/hostfxr.dll and b/src/core/managed/libs/dotnet/win64/hostfxr.dll differ diff --git a/src/core/managed/libs/dotnet/win64/libnethost.lib b/src/core/managed/libs/dotnet/win64/libnethost.lib index 14bf3bfa8..cc5a96ca6 100644 Binary files a/src/core/managed/libs/dotnet/win64/libnethost.lib and b/src/core/managed/libs/dotnet/win64/libnethost.lib differ diff --git a/src/engine/consoleoutput/consoleoutput.cpp b/src/engine/consoleoutput/consoleoutput.cpp index 4366e467d..0ae0d82ad 100644 --- a/src/engine/consoleoutput/consoleoutput.cpp +++ b/src/engine/consoleoutput/consoleoutput.cpp @@ -124,7 +124,6 @@ bool CConsoleOutput::IsEnabled() bool CConsoleOutput::NeedsFiltering(const std::string& text) { if (!IsEnabled()) return false; - if (text == "\n") return true; PCRE2_SPTR str = (PCRE2_SPTR)(text.c_str()); int len = text.size(); diff --git a/src/engine/convars/convars.cpp b/src/engine/convars/convars.cpp index 8e355c800..a78c9a694 100644 --- a/src/engine/convars/convars.cpp +++ b/src/engine/convars/convars.cpp @@ -74,6 +74,8 @@ uint64_t g_uCreatedConCommandId = 0; IVFunctionHook* g_pProcessRespondCvarValueHook = nullptr; +extern INetworkMessages* networkMessages; + class CConvarListener : public IConVarListener { virtual void OnConVarCreated(ConVarRefAbstract* pNewCvar) override @@ -146,8 +148,7 @@ void CConvarManager::Shutdown() void CConvarManager::QueryClientConvar(int playerid, std::string cvar_name) { - auto networkMessages = g_ifaceService.FetchInterface(NETWORKMESSAGES_INTERFACE_VERSION); - auto gameEventSystem = g_ifaceService.FetchInterface(GAMEEVENTSYSTEM_INTERFACE_VERSION); + static auto gameEventSystem = g_ifaceService.FetchInterface(GAMEEVENTSYSTEM_INTERFACE_VERSION); auto netmsg = networkMessages->FindNetworkMessagePartial("GetCvarValue"); auto msg = netmsg->AllocateMessage()->ToPB(); @@ -496,17 +497,16 @@ void CConvarManager::SetConvarValue(std::string cvar_name, ConvarValue value) cvar.SetString(CUtlString(v_str.c_str()), server); } -void CConvarManager::SetClientConvar(int playerid, std::string cvar_name, ConvarValue value) +void CConvarManager::SetClientConvar(int playerid, const std::string& cvar_name, const std::string& value) { - auto networkMessages = g_ifaceService.FetchInterface(NETWORKMESSAGES_INTERFACE_VERSION); - auto gameEventSystem = g_ifaceService.FetchInterface(GAMEEVENTSYSTEM_INTERFACE_VERSION); + static auto gameEventSystem = g_ifaceService.FetchInterface(GAMEEVENTSYSTEM_INTERFACE_VERSION); - auto netmsg = networkMessages->FindNetworkMessagePartial("SetConVar"); + const auto netmsg = networkMessages->FindNetworkMessagePartial("SetConVar"); auto msg = netmsg->AllocateMessage()->ToPB(); CMsg_CVars_CVar* cvar = msg->mutable_convars()->add_cvars(); cvar->set_name(cvar_name); - cvar->set_value(ConvertConvarValueToString(value)); + cvar->set_value(value); CSingleRecipientFilter filter(playerid); gameEventSystem->PostEventAbstract(-1, false, &filter, netmsg, msg, 0); diff --git a/src/engine/convars/convars.h b/src/engine/convars/convars.h index 6cb4409c4..562c53b02 100644 --- a/src/engine/convars/convars.h +++ b/src/engine/convars/convars.h @@ -20,6 +20,7 @@ #define src_engine_convars_convars_h #include +#include #include class CConvarManager : public IConvarManager @@ -42,7 +43,7 @@ class CConvarManager : public IConvarManager virtual ConvarValue GetConvarValue(std::string cvar_name) override; virtual void SetConvarValue(std::string cvar_name, ConvarValue value) override; - virtual void SetClientConvar(int playerid, std::string cvar_name, ConvarValue value) override; + virtual void SetClientConvar(int playerid, const std::string& cvar_name, const std::string& value) override; virtual void AddFlags(std::string cvar_name, uint64_t flags) override; virtual void RemoveFlags(std::string cvar_name, uint64_t flags) override; diff --git a/src/engine/entities/entitysystem.cpp b/src/engine/entities/entitysystem.cpp index f4f688d0a..60215723a 100644 --- a/src/engine/entities/entitysystem.cpp +++ b/src/engine/entities/entitysystem.cpp @@ -140,22 +140,25 @@ void StartupServerHook(void* _this, const GameSessionConfiguration_t& config, IS void CEntSystem::Spawn(void* pEntity, void* pKeyValues) { static auto gamedata = g_ifaceService.FetchInterface(GAMEDATA_INTERFACE_VERSION); + static auto sig = gamedata->GetSignatures()->Fetch("CBaseEntity::DispatchSpawn"); - reinterpret_cast(gamedata->GetSignatures()->Fetch("CBaseEntity::DispatchSpawn"))(pEntity, pKeyValues); + reinterpret_cast(sig)(pEntity, pKeyValues); } void CEntSystem::Despawn(void* pEntity) { static auto gamedata = g_ifaceService.FetchInterface(GAMEDATA_INTERFACE_VERSION); + static auto sig = gamedata->GetSignatures()->Fetch("UTIL::Remove"); - reinterpret_cast(gamedata->GetSignatures()->Fetch("UTIL::Remove"))(pEntity); + reinterpret_cast(sig)(pEntity); } void* CEntSystem::CreateEntityByName(const char* name) { static auto gamedata = g_ifaceService.FetchInterface(GAMEDATA_INTERFACE_VERSION); + static auto sig = gamedata->GetSignatures()->Fetch("UTIL::CreateEntityByName"); - return reinterpret_cast(gamedata->GetSignatures()->Fetch("UTIL::CreateEntityByName"))(name, -1); + return reinterpret_cast(sig)(name, -1); } void CEntSystem::AcceptInput(void* pEntity, const char* input, void* activator, void* caller, InputType value, int outputID) @@ -182,7 +185,8 @@ void CEntSystem::AcceptInput(void* pEntity, const char* input, void* activator, else var = 0; - reinterpret_cast(gamedata->GetSignatures()->Fetch("CEntityInstance::AcceptInput"))(pEntity, input, activator, caller, &var, outputID); + static auto sig = gamedata->GetSignatures()->Fetch("CEntityInstance::AcceptInput"); + reinterpret_cast(sig)(pEntity, input, activator, caller, &var, outputID); } void CEntSystem::AddEntityIOEvent(void* pEntity, const char* input, void* activator, void* caller, InputType value, float delay) @@ -209,7 +213,8 @@ void CEntSystem::AddEntityIOEvent(void* pEntity, const char* input, void* activa else var = 0; - reinterpret_cast(gamedata->GetSignatures()->Fetch("CEntitySystem::AddEntityIOEvent"))(g_pGameEntitySystem, pEntity, input, activator, caller, &var, delay, 0, nullptr, nullptr); + static auto sig = gamedata->GetSignatures()->Fetch("CEntitySystem::AddEntityIOEvent"); + reinterpret_cast(sig)(g_pGameEntitySystem, pEntity, input, activator, caller, &var, delay, 0, nullptr, nullptr); } bool CEntSystem::IsValidEntity(void* pEntity) diff --git a/src/scripting/benchmark/benchmark.cpp b/src/scripting/benchmark/benchmark.cpp new file mode 100644 index 000000000..70998a5db --- /dev/null +++ b/src/scripting/benchmark/benchmark.cpp @@ -0,0 +1,149 @@ +/************************************************************************************************ + * SwiftlyS2 Benchmark Module + * Provides safe native functions for C# to C++ interop performance testing + * All functions are designed to be lightweight and safe for repeated calls + ************************************************************************************************/ + +#include +#include +#include +#include + +// Pattern 1 +void Bridge_Benchmark_VoidToVoid() {} + +// Pattern 2 +bool Bridge_Benchmark_GetBool() +{ + return true; +} +int32_t Bridge_Benchmark_GetInt32() +{ + return 1337; +} +uint32_t Bridge_Benchmark_GetUInt32() +{ + return 1337u; +} +int64_t Bridge_Benchmark_GetInt64() +{ + return 1337000000LL; +} +uint64_t Bridge_Benchmark_GetUInt64() +{ + return 1337000000ULL; +} +float Bridge_Benchmark_GetFloat() +{ + return 3.14f; +} +double Bridge_Benchmark_GetDouble() +{ + return 3.14159; +} +void* Bridge_Benchmark_GetPtr() +{ + return reinterpret_cast(0x1337); +} + +// Pattern 3 +bool Bridge_Benchmark_BoolToBool(bool value) +{ + return !value; +} +int32_t Bridge_Benchmark_Int32ToInt32(int32_t value) +{ + return value + 1; +} +uint32_t Bridge_Benchmark_UInt32ToUInt32(uint32_t value) +{ + return value + 1; +} +int64_t Bridge_Benchmark_Int64ToInt64(int64_t value) +{ + return value + 1; +} +uint64_t Bridge_Benchmark_UInt64ToUInt64(uint64_t value) +{ + return value + 1; +} +float Bridge_Benchmark_FloatToFloat(float value) +{ + return value + 1.0f; +} +double Bridge_Benchmark_DoubleToDouble(double value) +{ + return value + 1.0; +} +void* Bridge_Benchmark_PtrToPtr(void* value) +{ + return value; +} + +// Pattern 4 +const char* Bridge_Benchmark_StringToString(const char* value) +{ + return "test"; +} +void* Bridge_Benchmark_StringToPtr(const char* value) +{ + return reinterpret_cast(0xBEEF); +} + +// Pattern 5 +int32_t Bridge_Benchmark_MultiPrimitives(void* p1, int32_t i1, float f1, bool b1, uint64_t u1) +{ + return i1 + (int32_t)f1; +} + +// Pattern 6 +int32_t Bridge_Benchmark_MultiWithOneString(void* p1, const char* s1, void* p2, int32_t i1, float f1) +{ + return i1; +} + +// Pattern 7 +void Bridge_Benchmark_MultiWithTwoStrings(void* p1, const char* s1, void* p2, const char* s2, int32_t i1) {} + +// Pattern 8 +void Bridge_Benchmark_VectorToVector(Vector* result, Vector value) +{ + result->x = value.x + 1; + result->y = value.y + 1; + result->z = value.z + 1; +} +void Bridge_Benchmark_QAngleToQAngle(QAngle* result, QAngle value) +{ + result->x = value.x + 1; + result->y = value.y + 1; + result->z = value.z + 1; +} + +// Pattern 9 +void Bridge_Benchmark_ComplexWithString(void* entity, Vector pos, const char* name, QAngle angle) {} + +DEFINE_NATIVE("Benchmark.VoidToVoid", Bridge_Benchmark_VoidToVoid); +DEFINE_NATIVE("Benchmark.GetBool", Bridge_Benchmark_GetBool); +DEFINE_NATIVE("Benchmark.GetInt32", Bridge_Benchmark_GetInt32); +DEFINE_NATIVE("Benchmark.GetUInt32", Bridge_Benchmark_GetUInt32); +DEFINE_NATIVE("Benchmark.GetInt64", Bridge_Benchmark_GetInt64); +DEFINE_NATIVE("Benchmark.GetUInt64", Bridge_Benchmark_GetUInt64); +DEFINE_NATIVE("Benchmark.GetFloat", Bridge_Benchmark_GetFloat); +DEFINE_NATIVE("Benchmark.GetDouble", Bridge_Benchmark_GetDouble); +DEFINE_NATIVE("Benchmark.GetPtr", Bridge_Benchmark_GetPtr); +DEFINE_NATIVE("Benchmark.BoolToBool", Bridge_Benchmark_BoolToBool); +DEFINE_NATIVE("Benchmark.Int32ToInt32", Bridge_Benchmark_Int32ToInt32); +DEFINE_NATIVE("Benchmark.UInt32ToUInt32", Bridge_Benchmark_UInt32ToUInt32); +DEFINE_NATIVE("Benchmark.Int64ToInt64", Bridge_Benchmark_Int64ToInt64); +DEFINE_NATIVE("Benchmark.UInt64ToUInt64", Bridge_Benchmark_UInt64ToUInt64); +DEFINE_NATIVE("Benchmark.FloatToFloat", Bridge_Benchmark_FloatToFloat); +DEFINE_NATIVE("Benchmark.DoubleToDouble", Bridge_Benchmark_DoubleToDouble); +DEFINE_NATIVE("Benchmark.PtrToPtr", Bridge_Benchmark_PtrToPtr); +DEFINE_NATIVE("Benchmark.StringToString", Bridge_Benchmark_StringToString); +DEFINE_NATIVE("Benchmark.StringToPtr", Bridge_Benchmark_StringToPtr); +DEFINE_NATIVE("Benchmark.MultiPrimitives", Bridge_Benchmark_MultiPrimitives); +DEFINE_NATIVE("Benchmark.MultiWithOneString", Bridge_Benchmark_MultiWithOneString); +DEFINE_NATIVE("Benchmark.MultiWithTwoStrings", Bridge_Benchmark_MultiWithTwoStrings); +DEFINE_NATIVE("Benchmark.VectorToVector", Bridge_Benchmark_VectorToVector); +DEFINE_NATIVE("Benchmark.QAngleToQAngle", Bridge_Benchmark_QAngleToQAngle); +DEFINE_NATIVE("Benchmark.ComplexWithString", Bridge_Benchmark_ComplexWithString); \ No newline at end of file diff --git a/src/scripting/engine/convars.cpp b/src/scripting/engine/convars.cpp index 8d024193f..b593c5f57 100644 --- a/src/scripting/engine/convars.cpp +++ b/src/scripting/engine/convars.cpp @@ -17,6 +17,8 @@ ************************************************************************************************/ #include +#include +#include #include #include @@ -182,351 +184,121 @@ int Bridge_Convars_GetConvarType(const char* convarName) return (int)(convarmanager->GetConvarType(convarName)); } -void* Bridge_Convars_GetConvarDataAddress(const char* convarName) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return convarmanager->GetConvarDataAddress(convarName); -} - -int16_t Bridge_Convars_GetConvarValueInt16(const char* convarName) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return std::get(convarmanager->GetConvarValue(convarName)); -} - -uint16_t Bridge_Convars_GetConvarValueUInt16(const char* convarName) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return std::get(convarmanager->GetConvarValue(convarName)); -} - -int32_t Bridge_Convars_GetConvarValueInt32(const char* convarName) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return std::get(convarmanager->GetConvarValue(convarName)); -} - -uint32_t Bridge_Convars_GetConvarValueUInt32(const char* convarName) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return std::get(convarmanager->GetConvarValue(convarName)); -} - -int64_t Bridge_Convars_GetConvarValueInt64(const char* convarName) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return std::get(convarmanager->GetConvarValue(convarName)); -} - -uint64_t Bridge_Convars_GetConvarValueUInt64(const char* convarName) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return std::get(convarmanager->GetConvarValue(convarName)); -} - -bool Bridge_Convars_GetConvarValueBool(const char* convarName) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return std::get(convarmanager->GetConvarValue(convarName)); -} - -float Bridge_Convars_GetConvarValueFloat(const char* convarName) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return std::get(convarmanager->GetConvarValue(convarName)); -} - -double Bridge_Convars_GetConvarValueDouble(const char* convarName) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return std::get(convarmanager->GetConvarValue(convarName)); -} - -Color Bridge_Convars_GetConvarValueColor(const char* convarName) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return std::get(convarmanager->GetConvarValue(convarName)); -} - -Vector2D Bridge_Convars_GetConvarValueVector2D(const char* convarName) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return std::get(convarmanager->GetConvarValue(convarName)); -} - -Vector Bridge_Convars_GetConvarValueVector(const char* convarName) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return std::get(convarmanager->GetConvarValue(convarName)); -} - -Vector4D Bridge_Convars_GetConvarValueVector4D(const char* convarName) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return std::get(convarmanager->GetConvarValue(convarName)); -} - -QAngle Bridge_Convars_GetConvarValueQAngle(const char* convarName) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return std::get(convarmanager->GetConvarValue(convarName)); -} - -int Bridge_Convars_GetConvarValueString(char* out, const char* convarName, const char* value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - static std::string s; - s = std::get(convarmanager->GetConvarValue(convarName)); - - if (out != nullptr) strcpy(out, s.c_str()); - - return s.size(); -} - -void Bridge_Convars_SetConvarValueInt16(const char* convarName, int16_t value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetConvarValue(convarName, value); -} - -void Bridge_Convars_SetConvarValueUInt16(const char* convarName, uint16_t value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetConvarValue(convarName, value); -} - -void Bridge_Convars_SetConvarValueInt32(const char* convarName, int32_t value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetConvarValue(convarName, value); -} - -void Bridge_Convars_SetConvarValueUInt32(const char* convarName, uint32_t value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetConvarValue(convarName, value); -} - -void Bridge_Convars_SetConvarValueInt64(const char* convarName, int64_t value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetConvarValue(convarName, value); -} - -void Bridge_Convars_SetConvarValueUInt64(const char* convarName, uint64_t value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetConvarValue(convarName, value); -} - -void Bridge_Convars_SetConvarValueBool(const char* convarName, bool value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetConvarValue(convarName, value); -} - -void Bridge_Convars_SetConvarValueFloat(const char* convarName, float value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetConvarValue(convarName, value); -} - -void Bridge_Convars_SetConvarValueDouble(const char* convarName, double value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetConvarValue(convarName, value); -} - -void Bridge_Convars_SetConvarValueColor(const char* convarName, Color value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetConvarValue(convarName, value); -} - -void Bridge_Convars_SetConvarValueVector2D(const char* convarName, Vector2D value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetConvarValue(convarName, value); -} - -void Bridge_Convars_SetConvarValueVector(const char* convarName, Vector value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetConvarValue(convarName, value); -} - -void Bridge_Convars_SetConvarValueVector4D(const char* convarName, Vector4D value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetConvarValue(convarName, value); -} - -void Bridge_Convars_SetConvarValueQAngle(const char* convarName, QAngle value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetConvarValue(convarName, value); -} - -void Bridge_Convars_SetConvarValueString(const char* convarName, const char* value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetConvarValue(convarName, std::string(value)); -} - -void Bridge_Convars_SetClientConvarValueInt16(int playerid, const char* convarName, int16_t value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetClientConvar(playerid, convarName, value); -} - -void Bridge_Convars_SetClientConvarValueUInt16(int playerid, const char* convarName, uint16_t value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetClientConvar(playerid, convarName, value); -} - -void Bridge_Convars_SetClientConvarValueInt32(int playerid, const char* convarName, int32_t value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetClientConvar(playerid, convarName, value); -} - -void Bridge_Convars_SetClientConvarValueUInt32(int playerid, const char* convarName, uint32_t value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetClientConvar(playerid, convarName, value); -} - -void Bridge_Convars_SetClientConvarValueInt64(int playerid, const char* convarName, int64_t value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetClientConvar(playerid, convarName, value); -} - -void Bridge_Convars_SetClientConvarValueUInt64(int playerid, const char* convarName, uint64_t value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetClientConvar(playerid, convarName, value); -} - -void Bridge_Convars_SetClientConvarValueBool(int playerid, const char* convarName, bool value) -{ - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetClientConvar(playerid, convarName, value); -} - -void Bridge_Convars_SetClientConvarValueFloat(int playerid, const char* convarName, float value) +void Bridge_Convars_SetClientConvarValueString(int playerid, const char* convarName, const char* value) { static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); convarmanager->SetClientConvar(playerid, convarName, value); } -void Bridge_Convars_SetClientConvarValueDouble(int playerid, const char* convarName, double value) +uint64_t Bridge_Convars_GetFlags(const char* cvarName) { - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetClientConvar(playerid, convarName, value); + ConVarRefAbstract cvar(cvarName); + return cvar.GetConVarData()->m_nFlags; } -void Bridge_Convars_SetClientConvarValueColor(int playerid, const char* convarName, Color value) +void Bridge_Convars_SetFlags(const char* cvarName, uint64_t flags) { - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetClientConvar(playerid, convarName, value); + ConVarRefAbstract cvar(cvarName); + cvar.GetConVarData()->m_nFlags = flags; } -void Bridge_Convars_SetClientConvarValueVector2D(int playerid, const char* convarName, Vector2D value) +uint64_t Bridge_Convars_AddGlobalChangeListener(void* callback) { - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetClientConvar(playerid, convarName, value); + auto cvarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); + return cvarmanager->AddGlobalChangeListener([callback](const char* convarName, int slot, const char* newValue, const char* oldValue) -> void { + ((void(*)(const char*, int, const char*, const char*))callback)(convarName, slot, newValue, oldValue); + }); } -void Bridge_Convars_SetClientConvarValueVector(int playerid, const char* convarName, Vector value) +void Bridge_Convars_RemoveGlobalChangeListener(uint64_t listenerID) { - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetClientConvar(playerid, convarName, value); + auto cvarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); + cvarmanager->RemoveGlobalChangeListener(listenerID); } -void Bridge_Convars_SetClientConvarValueVector4D(int playerid, const char* convarName, Vector4D value) +uint64_t Bridge_Convars_AddConvarCreatedListener(void* callback) { - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetClientConvar(playerid, convarName, value); + auto cvarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); + return cvarmanager->AddConvarCreatedListener([callback](const char* convarName) -> void { + ((void(*)(const char*))callback)(convarName); + }); } -void Bridge_Convars_SetClientConvarValueQAngle(int playerid, const char* convarName, QAngle value) +void Bridge_Convars_RemoveConvarCreatedListener(uint64_t listenerID) { - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetClientConvar(playerid, convarName, value); + auto cvarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); + cvarmanager->RemoveConvarCreatedListener(listenerID); } -void Bridge_Convars_SetClientConvarValueString(int playerid, const char* convarName, const char* value) +uint64_t Bridge_Convars_AddConCommandCreatedListener(void* callback) { - static auto convarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - convarmanager->SetClientConvar(playerid, convarName, std::string(value)); + auto cvarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); + return cvarmanager->AddConCommandCreatedListener([callback](const char* convarName) -> void { + ((void(*)(const char*))callback)(convarName); + }); } -void Bridge_Convars_AddFlags(const char* cvarName, uint64_t flags) +void Bridge_Convars_RemoveConCommandCreatedListener(uint64_t listenerID) { auto cvarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - cvarmanager->AddFlags(cvarName, flags); + cvarmanager->RemoveConCommandCreatedListener(listenerID); } -void Bridge_Convars_RemoveFlags(const char* cvarName, uint64_t flags) +void* Bridge_Convars_GetMinValuePtrPtr(const char* cvarName) { - auto cvarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - cvarmanager->RemoveFlags(cvarName, flags); + ConVarRefAbstract cvar(cvarName); + return &cvar.GetConVarData()->m_minValue; } -void Bridge_Convars_ClearFlags(const char* cvarName) +void* Bridge_Convars_GetMaxValuePtrPtr(const char* cvarName) { - auto cvarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - cvarmanager->ClearFlags(cvarName); + ConVarRefAbstract cvar(cvarName); + return &cvar.GetConVarData()->m_maxValue; } -uint64_t Bridge_Convars_GetFlags(const char* cvarName) +bool Bridge_Convars_HasDefaultValue(const char* cvarName) { - auto cvarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return cvarmanager->GetFlags(cvarName); + ConVarRefAbstract cvar(cvarName); + return cvar.HasDefault(); } -uint64_t Bridge_Convars_AddGlobalChangeListener(void* callback) +void* Bridge_Convars_GetDefaultValuePtr(const char* cvarName) { - auto cvarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return cvarmanager->AddGlobalChangeListener([callback](const char* convarName, int slot, const char* newValue, const char* oldValue) -> void { - ((void(*)(const char*, int, const char*, const char*))callback)(convarName, slot, newValue, oldValue); - }); + ConVarRefAbstract cvar(cvarName); + return cvar.GetConVarData()->DefaultValue(); } -void Bridge_Convars_RemoveGlobalChangeListener(uint64_t listenerID) +void Bridge_Convars_SetDefaultValue(const char* cvarName, void* defaultValue) { - auto cvarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - cvarmanager->RemoveGlobalChangeListener(listenerID); + ConVarRefAbstract cvar(cvarName); + cvar.GetConVarData()->SetDefaultValue((CVValue_t*)defaultValue); } -uint64_t Bridge_Convars_AddConvarCreatedListener(void* callback) +void Bridge_Convars_SetDefaultValueString(const char* cvarName, const char* defaultValue) { - auto cvarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return cvarmanager->AddConvarCreatedListener([callback](const char* convarName) -> void { - ((void(*)(const char*))callback)(convarName); - }); + ConVarRefAbstract cvar(cvarName); + CUtlString string(defaultValue); + CVValue_t value(string); + cvar.GetConVarData()->SetDefaultValue(&value); } -void Bridge_Convars_RemoveConvarCreatedListener(uint64_t listenerID) +void* Bridge_Convars_GetValuePtr(const char* cvarName) { - auto cvarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - cvarmanager->RemoveConvarCreatedListener(listenerID); + ConVarRefAbstract cvar(cvarName); + return cvar.GetConVarData()->Value(0); } -uint64_t Bridge_Convars_AddConCommandCreatedListener(void* callback) +void Bridge_Convars_SetValuePtr(const char* cvarName, void* value) { - auto cvarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - return cvarmanager->AddConCommandCreatedListener([callback](const char* convarName) -> void { - ((void(*)(const char*))callback)(convarName); - }); + ConVarRefAbstract cvar(cvarName); + cvar.SetOrQueueValueInternal(0, (CVValue_t*)value); } -void Bridge_Convars_RemoveConCommandCreatedListener(uint64_t listenerID) + +void Bridge_Convars_SetValueInternalPtr(const char* cvarName, void* value) { - auto cvarmanager = g_ifaceService.FetchInterface(CONVARMANAGER_INTERFACE_VERSION); - cvarmanager->RemoveConCommandCreatedListener(listenerID); + ConVarRefAbstract cvar(cvarName); + cvar.SetValueInternal(0, (CVValue_t*)value); } DEFINE_NATIVE("Convars.QueryClientConvar", Bridge_Convars_QueryClientConvar); @@ -556,53 +328,15 @@ DEFINE_NATIVE("Convars.CreateConvarString", Bridge_Convars_CreateConvarString); DEFINE_NATIVE("Convars.DeleteConvar", Bridge_Convars_DeleteConvar); DEFINE_NATIVE("Convars.ExistsConvar", Bridge_Convars_ExistsConvar); DEFINE_NATIVE("Convars.GetConvarType", Bridge_Convars_GetConvarType); -DEFINE_NATIVE("Convars.GetConvarDataAddress", Bridge_Convars_GetConvarDataAddress); -DEFINE_NATIVE("Convars.GetConvarValueInt16", Bridge_Convars_GetConvarValueInt16); -DEFINE_NATIVE("Convars.GetConvarValueUInt16", Bridge_Convars_GetConvarValueUInt16); -DEFINE_NATIVE("Convars.GetConvarValueInt32", Bridge_Convars_GetConvarValueInt32); -DEFINE_NATIVE("Convars.GetConvarValueUInt32", Bridge_Convars_GetConvarValueUInt32); -DEFINE_NATIVE("Convars.GetConvarValueInt64", Bridge_Convars_GetConvarValueInt64); -DEFINE_NATIVE("Convars.GetConvarValueUInt64", Bridge_Convars_GetConvarValueUInt64); -DEFINE_NATIVE("Convars.GetConvarValueBool", Bridge_Convars_GetConvarValueBool); -DEFINE_NATIVE("Convars.GetConvarValueFloat", Bridge_Convars_GetConvarValueFloat); -DEFINE_NATIVE("Convars.GetConvarValueDouble", Bridge_Convars_GetConvarValueDouble); -DEFINE_NATIVE("Convars.GetConvarValueColor", Bridge_Convars_GetConvarValueColor); -DEFINE_NATIVE("Convars.GetConvarValueVector2D", Bridge_Convars_GetConvarValueVector2D); -DEFINE_NATIVE("Convars.GetConvarValueVector", Bridge_Convars_GetConvarValueVector); -DEFINE_NATIVE("Convars.GetConvarValueVector4D", Bridge_Convars_GetConvarValueVector4D); -DEFINE_NATIVE("Convars.GetConvarValueQAngle", Bridge_Convars_GetConvarValueQAngle); -DEFINE_NATIVE("Convars.GetConvarValueString", Bridge_Convars_GetConvarValueString); -DEFINE_NATIVE("Convars.SetConvarValueInt16", Bridge_Convars_SetConvarValueInt16); -DEFINE_NATIVE("Convars.SetConvarValueUInt16", Bridge_Convars_SetConvarValueUInt16); -DEFINE_NATIVE("Convars.SetConvarValueInt32", Bridge_Convars_SetConvarValueInt32); -DEFINE_NATIVE("Convars.SetConvarValueUInt32", Bridge_Convars_SetConvarValueUInt32); -DEFINE_NATIVE("Convars.SetConvarValueInt64", Bridge_Convars_SetConvarValueInt64); -DEFINE_NATIVE("Convars.SetConvarValueUInt64", Bridge_Convars_SetConvarValueUInt64); -DEFINE_NATIVE("Convars.SetConvarValueBool", Bridge_Convars_SetConvarValueBool); -DEFINE_NATIVE("Convars.SetConvarValueFloat", Bridge_Convars_SetConvarValueFloat); -DEFINE_NATIVE("Convars.SetConvarValueDouble", Bridge_Convars_SetConvarValueDouble); -DEFINE_NATIVE("Convars.SetConvarValueColor", Bridge_Convars_SetConvarValueColor); -DEFINE_NATIVE("Convars.SetConvarValueVector2D", Bridge_Convars_SetConvarValueVector2D); -DEFINE_NATIVE("Convars.SetConvarValueVector", Bridge_Convars_SetConvarValueVector); -DEFINE_NATIVE("Convars.SetConvarValueVector4D", Bridge_Convars_SetConvarValueVector4D); -DEFINE_NATIVE("Convars.SetConvarValueQAngle", Bridge_Convars_SetConvarValueQAngle); -DEFINE_NATIVE("Convars.SetConvarValueString", Bridge_Convars_SetConvarValueString); -DEFINE_NATIVE("Convars.SetClientConvarValueInt16", Bridge_Convars_SetClientConvarValueInt16); -DEFINE_NATIVE("Convars.SetClientConvarValueUInt16", Bridge_Convars_SetClientConvarValueUInt16); -DEFINE_NATIVE("Convars.SetClientConvarValueInt32", Bridge_Convars_SetClientConvarValueInt32); -DEFINE_NATIVE("Convars.SetClientConvarValueUInt32", Bridge_Convars_SetClientConvarValueUInt32); -DEFINE_NATIVE("Convars.SetClientConvarValueInt64", Bridge_Convars_SetClientConvarValueInt64); -DEFINE_NATIVE("Convars.SetClientConvarValueUInt64", Bridge_Convars_SetClientConvarValueUInt64); -DEFINE_NATIVE("Convars.SetClientConvarValueBool", Bridge_Convars_SetClientConvarValueBool); -DEFINE_NATIVE("Convars.SetClientConvarValueFloat", Bridge_Convars_SetClientConvarValueFloat); -DEFINE_NATIVE("Convars.SetClientConvarValueDouble", Bridge_Convars_SetClientConvarValueDouble); -DEFINE_NATIVE("Convars.SetClientConvarValueColor", Bridge_Convars_SetClientConvarValueColor); -DEFINE_NATIVE("Convars.SetClientConvarValueVector2D", Bridge_Convars_SetClientConvarValueVector2D); -DEFINE_NATIVE("Convars.SetClientConvarValueVector", Bridge_Convars_SetClientConvarValueVector); -DEFINE_NATIVE("Convars.SetClientConvarValueVector4D", Bridge_Convars_SetClientConvarValueVector4D); -DEFINE_NATIVE("Convars.SetClientConvarValueQAngle", Bridge_Convars_SetClientConvarValueQAngle); DEFINE_NATIVE("Convars.SetClientConvarValueString", Bridge_Convars_SetClientConvarValueString); -DEFINE_NATIVE("Convars.AddFlags", Bridge_Convars_AddFlags); -DEFINE_NATIVE("Convars.RemoveFlags", Bridge_Convars_RemoveFlags); -DEFINE_NATIVE("Convars.ClearFlags", Bridge_Convars_ClearFlags); -DEFINE_NATIVE("Convars.GetFlags", Bridge_Convars_GetFlags); \ No newline at end of file +DEFINE_NATIVE("Convars.GetFlags", Bridge_Convars_GetFlags); +DEFINE_NATIVE("Convars.SetFlags", Bridge_Convars_SetFlags); +DEFINE_NATIVE("Convars.GetMinValuePtrPtr", Bridge_Convars_GetMinValuePtrPtr); +DEFINE_NATIVE("Convars.GetMaxValuePtrPtr", Bridge_Convars_GetMaxValuePtrPtr); +DEFINE_NATIVE("Convars.HasDefaultValue", Bridge_Convars_HasDefaultValue); +DEFINE_NATIVE("Convars.GetDefaultValuePtr", Bridge_Convars_GetDefaultValuePtr); +DEFINE_NATIVE("Convars.SetDefaultValue", Bridge_Convars_SetDefaultValue); +DEFINE_NATIVE("Convars.SetDefaultValueString", Bridge_Convars_SetDefaultValueString); +DEFINE_NATIVE("Convars.GetValuePtr", Bridge_Convars_GetValuePtr); +DEFINE_NATIVE("Convars.SetValuePtr", Bridge_Convars_SetValuePtr); +DEFINE_NATIVE("Convars.SetValueInternalPtr", Bridge_Convars_SetValueInternalPtr); \ No newline at end of file diff --git a/src/scripting/engine/enginehelpers.cpp b/src/scripting/engine/enginehelpers.cpp index ae2db188b..a33a0b17d 100644 --- a/src/scripting/engine/enginehelpers.cpp +++ b/src/scripting/engine/enginehelpers.cpp @@ -148,7 +148,8 @@ int Bridge_EngineHelpers_GetMenuSettings(char* out) std::to_string(std::get(configuration->GetValue("core.Menu.Sound.Scroll.Volume"))), std::get(configuration->GetValue("core.Menu.Sound.Exit.Name")), std::to_string(std::get(configuration->GetValue("core.Menu.Sound.Exit.Volume"))), - std::to_string(std::get(configuration->GetValue("core.Menu.KindSettings.Center.ItemsPerPage"))), + // std::to_string(std::get(configuration->GetValue("core.Menu.KindSettings.Center.ItemsPerPage"))), + std::to_string(std::get(configuration->GetValue("core.Menu.ItemsPerPage"))), }; s = implode(settings, "\x01"); @@ -170,6 +171,18 @@ void* Bridge_EngineHelpers_GetGlobalVars() return engine->GetServerGlobals(); } +int Bridge_EngineHelpers_GetIP(char* out) +{ + auto networksystem = g_ifaceService.FetchInterface(NETWORKSYSTEM_INTERFACE_VERSION); + + auto& addr = networksystem->GetPublicAdr(); + std::string s = fmt::format("{}.{}.{}.{}", addr.ip[0], addr.ip[1], addr.ip[2], addr.ip[3]); + + if (out != nullptr) strcpy(out, s.c_str()); + return s.size(); +} + +DEFINE_NATIVE("EngineHelpers.GetIP", Bridge_EngineHelpers_GetIP); DEFINE_NATIVE("EngineHelpers.IsMapValid", Bridge_EngineHelpers_IsMapValid); DEFINE_NATIVE("EngineHelpers.ExecuteCommand", Bridge_EngineHelpers_ExecuteCommand); DEFINE_NATIVE("EngineHelpers.FindGameSystemByName", Bridge_EngineHelpers_FindGameSystemByName); diff --git a/src/scripting/engine/filesystem.cpp b/src/scripting/engine/filesystem.cpp new file mode 100644 index 000000000..71e90b74e --- /dev/null +++ b/src/scripting/engine/filesystem.cpp @@ -0,0 +1,139 @@ +/************************************************************************************************ + * SwiftlyS2 is a scripting framework for Source2-based games. + * Copyright (C) 2025 Swiftly Solution SRL via Sava Andrei-Sebastian and it's contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + ************************************************************************************************/ + +#include +#include + +#include + +int Bridge_FileSystem_GetSearchPath(char* out, char* pathId, int32_t searchPathType, int32_t searchPathsToGet) +{ + static auto filesystem = g_ifaceService.FetchInterface(FILESYSTEM_INTERFACE_VERSION); + + CBufferStringGrowable searchPath; + filesystem->GetSearchPath(pathId, (GetSearchPathTypes_t)searchPathType, searchPath, searchPathsToGet); + + std::string result = searchPath.Get(); + + if (out) strcpy(out, result.c_str()); + + return result.size(); +} + +bool Bridge_FileSystem_FileExists(char* fileName, char* pathId) +{ + static auto filesystem = g_ifaceService.FetchInterface(FILESYSTEM_INTERFACE_VERSION); + + return filesystem->FileExists(fileName, pathId); +} + +void Bridge_FileSystem_AddSearchPath(char* path, char* pathId, int32_t searchPathAdd, int32_t searchPathPriority) +{ + static auto filesystem = g_ifaceService.FetchInterface(FILESYSTEM_INTERFACE_VERSION); + + filesystem->AddSearchPath(path, pathId, (SearchPathAdd_t)searchPathAdd, (SearchPathPriority_t)searchPathPriority, 0); +} + +bool Bridge_FileSystem_RemoveSearchPath(char* path, char* pathId) +{ + static auto filesystem = g_ifaceService.FetchInterface(FILESYSTEM_INTERFACE_VERSION); + + return filesystem->RemoveSearchPath(path, pathId); +} + +bool Bridge_FileSystem_IsDirectory(char* path, char* pathId) +{ + static auto filesystem = g_ifaceService.FetchInterface(FILESYSTEM_INTERFACE_VERSION); + + return filesystem->IsDirectory(path, pathId); +} + +void Bridge_FileSystem_PrintSearchPaths() +{ + static auto filesystem = g_ifaceService.FetchInterface(FILESYSTEM_INTERFACE_VERSION); + + filesystem->PrintSearchPaths(); +} + +int Bridge_FileSystem_ReadFile(char* outBuffer, char* fileName, char* pathId) +{ + static auto filesystem = g_ifaceService.FetchInterface(FILESYSTEM_INTERFACE_VERSION); + + CUtlBuffer buf; + + int size = filesystem->Size(fileName, pathId); + buf.EnsureCapacity(size); + + bool success = filesystem->ReadFile(fileName, pathId, buf, size); + + if (!success) return 1; + + if (outBuffer) strcpy(outBuffer, (char*)buf.Base()); + return size; +} + +bool Bridge_FileSystem_WriteFile(char* fileName, char* pathId, char* inputBuffer) +{ + static auto filesystem = g_ifaceService.FetchInterface(FILESYSTEM_INTERFACE_VERSION); + + CUtlBuffer buf; + buf.Put(inputBuffer, strlen(inputBuffer) + 1); + + return filesystem->WriteFile(fileName, pathId, buf); +} + +uint32_t Bridge_FileSystem_GetFileSize(char* fileName, char* pathId) +{ + static auto filesystem = g_ifaceService.FetchInterface(FILESYSTEM_INTERFACE_VERSION); + + return filesystem->Size(fileName, pathId); +} + +bool Bridge_FileSystem_PrecacheFile(char* fileName, char* pathId) +{ + static auto filesystem = g_ifaceService.FetchInterface(FILESYSTEM_INTERFACE_VERSION); + + return filesystem->Precache(fileName, pathId); +} + +bool Bridge_FileSystem_IsFileWritable(char* fileName, char* pathId) +{ + static auto filesystem = g_ifaceService.FetchInterface(FILESYSTEM_INTERFACE_VERSION); + + return filesystem->IsFileWritable(fileName, pathId); +} + +bool Bridge_FileSystem_SetFileWritable(char* fileName, char* pathId, bool writable) +{ + static auto filesystem = g_ifaceService.FetchInterface(FILESYSTEM_INTERFACE_VERSION); + + return filesystem->SetFileWritable(fileName, writable, pathId); +} + +DEFINE_NATIVE("FileSystem.GetSearchPath", Bridge_FileSystem_GetSearchPath); +DEFINE_NATIVE("FileSystem.FileExists", Bridge_FileSystem_FileExists); +DEFINE_NATIVE("FileSystem.AddSearchPath", Bridge_FileSystem_AddSearchPath); +DEFINE_NATIVE("FileSystem.RemoveSearchPath", Bridge_FileSystem_RemoveSearchPath); +DEFINE_NATIVE("FileSystem.IsDirectory", Bridge_FileSystem_IsDirectory); +DEFINE_NATIVE("FileSystem.PrintSearchPaths", Bridge_FileSystem_PrintSearchPaths); +DEFINE_NATIVE("FileSystem.ReadFile", Bridge_FileSystem_ReadFile); +DEFINE_NATIVE("FileSystem.WriteFile", Bridge_FileSystem_WriteFile); +DEFINE_NATIVE("FileSystem.GetFileSize", Bridge_FileSystem_GetFileSize); +DEFINE_NATIVE("FileSystem.PrecacheFile", Bridge_FileSystem_PrecacheFile); +DEFINE_NATIVE("FileSystem.IsFileWritable", Bridge_FileSystem_IsFileWritable); +DEFINE_NATIVE("FileSystem.SetFileWritable", Bridge_FileSystem_SetFileWritable); \ No newline at end of file diff --git a/src/scripting/memory/helpers.cpp b/src/scripting/memory/helpers.cpp index 193b76a2a..04f36807e 100644 --- a/src/scripting/memory/helpers.cpp +++ b/src/scripting/memory/helpers.cpp @@ -62,6 +62,35 @@ void* Bridge_MemoryHelpers_GetAddressBySignature(const char* binary, const char* return FindSignature(binary, rawBytes ? BytesToIdaSignature(reinterpret_cast(signature), len) : signature); } +int Bridge_MemoryHelpers_GetObjectPtrVtableName(char* out, void* objptr) +{ + char buffer[1024] = { 0 }; + int ret = s2binlib_get_object_ptr_vtable_name(objptr, buffer, sizeof(buffer)); + if (ret != 0) { + if (out != nullptr) { + strcpy(out, ""); + } + return 1; + } + if (out != nullptr) { + strcpy(out, buffer); + } + return strlen(buffer); +} + +bool Bridge_MemoryHelpers_ObjectPtrHasVtable(void* objptr) +{ + return s2binlib_object_ptr_has_vtable(objptr) == 1; +} + +bool Bridge_MemoryHelpers_ObjectPtrHasBaseClass(void* objptr, const char* base_class_name) +{ + return s2binlib_object_ptr_has_base_class(objptr, base_class_name) == 1; +} + DEFINE_NATIVE("MemoryHelpers.FetchInterfaceByName", Bridge_MemoryHelpers_FetchInterfaceByName); DEFINE_NATIVE("MemoryHelpers.GetVirtualTableAddress", Bridge_MemoryHelpers_GetVirtualTableAddress); -DEFINE_NATIVE("MemoryHelpers.GetAddressBySignature", Bridge_MemoryHelpers_GetAddressBySignature); \ No newline at end of file +DEFINE_NATIVE("MemoryHelpers.GetAddressBySignature", Bridge_MemoryHelpers_GetAddressBySignature); +DEFINE_NATIVE("MemoryHelpers.GetObjectPtrVtableName", Bridge_MemoryHelpers_GetObjectPtrVtableName); +DEFINE_NATIVE("MemoryHelpers.ObjectPtrHasVtable", Bridge_MemoryHelpers_ObjectPtrHasVtable); +DEFINE_NATIVE("MemoryHelpers.ObjectPtrHasBaseClass", Bridge_MemoryHelpers_ObjectPtrHasBaseClass); \ No newline at end of file diff --git a/src/scripting/network/netmessages.cpp b/src/scripting/network/netmessages.cpp index 553d82993..c909232f8 100644 --- a/src/scripting/network/netmessages.cpp +++ b/src/scripting/network/netmessages.cpp @@ -110,9 +110,10 @@ return return_value; \ } +extern INetworkMessages* networkMessages; + void* Bridge_NetMessages_AllocateNetMessageByID(int msgid) { - auto networkMessages = g_ifaceService.FetchInterface(NETWORKMESSAGES_INTERFACE_VERSION); auto netmsg = networkMessages->FindNetworkMessageById(msgid); if (!netmsg) return nullptr; @@ -121,7 +122,6 @@ void* Bridge_NetMessages_AllocateNetMessageByID(int msgid) void* Bridge_NetMessages_AllocateNetMessageByPartialName(const char* name) { - auto networkMessages = g_ifaceService.FetchInterface(NETWORKMESSAGES_INTERFACE_VERSION); auto netmsg = networkMessages->FindNetworkMessagePartial(name); if (!netmsg) return nullptr; @@ -152,7 +152,8 @@ int Bridge_NetMessages_GetInt32(void* pmsg, const char* fieldName) if (field->cpp_type() == google::protobuf::FieldDescriptor::CPPTYPE_ENUM) { return msg->GetReflection()->GetEnum(*msg, field)->number(); - } else { + } + else { return msg->GetReflection()->GetInt32(*msg, field); } } @@ -167,7 +168,8 @@ int Bridge_NetMessages_GetRepeatedInt32(void* pmsg, const char* fieldName, int i if (field->cpp_type() == google::protobuf::FieldDescriptor::CPPTYPE_ENUM) { return msg->GetReflection()->GetRepeatedEnum(*msg, field, index)->number(); - } else { + } + else { return msg->GetReflection()->GetRepeatedInt32(*msg, field, index); } } @@ -182,9 +184,10 @@ void Bridge_NetMessages_SetInt32(void* pmsg, const char* fieldName, int value) { const google::protobuf::EnumValueDescriptor* pEnumValue = field->enum_type()->FindValueByNumber(value); if (!pEnumValue) return; - + msg->GetReflection()->SetEnum(msg, field, pEnumValue); - } else { + } + else { msg->GetReflection()->SetInt32(msg, field, value); } } @@ -202,7 +205,8 @@ void Bridge_NetMessages_SetRepeatedInt32(void* pmsg, const char* fieldName, int if (!pEnumValue) return; msg->GetReflection()->SetRepeatedEnum(msg, field, index, pEnumValue); - } else { + } + else { msg->GetReflection()->SetRepeatedInt32(msg, field, index, value); } } @@ -219,7 +223,8 @@ void Bridge_NetMessages_AddInt32(void* pmsg, const char* fieldName, int value) if (!pEnumValue) return; msg->GetReflection()->AddEnum(msg, field, pEnumValue); - } else { + } + else { msg->GetReflection()->AddInt32(msg, field, value); } } @@ -903,8 +908,7 @@ void Bridge_NetMessages_SendMessage(void* pmsg, int msgid, int playerid) { CNetMessagePB* msg = (CNetMessagePB*)pmsg; - auto networkMessages = g_ifaceService.FetchInterface(NETWORKMESSAGES_INTERFACE_VERSION); - auto gameEventSystem = g_ifaceService.FetchInterface(GAMEEVENTSYSTEM_INTERFACE_VERSION); + static auto gameEventSystem = g_ifaceService.FetchInterface(GAMEEVENTSYSTEM_INTERFACE_VERSION); auto netmsg = networkMessages->FindNetworkMessageById(msgid); if (!netmsg) return; @@ -917,8 +921,7 @@ void Bridge_NetMessages_SendMessageToPlayers(void* pmsg, int msgid, uint64_t pla { CNetMessagePB* msg = (CNetMessagePB*)pmsg; - auto networkMessages = g_ifaceService.FetchInterface(NETWORKMESSAGES_INTERFACE_VERSION); - auto gameEventSystem = g_ifaceService.FetchInterface(GAMEEVENTSYSTEM_INTERFACE_VERSION); + static auto gameEventSystem = g_ifaceService.FetchInterface(GAMEEVENTSYSTEM_INTERFACE_VERSION); auto netmsg = networkMessages->FindNetworkMessageById(msgid); if (!netmsg) return; diff --git a/src/scripting/server/player.cpp b/src/scripting/server/player.cpp index 192cf6164..1a273c38a 100644 --- a/src/scripting/server/player.cpp +++ b/src/scripting/server/player.cpp @@ -21,13 +21,13 @@ #include -void Bridge_Player_SendMessage(int playerid, int kind, const char* message) +void Bridge_Player_SendMessage(int playerid, int kind, const char* message, int duration) { static auto playerManager = g_ifaceService.FetchInterface(PLAYERMANAGER_INTERFACE_VERSION); auto player = playerManager->GetPlayer(playerid); if (!player) return; - player->SendMsg((MessageType)kind, message); + player->SendMsg((MessageType)kind, message, duration); } bool Bridge_Player_IsFakeClient(int playerid) diff --git a/src/scripting/server/playermanager.cpp b/src/scripting/server/playermanager.cpp index 02f91a1df..02cc83fdb 100644 --- a/src/scripting/server/playermanager.cpp +++ b/src/scripting/server/playermanager.cpp @@ -37,10 +37,10 @@ int Bridge_PlayerManager_GetPlayerCap() return playerManager->GetPlayerCap(); } -void Bridge_PlayerManager_SendMessage(int kind, const char* message) +void Bridge_PlayerManager_SendMessage(int kind, const char* message, int duration) { static auto playerManager = g_ifaceService.FetchInterface(PLAYERMANAGER_INTERFACE_VERSION); - playerManager->SendMsg((MessageType)kind, message); + playerManager->SendMsg((MessageType)kind, message, duration); } void Bridge_PlayerManager_ShouldBlockTransmitEntity(int entityidx, bool shouldBlockTransmit) diff --git a/src/sdk/schema.cpp b/src/sdk/schema.cpp index b7e5eb288..55187eb0d 100644 --- a/src/sdk/schema.cpp +++ b/src/sdk/schema.cpp @@ -174,6 +174,8 @@ void CSDKSchema::Load() logger->Info("SDK", fmt::format("Finished loading {} SDK enums.\n", enums_count)); + schemaSystem->PrintSchemaStats(""); + WriteJSON(g_SwiftlyCore.GetCorePath() + "gamedata/cs2/sdk.json", sdkJson); } diff --git a/src/server/configuration/configuration.cpp b/src/server/configuration/configuration.cpp index 252568f80..0eff7cbdb 100644 --- a/src/server/configuration/configuration.cpp +++ b/src/server/configuration/configuration.cpp @@ -491,7 +491,8 @@ bool Configuration::Load() RegisterConfigurationVector(wasEdited, config_json, "core", "core", "Menu.AvailableInputModes", { "button", "wasd" }, true, " "); RegisterConfiguration(wasEdited, config_json, "core", "core", "Menu.InputMode", "button"); - RegisterConfiguration(wasEdited, config_json, "core", "core", "Menu.KindSettings.Center.ItemsPerPage", 4); + // RegisterConfiguration(wasEdited, config_json, "core", "core", "Menu.KindSettings.Center.ItemsPerPage", 4); + RegisterConfiguration(wasEdited, config_json, "core", "core", "Menu.ItemsPerPage", 5); // RegisterConfiguration(wasEdited, config_json, "core", "core", "Menu.KindSettings.Screen.Mode", "compatibility"); diff --git a/src/server/players/manager.cpp b/src/server/players/manager.cpp index 69f205ef4..203c1fa73 100644 --- a/src/server/players/manager.cpp +++ b/src/server/players/manager.cpp @@ -363,11 +363,11 @@ int CPlayerManager::GetPlayerCap() return g_SwiftlyCore.GetMaxGameClients(); } -void CPlayerManager::SendMsg(MessageType type, const std::string& message) +void CPlayerManager::SendMsg(MessageType type, const std::string& message, int duration) { for (int i = 0; i < g_SwiftlyCore.GetMaxGameClients(); i++) { IPlayer* player = GetPlayer(i); - if (player) player->SendMsg(type, message); + if (player) player->SendMsg(type, message, duration); } } diff --git a/src/server/players/manager.h b/src/server/players/manager.h index a09d1d3b9..7920ad3fc 100644 --- a/src/server/players/manager.h +++ b/src/server/players/manager.h @@ -44,7 +44,7 @@ class CPlayerManager : public IPlayerManager virtual int GetPlayerCount() override; virtual int GetPlayerCap() override; - virtual void SendMsg(MessageType type, const std::string& message) override; + virtual void SendMsg(MessageType type, const std::string& message, int duration) override; virtual void SteamAPIServerActivated() override; diff --git a/src/server/players/player.cpp b/src/server/players/player.cpp index d0a1a53c9..80361cbfc 100644 --- a/src/server/players/player.cpp +++ b/src/server/players/player.cpp @@ -126,14 +126,16 @@ void CPlayer::Shutdown() } } -void CPlayer::SendMsg(MessageType type, const std::string& message) +extern INetworkMessages* networkMessages; + +void CPlayer::SendMsg(MessageType type, const std::string& message, int duration = 5000) { if (IsFakeClient()) return; if (type == MessageType::CenterHTML) { if (message == "") centerMessageEndTime = 0; else { - centerMessageEndTime = GetTime() + 5000; + centerMessageEndTime = GetTime() + duration; centerMessageText = message; } } @@ -160,7 +162,6 @@ void CPlayer::SendMsg(MessageType type, const std::string& message) if (startsWithColor) msg = " " + msg; } - auto networkMessages = g_ifaceService.FetchInterface(NETWORKMESSAGES_INTERFACE_VERSION); auto gameEventSystem = g_ifaceService.FetchInterface(GAMEEVENTSYSTEM_INTERFACE_VERSION); auto netmsg = networkMessages->FindNetworkMessagePartial("TextMsg"); diff --git a/src/server/players/player.h b/src/server/players/player.h index ca5d1607a..6c4e50739 100644 --- a/src/server/players/player.h +++ b/src/server/players/player.h @@ -31,7 +31,7 @@ class CPlayer : public IPlayer virtual void Initialize(int playerid) override; virtual void Shutdown() override; - virtual void SendMsg(MessageType type, const std::string& message) override; + virtual void SendMsg(MessageType type, const std::string& message, int duration) override; virtual bool IsFakeClient() override; virtual bool IsAuthorized() override; diff --git a/vendor/s2binlib/libs2binlib.a b/vendor/s2binlib/libs2binlib.a index 8611ac15f..ca6b1dcab 100644 Binary files a/vendor/s2binlib/libs2binlib.a and b/vendor/s2binlib/libs2binlib.a differ diff --git a/vendor/s2binlib/s2binlib.h b/vendor/s2binlib/s2binlib.h index 4cc51562a..af16549bb 100644 --- a/vendor/s2binlib/s2binlib.h +++ b/vendor/s2binlib/s2binlib.h @@ -2,7 +2,7 @@ * S2BinLib - A static library that helps resolving memory from binary file * and map to absolute memory address, targeting source 2 game engine. * Copyright (C) 2025 samyyc - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -17,1231 +17,420 @@ * along with this program. If not, see . ***********************************************************************************/ -#ifndef S2BINLIB_H -#define S2BINLIB_H +#pragma once #include #include +#include #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif - /** - * Initialize the global S2BinLib instance - * - * The operating system is automatically detected at runtime. - * Can be called multiple times to reinitialize with different parameters. - * - * @param game_path Path to the game directory (null-terminated C string) - * @param game_type Game type identifier (null-terminated C string) - * - * @return 0 on success - * -2 if invalid parameters or unsupported OS - * -5 if internal error - * - * @example - * int result = s2binlib_initialize("C:/Games/MyGame", "csgo"); - * if (result != 0) { - * // Handle error - * } - */ - int s2binlib_initialize(const char *game_path, const char *game_type); - - /** - * Initialize the global S2BinLib instance with a specific operating system - * - * Can be called multiple times to reinitialize with different parameters. - * - * @param game_path Path to the game directory (null-terminated C string) - * @param game_type Game type identifier (null-terminated C string) - * @param os Operating system identifier ("windows" or "linux") (null-terminated C string) - * - * @return 0 on success - * -2 if invalid parameters - * -5 if internal error - * - * @example - * int result = s2binlib_initialize_with_os("C:/Games/MyGame", "csgo", "windows"); - * if (result != 0) { - * // Handle error - * } - */ - int s2binlib_initialize_with_os(const char *game_path, const char *game_type, const char *os); - - /** - * Scan for a pattern in the specified binary - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to scan (e.g., "server", "client") (null-terminated C string) - * @param pattern Pattern string with wildcards (e.g., "48 89 5C 24 ? 48 89 74 24 ?") (null-terminated C string) - * @param result Pointer to store the resulting runtime memory address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary - * -4 if pattern not found - * -5 if internal error - * - * @example - * void* address; - * int result = s2binlib_pattern_scan("server", "48 89 5C 24 ? 48 89 74", &address); - * if (result == 0) { - * printf("Found at: %p\n", address); - * } - */ - int s2binlib_pattern_scan(const char *binary_name, const char *pattern, void **result); - - /** - * Pattern scan and return the virtual address - * - * Scans for a byte pattern in the specified binary and returns the virtual address (VA). - * Pattern format: hex bytes separated by spaces, use '?' for wildcards - * Example: "48 89 5C 24 ? 48 89 74 24 ?" - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to scan (null-terminated C string) - * @param pattern Pattern string with wildcards (null-terminated C string) - * @param result Pointer to store the resulting virtual address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary - * -4 if pattern not found - * -5 if internal error - * - * @example - * void* va; - * int result = s2binlib_pattern_scan_va("server", "48 89 5C 24 ?", &va); - * if (result == 0) { - * printf("Pattern found at VA: %p\n", va); - * } - */ - int s2binlib_pattern_scan_va(const char *binary_name, const char *pattern, void **result); - - /** - * Callback function type for pattern_scan_all functions - * - * @param index The index of the current match (0-based) - * @param address The found address (VA or memory address depending on the function) - * @param user_data User-provided data pointer - * @return true to stop searching (found what you need), false to continue searching - */ - typedef bool (*s2binlib_pattern_scan_callback)(size_t index, void *address, void *user_data); - - /** - * Find all occurrences of a pattern in a binary and return their virtual addresses - * - * Scans the binary for all occurrences of the specified byte pattern and calls - * the callback function for each match found. The callback receives virtual addresses (VA). - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to scan - * @param pattern Byte pattern with wildcards (e.g., "48 89 5C 24 ? 48 89 74") - * @param callback Function pointer that will be called for each match - * @param user_data User-provided pointer passed to each callback invocation - * - * @return 0 on success (at least one match found) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary - * -4 if pattern not found - * -5 if internal error - * - * @note The callback should return true to stop searching, false to continue - * - * @example - * bool my_callback(size_t index, void* address, void* user_data) { - * printf("Match #%zu found at VA: %p\n", index, address); - * int* count = (int*)user_data; - * (*count)++; - * return false; // Continue searching - * } - * - * int count = 0; - * int result = s2binlib_pattern_scan_all_va("server", "48 89 5C 24 ?", my_callback, &count); - * if (result == 0) { - * printf("Found %d matches\n", count); - * } - */ - int s2binlib_pattern_scan_all_va(const char *binary_name, const char *pattern, - s2binlib_pattern_scan_callback callback, void *user_data); - - /** - * Find all occurrences of a pattern in a binary and return their memory addresses - * - * Scans the binary for all occurrences of the specified byte pattern and calls - * the callback function for each match found. The callback receives memory addresses - * (adjusted with module base address). - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to scan - * @param pattern Byte pattern with wildcards (e.g., "48 89 5C 24 ? 48 89 74") - * @param callback Function pointer that will be called for each match - * @param user_data User-provided pointer passed to each callback invocation - * - * @return 0 on success (at least one match found) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary - * -4 if pattern not found - * -5 if internal error - * - * @note The callback should return true to stop searching, false to continue - * - * @example - * bool my_callback(size_t index, void* address, void* user_data) { - * printf("Match #%zu found at memory address: %p\n", index, address); - * int* count = (int*)user_data; - * (*count)++; - * return false; // Continue searching - * } - * - * int count = 0; - * int result = s2binlib_pattern_scan_all("server", "48 89 5C 24 ?", my_callback, &count); - * if (result == 0) { - * printf("Found %d matches\n", count); - * } - */ - int s2binlib_pattern_scan_all(const char *binary_name, const char *pattern, - s2binlib_pattern_scan_callback callback, void *user_data); - - /** - * Find a vtable by class name in the specified binary - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to search (e.g., "server", "client") (null-terminated C string) - * @param vtable_name Class name to search for (null-terminated C string) - * @param result Pointer to store the resulting vtable runtime memory address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary - * -4 if vtable not found - * -5 if internal error - * - * @example - * void* vtable_addr; - * int result = s2binlib_find_vtable("server", "CBaseEntity", &vtable_addr); - * if (result == 0) { - * printf("VTable at: %p\n", vtable_addr); - * } - */ - int s2binlib_find_vtable(const char *binary_name, const char *vtable_name, void **result); - - /** - * Find a vtable by class name and return its virtual address - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to search (null-terminated C string) - * @param vtable_name Class name to search for (null-terminated C string) - * @param result Pointer to store the resulting vtable virtual address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary - * -4 if vtable not found - * -5 if internal error - * - * @example - * void* vtable_va; - * int result = s2binlib_find_vtable_va("server", "CBaseEntity", &vtable_va); - * if (result == 0) { - * printf("VTable VA: %p\n", vtable_va); - * } - */ - int s2binlib_find_vtable_va(const char *binary_name, const char *vtable_name, void **result); - - /** - * Find a vtable by mangled name and return its virtual address - * - * Searches for a vtable using the mangled/decorated RTTI name directly. - * Unlike s2binlib_find_vtable_va which auto-decorates the name, this function - * uses the provided name as-is. - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to search (null-terminated C string) - * @param vtable_name Mangled RTTI name to search for (null-terminated C string) - * - Windows: ".?AVClassName@@" format - * - Linux: "{length}ClassName" format - * @param result Pointer to store the resulting vtable virtual address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary - * -4 if vtable not found - * -5 if internal error - * - * @example - * // Windows mangled name example - * void* vtable_va; - * int result = s2binlib_find_vtable_mangled_va("server", ".?AVCBaseEntity@@", &vtable_va); - * if (result == 0) { - * printf("VTable VA: %p\n", vtable_va); - * } - * - * // Linux mangled name example - * int result = s2binlib_find_vtable_mangled_va("server", "11CBaseEntity", &vtable_va); - */ - int s2binlib_find_vtable_mangled_va(const char *binary_name, const char *vtable_name, void **result); - - /** - * Find a vtable by mangled name and return its runtime memory address - * - * Searches for a vtable using the mangled/decorated RTTI name directly and - * returns its runtime memory address. - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to search (null-terminated C string) - * @param vtable_name Mangled RTTI name to search for (null-terminated C string) - * - Windows: ".?AVClassName@@" format - * - Linux: "{length}ClassName" format - * @param result Pointer to store the resulting vtable memory address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary - * -4 if vtable not found - * -5 if internal error - * - * @example - * void* vtable_addr; - * int result = s2binlib_find_vtable_mangled("server", ".?AVCBaseEntity@@", &vtable_addr); - * if (result == 0) { - * printf("VTable at: %p\n", vtable_addr); - * } - */ - int s2binlib_find_vtable_mangled(const char *binary_name, const char *vtable_name, void **result); - - /** - * Find a nested vtable (2 levels) by class names and return its virtual address - * - * Searches for a vtable of a nested class (e.g., Class1::Class2). - * The function automatically decorates the names according to the platform's - * RTTI name mangling scheme: - * - Windows: ".?AVClass2@Class1@@" - * - Linux: "N{len1}Class1{len2}Class2E" - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to search (null-terminated C string) - * @param class1_name Outer class name (null-terminated C string) - * @param class2_name Inner/nested class name (null-terminated C string) - * @param result Pointer to store the resulting vtable virtual address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary - * -4 if vtable not found - * -5 if internal error - * - * @example - * void* vtable_va; - * int result = s2binlib_find_vtable_nested_2_va("server", "CEntitySystem", "CEntitySubsystem", &vtable_va); - * if (result == 0) { - * printf("Nested VTable VA: %p\n", vtable_va); - * } - */ - int s2binlib_find_vtable_nested_2_va(const char *binary_name, const char *class1_name, const char *class2_name, void **result); - - /** - * Find a nested vtable (2 levels) by class names and return its runtime memory address - * - * Searches for a vtable of a nested class (e.g., Class1::Class2) and returns - * its runtime memory address. - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to search (null-terminated C string) - * @param class1_name Outer class name (null-terminated C string) - * @param class2_name Inner/nested class name (null-terminated C string) - * @param result Pointer to store the resulting vtable memory address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary - * -4 if vtable not found - * -5 if internal error - * - * @example - * void* vtable_addr; - * int result = s2binlib_find_vtable_nested_2("server", "CEntitySystem", "CEntitySubsystem", &vtable_addr); - * if (result == 0) { - * printf("Nested VTable at: %p\n", vtable_addr); - * } - */ - int s2binlib_find_vtable_nested_2(const char *binary_name, const char *class1_name, const char *class2_name, void **result); - - /** - * Get the number of virtual functions in a vtable - * - * Returns the count of virtual functions (vfuncs) in the specified vtable. - * This counts valid function pointers in the vtable until it encounters a null - * or invalid pointer. - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to search (e.g., "server", "client") - * @param vtable_name Name of the vtable/class to search for - * @param result Pointer to store the resulting count of virtual functions - * - * @return 0 - Success, result contains the vfunc count - * -1 - S2BinLib not initialized - * -2 - Invalid input (null pointer or invalid UTF-8) - * -4 - Operation failed (vtable not found or other error) - * -5 - Failed to acquire lock - * - * @example - * size_t vfunc_count; - * int result = s2binlib_get_vtable_vfunc_count("server", "CBaseEntity", &vfunc_count); - * if (result == 0) { - * printf("VTable has %zu virtual functions\n", vfunc_count); - * } - */ - int s2binlib_get_vtable_vfunc_count(const char *binary_name, const char *vtable_name, size_t *result); - - /** - * Get the number of virtual functions in a vtable by virtual address - * - * Returns the count of virtual functions (vfuncs) in a vtable at the specified - * virtual address. This counts valid function pointers in the vtable until it - * encounters a null or invalid pointer. - * - * Unlike s2binlib_get_vtable_vfunc_count, this function takes a virtual address - * directly instead of looking up the vtable by name. - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary (e.g., "server", "client") - * @param vtable_va Virtual address of the vtable - * @param result Pointer to store the resulting count of virtual functions - * - * @return 0 - Success, result contains the vfunc count - * -1 - S2BinLib not initialized - * -2 - Invalid input (null pointer or invalid UTF-8) - * -4 - Operation failed (invalid address or other error) - * -5 - Failed to acquire lock - * - * @example - * void* vtable_va; - * // First get the vtable virtual address - * s2binlib_find_vtable_va("server", "CBaseEntity", &vtable_va); - * - * // Then count its virtual functions - * size_t vfunc_count; - * int result = s2binlib_get_vtable_vfunc_count_by_va("server", (uint64_t)vtable_va, &vfunc_count); - * if (result == 0) { - * printf("VTable has %zu virtual functions\n", vfunc_count); - * } - */ - int s2binlib_get_vtable_vfunc_count_by_va(const char *binary_name, uint64_t vtable_va, size_t *result); - - /** - * Find a symbol by name in the specified binary - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to search (e.g., "server", "client") (null-terminated C string) - * @param symbol_name Symbol name to search for (null-terminated C string) - * @param result Pointer to store the resulting symbol runtime memory address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if symbol not found - * -5 if internal error - * - * @example - * void* symbol_addr; - * int result = s2binlib_find_symbol("server", "CreateInterface", &symbol_addr); - * if (result == 0) { - * printf("Symbol at: %p\n", symbol_addr); - * } - */ - int s2binlib_find_symbol(const char *binary_name, const char *symbol_name, void **result); - - /** - * Find a symbol by name and return its virtual address - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to search (null-terminated C string) - * @param symbol_name Symbol name to search for (null-terminated C string) - * @param result Pointer to store the resulting virtual address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if symbol not found - * -5 if internal error - * - * @example - * void* symbol_va; - * int result = s2binlib_find_symbol_va("server", "_Z13CreateInterfacev", &symbol_va); - * if (result == 0) { - * printf("Symbol VA: %p\n", symbol_va); - * } - */ - int s2binlib_find_symbol_va(const char *binary_name, const char *symbol_name, void **result); - - /** - * Manually set the base address for a module from a pointer - * - * This allows overriding the automatic base address detection for a module. - * The function will automatically detect the module base from the provided pointer. - * - * @param binary_name Name of the binary (e.g., "server", "client") (null-terminated C string) - * @param pointer The pointer inside the specified module - * - * @return 0 on success - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -5 if internal error - * - * @example - * int result = s2binlib_set_module_base_from_pointer("server", 0x140001000); - * if (result == 0) { - * printf("Server base address set successfully\n"); - * } - */ - int s2binlib_set_module_base_from_pointer(const char *binary_name, void *pointer); - - /** - * Clear manually set base address for a module - * - * After calling this, the module will use automatic base address detection again. - * - * @param binary_name Name of the binary (e.g., "server", "client") (null-terminated C string) - * - * @return 0 on success - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -5 if internal error - * - * @example - * int result = s2binlib_clear_module_base_address("server"); - * if (result == 0) { - * printf("Server base address cleared\n"); - * } - */ - int s2binlib_clear_module_base_address(const char *binary_name); - - /** - * Get the module base address - * - * Returns the base address of a loaded module. If a manual base address was set, - * that value will be returned. Otherwise, attempts to find the base address from - * the running process. - * - * @param binary_name Name of the binary (e.g., "server", "client") (null-terminated C string) - * @param result Pointer to store the resulting base address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if module not found or not loaded - * -5 if internal error - * - * @example - * void* base_addr; - * int result = s2binlib_get_module_base_address("server", &base_addr); - * if (result == 0) { - * printf("Module base: %p\n", base_addr); - * } - */ - int s2binlib_get_module_base_address(const char *binary_name, void **result); - - /** - * Check if a binary is already loaded - * - * @param binary_name Name of the binary to check (null-terminated C string) - * - * @return 1 if loaded - * 0 if not loaded - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -5 if internal error - * - * @example - * int loaded = s2binlib_is_binary_loaded("server"); - * if (loaded == 1) { - * printf("Server is loaded\n"); - * } - */ - int s2binlib_is_binary_loaded(const char *binary_name); - - /** - * Load a binary into memory - * - * Loads the specified binary file into memory for analysis. - * If the binary is already loaded, this function does nothing. - * - * @param binary_name Name of the binary to load (null-terminated C string) - * - * @return 0 on success - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -5 if internal error - * - * @example - * int result = s2binlib_load_binary("server"); - * if (result == 0) { - * printf("Server loaded successfully\n"); - * } - */ - int s2binlib_load_binary(const char *binary_name); - - /** - * Get the full path to a binary file - * - * Returns the full filesystem path where the binary file is expected to be located. - * - * @param binary_name Name of the binary (null-terminated C string) - * @param buffer Buffer to store the path string - * @param buffer_size Size of the buffer - * - * @return 0 on success (path written to buffer) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if buffer too small - * -5 if internal error - * - * @example - * char path[512]; - * int result = s2binlib_get_binary_path("server", path, sizeof(path)); - * if (result == 0) { - * printf("Binary path: %s\n", path); - * } - */ - int s2binlib_get_binary_path(const char *binary_name, char *buffer, size_t buffer_size); - - /** - * Find an exported symbol by name and return its virtual address - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to search (null-terminated C string) - * @param export_name Export name to search for (null-terminated C string) - * @param result Pointer to store the resulting virtual address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary - * -4 if export not found - * -5 if internal error - * - * @example - * void* export_va; - * int result = s2binlib_find_export_va("server", "CreateInterface", &export_va); - * if (result == 0) { - * printf("Export VA: %p\n", export_va); - * } - */ - int s2binlib_find_export_va(const char *binary_name, const char *export_name, void **result); - - /** - * Find an exported symbol by name and return its runtime memory address - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to search (null-terminated C string) - * @param export_name Export name to search for (null-terminated C string) - * @param result Pointer to store the resulting memory address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary or get base address - * -4 if export not found - * -5 if internal error - * - * @example - * void* export_addr; - * int result = s2binlib_find_export("server", "CreateInterface", &export_addr); - * if (result == 0) { - * printf("Export at: %p\n", export_addr); - * } - */ - int s2binlib_find_export(const char *binary_name, const char *export_name, void **result); - - /** - * Read bytes from binary at a file offset - * - * Reads raw bytes from the binary file at the specified file offset into the provided buffer. - * - * @param binary_name Name of the binary to read from (null-terminated C string) - * @param file_offset File offset to read from - * @param buffer Buffer to store the read bytes - * @param buffer_size Size of the buffer (number of bytes to read) - * - * @return 0 on success (bytes written to buffer) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to read - * -5 if internal error - * - * @example - * uint8_t buffer[16]; - * int result = s2binlib_read_by_file_offset("server", 0x1000, buffer, sizeof(buffer)); - * if (result == 0) { - * // Use buffer - * } - */ - int s2binlib_read_by_file_offset(const char *binary_name, uint64_t file_offset, uint8_t *buffer, size_t buffer_size); - - /** - * Read bytes from binary at a virtual address - * - * Reads raw bytes from the binary at the specified virtual address (VA) into the provided buffer. - * - * @param binary_name Name of the binary to read from (null-terminated C string) - * @param va Virtual address to read from - * @param buffer Buffer to store the read bytes - * @param buffer_size Size of the buffer (number of bytes to read) - * - * @return 0 on success (bytes written to buffer) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to read - * -5 if internal error - * - * @example - * uint8_t buffer[16]; - * int result = s2binlib_read_by_va("server", 0x140001000, buffer, sizeof(buffer)); - * if (result == 0) { - * // Use buffer - * } - */ - int s2binlib_read_by_va(const char *binary_name, uint64_t va, uint8_t *buffer, size_t buffer_size); - - /** - * Read bytes from binary at a runtime memory address - * - * Reads raw bytes from the binary at the specified runtime memory address into the provided buffer. - * - * @param binary_name Name of the binary to read from (null-terminated C string) - * @param mem_address Runtime memory address to read from - * @param buffer Buffer to store the read bytes - * @param buffer_size Size of the buffer (number of bytes to read) - * - * @return 0 on success (bytes written to buffer) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to read - * -5 if internal error - * - * @example - * uint8_t buffer[16]; - * int result = s2binlib_read_by_mem_address("server", mem_addr, buffer, sizeof(buffer)); - * if (result == 0) { - * // Use buffer - * } - */ - int s2binlib_read_by_mem_address(const char *binary_name, uint64_t mem_address, uint8_t *buffer, size_t buffer_size); - - /** - * Find a virtual function by vtable name and index, return virtual address - * - * Locates a vtable by its class name, then reads the virtual function pointer - * at the specified index. - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to search (null-terminated C string) - * @param vtable_name Class name whose vtable to search for (null-terminated C string) - * @param vfunc_index Index of the virtual function in the vtable (0-based) - * @param result Pointer to store the resulting virtual address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary - * -4 if vtable or vfunc not found - * -5 if internal error - * - * @example - * void* vfunc_va; - * int result = s2binlib_find_vfunc_by_vtbname_va("server", "CBaseEntity", 5, &vfunc_va); - * if (result == 0) { - * printf("VFunc VA: %p\n", vfunc_va); - * } - */ - int s2binlib_find_vfunc_by_vtbname_va(const char *binary_name, const char *vtable_name, size_t vfunc_index, void **result); - - /** - * Find a virtual function by vtable name and index, return runtime address - * - * Locates a vtable by its class name, then reads the virtual function pointer - * at the specified index and returns its runtime memory address. - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to search (null-terminated C string) - * @param vtable_name Class name whose vtable to search for (null-terminated C string) - * @param vfunc_index Index of the virtual function in the vtable (0-based) - * @param result Pointer to store the resulting memory address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary or get base address - * -4 if vtable or vfunc not found - * -5 if internal error - * - * @example - * void* vfunc_addr; - * int result = s2binlib_find_vfunc_by_vtbname("server", "CBaseEntity", 5, &vfunc_addr); - * if (result == 0) { - * printf("VFunc at: %p\n", vfunc_addr); - * } - */ - int s2binlib_find_vfunc_by_vtbname(const char *binary_name, const char *vtable_name, size_t vfunc_index, void **result); - - /** - * Find a virtual function by vtable pointer and index, return virtual address - * - * Given a runtime pointer to a vtable, reads the virtual function pointer - * at the specified index. The appropriate binary is automatically detected. - * - * @param vtable_ptr Runtime pointer to the vtable - * @param vfunc_index Index of the virtual function in the vtable (0-based) - * @param result Pointer to store the resulting virtual address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if binary not found for pointer - * -4 if failed to read vfunc - * -5 if internal error - * - * @example - * void* vfunc_va; - * int result = s2binlib_find_vfunc_by_vtbptr_va(vtable_ptr, 5, &vfunc_va); - * if (result == 0) { - * printf("VFunc VA: %p\n", vfunc_va); - * } - */ - int s2binlib_find_vfunc_by_vtbptr_va(void *vtable_ptr, size_t vfunc_index, void **result); - - /** - * Find a virtual function by vtable pointer and index, return runtime address - * - * Given a runtime pointer to a vtable, reads the virtual function pointer - * at the specified index. The appropriate binary is automatically detected. - * - * @param vtable_ptr Runtime pointer to the vtable - * @param vfunc_index Index of the virtual function in the vtable (0-based) - * @param result Pointer to store the resulting memory address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if binary not found for pointer - * -4 if failed to read vfunc - * -5 if internal error - * - * @example - * void* vfunc_addr; - * int result = s2binlib_find_vfunc_by_vtbptr(vtable_ptr, 5, &vfunc_addr); - * if (result == 0) { - * printf("VFunc at: %p\n", vfunc_addr); - * } - */ - int s2binlib_find_vfunc_by_vtbptr(void *vtable_ptr, size_t vfunc_index, void **result); - - /** - * Find a string in the binary and return its virtual address - * - * Searches for an exact string match in the binary (case-sensitive). - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to search (null-terminated C string) - * @param string String to search for (null-terminated C string) - * @param result Pointer to store the resulting virtual address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary - * -4 if string not found - * -5 if internal error - * - * @example - * void* string_va; - * int result = s2binlib_find_string_va("server", "CBaseEntity", &string_va); - * if (result == 0) { - * printf("String VA: %p\n", string_va); - * } - */ - int s2binlib_find_string_va(const char *binary_name, const char *string, void **result); - - /** - * Find a string in the binary and return its runtime memory address - * - * Searches for an exact string match in the binary (case-sensitive). - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to search (null-terminated C string) - * @param string String to search for (null-terminated C string) - * @param result Pointer to store the resulting memory address - * - * @return 0 on success (address written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary or get base address - * -4 if string not found - * -5 if internal error - * - * @example - * void* string_addr; - * int result = s2binlib_find_string("server", "CBaseEntity", &string_addr); - * if (result == 0) { - * printf("String at: %p\n", string_addr); - * } - */ - int s2binlib_find_string(const char *binary_name, const char *string, void **result); - - /** - * Dump and cache all cross-references in a binary - * - * This function disassembles all executable sections of the binary once and builds - * a complete cross-reference (xref) database. Subsequent queries are very fast. - * - * If the binary is not yet loaded, it will be loaded automatically. - * - * @param binary_name Name of the binary to analyze (null-terminated C string) - * - * @return 0 on success - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary - * -4 if failed to dump xrefs - * -5 if internal error - * - * @example - * int result = s2binlib_dump_xrefs("server"); - * if (result == 0) { - * printf("Xrefs cached successfully\n"); - * } - */ - int s2binlib_dump_xrefs(const char *binary_name); - - /** - * Get the count of cached cross-references for a target virtual address - * - * Returns the number of code locations that reference the specified target address. - * The binary must have been analyzed with s2binlib_dump_xrefs() first. - * - * Use this function to determine the buffer size needed for s2binlib_get_xrefs_cached(). - * - * @param binary_name Name of the binary (null-terminated C string) - * @param target_va The target virtual address to find references to - * - * @return Non-negative: Number of xrefs found - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if binary not analyzed (call s2binlib_dump_xrefs first) - * -5 if internal error - * - * @example - * // First, dump xrefs - * s2binlib_dump_xrefs("server"); - * - * // Get xref count - * int count = s2binlib_get_xrefs_count("server", (void*)0x140001000); - * if (count > 0) { - * void** xrefs = malloc(count * sizeof(void*)); - * s2binlib_get_xrefs_cached("server", (void*)0x140001000, xrefs, count); - * // Use xrefs - * free(xrefs); - * } - */ - int s2binlib_get_xrefs_count(const char *binary_name, void *target_va); - - /** - * Get cached cross-references for a target virtual address into a buffer - * - * Returns all code locations that reference the specified target address into the provided buffer. - * The binary must have been analyzed with s2binlib_dump_xrefs() first. - * - * Use s2binlib_get_xrefs_count() to determine the required buffer size. - * - * @param binary_name Name of the binary (null-terminated C string) - * @param target_va The target virtual address to find references to - * @param buffer Buffer to store the xref addresses (array of uint64_t) - * @param buffer_size Size of the buffer (number of uint64_t elements it can hold) - * - * @return Non-negative: Number of xrefs written to buffer - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if binary not analyzed (call s2binlib_dump_xrefs first) - * -4 if buffer too small - * -5 if internal error - * - * @example - * // First, dump xrefs - * s2binlib_dump_xrefs("server"); - * - * // Get xref count - * int count = s2binlib_get_xrefs_count("server", (void*)0x140001000); - * if (count > 0) { - * void** xrefs = malloc(count * sizeof(void*)); - * int result = s2binlib_get_xrefs_cached("server", (void*)0x140001000, xrefs, count); - * if (result > 0) { - * for (int i = 0; i < result; i++) { - * printf("Xref at: %p\n", xrefs[i]); - * } - * } - * free(xrefs); - * } - */ - int s2binlib_get_xrefs_cached(const char *binary_name, void *target_va, void **buffer, size_t buffer_size); - - /** - * Unload a specific binary from memory - * - * Removes the specified binary from the internal cache, freeing up memory. - * This is useful when you no longer need a particular binary. - * - * @param binary_name Name of the binary to unload (e.g., "server", "client") - * - * @return 0 on success - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -5 if internal error (mutex lock failed) - * - * @example - * int result = s2binlib_unload_binary("server"); - * if (result == 0) { - * printf("Binary unloaded successfully\n"); - * } - */ - int s2binlib_unload_binary(const char *binary_name); - - /** - * Unload all binaries from memory - * - * Removes all loaded binaries from the internal cache, freeing up memory. - * This is useful for cleanup operations or when you need to start fresh. - * - * @return 0 on success - * -1 if S2BinLib not initialized - * -5 if internal error (mutex lock failed) - * - * @example - * int result = s2binlib_unload_all_binaries(); - * if (result == 0) { - * printf("All binaries unloaded successfully\n"); - * } - */ - int s2binlib_unload_all_binaries(void); - - /** - * Install a JIT trampoline at a memory address - * - * Creates a JIT trampoline that can be used to hook or intercept function calls. - * This function reads the original function pointer at the specified memory address, - * creates a trampoline, and replaces the original pointer with the trampoline address. - * - * If a trampoline is already installed at the same address, this function does nothing - * and returns success. - * - * @param mem_address Runtime memory address where to install the trampoline - * @param trampoline_address_out Pointer to store the resulting trampoline address - * - * @return 0 on success - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to install trampoline - * -5 if internal error - * - * @warning This function modifies memory at the specified address and changes - * memory protection flags. The caller must ensure that: - * - The memory address is valid and writable - * - The address points to an 8-byte function pointer - * - No other threads are accessing the memory during the operation - * - * @example - * void* vtable_ptr = ...; // Get vtable pointer - * void* trampoline_address; - * int result = s2binlib_install_trampoline(vtable_ptr, &trampoline_address); - * if (result == 0) { - * printf("Trampoline installed successfully\n"); - * } - */ - int s2binlib_install_trampoline(void *mem_address, void **trampoline_address_out); - - /** - * @brief Follow cross-reference from memory address to memory address - * - * This function reads the instruction at the given memory address, - * decodes it using iced-x86, and returns the target address if the - * instruction contains a valid cross-reference. - * - * Valid xrefs include: - * - RIP-relative memory operands (e.g., lea rax, [rip+0x1000]) - * - Near branches (call, jmp, jcc) - * - Absolute memory operands - * - * @param mem_address Runtime memory address to analyze - * @param target_address_out Pointer to store the target address - * - * @return 0 on success (target address written to target_address_out) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if no valid xref found or invalid instruction - * -5 if internal error - * - * @warning This function reads memory at the specified address. - * The caller must ensure that: - * - The memory address is valid and readable - * - The address points to executable code - * - * @example - * void* instruction_addr = ...; // Address of an instruction - * void* target_addr; - * int result = s2binlib_follow_xref_mem_to_mem(instruction_addr, &target_addr); - * if (result == 0) { - * printf("Xref target: %p\n", target_addr); - * } - */ - int s2binlib_follow_xref_mem_to_mem(const void *mem_address, void **target_address_out); - - /** - * @brief Follow cross-reference from virtual address to memory address - * - * This function reads the instruction at the given virtual address from the file, - * decodes it using iced-x86, and returns the target memory address if the - * instruction contains a valid cross-reference. - * - * Valid xrefs include: - * - RIP-relative memory operands (e.g., lea rax, [rip+0x1000]) - * - Near branches (call, jmp, jcc) - * - Absolute memory operands - * - * @param binary_name Name of the binary (e.g., "server", "client") - * @param va Virtual address to analyze - * @param target_address_out Pointer to store the target memory address - * - * @return 0 on success (target address written to target_address_out) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary or no valid xref found - * -5 if internal error - * - * @example - * void* target_addr; - * int result = s2binlib_follow_xref_va_to_mem("server", 0x140001000, &target_addr); - * if (result == 0) { - * printf("Xref target: %p\n", target_addr); - * } - */ - int s2binlib_follow_xref_va_to_mem(const char *binary_name, uint64_t va, void **target_address_out); - - /** - * @brief Follow cross-reference from virtual address to virtual address - * - * This function reads the instruction at the given virtual address from the file, - * decodes it using iced-x86, and returns the target virtual address if the - * instruction contains a valid cross-reference. - * - * Valid xrefs include: - * - RIP-relative memory operands (e.g., lea rax, [rip+0x1000]) - * - Near branches (call, jmp, jcc) - * - Absolute memory operands - * - * @param binary_name Name of the binary (e.g., "server", "client") - * @param va Virtual address to analyze - * @param target_va_out Pointer to store the target virtual address - * - * @return 0 on success (target VA written to target_va_out) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if failed to load binary or no valid xref found - * -5 if internal error - * - * @example - * uint64_t target_va; - * int result = s2binlib_follow_xref_va_to_va("server", 0x140001000, &target_va); - * if (result == 0) { - * printf("Xref target VA: 0x%llX\n", target_va); - * } - */ - int s2binlib_follow_xref_va_to_va(const char *binary_name, uint64_t va, uint64_t *target_va_out); - - /** - * @brief Find the NetworkVar_StateChanged vtable index by virtual address - * - * This function scans the vtable at the given virtual address to find the - * index of the NetworkVar_StateChanged virtual function. It analyzes each - * virtual function in the vtable looking for the specific instruction pattern - * that identifies the StateChanged function (cmp dword ptr [reg+56], 0xFF). - * - * @param vtable_va Virtual address of the vtable to analyze - * @param result Pointer to store the resulting index (as uint64_t) - * - * @return 0 on success (index written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -4 if NetworkVar_StateChanged not found in vtable - * -5 if internal error - * - * @example - * uint64_t index; - * int result = s2binlib_find_networkvar_vtable_statechanged_va(0x140001000, &index); - * if (result == 0) { - * printf("StateChanged index: %llu\n", index); - * } - */ - int s2binlib_find_networkvar_vtable_statechanged_va(uint64_t vtable_va, uint64_t *result); - - /** - * @brief Find the NetworkVar_StateChanged vtable index by memory address - * - * This function converts the runtime memory address to a virtual address, - * then scans the vtable to find the index of the NetworkVar_StateChanged - * virtual function. It analyzes each virtual function in the vtable looking - * for the specific instruction pattern that identifies the StateChanged function. - * - * @param vtable_mem_address Runtime memory address of the vtable - * @param result Pointer to store the resulting index (as uint64_t) - * - * @return 0 on success (index written to result) - * -1 if S2BinLib not initialized - * -2 if invalid parameters - * -3 if address conversion failed - * -4 if NetworkVar_StateChanged not found in vtable - * -5 if internal error - * - * @example - * uint64_t index; - * int result = s2binlib_find_networkvar_vtable_statechanged(vtable_ptr, &index); - * if (result == 0) { - * printf("StateChanged index: %llu\n", index); - * } - */ - int s2binlib_find_networkvar_vtable_statechanged(uint64_t vtable_mem_address, uint64_t *result); +/** + * @file s2binlib.h + * @brief S2BinLib Global Singleton C API + * + * This header provides a thread-safe global singleton interface to S2BinLib. + * All functions use snake_case naming and are prefixed with s2binlib_. + * + * @note Error Codes: + * 0: Success + * -1: Not initialized + * -2: Invalid parameter + * -3: Operation failed + * -4: Not found + * -99: Mutex poisoned (internal error) + */ + +// ============================================================================ +// Type Definitions +// ============================================================================ + +/// Callback function type for pattern_scan_all functions +/// @param index The index of the current match (0-based) +/// @param address The found address (RVA or memory address depending on the function) +/// @param user_data User-provided data pointer +typedef void (*PatternScanCallback)(size_t index, void* address, void* user_data); + +// ============================================================================ +// Lifecycle Functions +// ============================================================================ + +/// Initialize the global S2BinLib001 instance with auto-detected OS +/// @param game_path Path to the game directory (null-terminated C string) +/// @param game_type Game type identifier (null-terminated C string) +/// @return 0 on success, negative error code on failure +int s2binlib_initialize(const char* game_path, const char* game_type); + +/// Initialize the global S2BinLib001 instance with explicit OS +/// @param game_path Path to the game directory (null-terminated C string) +/// @param game_type Game type identifier (null-terminated C string) +/// @param os Operating system ("windows" or "linux") (null-terminated C string) +/// @return 0 on success, negative error code on failure +int s2binlib_initialize_with_os(const char* game_path, const char* game_type, const char* os); + +/// Destroy the global S2BinLib001 instance +/// @return 0 on success, negative error code on failure +int s2binlib_destroy(void); + +// ============================================================================ +// Pattern Scanning Functions +// ============================================================================ + +/// Scan for a pattern in the specified binary and return its memory address +/// @param binary_name Name of the binary to scan (e.g., "server", "client") +/// @param pattern Pattern string with wildcards (e.g., "48 89 5C 24 ? 48 89 74 24 ?") +/// @param result Pointer to store the resulting address +/// @return 0 on success, negative error code on failure +int s2binlib_pattern_scan(const char* binary_name, const char* pattern, void** result); + +/// Scan for a pattern and return its relative virtual address +/// @param binary_name Name of the binary to scan +/// @param pattern Pattern string with wildcards +/// @param result Pointer to store the resulting RVA +/// @return 0 on success, negative error code on failure +int s2binlib_pattern_scan_rva(const char* binary_name, const char* pattern, void** result); + +/// Find all occurrences of a pattern and return their RVAs via callback +/// @param binary_name Name of the binary to scan +/// @param pattern Byte pattern to search for +/// @param callback Function pointer that will be called for each match +/// @param user_data User-provided pointer passed to each callback invocation +/// @return 0 on success, negative error code on failure +int s2binlib_pattern_scan_all_rva(const char* binary_name, const char* pattern, PatternScanCallback callback, void* user_data); + +/// Find all occurrences of a pattern and return their memory addresses via callback +/// @param binary_name Name of the binary to scan +/// @param pattern Byte pattern to search for +/// @param callback Function pointer that will be called for each match +/// @param user_data User-provided pointer passed to each callback invocation +/// @return 0 on success, negative error code on failure +int s2binlib_pattern_scan_all(const char* binary_name, const char* pattern, PatternScanCallback callback, void* user_data); + +// ============================================================================ +// VTable Functions +// ============================================================================ + +/// Find a vtable by class name and return its memory address +/// @param binary_name Name of the binary to search (e.g., "server", "client") +/// @param vtable_name Class name to search for +/// @param result Pointer to store the resulting vtable address +/// @return 0 on success, negative error code on failure +int s2binlib_find_vtable(const char* binary_name, const char* vtable_name, void** result); + +/// Find a vtable by class name and return its relative virtual address +/// @param binary_name Name of the binary to search +/// @param vtable_name Class name to search for +/// @param result Pointer to store the resulting vtable RVA +/// @return 0 on success, negative error code on failure +int s2binlib_find_vtable_rva(const char* binary_name, const char* vtable_name, void** result); + +/// Find a vtable by mangled name and return its relative virtual address +/// @param binary_name Name of the binary to search +/// @param vtable_name Mangled RTTI name to search for +/// @param result Pointer to store the resulting vtable RVA +/// @return 0 on success, negative error code on failure +int s2binlib_find_vtable_mangled_rva(const char* binary_name, const char* vtable_name, void** result); + +/// Find a vtable by mangled name and return its runtime memory address +/// @param binary_name Name of the binary to search +/// @param vtable_name Mangled RTTI name to search for +/// @param result Pointer to store the resulting vtable memory address +/// @return 0 on success, negative error code on failure +int s2binlib_find_vtable_mangled(const char* binary_name, const char* vtable_name, void** result); + +/// Find a nested vtable (2 levels) by class names and return its RVA +/// @param binary_name Name of the binary to search +/// @param class1_name Outer class name +/// @param class2_name Inner/nested class name +/// @param result Pointer to store the resulting vtable RVA +/// @return 0 on success, negative error code on failure +int s2binlib_find_vtable_nested_2_rva(const char* binary_name, const char* class1_name, const char* class2_name, void** result); + +/// Find a nested vtable (2 levels) by class names and return its memory address +/// @param binary_name Name of the binary to search +/// @param class1_name Outer class name +/// @param class2_name Inner/nested class name +/// @param result Pointer to store the resulting vtable memory address +/// @return 0 on success, negative error code on failure +int s2binlib_find_vtable_nested_2(const char* binary_name, const char* class1_name, const char* class2_name, void** result); + +/// Get the number of virtual functions in a vtable +/// @param binary_name Name of the binary to search +/// @param vtable_name Name of the vtable/class +/// @param result Pointer to store the resulting vfunc count +/// @return 0 on success, negative error code on failure +int s2binlib_get_vtable_vfunc_count(const char* binary_name, const char* vtable_name, size_t* result); + +/// Get the number of virtual functions in a vtable by RVA +/// @param binary_name Name of the binary +/// @param vtable_rva Virtual address of the vtable +/// @param result Pointer to store the resulting vfunc count +/// @return 0 on success, negative error code on failure +int s2binlib_get_vtable_vfunc_count_by_rva(const char* binary_name, uint64_t vtable_rva, size_t* result); + +// ============================================================================ +// Virtual Function Functions +// ============================================================================ + +/// Find a virtual function by vtable name and index, return RVA +/// @param binary_name Name of the binary to search +/// @param vtable_name Class name whose vtable to search for +/// @param vfunc_index Index of the virtual function in the vtable (0-based) +/// @param result Pointer to store the resulting RVA +/// @return 0 on success, negative error code on failure +int s2binlib_find_vfunc_by_vtbname_rva(const char* binary_name, const char* vtable_name, size_t vfunc_index, void** result); + +/// Find a virtual function by vtable name and index, return memory address +/// @param binary_name Name of the binary to search +/// @param vtable_name Class name whose vtable to search for +/// @param vfunc_index Index of the virtual function in the vtable (0-based) +/// @param result Pointer to store the resulting memory address +/// @return 0 on success, negative error code on failure +int s2binlib_find_vfunc_by_vtbname(const char* binary_name, const char* vtable_name, size_t vfunc_index, void** result); + +/// Find a virtual function by vtable pointer and index, return RVA +/// @param vtable_ptr Runtime pointer to the vtable +/// @param vfunc_index Index of the virtual function in the vtable (0-based) +/// @param result Pointer to store the resulting RVA +/// @return 0 on success, negative error code on failure +int s2binlib_find_vfunc_by_vtbptr_rva(void* vtable_ptr, size_t vfunc_index, void** result); + +/// Find a virtual function by vtable pointer and index, return memory address +/// @param vtable_ptr Runtime pointer to the vtable +/// @param vfunc_index Index of the virtual function in the vtable (0-based) +/// @param result Pointer to store the resulting memory address +/// @return 0 on success, negative error code on failure +int s2binlib_find_vfunc_by_vtbptr(void* vtable_ptr, size_t vfunc_index, void** result); + +// ============================================================================ +// Symbol and Export Functions +// ============================================================================ + +/// Find a symbol by name and return its memory address +/// @param binary_name Name of the binary to search +/// @param symbol_name Symbol name to search for +/// @param result Pointer to store the resulting symbol address +/// @return 0 on success, negative error code on failure +int s2binlib_find_symbol(const char* binary_name, const char* symbol_name, void** result); + +/// Find a symbol and return its relative virtual address +/// @param binary_name Name of the binary to search +/// @param symbol_name Symbol name to search for +/// @param result Pointer to store the resulting RVA +/// @return 0 on success, negative error code on failure +int s2binlib_find_symbol_rva(const char* binary_name, const char* symbol_name, void** result); + +/// Find an exported symbol and return its relative virtual address +/// @param binary_name Name of the binary to search +/// @param export_name Export name to search for +/// @param result Pointer to store the resulting RVA +/// @return 0 on success, negative error code on failure +int s2binlib_find_export_rva(const char* binary_name, const char* export_name, void** result); + +/// Find an exported symbol and return its runtime memory address +/// @param binary_name Name of the binary to search +/// @param export_name Export name to search for +/// @param result Pointer to store the resulting memory address +/// @return 0 on success, negative error code on failure +int s2binlib_find_export(const char* binary_name, const char* export_name, void** result); + +// ============================================================================ +// String Search Functions +// ============================================================================ + +/// Find a string in the binary and return its relative virtual address +/// @param binary_name Name of the binary to search +/// @param string String to search for +/// @param result Pointer to store the resulting RVA +/// @return 0 on success, negative error code on failure +int s2binlib_find_string_rva(const char* binary_name, const char* string, void** result); + +/// Find a string in the binary and return its runtime memory address +/// @param binary_name Name of the binary to search +/// @param string String to search for +/// @param result Pointer to store the resulting memory address +/// @return 0 on success, negative error code on failure +int s2binlib_find_string(const char* binary_name, const char* string, void** result); + +// ============================================================================ +// Module Base Address Functions +// ============================================================================ + +/// Set module base address from a pointer inside the module +/// @param binary_name Name of the binary +/// @param pointer Pointer inside the specified module +/// @return 0 on success, negative error code on failure +int s2binlib_set_module_base_from_pointer(const char* binary_name, void* pointer); + +/// Clear manually set base address for a module +/// @param binary_name Name of the binary +/// @return 0 on success, negative error code on failure +int s2binlib_clear_module_base_address(const char* binary_name); + +/// Get the module base address +/// @param binary_name Name of the binary +/// @param result Pointer to store the resulting base address +/// @return 0 on success, negative error code on failure +int s2binlib_get_module_base_address(const char* binary_name, void** result); + +// ============================================================================ +// Binary Loading Functions +// ============================================================================ + +/// Check if a binary is already loaded +/// @param binary_name Name of the binary to check +/// @return 1 if loaded, 0 if not loaded, negative error code on failure +int s2binlib_is_binary_loaded(const char* binary_name); + +/// Load a binary into memory +/// @param binary_name Name of the binary to load +/// @return 0 on success, negative error code on failure +int s2binlib_load_binary(const char* binary_name); + +/// Get the full path to a binary file +/// @param binary_name Name of the binary +/// @param buffer Buffer to store the path string +/// @param buffer_size Size of the buffer +/// @return 0 on success, negative error code on failure +int s2binlib_get_binary_path(const char* binary_name, char* buffer, size_t buffer_size); + +/// Set a custom binary path for a specific binary and operating system +/// @param binary_name Name of the binary +/// @param path The custom file path to the binary +/// @param os Operating system identifier ("windows" or "linux") +/// @return 0 on success, negative error code on failure +int s2binlib_set_custom_binary_path(const char* binary_name, const char* path, const char* os); + +/// Unload a specific binary from memory +/// @param binary_name Name of the binary to unload +/// @return 0 on success, negative error code on failure +int s2binlib_unload_binary(const char* binary_name); + +/// Unload all binaries from memory +/// @return 0 on success, negative error code on failure +int s2binlib_unload_all_binaries(void); + +// ============================================================================ +// Memory Read Functions +// ============================================================================ + +/// Read bytes from binary at a file offset +/// @param binary_name Name of the binary to read from +/// @param file_offset File offset to read from +/// @param buffer Buffer to store the read bytes +/// @param buffer_size Size of the buffer (number of bytes to read) +/// @return 0 on success, negative error code on failure +int s2binlib_read_by_file_offset(const char* binary_name, uint64_t file_offset, uint8_t* buffer, size_t buffer_size); + +/// Read bytes from binary at a relative virtual address +/// @param binary_name Name of the binary to read from +/// @param rva Virtual address to read from +/// @param buffer Buffer to store the read bytes +/// @param buffer_size Size of the buffer (number of bytes to read) +/// @return 0 on success, negative error code on failure +int s2binlib_read_by_rva(const char* binary_name, uint64_t rva, uint8_t* buffer, size_t buffer_size); + +/// Read bytes from binary at a runtime memory address +/// @param binary_name Name of the binary to read from +/// @param mem_address Runtime memory address to read from +/// @param buffer Buffer to store the read bytes +/// @param buffer_size Size of the buffer (number of bytes to read) +/// @return 0 on success, negative error code on failure +int s2binlib_read_by_mem_address(const char* binary_name, uint64_t mem_address, uint8_t* buffer, size_t buffer_size); + +// ============================================================================ +// Object Pointer Functions +// ============================================================================ + +/// Get the vtable name from an object pointer +/// @param object_ptr Pointer to the object +/// @param buffer Buffer to store the vtable name +/// @param buffer_size Size of the buffer +/// @return 0 on success, negative error code on failure +int s2binlib_get_object_ptr_vtable_name(const void* object_ptr, char* buffer, size_t buffer_size); + +/// Check if an object pointer has a valid vtable +/// @param object_ptr Pointer to the object +/// @return 1 if has vtable, 0 if not, negative error code on failure +int s2binlib_object_ptr_has_vtable(const void* object_ptr); + +/// Check if an object has a specific base class +/// @param object_ptr Pointer to the object +/// @param base_class_name Name of the base class to check +/// @return 1 if has base class, 0 if not, negative error code on failure +int s2binlib_object_ptr_has_base_class(const void* object_ptr, const char* base_class_name); + +// ============================================================================ +// Cross-Reference Functions +// ============================================================================ + +/// Dump and cache all cross-references in a binary +/// @param binary_name Name of the binary to analyze +/// @return 0 on success, negative error code on failure +int s2binlib_dump_xrefs(const char* binary_name); + +/// Get the count of cached cross-references for a target RVA +/// @param binary_name Name of the binary +/// @param target_rva The target relative virtual address +/// @return Non-negative count of xrefs, negative error code on failure +int s2binlib_get_xrefs_count(const char* binary_name, void* target_rva); + +/// Get cached cross-references for a target RVA into a buffer +/// @param binary_name Name of the binary +/// @param target_rva The target relative virtual address +/// @param buffer Buffer to store the xref addresses +/// @param buffer_size Size of the buffer (number of void* elements) +/// @return Non-negative count of xrefs written, negative error code on failure +int s2binlib_get_xrefs_cached(const char* binary_name, void* target_rva, void** buffer, size_t buffer_size); + +/// Follow cross-reference from memory address to memory address +/// @param mem_address Runtime memory address to analyze +/// @param target_address_out Pointer to store the target address +/// @return 0 on success, negative error code on failure +int s2binlib_follow_xref_mem_to_mem(const void* mem_address, void** target_address_out); + +/// Follow cross-reference from RVA to memory address +/// @param binary_name Name of the binary +/// @param rva Virtual address to analyze +/// @param target_address_out Pointer to store the target memory address +/// @return 0 on success, negative error code on failure +int s2binlib_follow_xref_rva_to_mem(const char* binary_name, uint64_t rva, void** target_address_out); + +/// Follow cross-reference from RVA to RVA +/// @param binary_name Name of the binary +/// @param rva Virtual address to analyze +/// @param target_rva_out Pointer to store the target RVA +/// @return 0 on success, negative error code on failure +int s2binlib_follow_xref_rva_to_rva(const char* binary_name, uint64_t rva, uint64_t* target_rva_out); + +// ============================================================================ +// JIT and Trampoline Functions +// ============================================================================ + +/// Install a JIT trampoline at a memory address +/// @param mem_address Runtime memory address where to install the trampoline +/// @param trampoline_address_out Pointer to store the trampoline address +/// @return 0 on success, negative error code on failure +int s2binlib_install_trampoline(void* mem_address, void** trampoline_address_out); + +// ============================================================================ +// NetworkVar Functions +// ============================================================================ + +/// Find the NetworkVar_StateChanged vtable index by RVA +/// @param vtable_rva Virtual address of the vtable to analyze +/// @param result Pointer to store the resulting index +/// @return 0 on success, negative error code on failure +int s2binlib_find_networkvar_vtable_statechanged_rva(uint64_t vtable_rva, uint64_t* result); + +/// Find the NetworkVar_StateChanged vtable index by memory address +/// @param vtable_mem_address Runtime memory address of the vtable +/// @param result Pointer to store the resulting index +/// @return 0 on success, negative error code on failure +int s2binlib_find_networkvar_vtable_statechanged(uint64_t vtable_mem_address, uint64_t* result); #ifdef __cplusplus } #endif - -#endif // S2BINLIB_H \ No newline at end of file diff --git a/vendor/s2binlib/s2binlib.lib b/vendor/s2binlib/s2binlib.lib index 31c7d4c83..5a0954e30 100644 Binary files a/vendor/s2binlib/s2binlib.lib and b/vendor/s2binlib/s2binlib.lib differ diff --git a/vendor/s2sdk b/vendor/s2sdk index 02d5375f2..de3c70be7 160000 --- a/vendor/s2sdk +++ b/vendor/s2sdk @@ -1 +1 @@ -Subproject commit 02d5375f2b31e3ace36821844ce74c814ca55b7b +Subproject commit de3c70be718fb622e98c49c63dbe097c6e941039