Commit graph

55252 commits

Author SHA1 Message Date
Rindbee
cbce374f68 Returns null and does not cache when the source code of the script fails to load
This usually means that an `ERR_FILE*` error occurred.

Previously, using `GDScriptCache::get_full_script()` would ignore errors during loading.
Now, all errors are not ignored.

Judging in which period the error occurred, it can be judged based on the return value:
1. null + err : Error during script loading (load_source_code()).
2. script + err: Error during script parsing.
2023-06-15 21:06:10 +08:00
Rémi Verschelde
25b2f1780a
Style: Harmonize header includes in modules
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:

Includes from the platform port or module ("local" includes) should be listed
first in their own block using relative paths, before Godot's "core" includes
which use "absolute" (project folder relative) paths, and finally thirdparty
includes.

Includes in `#ifdef`s come after their relevant section, i.e. the overall
structure is:

- Local includes
  * Conditional local includes
- Core includes
  * Conditional core includes
- Thirdparty includes
  * Conditional thirdparty includes
2023-06-15 14:35:45 +02:00
Rémi Verschelde
6fc0912137
minimp3: Add a .cpp file to simplify building the single-header implementation
Single-header libraries like this require passing a bunch of defines _once_
before including the header, but not multiple times. This can make it tricky
in user code to know when to request the implementation, if the header needs
to be included in multiple files.

So properly compiling a .cpp file for the implementation solves this, and
also enables us to properly disable warnings on thirdparty implementation code.
2023-06-15 13:50:27 +02:00
RedworkDE
1b466c6298 C#: Add version defines to help users deal with breaking changes 2023-06-15 13:18:04 +02:00
ocean (they/them)
861743cd04 GDScript: add errors when calling unimplemented virtual functions
This PR does a small refactor of how method flags are handled in the GDScript analyzer.
This way, it adds support for the analyzer to use any of MethodInfo's flags, where previously
it could only use METHOD_FLAG_STATIC and METHOD_FLAG_VARARG.

As a side-effect, this also normalizes behavior between editor and release templates, which fixes #76938.

