Age | Commit message (Collapse) | Author |
|
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")
```
|
|
this might cause bugs I haven't found yet..
|
|
Add extended check option to GDFunctionState::is_valid()
|
|
|
|
|
|
|
|
|
|
|
|
I changed the loop in #8502, turns out it fixed the error I was facing but introduced a new one. This fixes both
|
|
Script editor now automatically completes file paths in GDScript
|
|
Added the ability to select files as base when creating scripts
|
|
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.
|
|
|
|
|
|
|
|
Should close #8315
Please test, I'm still unsure I did it correctly...
|
|
|
|
|
|
It was missing from this array and would cause godot to crash or report
bad errors.
Signed-off-by: Saggi Mizrahi <saggi@mizrahi.cc>
|
|
Make inline blocks in GDScript more (or less) pythonic
|
|
From https://github.com/lucasdemarchi/codespell
|
|
Fixes #8001
|
|
Fix random crashes when using yield()
|
|
|
|
There was a missing '!' sign, but autocompletion shows parent script members too.
|
|
|
|
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
|
|
|
|
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.
|
|
Bunch of missing `else` statements and general logic
|
|
|
|
- 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
|
|
Get rid of some compilation warnings.
|
|
Allow preload to accept a const string.
|
|
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.
|
|
modified files)
-.pck and .zip exporting redone, seems to be working..
|
|
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.
|
|
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
|
|
-fixes to make scenes exported from godot 2.x work
|
|
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
|
|
This new name also makes its purpose a little clearer
This is a step towards fixing #56
|
|
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"
|
|
|
|
made _ a special token in GDScript
|
|
|
|
than float or double in generic functions (core/math) whenever possible.
Also inlined some more math functions.
|
|
Replace the existing PRNG (Xorshift31) with (minimal) PCG-32.
|
|
|
|
|
|
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).
|