24 Commits

Author SHA1 Message Date
Elnar Dakeshov
3f2c423bfe Update style guide (#8038)
Used get instead of set.
2023-10-09 00:50:13 +02:00
Matthew
b11aba242c Merge pull request #7564 from Hannfeld/master
Changed a code example that didn't follow the style guide
2023-08-01 05:25:05 +02:00
Danil Alexeev
d8e71f7453 Update info about BBCode in doc comments and Class Reference 2023-05-29 21:43:10 +03:00
Max Hilbrunner
ebf3a02dbc Merge pull request #6498 from vmedea/2022-12-style-guide
Update style guide for new export and setget syntax
2023-03-23 04:46:52 +01:00
Justin McGettigan
7f7042c515 Updated instances of onready to @onready. 2023-03-18 16:06:11 -04:00
Thiago Lages de Alencar
8a112dcef2 Add bang operator to operators table (#6558)
* Add bang operator to operators table

* Add symbolic aliases for `and` & `or`

* Remove comma from operators table

* Add bang to the aliases list

---------

Co-authored-by: Max Hilbrunner <mhilbrunner@users.noreply.github.com>
2023-02-27 07:37:17 +01:00
Thiago Lages de Alencar
6095b20174 Add bang operator to gdscript style guide (#6828) 2023-02-27 07:19:38 +01:00
Mara Huldra
59c4480051 Update style guide for new signal emit/connect syntax 2023-02-07 22:03:04 +01:00
Mara Huldra
6336d03a3a Update style guide for new export and setget syntax 2023-02-07 22:00:35 +01:00
Aaron Franke
370f936922 GDScript style guide: Improve type inference section (#6661) 2023-02-05 16:33:38 +03:00
Jonathan Deiss
bec737cb75 Update gdscript_styleguide.rst (#6379)
Adds two changes:
- makes it clear where subclasses should go (at the bottom of the script)
- put the `_enter_tree()` method before `_ready()` but after `_init()` since that's the order in which the methods are executed
2023-02-05 16:19:27 +03:00
notPelf
beb5f02422 Clarify ternary operator in the style guide
In the current style guide, the example for ternary operators includes a "not" in the conditional which is the same text color as the preceding "if" giving the impression that the format for a ternary operation is "[some_value] if not [condition] else [other_value]" which is incorrect, and may be confusing to figure out. I'm new to Godot and I've never used python (which I understand GDScript is based on). My only experience is with c# which I don't believe has a "not" keyword so I was quite confused by this.

This change would remove "not" from the condition to eliminate confusion, and rearrange the values to keep the meaning of the example code the same. Any alternative that removes the "not" would also work.
2023-02-01 18:41:48 -05:00
BlueStag
135ad68cab Use 4.0 method of connecting to and emitting signals (#6311)
Change docs to use the new method of connecting and emitting signals
2023-01-22 22:01:34 -05:00
Max Hilbrunner
024fedb0f3 Kinematic -> Character 2022-10-15 17:55:24 +02:00
Evanaellio
3cb674285e Fix references to the @tool annotation 2022-09-21 22:48:04 +02:00
Markus Sauermann
57a9ef3fea Add @ to onready annotated variables in examples 2022-02-04 19:33:10 +01:00
Max Hilbrunner
7b758e4739 Merge pull request #5326 from zacryol/inferred-typing-cast
Show example of casting get_node() for static typing in style guide
2021-11-03 14:43:45 +01:00
zacryol
35211f6002 Show example of casting get_node() for inferred static typing in style guide 2021-10-22 11:04:56 -06:00
zacryol
8b5fb7a39d Rename var "character_dir" to "character_dict" in GDScript style guide (#5325) 2021-10-16 01:12:08 +02:00
merumelu
41a3150726 GDScript style guide: tint borders of good/bad code examples (#5138)
Add `rst-class` directives before code blocks to allow custom styling.
2021-08-01 16:09:09 +02:00
Hugo Locurcio
669c163135 Add a GDScript style guide recommendation for multiline wrapping 2021-07-29 15:30:21 +02:00
Vladislav Vorobev
9ffebd0812 Fixed class_name keyword ordering in GDScript style guide
Fixes two examples to follow rules described in "Code order" section of this page.
2021-06-25 12:05:50 +03:00
Nathan Lovato
b928c651e7 Add note about line skips in the style guide 2020-11-18 08:10:24 -06:00
Nathan Lovato
4272395ab7 Move scripting section to tutorials/
Closes #4113
2020-10-07 14:05:48 -06:00