Commit Graph

425 Commits

Author SHA1 Message Date
398e73c689 Error when removing a phycics node during a physics callback
* This behavior is not allowed, the error text suggests using call_deferred().
* Added a check in Node::remove_child to prevent future crashes of this type.
* Fixed a performance regression introduced by #36244.

Fixes #63718, probably other crashes too.
2023-01-07 12:57:24 +01:00
163f6f5fe8 Merge pull request #68429 from KoBeWi/PropertySettings
Add PropertyInfo overload for GLOBAL_DEF
2023-01-06 22:59:29 +01:00
d95794ec8a One Copyright Update to rule them all
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".
2023-01-05 13:25:55 +01:00
7c6b659bd7 Add PropertyInfo overload for GLOBAL_DEF 2022-12-11 21:36:48 +01:00
ef090ee6ea Merge pull request #68874 from TokageItLab/fix-unique-path-keying
Added option to `get_path_to()` to get the shortest path considering unique name
2022-11-28 14:49:34 +01:00
d7e3fce995 Merge pull request #68566 from Mickeon/node-print-orphans-static
Make `Node.print_orphan_nodes()` static
2022-11-24 18:55:30 +01:00
885fc1f3e7 Merge pull request #68568 from Mickeon/node-parent-busy-error
Update "Parent node is busy" errors to use `Callable.call_deferred()`
2022-11-23 23:11:06 +01:00
c6a355b9e8 Update "Parent node is busy" errors to use Callable.call_deferred()
Also fixes outdated method names in the messages.
2022-11-23 17:39:34 +01:00
b9d1550590 Add option to get_path_to() to get the shortest path with unique name 2022-11-19 15:06:25 +09:00
6d2a7cb46d Merge pull request #68709 from MewPurPur/instance-begone-part3
Remove more instances of 'instance' being used as a verb
2022-11-16 14:41:42 +01:00
3b4f5f8a04 Remove more instances of 'instance' being used as a verb 2022-11-16 14:01:53 +01:00
3b08d0e852 Fix crash of queue_free() when main loop is not SceneTree 2022-11-15 08:25:25 +08:00
0dbb632116 Merge pull request #68564 from Mickeon/node-no-remove-group-error
Strip ERR_FAIL from `Node.remove_from_group()`
2022-11-14 23:24:14 +01:00
3b14f0334c Remove redundant Variant-types initializations 2022-11-14 19:35:19 +01:00
a1c10dbbd8 Strip ERR_FAIL from Node.remove_from_group()
Also simplifies group check removing unnecessary `!data.grouped.has`
2022-11-13 00:01:18 +01:00
9b42268467 Make Node.print_orphan_nodes() static 2022-11-12 17:55:42 +01:00
5947f22be9 Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
420eb1aa34 Merge pull request #67445 from Zylann/rename_queue_delete
Rename queue_delete => queue_free
2022-10-31 10:51:18 +01:00
7543a5e014 Rename queue_delete => queue_free
# Conflicts:
#	editor/plugins/tiles/tiles_editor_plugin.cpp
2022-10-24 22:07:02 +01:00
e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
64c20a51c1 Fix get_path() error when calling get_node() 2022-10-16 10:48:59 +08:00
a97a00bf02 Rename pos -> index on Node 2022-10-14 19:56:34 +01:00
b754df2b99 Fix node name casing issues
Co-authored-by: ryburnj <jordanryburn@gmail.com>
2022-10-10 22:31:26 +02:00
0103af1ddd Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
f501e4f665 Unix: Remove now unnecessary I/O defines, cleanup
- `LIBC_FILEIO_ENABLED` wasn't defined anywhere, even in _other platforms_.
- `NO_NETWORK` is also never defined. It probably isn't enough anyway to
  disable network APIs in the current codebase.
- `UNIX_SOCKET_UNAVAILABLE` is never defined in this code but used by some
  other platforms, clarify that.
