Commit Graph

1556 Commits

Author SHA1 Message Date
fed31b1827 Merge pull request #49616 from BastiaanOlij/more_rename_transform
Adding some more missing renames for Transform3D and Quaternion
2021-06-15 16:50:52 +02:00
2161fd117b Adding some more missing renames for Transform3D and Quaternion 2021-06-15 16:01:50 +02:00
cbcdda60c0 Merge pull request #49570 from RandomShaper/fix_slow_scene_io 2021-06-15 14:51:24 +02:00
d6ae7edd80 Fix "super" call when having at least one argument 2021-06-13 17:46:03 +02:00
2ca6b9c610 Fix slow load/save of scenes with many instances of the same script 2021-06-13 13:32:44 +02:00
04688b92ff Rename Reference to RefCounted 2021-06-11 18:48:42 +02:00
8d4046929c Merge pull request #49511 from akien-mga/core-diraccess-fileaccess-io
Core: Move DirAccess and FileAccess to `core/io`
2021-06-11 16:51:10 +02:00
6b0183ec89 Merge pull request #49279 from Calinou/rename-string-is-abs-path-method
Rename `String.is_abs_path()` to `String.is_absolute_path()`
2021-06-11 15:58:16 +02:00
6107d9e180 Merge pull request #34566 from Heikki00/34541_to_json_precision
Increased String::num default decimal precision
2021-06-11 15:56:59 +02:00
9e328bb5b7 Core: Move DirAccess and FileAccess to core/io
File handling APIs are typically considered part of I/O, and we did have most
`FileAccess` implementations in `core/io` already.
2021-06-11 14:52:39 +02:00
771190a9db Fix regression from 160c260 causing export of non-@export properties. 2021-06-10 20:35:58 -07:00
69e6d65295 Merge pull request #49367 from Calinou/gdscript-highligher-add-annotations
Highlight annotations in the GDScript syntax highlighter
2021-06-07 17:20:11 +02:00
896aa94283 Merge pull request #49221 from Faless/mp/4.x_rpc_refactor
[Net] Refactor RPCs, remove RSETs
2021-06-07 17:00:08 +02:00
32e97cb805 Highlight annotations in the GDScript syntax highlighter
By default, a orange color is used to highlight annotations in the
script editor.
2021-06-06 21:33:23 +02:00
8acd13a456 Rename Quat to Quaternion 2021-06-04 18:14:32 +01:00
5ea1c75d63 Rename String.is_abs_path() to String.is_absolute_path()
This is more consistent with `NodePath.is_absolute()`.
2021-06-03 16:00:06 +02:00
08a85352fb Rename Variant TRANSFORM to TRANSFORM3D
Also _transform to _transform3d
2021-06-03 07:30:01 -04:00
de3f6699a5 Rename Transform to Transform3D in core 2021-06-03 07:30:01 -04:00
d779b5aa3e [Net] Refactor RPCs, remove RSETs
In this PR:
- Removed rset
- rpc_config can now optionally configure transfer mode
  (reliable/unreliable/ordered) and channel (channels are not actually
  implemented yet.)
- Refactor how the RPC id is computed to minimize the logic in Node and
  scripts that now only needs a single `get_rpc_methods` function.
2021-06-01 17:24:21 +02:00
59b524ae4c Merge pull request #49067 from JFonS/fix_gcc_warnings
Fix some warnings raised by GCC-11.1
2021-06-01 10:47:37 +02:00
1704be0a44 Rename the bundled text editor themes for consistency with themes
The Adaptive text editor theme is the default, and has therefore
been renamed Default for consistency with the Default theme preset.
It keeps its automatic dark/light switch status.

The Default text editor theme was actually a legacy Godot 2-style theme,
so it has been renamed to Godot 2 to match the theme preset.
Its background color has been changed to be a constant opaque color,
since the new editor theme made the theme look less good on a translucent
background. The previous background color on light theme also lacked
contrast.
2021-05-31 14:02:13 +02:00
09a905ca80 Increase String::num default decimal precision
Fixes #34541

Renamed MAX_DIGITS to MAX_DECIMALS, since it only changes the
amount of digits after the decimal point.

Increased MAX_DECIMALS to 32, and made String::num use
MAX_DECIMALS consistently. If -1 is passed as
decimal precision to String::num, it now gets changed to
the correct precision based on the number's magnitude,
instead of using printf default(which is 6)

String::num_real also calculates the correct precision now.

