AndreaCatania
02f2107620
Improve error reporting when the Message Queue is out of Memory.
...
The function `statistics()`, called when the MessageQueue is out of memory,
will still use the MessageQueue so it crashes.
Moving the error above will improve the behavior since the developer will
find the crash reasons and the instruction on how to fix it.
2023-02-11 22:45:14 +01:00
Rémi Verschelde
8f46656ae4
Merge pull request #72316 from 0xafbf/component-wise-minmax
...
Added component-wise `min` and `max` functions for vectors
2023-02-11 22:05:12 +01:00
Andrés Botero
a90e151b2a
Added component-wise min
and max
functions for vectors
2023-02-11 15:03:11 -05:00
Rémi Verschelde
f011d8ca9c
Math: Prevent division by zero in posmod
...
Fixes #43932 .
Co-authored-by: David Hoppenbrouwers <david@salt-inc.org>
2023-02-11 20:44:45 +01:00
Rémi Verschelde
532381562e
Merge pull request #72654 from RandomShaper/ptrcall_ret_raw_obj
...
Avoid losing references to objects in the native-scripting boundary
2023-02-11 15:35:01 +01:00
Rémi Verschelde
5c5f1452db
Merge pull request #73075 from timothyqiu/ttrn-single
...
Don't warn when using `TTRN()` in a language without plurals
2023-02-11 14:35:03 +01:00
Haoyu Qiu
52b4014362
Don't warn when using TTRN() in a language without plurals
2023-02-11 13:21:57 +08:00
Emmanuel Leblond
58f4139164
Add Engine::unregister_script_language and make Engine::register_script_language returns a Error
2023-02-10 19:50:24 +01:00
Haoyu Qiu
26581ca574
Add some missing translatable editor strings
2023-02-10 16:55:50 +08:00
Rémi Verschelde
91409fe0c8
Merge pull request #72964 from AThousandShips/input_early_exit
...
Perform early exit in Input::is_anything_pressed
2023-02-09 23:42:12 +01:00
Rémi Verschelde
ab4a7b2b77
Merge pull request #72547 from MewPurPur/string-split-fix
...
Fix String.split() with empty string and delimeter
2023-02-09 16:12:57 +01:00
Ninni Pipping
29031700ba
Perform early exit in Input::is_anything_pressed
2023-02-09 11:43:23 +01:00
Jan Haller
45e6abde1d
GDExtension: array_set_typed() accepts enum instead of uint32_t
2023-02-08 23:24:56 +01:00
Rémi Verschelde
9f859a111c
Merge pull request #72866 from Sauermann/fix-release-button-mask
...
Fix mouse-button-mask on button release in unit test
2023-02-08 09:45:11 +01:00
Haoyu Qiu
d8d5cb1198
Use GDExtensionBool in GDExtension interface
2023-02-08 14:57:07 +08:00
Markus Sauermann
39d79ce217
Fix mouse-button-mask on button release in unit test
...
On mouse-button release, the mask is 0.
2023-02-08 01:17:40 +01:00
Haoyu Qiu
5d7e003b29
Prepare for moving editor and classref translations to godot-editor-l10n repo
...
- Separate editor interface and property translations.
- Add property translation in TranslationServer.
- The split and merge of the POT/PO/Makefiles and extract scripts is done
directly in godot-editor-l10n, the files will be removed in the next commit.
- Remove the hardcoded "to_include" lists from the SCsub, we'll only commit the
files which are ready to inclue.
2023-02-07 14:20:40 +01:00
Mikael Hermansson
99dba702f5
Expose _err_print_error
with message parameter to GDExtension
2023-02-07 14:02:18 +01:00
Rémi Verschelde
cd0f1e9b10
Merge pull request #72740 from Sauermann/fix-event-device-id
...
Fix mouse/drag/touch InputEvents having no device id
2023-02-06 23:51:26 +01:00
Markus Sauermann
8748f4dcaa
Fix mouse/drag/touch InputEvents having no device id
...
Some internally created emulated/instantiated events didn't have a
device id. This PR sets for these cases a device id.
Also rename `DEVICE_ID_TOUCH_MOUSE` to the more generic
`DEVICE_ID_EMULATION`.
2023-02-06 22:49:42 +01:00
Rémi Verschelde
632911ea1d
Merge pull request #72786 from timothyqiu/no-libc
...
Remove unnecessary `stdio.h` from gdextension interface
2023-02-06 22:47:14 +01:00
Yuri Sizov
945207885b
Merge pull request #72546 from vonagam/fix-typed-array-can-reference
...
GDScript: Fix can_reference check for typed arrays
2023-02-06 23:32:47 +03:00
Dmitrii Maganov
8400308ab3
GDScript: Fix can_reference check for typed arrays
2023-02-06 22:00:16 +02:00
Rémi Verschelde
112f8faf5c
Merge pull request #72703 from lyuma/stringname_constructor_mistake
...
StringName: fix returning dangling data from char constructor.
2023-02-06 17:47:27 +01:00
Lyuma
82c52eab6c
StringName: fix returning dangling data from char constructor.
...
Fixes a copy paste mistake in the `StringName(const char *,bool)` constructor,
to match the same form as the other two constrcutors.
This fixes a case where this constructor can return a dangling pointer and cause use-after-free.
2023-02-06 07:16:55 -08:00
Haoyu Qiu
f4ffa87a35
Remove unnecessary stdio.h from gdextension interface
2023-02-06 16:11:50 +08:00
bitsawer
d1521933bb
Expose and document ProjectSettings.get_global_class_list()
2023-02-04 23:22:27 +02: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
Pedro J. Estébanez
0bcc7bb5c7
Avoid losing references to objects in the native-scripting boundary
2023-02-03 17:48:41 +01:00
Silc Renew
1459b9c24c
Fix scaled_orthogonal() & subgizmo global scaling
2023-02-04 00:46:04 +09:00
kobewi
c1cc8fd87f
Remove unused has_global_classes()
2023-02-03 15:43:56 +01:00
George Marques
5fc7918594
GDScript: Improve usability of setter chains
...
- Consider PackedArrays non-shared since they are copied on C++/script
boundaries.
- Add error messages in the analyzer when assigning to read-only
properties.
- Add specific error message at runtime when assignment fails because
the property is read-only.
2023-02-02 10:20:35 -03:00
VolTer
57e39d0ce9
Fix String.split() with empty string and delimeter
2023-02-02 01:34:11 +01:00
Aaron Franke
0fcdf48f83
Remove unused has_slashes
from NodePath
2023-02-01 11:32:39 -06:00
Rémi Verschelde
e52213e2fa
More codespell fixes, do more changes from previous ignore list
2023-02-01 12:11:36 +01:00
Rémi Verschelde
394bb0ee2b
Fix various typos with codespell
...
Finally do the childs -> children rename too.
2023-02-01 08:45:41 +01:00
Rémi Verschelde
68299e0f94
Merge pull request #72492 from maiself/fix-binary-res-typed-array
...
Fix loading of binary resources with typed arrays
2023-02-01 08:02:28 +01:00
Rémi Verschelde
e8240031e7
Merge pull request #71479 from raulsntos/virtual-return-type
...
Use enum instead of int in virtual methods return type
2023-02-01 07:45:28 +01:00
Rémi Verschelde
27fdb06fed
Merge pull request #71322 from EricEzaM/55856-proj-settings-initial-array-dict-shared-instance
...
Fix Project Settings array/dicts initial value being shared instances of the current value.
2023-02-01 07:29:44 +01:00
Mai Lavelle
87e6885f5e
Fix loading of binary resources with typed arrays
2023-02-01 01:22:43 -05:00
Raul Santos
9e9eac4676
Use enum instead of int in virtual methods return type
2023-01-31 19:06:49 +01:00
Rémi Verschelde
8612c12be6
Merge pull request #72452 from akien-mga/global_class_always_create
...
Always create global class list, even if empty
2023-01-31 16:00:12 +01:00
Rémi Verschelde
534369d267
Merge pull request #64423 from RandomShaper/safe_input_synth
...
Warn users about unsafe usage of `InputEvent`
2023-01-31 15:56:43 +01:00
Rémi Verschelde
38a806e13f
Always create global class list, even if empty
...
Fixes #72451 .
2023-01-31 15:28:53 +01:00
Pedro J. Estébanez
a2af839a59
Warn users about unsafe usage of InputEvent
2023-01-31 14:39:51 +01:00
Rémi Verschelde
e1648b3327
Merge pull request #72445 from reduz/restore-script-class-cache-if-removed
...
Restore script class cache if removed
2023-01-31 13:20:04 +01:00
Juan Linietsky
79897dd5bc
Restore script class cache if removed
...
I have no idea why anyone would do this, but this fixes it.
Fixes #72154 . Depends on #72444 being merged to function properly.
2023-01-31 11:28:21 +01:00
Dmitrii Maganov
5909f9f075
GDScript: Fix issues with typed arrays
2023-01-31 11:54:41 +02:00
Juan Linietsky
28f51ba547
Refactor high quality texture import
...
* Only two texture import modes for low/high quality now:
* S3TC/BPTC
* ETC2/ASTC
* Makes sense given this is the general preferred and most compatible combination in most platforms.
* Removed lossy_quality from VRAM texture compression options. It was unused everywhere.
* Added a new "high_quality" option to texture import. When enabled, it uses BPTC/ASTC (BC7/ASTC4x4) instead of S3TC/ETC2 (DXT1-5/ETC2,ETCA).
* Changed MacOS export settings so required texture formats depend on the architecture selected.
This solves the following problems:
* Makes it simpler to import textures as high quality, without having to worry about the specific format used.
* As the editor can now run on platforms such as web, Mac OS with Apple Silicion and Android, it should no longer be assumed that S3TC/BPTC is available by default for it.
2023-01-30 15:53:23 +01:00
Rémi Verschelde
6d6d6592c9
Merge pull request #71989 from bruvzg/set_typed_move
...
Move Array:set_typed to internal GDExtension structure and unexposed it.
2023-01-30 13:28:40 +01:00
Rémi Verschelde
bde3310f02
Merge pull request #71995 from Faless/net/4.x_tls_verify
...
[NET] Refactor TLS configuration.
2023-01-30 13:28:31 +01:00
bruvzg
5aa87ccc03
Move Array:set_typed to internal GDExtension structure and unexposed it.
2023-01-30 14:23:31 +02: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
Rémi Verschelde
d01ac9c736
Merge pull request #72287 from aaronfranke/tr2d-interp
...
Add support for interpolating skewed Transform2Ds
2023-01-29 14:13:02 +01:00
Adam Scott
bfffb8f254
Fix Resource::duplicate()
missing packed arrays
2023-01-28 23:06:44 -05:00
Aaron Franke
5f3d3722b2
Add support for interpolating skewed transforms
2023-01-28 18:28:42 -06:00
Fabio Alessandrelli
7cd80e6a6d
[Net] Remove StreamPeerTLS.blocking_handshake option.
...
Which was unused internally, and can be replaced by:
```
while tls.get_status() == tls.STATUS_HANDSHAKING:
tls.poll()
```
2023-01-28 11:08:02 +01:00
Fabio Alessandrelli
adba870534
[NET] Refactor TLS configuration.
...
Use a TLSOptions configuration object which is created via static
functions.
- "TLSOptions.client": uses the standard CA and common name verification.
- "TLSOptions.client_unsafe": uses optional CA verification (i.e. if specified)
- "TLSOptions.server": is the standard server configuration (chain + key)
This will allow us to expand the TLS configuration options to include
e.g. mutual authentication without bloating the classes that uses
StreamPeerTLS and PacketPeerDTLS as underlying peers.
2023-01-28 11:08:02 +01:00
Pedro J. Estébanez
1de616d8dc
Fix code style and consistency of RWLock and Semaphore
2023-01-27 18:45:25 +01:00
Yuri Rubinsky
0f8f0ab126
Merge pull request #72170 from Chaosus/astar_fix
2023-01-27 18:52:22 +03:00
Rémi Verschelde
2b55ac445b
Merge pull request #72111 from raulsntos/method-info-metadata
...
Add `GodotTypeInfo::Metadata` to `MethodInfo`
2023-01-27 15:41:38 +01:00
Rémi Verschelde
f0e3c3f4c3
Merge pull request #72168 from RandomShaper/sensible_lock_return
...
Booleanize various sync primitives' wait & locking methods
2023-01-27 15:40:43 +01:00
Yuri Rubinsky
cc0a243ce0
Enchance the performance of AStar by using a LocalVector(2)
2023-01-27 16:28:11 +03:00
Rémi Verschelde
9d555f5c68
Merge pull request #62499 from fire/gltf-binary-img-compression
...
Handle gltf binary images
2023-01-27 11:35:55 +01:00
Pedro J. Estébanez
f630940591
Booleanize various sync primitives' wait & locking methods
2023-01-27 11:15:30 +01:00
K. S. Ernest (iFire) Lee
39922d7167
Handle gltf binary
...
[ Ignore and Warn | Extract Textures (default) | Optimize Loading Embedded as Basisu ]
Enable compressed mip maps from Basis Universal for faster compressions.
Increase the quality of Basis to avoid corruption.
To keep compatibility use the first mip of the previous internal Godot format.
Because texture names may have invalid filename characters, adds String::validate_filename to sanitize filenames for import pipeline use.
2023-01-27 02:02:02 -08:00
Rémi Verschelde
e92393d295
Merge pull request #67783 from EricEzaM/67715-input-event-action-as-text
...
Make InputEventAction as_text() return the text of the first valid event for the action.
2023-01-27 10:30:00 +01:00
Dmitrii Maganov
abe6d67232
GDScript: Fix test for read-only state of constants
2023-01-27 05:28:08 +02:00
Raul Santos
cac7a784d6
Add GodotTypeInfo::Metadata
to MethodInfo
2023-01-26 15:51:34 +01:00
Rémi Verschelde
31496c296a
Merge pull request #72078 from bitsawer/fix_optimize_vertices
...
Fix range loop iteration regressions
2023-01-26 01:11:25 +01:00
Rémi Verschelde
42424d3b8e
Merge pull request #71758 from adamscott/is_equal_ref
...
Add `@GlobalScope` `is_same(a, b)` and `Variant::identity_compare()`
2023-01-26 01:07:24 +01:00
bitsawer
8c25bcdb84
Fix range loop iteration regressions
2023-01-26 00:14:39 +02:00
Adam Scott
37248d7c87
Add @GlobalScope
is_same(a, b)
and Variant::identity_compare()
2023-01-25 10:46:21 -05:00
bruvzg
6def1dfdd5
Remove unused SUPER_L/R constants.
2023-01-25 14:22:28 +02:00
Rémi Verschelde
b9bf12e99a
Merge pull request #71142 from aaronfranke/never-duplicate-script
...
Add `PROPERTY_USAGE_NEVER_DUPLICATE` flag and use for script
2023-01-25 09:18:18 +01:00
Rémi Verschelde
93c650c10d
Merge pull request #69028 from YeldhamDev/its_raw_you_donkey
...
Make `Input.get_vector()` check for plain `strength` instead of the raw one
2023-01-25 09:15:45 +01:00
Rémi Verschelde
5df9a84128
Merge pull request #71968 from bruvzg/def_keys_no_label
...
[Input] Do not add key labels to the default actions, to display it correctly in the UI.
2023-01-25 09:15:13 +01:00
Aaron Franke
2a65f6812b
Add PROPERTY_USAGE_NEVER_DUPLICATE flag and use for script
...
Co-authored-by: Yakov Borevich <j.borevich@gmail.com>
2023-01-24 16:37:50 -06:00
Aaron Franke
2bc0bcbd26
PropertyUsage: Rename "DO_NOT_SHARE_ON_DUPLICATE" to "ALWAYS_DUPLICATE"
2023-01-24 16:05:07 -06:00
Yuri Sizov
fab9926a95
Merge pull request #65137 from dalexeev/editor-naming
...
Rearrange `editor/naming/*` project settings
2023-01-24 22:26:03 +03:00
bruvzg
57b5d112f7
[Input] Do not add key labels to the default actions, to display it correctly in the UI.
2023-01-24 14:49:11 +02:00
Jan Haller
15686ca786
Fix bind " convergence_dist" containing space
2023-01-23 20:07:59 +01:00
bruvzg
daad4aed62
Cleanup and unify keyboard input.
...
- Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes.
- Unify IME behaviour, add inline composition string display on Windows and X11.
- Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events.
- Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS.
- Add support for media key handling on macOS.
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-01-23 15:08:12 +02:00
Rémi Verschelde
5b1df48c6c
Convert en_GB spelling to en_US with codespell
2023-01-23 11:02:20 +01:00
Rémi Verschelde
5726bf578d
Merge pull request #71676 from vnen/gdscript-unicode-identifiers
...
Add support for Unicode identifiers in GDScript and Expression
2023-01-23 10:24:33 +01:00
Rémi Verschelde
56fdef281e
Merge pull request #71851 from mihe/error-macros
...
Fix incorrect index error macros
2023-01-22 16:08:34 +01:00
Rémi Verschelde
c9243c37dc
Merge pull request #71846 from Chaosus/astar_local_vector
...
Enchance the performance of `AStar` by using a `LocalVector`
2023-01-22 16:06:45 +01:00
Mikael Hermansson
22c1785826
Fix incorrect index error macros
2023-01-22 12:23:56 +01:00
Rémi Verschelde
cd031fd31a
Merge pull request #71663 from bruvzg/init_pos_x
...
Reorganize main and sub-window initial position properties.
2023-01-22 11:25:58 +01:00
Yuri Rubinsky
078600a3c4
Enchance the performance of AStar
by using a LocalVector
2023-01-22 12:04:41 +03:00
kobewi
615c517034
Use range iterators in LocalVector loops
2023-01-21 18:44:42 +01:00
kobewi
277d5361df
Add range iterator to LocalVector
2023-01-21 18:42:04 +01:00
George Marques
86ee5f39c4
Add support for Unicode identifiers in Expression class
2023-01-21 13:39:42 -03:00
Rémi Verschelde
ebd0b40f6e
Merge pull request #71687 from reduz/support-script-class-name-in-efs
...
Support script global resource name in EditorFileSystem
2023-01-21 16:54:23 +01:00
Juan Linietsky
dddd8d43f6
Support script global resource name in EditorFileSystem
...
* 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-21 14:19:27 +01:00
Rémi Verschelde
c02572d3d0
Merge pull request #71683 from reduz/fast-script-class-inheritance-check
...
Implement a quick script inheritance check
2023-01-21 11:31:05 +01:00
Rémi Verschelde
a3c8ba6cd5
Merge pull request #71396 from reduz/fix-broken-userdir
...
Fix cases of broken user:// paths.
2023-01-21 11:30:37 +01:00
Rémi Verschelde
2435eef617
Merge pull request #71390 from reduz/fix-json-as-resource
...
Fixes to JSON as resource
2023-01-21 11:30:08 +01:00
Jan Haller
b8c4ae28b7
Fix use of bool
in extension header
2023-01-19 22:21:19 +01:00
Rémi Verschelde
ab5c75b9ad
Merge pull request #71649 from raulsntos/array-indexer
...
Add property usage to array indexer
2023-01-19 19:33:05 +01:00
Rémi Verschelde
4ca6a9809d
Merge pull request #44596 from KoBeWi/ 🧹 🧹 🧹
...
Cleanup unused engine code v2
2023-01-19 19:32:51 +01:00
Juan Linietsky
3dcf380161
Implement a quick script inheritance check
...
Optimizes, simplifies and fixes EditorResourcePicker (was not refreshing custom clases).
2023-01-19 16:47:01 +01:00
Raul Santos
97610c8bfc
Add property usage to array indexer
...
This makes the `Array` indexer show as returning `Variant` instead of `void` in the documentation.
2023-01-19 14:22:11 +01:00
kobewi
c0083e431b
Cleanup unused engine code v2
2023-01-19 13:02:18 +01:00
bruvzg
aade5abd4f
Reorganize main and sub-window initial position properties.
2023-01-19 13:44:06 +02:00
bruvzg
db7d8c2d87
[GDExtension] Expose some low level functions and String operators.
2023-01-19 12:50:49 +02:00
Rémi Verschelde
4679f8724a
Merge pull request #71628 from reduz/fixup-editor-file-system-script-parsing
...
Clean up EditorFileSystem script parsing
2023-01-19 10:09:55 +01:00
Juan Linietsky
5bdc0d97d3
Clean up EditorFileSystem script parsing
...
* Optimize only update modified/added/removed files.
* Clean up documentation parsing.
2023-01-18 20:56:45 +01:00
Pedro J. Estébanez
6616b0619d
Revert "Make MessageQueue::push_callable(p) work with bound arguments"
...
This reverts commit 81b1ebddef
.
2023-01-18 19:20:40 +01:00
Rémi Verschelde
b5f3ac522e
Merge pull request #71400 from touilleMan/gdextension-dump-global_enum-is_bitfield-field
...
Add missing is_bitfield field for global enum in extension_api_dump
2023-01-18 17:47:58 +01:00
Rémi Verschelde
b516d05245
Merge pull request #71622 from RandomShaper/mq_bound
...
Make MessageQueue::push_callable(p) work with bound arguments
2023-01-18 17:33:34 +01:00
Pedro J. Estébanez
81b1ebddef
Make MessageQueue::push_callable(p) work with bound arguments
2023-01-18 14:54:17 +01:00
Rémi Verschelde
6da836bbb4
Merge pull request #71514 from akien-mga/os-unset_environment
...
OS: Add `unset_environment`, better validate input
2023-01-18 08:35:43 +01:00
Rémi Verschelde
4005fc4b8d
Merge pull request #71279 from vonagam/fix-iterator-number-type
...
GDScript: Fix typing of iterator in for loop
2023-01-16 22:21:26 +01:00
Rémi Verschelde
91a54cdbc1
Linux/BSD: Add LINUXBSD_ENABLED define for non X11-related checks
2023-01-16 17:01:35 +01:00
Rémi Verschelde
818a9e99a4
OS: Add unset_environment
, better validate input
...
Instead of returning an undocumented boolean error code, we do the
validation checks that should ensure a successful result.
Based on:
- https://linux.die.net/man/3/setenv
- https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setenvironmentvariable
2023-01-16 16:39:44 +01:00
Rémi Verschelde
5ca6c1f9db
Merge pull request #70557 from KoBeWi/class_yeet
...
Move global script class cache to separate file
2023-01-16 12:49:08 +01:00
Rémi Verschelde
d94a46ab95
Merge pull request #64021 from ajreckof/change-shortcut-for-rect-tool-tilemap
...
Add `Key::CTRL_OR_CMD` and use it to fix shortcut for tilemap painting tools on macOS
2023-01-16 12:47:07 +01:00
kobewi
6444c7d127
Move global script class cache to separate file
2023-01-16 10:16:30 +01:00
Juan Linietsky
3a93efefee
Fix cases of broken user:// paths.
...
* Properly validate paths when supplying the project name.
* Ensures that the user data dir will always be valid.
Fixes 69366.
2023-01-15 19:05:00 +01:00
ajreckof
4309dffc6a
add CMD_OR_CTRL as a Key and not just a key modifier
2023-01-15 18:49:20 +01:00
Raul Santos
7560340ef6
Rename center
method to get_center
in Plane.
2023-01-15 17:18:50 +01:00
Emmanuel Leblond
38d9e8b366
Add missing is_bitfield field for global enum in extension_api_dump
2023-01-14 16:08:41 +01:00
Juan Linietsky
1aaff63b8f
Fixes to JSON as resource
...
* It was not a resource, hence it was not working to load it as such.
* Changed so, when opened in editor, a parse error will not fail load and the text will be kept.
* This should allow proper editing from within the code editor, including syntax checking and saving files as-is in text.
Partially addresses #66820 .
The code editor still needs to be changed for this to work.
2023-01-14 14:41:51 +01:00
Juan Linietsky
6f0e210093
Refactor ProjectSetting overrides
...
* 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-13 15:13:56 +01:00
Dmitrii Maganov
40613ebd21
GDScript: Fix typing of iterator in for loop
2023-01-13 15:36:11 +02:00
Eric M
7c73b6c71c
Fix Project Settings array/dicts initial value being shared instances of the current value.
2023-01-13 21:48:43 +10:00
Rémi Verschelde
c2790ec2b9
Merge pull request #68450 from KoBeWi/bracket_escapist
...
Allow to escape closing brackets in CFG tags
2023-01-12 21:53:15 +01:00
Danil Alexeev
8f706be6fa
Rearrange editor/naming/*
project settings
2023-01-12 11:41:13 +03:00
Rémi Verschelde
0e4e782ada
Merge pull request #70714 from Calinou/doc-os-stdin
...
Improve documentation for `OS.read_string_from_stdin()`
2023-01-12 09:24:47 +01:00
Hugo Locurcio
86b8176864
Improve documentation for OS.read_string_from_stdin()
...
This makes it clearer that calls to this method are blocking.
The unused method parameter was also removed.
2023-01-11 19:57:25 +01:00
Eric M
7b66806dd3
Make InputEventAction as_text() return the text of the first valid event for the action.
2023-01-12 00:10:44 +10:00
Juan Linietsky
33d3b7eea7
Fix Callable call error reporting.
...
* Fix potential crash when using bind in `Variant::get_callable_error_text()`
* Properly compute bound arguments so they can be properly shown.
* Add a function to obtain the actual bound arguments.
2023-01-10 13:56:27 +01:00
Rémi Verschelde
0231b4a0e8
Merge pull request #70726 from heppocogne/Fix-open_compressed-get_path
...
Fix `get_path()` is not working when files are opend with `open_compressed`
2023-01-10 10:48:15 +01:00
Rémi Verschelde
d3fc9d9e41
Merge pull request #71051 from vonagam/consts-are-deep-start
...
GDScript: Begin making constants deep, not shallow or flat
2023-01-09 23:22:59 +01:00
Rémi Verschelde
be4e9dfeab
Merge pull request #69616 from reduz/change-uuid
...
Ability to change a resource UID from API
2023-01-09 23:08:18 +01:00
Juan Linietsky
07a964fce3
Ability to change a resource UID from API
...
* Works for text, binary and imported resources
* Allows better clean up of duplicate files.
TODO (future PRs):
* Use this API for assigning new UIDs to copied files.
* Use this API for UID conflict on FS scanning (if more than one file has the same UID, the newer one(s) should get assigned a different UID).
2023-01-09 18:52:00 +01:00
Juan Linietsky
0e0a6bb39b
Removed unused property hints and Object::get_translatable_strings()
...
* 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-09 16:56:01 +01:00
Rémi Verschelde
88940571f2
Merge pull request #71082 from AThousandShips/array_find_fix
...
Fix for comparisons with PackedArrays
2023-01-09 14:19:09 +01:00
Rémi Verschelde
d46568205d
Merge pull request #64795 from RandomShaper/fix_saferefcount
...
Prevent misuse of SafeRefCount
2023-01-09 14:18:53 +01:00
Pedro J. Estébanez
b1c7665866
Prevent misuse of SafeRefCount
2023-01-09 10:17:55 +01:00
Rémi Verschelde
31f94574d4
Merge pull request #70996 from reduz/properly-report-callable-bound-arguments
...
Properly report Callable bound arguments
2023-01-09 08:34:28 +01:00
Rémi Verschelde
e7905f4f48
Merge pull request #71045 from reduz/use-bitfield-in-core-types
...
Use BitField<> in core type masks
2023-01-09 08:33:26 +01:00
Juan Linietsky
0e0ca01bce
Properly report Callable bound arguments
...
Fixes #63213
Adds a function: Callable::get_amount_of_arguments_bound() to query this in callables. Exposed to the engine API.
2023-01-08 23:35:11 +01:00
Rémi Verschelde
eff2739cf7
Merge pull request #71052 from Chaosus/fix_astargrid2d
...
Fix error in `AstarGrid2D::get_id_path`
2023-01-08 22:40:41 +01:00
Rémi Verschelde
0081c59198
Merge pull request #71013 from voidedWarranties/fix_ext_property_default_value
...
Fix `ScriptInstanceExtension::get_property_default_value` return value
2023-01-08 22:36:10 +01:00
Juan Linietsky
2b815df3c1
Use BitField<> in core type masks
...
* All core types masks are now correctly marked as bitfields.
* The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks.
* Most bitmask operations replaced by functions in BitField<>
* Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is.
* Documentation and API dump updated to reflect bitfields in core types.
2023-01-08 22:17:40 +01:00
Ninni Pipping
86240d97e1
Fix for PackedArray comparison
2023-01-08 21:22:28 +01:00
Yuri Rubinsky
6640eb8065
Fix error in AstarGrid2D::get_id_path
2023-01-08 10:34:33 +03:00
Dmitrii Maganov
5e2ac1a31e
GDScript: Begin making constants deep, not shallow or flat
2023-01-08 07:29:10 +02:00