Rémi Verschelde
74977277fa
Merge pull request #34280 from zaksnet/fix-yield-documentation
...
Fix documentation for yield
2019-12-16 08:49:32 +01:00
Haoyu Qiu
468fcd80bb
Updates docs for GDScript built-in functions
...
* Adds description for `ord()`
* Adds relationship description between `char()` and `ord()`
* Describes the argument of `char()` as Unicode code point instead of ASCII code
* Fixes wrong interval notation in `randi()` description
2019-12-15 19:06:29 +08:00
George Marques
cb887324e6
GDScript: Convert values when setting member variables
...
This allows doing: self.x = 1 even if self.x is declared as float.
2019-12-13 12:51:53 -03:00
George Marques
475d7f0e52
GDScript: Fix type conversion in assignment with operation
2019-12-13 12:51:08 -03:00
Zak
0fd7186971
Fix documentation for yield
...
#33872 PR was misleading as i though inheritance from GDScriptFunctionState was optional.
2019-12-13 11:17:12 +02:00
Rémi Verschelde
f065b34e96
Merge pull request #34286 from bojidar-bg/31818-cast-autocomplete
...
Fix GDScript autocompletion with "as" or typed variables
2019-12-12 14:53:38 +01:00
Bojidar Marinov
a665b3878b
Fix GDScript autocompletion with as
or typed variables
...
Fixes #31818 , fixes #33434
2019-12-12 01:16:23 +02:00
Michael Alexsander
6cc3bb2d9b
Add note in 'load()' docs that the path must be absolute
2019-12-11 17:14:58 -03:00
Rémi Verschelde
98c3990f7d
Merge pull request #34271 from vnen/gdscript-unused-class-variable-disable
...
Disable GDScript warning for unused class variable by default
2019-12-11 16:27:42 +01:00
Rémi Verschelde
df2e3e3f7f
Merge pull request #33018 from Xrayez/fix-inst2dict-getters
...
Fix `inst2dict` calling to getters to retrieve value
2019-12-11 15:06:38 +01:00
George Marques
cbf5641a74
Disable GDScript warning for unused class variable by default
2019-12-11 11:02:07 -03:00
Rémi Verschelde
2845e6a21a
Merge pull request #34040 from qarmin/unused_variable_more_precise_numbers
...
Removed unused variables, add some constants numbers
2019-12-10 08:25:31 +01:00
Rafał Mikrut
ed1c4bc77d
Removed unused variables, add some constants numbers
2019-12-10 05:13:02 +01:00
Rémi Verschelde
4eff13d768
doc: Markup fixes for enums and constants
2019-12-06 23:09:20 +01:00
Rémi Verschelde
f326913f4d
Merge pull request #34067 from bojidar-bg/32370-retype-message
...
Make error when accidentially redeclaring a variable's type clearer
2019-12-04 06:52:22 +01:00
Hugo Locurcio
1fcdeaee39
Mention that int()
can be used as an alternative to floor()
2019-12-03 08:43:24 +01:00
Bojidar Marinov
79c26344e8
Make error when accidentially redeclaring a variable's type clearer
...
Fixes #32370
2019-12-02 22:26:05 +02:00
Aaron Franke
3231fca934
Add docs for is_equal_approx on structures
2019-11-30 16:52:27 -05:00
miere43
d747c61187
Fixed typo in docs for Script and GDScript classes ("exends" -> "extends")
2019-11-30 21:16:11 +03:00
Hugo Locurcio
247767eb89
Document how to bypass the unused argument/variable warning in message
...
Note that prefixing with an underscore only works with unused arguments
and local variables, not class variables and signals.
This closes #26056 .
2019-11-27 22:52:43 +01:00
Hugo Locurcio
4f14a1f59c
Remove type hint from the @GDScript class documentation
...
The current consensus in the Godot documentation is to avoid using
type hints unless they're relevant to the behavior explained.
2019-11-26 19:13:55 +01:00
Zak Stam
5cfff77ca6
Added missing documentation for yield()
...
Added some missing documentation about yield() being able to wait for a function also. I cant believe something like that was missing from the docs, it would have saved me so much time (and others i assume).
2019-11-25 18:08:18 +02:00
Rémi Verschelde
ab3bccdb78
Fix typos with codespell
...
Using codespell 1.16.0.
Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF
$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-11-22 08:35:03 +01:00
Michael Alexsander
7ecaff578b
Make the script templates' blank lines conform with the official style guide
2019-11-17 08:54:43 -03:00
lupoDharkael
9254961297
Parser: Check all the arguments of the ternary operator
2019-11-15 01:29:18 +01:00
Rémi Verschelde
30d4c923cb
Merge pull request #32966 from ffaristocrat/fix-hex-parsing
...
Fix base 16 hex literal parsing
2019-11-12 23:04:20 +01:00
Micheál Keane
4b9fd961d6
Fixes #32963 by correctly parsing bin/hex literals
2019-11-12 15:57:38 -05:00
Marcel Admiraal
83069a3c0f
Remove ERR_EXPLAIN macros and the scaffolding they needed.
2019-11-11 10:57:00 +01:00
Marcel Admiraal
d18b2e599d
Remove all uses of ERR_EXPLAIN macros.
2019-11-11 10:24:04 +01:00
mashumafi
d7137a6b72
Add setting to exclude addons from script warnings
2019-11-07 23:01:22 -05:00
Rémi Verschelde
91518defa5
Merge pull request #33257 from aaronfranke/printraw
...
Document behavior of GDScript printraw
2019-11-07 13:21:09 +01:00
Rémi Verschelde
76aa975460
Merge pull request #33266 from Xrayez/inst2dict-original-path
...
Use GDScript resource path over script path for `inst2dict`
2019-11-04 08:59:30 +01:00
Andrii Doroshenko (Xrayez)
7f40b69022
Use GDScript resource path over script path for inst2dict
...
The resource path holds the original path which can be used to convert
a dictionary to instance consistently both within editor and exported projects
as the original path is automatically remapped from `gd` to `gdc` or `gde` in
exported projects.
2019-11-02 15:11:52 +02:00
Aaron Franke
c4e46b8800
Document behavior of printraw
2019-11-02 04:55:39 -04:00
Aaron Franke
b67f252016
Fix Color8 GDScript documentation
2019-11-02 04:48:08 -04:00
George Marques
9fcd38fc70
GDScript: validate instance before accessing it on error
...
Make sure the instance is valid before trying to access the script in
after an error happened. If the instance is not valid it's possible that
the script is invalid as well.
Fix #29623
2019-11-01 14:41:52 -03:00
George Marques
15800b4db8
GDScript: Avoid editor crashes when there's cyclic inheritance
...
Make sure the script is fully compiled before looking into the base.
2019-11-01 12:00:20 -03:00
Andrii Doroshenko (Xrayez)
56925b9c28
Provide and print error messages for JSON parsing
...
Core is not touched, only for binding and scripting.
2019-10-31 13:15:44 +02:00
PouleyKetchoupp
bcbe5b5850
Fixed leak in gdscript when creating empty WeakRef
...
Fixes #33150
2019-10-29 23:53:56 +01:00
Rémi Verschelde
c43c3747cf
Merge pull request #32808 from bojidar-bg/30937-less-strict-mixed-spacing
...
Allow mixed tabs and spaces when indentation does not depend on tab size
2019-10-25 23:16:04 +02:00
Bojidar Marinov
afbde3314a
Allow mixed tabs and spaces when indentation does not depend on tab size
...
(hopefully) Closes #30937 , fixes #32612
2019-10-25 14:54:57 +03:00
Andrii Doroshenko (Xrayez)
1b9a7e1c21
Fix inst2dict
calling to getters to retrieve value
...
Use `GDScriptInstance` to iterate through all members directly instead.
This is similar to how `dict2inst` works and makes the serialization
behaviour more consistent.
2019-10-24 14:45:04 +03:00
Rémi Verschelde
8228b93fcd
Merge pull request #32919 from vnen/gdscript-unused-args
...
Fix wrong counting of function argument usage
2019-10-22 14:15:58 +02:00
Rémi Verschelde
e4cfb77961
Merge pull request #32903 from madmiraal/fix-27649-part9
...
Remove duplicate valid value check in gdscript_tokenizer.cpp.
2019-10-22 13:51:28 +02:00
Rémi Verschelde
fddc60c85c
Merge pull request #32878 from EbbDrop/no_autocompletion_for_singeltons
...
Fixes auto completion for singletons
2019-10-22 13:50:25 +02:00
George Marques
05465b9693
GDScript: Add _ prefix on class name in type compatibility check
...
This makes sure that the classes internally represented with an
underscore (_) prefix, such as singletons, are still properly checked
for inheritance in the ClassDB.
2019-10-19 13:45:52 -03:00
George Marques
bb20e420af
Fix wrong counting of function argument usage
...
There's no need to subtract 1 from the assignment usages because it's
not incremented anywhere else.
Also put back the assignment with operators because they should not
count as usage if the argument is on the left side.
2019-10-19 10:59:57 -03:00
Marcel Admiraal
5b96233c34
Remove duplicate valid value check in gdscript_tokenizer.cpp.
2019-10-18 11:58:34 +02:00
EbbDrop
f70fd781fc
Fix autocompletion for singletons
2019-10-17 10:48:13 +02:00
qarmin
616ab4fac2
Small fixes to redundand code, copy paste bugs
2019-10-14 11:40:55 +02:00