Also made the types used in floating-point math more
consistent in a few places.
2021-05-29 11:24:57 -04:00
364ea7f280 Merge pull request #49114 from vnen/gdscript-fix-self-function-type-check
GDScript: Fix function signature check for self calls
2021-05-26 20:59:17 +02:00
78bbb2cae1 Merge pull request #49112 from vnen/gdscript-assign-type-check
GDScript: Use analyzer data to decide assignment conversion
2021-05-26 20:34:43 +02:00
a23fc45727 GDScript: Fix function signature check for self calls 2021-05-26 15:33:18 -03:00
c7459e3855 GDScript: Use analyzer data to decide assignment conversion
Since there might be tricky cases in the analyzer (in the case of unsafe
lines) which would need to be properly checked again. Instead, this
splits the code generator in two functions and use information set by
the analyzer to tell which function to use, without a need to re-check.
2021-05-26 14:09:00 -03:00
f8e34209af Fix some warnings raised by GCC-11.1 2021-05-25 17:23:53 +02:00
da5d7db610 Rename File::get_len() get_length() 2021-05-25 11:54:28 +01:00
215e43242c Merge pull request #49037 from vnen/fix-callable-freed-crash 2021-05-24 19:52:32 +02:00
ea44744e2d Make Callable not crash on call when the object has been freed
Also add a GDScript test for this case.
2021-05-24 14:23:02 -03:00
ffdb3cccd2 GDScript: Fix error handler for tests
This changes the error message to be more clear on the output files and
also fixes an issue with the relative path of the offending file that
was not trimmed correctly.
2021-05-24 14:17:20 -03:00
b1859510ab Change behavior of String.right 2021-05-20 23:07:57 +02:00
4219a4cb6f Fix typos with codespell
Using codespell 2.0.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2021-05-20 12:38:56 +02:00
169268ae20 Merge pull request #48657 from Calinou/test-add-gdscript
Add a unit test suite for GDScript
2021-05-19 20:49:03 +02:00
7b261d1cb7 Show colored rects for autocompletion of Color constants in functions 2021-05-19 14:40:03 +03:00
cdb3726fe6 Merge pull request #48347 from Blackiris/fix-temporary-key-not-released
GDScript: Fix temporary value not released when used as a dictionary key
2021-05-17 18:50:25 -03:00
2fcfc83da9 Merge pull request #48793 from vnen/gdscript-fix-temp-type-adjust
GDScript: Fix crash caused by uninitialized temp stack slots
2021-05-17 17:34:19 +02:00
10a1f64968 GDScript: Fix crash caused by uninitialized temp stack slots
This adds initialization to every typed temporary stack slot at the
beginning of the function call instead of emitting instructions, since
those might be in a conditional branch and not be called.
2021-05-17 10:59:43 -03:00
469fa47e06 Make all file access 64-bit (uint64_t)
This changes the types of a big number of variables.

General rules:
- Using `uint64_t` in general. We also considered `int64_t` but eventually
  settled on keeping it unsigned, which is also closer to what one would expect
  with `size_t`/`off_t`.
- We only keep `int64_t` for `seek_end` (takes a negative offset from the end)
  and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means
  we only need to guard against passing negative values in `core_bind.cpp`.
- Using `uint32_t` integers for concepts not needing such a huge range, like
  pages, blocks, etc.

In addition:
- Improve usage of integer types in some related places; namely, `DirAccess`,
  core binds.

Note:
- On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with
  version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for
  big files on 32-bit Windows builds made with that toolchain. We might add a
  workaround.

Fixes #44363.
Fixes godotengine/godot-proposals#400.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-05-17 15:06:19 +02:00
a7421612d0 Merge pull request #48767 from vnen/gdscript-builtin-static-methods
GDScript: Add support for builtin static method calls
2021-05-16 22:29:32 +02:00
ec783dd885 GDScript: Add support for builtin static method calls 2021-05-16 11:54:33 -03:00
6c528e4fae Add a unit test suite for GDScript
This tests run-time script loading.
2021-05-12 16:20:57 +02:00
8962d36bb1 Merge pull request #33577 from Calinou/highlight-control-flow-keywords
Highlight control flow keywords with a different color
2021-05-07 00:52:50 +02:00
82522662f8 Fix temporary value not released when used as a dictionary key 2021-05-06 22:13:05 +02:00
ae2359fc1f Merge pull request #47776 from Razoric480/foreport
Implement LSP didDeleteFiles & make parser aware of sub-nodes
2021-05-06 20:46:18 +02:00
ee4ef9709d Merge pull request #46714 from HaSa1002/fix-gdscript-underscore-strict
Fix GDScript Tokenizer being very strict about the number of underscores
2021-05-06 20:19:45 +02:00
3f078c99f6 Rename IP_Unix, IP_Address and TCP_Server to remove underscores 2021-05-06 02:52:01 +02:00
e905e8f145 Highlight control flow keywords with a different color
This makes them easier to distinguish from other keywords.
2021-05-05 22:38:12 +02:00
302b6ef576 Merge pull request #47798 from ray90514/bug#47620
Fix constants at function scope are not defined as constants for completion
2021-05-04 08:20:03 +02:00
4e06731346 Merge pull request #47958 from Xrayez/gdscript-rename-test-scripts
Rename GDScript test script filenames to use `snake_case`
2021-05-03 15:44:46 +02:00