Commit graph

110 commits

Author SHA1 Message Date
Rémi Verschelde 51ffd45202
Merge pull request #12627 from Goutte/feat-support-tau
Add support for TAU constant.
2017-11-12 21:11:39 +01:00
Goutte 91ca725f9b Add support for the TAU constant. Fixes #12094. 2017-11-12 13:32:35 +01:00
Paulb23 b835aec87b Fixed help lookup not finding classes, issue 11867 2017-11-11 23:50:56 +00:00
Bojidar Marinov b7fd065f5c
Fix crash when guessing type of variable declared to itself
Fixes #10972
2017-11-08 22:17:08 +02:00
Unknown 7683ff3e42 Fix get_node() and $ autocompletion when using single quotes 2017-10-30 21:58:32 +01:00
Rémi Verschelde 847c55bcb1 Merge pull request #12365 from neikeq/p
Add ScriptLanguage::supports_builtin_mode and improve ScriptCreateDialog
2017-10-24 18:59:26 +02:00
Ignacio Etcheverry e218a13a64 Add ScriptLanguage::supports_builtin_mode and improve ScriptCreateDialog
- 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.
2017-10-24 15:48:58 +02:00
mhilbrunner ba779c1c0c Add _process(delta) to new script templates. Closes #11994. 2017-10-22 21:07:34 +02:00
Juan Linietsky 0a5799fb43 Properly allow completion on variable initializer arguments, closes #9359 2017-09-29 19:43:31 -03:00
Hein-Pieter van Braam 137f8a58a8 Move Variant::evaluate() switch to computed goto
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
2017-09-17 22:49:23 +02:00
Hein-Pieter van Braam 67a706fc1b Fix various assorted warnings
Fix various warnings that don't have enough instances to merit
individual commits. Also fixes a potential bug in audio_server.cpp.
2017-09-08 14:57:48 +02:00
Juan Linietsky 9c3bddfac2 Merge pull request #10745 from neikeq/fix-docdata-and-stuff
DocData and virtual method type hints fixes
2017-08-29 20:11:07 -03:00
Ignacio Etcheverry 8bd92a96a4 Makes built-in vararg methods actual vararg methods
- Removes hardcoded parameters from built-in vararg methods and adds METHOD_FLAG_VARARG to them.
- Makes EditorHelp display built-in vararg methods correctly.
2017-08-29 19:40:28 +02:00
Ignacio Etcheverry c16d00591b DocData and type hints fixes
- 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.
2017-08-29 19:40:21 +02:00
Juan Linietsky 8fce79aaee -Some fixes to code completion.
-Fix getter in code completion being displayed when it shouldn't
-Clean up preview generation for editors and exposed it as editor plugin
2017-08-28 00:04:24 -03:00
Juan Linietsky d23f323cde -Moved script run to editor, removed from project
-fixed to code completion
-fix shader crash bug reported by tagcup
2017-08-27 19:04:19 -03:00
Rémi Verschelde 7ad14e7a3e Dead code tells no tales 2017-08-27 22:13:45 +02:00
Rémi Verschelde bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Hein-Pieter van Braam 3e25cf9e05 Add two missing Null checks
These Null checks were removed in #10581 but actually changed the
logic of the functions in this case.

