#!/bin/bash # DYNR Module: Help & Discovery run_help() { BLUE='\033[38;5;45m'; PURPLE='\033[38;5;127m'; GOLD='\033[38;5;178m'; RED='\033[38;5;196m'; NC='\033[0m' API_URL="https://git.dynastyrevolution.com/api/v1/repos/DYNR/DynastyRevolution-Scripts/contents/modules" clear echo -e "${PURPLE}=================================================${NC}" echo -e "${BLUE} 🐉 DYNASTY REVOLUTION: DISCOVERY 🐉 ${NC}" echo -e "${PURPLE}=================================================${NC}" echo -e "${GOLD}📜 ARCHIVE STATUS (Cloud vs Local):${NC}" # Fetch list from Gitea API REMOTE_LIST=$(curl -s "$API_URL" | grep -Po '"name":.*?[^\\]",' | sed 's/"name": "//;s/",//') if [ -z "$REMOTE_LIST" ]; then echo -e " ${RED}Failed to reach the Vault.${NC}" else for mod in $REMOTE_LIST; do if [ -f "/opt/dynr/modules/$mod" ]; then # Show ↓ for locally installed modules echo -e " ${BLUE}↓ $mod ${NC}(Installed)" else # Show ☁️ for modules only on the server echo -e " ${GOLD}☁️ $mod ${NC}(Remote)" fi done fi echo -e "${PURPLE}-------------------------------------------------${NC}" echo -e "${GOLD}System Commands:${NC}" echo -e " - update : Update Core Engine" echo -e " - refresh : Redownload a module" echo -e " - exit : Close Dynasty" echo -e "${PURPLE}=================================================${NC}" read -p "Press Enter to return to the Dynasty..." < /dev/tty dynr }