Commit Graph

2169 Commits

Author SHA1 Message Date
f914276951 Merge pull request #37537 from ThakeeNathees/const-parsing-datatype-bug-fix
GDScript: Fix type inference for const reference to global class
2020-04-21 23:04:46 +02:00
9716204555 Merge pull request #37712 from stoofin/pattern-bind-warning
Fix unassigned variable warnings for match bindings
2020-04-21 23:04:16 +02:00
4f03e302a7 Merge pull request #38041 from ThakeeNathees/class-name-check-enhance
GDScript class name existance check enhanced
2020-04-21 16:19:53 +02:00
a5a9bf6a19 Merge pull request #37955 from ThakeeNathees/lin-unsafe-base-know-index-unkonwn
Line marked unsafe when base known and index unkonwn
2020-04-21 16:19:34 +02:00
9cad835880 Merge pull request #37954 from ThakeeNathees/autocomplete-indexing-native-types
Autocompleting with indexing for builtin types added
2020-04-21 16:19:07 +02:00
5d4dc2d45c Add ability to bind typed arrays to script API
Note: Only replaced 2 instances to test, Node.get_children and TileMap.get_used_cells
Note: Will do a mass replace on later PRs of whathever I can find, but probably need
a tool to grep through doc.
Warning: Mono will break, needs to be fixed (and so do TypeScript and NativeScript, need to ask respective maintainers)
2020-04-21 10:15:40 +02:00
ae09b55a19 Exposed RenderingDevice to script API
Also added an easier way to load native GLSL shaders.

Extras:

Had to fix no-cache for subresources in resource loader, it was not properly working, making shaders not properly reload.

Note:

The precommit hooks are broken because they don't seem to support enums from one class being used in another.
Feel free to fix this after merging this PR.
2020-04-20 21:21:58 -03:00
2cd952bd84 Fix handling of PROPERTY_USAGE_SUBGROUP in DocData and editor
Subgroups were added in #37678 but not properly handled everywhere
where PROPERTY_USAGE_GROUP is.
2020-04-20 17:13:06 +02:00
0ef8bcac4d DocData: Skip unexposed classes
Properly expose classes that we actually want accessible.
2020-04-20 12:51:10 +02:00
62280c3d47 GDScript class name existance check enhanced 2020-04-20 16:20:36 +05:30
0780ad2800 line unsafe for indexing with known base type & unkown identifier 2020-04-17 16:52:22 +05:30
3c45377c6e autocompleting with indexing for native types added
Fix: #37768
2020-04-17 12:13:57 +05:30
b192c7d1ac Fixed the bool _static logic 2020-04-16 21:23:17 +05:30
5e5103f460 Merge pull request #37861 from reduz/implement-decals
Implement decals
2020-04-14 17:13:20 +02:00
5944eb6e7f Implement decals
Also implemented decal atlas, so projectors and other stuff can be added.
Sidenote: Had to make RID hashable, so some unrelated includes changed
in order to include it in hashfuncs.h
2020-04-14 11:13:34 -03:00
cfb00d4ed0 Merge pull request #37817 from ThakeeNathees/disconnect-autocomplete
autocomplete for disconnect implemented
2020-04-13 12:07:25 +02:00
efe90fce01 autocomplete for disconnect, is_connected implemented 2020-04-13 12:35:06 +05:30
67f7ba2645 Merge pull request #37395 from ThakeeNathees/collon-equal-parser-bug-fix
`:=` fails on some nodes fix: #37357
2020-04-10 12:36:44 +02:00
44281f233d Pattern bind counts as assignment
Fixes #34697
2020-04-09 05:01:40 -07:00
e67eb5ca36 GDScript class var type resolve bug fixed
Fix: #37545
2020-04-05 08:35:24 +05:30
029b34da40 GDScript: Fix type inference for const reference to global class
Fixes #37529.
2020-04-03 12:43:52 +05:30
ea7b497065 Replace more occurrences of NULL with nullptr 2020-04-02 14:56:01 +02:00
95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
4c3c73ef9c Add missing docs for assert message in GDScript
Seems like this was overlooked in PR #31142. See also issue #17082.
2020-03-31 19:56:44 +02:00
f3c74afd28 Merge pull request #37436 from akien-mga/doc-node-renames
doc: Update classref with node renames
2020-03-30 20:32:11 +02:00
eaaee63b62 doc: Update classref with node renames
A few extra renames for classes which were missed in last week's PRs.
2020-03-30 18:23:02 +02:00
cd4e46ee65 SCons: Format buildsystem files with psf/black
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.
2020-03-30 09:05:53 +02:00
bdd7048cb5 := fails on some nodes fix: #37357 2020-03-29 16:01:54 +05:30
0ecca1abd0 Merge pull request #37364 from ThakeeNathees/fix-forloop-range-bug-#37358
Fix for loop range bug: #37358
2020-03-28 17:39:36 +01:00
0b5bad78c0 Fix for loop range bug: #37358 2020-03-28 02:20:58 +05:30
23a8a8c667 Revert "Allow parameters passed to GDScript functions to be nulled"
This reverts commit f0efc7521e.

