Commit Graph

629 Commits

Author SHA1 Message Date
RedworkDE 69948f7489 C#: Add null check before calling `UnregisterGodotObject`
(cherry picked from commit 693e6e036b)
2023-07-10 17:26:14 +02:00
Raul Santos 80105226c2 C#: Compare symbol names without null flow state
(cherry picked from commit 671a5b4ea5)
2023-07-10 17:26:13 +02:00
Rémi Verschelde 529a55bab2
Bump version to 4.1.1-rc 2023-07-05 22:14:15 +02:00
RedworkDE e0f644a48d C#: Fix editor integration breaking and causing error spam when reloading assemblies fails
- Do not reload scripts from non-collectible assemblies
- Do not load GodotTools as collectible
- Do not attempt to reload the same project assembly forever
2023-06-21 12:47:52 +02:00
Raul Santos bd65ae633d
C#: Add compat overloads 2023-06-20 12:11:13 +02:00
Raul Santos 48e20c628a
C#: Set `PropertyInfo.class_name` for method parameters 2023-06-16 23:19:38 +02:00
Rémi Verschelde 25b2f1780a
Style: Harmonize header includes in modules
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:

Includes from the platform port or module ("local" includes) should be listed
first in their own block using relative paths, before Godot's "core" includes
which use "absolute" (project folder relative) paths, and finally thirdparty
includes.

Includes in `#ifdef`s come after their relevant section, i.e. the overall
structure is:

- Local includes
  * Conditional local includes
- Core includes
  * Conditional core includes
- Thirdparty includes
  * Conditional thirdparty includes
