summaryrefslogtreecommitdiffstats
path: root/core/script_language.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Optmized data sent during RPC and RSet calls.Andrea Catania2020-02-121-0/+9
| | | | | | | | | | - 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.
* 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.
* check for cyclic inheritance when adding a global classPatrick Wuttke2019-10-081-0/+1
|
* doc: Sync classref with current sourceRémi Verschelde2019-09-241-1/+1
| | | | Fix a few missing bindings or unspecified argument names and default values.
* Expose Script reflection methods to scripting API.willnationsdev2019-08-011-0/+52
|
* Allow overriding how scripted objects are converted to stringsLeonard Meagher2019-05-031-0/+1
| | | | | | | | | | 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()`
* Allow class_name scripts to have nested inheritanceGeorge Marques2019-03-091-0/+8
|
* Fix enums coming from other classes without preloadBojidar Marinov2019-03-051-0/+22
| | | | Fix #19704, fix #26001
* Add -Wshadow=local to warnings and fix reported issues.marxin2019-02-201-2/+2
| | | | Fixes #25316.
* Use script instance binding for objects constructed from C#Ignacio Etcheverry2019-02-091-0/+2
| | | | | | | Only possible if the object class is a "native type". If the object class is a user class (that derives a "native type") then a script is needed. Since CSharpLanguage does cleanup of script instance bindings when finished, cases like #25621 will no longer cause problems. Fixed ~Object() trying to free script instance bindings after the language has already been removed, which would result in a NULL dereference.
* Merge pull request #24877 from neikeq/issue-24280Rémi Verschelde2019-01-101-11/+8
|\ | | | | Fix properties being lost when reloading placeholder GDScript instance
| * Fix properties being lost when reloading placeholder GDScript instanceIgnacio Etcheverry2019-01-101-11/+8
| | | | | | | | | | | | | | 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!
* Fix GDScript placeholder fallbackIgnacio Etcheverry2018-11-101-1/+2
|
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-1/+2
| | | | | | 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.
* Fix case where exported properties value is lostIgnacio Etcheverry2018-07-291-9/+85
| | | | | | | | | | Fixes exported property modified values lost when creating a placeholder script instance with a failed script compilation - Object set/get will call PlaceHolderScriptInstance's new fallback set/get methods as a last resort. This way, placeholder script instances can keep the values for storage or until the script is compiled successfuly. - Script::can_instance() will only return true if a real script instance can be created. Otherwise, in the case of placeholder script instances, it will return false. - Object::set_script(script) is now in charge of requesting the creation of placeholder script instances. It's no longer Script::instance_create(owner)'s duty. - PlaceHolderScriptInstance has a new method set_build_failed(bool) to determine whether it should call into its script methods or not. - Fixed a few problems during reloading of C# scripts.
* Global class names (and GDScript support for it)Juan Linietsky2018-07-151-0/+77
|
* -Fixes to OBJ importer, option to disable optimizationJuan Linietsky2018-06-301-0/+14
| | | | -Fixes to script language, PlaceHolder can now get and check methods
* Revert "Make the performance reporting update frequency customizable"Juan Linietsky2018-05-281-2/+0
|
* Make the performance reporting update frequency customizableHugo Locurcio2018-05-181-0/+2
| | | | The default update frequency has been changed from 1000ms to 250ms.
* Bind many more properties to scriptsBojidar Marinov2018-01-121-0/+2
| | | | | | | Notable potentially breaking changes: - PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL - Some properties were renamed, and sometimes even shadowed by new ones - New getter methods (some virtual) were added
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Add Script.get_base_script/instance_base_type APIWill Nations2017-12-191-0/+2
|
* Style: Apply new clang-format 5.0 style to all filesRémi Verschelde2017-12-071-4/+4
|
* Removes Script::get_node_type()Jerome670002017-10-251-1/+0
| | | | used before GDScript, with squirrel apparently
* Fix unused variable warningsHein-Pieter van Braam2017-09-081-1/+0
| | | | The forth in my quest to make Godot 3.x compile with -Werror on GCC7
* Has_method is already provided by ObjectHein-Pieter van Braam2017-09-011-1/+0
| | | | | | | | | | c812c17633 introduces some extra gdscript bindings for signal discovery and adds a binding for has_method() to Script objects. This method is already provided by the ancestor Object. This fixes the startup message: ERROR: bind_methodfi: Class Script already has a method has_method At: core/class_db.cpp:1178.
* Made some methods to check method/signal availability in GDScript, closes #9800Juan Linietsky2017-08-291-0/+6
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Moved member variables from constructor to initialization listWilson E. Alvarez2017-08-081-5/+4
|
* keep default exported script values unless overriden, closes #8127Juan Linietsky2017-08-061-0/+33
|
* Script languges are uninitialized properly now.Juan Linietsky2017-07-221-0/+7
|
* Added a simpler/faster way to bind script languages instance wrappers to GodotJuan Linietsky2017-07-161-5/+0
|
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-112/+84
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Rename the _MD macro to D_METHODHein-Pieter van Braam2017-02-131-7/+7
| | | | | | This new name also makes its purpose a little clearer This is a step towards fixing #56
* ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to ↵Juan Linietsky2017-01-021-7/+7
| | | | | | | | 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!
* More visual script workJuan Linietsky2016-08-251-0/+1
| | | | | | | | | -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
* -Fix crashes with thread_exit()Juan Linietsky2016-06-261-0/+14
| | | | -Added draft of C script API (still disabled and unused)
* Added function to notify ScriptLanguage when a thread is created/freed, ↵Juan Linietsky2016-06-251-0/+16
| | | | allows scripts to allocate a stack there via TLS
* Changed reload logic to auto-hard-reload scripts on save. It's simpler to ↵Juan Linietsky2016-06-131-1/+11
| | | | use and also fixes #4756
* Ability to reload scripts on running gameJuan Linietsky2016-06-011-1/+1
|
* remove trailing whitespaceHubert Jarosz2016-03-091-5/+5
|
* -Some changes to how scenes and scripts are overriden in scene instance and ↵Juan Linietsky2016-01-231-0/+16
| | | | | | inheritance -Fixes #3127 and also properly fixes #2958
* Update copyright to 2016 in headersGeorge Marques2016-01-011-1/+1
|
* -Display on animation editor which keys are invalid and which tracks are ↵Juan Linietsky2015-12-051-0/+14
| | | | | | unresolved -Added a tool to clean up unresolved tracks and unused keys
* improved get_node(), connect(), etc code completion.Juan Linietsky2015-06-261-0/+8
| | | | | -properly completes text arguments -includes the "/root" autoloads
* Updated copyright year in all headersJuan Linietsky2015-04-181-1/+1
|