summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript.cpp
AgeCommit message (Collapse)Author
2020-01-09Add GDScript warning for standalone expressionGeorge Marques
This makes the error message clearer as it might be used to call functions with side effects.
2020-01-01Update copyright statements to 2020Rémi Verschelde
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.
2019-12-13GDScript: Convert values when setting member variablesGeorge Marques
This allows doing: self.x = 1 even if self.x is declared as float.
2019-12-11Disable GDScript warning for unused class variable by defaultGeorge Marques
2019-11-27Document how to bypass the unused argument/variable warning in messageHugo Locurcio
Note that prefixing with an underscore only works with unused arguments and local variables, not class variables and signals. This closes #26056.
2019-11-07Add setting to exclude addons from script warningsmashumafi
2019-11-01GDScript: Avoid editor crashes when there's cyclic inheritanceGeorge Marques
Make sure the script is fully compiled before looking into the base.
2019-09-25Merge pull request #32051 from qarmin/some_error_explanationRémi Verschelde
Added some obvious errors explanations
2019-09-25Added some obvious errors explanationsqarmin
2019-09-19Fix misc. source comment typosluz.paz
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 `
2019-08-26Make VarArg methods return types show up as Variant in API jsontoasteater
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
2019-08-09Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", ↵Robin Hübner
"modules/gdnative", "modules/gdscript" directories.
2019-07-01Remove unnecessary code and add some error explanationsqarmin
2019-06-26Some code changed with Clang-Tidyqarmin
2019-05-20Merge pull request #27886 from LeonardMeagher2/obj_to_stringRémi Verschelde
Allow overriding how scripted objects are converted to strings
2019-05-19Fix typos with codespellRémi Verschelde
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 ```
2019-05-03Allow overriding how scripted objects are converted to stringsLeonard Meagher
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()`
2019-05-02Fix slight issues with autocompletion and member lists in GDScriptBojidar Marinov
Fixes #27152 Fixes #28591
2019-04-15GDScript: add variable shadowing warninglupoDharkael
2019-04-05Replace a few #if/#elif with #ifdef and "#elif defined"Ignacio Etcheverry
2019-03-08Fix typo in GDScript narrowing conversion warning messageHugo Locurcio
This closes #26790.
2019-03-04Close file handles after use of new get_as_utf8_strings, fixes #26578Juan Linietsky
2019-03-03Add a dependency search mode for GDScript parserGeorge Marques
- 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.
2019-02-28Merge pull request #26034 from QbieShay/issue_25596Rémi Verschelde
Inheriting from virtual class no longer causes the engine to crash.
2019-02-27Inheriting from virtual class no longer causes the engine to crash, it ↵QbieShay
prints an error instead. Co-authored-by: Hein-Pieter van Braam <hp@tmm.cx>
2019-02-20Add -Wshadow=local to warnings and fix reported issues.marxin
Fixes #25316.
2019-02-14Fix exported property values being lost if base GDScript fails to parseIgnacio Etcheverry
2019-01-25Ensure get script method list also checks base classes, fixes #23384Juan Linietsky
2019-01-23GDScript: don't allow calling non-static function from scriptGeorge Marques
2019-01-10Merge pull request #24877 from neikeq/issue-24280Rémi Verschelde
Fix properties being lost when reloading placeholder GDScript instance
2019-01-10Fix properties being lost when reloading placeholder GDScript instanceIgnacio Etcheverry
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).
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-11-27Allow signal connecting even if script is invalid (only when compiled with ↵Juan Linietsky
tools), fixes #17070
2018-11-22Merge pull request #22953 from DualMatrix/properties_goneRémi Verschelde
Fixed parents export vars not appearing in inspector if parent is class_name.
2018-11-10Fix GDScript placeholder fallbackIgnacio Etcheverry
2018-10-25Merge pull request #22779 from Superwaitsum/LimitSettingsRémi Verschelde
Limit several project settings
2018-10-24Add some limits on the Editor SettingsSuperwaitsum
2018-10-23Optional getters/setters editor autocompleteJakub Grzesik
solves #22291
2018-10-12Fixed parents properties not appearing in inspector if parent is class_name.DualMatrix
Fixed parents properties not appearing in inspector if parent is class_name.
2018-09-27Fix warnings about unhandled enum value in switch [-Wswitch]Rémi Verschelde
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.
2018-09-19GDScript: Revert extra deletion when creating instanceGeorge Marques
Revert part of e4af39cbc00446b03d142882a69813e94f0838b2 that was causing a crash.
2018-09-15Add GDScript slave keyword deprecation warning.Fabio Alessandrelli
2018-09-15Rename slave keyword to puppetFabio Alessandrelli
The slave keyword will still be available as deprecated in 3.1 but will be dropped from future releases.
2018-09-13Merge pull request #21982 from luzpaz/misc-typosRémi Verschelde
Misc. typos
2018-09-12Misc. typosluz.paz
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-09-10Fix crash when extending non-existing GDScript fileRémi Verschelde
Fixes #21682 with a partial revert of #21411. The ~Ref() destructor (from 'scriptres') already takes care of freeing the 'script' resource.
2018-08-26Fixes several resource leaks in ...Crazy-P
- gdscript - gdscript_compiler - regex - android/export - gles3/rasterizer (scene and storage)
2018-08-24Make some debug prints verbose-only, remove othersRémi Verschelde
2018-08-21GDScript: Show warning messages only on debuggerGeorge Marques
Don't show on console/output anymore.