This fixes #10654
2017-08-26 23:40:45 +02:00
Rémi Verschelde 490aef9369 Merge pull request #10581 from hpvb/fix-gcc6+
Make cast_to a static member of Object.
2017-08-25 08:37:38 +02:00
Juan Linietsky b1c0e45b03 Implemented, The Amazing Zylann Hack (tm), fixes #10603 2017-08-25 00:34:32 -03:00
Hein-Pieter van Braam cacced7e50 Convert Object::cast_to() to the static version
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/
2017-08-24 23:08:24 +02:00
Rémi Verschelde 3ea0943f64 Fix mismatched signatures for GDScriptLanguage::complete_code 2017-08-24 12:44:51 +02:00
Juan Linietsky 36e0a72c77 -Code completion for enumerations
-Disabled GDNative and GDNativeScript so build compiles again
2017-08-24 00:06:56 -03:00
Juan Linietsky 3d1c031871 Changed MethodBind API to request information from methods. It's much claner now.
Also changed PropertyInfo to include informatino about class names.
2017-08-23 19:11:11 -03:00
Ignacio Etcheverry 90b8a5b71e Removes editor_hint from SceneTree 2017-08-19 01:29:45 +02:00
Indah Sylvia 5ae78fdf6a Makes all Godot API's methods Lower Case 2017-08-07 18:24:35 +07:00
Andrii Doroshenko (Xrayez) 72436956dd Update GDScript completion names for Pool*Arrays
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!
2017-07-25 12:14:40 +03:00
Poommetee Ketson c7c65ca6ba Clang-formatting *.cpp and *.h (some files excluded) 2017-07-22 18:14:08 +07:00
Juan Linietsky 25678b1876 -Renamed GlobalConfig to ProjectSettings, makes more sense.
-Added system for feature overrides, it's pretty cool :)
2017-07-19 17:06:03 -03:00
Juan Linietsky 00e5ba3143 Remove methods from code completion which are already exposed by properties, makes completion cleaner and more close to the documentation. 2017-06-23 15:10:46 -03:00
Mariano Suligoy 7fe750583e GdScript: Add signal autocompletion to emit_signal function 2017-06-23 07:51:49 -03:00
Andreas Haas 8361b1ce07 Add ability to use custom script templates.
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
2017-06-13 20:03:08 +00:00
Juan Linietsky 5b3709d309 Removal of InputEvent as built-in Variant type..
this might cause bugs I haven't found yet..
2017-05-20 17:05:38 -03:00
Juan Linietsky 98a3296702 Removal of Image from Variant, converted to a Resource. 2017-05-17 07:37:45 -03:00
Bojidar Marinov 837a667225
Fix #8674, and rename a few things for clarity 2017-05-08 22:39:27 +03:00
Paulb23 c4ffe89204 Changed indent type settings 2017-04-26 12:14:03 +01:00
Ramesh Ravone 924bccdbd1
Honoring the Indent setting for gdscript 2017-04-25 06:57:49 +05:30
Rémi Verschelde 9acfb0782c Merge pull request #8444 from magyar123/pr-complete-paths
Script editor now automatically completes file paths in GDScript
2017-04-24 11:37:57 +02:00
mbalint12 71978685f9 Added autocomplete for file paths in the script editor 2017-04-18 17:22:01 +02:00
Paulb23 84bca4e72f Added support for space indentation 2017-04-18 12:30:46 +01:00
Rémi Verschelde df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Rémi Verschelde debeee56f7 Fix typos in source code using codespell
From https://github.com/lucasdemarchi/codespell
2017-03-24 21:45:31 +01:00
mbalint12 edaf77abd6 Fixed typo in gdscript autocompletion.
There was a missing '!' sign, but autocompletion shows parent script members too.
2017-03-17 23:27:44 +01:00
Rémi Verschelde 5dbf1809c6 A Whole New World (clang-format edition)
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
2017-03-05 16:44:50 +01:00
Saracen 5e938f0001 Inf and NaN support added to GDScript. 2017-02-28 21:52:33 +00:00
Rémi Verschelde 1ec8b9fb7d Merge pull request #7851 from shlomif/fix-some-compilation-warnings
Get rid of some compilation warnings.
2017-02-26 20:22:48 +01:00
Shlomi Fish 0a2c387d5c Fix some compilation warnings.
Redone the commit based on the input in
https://github.com/godotengine/godot/pull/7851 . Not all warnings were
fixed but it's a start.
2017-02-21 11:59:19 +02:00
Juan Linietsky de0045cf1b -renamed globals.h to global_config.cpp (this seems to have caused a few modified files)
-.pck and .zip exporting redone, seems to be working..
2017-02-21 00:06:30 -03:00
Rémi Verschelde f44ee891be Style: Fix statements ending with ';;' 2017-01-16 08:49:52 +01:00