Commit graph

8953 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
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
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
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
rune-scape
fcdd926881 GDScript: Strings and StringNames match 2023-06-14 19:24:28 -07: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
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
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
Rémi Verschelde
754a52a4ab
Merge pull request #78201 from smix8/navmesh_cell_height_4.x
Fix `cell_height` for navigation meshes
2023-06-14 09:27:33 +02:00
Rémi Verschelde
5145098e6e
Merge pull request #78138 from KoBeWi/are_we_clear
Clear SelfList when destroying GDScriptLanguage
2023-06-14 09:25:34 +02:00
Rémi Verschelde
375156a637
Merge pull request #78099 from DeeJayLSP/rvo2023
Update RVO2 to git 2022.09
2023-06-14 09:25:10 +02:00
Rémi Verschelde
8b62c52d1c
Merge pull request #75419 from vonagam/fix-super-classes-in-array-literals
GDScript: Allow elements of a parent class in a typed array literal
2023-06-14 09:23:32 +02:00
DeeJayLSP
c920881105 Update RVO2 to git 2022.09 2023-06-13 21:13:21 -03:00
smix8
ee14b010ac Fix for threaded NavigationMesh baking under new thread guards
Fixes threaded NavigationMesh baking under new SceneTree thread guards that blocked the process.
2023-06-14 01:53:37 +02:00
TestSubject06
9e2f48c749 Add socket_send method to ENetConnection.
* Sends a given packet toward a given destination address and port, using the current ENetHost's socket.
2023-06-13 19:52:19 -04:00
smix8
180a5cded1 Fix cell_height for navigation meshes
Fixes `cell_height` for navigation meshes.
2023-06-13 23:24:32 +02:00
Danil Alexeev
ddd9aa11b3
Clarify @rpc annotation arguments docs 2023-06-13 21:33:48 +03:00
Rémi Verschelde
eb86dabee0
Merge pull request #77151 from dalexeev/gds-fix-call-static-from-non-static
GDScript: Fix calling static func from non-static is allowed
2023-06-13 18:54:19 +02:00
Rémi Verschelde
2b373f795c
Merge pull request #78173 from smix8/navregion_rot_warning_4.x
Add NavigationRegion rotation warning
2023-06-13 13:53:09 +02:00
Rémi Verschelde
c3e4dd86ff
Merge pull request #77693 from smix8/navmap_sync_warnings_4.x
Add navigation map synchronization warnings
2023-06-13 13:52:46 +02:00
smix8
4d8553ff63 Add NavigationRegion rotation warning
Adds NavigationRegion rotation warning.
2023-06-13 11:58:47 +02:00
Mikael Hermansson
1c1d1a1e2e Fix crash when using base types of extension-based types from C# 2023-06-12 18:29:52 +02:00
Rémi Verschelde
e208cdb170
Merge pull request #78081 from smix8/obstacle_api_update_4.x
Update NavigationObstacle API
2023-06-12 17:10:28 +02:00
kobewi
c646f7df70 Clear SelfList when destroying GDScriptLanguage 2023-06-12 16:04:26 +02:00
Rémi Verschelde
e289cf7085
pcre2: Update to upstream version 10.42 (take two)
Changelog: https://github.com/PCRE2Project/pcre2/blob/pcre2-10.42/ChangeLog