Fixes #37312.
2020-03-26 17:02:28 +01:00
441f1a5fe9 Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
f8a79a97c7 Effective DisplayServer separation, rename X11 -> LinuxBSD 2020-03-26 15:49:34 +01:00
8dc8833782 Mark assert lines as safe in gdscript
Now calling _reduce_node_type with debugging enabled to determine
if assert line is safe. Part of doing this required the assert line
to be stored away. Now the AssertNode line is being correctly set.
Newlines are now marked safe always
2020-03-25 08:42:04 -05:00
cfd84625f0 Move DocData and Collada out of their subfolders
Now that the unused DocDump was removed, the `editor/doc` subfolder is
redundant.

Similarly, there's no reason for Collada to have a subfolder for itself
when glTF or OBJ don't.
2020-03-24 09:56:04 +01:00
2ecf928ae3 Adding missing include guards to header files identified by LGTM.
This addresses the issue godotengine/godot#37143
2020-03-23 04:52:36 -04:00
d2664a0ff1 autocomplete for load() function implemented 2020-03-22 22:21:34 +05:30
cb282c6ef0 Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.

Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-17 07:36:24 +01:00
f6cee4a121 python like string escape implemented 2020-03-15 05:37:15 +05:30
5002f6de84 Merge pull request #36599 from AndreaCatania/gen_rpc_data_export
Generates the rpc and rset info for exported GDScript.
2020-03-13 10:19:30 +01:00
e147be6031 Merge pull request #36723 from AndreaCatania/fix-rset
Fixed rset method for gdscript and visual script
2020-03-13 10:18:56 +01:00
7bf6e5f773 Fix various typos
Found via `codespell`
2020-03-11 13:59:18 -04:00
cdbf033290 Merge pull request #36704 from ThakeeNathees/gdscript-duplicate-args-fix
GDScript duplicate arguments bug fixed
2020-03-10 13:10:00 +01:00
57ab10ccf3 Merge pull request #36767 from ThakeeNathees/class-pass-fix
fix: Classes can't have pass
2020-03-10 13:08:27 +01:00
95c9345b63 Merge pull request #36859 from ThakeeNathees/logic-error-for-loop-range-parsing
Fix: logic error in gdscript_parser.cpp for-loop-range
2020-03-10 13:08:01 +01:00
478337c412 Merge pull request #36751 from Faless/debugger/threads_and_profilers
ScriptDebugger refactor, threading, profilers.
2020-03-09 19:08:07 +01:00
d9524d8890 Merge pull request #36912 from Xrayez/resurrect-module-icons
Fix missing module editor icons
2020-03-09 12:15:44 +01:00
3acebdeecd Fix missing module editor icons
Module icons need to be renamed to PascalCase as well
for them to be registered in 4.0.

See godotengine/godot#36513.
2020-03-08 19:32:25 +02:00
7579a792be Merge pull request #36683 from rafaeldelboni/master
Return only scenes for script owners on LSP completion
2020-03-08 16:19:31 +01:00
b8ddaf9c33 Refactor ScriptDebugger.
EngineDebugger is the new interface to access the debugger.
It tries to be as agnostic as possible on the data that various
subsystems can expose.

It allows 2 types of interactions:

- Profilers:
  A subsystem can register a profiler, assigning it a unique name.
  That name can be used to activate the profiler or add data to it.
  The registered profiler can be composed of up to 3 functions:
    - Toggle: called when the profiler is activated/deactivated.
    - Add: called whenever data is added to the debugger
      (via `EngineDebugger::profiler_add_frame_data`)
    - Tick: called every frame (during idle), receives frame times.

- Captures: (Only relevant in remote debugger for now)
  A subsystem can register a capture, assigning it a unique name.
  When receiving a message, the remote debugger will check if it starts
  with `[prefix]:` and call the associated capture with name `prefix`.

Port MultiplayerAPI, Servers, Scripts, Visual, Performance to the new
profiler system.

Port SceneDebugger and RemoteDebugger to the new capture system.
The LocalDebugger also uses the new profiler system for scripts
profiling.
2020-03-08 12:36:39 +01:00