Commit Graph

406 Commits

Author SHA1 Message Date
antonWetzel 40a1d6d100 vector4 distance_squared_to and update csharp 2022-08-09 01:59:17 +02:00
Raul Santos 83ffe70f1f
Various fixes to C# documentation 2022-08-07 19:18:04 +02:00
Aaron Franke 19a4d75b44
Replace Vector3.ToDiagonalMatrix with Basis.FromScale in C# 2022-08-03 10:24:22 -05:00
Fabian Keller f242f9c738 Fix consistency of translated/scaled/rotated in Transform2D and Transform3D 2022-08-02 23:38:14 +02:00
Raul Santos a4ad1dfa51
C#: Remove unused `Transform2D.ScaleBasis` method 2022-08-01 20:56:29 +02:00
Raul Santos d0e586fc7e
Rename math 'phi' arguments to 'angle' in C# 2022-08-01 02:42:20 +02:00
antonWetzel 87ebfff46d create vector4, vector4i and projection for csharp 2022-07-31 19:42:34 +02:00
Rémi Verschelde 556cc22dd0
Merge pull request #63656 from raulsntos/fix-signal-bind-csharp 2022-07-31 13:29:31 +02:00
Aaron Franke ab4b5af286
Fix TranslatedLocal method in C# affecting the original transform 2022-07-30 11:54:35 -05:00
Raul Santos ca47471dfa
Fix Callable calls in mono module
The `Callable::call` and `Callable::call_deferred` methods have been
renamed to `Callable::callp` and `Callable::call_deferredp`.
2022-07-29 21:56:02 +02:00
Rémi Verschelde 14d021287b
Merge pull request #63049 from Faless/mp/4.x_as_module 2022-07-28 20:46:31 +02:00
Rémi Verschelde 199ea349f5
Merge pull request #57698 from bluenote10/feature/rename_translated_to_translated_local 2022-07-28 10:03:07 +02:00
Fabio Alessandrelli ca7d572908 [Net] Modularize multiplayer, expose MultiplayerAPI to extensions.
- RPC configurations are now dictionaries.
- Script.get_rpc_methods renamed to Script.get_rpc_config.
- Node.rpc[_id] and Callable.rpc now return an Error.
- Refactor MultiplayerAPI to allow extension.
- New MultiplayerAPI.rpc method with Array argument (for scripts).
- Move the default MultiplayerAPI implementation to a module.
2022-07-26 09:31:12 +02:00
Rémi Verschelde 90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
Yuri Rubinsky ccc56cc6d4 Rename `epsilon` to `tolerance` in the `Plane::has_point` method 2022-07-21 20:15:15 +03:00
Fabian Keller 2bf9e6090c rename translate(d) to translate(d)_local in Transform 2D/3D 2022-07-16 11:47:54 +02:00
Lerg 52adbb763e Fix documentation for C# Vector2/3i classes.
The / operator was wrongly documented as a multiplication.
2022-07-13 22:49:22 +02:00
Rémi Verschelde 31974aaae2
Merge pull request #62805 from raulsntos/csharp-rpc 2022-07-07 17:21:51 +02:00
Raul Santos 8131358b71
C#: New `RPCAttribute`
Replace old RPC attributes with a new single `RPCAttribute` which works
like the GDScript `@rpc` annotation.
2022-07-07 04:10:38 +02:00
Raul Santos 71f99c6d40
C#: Add `BezierInterpolate` method
Adds a `BezierInterpolate` method for floats in `Mathf` and for vectors
in `Vector2` and `Vector3`.
2022-07-06 21:59:42 +02:00
Silc Renew dc43cfc830 implement bone renamer in importer 2022-07-01 03:55:28 +09:00
Voylin c6291bcd8a Adding print_rich for printing with BBCode 2022-06-29 00:41:29 +09:00
Paul Joannon ee95a1cb28
Fix Lerp documentation and implement RangeLerp 2022-06-16 13:56:32 +02:00
Joshua Quinones 003ad31ed5
Added documentation comments to the .NET library
Comments have been added for the following:
modules/mono/glue/GodotSharp/GodotSharp/Core/GodotTaskScheduler.cs
modules/mono/glue/GodotSharp/GodotSharp/Core/GodotSynchronizationContext.cs
modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/AssemblyHasScriptsAttribute.cs
modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/DisableGodotGeneratorsAttribute.cs
modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/ExportAttribute.cs
modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/GodotMethodAttribute.cs
modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/ScriptPathAttribute.cs
2022-06-11 21:37:40 -05:00
Raul Santos 329818f20b
Support explicit values in flag properties, add C# flags support
- Add support for explicit values in properties using `PROPERTY_HINT_FLAGS`
that works the same way it does for enums.
- Fix enums and flags in VisualScriptEditor (it wasn't considering the
explicit value).
- Use `PROPERTY_HINT_FLAGS` for C# enums with the FlagsAttribute instead
of `PROPERTY_HINT_ENUM`.
2022-06-03 05:19:01 +02:00
reduz 746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
Rémi Verschelde e7a58a7eb6 Core: Rename math 'phi' arguments to 'angle' 2022-05-05 14:17:39 +02:00
Hugo Locurcio 180e5d3028
Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
Rémi Verschelde f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
Aaron Franke 89c4990274
Fix Slerp C# docs and add test cases for vectors in the same direction 2022-03-12 13:20:55 -06:00
reduz 21637dfc25 Remove VARIANT_ARG* macros
* Very old macros from the time Godot was created.
* Limited arguments to 5 (then later changed to 8) in many places.
* They were replaced by C++11 Variadic Templates.
* Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard.
* Also added a dereference check for Variant*. Helped catch a couple of bugs.
2022-03-09 18:39:13 +01:00
Berke Kocaoğlu 20d72e462b
Implement `Deconstruct` methods for C# vectors
See https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/functional/deconstruct#user-defined-types
2022-03-06 11:16:30 +03:00
Silc 'Tokage' Renew 865da09871 Implement cubic_interpolate() as MathFunc for refactoring 2022-02-12 18:11:17 +09:00
Ignacio Roldán Etcheverry f05f2dd80f
Merge pull request #57076 from IgorKordiukiewicz/fix-mono-string-capitalize
String.Capitalize() in C# now matches the behaviour of String::capitalize() in C++
2022-02-08 22:16:54 +01:00
Andrew Jacob 8675ff0a74 Allow C# Vector2/3 slerp values to have any length 2022-02-07 22:58:43 -07:00
Raul Santos 6ecb92a1fc
Rename C# `IsSubsequenceOfI` to `IsSubsequenceOfN` 2022-01-27 03:04:16 +01:00
Igor Kordiukiewicz 6c3b6664b5 String.Capitalize() in C# now matches the behaviour of String::capitalize() in C++ 2022-01-23 13:24:04 +01:00
Raul Santos e4c40efeab
Fix marshaling values of generic Godot Dictionary 2022-01-12 23:26:51 +01:00
Rémi Verschelde fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
luz paz a124f1effe Fix various typos
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn`
Update editor/import/resource_importer_layered_texture.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update doc/classes/TileSetScenesCollectionSource.xml

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/graph_edit.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/rich_text_label.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Revert previously committed change
2022-01-02 01:03:58 -05:00
Raul Santos 1fdfc379b6 Fix `KeyValuePairAt` memory leak 2021-12-23 03:15:57 +01:00
Raul Santos 2deabd553f Various fixes to C# documentation 2021-12-07 12:54:24 +01:00
Raul Santos 838f80ed91 Rename C# `Quaternion()` -> `GetQuaternion()`
To keep consistency with GDScript, the method `Quaternion()` is renamed
`GetQuaternion()`, and made `internal` so it's not exposed to scripting.
The documentation references are also fixed.

Also, the methods `GetQuaternion()` and `GetRotationQuaternion()` are
moved below `GetEuler()` to follow alphabetic order.
2021-12-06 20:18:40 +01:00
Rémi Verschelde 5baf20e638
Merge pull request #34005 from aaronfranke/minmax 2021-12-06 14:01:45 +01:00
Raul Santos d28be4d580 Fix get_all_delegates method for generic classes
If the class is generic, we must get its generic type definition and use
it to retrieve the delegates.
2021-12-04 02:54:33 +01:00
Aaron Franke 24f57886d0
Expose max_axis_index and max_axis_index for Vector2(i)
Some cleanup with Vector3(i)'s methods so that it is consistent with Vector2, for example it returns enums internally (GDScript still gets ints).
2021-12-02 23:45:41 -06:00
Raul Santos a367378f9e Rename Vector parameters to be consistent
Renames parameters that were named differently across different
scripting languages or their documentation to use the same name
everywhere.
2021-12-01 21:14:46 +01:00
Lightning_A e078f970db Rename `remove()` to `remove_at()` when removing by index 2021-11-23 18:58:57 -07:00
Yuri Roubinsky a74acca858 Expose `randfn` to global scope 2021-11-17 14:29:19 +03:00
Rémi Verschelde 471e7cbfc7
Merge pull request #54581 from aaronfranke/operator-docs 2021-11-16 14:10:09 +01:00