Commit Graph

145 Commits

Author SHA1 Message Date
Ignacio Etcheverry 1d952f8d69 C#: Throw NullReferenceException for null NodePath/RID params
(cherry picked from commit 008769aee9)
2019-11-29 16:02:02 +01:00
Ignacio Etcheverry b6bcd09d7c C#: Fix Color.ToHtml()
(cherry picked from commit 57fe284fe6)
2019-11-08 15:48:19 +01:00
Aaron Franke 3a7aa3a0e4
[3.1] [Mono] Make all structs serializable
Manually cherrypicked from https://github.com/godotengine/godot/pull/31191
2019-08-19 19:23:18 -04:00
Aaron Franke 329817edad
[3.1] [Mono] Backport gitignore files
This avoids seeing files generated on master when switching to the 3.1 branch.
2019-08-19 19:19:21 -04:00
Aaron Franke a51257e2b7
[Mono] Change Atan2 arguments to Y X 2019-06-09 04:15:32 -04:00
Rémi Verschelde f7d5bee636 Revert "C#: Add DynamicGodotObject class"
This reverts commit 4c10a322d1.
2019-04-25 14:08:14 +02:00
Ignacio Etcheverry 39f1a110a1 Fix wrong method binds and registered class
(cherry picked from commit 2f3328a039)
2019-04-22 21:57:06 +02:00
Chaosus 6ab01490f5 Added smoothstep built-in function
(cherry picked from commit 514a3fb96a)
2019-04-20 23:30:56 +02:00
Chaosus 340bf6e80c Added direction_to method to vectors
(cherry picked from commit 55f3bd97a2)
2019-04-20 23:24:35 +02:00
Fabio Alessandrelli e0fe795433 Add object encoding param to serialization methods
Network peers get_var/put_var
File get_var/store_var
GDScript/Mono/VisualScript bytes2var/var2bytes
Add MultiplayerAPI.allow_object_decoding member which deprecates PacketPeer.allow_object_decoding.

Break ABI compatibaility (API compatibility for GDNative).

(cherry picked from commit 393e62b98a)
2019-04-20 23:15:02 +02:00
Ignacio Etcheverry 9b65bd18bc Fix memory leak introduced in bb6814a
(cherry picked from commit 0338e55a6e)
2019-04-20 23:10:55 +02:00
Ignacio Etcheverry 4c10a322d1 C#: Add DynamicGodotObject class
Expands to Object.call, Object.set and Object.get for accessing members. This means it can also access members from scripts written in other languages, like GDScript.

(cherry picked from commit bb6814aef0)
2019-04-20 23:10:43 +02:00
ForLoveOfCats 24ac1439e8 Mono: Convert all items to string before printing
(cherry picked from commit 25f563c4c8)
2019-04-20 23:00:21 +02:00
ForLoveOfCats 276cd771f9 Mono: Makes GD.Convert take Variant.Type instead of int
(cherry picked from commit 46e79e6fad)
2019-04-06 21:19:36 +02:00
Ignacio Roldán Etcheverry 65487ed4ed
Merge pull request #26746 from shartte/godot-trace-listener
Add a custom TraceListener on Startup for Mono
2019-03-08 07:05:41 +01:00
Sebastian Hartte 37d448fca7 Added a Godot TraceListener, which is automatically installed on startup. Fixes that Debug/Trace Assertions are simply swallowed by Godot. 2019-03-07 21:00:19 +01:00
Chaosus 752055ccba Fix division by zero at wrap functions in mono 2019-03-07 22:57:12 +03:00
Ignacio Etcheverry b69569415f
Merge pull request #26411 from neikeq/issue-26195
C#: Add Array.Resize(int) method
2019-02-28 18:53:14 +01:00
Ignacio Etcheverry 32cd8ba9bd C#: Add Array.Resize(int) method 2019-02-28 18:33:42 +01:00
marxin e5f665c718 Fix -Wsign-compare warnings.
I decided to modify code in a defensive way. Ideally functions
like size() or length() should return an unsigned type.
2019-02-27 07:45:57 +01:00
Ignacio Etcheverry da3776a40a C#: Fix Vector2.AngleToPoint
Fixes #26209
2019-02-23 23:28:31 +01:00
Ignacio Etcheverry 2c26e7f174 C#: Basis fixes and cleanup
Fix Basis operator[int]. Now it returns columns instead of rows.
Fix Transform2D.AfficeInverse() mutating rather than returning a new Transform2D.
2019-02-23 18:22:30 +01:00
Ignacio Etcheverry 0826b79035 C#: Make GD.Range return IEnumerable instead of array
- Make NodePath and RID sealed classes.
- Renamed rand_range to RandRange.
2019-02-19 18:46:18 +01:00
Ignacio Etcheverry 29fd942dd6
Merge pull request #26039 from neikeq/throw_objectdisposedexception
C#: Throw ObjectDisposedException from disposed wrapper classes
2019-02-19 01:02:20 +01:00
Ignacio Etcheverry e1f01bf2ac
Merge pull request #26038 from neikeq/csharp_rand_funcs
C#: Add random functions to GD class
2019-02-19 00:52:01 +01:00
Ignacio Etcheverry efd5d4bcf9 C#: Throw ObjectDisposedException from disposed wrapper classes 2019-02-19 00:37:15 +01:00
Ignacio Etcheverry ce67808818 C#: Add random functions to GD class 2019-02-19 00:35:19 +01:00
RomanAkberov 041a7bbeba C#: fix Quat.Equals. 2019-02-19 01:01:05 +07:00
Rémi Verschelde 55ca2a7c88
Merge pull request #25821 from akien-mga/sync-class-and-filenames
Ensure classes match their header filename
2019-02-13 08:49:39 +01:00
Aaron Franke f97eb6d881 [Mono] Fix Transform2D rotation and scale 2019-02-12 17:59:29 -05:00
Rémi Verschelde b7cc2bb1e2 Core: Ensure classes match their header filename
Also drop some unused files.

