Commit Graph

376 Commits

Author SHA1 Message Date
eab850524e Add closest_power_of_2 func and implement mix_rate/latency on OS X 2017-08-17 19:51:13 -03:00
b1ecaaa22b Merge pull request #10307 from Rubonnek/update-argument-names
Updated function argument names
2017-08-16 17:17:56 +02:00
ae2d449047 Revive inspector property evaluation
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.
2017-08-16 03:01:41 +02:00
428f03cf06 Updated function argument names 2017-08-12 15:12:49 -04:00
2f290038d6 Removes type information from method binds 2017-08-10 07:17:50 +02:00
95f10c620d push variable later when created, to avoid self-referencing as a valid case, closes #6111 2017-08-08 11:44:49 -03:00
c6120e77a8 Implement len() gdscript built-in function for python users, closes #1960 2017-08-07 18:38:47 -03:00
5ae78fdf6a Makes all Godot API's methods Lower Case 2017-08-07 18:24:35 +07:00
a5fb82c28c Fix $a/b being parsed as division 2017-07-26 18:51:03 +03:00
a931052c79 Merge pull request #9731 from Xrayez/gdscript-completion
Update GDScript completion names for Pool*Arrays
2017-07-25 21:05:42 +02:00
5319098aef fix a regression (GDScript) from e00630b
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.
2017-07-25 20:01:19 +02:00
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
e00630bfca Merge pull request #8217 from bojidar-bg/gdscript-fix-keyword-call
Make GDScript allow some keywords as identifiers
2017-07-25 08:18:10 +02:00
1936e1d2be Make GDScript allow some keywords as identifiers
Fixes #8085
Added some comments around the use of is_token_literal, as discussed.
2017-07-23 23:34:31 +03:00
c7c65ca6ba Clang-formatting *.cpp and *.h (some files excluded) 2017-07-22 18:14:08 +07:00
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
49c7620326 Add object type hint for docs 2017-07-19 02:03:34 +07:00
bbada82f80 -Reorganized all properties of project settings (Sorry, Again).
(Lot's of bloat accumulated, so it was time for clean up.)
-Made EditorSettings and ProjectSettings search more useful (search in sections too)
2017-07-17 22:18:58 -03:00
a5d500f023 Merge pull request #8573 from neikeq/gdfs-completed
Adds "completed" signal to GDFunctionState
2017-07-11 11:14:22 +02:00
6687484958 Better user expirence with external text editors.
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.
2017-06-27 12:55:16 +08:00
9c186a754f Merge pull request #8783 from bojidar-bg/fix-range-loop-type
Fix for..in range() resulting in floats instead of ints
2017-06-24 23:39:55 +02:00
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
7fe750583e GdScript: Add signal autocompletion to emit_signal function 2017-06-23 07:51:49 -03:00
07fe7d99ea Adds completed signal to GDFunctionState 2017-06-23 02:29:23 +02:00
26a51c3c0b Reimplement for..in range() so that it always results in ints
Fixes #8278, fixup of bfef8de1bc
2017-06-22 20:41:52 +03:00
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
015d36d18b GDScript: Use "is" keyword for type checking.
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")
```
2017-05-27 10:59:59 +02:00
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
dcc44f05b7 Merge pull request #8798 from RandomShaper/gdfs-ext-check
Add extended check option to GDFunctionState::is_valid()
2017-05-18 12:51:29 +02:00
b69d4ebff4 Add extended check option to GDFunctionState::is_valid() 2017-05-17 14:55:59 +02:00
98a3296702 Removal of Image from Variant, converted to a Resource. 2017-05-17 07:37:45 -03:00
837a667225 Fix #8674, and rename a few things for clarity 2017-05-08 22:39:27 +03:00
c4ffe89204 Changed indent type settings 2017-04-26 12:14:03 +01:00
924bccdbd1 Honoring the Indent setting for gdscript 2017-04-25 06:57:49 +05:30
67886bab1e fixed a bug where saving a GDScript file crashed the editor
I changed the loop in #8502, turns out it fixed the error I was facing but introduced a new one. This fixes both
2017-04-24 19:26:32 +02:00
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
68870af214 Merge pull request #8420 from magyar123/pr-script-files-as-base
Added the ability to select files as base when creating scripts
2017-04-24 11:28:36 +02:00
885239fb09 re-added MultiScript
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.
2017-04-24 01:49:40 +02:00
71978685f9 Added autocomplete for file paths in the script editor 2017-04-18 17:22:01 +02:00
84bca4e72f Added support for space indentation 2017-04-18 12:30:46 +01:00
a3afec588c Added the ability to select files as base when creating scripts 2017-04-15 23:29:09 +02:00
7cc561fe0e Fixup #8123, seems like I forgot a few things
Should close #8315
Please test, I'm still unsure I did it correctly...
2017-04-08 19:42:37 +03:00
df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
d35fab7382 Fix typo in Parser Error message 2017-04-05 23:11:05 -04:00
c464609bda Add '$' to token names
It was missing from this array and would cause godot to crash or report
bad errors.

Signed-off-by: Saggi Mizrahi <saggi@mizrahi.cc>
2017-04-01 03:20:23 +03:00
495710c3d6 Merge pull request #8123 from bojidar-bg/gdscript-inline-block-indent
Make inline blocks in GDScript more (or less) pythonic
2017-03-24 22:52:09 +01:00
debeee56f7 Fix typos in source code using codespell
From https://github.com/lucasdemarchi/codespell
2017-03-24 21:45:31 +01:00
18ab88b3f1 Make inline blocks in GDScript more pythonic
Fixes #8001
2017-03-23 20:07:02 +02:00
33a2c5def0 Merge pull request #8095 from RandomShaper/fix-yield-crash
Fix random crashes when using yield()
2017-03-21 11:07:07 +01:00
0664a9ef8e Fix random crashes when using yield() 2017-03-21 02:53:06 +01:00