summaryrefslogtreecommitdiffstats
path: root/modules
Commit message (Collapse)AuthorAgeFilesLines
* Update Mono C# warning to reflect latest list of platforms supportedMaganty Rushyendra2020-05-261-1/+1
| | | | | Simple fix for #38627. iOS (#20268) and HTML5 (#20270) removed from list of exceptions for platforms supported in warning message.
* Merge pull request #39015 from ↵Rémi Verschelde2020-05-251-1/+5
|\ | | | | | | | | ThakeeNathees/dict-key-autocomplete-regression-fix regression: dictionary key no autocomplete fix
| * regression: dictionary key no autocomplete fixThakee Nathees2020-05-241-1/+5
| | | | | | | | Fix: #38998
* | Add `custom_modules` build option to compile external user modulesAndrii Doroshenko (Xrayez)2020-05-251-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #38962 from neikeq/4.0-scons-option-build-cilRémi Verschelde2020-05-222-1/+2
|\ \ | | | | | | Add SCons option to not build C# solutions
| * | Add SCons option to not build C# solutionsIgnacio Etcheverry2020-05-222-1/+2
| | |
* | | Merge pull request #38366 from akien-mga/xatlas-470576dRémi Verschelde2020-05-221-1/+1
|\ \ \ | | | | | | | | xatlas: Sync with upstream 470576d
| * | | xatlas: Sync with upstream 470576dRémi Verschelde2020-05-201-1/+1
| | | |
* | | | Merge pull request #38943 from neikeq/yakamashiRémi Verschelde2020-05-221-0/+3
|\ \ \ \ | | | | | | | | | | Mono/C#: Don't try to load project assembly in project manager
| * | | | Mono/C#: Don't try to load project assembly in project managerIgnacio Etcheverry2020-05-221-0/+3
| | |/ / | |/| | | | | | | | | | | | | | This was causing an error message when launching the manager, because there is no project assembly to load.
* / | | Mono/C#: Fix values not updated in remote inspectorIgnacio Etcheverry2020-05-222-16/+46
|/ / /
* | | Merge pull request #33689 from jbuck3/signal-errorRémi Verschelde2020-05-211-0/+49
|\ \ \ | | | | | | | | Trigger an error when trying to define a preexisting signal in GDScript
| * | | Trigger an error when trying to define a preexisting signal in GDScriptJames Buck2019-11-251-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #35900 from yamgent/unreachableRémi Verschelde2020-05-211-2/+0
|\ \ \ \ | |_|/ / |/| | | Fix false positive "Unreachable code" warning for loops
| * | | gdscript_parser: Fix "unreachable code" false positive for loopsTan Wang Leng2020-05-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #38863 from neikeq/csharp-no-false-error-objtype-reloadRémi Verschelde2020-05-191-3/+1
|\ \ \ \ | | | | | | | | | | Mono/C#: Remove script load error about not a Godot.Object
| * | | | Mono/C#: Remove script load error about not a Godot.ObjectIgnacio Etcheverry2020-05-191-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Fix too eager GDScriptFunctionState stack cleanupPedro J. Estébanez2020-05-191-2/+0
| | | | |
* | | | | Style: Fix unnecessary semicolons that confused clang-formatRémi Verschelde2020-05-197-31/+12
| | | | |
* | | | | Merge pull request #38826 from bruvzg/gdnative_core_typesRémi Verschelde2020-05-1819-244/+2778
|\ \ \ \ \ | | | | | | | | | | | | Add new (and rename changed) core types to GDNative API.
| * | | | | GDNative add new core types.bruvzg2020-05-1819-244/+2778
| |/ / / /
* | | | | Merge pull request #38723 from neikeq/initial-classdb-testRémi Verschelde2020-05-182-218/+414
|\ \ \ \ \ | | | | | | | | | | | | Added tests for ClassDB
| * | | | | Added tests for ClassDBIgnacio Etcheverry2020-05-162-218/+414
| | | | | |
* | | | | | GLSL: Change shader type specifier from [vertex] to #[vertex]Rémi Verschelde2020-05-184-69/+35
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The added `#` prevents clang-format from misinterpreting the meaning of this statement and thus messing up the formatting of the next lines up until the first `layout` statement. Similarly, a semicolon is now enforced on `versions` defines to prevent clang-format from messing up formatting and putting them all on a single line. Note: In its current state the code will ignore chained statements on a single line separated by a semicolon. Also removed some extraneous lines missed in previous style changes or added by mistake with said changes (e.g. after uniform definitions that clang-format messes up somewhat too, but we live with it).
* | | | | Fix GDNative wrapper type sizes (RID, Variant, Packed*Array), add size ↵bruvzg2020-05-1621-9/+53
| |/ / / |/| | | | | | | | | | | checking static asserts.
* | | | websocket: Fix crash at exit when not running the editorIgnacio Etcheverry2020-05-161-1/+8
|/ / / | | | | | | | | | | | | | | | | | | EditorDebuggerServer::register_protocol_handler must not be called before editor initialization. Otherwise, if the editor is never initialized, the added StringName will not be released until static destructors are called (instead of being release during editor deinitialization).
* | | Fix incorrect capabilities notification in LSPOliver Frank2020-05-151-3/+3
| | | | | | | | | | | | (cherry picked from commit 2173d041af711c111d60d1fc1f45f96f4f8c7271)
* | | Improve jsonrpc error reportingOliver Frank2020-05-151-1/+1
| | | | | | | | | | | | (cherry picked from commit dac8b7b6f4fec0136a3dc95afae0aa8aa8ce9fd9)
* | | break, continue outside of a loop, match statement handledThakee Nathees2020-05-152-0/+37
| |/ |/|
* | Merge pull request #38738 from akien-mga/cause-we-never-go-out-of-styleRémi Verschelde2020-05-14267-5678/+3098
|\ \ | | | | | | Style: Remove new line at block start, enforce line between functions, enforce braces in if and loop blocks
| * | Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-14101-1443/+2707
| | | | | | | | | | | | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
| * | Style: Enforce separation line between function definitionsRémi Verschelde2020-05-1441-0/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
| * | Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-14257-4223/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
| * | Style: Fix missing/invalid copyright headersRémi Verschelde2020-05-148-12/+132
| | |
* | | Merge pull request #38610 from ThakeeNathees/infer-type-null-errorRémi Verschelde2020-05-141-0/+8
|\ \ \ | |/ / |/| | set parser error when infer type is null
| * | set parser error when infer type is nullThakee Nathees2020-05-131-0/+8
| | |
* | | Merge pull request #38611 from ThakeeNathees/shadow-var-warning-bug-fixRémi Verschelde2020-05-141-11/+5
|\ \ \ | | | | | | | | shadowed var warning in nested block bug fix
| * | | shadowed var warning in nested block bug fixThakee Nathees2020-05-101-11/+5
| |/ / | | | | | | | | | Fix: #38552
* | | Remove redundant void argument listsRémi Verschelde2020-05-143-3/+3
| | | | | | | | | | | | | | | Using clang-tidy's `modernize-redundant-void-arg`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-redundant-void-arg.html
* | | Enforce use of bool literals instead of integersRémi Verschelde2020-05-149-24/+24
| | | | | | | | | | | | | | | Using clang-tidy's `modernize-use-bool-literals`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
* | | Modernize remaining uses of 0/NULL instead of nullptr (C++11)Rémi Verschelde2020-05-145-6/+6
| | | | | | | | | | | | | | | Using clang-tidy's `modernize-use-nullptr`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
* | | Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-1450-615/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
* | | Merge pull request #38609 from ↵Rémi Verschelde2020-05-131-0/+2
|\ \ \ | | | | | | | | | | | | | | | | ThakeeNathees/range-crash-with-non-numeric-const-fix range() with non-numeric const argument crash fix
| * | | range() with non-numeric const argument crash fixThakee Nathees2020-05-101-0/+2
| |/ /
* | | Merge pull request #38708 from ThakeeNathees/init-assign-type-parser-bug-fixRémi Verschelde2020-05-131-0/+1
|\ \ \ | | | | | | | | regression: var declaration type info parser bug fix
| * | | regression: var declaration type info parser bug fixThakee Nathees2020-05-131-0/+1
| | | |
* | | | regression: static func can't access const fixThakee Nathees2020-05-132-4/+7
|/ / /
* | | Add WebSocket debugger, use it for Javascript.Fabio Alessandrelli2020-05-125-0/+363
| | |
* | | Remove WebSocket defaults from project settings.Fabio Alessandrelli2020-05-125-35/+14
| | | | | | | | | | | | | | | Can be manually set, let's not pollute them further. Should also be done for WebRTC.
* | | Merge pull request #38672 from madmiraal/fix-physicsw-warningRémi Verschelde2020-05-111-19/+19
|\ \ \ | | | | | | | | Fix 'physicsw' may be used uninitialized warning in csg_shape.cpp