aboutsummaryrefslogtreecommitdiff
path: root/modules/gdscript
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Abstract some method for script systemgeequlim2017-11-173-6/+66
| |/
* | Merge pull request #12952 from bojidar-bg/12392-export-enumsRémi Verschelde2017-11-201-9/+69
|\ \ | | | | | | Allow exporting enums from GDScript
| * | Allow exporting enums from GDScriptBojidar Marinov2017-11-171-9/+69
| |/ | | | | | | | | Use as `export(E) ...` Closes #12392
* | Merge pull request #12930 from vnen/gdscrit-output-printJuan Linietsky2017-11-171-1/+1
|\ \ | | | | | | Make tool scripts print on the editor Output panel
| * | Add print_error function, akin to print_lineGeorge Marques2017-11-161-1/+1
| |/
* / Rename Rect3 to AABB.Ferenc Arn2017-11-171-5/+5
|/ | | | Fixes #12973.
* GDScript: Refactor "GD" class prefix to "GDScript"Rémi Verschelde2017-11-1617-1176/+1179
|
* Merge pull request #12957 from bojidar-bg/12928-numeric-underscoresRémi Verschelde2017-11-161-1/+4
|\ | | | | Allow underscores in GDScript numeric literals
| * Allow underscores in GDScript numeric literalsBojidar Marinov2017-11-151-1/+4
| | | | | | | | Closes #12928
* | doc: Make all module docs self-containedRémi Verschelde2017-11-154-3/+115
| |
* | doc: Rename "@Global Scope" to "@GlobalScope"Rémi Verschelde2017-11-151-1/+1
| | | | | | | | Spaces in filenames are evil.
* | When script changes, defer tree updating. Fixes #9704Juan Linietsky2017-11-151-2/+3
|/
* Merge pull request #12922 from eska014/engine-singletonsRémi Verschelde2017-11-141-3/+4
|\ | | | | Singleton management changes
| * Move singleton management from ProjectSettings to EngineLeon Krause2017-11-141-3/+4
| |
* | Fixed signal connection dialog ignoring indentation settings when creating a ↵Michael Alexsander Silva Dias2017-11-131-1/+1
|/ | | | function.
* Merge pull request #12627 from Goutte/feat-support-tauRémi Verschelde2017-11-125-0/+18
|\ | | | | Add support for TAU constant.
| * Add support for the TAU constant. Fixes #12094.Goutte2017-11-125-0/+18
| |
* | Fixed help lookup not finding classes, issue 11867Paulb232017-11-111-21/+21
|/
* Make sure we don't leak when an opcode is followed by itselfHein-Pieter van Braam2017-11-091-50/+80
| | | | | | | | | | | | When compiling with GCC it is now possible for an opcode followed by itself to never leave the scope it is currently in. This leads to a situation where the dtor of a scope local variable isn't called which in turn can lead to a memory leak. By moving the goto outside of the scope of each opcode we guarantee that all dtors have been called before the next opcode gets dispatched. this fixes #12401
* Fix crash when guessing type of variable declared to itselfBojidar Marinov2017-11-081-1/+3
| | | | Fixes #10972
* Merge pull request #12035 from Chaosus/wrapfuncRémi Verschelde2017-10-312-0/+24
|\ | | | | Added new Wrap functions for numbers
| * Added new wrap functionsChaosus2017-10-132-0/+24
| |
* | Fix get_node() and $ autocompletion when using single quotesUnknown2017-10-301-2/+2
| |
* | Removes Script::get_node_type()Jerome670002017-10-252-6/+0
| | | | | | | | used before GDScript, with squirrel apparently
* | Merge pull request #12365 from neikeq/pRémi Verschelde2017-10-242-0/+6
|\ \ | | | | | | Add ScriptLanguage::supports_builtin_mode and improve ScriptCreateDialog
| * | Add ScriptLanguage::supports_builtin_mode and improve ScriptCreateDialogIgnacio Etcheverry2017-10-242-0/+6
| |/ | | | | | | | | - Make ScriptCreateDialog disable the built-in script checked button if the language does not support it. - ScriptLanguage's get_template and make_template now receive the script path as class name if the the script language does not have named classes.
* | fix editor crash when missing variable in pattern match dispatchjagt2017-10-241-1/+2
| |
* | Add _process(delta) to new script templates. Closes #11994.mhilbrunner2017-10-221-1/+5
|/
* Add NIL_IS_VARIANT usage to few definitionsRuslan Mustakov2017-10-051-1/+1
| | | | | The missing usage flag led to GDNative API descriptions containting arguments with "void" type.
* Replace a OPCODE_BREAK with break in opcode 31Hein-Pieter van Braam2017-10-011-1/+1
| | | | | This was a mistake made in 520d84e. There are no more other looping structures left in this function.
* Properly allow completion on variable initializer arguments, closes #9359Juan Linietsky2017-09-291-2/+1
|
* Fixed wrong break statement in GDFunction::callScayze2017-09-271-1/+1
|
* Remove several checks on DEBUG_RELEASEHein-Pieter van Braam2017-09-251-4/+13
| | | | | These errors shouldn't be possible on a tested game. Remove the checks on release. Shaves about 10% off of tight loops.
* Use computed goto to dispatch next opcodeHein-Pieter van Braam2017-09-251-109/+183
| | | | | | | | On compulers that define __GNUC__ use computed goto to directly dispatch the next instruction rather than going through another switch statement. This saves a jump and some comparisons. In tight loops this is is roughly 10% faster than the switch() method.
* Implement Linux-style likely()/unlikely() macrosHein-Pieter van Braam2017-09-211-3/+3
| | | | | | | | | | | | | | This implement branch prediction macros likely() and unlikely() like in Linux. When using these macros please ensure that when you use them the condition in the branch really is very, very likely or unlikely. Think 90+% of the time. Primarily useful for error checking. (And I implement these macros for all our error checking macros now) See this article for more information: https://kernelnewbies.org/FAQ/LikelyUnlikely There are more places where these macros may make sense in renderer and physics engine. Placing them will come in another commit down the line.
* Allow booleanization of all typesHein-Pieter van Braam2017-09-191-24/+3
| | | | | | | | | | | | | We now allow booleanization of all types. This means that empty versions of all types now evaluate to false. So a Vector2(0,0), Dictionary(), etc. This allows you to write GDScript like: if not Dictionary(): print("Empty dict") Booleanization can now also no longer fail. There is no more valid flag, this changes Variant and GDNative API.
* Remove more GDScript runtime checks on releaseHein-Pieter van Braam2017-09-191-33/+54
| | | | | | | | As a preparation for other performance enhancements to GDScript:call() start by removing more of the GDScript runtime checks on release. This code has been tested with 2d/platformer, 3d/platformer, 3d/materials_test, and goltorus. No regressions were found.
* Move Variant::evaluate() switch to computed gotoHein-Pieter van Braam2017-09-173-4/+4
| | | | | | | | | | | | | In an effort to make GDScript a little faster replace the double switch() with a computed goto on compilers that set __GNUC__. For compilers that don't support computed goto it will fall back to regular switch/case statements. In addition disable using boolean values in a mathematical context. Now boolean values can only be compared with other booleans. Booleans will also no longer be coerced to integers. This PR replaces #11308 and fixes #11291
* Changed/Added descriptions in @GDScript. Added examples. Fixed return types ↵William Taylor2017-09-121-2/+2
| | | | | | | of two … (#11146) Doc: Improved descriptions in GDScript docs Added examples and fixed return types of two methods.
* Merge pull request #11057 from hpvb/fix-various-warningsRémi Verschelde2017-09-121-3/+3
|\ | | | | Fix various assorted warnings
| * Fix various assorted warningsHein-Pieter van Braam2017-09-081-3/+3
| | | | | | | | | | Fix various warnings that don't have enough instances to merit individual commits. Also fixes a potential bug in audio_server.cpp.
* | Implement String len()Poommetee Ketson2017-09-111-3/+11
|/
* Fixes language overridden external editorsIgnacio Etcheverry2017-09-031-1/+0
|
* Fix typos 'a' and 'an'Poommetee Ketson2017-09-022-5/+5
|
* Fix use of unitialized variablesHein-Pieter van Braam2017-09-021-3/+3
| | | | The second in my quest to make Godot 3.x compile with -Werror on GCC7
* Merge pull request #10745 from neikeq/fix-docdata-and-stuffJuan Linietsky2017-08-292-15/+27
|\ | | | | DocData and virtual method type hints fixes
| * Makes built-in vararg methods actual vararg methodsIgnacio Etcheverry2017-08-292-9/+16
| | | | | | | | | | - Removes hardcoded parameters from built-in vararg methods and adds METHOD_FLAG_VARARG to them. - Makes EditorHelp display built-in vararg methods correctly.
| * DocData and type hints fixesIgnacio Etcheverry2017-08-292-6/+11
| | | | | | | | | | | | | | - Makes vararg methods automatically use PROPERTY_USAGE_NIL_IS_VARIANT on return types - Completely removes the ":type" suffix for method names. Virtual methods must use the MethodInfo constructors that takes Variant::Type or PropertyHint as the first parameter for the return type (with CLASS_INFO as a helper to get the PropertyInfo). Parameters must use PROPERTY_HINT_RESOURCE_TYPE and hint string. - PROPERTY_USAGE_NIL_IS_VARIANT is no longer needed for parameters, because parameters cannot be void. - Adds missing PROPERTY_USAGE_NIL_IS_VARIANT to virtual and built-in methods that return Variant.
* | -Some fixes to code completion.Juan Linietsky2017-08-281-3/+28
| | | | | | | | | | -Fix getter in code completion being displayed when it shouldn't -Clean up preview generation for editors and exposed it as editor plugin
* | -Moved script run to editor, removed from projectJuan Linietsky2017-08-271-19/+34
|/ | | | | -fixed to code completion -fix shader crash bug reported by tagcup