summaryrefslogtreecommitdiff
path: root/modules/gdscript
AgeCommit message (Collapse)Author
2017-05-27GDScript: Use "is" keyword for type checking.Andreas Haas
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-20Removal of InputEvent as built-in Variant type..Juan Linietsky
this might cause bugs I haven't found yet..
2017-05-18Merge pull request #8798 from RandomShaper/gdfs-ext-checkRémi Verschelde
Add extended check option to GDFunctionState::is_valid()
2017-05-17Add extended check option to GDFunctionState::is_valid()Pedro J. Estébanez
2017-05-17Removal of Image from Variant, converted to a Resource.Juan Linietsky
2017-05-08Fix #8674, and rename a few things for clarityBojidar Marinov
2017-04-26Changed indent type settingsPaulb23
2017-04-25Honoring the Indent setting for gdscriptRamesh Ravone
2017-04-24fixed a bug where saving a GDScript file crashed the editorKarroffel
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-24Merge pull request #8444 from magyar123/pr-complete-pathsRémi Verschelde
Script editor now automatically completes file paths in GDScript
2017-04-24Merge pull request #8420 from magyar123/pr-script-files-as-baseRémi Verschelde
Added the ability to select files as base when creating scripts
2017-04-24re-added MultiScriptKarroffel
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-18Added autocomplete for file paths in the script editormbalint12
2017-04-18Added support for space indentationPaulb23
2017-04-15Added the ability to select files as base when creating scriptsmbalint12
2017-04-08Fixup #8123, seems like I forgot a few thingsBojidar Marinov
Should close #8315 Please test, I'm still unsure I did it correctly...
2017-04-08Add "Godot Engine contributors" copyright lineRémi Verschelde
2017-04-05Fix typo in Parser Error messagecurtisxk38
2017-04-01Add '$' to token namesSaggi Mizrahi
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-03-24Merge pull request #8123 from bojidar-bg/gdscript-inline-block-indentRémi Verschelde
Make inline blocks in GDScript more (or less) pythonic
2017-03-24Fix typos in source code using codespellRémi Verschelde
From https://github.com/lucasdemarchi/codespell
2017-03-23Make inline blocks in GDScript more pythonicBojidar Marinov
Fixes #8001
2017-03-21Merge pull request #8095 from RandomShaper/fix-yield-crashRémi Verschelde
Fix random crashes when using yield()
2017-03-21Fix random crashes when using yield()Pedro J. Estébanez
2017-03-17Fixed typo in gdscript autocompletion.mbalint12
There was a missing '!' sign, but autocompletion shows parent script members too.
2017-03-13Skip asserts on non-debug builds at compiler levelPedro J. Estébanez
2017-03-05A Whole New World (clang-format edition)Rémi Verschelde
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-05Add a bunch of missing Godot headers in own filesRémi Verschelde
2017-03-05Refactoring: rename tools/editor/ to editor/Rémi Verschelde
The other subfolders of tools/ had already been moved to either editor/, misc/ or thirdparty/, so the hiding the editor code that deep was no longer meaningful.
2017-02-28Merge pull request #7878 from RebelliousX/elseRémi Verschelde
Bunch of missing `else` statements and general logic
2017-02-28Inf and NaN support added to GDScript.Saracen
2017-02-28 Various fixes detected using PVS-Studio static analyzer.Thaer Razeq
- Add FIXME tags comments to some unfixed potential bugs - Remove some checks (always false: unsigned never < 0) - Fix some if statements based on reviews. - Bunch of missing `else` statements
2017-02-26Merge pull request #7851 from shlomif/fix-some-compilation-warningsRémi Verschelde
Get rid of some compilation warnings.
2017-02-26Merge pull request #7809 from hpvb/fix-6798Rémi Verschelde
Allow preload to accept a const string.
2017-02-21Fix some compilation warnings.Shlomi Fish
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-renamed globals.h to global_config.cpp (this seems to have caused a few ↵Juan Linietsky
modified files) -.pck and .zip exporting redone, seems to be working..
2017-02-16Correct hash behavior for floating point numbersHein-Pieter van Braam
This fixes HashMap where a key or part of a key is a floating point number. To fix this the following has been done: * HashMap now takes an extra template argument Comparator. This class gets used to compare keys. The default Comperator now works correctly for common types and floating point numbets. * Variant implements ::hash_compare() now. This function implements nan-safe comparison for all types with components that contain floating point numbers. * Variant now has a VariantComparator which uses Variant::hash_compare() safely compare floating point components of variant's types. * The hash functions for floating point numbers will now normalize NaN values so that all floating point numbers that are NaN hash to the same value. C++ module writers that want to use HashMap internally in their modules can now also safeguard against this crash by defining their on Comperator class that safely compares their types. GDScript users, or writers of modules that don't use HashMap internally in their modules don't need to do anything. This fixes #7354 and fixes #6947.
2017-02-16Allow preload to accept a const string.Hein-Pieter van Braam
In preload() parsing this code will lookup the identifier in the local constant database. If the identifier corresponds to a string constant it is used as the path for preload(). Currently this does not work for global constants, only constants declared in the same class as the preload is happening. We can implement a full fix too. Maybe we can use this PR to discuss the possibilities. This (partially) fixes #6798
2017-02-15-begin of export work, not done yetJuan Linietsky
-fixes to make scenes exported from godot 2.x work
2017-02-13Remove bounds check when resuming from yield.Hein-Pieter van Braam
The code would get a pointer to the beginning of the call_args by using operator[] at the stack Vector. This does bound checking. When there are no call_args this bound check fails and the error mentioned in #7796 gets triggered. This bound check is actually not necessary as call_args just gets set to NULL and never dereferenced. This new code will just unconditionally set the pointer to the place where the call_args are if there are any. There is no NULL check for call_args anywhere so this is safe. Fixes #7796
2017-02-13Rename the _MD macro to D_METHODHein-Pieter van Braam
This new name also makes its purpose a little clearer This is a step towards fixing #56
2017-02-04Fix parsing bug which causes range(variable) to crash the enginelonesurvivor
problem was a segmentation fault caused by trying to access Vector constants[0] which isn't there if op->arguments.size() is not bigger than one. - the changed OR condition didn't make sense (always true), should be AND - changes the "constant" variable to be false per default and gets set to true when there is actually something pushed to "constants"
2017-01-25Removed import/export system, will start new one from scratch.Juan Linietsky
2017-01-23Merge pull request #7583 from karroffel/wildcardRémi Verschelde
made _ a special token in GDScript
2017-01-20made _ a special token in GDScriptkarroffel
2017-01-16Overloaded basic math funcs (double and float variants). Use real_t rather ↵Ferenc Arn
than float or double in generic functions (core/math) whenever possible. Also inlined some more math functions.
2017-01-16Merge pull request #7532 from tagcup/pcg_prngRémi Verschelde
Replace the existing PRNG (Xorshift31) with (minimal) PCG-32.
2017-01-16Style: Various fixes to play nice with clang-formatRémi Verschelde
2017-01-16Style: Fix statements ending with ';;'Rémi Verschelde
2017-01-16Style: Cleanups, added headers, renamed filesRémi Verschelde
Made sure files in core/ and tools/ have a proper Godot license header when written by us. Also renamed aabb.{cpp,h} and object_type_db.{cpp,h} to rect3.{cpp,h} and class_db.{cpp,h} respectively. Also added a proper header to core/io/base64.{c,h} after clarifying the licensing with the original author (public domain).