Commit Graph

296 Commits

Author SHA1 Message Date
a5424c321e GLTF: Make handle binary image mode enum type-safe 2025-11-04 10:42:11 -08:00
a149280cea ClassDB: Use AHashMap for property_setget and constant/signal_map 2025-10-28 16:24:54 -03:00
414a4977d8 Merge pull request #108489 from raulsntos/dotnet/fix-bindgen-errors
[.NET] Fix various errors in bindings generator
2025-10-20 18:09:47 -05:00
a50fc5acd8 Change ClassDB::get_class_list and related stuff. 2025-09-16 15:00:33 +08:00
1825146ef1 [.NET] Fix various errors in bindings generator
- Fix `is_intentionally_ignored` check, the names in the hash map are not fully-qualified.
- Add a special case for `object.ToString`.
- Validate API type before attempting to reference a type member.
2025-07-09 20:20:54 +02:00
ab90808fee Fix crash in C# bindings generator with bad enum documentation XML 2025-07-03 20:48:09 -07:00
13f642d959 Replace XML codeblock spaces with tabs 2025-06-06 14:35:38 +02:00
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
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
a404b668a1 Change Node set_name to use StringName 2025-05-01 15:15:19 -07:00
b0348d0e58 C#: Avoid StringName allocation in GodotObject.Free 2025-04-17 20:10:34 +08:00
889410dcda Add String::replace_char(s) methods for performance and convenience 2025-04-10 13:08:45 +02:00
13741ff913 Add FoldableContainer
Co-authored-by: WhalesState <whalesstate@gmail.com>
2025-04-08 22:27:32 +02:00
7a1a970c25 size() <= 0 and size() < 1. 2025-04-02 19:18:44 +08:00
4f4031a675 Replace size() == 0 with is_empty(). 2025-04-02 19:18:43 +08:00
1cb3cfaa8e Style: Convert namespaces to PascalCase 2025-03-23 19:10:24 -05:00
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
2213545fc5 [.NET] Deprecate compat methods that reference deprecated types 2025-03-14 21:33:33 +01:00
7cb2fb189a Remove TOOLS_ENABLED checks from editor/ 2025-03-14 18:13:16 +01:00
b377562b52 Merge pull request #91660 from AThousandShips/methodinfo_vec
[Core] Use `Vector` for `MethodInfo::arguments`
2025-03-14 10:06:13 -05:00
6c9087fb5a Fix missing Vector4(i) and Projection in C# bindings generator 2025-03-13 19:04:47 -07:00
d9721954e6 [Core] Use Vector for MethodInfo::arguments 2025-03-10 13:57:53 +01:00
331a43a9d8 Add String::remove_char(s) methods for performance and convenience 2025-03-10 13:19:28 +01:00
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
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
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
57d08dbec3 C#: Fix warnings caught by new problem-matchers
• Restore MSVC problem matcher for Linux builds
2024-12-10 14:04:35 -06:00
b5c31ebb41 Add contains_char() for single-character 'contains' calls. 2024-12-06 20:23:35 +01:00
03b05cf9ac Core: Fix built-in enum constant bindings 2024-11-22 14:03:21 +03:00
68f638cf02 Use (r)find_char instead of (r)find for single characters 2024-11-17 10:02:18 +01:00
5c0f2414cd Always add decimal when printing float 2024-10-23 15:00:21 +02:00
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
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
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
da37998dc8 C#: Generate On{EventName} method to raise signal events 2024-09-26 20:10:53 +02:00
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
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
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
d6c0a53ecf Add error messages to binding generator 2024-09-19 13:31:05 -04:00
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
9853a69144 Implement typed dictionaries 2024-09-04 10:27:26 -05:00
3d575801ce Allow ClassDB to create a Object without postinitialization for GDExtension. 2024-08-20 20:19:02 +08:00
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
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
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
baec8da3b3 .NET: Prevent generating mono glue in project folder
Fixes #83128.
2024-05-03 14:24:35 +02:00
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
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
7290e7d7a5 C#: Fix warnings
- Fix most CS0108 in generated glue
- Suppress CA1001 on `Variant`
2024-03-09 17:05:23 +01:00