Add basic Easter Egg splashscreen function

This commit is contained in:
icenine451 2023-02-08 10:44:47 -05:00
parent e11dd263f2
commit 2aa492f5de
2 changed files with 24 additions and 1 deletions

View file

@ -838,8 +838,27 @@ create_lock() {
conf_write
}
easter_eggs() {
today=$(date +"%0m%0d") # Read the current date in a format that can be calculated in ranges
# Set Easter Egg date or ranges here, in mmdd format
if [[ today -eq "0401" ]]; then # An example of a one-day easter egg
echo "Today is April Fools Day!"
# cp -fv /app/share/emulationstation/resources/graphics/splash-aprilfools.svg /app/share/emulationstation/resources/graphics/splash.svg
elif [[ today -ge "1001" && today -le "1031" ]]; then # An example of a multi-day easter egg
echo "Today is in the spooky month!"
# cp -fv /app/share/emulationstation/resources/graphics/splash-spookytime.svg /app/share/emulationstation/resources/graphics/splash.svg
else # Revert to standard splash otherwise
echo "Nothing special happening today"
# cp -fv /app/share/emulationstation/resources/graphics/splash-orig.svg /app/share/emulationstation/resources/graphics/splash.svg
fi
}
start_retrodeck() {
# normal startup
echo "Checking to see if today has a surprise"
easter_eggs
echo "Starting RetroDECK v$version"
emulationstation --home /var/config/emulationstation
}

View file

@ -966,9 +966,13 @@ modules:
# These must be put in home folder, managed by retrodeck.sh
- cp es-configs/es_settings.xml ${FLATPAK_DEST}/retrodeck/es_settings.xml
# Logo, res
# Logo, res, move graphics directory to mutable space so splash can be changed after build
- rm -f /app/share/emulationstation/resources/graphics/splash.svg
- mv -f -t /var/config/emulationstation /app/share/emulationstation/resources/graphics
- ln -s /var/config/emulationstation/graphics /app/share/emulationstation/resources/graphics
- cp -f res/extra-splashes/* /app/share/emulationstation/resources/graphics/
- cp -f res/splash.svg /app/share/emulationstation/resources/graphics/splash.svg
- cp -f res/splash.svg /app/share/emulationstation/resources/graphics/splash-orig.svg
- cp -f res/icon.svg /app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg
# Tools