Build PCRE2 thirdparty library with unicode support. RegEx objects
in Godot can now be used to recognize unicode strings.
(cherry picked from commit 9f10f6779c)
Configured for a max line length of 120 characters.
psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:
- Manually wrapped strings will be reflowed, so by using a line length
of 120 for the sake of preserving readability for our long command
calls, it also means that some manually wrapped strings are back on
the same line and should be manually merged again.
- Code generators using string concatenation extensively look awful,
since black puts each operand on a single line. We need to refactor
these generators to use more pythonic string formatting, for which
many options are available (`%`, `format` or f-strings).
- CI checks and a pre-commit hook will be added to ensure that future
buildsystem changes are well-formatted.
(cherry picked from commit cd4e46ee65)
`latest_client_id` now defaults to `-1` (invalid ID) instead of `0`.
Also fix typo in notification `gdscrip_client/changeWorkspace`,
and fix argument names in method binds.
Fixes#39375.
(cherry picked from commit e34f33711b)
ice_candidate_created should be emitted after set_local_description no
matter the type of the description (assuming no error is returned of
course).
(cherry picked from commit 39bcbf5690)
Attempting to move the function node to another function whose data connection is a dependency of the node the specific node being moved to a different function during changes to sequence connections.
By skipping, if the from_node is a function_node during the data connection dependencies scan.
Should fix#37991
(cherry picked from commit 5c48631509)
Simple fix for #38627. iOS (#20268) and HTML5 (#20270) removed from list of exceptions
for platforms supported in warning message.
(cherry picked from commit 3d03be7a56)
Depending on the conditional statements of the 'for' and 'while' loops,
their body may not even execute once. For example:
func a():
var arr = []
for i in arr:
return i
# can be reached, but analysis says cannot
return -1
func b():
var should_loop = false
while should_loop:
return 1
# can be reached, but analysis says cannot
return 0
The parser will complain that the statements after the comment cannot
be reached, but it is clearly possible for our scenario. This is
because the parser falsely assumes that the loop body will always
execute at least once.
Fix the code to remove this assumption for both of those loops.
(cherry picked from commit 7b1423a61e)
A class can't have multiple signals with the same name, but previously users
would not be alerted to a conflict while editing the script where it occurred.
Now a helpful error will appear in the editor during script parsing.
(cherry picked from commit 9e44739324)
This patch adds ability to include external, user-defined C++ modules
to be compiled as part of Godot via `custom_modules` build option
which can be passed to `scons`.
```
scons platform=x11 tools=yes custom_modules="../project/modules"
```
Features:
- detects all available modules under `custom_modules` directory the
same way as it does for built-in modules (not recursive);
- works with both relative and absolute paths on the filesystem;
- multiple search paths can be specified as a comma-separated list.
Module custom documentation and editor icons collection and generation
process is adapted to work with absolute paths needed by such modules.
Also fixed doctool bug mixing absolute and relative paths respectively.
Implementation details:
- `env.module_list` is a dictionary now, which holds both module name as
key and either a relative or absolute path to a module as a value.
- `methods.detect_modules` is run twice: once for built-in modules, and
second for external modules, all combined later.
- `methods.detect_modules` was not doing what it says on the tin. It is
split into `detect_modules` which collects a list of available modules
and `write_modules` which generates `register_types` sources for each.
- whether a module is built-in or external is distinguished by relative
or absolute paths respectively. `custom_modules` scons converter
ensures that the path is absolute even if relative path is supplied,
including expanding user paths and symbolic links.
- treats the parent directory as if it was Godot's base directory, so
that there's no need to change include paths in cases where custom
modules are included as dependencies in other modules.
(cherry picked from commit a96f0e98d7)
Any C# file can be loaded as script and at load
time we don't yet know if it's actually meant to
be used as a script. As such, such an check can
result in a lot of false errors.
If the file is really meant to be used as a
script, an error would be printed later when
attempting to instantiate it any way.
(cherry picked from commit 38cd2152e6)
When a child scene inherits a parent scene with a C# root node, the
parent scene's export variables appear to assume values set in the
parent scene, in the child scene's Inspector. However, when the child
scene is played, the parent scene's export variables assume default
values.
When a node is created, it inherits its parent C# script's fields from
the map CSharpScriptInstance::script->member_info. However this map was
not initialized outside the editor, and this commit ensured it is. This
fixes issues #36480 and #37581.
This is a manual backport of PR #38638 for 3.2.
By adding a reference to the 'Microsoft.NETFramework.ReferenceAssemblies' nuget
package, we can build projects targeting .NET Framework with the dotnet CLI.
By referencing this package we also don't need to install Mono on Linux/macOS
or .NET Framework on Windows, as the assemblies are taken from the package.
- Make GodotTools output directly to the SCons output directory.
- Removed xbuild_fallback from the build system.
(cherry picked from commit b61ffef0ab)