Changes to better follow GDScript style guide

Nothing new is being added in this commit, just code re-ordering & re-naming to better follow the recommended GDScript style guide.
http://docs.godotengine.org/en/3.2/getting_started/scripting/gdscript/gdscript_styleguide.html

And

https://www.gdquest.com/docs/guidelines/best-practices/godot-gdscript/
This commit is contained in:
OverloadedOrama 2020-02-11 00:06:24 +02:00
parent 5fe4b74a39
commit 8ff917111c
14 changed files with 173 additions and 169 deletions

View file

@ -30,14 +30,14 @@ func find_brushes(brushes_dir : Directory, path : String) -> Array:
found_random_brush = Global.file_brush_container.get_child_count()
image.convert(Image.FORMAT_RGBA8)
Global.custom_brushes.append(image)
Global.create_brush_button(image, Global.BRUSH_TYPES.RANDOM_FILE, file.trim_suffix(".png"))
Global.create_brush_button(image, Global.Brush_Types.RANDOM_FILE, file.trim_suffix(".png"))
else:
var brush_button = Global.file_brush_container.get_child(found_random_brush)
brush_button.random_brushes.append(image)
else:
image.convert(Image.FORMAT_RGBA8)
Global.custom_brushes.append(image)
Global.create_brush_button(image, Global.BRUSH_TYPES.FILE, file.trim_suffix(".png"))
Global.create_brush_button(image, Global.Brush_Types.FILE, file.trim_suffix(".png"))
elif file.get_extension() == "": # Probably a directory
var subdir := "./%s" % [file]
if brushes_dir.dir_exists(subdir): # If it's an actual directory