Aaron Franke
ab90808fee
Fix crash in C# bindings generator with bad enum documentation XML
2025-07-03 20:48:09 -07:00
kobewi
13f642d959
Replace XML codeblock spaces with tabs
2025-06-06 14:35:38 +02:00
aaronp64
6b2674fe18
Reuse and optimize sorting logic for List, SelfList, and HashMap
...
Added SortList class, and updated List, SelfList, and HashMap sort methods to use it. Sorting is done with merge sort, with an initial check to optimize for already sorted lists, and sorted lists that were appended to.
2025-06-04 10:18:22 -04:00
Thaddeus Crews
d237e31a89
Style: Remove redundant DEBUG_METHODS_ENABLED
...
• Replaced with functionally identical and far more ubiquitous `DEBUG_ENABLED`
2025-05-15 13:09:41 -05:00
Aaron Franke
a404b668a1
Change Node set_name to use StringName
2025-05-01 15:15:19 -07:00
LuoZhihao
b0348d0e58
C#: Avoid StringName allocation in GodotObject.Free
2025-04-17 20:10:34 +08:00
A Thousand Ships
889410dcda
Add String::replace_char(s) methods for performance and convenience
2025-04-10 13:08:45 +02:00
kobewi
13741ff913
Add FoldableContainer
...
Co-authored-by: WhalesState <whalesstate@gmail.com >
2025-04-08 22:27:32 +02:00
Yufeng Ying
7a1a970c25
size() <= 0 and size() < 1.
2025-04-02 19:18:44 +08:00
Yufeng Ying
4f4031a675
Replace size() == 0 with is_empty().
2025-04-02 19:18:43 +08:00
Thaddeus Crews
1cb3cfaa8e
Style: Convert namespaces to PascalCase
2025-03-23 19:10:24 -05:00
Thaddeus Crews
a9065db5ad
Merge pull request #104130 from KoBeWi/are_tools_enabled_when_tools_are_enabled
...
Remove `TOOLS_ENABLED` checks from `editor/`
2025-03-17 10:52:25 -05:00
Raul Santos
2213545fc5
[.NET] Deprecate compat methods that reference deprecated types
2025-03-14 21:33:33 +01:00
kobewi
7cb2fb189a
Remove TOOLS_ENABLED checks from editor/
2025-03-14 18:13:16 +01:00
Thaddeus Crews
b377562b52
Merge pull request #91660 from AThousandShips/methodinfo_vec
...
[Core] Use `Vector` for `MethodInfo::arguments`
2025-03-14 10:06:13 -05:00
Aaron Franke
6c9087fb5a
Fix missing Vector4(i) and Projection in C# bindings generator
2025-03-13 19:04:47 -07:00
A Thousand Ships
d9721954e6
[Core] Use Vector for MethodInfo::arguments
2025-03-10 13:57:53 +01:00
A Thousand Ships
331a43a9d8
Add String::remove_char(s) methods for performance and convenience
2025-03-10 13:19:28 +01:00
A Thousand Ships
5113022dfe
Clean up some uses of String::substr
...
Cases where the end position is either equvalent to the default or past
the end of the string.
2025-03-07 14:50:38 +01:00
Raul Santos
5a53ec55ec
[.NET] Add Obsolete attribute to signal trampolines and emitter functions
...
If a signal is deprecated, make sure we also add the `[Obsolete]` attribute to that signal's trampoline and emitter functions.
2025-01-24 02:18:28 +01:00
Raul Santos
975369fceb
[.NET] Fix EmitSignal with typed array parameters
...
Signals with typed arrays were generating EmitSignal methods with untyped array parameters.
2024-12-20 06:51:09 +01:00
Thaddeus Crews
57d08dbec3
C#: Fix warnings caught by new problem-matchers
...
• Restore MSVC problem matcher for Linux builds
2024-12-10 14:04:35 -06:00
Lukas Tenbrink
b5c31ebb41
Add contains_char() for single-character 'contains' calls.
2024-12-06 20:23:35 +01:00
Danil Alexeev
03b05cf9ac
Core: Fix built-in enum constant bindings
2024-11-22 14:03:21 +03:00
A Thousand Ships
68f638cf02
Use (r)find_char instead of (r)find for single characters
2024-11-17 10:02:18 +01:00
kobewi
5c0f2414cd
Always add decimal when printing float
2024-10-23 15:00:21 +02:00
Thaddeus Crews
cb3c01a5fe
Merge pull request #97588 from TML233/generated-raise-signal
...
[C#] Change generated On{SignalName} to EmitSignal{SignalName}
2024-10-21 16:39:12 -05:00
DE YU
d4695e84a4
Add ReadOnlySpan API Overloads
...
Co-authored-by: Raul Santos <raulsntos@gmail.com >
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com >
2024-10-09 23:14:38 +08:00
TML
fa48ed9945
Change generated On{SignalName} to EmitSignal{SignalName}
2024-09-28 22:10:33 +08:00
Rémi Verschelde
543fa16b4c
Merge pull request #68233 from raulsntos/dotnet/raise-events
...
C#: Generate strongly-typed method to raise signal events and fix event accessibility
2024-09-27 13:53:11 +02:00
Raul Santos
da37998dc8
C#: Generate On{EventName} method to raise signal events
2024-09-26 20:10:53 +02:00
Rémi Verschelde
ea8d20d35b
Merge pull request #96955 from Delsin-Yu/generator-based-CreateManagedForGodotObjectBinding
...
[.NET] Replace Reflection-Based implementation with Generated one in `CreateManagedForGodotObjectBinding`
2024-09-23 16:13:49 +02:00
Rémi Verschelde
c65ab71230
Merge pull request #94953 from raulsntos/dotnet/signals-with-typed-arrays
...
C#: Generate signal delegates with typed arrays
2024-09-23 12:27:45 +02:00
DE YU
307224927c
Replace Reflection-Based implementation with Generated one
...
Co-authored-by: Raul Santos <raulsntos@gmail.com >
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com >
2024-09-22 18:01:14 +08:00
Matt Enad
d6c0a53ecf
Add error messages to binding generator
2024-09-19 13:31:05 -04:00
Raul Santos
aaffab8afb
Add metadata for char16_t and char32_t
...
We don't seem to expose any API that uses `char16_t` yet, but I added it anyway since we make the type info for it.
I didn't add anything for `wchar_t` because we are not making a type info so maybe we don't have a need for it yet, it could be added in the future.
To prevent breaking compatibility with the C# bindings, we ignore the `char32_t` metadata and still use `System.Int64`.
2024-09-12 02:15:55 +02:00
Thaddeus Crews
9853a69144
Implement typed dictionaries
2024-09-04 10:27:26 -05:00
Daylily-Zeleen
3d575801ce
Allow ClassDB to create a Object without postinitialization for GDExtension.
2024-08-20 20:19:02 +08:00
Raul Santos
f3841d644e
C#: Generate signal delegates with typed arrays
...
Signals with typed arrays were generating C# delegates with untyped arrays.
2024-07-30 18:39:03 +02:00
A Thousand Ships
a0dbdcc3ab
Replace find with contains/has where applicable
...
* Replaces `find(...) != -1` with `contains` for `String`
* Replaces `find(...) == -1` with `!contains` for `String`
* Replaces `find(...) != -1` with `has` for containers
* Replaces `find(...) == -1` with `!has` for containers
2024-05-08 12:37:42 +02:00
A Thousand Ships
955d5affa8
Reduce and prevent unnecessary random-access to List
...
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)
* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
Rémi Verschelde
baec8da3b3
.NET: Prevent generating mono glue in project folder
...
Fixes #83128 .
2024-05-03 14:24:35 +02:00
K. S. Ernest (iFire) Lee
f9b488508c
Add PackedVector4Array Variant type
...
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com >
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com >
2024-05-03 00:58:27 +02:00
Raul Santos
7d08e8727b
C#: Make internal properties and property accessors public (but hidden)
...
Instead of making the accessors `internal` which can break binary compat, make them `public` but hide them with EB never so they don't show up in IntelliSense.
Also, do the same for properties with the `PROPERTY_USAGE_INTERNAL` flag. These properties were not meant to be exposed to scripting, but since they've been public before all we can do now is hide them.
2024-03-29 20:36:04 +01:00
Paul Joannon
7290e7d7a5
C#: Fix warnings
...
- Fix most CS0108 in generated glue
- Suppress CA1001 on `Variant`
2024-03-09 17:05:23 +01:00
Rémi Verschelde
1598af5668
Merge pull request #83504 from Repiteo/c#-generator-langword-check
...
C#: Bindings generator langword check
2024-03-04 13:32:34 +01:00
Rémi Verschelde
a64cb8eff3
Merge pull request #88570 from paulloz/dotnet/warnings-editorconfig-cleanup
...
[.NET] Better `.editorconfig` setup in `modules/mono/`
2024-02-27 21:23:03 +01:00
Paul Joannon
139a5df821
Cleanup C# projects, code quality & style
...
New rules:
- Do not silence CA1805 any more
- Limit where we silence CA1707, CA1711, CA1720
- Enforce severity=warning for IDE0040
- Enforce Allman style braces
- Enforce naming conventions (IDE1006 is still severity=suggestion)
Fixes:
- Fix REFL045, CS1572, CS1573
- Suppress CS0618 when generating `InvokeGodotClassMethod`
- Fix indent when generating GD_constants.cs
- Temporarily silence CS1734 in generated code
- Fix a lot of naming rule violations
Misc.:
- Remove ReSharper comments for RedundantNameQualifier
- Remove suppression attributes for RedundantNameQualifier
- Remove severity=warnings for CA1716, CA1304 (already included in the level of analysis we run)
2024-02-27 20:11:24 +01:00
Thaddeus Crews
be7019de0f
C#: Only check for empty deprecation message if deprecated
2024-02-27 10:22:32 -06:00
Raul Santos
40b7dd0cf3
C#: Add deprecated message to generated bindings
...
Uses the `DocData` deprecated message in the C# `[Obsolete]` attribute added to deprecated members.
2024-02-23 20:30:36 +01:00