From cea10a7706587cb2c00bd8d8fe3520ecec3c6118 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Sat, 22 Feb 2025 13:43:34 -0500 Subject: [PATCH] Sort assets alphabetically --- src/assets.lua | 110 +++++++++++++++++++++++------------------------ src/assets.lua2p | 2 +- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/src/assets.lua b/src/assets.lua index d4438c3..9a7789a 100644 --- a/src/assets.lua +++ b/src/assets.lua @@ -3,70 +3,37 @@ -- luacheck: ignore ---@type pd_image -DarkPlayerFrown = playdate.graphics.image.new("images/game/DarkPlayerFrown.png") --- luacheck: ignore ----@type pd_image -LightPlayerAwayBase = playdate.graphics.image.new("images/game/LightPlayerAwayBase.png") --- luacheck: ignore ----@type pd_image -LightPlayerSmile = playdate.graphics.image.new("images/game/LightPlayerSmile.png") --- luacheck: ignore ----@type pd_image -Glove = playdate.graphics.image.new("images/game/Glove.png") --- luacheck: ignore ----@type pd_image -PerfectPowerFlickerRight = playdate.graphics.image.new("images/game/PerfectPowerFlickerRight.png") --- luacheck: ignore ----@type pd_image -DarkSkinFan = playdate.graphics.image.new("images/game/DarkSkinFan.png") --- luacheck: ignore ----@type pd_image -DarkPlayerAwayBase = playdate.graphics.image.new("images/game/DarkPlayerAwayBase.png") --- luacheck: ignore ----@type pd_image -PerfectPowerFlickerLeft = playdate.graphics.image.new("images/game/PerfectPowerFlickerLeft.png") --- luacheck: ignore ----@type pd_image -LightPlayerFrown = playdate.graphics.image.new("images/game/LightPlayerFrown.png") --- luacheck: ignore ----@type pd_image -LightPlayerAwayBack = playdate.graphics.image.new("images/game/LightPlayerAwayBack.png") +BigBat = playdate.graphics.image.new("images/game/BigBat.png") -- luacheck: ignore ---@type pd_image DarkPlayerAwayBack = playdate.graphics.image.new("images/game/DarkPlayerAwayBack.png") -- luacheck: ignore ---@type pd_image -LightPlayerHomeBack = playdate.graphics.image.new("images/game/LightPlayerHomeBack.png") +DarkPlayerAwayBase = playdate.graphics.image.new("images/game/DarkPlayerAwayBase.png") -- luacheck: ignore ---@type pd_image -BigBat = playdate.graphics.image.new("images/game/BigBat.png") --- luacheck: ignore ----@type pd_image -LightSkinFan = playdate.graphics.image.new("images/game/LightSkinFan.png") +DarkPlayerFrown = playdate.graphics.image.new("images/game/DarkPlayerFrown.png") -- luacheck: ignore ---@type pd_image DarkPlayerHomeBack = playdate.graphics.image.new("images/game/DarkPlayerHomeBack.png") -- luacheck: ignore ---@type pd_image -GloveHoldingBall = playdate.graphics.image.new("images/game/GloveHoldingBall.png") +DarkPlayerHomeBase = playdate.graphics.image.new("images/game/DarkPlayerHomeBase.png") +-- luacheck: ignore +---@type pd_image +DarkPlayerSmile = playdate.graphics.image.new("images/game/DarkPlayerSmile.png") +-- luacheck: ignore +---@type pd_image +DarkSkinFan = playdate.graphics.image.new("images/game/DarkSkinFan.png") -- luacheck: ignore ---@type pd_image GameLogo = playdate.graphics.image.new("images/game/GameLogo.png") -- luacheck: ignore ---@type pd_image -LightPlayerHomeBase = playdate.graphics.image.new("images/game/LightPlayerHomeBase.png") +Glove = playdate.graphics.image.new("images/game/Glove.png") -- luacheck: ignore ---@type pd_image -Hat = playdate.graphics.image.new("images/game/Hat.png") --- luacheck: ignore ----@type pd_image -MenuImage = playdate.graphics.image.new("images/game/MenuImage.png") --- luacheck: ignore ----@type pd_image -Minimap = playdate.graphics.image.new("images/game/Minimap.png") --- luacheck: ignore ----@type pd_image -DarkPlayerHomeBase = playdate.graphics.image.new("images/game/DarkPlayerHomeBase.png") +GloveHoldingBall = playdate.graphics.image.new("images/game/GloveHoldingBall.png") -- luacheck: ignore ---@type pd_image GrassBackground = playdate.graphics.image.new("images/game/GrassBackground.png") @@ -75,10 +42,43 @@ GrassBackground = playdate.graphics.image.new("images/game/GrassBackground.png") GrassBackgroundSmall = playdate.graphics.image.new("images/game/GrassBackgroundSmall.png") -- luacheck: ignore ---@type pd_image -DarkPlayerSmile = playdate.graphics.image.new("images/game/DarkPlayerSmile.png") +Hat = playdate.graphics.image.new("images/game/Hat.png") +-- luacheck: ignore +---@type pd_image +LightPlayerAwayBack = playdate.graphics.image.new("images/game/LightPlayerAwayBack.png") +-- luacheck: ignore +---@type pd_image +LightPlayerAwayBase = playdate.graphics.image.new("images/game/LightPlayerAwayBase.png") +-- luacheck: ignore +---@type pd_image +LightPlayerFrown = playdate.graphics.image.new("images/game/LightPlayerFrown.png") +-- luacheck: ignore +---@type pd_image +LightPlayerHomeBack = playdate.graphics.image.new("images/game/LightPlayerHomeBack.png") +-- luacheck: ignore +---@type pd_image +LightPlayerHomeBase = playdate.graphics.image.new("images/game/LightPlayerHomeBase.png") +-- luacheck: ignore +---@type pd_image +LightPlayerSmile = playdate.graphics.image.new("images/game/LightPlayerSmile.png") +-- luacheck: ignore +---@type pd_image +LightSkinFan = playdate.graphics.image.new("images/game/LightSkinFan.png") +-- luacheck: ignore +---@type pd_image +MenuImage = playdate.graphics.image.new("images/game/MenuImage.png") +-- luacheck: ignore +---@type pd_image +Minimap = playdate.graphics.image.new("images/game/Minimap.png") -- luacheck: ignore ---@type pd_image PerfectPowerBg = playdate.graphics.image.new("images/game/PerfectPowerBg.png") +-- luacheck: ignore +---@type pd_image +PerfectPowerFlickerLeft = playdate.graphics.image.new("images/game/PerfectPowerFlickerLeft.png") +-- luacheck: ignore +---@type pd_image +PerfectPowerFlickerRight = playdate.graphics.image.new("images/game/PerfectPowerFlickerRight.png") -- luacheck: ignore ---@type pd_sampleplayer @@ -92,35 +92,35 @@ BootTune = playdate.sound.sampleplayer.new("music/BootTune.wav") BootTuneOrgany = playdate.sound.sampleplayer.new("music/BootTuneOrgany.wav") -- luacheck: ignore ---@type pd_sampleplayer -TinnyBackground = playdate.sound.sampleplayer.new("music/TinnyBackground.wav") +MenuMusic = playdate.sound.sampleplayer.new("music/MenuMusic.wav") -- luacheck: ignore ---@type pd_sampleplayer -MenuMusic = playdate.sound.sampleplayer.new("music/MenuMusic.wav") +TinnyBackground = playdate.sound.sampleplayer.new("music/TinnyBackground.wav") Logos = { { name = "Base", image = playdate.graphics.image.new("images/game/logos/Base.png") }, +-- luacheck: ignore +---@type pd_image +{ name = "Arrows", image = playdate.graphics.image.new("images/game/logos/Arrows.png") }, -- luacheck: ignore ---@type pd_image { name = "Cats", image = playdate.graphics.image.new("images/game/logos/Cats.png") }, -- luacheck: ignore ---@type pd_image -{ name = "Hearts", image = playdate.graphics.image.new("images/game/logos/Hearts.png") }, --- luacheck: ignore ----@type pd_image { name = "Checkmarks", image = playdate.graphics.image.new("images/game/logos/Checkmarks.png") }, -- luacheck: ignore ---@type pd_image -{ name = "Smiles", image = playdate.graphics.image.new("images/game/logos/Smiles.png") }, --- luacheck: ignore ----@type pd_image { name = "FingerGuns", image = playdate.graphics.image.new("images/game/logos/FingerGuns.png") }, -- luacheck: ignore ---@type pd_image { name = "Frown", image = playdate.graphics.image.new("images/game/logos/Frown.png") }, -- luacheck: ignore ---@type pd_image -{ name = "Arrows", image = playdate.graphics.image.new("images/game/logos/Arrows.png") }, +{ name = "Hearts", image = playdate.graphics.image.new("images/game/logos/Hearts.png") }, +-- luacheck: ignore +---@type pd_image +{ name = "Smiles", image = playdate.graphics.image.new("images/game/logos/Smiles.png") }, -- luacheck: ignore ---@type pd_image { name = "Turds", image = playdate.graphics.image.new("images/game/logos/Turds.png") }, diff --git a/src/assets.lua2p b/src/assets.lua2p index 8f3db59..dd2b3ef 100644 --- a/src/assets.lua2p +++ b/src/assets.lua2p @@ -4,7 +4,7 @@ return varName .. ' = ' .. value end --Open directory look for files, save data in p. By giving '-type f' as parameter, it returns all files. - local p = io.popen('find src/' .. dir .. ' -maxdepth 1 -type f') + local p = io.popen('find src/' .. dir .. ' -maxdepth 1 -type f | sort -h') local assetCode = "" --Loop through all files