using System.Linq;
using Godot;

namespace Hellswipers.Game;

public record struct Gem {
    public readonly Texture2D Texture;
    public readonly string Name;
    public readonly Arrow.Dirs[] Dirs;
    
    public Gem(string Name, string textureName, Arrow.Dirs[] Dirs) {
        this.Name = Name;
        this.Dirs = Dirs;
        Texture = ResourceLoader.Load<Texture2D>($"res://assets/gems/icons/{textureName}.png");
    }

    public static Gem[] LoadGems() => new Gem[] {
        new ("LIFT-850 Jump Pack", "jump_pack", new [] {Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Up,Arrow.Dirs.Down,Arrow.Dirs.Up}),
        new ("B-1 Supply Pack", "supply_pack", new [] {Arrow.Dirs.Down,Arrow.Dirs.Left,Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Up,Arrow.Dirs.Down}),
        new ("AX/LAS-5 \"Guard Dog\" Rover", "guard_dog_rover", new [] {Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Left,Arrow.Dirs.Up,Arrow.Dirs.Right,Arrow.Dirs.Right}),
        new ("SH-20 Ballistic Shield Backpack", "shield_pack", new [] {Arrow.Dirs.Down,Arrow.Dirs.Left,Arrow.Dirs.Down,Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Left}),
        new ("SH-32 Shield Generator Pack", "shield_gen_pack", new [] {Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Left,Arrow.Dirs.Right,Arrow.Dirs.Left,Arrow.Dirs.Right}),
        new ("AX/AR-23 \"Guard Dog\"", "guard_dog", new [] {Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Left,Arrow.Dirs.Up,Arrow.Dirs.Right,Arrow.Dirs.Down}),
        
        new ("MG-43 Machine Gun", "machine_gun", new [] {Arrow.Dirs.Down,Arrow.Dirs.Left,Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Right}),
        new ("APW-1 Anti-Materiel Rifle", "am_rifle", new [] {Arrow.Dirs.Down,Arrow.Dirs.Left,Arrow.Dirs.Right,Arrow.Dirs.Up,Arrow.Dirs.Down}),
        new ("M-105 Stalwart", "stalwart", new [] {Arrow.Dirs.Down,Arrow.Dirs.Left,Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Up,Arrow.Dirs.Left}),
        new ("EAT-17 Expendable Anti-tank", "expendable_at", new [] {Arrow.Dirs.Down,Arrow.Dirs.Down,Arrow.Dirs.Left,Arrow.Dirs.Up,Arrow.Dirs.Right}),
        new ("GR-8 Recoilless Rifle", "recoilless", new [] {Arrow.Dirs.Down,Arrow.Dirs.Left,Arrow.Dirs.Right,Arrow.Dirs.Right,Arrow.Dirs.Left}),
        new ("FLAM-40 Flamethrower", "flamethrower", new [] {Arrow.Dirs.Down,Arrow.Dirs.Left,Arrow.Dirs.Up,Arrow.Dirs.Down,Arrow.Dirs.Up}),
        new ("AC-8 Autocannon", "autocannon", new [] {Arrow.Dirs.Down,Arrow.Dirs.Left,Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Up,Arrow.Dirs.Right}),
        new ("RS-422 Railgun", "railgun", new [] {Arrow.Dirs.Down,Arrow.Dirs.Right,Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Left,Arrow.Dirs.Right}),
        new ("FAF-14 SPEAR Launcher", "spear", new [] {Arrow.Dirs.Down,Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Down,Arrow.Dirs.Down}),
        new ("GL-21 Grenade Launcher", "grenade_launcher", new [] {Arrow.Dirs.Down,Arrow.Dirs.Left,Arrow.Dirs.Up,Arrow.Dirs.Left,Arrow.Dirs.Down}),
        new ("LAS-98 Laser Cannon", "laser_cannon", new [] {Arrow.Dirs.Down,Arrow.Dirs.Left,Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Left}),
        new ("ARC-3 Arc Thrower", "arc_thrower", new [] {Arrow.Dirs.Down,Arrow.Dirs.Right,Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Left,Arrow.Dirs.Left}),
        new ("EXO-45 Patriot Exosuit", "exo_suit", new []{Arrow.Dirs.Left, Arrow.Dirs.Down, Arrow.Dirs.Right, Arrow.Dirs.Up, Arrow.Dirs.Left, Arrow.Dirs.Down, Arrow.Dirs.Down}),
        
        new ("Reinforce", "reinforce", new [] {Arrow.Dirs.Up,Arrow.Dirs.Down,Arrow.Dirs.Right,Arrow.Dirs.Left,Arrow.Dirs.Up}),
        new ("SOS Beacon", "sos_beacon", new [] {Arrow.Dirs.Up,Arrow.Dirs.Down,Arrow.Dirs.Right,Arrow.Dirs.Up}),
        new ("Resupply", "resupply", new [] {Arrow.Dirs.Down,Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Right}),
        new ("NUX-223 Hellbomb", "hellbomb", new [] {Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Left,Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Right,Arrow.Dirs.Down,Arrow.Dirs.Up}),
        new ("SSSD Delivery", "sssd_delivery_upload_data", new [] {Arrow.Dirs.Down,Arrow.Dirs.Down,Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Up}),
        new ("Seismic Probe", "seismic_probe", new [] {Arrow.Dirs.Up,Arrow.Dirs.Up,Arrow.Dirs.Left,Arrow.Dirs.Right,Arrow.Dirs.Down,Arrow.Dirs.Down}),
        new ("Upload Data", "sssd_delivery_upload_data", new [] {Arrow.Dirs.Down,Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Up,Arrow.Dirs.Up}),
        new ("Eagle Rearm", "eagle_rearm", new [] {Arrow.Dirs.Up,Arrow.Dirs.Up,Arrow.Dirs.Left,Arrow.Dirs.Up,Arrow.Dirs.Right}),
        new ("Prospecting Drill", "prospecting_drill", new [] {Arrow.Dirs.Down, Arrow.Dirs.Down, Arrow.Dirs.Left, Arrow.Dirs.Right, Arrow.Dirs.Down, Arrow.Dirs.Down}),
        new ("Super Earth Flag", "raise_flag", new []{Arrow.Dirs.Down, Arrow.Dirs.Up, Arrow.Dirs.Down, Arrow.Dirs.Up}),
        new ("SEAF Artillery", "seaf_artillery", new []{Arrow.Dirs.Right, Arrow.Dirs.Up, Arrow.Dirs.Up, Arrow.Dirs.Down}),
        
        new ("E/MG-101 HMG Emplacement", "hmg_emplacement", new [] {Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Left,Arrow.Dirs.Right,Arrow.Dirs.Right,Arrow.Dirs.Left}),
        new ("FX-12 Shield Generator Relay", "shield_gen_relay", new [] {Arrow.Dirs.Down,Arrow.Dirs.Down,Arrow.Dirs.Left,Arrow.Dirs.Right,Arrow.Dirs.Left,Arrow.Dirs.Right}),
        new ("A/ARC-3 Tesla Tower", "tesla_tower", new [] {Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Right,Arrow.Dirs.Up,Arrow.Dirs.Left,Arrow.Dirs.Right}),
        new ("MD-6 Anti-Personnel Minefield", "ap_mines", new [] {Arrow.Dirs.Down,Arrow.Dirs.Left,Arrow.Dirs.Up,Arrow.Dirs.Right}),
        new ("MD-I4 Incendiary Mines", "incendiary_mines", new [] {Arrow.Dirs.Down,Arrow.Dirs.Left,Arrow.Dirs.Left,Arrow.Dirs.Down}),
        new ("A/MG-43 Machine Gun Sentry", "mg_sentry", new [] {Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Right,Arrow.Dirs.Right,Arrow.Dirs.Up}),
        new ("A/G-16 Gatling Sentry", "gatling_sentry", new [] {Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Right,Arrow.Dirs.Left}),
        new ("A/M-12 Mortar Sentry", "mortar_sentry", new [] {Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Right,Arrow.Dirs.Right,Arrow.Dirs.Down}),
        new ("A/AC-8 Autocannon Sentry", "autocannon_sentry", new [] {Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Right,Arrow.Dirs.Up,Arrow.Dirs.Left,Arrow.Dirs.Up}),
        new ("A/MLS-4X Rocket Sentry", "rocket_sentry", new [] {Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Right,Arrow.Dirs.Right,Arrow.Dirs.Left}),
        new ("A/M-23 EMS Mortar Sentry", "ems_mortar_sentry", new [] {Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Right,Arrow.Dirs.Down,Arrow.Dirs.Right}),
        
        new ("Orbital Gatling Barrage", "orb_gatling", new [] {Arrow.Dirs.Right,Arrow.Dirs.Down,Arrow.Dirs.Left,Arrow.Dirs.Up,Arrow.Dirs.Up}),
        new ("Orbital Airburst Strike", "orb_airburst", new [] {Arrow.Dirs.Right,Arrow.Dirs.Right,Arrow.Dirs.Right}),
        new ("Orbital 120MM HE Barrage", "orb_120", new [] {Arrow.Dirs.Right,Arrow.Dirs.Right,Arrow.Dirs.Down,Arrow.Dirs.Left,Arrow.Dirs.Right,Arrow.Dirs.Down}),
        new ("Orbital 380MM HE Barrage", "orb_380", new [] {Arrow.Dirs.Right,Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Up,Arrow.Dirs.Left,Arrow.Dirs.Down,Arrow.Dirs.Down}),
        new ("Orbital Walking Barrage", "orb_walking", new [] {Arrow.Dirs.Right,Arrow.Dirs.Down,Arrow.Dirs.Right,Arrow.Dirs.Down,Arrow.Dirs.Right,Arrow.Dirs.Down}),
        new ("Orbital Laser", "orb_laser", new [] {Arrow.Dirs.Right,Arrow.Dirs.Down,Arrow.Dirs.Up,Arrow.Dirs.Right,Arrow.Dirs.Down}),
        new ("Orbital Railcannon Strike", "orb_railcannon", new [] {Arrow.Dirs.Right,Arrow.Dirs.Up,Arrow.Dirs.Down,Arrow.Dirs.Down,Arrow.Dirs.Right}),
        new ("Orbital Precision Strike", "orb_strike", new [] {Arrow.Dirs.Right,Arrow.Dirs.Right,Arrow.Dirs.Up}),
        new ("Orbital Gas Strike", "orb_gas", new [] {Arrow.Dirs.Right,Arrow.Dirs.Right,Arrow.Dirs.Down,Arrow.Dirs.Right}),
        new ("Orbital EMS Strike", "orb_ems", new [] {Arrow.Dirs.Right,Arrow.Dirs.Right,Arrow.Dirs.Left,Arrow.Dirs.Down}),
        new ("Orbital Smoke Strike", "orb_smoke", new [] {Arrow.Dirs.Right,Arrow.Dirs.Right,Arrow.Dirs.Down,Arrow.Dirs.Up}),
        
        new ("Eagle Strafing Run", "eagle_strafing", new [] {Arrow.Dirs.Up,Arrow.Dirs.Right,Arrow.Dirs.Right}),
        new ("Eagle Airstrike", "eagle_airstrike", new [] {Arrow.Dirs.Up,Arrow.Dirs.Right,Arrow.Dirs.Down,Arrow.Dirs.Right}),
        new ("Eagle Cluster Bomb", "eagle_cluster", new [] {Arrow.Dirs.Up,Arrow.Dirs.Right,Arrow.Dirs.Down,Arrow.Dirs.Down,Arrow.Dirs.Right}),
        new ("Eagle Napalm Airstrike", "eagle_napalm", new [] {Arrow.Dirs.Up,Arrow.Dirs.Right,Arrow.Dirs.Down,Arrow.Dirs.Up}),
        new ("Eagle Smoke Strike", "eagle_smoke", new [] {Arrow.Dirs.Up,Arrow.Dirs.Right,Arrow.Dirs.Up,Arrow.Dirs.Down}),
        new ("Eagle 110MM Rocket Pods", "eagle_110_rocket", new [] {Arrow.Dirs.Up,Arrow.Dirs.Right,Arrow.Dirs.Up,Arrow.Dirs.Left}),
        new ("Eagle 500kg Bomb", "eagle_500", new [] {Arrow.Dirs.Up,Arrow.Dirs.Right,Arrow.Dirs.Down,Arrow.Dirs.Down,Arrow.Dirs.Down}),
    };
}