This fixes support for RISC-V architectures in the sljit library, so we
enable the module's compilation for `rv64` too.
2023-06-12 15:12:15 +02:00
smix8
c1fc331b88 Update navigation obstacle API
Updates navigation obstacle API.
2023-06-12 14:26:45 +02:00
Rémi Verschelde
055986c870
Merge pull request #78125 from KoBeWi/editing_gone_wrong
Fix some invalid plugin edit calls
2023-06-12 11:57:35 +02:00
Rémi Verschelde
686d3efa39
Merge pull request #78112 from Faless/mp/4.x_fix_delta_crash
[MP] Fix crash when sending multiple delta variants.
2023-06-12 11:56:21 +02:00
kobewi
366c9678ca Fix some invalid plugin edit calls 2023-06-11 22:15:54 +02:00
Fabio Alessandrelli
45456f89a2 [MP] Fix crash when sending multiple delta variants. 2023-06-11 13:43:49 +02:00
Hakim
1fb1dd3248 Refresh the filesystem tab when exporting a new GLTF file 2023-06-10 23:04:20 +02:00
Rémi Verschelde
20bf10d15b
Merge pull request #77714 from smix8/navmap_error_msgs_4.x
Improve navigation map synchronisation error msgs
2023-06-10 12:11:00 +02:00
Rémi Verschelde
5047892939
Merge pull request #73939 from raulsntos/dotnet/export-symbols
C#: Add option to disable exporting debug symbols
2023-06-09 12:14:15 +02:00
Rémi Verschelde
577ab3c565
Merge pull request #75746 from ajreckof/order_autocomplete
Sort code autocompletion with rules
2023-06-08 18:14:31 +02:00
Rémi Verschelde
1d6b28f867
Merge pull request #77898 from DeeJayLSP/vulkan-250
Update Vulkan and related libraries to 1.3.250.0
2023-06-07 13:31:57 +02:00
Rémi Verschelde
aa5dfff3f0
Merge pull request #77410 from dsnopek/object-pointer-pointer-encoding
Standardize Object ptrcall encoding on `Object **`
2023-06-07 13:31:49 +02:00
Rémi Verschelde
ec999b24ee
Merge pull request #74065 from RedworkDE/net-dotnet-encoding
C#: Always decode `dotnet` output as UTF-8
2023-06-07 12:08:46 +02:00
Rémi Verschelde
e3f446a123
Merge pull request #77942 from bruvzg/svg_font_viewbox_fix
Fix SVG font rendering after ThorVG update.
2023-06-07 11:02:27 +02:00
RedworkDE
e0efa3c357 C#: Always decode dotnet output as UTF-8 2023-06-07 10:58:34 +02:00
bruvzg
35b0354577
Fix SVG font rendering after ThorVG update. 2023-06-07 09:02:04 +03:00
Aaron Franke
6dde6b4cdf
GLTF: Expose the inertia tensor instead of a vector 2023-06-06 21:06:49 -05:00
Rémi Verschelde
0a0132ccf4
Merge pull request #77904 from raulsntos/dotnet/obsolete-deprecated-members
C#: Add `[Obsolete]` attribute to deprecated members
2023-06-06 20:40:09 +02:00
Rémi Verschelde
e2fcc4de34
Merge pull request #75188 from RedworkDE/net-synchronize-insert
C#: Synchronize adding ScriptInstances
2023-06-06 20:39:16 +02:00
Rémi Verschelde
bcdf3fe984
Merge pull request #75043 from dalexeev/gds-fix-doc-comment-parsing
GDScript: Fix doc comment parsing (newlines and spaces)
2023-06-06 20:38:47 +02:00
DeeJayLSP
1b642d283c Update Vulkan and related libraries to 1.3.250.0 2023-06-06 12:40:04 -03:00
Yuri Sizov
df38a53e05
Merge pull request #77756 from MewPurPur/In-my-ongoing-pursuit-of-optimization-I-undertook-the-task-of-meticulously-refining-and-streamlining-a-substantial-quantity-of-Scalable-Vector-Graphics-files-with-the-goal-of-maximizing-their-operational-effectiveness-and-resource-utilization
Reduce the total size of our SVGs by 15%
2023-06-06 12:41:16 +02:00
Raul Santos
0484993121
C#: Add [Obsolete] attribute to deprecated members 2023-06-06 12:23:23 +02:00
Danil Alexeev
049a49cac0
GDScript: Fix doc comment parsing (newlines and spaces) 2023-06-05 16:00:46 +03:00
VolTer
119456304b Reduce the total size of our SVGs by 15% 2023-06-04 15:11:48 +02:00
smix8
7f2417135f Improve navigation map synchronisation error msgs
Improves navigation map synchronisation error msgs related to mismatch of cell sizes.
2023-06-03 11:40:33 +02:00
Aaron Franke
629613a867
GLTF: Document gltf_skeleton->godot_bone_node is unused when importing 2023-06-03 02:13:07 -05:00
Raul Santos
0aa1f3440e
C#: Add option to disable exporting debug symbols
- Add export option to configure if the exported game should include debug symbols (PDB).
- Remove unused `outputDir` local variable.
- Replace `Process.GetCurrentProcess().Id` with `System.Environment.ProcessId` (CA1837).
2023-06-02 16:37:59 +02:00
smix8
fef7b4efdc Add navigation map synchronization warnings.
Adds navigation map synchronization warnings.
2023-05-31 16:23:27 +02:00
Mack
1326b7e04f Fix buffer over-read and memory leaks when using long filepaths in a zip archive and improved robustness of long filepaths and reading files. 2023-05-31 13:11:59 +00:00
Yuri Sizov
abba4e951a
Merge pull request #75614 from AThousandShips/vector_doc
Add more info on the nature of NAN
2023-05-30 16:21:38 +02:00
Yuri Sizov
f00641af9d
Merge pull request #77657 from vmedea/color-hex-doc
Clarify doc for Color.hex
2023-05-30 15:59:39 +02:00
Yuri Sizov
f067e27e0b
Merge pull request #77017 from Calinou/doc-noisetexture-seamless-small
Document seamless caveats on small textures in NoiseTexture2D and NoiseTexture3D
2023-05-30 15:43:22 +02:00
Ninni Pipping
5e3c625e24 Add more info on the nature of NAN 2023-05-30 15:38:10 +02:00
Yuri Sizov
3119255c0b
Merge pull request #72619 from raulsntos/dotnet/global-class-script
C#: Add global class support
2023-05-30 15:35:53 +02:00
mara
779ac20bb9 Clarify doc for Color.hex and C# Color()
The "alpha channel first" seems misleading to me. It doesn't match with
the examples, so remove it. Add a more detailed specification of the
expected number format in hex.
2023-05-30 15:15:04 +02:00
Rémi Verschelde
a65825cf72
Merge pull request #77597 from MewPurPur/highlighter-icons
Add syntax highlighter icons
2023-05-30 09:33:25 +02:00
VolTer
1740f7ea53 Add syntax highlighter icons 2023-05-29 20:42:54 +02:00
Raul Santos
a1f454fee3
C#: Add global class support
Co-authored-by: willnationsdev <willnationsdev@gmail.com>
2023-05-29 19:04:02 +02:00
Yuri Sizov
b4ac381f30
Merge pull request #77609 from RedworkDE/class-ref-code-fixes
Fix more issues with code tags in class reference
2023-05-29 17:37:16 +02:00
Yuri Sizov
7505fbd939
Merge pull request #76702 from MewPurPur/improve-docs-top-sections-GUI
Overhaul the top sections of the class reference (GUI classes)
2023-05-29 17:13:38 +02:00
Yuri Sizov
490a76edc8
Merge pull request #76526 from MewPurPur/improve-docs-top-sections-CORE
Overhaul the top sections of the class reference (Core classes)
2023-05-29 17:08:40 +02:00
RedworkDE
42ca35cfd7 Fix more issues with code tags in class reference 2023-05-29 15:46:34 +02:00
VolTer
1f4c5a702c Optimize CSG icons and more 2023-05-29 11:26:10 +02:00
Rémi Verschelde
409a3995e0
Merge pull request #77602 from aaronfranke/gltf-import-center-of-mass
Fix center of mass when importing GLTF physics bodies
2023-05-29 10:30:08 +02:00
Rémi Verschelde
eb1fbec467
Merge pull request #77550 from MewPurPur/reinstate-noise-texture-icon
Reinstate NoiseTexture2D's icon
2023-05-29 10:29:25 +02:00
Aaron Franke
a98be434b7
Fix center of mass when importing GLTF physics bodies 2023-05-29 00:09:15 -05:00
VolTer
151a4ba6a5 Overhaul the top sections of the class reference (GUI classes) 2023-05-28 14:24:54 +02:00
VolTer
ac8a9df2bf Reinstate NoiseTexture2D icon 2023-05-27 21:37:54 +02:00
Aaron Franke
5e139c2ab9
Add a get_node_index method to GLTFState 2023-05-27 12:30:25 -05:00
Haoyu Qiu
3e88c4cd5c Fix extraction of chained tr() calls 2023-05-27 10:38:37 +08:00
Rémi Verschelde
cb711a9950
Merge pull request #76895 from aaronfranke/gltf-webp
Add support for extending GLTF with more texture formats and support WebP
2023-05-26 11:00:06 +02:00
David Snopek
77733faede Attempt to standardize Object ptrcall encoding on Object ** 2023-05-25 21:46:22 -05:00
Ninni Pipping
f69fba0d65 Add restrictions to MultiplayerSynchronizer editor and documentation 2023-05-24 09:37:11 +02:00
Rémi Verschelde
dc625bcbfc
Merge pull request #77413 from theraot/master
Fix GLTFSkin binding for the godot_skin property
2023-05-24 08:50:21 +02:00
Fabio Alessandrelli
f1e0d50841 [MP] Implement "watched" properties.
Checked at "delta_interval" (default = every frame), synchronized
(reliably) if changes are detected.
2023-05-24 05:21:41 +02:00
Theraot
3b9bcadb9e Fix GLTFSkin binding for the godot_sking property 2023-05-23 19:28:06 -05:00
Rémi Verschelde
09d3dc86c0
Merge pull request #77379 from bruvzg/update_ts_libs
Update HarfBuzz, ICU and FreeType
2023-05-23 19:15:08 +02:00
Rémi Verschelde
ea5322fce2
Merge pull request #77377 from RedworkDE/net-sendtodebugger-crash
C#: Fix `SendToScriptDebugger` crash
2023-05-23 19:14:59 +02:00
ajreckof
006e899bb3 sort code completions with rules
Fixups

