summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove deprecated sync and slave networking keywordsRémi Verschelde2020-02-131-2/+0
| | | | | | Those keywords were deprecated for 3.1 in #22087. Also fix token name for `TK_REMOTE`, should be "remote" like the keyword.
* Optmized data sent during RPC and RSet calls.Andrea Catania2020-02-121-24/+131
| | | | | | | | | | - Now is sent the method ID rather the full function name. - The passed IDs (Node and Method) are compressed so to use less possible space. - The variant (INT and BOOL) is now encoded and compressed so to use much less data. - Optimized RPCMode retrieval for GDScript functions. - Added checksum to assert the methods are the same across peers. This work has been kindly sponsored by IMVU.
* Merge pull request #35218 from bojidar-bg/26691-parse-error-errorsRémi Verschelde2020-01-161-1/+1
|\ | | | | Fix errors raised when showing parse errors in the editor
| * Fix errors raised when showing parse errors in the editorBojidar Marinov2020-01-161-1/+1
| | | | | | | | Fixes #26691
* | Keep a weak reference to orphan subclasses to reuse on class reloadChibiDenDen2020-01-151-3/+48
|/
* Add GDScript warning for standalone expressionGeorge Marques2020-01-091-0/+4
| | | | | This makes the error message clearer as it might be used to call functions with side effects.
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* GDScript: Convert values when setting member variablesGeorge Marques2019-12-131-5/+16
| | | | This allows doing: self.x = 1 even if self.x is declared as float.
* Disable GDScript warning for unused class variable by defaultGeorge Marques2019-12-111-1/+2
|
* Document how to bypass the unused argument/variable warning in messageHugo Locurcio2019-11-271-5/+3
| | | | | | | Note that prefixing with an underscore only works with unused arguments and local variables, not class variables and signals. This closes #26056.
* Add setting to exclude addons from script warningsmashumafi2019-11-071-0/+1
|
* GDScript: Avoid editor crashes when there's cyclic inheritanceGeorge Marques2019-11-011-2/+2
| | | | Make sure the script is fully compiled before looking into the base.
* Merge pull request #32051 from qarmin/some_error_explanationRémi Verschelde2019-09-251-7/+4
|\ | | | | Added some obvious errors explanations
| * Added some obvious errors explanationsqarmin2019-09-251-7/+4
| |
* | Fix misc. source comment typosluz.paz2019-09-191-1/+1
|/ | | Found using `codespell -q 3 -S ./thirdparty,*.po -L ang,ba,cas,dof,doubleclick,fave,hist,leapyear,lod,nd,numer,ois,paket,seeked,sinc,switchs,te,uint -D ~/Projects/codespell/codespell_lib/data/dictionary.txt `
* Make VarArg methods return types show up as Variant in API jsontoasteater2019-08-261-1/+1
| | | | | | | | | | | | VarArg methods have the return type Object in the API json for GDNative. This can cause undefined behavior in some language bindings due to lack of documentation on VarArg methods' behavior. This changes the MethodInfo of: - CSharpScript::_new - GDScript::_new - PluginScript::_new
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", ↵Robin Hübner2019-08-091-24/+9
| | | | "modules/gdnative", "modules/gdscript" directories.
* Remove unnecessary code and add some error explanationsqarmin2019-07-011-1/+1
|
* Some code changed with Clang-Tidyqarmin2019-06-261-1/+1
|
* Merge pull request #27886 from LeonardMeagher2/obj_to_stringRémi Verschelde2019-05-201-0/+22
|\ | | | | Allow overriding how scripted objects are converted to strings
| * Allow overriding how scripted objects are converted to stringsLeonard Meagher2019-05-031-0/+22
| | | | | | | | | | | | | | | | | | | | solves #26796 - ADD `String to_string()` method to Object which can be overriden by `String _to_string()` in scripts - ADD `String to_string(r_valid)` method to ScriptInstance to allow langauges to control how scripted objects are converted to strings - IMPLEMENT to_string for GDScriptInstance, VisualScriptInstance, and NativeScriptInstance - ADD Documentation about `Object.to_string` and `Object._to_string` - Changed `Variant::operator String` to use `obj->to_string()`
* | Fix typos with codespellRémi Verschelde2019-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using codespell 1.15.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear doubleclick 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 ```
* | Fix slight issues with autocompletion and member lists in GDScriptBojidar Marinov2019-05-021-1/+1
| | | | | | | | | | Fixes #27152 Fixes #28591
* | GDScript: add variable shadowing warninglupoDharkael2019-04-151-0/+5
|/
* Replace a few #if/#elif with #ifdef and "#elif defined"Ignacio Etcheverry2019-04-051-1/+1
|
* Fix typo in GDScript narrowing conversion warning messageHugo Locurcio2019-03-081-1/+1
| | | | This closes #26790.
* Close file handles after use of new get_as_utf8_strings, fixes #26578Juan Linietsky2019-03-041-3/+4
|
* Add a dependency search mode for GDScript parserGeorge Marques2019-03-031-49/+87
| | | | | | | | - This mode avoids loading any other resource. - Search for class_name now uses this mode, to avoid loading in the scan thread. - Implement get_dependencies() for GDScript loader, now exporting dependencies only should include the preloaded resources.
* Merge pull request #26034 from QbieShay/issue_25596Rémi Verschelde2019-02-281-1/+2
|\ | | | | Inheriting from virtual class no longer causes the engine to crash.
| * Inheriting from virtual class no longer causes the engine to crash, it ↵QbieShay2019-02-271-1/+2
| | | | | | | | | | | | prints an error instead. Co-authored-by: Hein-Pieter van Braam <hp@tmm.cx>
* | Add -Wshadow=local to warnings and fix reported issues.marxin2019-02-201-4/+4
|/ | | | Fixes #25316.
* Fix exported property values being lost if base GDScript fails to parseIgnacio Etcheverry2019-02-141-1/+1
|
* Ensure get script method list also checks base classes, fixes #23384Juan Linietsky2019-01-251-8/+13
|
* GDScript: don't allow calling non-static function from scriptGeorge Marques2019-01-231-1/+2
|
* Merge pull request #24877 from neikeq/issue-24280Rémi Verschelde2019-01-101-15/+22
|\ | | | | Fix properties being lost when reloading placeholder GDScript instance
| * Fix properties being lost when reloading placeholder GDScript instanceIgnacio Etcheverry2019-01-101-15/+22
| | | | | | | | | | | | | | During reloading in `GDScriptLanguage::reload_all_scripts` a placeholder instance that must remain so is replaced with a new placeholder instance. The state is then restored by calling `ScriptInstance::set` for each property. This does not work if the script is missing the properties due to build/parse failing. The fix for such cases is to call `placeholder_set_fallback` instead of `set` on the script instance. I took this chance to move the `build_failed` flag from `PlaceHolderScriptInstance` to `Script`. That improves the code a lot. I also renamed it to `placeholder_fallback_enabled` which is a much better name (`build_failed` could lead to misunderstandings).
* | Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
|/ | | | Happy new year to the wonderful Godot community!
* Allow signal connecting even if script is invalid (only when compiled with ↵Juan Linietsky2018-11-271-1/+0
| | | | tools), fixes #17070
* Merge pull request #22953 from DualMatrix/properties_goneRémi Verschelde2018-11-221-18/+27
|\ | | | | Fixed parents export vars not appearing in inspector if parent is class_name.
| * Fixed parents properties not appearing in inspector if parent is class_name.DualMatrix2018-10-121-18/+27
| | | | | | | | Fixed parents properties not appearing in inspector if parent is class_name.
* | Fix GDScript placeholder fallbackIgnacio Etcheverry2018-11-101-0/+7
| |
* | Merge pull request #22779 from Superwaitsum/LimitSettingsRémi Verschelde2018-10-251-2/+2
|\ \ | | | | | | Limit several project settings
| * | Add some limits on the Editor SettingsSuperwaitsum2018-10-241-2/+2
| |/
* / Optional getters/setters editor autocompleteJakub Grzesik2018-10-231-0/+1
|/ | | | solves #22291
* Fix warnings about unhandled enum value in switch [-Wswitch]Rémi Verschelde2018-09-271-0/+1
| | | | | | | | | | | Fixes GCC 5 warnings of the form: core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch] core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch] Those can be trivial cases where adding a default fallback is the solution, or more complex issues/hidden bugs where missed values are actually meant to be handled.
* GDScript: Revert extra deletion when creating instanceGeorge Marques2018-09-191-4/+1
| | | | | Revert part of e4af39cbc00446b03d142882a69813e94f0838b2 that was causing a crash.
* Add GDScript slave keyword deprecation warning.Fabio Alessandrelli2018-09-151-0/+5
|
* Rename slave keyword to puppetFabio Alessandrelli2018-09-151-1/+2
| | | | | The slave keyword will still be available as deprecated in 3.1 but will be dropped from future releases.
* Merge pull request #21982 from luzpaz/misc-typosRémi Verschelde2018-09-131-3/+3
|\ | | | | Misc. typos
| * Misc. typosluz.paz2018-09-121-3/+3
| | | | | | Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`