From d41751d39ce2412ab719448facb6592a4ad1e2d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 21 Oct 2020 18:07:49 +0200 Subject: [PATCH] Use '~' prefix instead of '%' for random brushes (#362) Fixes #337. --- .../Brushes/Grass/{%Grass1.png => ~Grass1.png} | Bin .../Brushes/Grass/{%Grass2.png => ~Grass2.png} | Bin .../Brushes/Grass/{%Grass3.png => ~Grass3.png} | Bin .../Brushes/Grass/{%Grass4.png => ~Grass4.png} | Bin .../Brushes/Grass/{%Grass5.png => ~Grass5.png} | Bin .../Brushes/Star/{%star1.png => ~star1.png} | Bin .../Brushes/Star/{%star2.png => ~star2.png} | Bin .../Brushes/Star/{%star3.png => ~star3.png} | Bin .../Brushes/Star/{%star4.png => ~star4.png} | Bin .../Brushes/Star/{%star5.png => ~star5.png} | Bin .../Brushes/Star/{%star6.png => ~star6.png} | Bin src/Autoload/Import.gd | 2 +- src/UI/Dialogs/PreviewDialog.gd | 4 ++-- 13 files changed, 3 insertions(+), 3 deletions(-) rename pixelorama_data/Brushes/Grass/{%Grass1.png => ~Grass1.png} (100%) rename pixelorama_data/Brushes/Grass/{%Grass2.png => ~Grass2.png} (100%) rename pixelorama_data/Brushes/Grass/{%Grass3.png => ~Grass3.png} (100%) rename pixelorama_data/Brushes/Grass/{%Grass4.png => ~Grass4.png} (100%) rename pixelorama_data/Brushes/Grass/{%Grass5.png => ~Grass5.png} (100%) rename pixelorama_data/Brushes/Star/{%star1.png => ~star1.png} (100%) rename pixelorama_data/Brushes/Star/{%star2.png => ~star2.png} (100%) rename pixelorama_data/Brushes/Star/{%star3.png => ~star3.png} (100%) rename pixelorama_data/Brushes/Star/{%star4.png => ~star4.png} (100%) rename pixelorama_data/Brushes/Star/{%star5.png => ~star5.png} (100%) rename pixelorama_data/Brushes/Star/{%star6.png => ~star6.png} (100%) diff --git a/pixelorama_data/Brushes/Grass/%Grass1.png b/pixelorama_data/Brushes/Grass/~Grass1.png similarity index 100% rename from pixelorama_data/Brushes/Grass/%Grass1.png rename to pixelorama_data/Brushes/Grass/~Grass1.png diff --git a/pixelorama_data/Brushes/Grass/%Grass2.png b/pixelorama_data/Brushes/Grass/~Grass2.png similarity index 100% rename from pixelorama_data/Brushes/Grass/%Grass2.png rename to pixelorama_data/Brushes/Grass/~Grass2.png diff --git a/pixelorama_data/Brushes/Grass/%Grass3.png b/pixelorama_data/Brushes/Grass/~Grass3.png similarity index 100% rename from pixelorama_data/Brushes/Grass/%Grass3.png rename to pixelorama_data/Brushes/Grass/~Grass3.png diff --git a/pixelorama_data/Brushes/Grass/%Grass4.png b/pixelorama_data/Brushes/Grass/~Grass4.png similarity index 100% rename from pixelorama_data/Brushes/Grass/%Grass4.png rename to pixelorama_data/Brushes/Grass/~Grass4.png diff --git a/pixelorama_data/Brushes/Grass/%Grass5.png b/pixelorama_data/Brushes/Grass/~Grass5.png similarity index 100% rename from pixelorama_data/Brushes/Grass/%Grass5.png rename to pixelorama_data/Brushes/Grass/~Grass5.png diff --git a/pixelorama_data/Brushes/Star/%star1.png b/pixelorama_data/Brushes/Star/~star1.png similarity index 100% rename from pixelorama_data/Brushes/Star/%star1.png rename to pixelorama_data/Brushes/Star/~star1.png diff --git a/pixelorama_data/Brushes/Star/%star2.png b/pixelorama_data/Brushes/Star/~star2.png similarity index 100% rename from pixelorama_data/Brushes/Star/%star2.png rename to pixelorama_data/Brushes/Star/~star2.png diff --git a/pixelorama_data/Brushes/Star/%star3.png b/pixelorama_data/Brushes/Star/~star3.png similarity index 100% rename from pixelorama_data/Brushes/Star/%star3.png rename to pixelorama_data/Brushes/Star/~star3.png diff --git a/pixelorama_data/Brushes/Star/%star4.png b/pixelorama_data/Brushes/Star/~star4.png similarity index 100% rename from pixelorama_data/Brushes/Star/%star4.png rename to pixelorama_data/Brushes/Star/~star4.png diff --git a/pixelorama_data/Brushes/Star/%star5.png b/pixelorama_data/Brushes/Star/~star5.png similarity index 100% rename from pixelorama_data/Brushes/Star/%star5.png rename to pixelorama_data/Brushes/Star/~star5.png diff --git a/pixelorama_data/Brushes/Star/%star6.png b/pixelorama_data/Brushes/Star/~star6.png similarity index 100% rename from pixelorama_data/Brushes/Star/%star6.png rename to pixelorama_data/Brushes/Star/~star6.png diff --git a/src/Autoload/Import.gd b/src/Autoload/Import.gd index c12226ade..82762705a 100644 --- a/src/Autoload/Import.gd +++ b/src/Autoload/Import.gd @@ -68,7 +68,7 @@ func get_brush_files_from_directory(directory: String): # -> Array # and png one at that nya if !the_directory.current_is_dir() and curr_file.get_extension().to_lower() == "png": # if we are a random element, add - if "%" in curr_file: + if "~" in curr_file: randomised_files.append(curr_file) else: non_randomised_files.append(curr_file) diff --git a/src/UI/Dialogs/PreviewDialog.gd b/src/UI/Dialogs/PreviewDialog.gd index b106cb2f4..dad963b48 100644 --- a/src/UI/Dialogs/PreviewDialog.gd +++ b/src/UI/Dialogs/PreviewDialog.gd @@ -196,14 +196,14 @@ func add_brush() -> void: dir.list_dir_begin() var curr_file := dir.get_next() while curr_file != "": - if curr_file.begins_with("%") and brush_name in curr_file: + if curr_file.begins_with("~") and brush_name in curr_file: random_brushes.append(curr_file) curr_file = dir.get_next() dir.list_dir_end() var file_ext : String = path.get_file().get_extension() var index : int = random_brushes.size() + 1 - var file_name = "%" + brush_name + str(index) + "." + file_ext + var file_name = "~" + brush_name + str(index) + "." + file_ext var location := "Brushes".plus_file(brush_name).plus_file(file_name) dir.copy(path, Global.directory_module.xdg_data_home.plus_file(location))