summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gd_script.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Dead code tells no talesRémi Verschelde2017-08-271-103/+1
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Convert Object::cast_to() to the static versionHein-Pieter van Braam2017-08-241-8/+6
| | | | | | | | | | | | 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/
* GDScript: More reliable check if loading a template.Andreas Haas2017-08-241-1/+1
| | | | Prevents showing some useless parse errors in the console.
* Removed unnecessary returns and break statementsWilson E. Alvarez2017-08-221-1/+2
|
* 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.
* Makes all Godot API's methods Lower CaseIndah Sylvia2017-08-071-7/+7
|
* Clang-formatting *.cpp and *.h (some files excluded)Poommetee Ketson2017-07-221-1/+1
|
* -Renamed GlobalConfig to ProjectSettings, makes more sense.Juan Linietsky2017-07-191-4/+4
| | | | -Added system for feature overrides, it's pretty cool :)
* -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)
* Add ability to use custom script templates.Andreas Haas2017-06-131-0/+5
| | | | | | | | | | 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-271-0/+1
| | | | | | | | | | | | | | | 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") ```
* fixed a bug where saving a GDScript file crashed the editorKarroffel2017-04-241-2/+5
| | | | I changed the loop in #8502, turns out it fixed the error I was facing but introduced a new one. This fixes both
* re-added MultiScriptKarroffel2017-04-241-2/+2
| | | | | | | | The very first Godot version (when it was open sourced) had "MultiScript" which lets you use multiple scripts on one object. With the addition of mulitple new scripting languages (VisualScript, soon C# and GDNative) it can be of use to combine scripts rather than delegating (with huge maintainance cost) or creating child nodes which could impact performance. I used the code from 0b806ee as the base and made it work with the current master.
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* Fix typos in source code using codespellRémi Verschelde2017-03-241-2/+2
| | | | From https://github.com/lucasdemarchi/codespell
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-595/+474
| | | | | | | | | | | | | | | | | | | | | | | | I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
* Inf and NaN support added to GDScript.Saracen2017-02-281-0/+4
|
* -renamed globals.h to global_config.cpp (this seems to have caused a few ↵Juan Linietsky2017-02-211-1/+1
| | | | | | modified files) -.pck and .zip exporting redone, seems to be working..
* Rename the _MD macro to D_METHODHein-Pieter van Braam2017-02-131-2/+2
| | | | | | This new name also makes its purpose a little clearer This is a step towards fixing #56
* Style: Fix statements ending with ';;'Rémi Verschelde2017-01-161-1/+1
|
* Merge pull request #6845 from karroffel/masterJuan Linietsky2017-01-141-0/+1
|\ | | | | Adds pattern matching to GDScript
| * pattern matcher: Implemented backendKarroffel2017-01-111-0/+1
| | | | | | | | changed comments
* | Style: Fix whole-line commented codeRémi Verschelde2017-01-141-4/+6
| | | | | | | | | | They do not play well with clang-format which aligns the `//` part with the rest of the code block, thus producing badly indented commented code.
* | rename String.extension() -> String.get_extension() / String.basename() -> ↵Juan Linietsky2017-01-141-1/+1
| | | | | | | | String.get_basename()
* | Implicit inheritance now defaults to Resource, will error for node scripts ↵Juan Linietsky2017-01-121-0/+2
| | | | | | | | if extends not used.
* | uses the global thread to protect the instacnes map in GDScript, closes #4615Juan Linietsky2017-01-101-3/+43
| |
* | Memory pool vectors (DVector) have been enormously simplified in code, and ↵Juan Linietsky2017-01-071-2/+2
| | | | | | | | renamed to PoolVector
* | -Changed most project settings in the engine, so they have major and minor ↵Juan Linietsky2017-01-051-4/+4
| | | | | | | | | | | | | | | | categories. -Changed SectionedPropertyEditor to support this -Renamed Globals singleton to GlobalConfig, makes more sense. -Changed the logic behind persisten global settings, instead of the persist checkbox, a revert button is now available
* | ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to ↵Juan Linietsky2017-01-021-9/+9
| | | | | | | | | | | | | | | | Variant. All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()
* | Welcome in 2017, dear changelog reader!Rémi Verschelde2017-01-011-1/+1
|/ | | | | | | | That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
* Renamed the bind_native functions to bind_vararg, should make it show the ↵Juan Linietsky2016-09-071-1/+1
| | | | documentation more clearly and also make it easier to bind to C#
* More visual script workJuan Linietsky2016-08-251-0/+9
| | | | | | | | | -Block switches to 2d/3d editor if editing visual script -Added cast node in flow control -Added ability to do RPC in visual script -Comment nodes -Fix bug with inverted cable in connecting backwards -Copy and paste nodes, including from different scripts
* Proper function/property selection in visual script editing for property.Juan Linietsky2016-08-231-0/+35
| | | | This one has an ordered list, built-in description, search, etc.
* Brand new networked multiplayerJuan Linietsky2016-08-191-1/+45
|
* Merge pull request #6055 from eska014/native-bind-rettypeRémi Verschelde2016-08-081-1/+1
|\ | | | | Allow documenting unexposed return types in bind_native_method
| * Allow documenting unexposed return types in bind_native_methodeska2016-08-061-1/+1
| | | | | | | | Document return type of `Object.call` and `GDScript.new`
* | Added a simpler way to do sub-functions in both visual and gdscript with the ↵Juan Linietsky2016-08-081-1/+30
| | | | | | | | | | | | | | subcall node. With this, visual script is almost done (missing registering custom nodes from addon). All this is probably pretty broken, too and needs a lot of testing.
* | WIP visual scripting, not working yet but you can check out stuffJuan Linietsky2016-08-021-0/+17
|/
* Fixed reloading of tool scripts within editor, they should work much better ↵Juan Linietsky2016-07-201-2/+16
| | | | now, closes #3194
* Fix bug in inner class reference, closes #1411Juan Linietsky2016-06-281-4/+9
|
* Fix extends issue, closes #4026Juan Linietsky2016-06-281-0/+4
|
* Add "bool" to GDScript reserverd keywordsAndreas Haas2016-06-241-0/+1
| | | | Noticed that "bool" wasn't highlighted when used like `export(bool) var is_xy = false`
* Changed reload logic to auto-hard-reload scripts on save. It's simpler to ↵Juan Linietsky2016-06-131-0/+5
| | | | use and also fixes #4756
* -Ability to reload (and soft reload) tool scripts. Please test!Juan Linietsky2016-06-081-0/+107
|
* Revert "Fix implicit GDScript Reference inheritance"punto-2016-06-061-2/+5
|
* Fix implicit GDScript Reference inheritanceeska2016-06-051-5/+2
|
* Ability to reload scripts on running gameJuan Linietsky2016-06-011-4/+121
|
* Some cleanup to GDScriptJuan Linietsky2016-05-311-1426/+0
| | | | separated GDFunction (VM) from GDScript in two different files
* Fix #4748: proper call to base class functionIgnacio Armenteros2016-05-231-1/+1
|