Add levenshtein distance for comparisons, remove kind sort order, try to improve as many different use cases as possible

Trying again to improve code completion

Sort code autocompletion options by similarity based on input

To make it really brief, uses a combination `String.similiary`, the category system introduced in a previous PR, and some filtering to yield more predictable results, instead of scattering every completion option at seemingly random.

It also gives much higher priority to strings that contain the base in full, closer to the beginning or are perfect matches.

Also moves CodeCompletionOptionCompare to code_edit.cpp

Co-Authored-By: Micky <66727710+Mickeon@users.noreply.github.com>
Co-Authored-By: Eric M <41730826+EricEzaM@users.noreply.github.com>
2023-05-23 05:12:34 +02:00
bruvzg
b64df2bf74
Update HarfBuzz, ICU and FreeType
HarfBuzz: Update to version 7.3.0
ICU4C: Update to version 73.1
FreeType: Update to version 2.13.0
2023-05-23 03:26:16 +03:00
RedworkDE
fa14b6d212 C#: Fix SendToScriptDebugger crash 2023-05-23 00:00:32 +02:00
Aaron Franke
7da93a0bc0
Add support for extending GLTF with more texture formats & support WebP 2023-05-22 16:30:20 -05:00
RedworkDE
8fdebb85ef C#: Synchronize adding ScriptInstances 2023-05-22 21:40:14 +02:00
bruvzg
aaddec7cb8
[TextServer] Add support for retrieving OpenType name strings. 2023-05-22 18:08:34 +03:00
ocean (they/them)
25c90836fd GDScript: do not warn of return value discarded for super() inside _init()
DO NOT BATCH MERGE WITH #77324, WILL RESULT IN BROKEN CI

Currently, calling super() inside _init() throws a
RETURN_VALUE_DISCARDED warning. The analyzer identifies super() as being a
constructor, which therefore returns an object of the relevant class.
However, super() isn't really a constructor by itself: in this case, it
is _part_ of the constructor, and so doesn't "return" a value.

A test case for this is already in #77324, which contains the warning. I
am duplicating it here, without the warning, and it should conflict with
the other PR.
2023-05-22 09:29:34 -04:00
Rémi Verschelde
4fd64edc30
Merge pull request #77199 from RedworkDE/net-callable-hash
C#: Mostly fix hash of ManagedCallable
2023-05-22 13:48:58 +02:00
Rémi Verschelde
06d337af80
Merge pull request #75943 from adamscott/fix-missing-script-type-nullptr-check
Add missing `script_type` `nullptr` check
2023-05-22 13:48:32 +02:00