Renamed:
- `core/dvector.h` -> `pool_vector.h`
- `core/io/resource_import.h` -> `resource_importer.h`
- `core/sort.h` -> `sort_array.h`
- `core/string_db.h` -> `string_name.h`

Dropped:
- `core/allocators.h`
- `core/os/shell.h`
- `core/variant_construct_string.cpp`
2019-02-12 13:34:25 +01:00
Carter Anderson 22bf89e970 Use "origin" instead of "o" in Transform2D.Rotation 2019-02-11 23:46:55 -08:00
Aaron Franke 25a90bcf1a [Mono] Fix Transform2D origin 2019-02-09 14:56:14 -05:00
Ignacio Etcheverry 3233083f63 Mono: Lifetime fixes for CSharpInstance and instance binding data
Avoid CSharpInstance from accessing its state after self destructing (by deleting the Reference owner).
It's now safe to replace the script instance without leaking or crashing.

Also fixed godot_icall_Object_weakref return reference being freed before returning.
2019-02-03 06:47:25 +01:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Kelly Thomas a5e38586ce fix capitalization for antiquewhite 2018-12-23 08:00:35 +08:00
Kelly Thomas 09496d93b1 [Mono] Color - add ColorN(), Colors - add named color properties 2018-12-21 15:01:32 +08:00
Ignacio Etcheverry f6f2be7577 Fix crash due to ~CSharpInstance() being called on freed instance
This would be the case when calling SetScript on an object with a C# script.
2018-12-01 02:28:24 +01:00
Ignacio Etcheverry d275d848b3 C#: Replace calls to old of old Basis(Vec3,Vec3,Vec3) constructor 2018-11-20 22:23:09 +01:00
Rémi Verschelde 173b342ca7 Remove trailing whitespace
With `sed -i $(rg -l '[[:blank:]]*$' -g'!thirdparty') -e 's/[[:blank:]]*$//g'`
(+ manual revert of some thirdparty code under `platform/android`).
2018-11-20 11:15:02 +01:00
Ignacio Etcheverry 5712daf2d9
Merge pull request #23833 from neikeq/hh
C#: Fix Basis(Vec3,Vec3,Vec3) constructor
2018-11-20 06:13:29 +01:00
Ignacio Etcheverry bf94eed60c C#: Fix Basis(Vec3,Vec3,Vec3) constructor
Now it sets axes in order to match GDScript implementation.
2018-11-20 02:08:22 +01:00
Michael Alexsander Silva Dias 92342690f7 Rename "Log*()" functions to "Push*()" in C# 2018-10-31 15:40:38 -03:00
Ben Rog-Wilhelm f2476f8a7c Add new log functions for C#. 2018-10-25 20:32:50 -07:00
Ignacio Etcheverry b63e518ce9 Mono: Fix crash on NodePath/RID disposal during Godot shutdown 2018-10-06 23:00:18 +02:00
Ignacio Etcheverry b5aa5bca12 Fix C# API assembly build errors in generics 2018-10-05 19:39:11 +02:00
zochris 4a11864968
loosen generic guard on method for ResourceLoader
For more details see #22658
2018-10-05 15:32:33 +02:00
zochris b84992e374
loosen generic guard on Node extension methods
For more details see #22658
2018-10-05 15:06:05 +02:00
Ignacio Etcheverry 50fd5ef3b5 Mono: Fix not creating generic Array or Dictionary where expected 2018-09-27 00:11:31 +02:00
Kelly Thomas d4b2423428 [Mono] implement Transform.InterpolateWith() 2018-09-15 13:08:21 +08:00