feat: refactor numerous areas and tokenize string literals where possible; also fixes some small bugs (#487)

Co-authored-by: Duncan Brown <duncan@bhs-consultants.com>
This commit is contained in:
Duncan BrownandDuncan Brown authored and GitHub committed 2022-02-04 17:10:40 +01:00
1 parent 7913aadb6d
commit 99dc1e0110
50 files changed
+1103 -593

No files matched your search

@@ -94,10 +94,12 @@ func transition(
# *Returns* the full path to the shader or an empty string, if it can't be found
func get_transition(name: String) -> String:
if name.empty():
name = ProjectSettings.get_setting(
"escoria/ui/default_transition"
name = escoria.project_settings_manager.get_setting(
escoria.project_settings_manager.DEFAULT_TRANISITION
)
for directory in ProjectSettings.get_setting("escoria/ui/transition_paths"):
for directory in escoria.project_settings_manager.get_setting(
escoria.project_settings_manager.TRANSITION_PATHS
):
if ResourceLoader.exists(directory.plus_file("%s.material" % name)):
return directory.plus_file("%s.material" % name)
return ""