- `NO_STATVFS` can be removed as Android supports it since API level 19,
  which is our current min SDK level. It's also only used for
  `DirAccessUnix::get_space_left()` which is anyway overridden by
  `DirAccessJAndroid::get_space_left()` so it shouldn't make a difference.
  * Fixed documentation for `DirAccess.get_space_left()`.
- `NO_FCNTL` is likely also a remnant of early Android days, in current NDK
  r23 it seems to be available. Also cleaned up unused `fcntl.h` includes.
- `NO_ALLOCA` is never defined, and we use alloca in many places now.
2022-10-03 12:33:41 +02:00
aed3822a93 Change return type of get_configuration_warnings to PackedStringArray 2022-09-19 16:43:15 +01:00
8899f1eec2 Merge pull request #65595 from KoBeWi/minus_children
Allow negative indices in `move_child()`
2022-09-10 09:59:15 +02:00
31e62ca827 Allow negative indices in move_child() 2022-09-10 03:54:04 +02:00
e19f7b2407 Remove Remove and Skip 2022-09-09 23:44:31 +02:00
7936b3cc4c Merge pull request #60108 from KoBeWi/arise_to_top
Rename raise() to move_to_front()
2022-09-08 09:23:31 +02:00
f577bae76f Rename legible_unique_name param to force_readable_name
With the introduction of Scene Unique Nodes, `is_unique_in_owner`, "Unique Name in Scene" and other descriptions related to the feature, the second parameter of add_child() and add_simbling() could be misunderstood to be related, at first glance.
2022-09-07 11:58:30 +02:00
b218727599 Rename raise() to move_to_front() 2022-09-06 22:13:06 +02:00
0bf3f79157 Merge pull request #63902 from dalexeev/string-cases 2022-08-30 14:06:28 +02:00
889c522a19 Merge pull request #64410 from MewPurPur/rename-notification-instanced 2022-08-30 12:01:58 +02:00
d4555ef5fb Add String.to_{camel,pascal,snake}_case methods 2022-08-30 12:36:24 +03:00
d93d646723 Merge pull request #64570 from KoBeWi/node🧳ing
Unify node casing adjustment
2022-08-26 09:49:58 +02:00
1abdffe7a0 Replace Array return types with TypedArray 2 2022-08-23 23:21:32 +02:00
fdab23163f Unify node casing adjustment 2022-08-18 14:08:40 +02:00
2599710793 Rename NOTIFICATION_INSTANCED to NOTIFICATION_SCENE_INSTANTIATED 2022-08-16 12:41:10 +02:00
c3c5985189 move rpc and rpc_id implementations back to header
StackOverflow on why this is needed: https://stackoverflow.com/questions/495021/why-can-templates-only-be-implemented-in-the-header-file
Minor mistake in commit ca7d572908
2022-08-02 18:35:29 -05:00
d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
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
462432f89f Add an underscore to internal group names as per engine policy
This also adds `SNAME()` macros where relevant to improve performance.
2022-07-01 20:16:25 +02:00
11f5d2141a Merge pull request #61577 from YuriSizov/core-fix-events-for-moved-nodes 2022-06-27 12:02:19 +02:00
d69e3791bf Fix editor-only visibility for lights
* Update visibility again for editor-only lights if owner changes.

Fixes #26399, supersedes #52327
2022-06-23 08:19:18 +02:00
3e6de687b8 Node: Rename child_exited_tree to child_exiting_tree
The name was confusing as this signal is emitted around the same time as
`tree_exiting` and `NOTIFICATION_EXIT_TREE`, i.e. while the child node is
still in tree.

Fixes #59210.
2022-06-20 11:55:19 +02:00
8e5ad7be46 Mark node groups as dirty for every children if parent is moved 2022-05-31 21:28:04 +03:00
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
3e96abce07 fix a bug in get_node_and_resource 2022-05-16 19:40:59 +02:00
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