The tests added also brought a different issue to light, where using `super()` appears to generate a
return variable discarded on calling super's _init(), which doesn't have a return value. This should be
tackled in a different PR, which will have to change the output of this PR's tests.
2023-06-15 07:16:31 -04:00
Markus Sauermann
840e2b14f3 Remove unused variable PopupMenu::parent_rect
This private variable is not read anywhere.
Remove it and all places, where it is set.
2023-06-15 12:08:47 +02:00
Raul Santos
7a031be769
C#: Avoid GodotSharp as project assembly name
The name GodotSharp conflicts with the name of the Godot assembly,
this causes a cyclic dependency.
2023-06-15 11:43:35 +02:00
Rémi Verschelde
7734146060
Merge pull request #78256 from Calinou/animatedtexture-fix-property-hint
Fix outdated usage of `or_lesser` in AnimatedTexture property hint
2023-06-15 10:50:53 +02:00
Rémi Verschelde
9b3e31a297
Merge pull request #78255 from Calinou/pull-request-template-link-precommit-hooks
Link to Code style guidelines in the pull request template
2023-06-15 10:50:49 +02:00
Rémi Verschelde
41b34e3e56
Merge pull request #78240 from KoBeWi/nothing_valid_here,_keep_scrolling
Safe-guard against missing node arrays
2023-06-15 10:50:45 +02:00
Rémi Verschelde
fe1aa263ca
Merge pull request #78237 from dsnopek/webrtc-gdextension-create-data-channel
Directly expose `WebRTCPeerConnection::create_data_channel()` to GDExtension
2023-06-15 10:50:42 +02:00
Rémi Verschelde
81c3864306
Merge pull request #78235 from jpcerrone/fix_win_m_crashing_editor
Fix for Win+M crashing the editor
2023-06-15 10:50:38 +02:00
Rémi Verschelde
3dca469f8c
Merge pull request #78109 from heppocogne/support-relative-path
Add relative path support for `EditorPlugin::add_autoload_singleton`
2023-06-15 10:50:33 +02:00
Rémi Verschelde
8c5c29f2a3
Merge pull request #78061 from dsnopek/gdextension-class-not-exposed
Fix wrapping Object's in GDExtension that aren't exposed
2023-06-15 10:50:27 +02:00
Rémi Verschelde
2c22e56e37
Merge pull request #77992 from ajreckof/Prevent-unselectable-nodes-when-switching-filter-and-no-children-match-the-new-filter
Prevent unselectable nodes when switching filter and no children match the new filter.
2023-06-15 10:50:22 +02:00
Rémi Verschelde
0da20d019e
Merge pull request #77412 from smix8/fix_threaded_navmesh_baking_4.x
Fix for threaded NavigationMesh baking under new thread guards
2023-06-15 10:49:58 +02:00
Rémi Verschelde
3a319daa99
Merge pull request #77351 from anvilfolk/super-discard
GDScript: do not RETURN_VALUE_DISCARDED for `super()` inside `_init()`
2023-06-15 10:39:59 +02:00
Rémi Verschelde
b1d3070648
Merge pull request #77175 from smix8/region_refactor_4.x
Refactor NavigationRegion internals
2023-06-15 10:39:53 +02:00
Rémi Verschelde
2c51ecac5a
Merge pull request #76376 from ajreckof/fix_NodePath_update_from_batch_rename
Properly update nodepath with batch rename
2023-06-15 10:39:48 +02:00
Rémi Verschelde
0b30785bca
Merge pull request #75438 from ronyeh/typo
Fix typo on "autoremapping".
2023-06-15 10:39:44 +02:00
Rémi Verschelde
a6e79226c1
Merge pull request #74516 from RedworkDE/net-safe-project-name
C#: Unify project name handling and fix issues with the handling of some special characters
2023-06-15 10:39:36 +02:00
Rémi Verschelde
8c63a3732c
Merge pull request #73700 from Scony/add-more-initial-navi-tests
Add initial 'NavigationObstacle' and 'NavigationRegion' tests
2023-06-15 10:39:32 +02:00
Rémi Verschelde
48b282cfb0
Merge pull request #62958 from Calinou/doc-packedarray-use-types
Document initializing PackedVectorArray/PackedColorArray correctly
2023-06-15 10:39:28 +02:00
Rémi Verschelde
cec6ba77ae
Merge pull request #55627 from Calinou/vehiclebody3d-tweak-property-hints
Tweak VehicleBody3D and VehicleWheel3D property hints
2023-06-15 10:39:20 +02:00
smix8
4c970f1a67 Refactor NavigationRegion internals
Refactors NavigationRegion internals.
2023-06-15 09:52:14 +02:00
Hugo Locurcio
84a3fd9daa
Document initializing PackedVectorArray/PackedColorArray correctly 2023-06-15 07:50:54 +02:00
Hugo Locurcio
7b4fd528ab
Fix outdated usage of or_lesser in AnimatedTexture property hint
The property hint was renamed to `or_less` in 4.0, so it had no effect.
2023-06-15 07:46:33 +02:00
Hugo Locurcio
f683230a8b
Tweak VehicleBody3D and VehicleWheel3D property hints
These property hints are better aligned with the documentation
and typical use cases, while still allowing values to go outside
those ranges (except for steering, where steering above 180° doesn't
make sense).
2023-06-15 07:45:55 +02:00
Hugo Locurcio
d1cbab9822
Link to Code style guidelines in the pull request template
This is a common pain point for new contributors, as setting up
pre-commit hooks will save a lot of time spent on CI.
2023-06-15 07:22:20 +02:00
rune-scape
fcdd926881 GDScript: Strings and StringNames match 2023-06-14 19:24:28 -07:00
ajreckof
8c6ede10c5 Prevent unselectable nodes when switching filter and no children match the new filter 2023-06-14 23:20:28 +02:00
Pawel Lampe
b54c3e7e5e Add initial 'NavigationObstacle' and 'NavigationRegion' tests 2023-06-14 22:24:37 +02:00
bruvzg
cda9cd7587
[RTL] Fix multithreaded resizing. 2023-06-14 23:15:16 +03:00
kobewi
4d4fe94cf0 Safe-guard against missing node arrays 2023-06-14 22:02:39 +02:00
David Snopek
1b9364ba96 Directly expose WebRTCPeerConnection::create_data_channel() to GDExtension 2023-06-14 14:31:41 -05:00
RedworkDE
92f13ba9ea C#: Unify project name handling and fix issues with the handling of some special characters
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-06-14 21:07:58 +02:00
Danil Alexeev
fba8cbe6db
GDScript: Fix repeated _ are allowed after decimal point 2023-06-14 21:47:12 +03:00
jpcerrone
bd786ce0d9 Fix for Win+M crashing the editor
Fixes #77790
Adds missing 'break' statement to 'VulkanContext::prepare_buffers' function.
It was mistakenly removed in #72859
2023-06-14 14:34:09 -03:00
Rémi Verschelde
33957aee69
Merge pull request #78226 from RedworkDE/gdextension-breaking-changes-update-3
Update list of known breaking changes compared to 4.0-stable (3)
2023-06-14 18:49:41 +02:00
Rémi Verschelde
eeb7f48203
Merge pull request #77236 from kleonc/world_boundary_2d_allow_negative_distance
Allow setting negative `WorldBoundaryShape2D.distance` through the editor
2023-06-14 18:49:38 +02:00
RedworkDE
3ed8721c97 Update list of known breaking changes compared to 4.0-stable (3) 2023-06-14 16:06:24 +02:00
ajreckof
5c15083d40 properly update nodepath with batch rename 2023-06-14 15:12:46 +02:00
kleonc
77b8e0fcb7 Allow setting negative WorldBoundaryShape2D.distance through the editor 2023-06-14 14:54:00 +02:00
Rémi Verschelde
01453ab7f3
Merge pull request #78223 from akien-mga/gdscript-test-no-function
GDScript: Further restrict test error output for C++ errors
2023-06-14 13:47:28 +02:00
Rémi Verschelde
72b8d397d0
GDScript: Further restrict test error output for C++ errors
MSVC and GCC/Clang also have different function names...
2023-06-14 13:28:52 +02:00
Rémi Verschelde
824c139f6b
Merge pull request #78216 from akien-mga/gdscript-test-no-file-path
GDScript: Only include script file path in test error output
2023-06-14 11:14:07 +02:00
Rémi Verschelde
72ee877b22
Merge pull request #78203 from felaugmar/patch-1
Fixed `RichTextLabel::clear` documentation
2023-06-14 11:13:44 +02:00
Rémi Verschelde
838b19a1cc
Merge pull request #78063 from lawnjelly/scu_non_relative_paths
SCU build - make paths relative to project folder
2023-06-14 11:13:16 +02:00
Rémi Verschelde
c40adf027d
GDScript: Only include script file path in test error output
Errors originating in C++ files cause unnecessary diffs whenever the engine is updated
(line number changes, etc.) and would cause CI failures due to different formatting
of the file path on Windows (backslashes, worked around here anyway) and when using
SCU builds (`../scu` insert).
2023-06-14 10:54:49 +02:00
Fabio Alessandrelli
0aad5eb1cf
Merge pull request #77627 from TestSubject06/reciprocal-conns
Allow an ENetConnection to send a packet to an arbitrary destination for the purposes of establishing NAT routing table entries.
2023-06-14 10:29:05 +02:00