Update code style

This commit is contained in:
JeremyStar™ 2024-03-31 16:18:08 +02:00
parent 8d6dec5319
commit 96c17c7287
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -82,11 +82,14 @@ func duplication_bad() -> void:
func duplication_good() -> void: func duplication_good() -> void:
var node_num: int = 0 var node_num: int = 0
for node_name in nodes: for node_name in nodes:
# Use '+=' or '-=' to subtract something from an integer
counter += 1 counter += 1
set("node_" + node_name, Node.new()) set("node_" + node_name, Node.new())
get("node_" + node_name).name = "Test node " + str(node_num) get("node_" + node_name).name = "Test node " + str(node_num)
add_child(get("node_" + node_name)) add_child(get("node_" + node_name))
``` ```
Please note that you may find old code which does not yet follow these code style guidelines. If you find any, please fix them or report them, thank you!
### Committing ### Committing
Simply use `git add .`, `git commit -m "<a good and meaningful commit message"` and `git push -u origin <your username>-patch-1` to push your changes. Don't forget to create a pull request once you are done. \ Simply use `git add .`, `git commit -m "<a good and meaningful commit message"` and `git push -u origin <your username>-patch-1` to push your changes. Don't forget to create a pull request once you are done. \
If you don't want to do everything from the command line you can use [gitui](https://github.com/extrawurst/gitui). It's a good and easy to use tui git client which I ([JeremyStarTM](https://git.staropensource.de/JeremyStarTM)) personally use and like. You can't do everything from gitui though, so please keep that in mind. If you don't want to do everything from the command line you can use [gitui](https://github.com/extrawurst/gitui). It's a good and easy to use tui git client which I ([JeremyStarTM](https://git.staropensource.de/JeremyStarTM)) personally use and like. You can't do everything from gitui though, so please keep that in mind.