2023-06-15 14:35:45 +02:00
Yuri Sizov f00641af9d
Merge pull request #77657 from vmedea/color-hex-doc
Clarify doc for Color.hex
2023-05-30 15:59:39 +02:00
mara 779ac20bb9 Clarify doc for Color.hex and C# Color()
The "alpha channel first" seems misleading to me. It doesn't match with
the examples, so remove it. Add a more detailed specification of the
expected number format in hex.
2023-05-30 15:15:04 +02:00
Raul Santos a1f454fee3
C#: Add global class support
Co-authored-by: willnationsdev <willnationsdev@gmail.com>
2023-05-29 19:04:02 +02:00
RedworkDE fa14b6d212 C#: Fix `SendToScriptDebugger` crash 2023-05-23 00:00:32 +02:00
RedworkDE 1cfc382fe8 C#: Mostly fix hash of ManagedCallable
The hash can still change when reloading assemblies but in all other
cases the result should be correct.
2023-05-18 13:44:36 +02:00
Gonçalo Vasconcelos b74d4f45bb C#: Add Basis.LookingAt 2023-04-11 16:05:35 +01:00
bendn ca0feabbb0
add `hex_decode()` to `String` 2023-04-05 19:44:00 +07:00
Yuri Sizov ce03630f34
Merge pull request #75477 from kleonc/csharp-fix-vector234i-from-floats-creation
C# Truncate instead of round in Vector2/3/4 to Vector2I/3I/4I conversion
2023-03-31 13:01:48 +02:00
kleonc f53d3382af C# Truncate instead of round in Vector2/3/4 to Vector2I/3I/4I conversion 2023-03-31 10:59:11 +02:00
Redwarx008 eb1fb254a6 C#: Fix Array.AddRange index out of bounds
Fix Array.AddRange index out of bounds
2023-03-27 21:55:06 +08:00
Rémi Verschelde 1c1524a651
Bump version to 4.1-dev
Can't stop, won't stop, they said, huh?
2023-03-01 01:44:37 +01:00
RedworkDE fce8a05b58 C#: Fix internal source generator on the 7.0.200 SDK 2023-02-16 11:25:47 +01:00
Caleb Kemper 103cb4bee6 Implement GodotSynchronizationContext.Send 2023-02-12 14:12:09 -07:00
RedworkDE fb0adaff9f C#: Fix AppContext.BaseDirectory 2023-02-04 14:35:11 +01:00
Rémi Verschelde bbff9fd7a4
Merge pull request #71786 from raulsntos/dotnet/array
Sync C# Array with Core
2023-02-04 00:24:06 +01:00
Rémi Verschelde 1ff2204cfe
Merge pull request #72554 from RedworkDE/net-appcontext-basedirectory
C#: Set AppContext.BaseDirectory for editor builds
2023-02-03 15:35:29 +01:00
Rémi Verschelde 5a413894fc
Merge pull request #72635 from RedworkDE/net-nodepath-iequatable
C#: Implement `IEquatable<>` and equality operators in `NodePath`
2023-02-03 15:35:22 +01:00
RedworkDE ac96af1cc9 C#: Declare `IEquatable<>` interface for `StringName` 2023-02-03 00:26:18 +01:00
RedworkDE 7403a3a11b C#: Implement `IEquatable<>` and equality operators in `NodePath`
- Implement `IEquatable<>` interface.
- Implement `==` and `!=` operators.
- Override `Equals` and `GetHashCode`.
2023-02-03 00:25:48 +01:00
RedworkDE b9d1462d2a C#: Set AppContext.BaseDirectory for editor builds 2023-02-02 15:05:11 +01:00
Rémi Verschelde e52213e2fa
More codespell fixes, do more changes from previous ignore list 2023-02-01 12:11:36 +01:00
Raul Santos 7eb8325180
Fix C# examples in documentation
- Fix documentation after C# renames.
- Add missing `partial` in C# class declarations.
- Change `delta` parameter type to `double` in C#.
- Ensure parameters match base declaration.
- Use `$` string interpolation in C#.
- Fix invalid or outdated C# code.
- Changed some examples to follow our style guide more closely.
2023-01-31 19:04:07 +01:00
Raul Santos 8166568976
C#: Implement `IEquatable` in `Rid`
- Implement `IEquatable` interface.
- Implement `==` and `!=` operators.
- Add `IsValid` method.
- Override `Equals` and `GetHashCode`.
- Fix `ToString` to follow Core.
- Sync documentation with Core.
2023-01-31 04:44:18 +01:00
Rémi Verschelde ab70b6ca8a
Merge pull request #72325 from raulsntos/dotnet/fix-72321
C#: Fix `Rotated` and `RotatedLocal`
2023-01-30 13:35:34 +01:00
Raul Santos 54f8fb010c
Sync C# Array with Core
- Add `AddRange` method.
- Add `Fill` method.
- Add `Max` and `Min` methods.
- Add `PickRandom` method.
- Add `Reverse` method.
- Add `RecursiveEqual` method.
- Add `Sort` method.
- Add `Slice` and `GetSliceRange` methods.
- Add `IndexOf` overload that takes an index parameter.
- Add `LastIndexOf` method.
- Add `BinarySearch` method.
- Add/update documentation.
2023-01-30 05:41:53 +01:00
Raul Santos cc80dda408
C#: Fix `Rotated` and `RotatedLocal`
Implementation was interchanged.
2023-01-29 18:43:54 +01:00
Raul Santos 2ef9e2933a
C#: Add `Skew` to `Transform2D` and fix `InterpolateWith`
- Add `Skew` property to `Transform2D`.
- Fix `InterpolateWith` in `Transform2D` to support skewed transforms.
2023-01-29 16:24:41 +01:00
Rémi Verschelde 80f59aa3d9
Merge pull request #72205 from raulsntos/dotnet/proxy-class
Fix lookup of C# types by their engine name
2023-01-28 15:41:28 +01:00
Rémi Verschelde 092bbfc2ea
Merge pull request #71992 from raulsntos/dotnet/rect-alt
C#: Remove `GetArea` and `GetVolume` methods
2023-01-28 15:41:04 +01:00
Raul Santos 65d0d05fa7
Fix lookup of C# types by their engine name 2023-01-27 21:28:15 +01:00
Rémi Verschelde 3c9b7ec26b
Merge pull request #72182 from raulsntos/dotnet/remove-obsolete-stringextensions
C#: Remove obsolete StringExtensions methods
2023-01-27 19:26:39 +01:00
Raul Santos b3af6141a2
C#: Remove `GetArea` and `GetVolume` methods
- Remove `GetArea` method in favor of the `Area` property in Rect2{i}.
- Replace `GetVolume` method with a `Volume` property in AABB.
2023-01-27 18:53:23 +01:00
Raul Santos 15066948d7
C#: Remove obsolete StringExtensions methods 2023-01-27 17:15:23 +01:00
Raul Santos 1aa54141e6
C#: Implement readonly-ness in Array and Dictionary
- Expose `IsReadOnly` and add `MakeReadOnly` method.
2023-01-27 15:25:34 +01:00
Rémi Verschelde bd1df0f2e3
Merge pull request #71943 from paulloz/debugger/better-errors-printing
Better error display in debugger panel
2023-01-27 10:32:38 +01:00
Paul Joannon c93eec4139
Better error display in debugger panel
- Use the right stack frame info as title of the error.
- Use the actual C# exception type as error for exceptions raised from C#.
- Show the right language instead of always **C++ Error**.
2023-01-27 10:01:55 +01:00
Raul Santos 1aceacaa6b
C#: Rename `Object` to `GodotObject` 2023-01-27 02:04:18 +01:00
Raul Santos a968e51414
C#: Renames to follow .NET naming conventions
Renamed C# types and members to use PascalCase and follow .NET naming conventions.
2023-01-27 02:04:17 +01:00
Rémi Verschelde 2edef2a795
Merge pull request #71825 from RedworkDE/net6-roll-forward
C#: Allow use of .NET 7
2023-01-27 00:13:54 +01:00
Rémi Verschelde 0d1b5f8832
Merge pull request #71356 from raulsntos/dotnet/get
C#: Lookup signals and methods in Get method
2023-01-27 00:13:13 +01:00
Rémi Verschelde fdd3613de1
Merge pull request #71984 from raulsntos/dotnet/dictionary
Sync C# Dictionary with Core
2023-01-26 23:44:01 +01:00
Rémi Verschelde 239145d9cb
Merge pull request #71946 from raulsntos/dotnet/gd
C#: Sync GD with Core
2023-01-26 23:43:36 +01:00
Rémi Verschelde bacf594a49
Merge pull request #71583 from raulsntos/dotnet/math
C#: Add float an double overloads to Mathf
2023-01-26 23:43:11 +01:00