summaryrefslogtreecommitdiffstats
path: root/modules/gdscript
Commit message (Collapse)AuthorAgeFilesLines
* Add two missing Null checksHein-Pieter van Braam2017-08-261-2/+6
| | | | | | | These Null checks were removed in #10581 but actually changed the logic of the functions in this case. This fixes #10654
* Merge pull request #10581 from hpvb/fix-gcc6+Rémi Verschelde2017-08-255-75/+66
|\ | | | | Make cast_to a static member of Object.
| * Convert Object::cast_to() to the static versionHein-Pieter van Braam2017-08-245-75/+66
| | | | | | | | | | | | | | | | | | | | | | | | Currently we rely on some undefined behavior when Object->cast_to() gets called with a Null pointer. This used to work fine with GCC < 6 but newer versions of GCC remove all codepaths in which the this pointer is Null. However, the non-static cast_to() was supposed to be null safe. This patch makes cast_to() Null safe and removes the now redundant Null checks where they existed. It is explained in this article: https://www.viva64.com/en/b/0226/
* | Implemented, The Amazing Zylann Hack (tm), fixes #10603Juan Linietsky2017-08-253-0/+19
|/
* GDScript: More reliable check if loading a template.Andreas Haas2017-08-241-1/+1
| | | | Prevents showing some useless parse errors in the console.
* Fix mismatched signatures for GDScriptLanguage::complete_codeRémi Verschelde2017-08-241-1/+1
|
* -Code completion for enumerationsJuan Linietsky2017-08-244-12/+150
| | | | -Disabled GDNative and GDNativeScript so build compiles again
* Changed MethodBind API to request information from methods. It's much claner ↵Juan Linietsky2017-08-231-6/+6
| | | | | | now. Also changed PropertyInfo to include informatino about class names.
* Merge pull request #10542 from karroffel/gdscript-match-indexRémi Verschelde2017-08-231-1/+20
|\ | | | | support enums and nested constants in match statement
| * support enums and nested constants in match statementKarroffel2017-08-221-1/+20
| | | | | | | | | | | | | | | | | | | | The initial version of the pattern matcher in GDScript does not allow matching on nested identifiers, only one identifiers available in the current scope. With the introduction of enums to GDScript that's a huge missing feature. This commit makes the parser accept indexed constants and variables to properly support enums.
* | Removed unnecessary returns and break statementsWilson E. Alvarez2017-08-222-2/+4
|/
* Merge pull request #10340 from Rubonnek/remove-unnecessary-assignmentsRémi Verschelde2017-08-223-21/+7
|\ | | | | Removed unnecessary assignments
| * Removed unnecessary assignmentsWilson E. Alvarez2017-08-213-21/+7
| |
* | Merge pull request #10225 from Noshyaar/mapRémi Verschelde2017-08-222-0/+32
|\ \ | |/ |/| GDScript Built-in: add inverse_lerp & range_lerp
| * GDScript Built-in: add inverse_lerp & range_lerpPoommetee Ketson2017-08-182-0/+32
| |
* | Merge pull request #10319 from neikeq/pr-engine-editor-hintJuan Linietsky2017-08-201-1/+2
|\ \ | | | | | | Adds Engine::is_editor_hint() method
| * | Removes editor_hint from SceneTreeIgnacio Etcheverry2017-08-191-1/+2
| | |
* | | Add closest_power_of_2 func and implement mix_rate/latency on OS XMarcelo Fernandez2017-08-171-1/+1
| | |
* | | Merge pull request #10307 from Rubonnek/update-argument-namesRémi Verschelde2017-08-161-3/+3
|\ \ \ | | | | | | | | Updated function argument names
| * | | Updated function argument namesWilson E. Alvarez2017-08-121-3/+3
| |/ /
* / / Revive inspector property evaluationPedro J. Estébanez2017-08-161-1/+1
|/ / | | | | | | | | | | | | | | | | | | GDScript was restricted to parse only scripts beginning with __res://__ or __user://__ to avoid templates from being parsed. I've made that a bit less inclusive by allowing scripts with an empty path to be parsed too, which doesn't conflict and is needed for this to work. Also I've removed the `this` variable of the generated script and made the relevant object to be the one the script instance refers to, so you can use `self` instead. Now, with the shorter 3.0-style syntax, you can write things like: `self.position.x + 10` Closes #9500.
* / Removes type information from method bindsIgnacio Etcheverry2017-08-101-1/+1
|/
* push variable later when created, to avoid self-referencing as a valid case, ↵Juan Linietsky2017-08-081-2/+5
| | | | closes #6111
* Implement len() gdscript built-in function for python users, closes #1960Juan Linietsky2017-08-072-0/+64
|
* Makes all Godot API's methods Lower CaseIndah Sylvia2017-08-074-14/+14
|
* Fix $a/b being parsed as divisionBojidar Marinov2017-07-261-1/+2
|
* Merge pull request #9731 from Xrayez/gdscript-completionRémi Verschelde2017-07-252-3/+3
|\ | | | | Update GDScript completion names for Pool*Arrays
| * Update GDScript completion names for Pool*ArraysAndrii Doroshenko (Xrayez)2017-07-252-3/+3
| | | | | | | | | | | | | | | | | | | | | | Notice: GDScript tokenizer used the old PoolFloatArray name. Renamed PoolFloatArray to PoolRealArray. Moved "project_settings.h" down one line to comply with the clang-format rules. Fixes #9638 Closed pull request #9714 because I messed up with commits, sorry!
* | fix a regression (GDScript) from e00630bKarroffel2017-07-252-2/+2
|/ | | | | | | | | This removes `not` from the variable safe list of keywords. Before that this was a valid expression: self.!(some_arg) The other fix is just a forgotten boolean negation.
* Merge pull request #8217 from bojidar-bg/gdscript-fix-keyword-callRémi Verschelde2017-07-253-141/+263
|\ | | | | Make GDScript allow some keywords as identifiers
| * Make GDScript allow some keywords as identifiersBojidar Marinov2017-07-233-141/+263
| | | | | | | | | | Fixes #8085 Added some comments around the use of is_token_literal, as discussed.
* | Clang-formatting *.cpp and *.h (some files excluded)Poommetee Ketson2017-07-222-2/+2
|/
* -Renamed GlobalConfig to ProjectSettings, makes more sense.Juan Linietsky2017-07-192-14/+14
| | | | -Added system for feature overrides, it's pretty cool :)
* Add object type hint for docsPoommetee Ketson2017-07-191-2/+2
|
* -Reorganized all properties of project settings (Sorry, Again).Juan Linietsky2017-07-171-1/+1
| | | | | (Lot's of bloat accumulated, so it was time for clean up.) -Made EditorSettings and ProjectSettings search more useful (search in sections too)
* Merge pull request #8573 from neikeq/gdfs-completedRémi Verschelde2017-07-111-0/+34
|\ | | | | Adds "completed" signal to GDFunctionState
| * Adds completed signal to GDFunctionStateIgnacio Etcheverry2017-06-231-0/+34
| |
* | Better user expirence with external text editors.geequlim2017-06-271-0/+1
| | | | | | | | | | Implements open_in_external_editor for subclasses of ScriptLanguage. Add option 'Debug with external editor' to debug menu to control the behavoir of script opened by editor.
* | Merge pull request #8783 from bojidar-bg/fix-range-loop-typeRémi Verschelde2017-06-241-2/+2
|\ \ | | | | | | Fix for..in range() resulting in floats instead of ints
| * | Reimplement for..in range() so that it always results in intsBojidar Marinov2017-06-221-2/+2
| |/ | | | | | | Fixes #8278, fixup of bfef8de1bc4f7a7b9617a7b181881129033a0b0e
* | Remove methods from code completion which are already exposed by properties, ↵Juan Linietsky2017-06-231-2/+2
| | | | | | | | makes completion cleaner and more close to the documentation.
* | GdScript: Add signal autocompletion to emit_signal functionMariano Suligoy2017-06-231-1/+1
|/
* Add ability to use custom script templates.Andreas Haas2017-06-133-0/+20
| | | | | | | | | | Templates will be loaded from .godot/script_templates For now they're disabled for GDNative. Ideas for further improvements: - Add a "Save as Template" option to the script editor, as it can normally only save to res:// - Support more placeholders / custom placeholders
* GDScript: Use "is" keyword for type checking.Andreas Haas2017-05-277-8/+12
| | | | | | | | | | | | | | | Replaces the `extends` keyword with `is` in the context of testing for type compatibility. `extends` is still used for declaring class inheritance. Example: ```gdscript extends Node2D func _input(ev): if ev is InputEventKey: print("yay, key event") ```
* Removal of InputEvent as built-in Variant type..Juan Linietsky2017-05-202-66/+4
| | | | this might cause bugs I haven't found yet..
* Merge pull request #8798 from RandomShaper/gdfs-ext-checkRémi Verschelde2017-05-182-4/+16
|\ | | | | Add extended check option to GDFunctionState::is_valid()
| * Add extended check option to GDFunctionState::is_valid()Pedro J. Estébanez2017-05-172-4/+16
| |
* | Removal of Image from Variant, converted to a Resource.Juan Linietsky2017-05-172-2/+1
|/
* Fix #8674, and rename a few things for clarityBojidar Marinov2017-05-083-10/+16
|
* Changed indent type settingsPaulb232017-04-261-1/+1
|