In update_icons.py, sort by filename before updating entries

This commit is contained in:
Serhii Snitsaruk 2024-01-17 11:14:51 +01:00
parent 12dbd9e1a6
commit a5728a11a0
2 changed files with 7 additions and 2 deletions

View File

@ -24,7 +24,6 @@ android.release.arm64 = "res://addons/limboai/bin/liblimboai.android.template_re
[icons] [icons]
BehaviorTree = "res://addons/limboai/icons/BehaviorTree.svg"
BTAction = "res://addons/limboai/icons/BTAction.svg" BTAction = "res://addons/limboai/icons/BTAction.svg"
BTAlwaysFail = "res://addons/limboai/icons/BTAlwaysFail.svg" BTAlwaysFail = "res://addons/limboai/icons/BTAlwaysFail.svg"
BTAlwaysSucceed = "res://addons/limboai/icons/BTAlwaysSucceed.svg" BTAlwaysSucceed = "res://addons/limboai/icons/BTAlwaysSucceed.svg"
@ -68,12 +67,13 @@ BTSubtree = "res://addons/limboai/icons/BTSubtree.svg"
BTTimeLimit = "res://addons/limboai/icons/BTTimeLimit.svg" BTTimeLimit = "res://addons/limboai/icons/BTTimeLimit.svg"
BTWait = "res://addons/limboai/icons/BTWait.svg" BTWait = "res://addons/limboai/icons/BTWait.svg"
BTWaitTicks = "res://addons/limboai/icons/BTWaitTicks.svg" BTWaitTicks = "res://addons/limboai/icons/BTWaitTicks.svg"
BehaviorTree = "res://addons/limboai/icons/BehaviorTree.svg"
LimboAI = "res://addons/limboai/icons/LimboAI.svg" LimboAI = "res://addons/limboai/icons/LimboAI.svg"
LimboDeselectAll = "res://addons/limboai/icons/LimboDeselectAll.svg" LimboDeselectAll = "res://addons/limboai/icons/LimboDeselectAll.svg"
LimboExtraBlackboard = "res://addons/limboai/icons/LimboExtraBlackboard.svg" LimboExtraBlackboard = "res://addons/limboai/icons/LimboExtraBlackboard.svg"
LimboExtraClock = "res://addons/limboai/icons/LimboExtraClock.svg" LimboExtraClock = "res://addons/limboai/icons/LimboExtraClock.svg"
LimboExtractSubtree = "res://addons/limboai/icons/LimboExtractSubtree.svg"
LimboExtraVariable = "res://addons/limboai/icons/LimboExtraVariable.svg" LimboExtraVariable = "res://addons/limboai/icons/LimboExtraVariable.svg"
LimboExtractSubtree = "res://addons/limboai/icons/LimboExtractSubtree.svg"
LimboHSM = "res://addons/limboai/icons/LimboHSM.svg" LimboHSM = "res://addons/limboai/icons/LimboHSM.svg"
LimboPercent = "res://addons/limboai/icons/LimboPercent.svg" LimboPercent = "res://addons/limboai/icons/LimboPercent.svg"
LimboSelectAll = "res://addons/limboai/icons/LimboSelectAll.svg" LimboSelectAll = "res://addons/limboai/icons/LimboSelectAll.svg"

View File

@ -58,9 +58,14 @@ def main():
content += "[icons]\n\n" content += "[icons]\n\n"
icon_files = []
icons_dir = os.path.join(config_dir, "../icons/") icons_dir = os.path.join(config_dir, "../icons/")
for icon_file in glob.glob(icons_dir + "/*.svg"): for icon_file in glob.glob(icons_dir + "/*.svg"):
icon_file = os.path.basename(icon_file) icon_file = os.path.basename(icon_file)
icon_files.append(icon_file)
icon_files.sort()
for icon_file in icon_files:
content += os.path.splitext(icon_file)[0] + " = \"res://addons/limboai/icons/" + icon_file + "\"\n" content += os.path.splitext(icon_file)[0] + " = \"res://addons/limboai/icons/" + icon_file + "\"\n"
f = open(config_path, "w") f = open(config_path, "w")