summaryrefslogtreecommitdiff
path: root/modules/mono
AgeCommit message (Collapse)Author
2023-01-23C#: Move `LinearToDb` and `DbToLinear` to MathfRaul Santos
2023-01-23Convert en_GB spelling to en_US with codespellRémi Verschelde
2023-01-21Support script global resource name in EditorFileSystemJuan Linietsky
* Works for binary and text files. * Makes EditorQuickOpen work with custom resources again. * Information is cached and easily accessible. Properly fixes #66179. Supersedes #66215 and supersedes #62417 **WARNING**: This required breaking backwards binary compatibility (.res and .scn files). Files saved after this PR is merged will no longer open in any earlier versions of Godot.
2023-01-18Merge pull request #71638 from raulsntos/dotnet/export-pluginRémi Verschelde
C#: Implement `ExportPlugin::_get_name` and move `GLOBAL_DEF` to CSharpLanguage
2023-01-18C#: Move `GLOBAL_DEF`s to CSharpLanguage ctorRaul Santos
Also documents the .NET project settings.
2023-01-18C#: Implement `ExportPlugin::_get_name`Raul Santos
2023-01-17Sync C# vectors with CoreRaul Santos
- Remove `Vector2.Lerp` overload that takes a weight parameter of type `Vector2`. - Remove `Vector3.Lerp` overload that takes a weight parameter of type `Vector3`. - Remove `Color.Lerp` overload that takes a weight parameter of type `Color`. - Remove `Angle` method from `Vector2i`. - Remove `AngleTo` method from `Vector2i`. - Remove `AngleToPoint` method from `Vector2i`. - Remove `Cross` method from `Vector2i`. - Remove `DistanceSquaredTo` method from `Vector2i` and `Vector3i`. - Remove `DistanceTo` method from `Vector2i` and `Vector3i`. - Remove `Dot` method from `Vector2i` and `Vector3i`. - Remove `PosMod` method from `Vector2i` and `Vector3i`. - Remove `Orthogonal` method from `Vector2i`. - Remove `&` operator from `Vector2i` and `Vector3i`.
2023-01-17Merge pull request #71516 from raulsntos/dotnet/property-accessorsRémi Verschelde
C#: Make property accessors internal
2023-01-16C#: Make property accessors internalRaul Santos
2023-01-16C#: Implement `Mathf.SinCos`Raul Santos
Implement `Mathf.SinCos` that wraps a call to `System.Math.SinCos`, this allows us to use the `SinCos` method more conveniently with `real_t`. Using `Math.SinCos` is often cheaper than separate calls to `Math.Sin` and `Math.Cos`, and they are often used together.
2023-01-16Merge pull request #71458 from raulsntos/dotnet/quaternionRémi Verschelde
C#: Make `Length` and `LengthSquared` into methods in `Quaternion`.
2023-01-16Merge pull request #71456 from raulsntos/dotnet/sync-planeRémi Verschelde
C#: Sync `Plane` with Core
2023-01-16Merge pull request #71445 from raulsntos/dotnet/transformsRémi Verschelde
C#: Add missing `Transform{2D,3D}` and `Basis` constructors
2023-01-15C#: Sync `Plane` with CoreRaul Santos
- Add `Plane(Vector3)` constructor. - Rename `IntersectRay` to `IntersectsRay`. - Rename `IntersectSegment` to `IntersectsSegment`. - Replace `Center` property with `GetCenter` method. - Add and fix documentation about the _normal_ parameter to Core and C# documentation.
2023-01-15C#: Add missing `Transform{2D,3D}` and `Basis` constructorsRaul Santos
- Remove `Transform3D(Quaternion, Vector3)` constructor from C#. - Add `Transform3D(Projection)` constructor to C#. - Add documentation to the `Transform3D(Projection)` constructor in Core. - Add `Transform3D` constructor with only real_t params to C# that mirrors `Transform2D`. - Expose `Basis` constructor with only real_t params in C#. - Add `Transform2D(real_t, Vector2, real_t, Vector2)` constructor to C#.
2023-01-15C#: Replace `Rotation` and `Scale` properties with get methodsRaul Santos
- Replace `Rotation` property with `GetRotation` method in `Transform2D`. - Replace `Scale` property with `GetScale` method in `Transform2D`. - Replace `Scale` property with `GetScale` method in `Basis`. Core does not expose set methods.
2023-01-15C#: Make `Length` and `LengthSquared` into methods in `Quaternion`.Raul Santos
The `Length` and `LengthSquared` members are implemented as methods in every other C# struct, `Quaternion` was the only one implementing them as properties.
2023-01-15Merge pull request #71374 from ↵Rémi Verschelde
raulsntos/dotnet/remove-spherical_interpolate_with C#: Remove `SphericalInterpolateWith` from Transform3D
2023-01-15Merge pull request #71423 from ↵Rémi Verschelde
raulsntos/dotnet/intersects-without-include_borders C#: Remove `includeBorders` parameter from `Rect2i.Intersects` and `AABB.Intersects`
2023-01-14C#: Sync `Basis` with CoreRaul Santos
- Remove `GetOrthogonalIndex` method (moved to `GridMap`). - Remove `GetRow` and `SetRow` methods.
2023-01-14C#: Remove `includeBorders` parameter from `Rect2i.Intersects` and ↵Raul Santos
`AABB.Intersects`
2023-01-14C#: Remove `SphericalInterpolateWith` from Transform3DRaul Santos
2023-01-13Merge pull request #71339 from raulsntos/dotnet/is_finiteYuri Sizov
Add `IsFinite` to C# Variants
2023-01-13Merge pull request #71343 from raulsntos/dotnet/is_zero_approxYuri Sizov
Add `IsZeroApprox` to C# vectors
2023-01-13Add `IsZeroApprox` to C# vectorsRaul Santos
2023-01-13Add `IsFinite` to C# VariantsRaul Santos
2023-01-13Refactor ProjectSetting overridesJuan Linietsky
* Overrides no longer happen for set/get. * They must be checked with a new function: `ProjectSettings::get_setting_with_override()`. * GLOBAL_DEF/GLOBAL_GET updated to use this This change solves many problems: * General confusion about getting the actual or overriden setting. * Feature tags available after settings are loaded were being ignored, they are now considered. * Hacks required for the Project Settings editor to work. Fixes #64100. Fixes #64014. Fixes #61908.
2023-01-11Improve description of `GetNodeOrDefault` in C# APIGuillermo
Indenting with spaces and added a line break Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-01-09Merge pull request #71114 from reduz/cleanup-property-hintsRémi Verschelde
Removed unused property hints and `Object::get_translatable_strings()`
2023-01-09Removed unused property hints and `Object::get_translatable_strings()`Juan Linietsky
* Remove unused `EditorPropertyMember` and related hints, previouly used by VisualScript. Such logic should be implemented in the VS module itself. * As the above broke compatibility with the VS module, clean up the other hacks that were still in core in support of VisualScript. * `PROPERTY_USAGE_INTERNATIONALIZED` was only used in Object's `get_translatable_strings()`, which is a legacy function not used anywhere. So both are removed. * Reordered some usage flags after the above removal to minimize the diff. * General clean up. Fixes #30203. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-01-09C#: Add `[Flags]` attribute to core bitfield enumsRaul Santos
2023-01-08Use BitField<> hint for ArrayFormatJuan Linietsky
This was missing in the conversion of bitflags to BitField<>.
2023-01-06Merge pull request #70547 from TokageItLab/pingpong-wrapRémi Verschelde
Fix pingpong-loop with `loop_wrap` is not working & clean-up cubic interpolation key retrieve process
2023-01-05One Copyright Update to rule them allRémi Verschelde
As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
2022-12-30Merge pull request #70511 from raulsntos/dotnet/fix-update-script-class-infoIgnacio Roldán Etcheverry
C#: Skip getting class info for unbound generics
2022-12-28C#: Avoid generic types in the script path attribute generatorRaul Santos
- Avoid generic types in `ScriptPathAttributeGenerator`, this means they won't be added to the `[AssemblyHasScripts]` attribute and a `[ScriptPath]` attribute won't be added to the class. Since generic classes can't be used as scripts they shouldn't use those attributes, this also makes CSharpScript consider those types invalid since they won't be added to the script/type map. - Avoid generic types in `ScriptManagerBridge.LookupScriptsInAssembly`. - Set `outMethodsDest` in `ScriptManagerBridge.UpdateScriptClassInfo`.
2022-12-25Fix pingpong with loop wrap is not workingSilc Renew
2022-12-24Merge pull request #70509 from irwiss/reverse-Vector2.AngleToPointIgnacio Roldán Etcheverry
C#: reverse Vector2.AngleToPoint
2022-12-24C#: reverse Vector2.AngleToPointAlexey Kim
2022-12-23C#: Fix leak in Span to Variant conversionsIgnacio Roldán Etcheverry
2022-12-23Merge pull request #70486 from raulsntos/dotnet/convert-toIgnacio Roldán Etcheverry
C#: Rename `ConvertToX` methods
2022-12-23C#: Rename `ConvertToX` methodsRaul Santos
- Renamed `ConvertToX` to `ConvertToNativeX`. - Renamed `ConvertToXObject` to `ConvertToX`. - Renamed `ConvertToXManaged` to `ConvertToX`. - Fix `Signal` name in bindings generator and csharp script.
2022-12-23C#: Disallow init-only propertiesRaul Santos
ReadOnly properties are currently not allowed because the generated code needs to set them, this also apply to `init` properties because they need to be set after initialization.
2022-12-17C#: Add note about the class name in instantiate errorRaul Santos
Adds a note about the requirement that a C# class name must match the script filename in which the they are defined to the instantiate error.
2022-12-16Merge pull request #69867 from raulsntos/dotnet/colorIgnacio Roldán Etcheverry
C#: Synchronize Color with Core
2022-12-16C#: Synchronize Color with CoreRaul Santos
- Add `Luminance` readonly property. - Add `LinearToSrgb` and `SrgbToLinear` static methods. - Add `FromOkHsl` static method. - Add `FromRgbe9995` static method. - Add `FromString` static method. - Expose `FromHtml` static method. - Expose `HtmlIsValid` static method. - Add and update some Color documentation.
2022-12-15Merge pull request #70125 from TokageItLab/cs-sync-usage-flagsRémi Verschelde
Fix out of sync PropertyUsageFlags for cs
2022-12-16Fix out of sync PropertyUsageFlags for csSilc Renew
2022-12-15Added Projection to ConvertTo<T> and CreateFrom<T>Alberto Vilches
2022-12-15Fix typos with codespellRémi Verschelde