aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/nstypes/maps.go195
-rw-r--r--pkg/nstypes/nstypes.go3
-rw-r--r--pkg/nstypes/playlists.go202
3 files changed, 400 insertions, 0 deletions
diff --git a/pkg/nstypes/maps.go b/pkg/nstypes/maps.go
new file mode 100644
index 0000000..6544263
--- /dev/null
+++ b/pkg/nstypes/maps.go
@@ -0,0 +1,195 @@
+package nstypes
+
+type Map string
+
+const (
+ AngelCity Map = "mp_angel_city"
+ BlackWaterCanal Map = "mp_black_water_canal"
+ Box Map = "mp_box"
+ MapColiseum Map = "mp_coliseum"
+ Pillars Map = "mp_coliseum_column"
+ Colony Map = "mp_colony02"
+ Complex Map = "mp_complex3"
+ CrashSite Map = "mp_crashsite3"
+ Drydock Map = "mp_drydock"
+ Eden Map = "mp_eden"
+ ForwardbaseKodai Map = "mp_forwardbase_kodai"
+ Glitch Map = "mp_glitch"
+ Boomtown Map = "mp_grave"
+ Homestead Map = "mp_homestead"
+ Deck Map = "mp_lf_deck"
+ Meadow Map = "mp_lf_meadow"
+ Stacks Map = "mp_lf_stacks"
+ Township Map = "mp_lf_township"
+ Traffic Map = "mp_lf_traffic"
+ UMA Map = "mp_lf_uma"
+ Lobby Map = "mp_lobby"
+ Relic Map = "mp_relic02"
+ Rise Map = "mp_rise"
+ Exoplanet Map = "mp_thaw"
+ WarGames Map = "mp_wargames"
+ ThePilotsGauntlet Map = "sp_training"
+ BT7274 Map = "sp_crashsite"
+ BloodAndRust Map = "sp_sewers1"
+ IntoTheAbyssPart1 Map = "sp_boomtown_start"
+ IntoTheAbyssPart2A Map = "sp_boomtown"
+ IntoTheAbyssPart2B Map = "sp_boomtown_end"
+ EffectAndCausePart1or3 Map = "sp_hub_timeshift"
+ EffectAndCausePart2 Map = "sp_timeshift_spoke02"
+ TheBeaconPart1or3 Map = "sp_beacon"
+ TheBeaconPart2 Map = "sp_beacon_spoke0"
+ TrialByFire Map = "sp_tday"
+ TheArk Map = "sp_s2s"
+ TheFoldWeapon Map = "sp_skyway_v1"
+)
+
+// Maps gets all known maps.
+func Maps() []Map {
+ return []Map{
+ AngelCity,
+ BlackWaterCanal,
+ Box,
+ MapColiseum,
+ Pillars,
+ Colony,
+ Complex,
+ CrashSite,
+ Drydock,
+ Eden,
+ ForwardbaseKodai,
+ Glitch,
+ Boomtown,
+ Homestead,
+ Deck,
+ Meadow,
+ Stacks,
+ Township,
+ Traffic,
+ UMA,
+ Lobby,
+ Relic,
+ Rise,
+ Exoplanet,
+ WarGames,
+ ThePilotsGauntlet,
+ BT7274,
+ BloodAndRust,
+ IntoTheAbyssPart1,
+ IntoTheAbyssPart2A,
+ IntoTheAbyssPart2B,
+ EffectAndCausePart1or3,
+ EffectAndCausePart2,
+ TheBeaconPart1or3,
+ TheBeaconPart2,
+ TrialByFire,
+ TheArk,
+ TheFoldWeapon,
+ }
+}
+
+// GoString gets the map in Go syntax.
+func (m Map) GoString() string {
+ return "Map(" + string(m) + ")"
+}
+
+// SourceString gets the raw map name.
+func (m Map) SourceString() string {
+ return string(m)
+}
+
+// Known checks if the map is a known Northstar map.
+func (m Map) Known() bool {
+ _, ok := m.Title()
+ return ok
+}
+
+// String returns the title or raw map name.
+func (m Map) String() string {
+ if t, ok := m.Title(); ok {
+ return t
+ }
+ return m.SourceString()
+}
+
+// Title returns the title of known Northstar maps.
+func (m Map) Title() (string, bool) {
+ switch m {
+ case "mp_angel_city":
+ return "Angel City", true
+ case "mp_black_water_canal":
+ return "Black Water Canal", true
+ case "mp_box":
+ return "Box", true
+ case "mp_coliseum":
+ return "Coliseum", true
+ case "mp_coliseum_column":
+ return "Pillars", true
+ case "mp_colony02":
+ return "Colony", true
+ case "mp_complex3":
+ return "Complex", true
+ case "mp_crashsite3":
+ return "Crash Site", true
+ case "mp_drydock":
+ return "Drydock", true
+ case "mp_eden":
+ return "Eden", true
+ case "mp_forwardbase_kodai":
+ return "Forwardbase Kodai", true
+ case "mp_glitch":
+ return "Glitch", true
+ case "mp_grave":
+ return "Boomtown", true
+ case "mp_homestead":
+ return "Homestead", true
+ case "mp_lf_deck":
+ return "Deck", true
+ case "mp_lf_meadow":
+ return "Meadow", true
+ case "mp_lf_stacks":
+ return "Stacks", true
+ case "mp_lf_township":
+ return "Township", true
+ case "mp_lf_traffic":
+ return "Traffic", true
+ case "mp_lf_uma":
+ return "UMA", true
+ case "mp_lobby":
+ return "Lobby", true
+ case "mp_relic02":
+ return "Relic", true
+ case "mp_rise":
+ return "Rise", true
+ case "mp_thaw":
+ return "Exoplanet", true
+ case "mp_wargames":
+ return "War Games", true
+ case "sp_training":
+ return "The Pilot's Gauntlet", true
+ case "sp_crashsite":
+ return "BT-7274", true
+ case "sp_sewers1":
+ return "Blood and Rust", true
+ case "sp_boomtown_start":
+ return "Into the Abyss - Part 1", true
+ case "sp_boomtown":
+ return "Into the Abyss - Part 2", true
+ case "sp_boomtown_end":
+ return "Into the Abyss - Part 2", true
+ case "sp_hub_timeshift":
+ return "Effect and Cause - Part 1 or 3", true
+ case "sp_timeshift_spoke02":
+ return "Effect and Cause - Part 2", true
+ case "sp_beacon":
+ return "The Beacon - Part 1 or 3", true
+ case "sp_beacon_spoke0":
+ return "The Beacon - Part 2", true
+ case "sp_tday":
+ return "Trial by Fire", true
+ case "sp_s2s":
+ return "The Ark", true
+ case "sp_skyway_v1":
+ return "The Fold Weapon", true
+ }
+ return "", false
+}
diff --git a/pkg/nstypes/nstypes.go b/pkg/nstypes/nstypes.go
new file mode 100644
index 0000000..746dcd0
--- /dev/null
+++ b/pkg/nstypes/nstypes.go
@@ -0,0 +1,3 @@
+// Package nstypes contains mappings of known playlist and map types for
+// Northstar.
+package nstypes
diff --git a/pkg/nstypes/playlists.go b/pkg/nstypes/playlists.go
new file mode 100644
index 0000000..69bacd1
--- /dev/null
+++ b/pkg/nstypes/playlists.go
@@ -0,0 +1,202 @@
+package nstypes
+
+type Playlist string
+
+const (
+ // vanilla
+ PrivateMatch Playlist = "private_match"
+ Attrition Playlist = "aitdm"
+ BountyHunt Playlist = "at"
+ Coliseum Playlist = "coliseum"
+ AmpedHardpoint Playlist = "cp"
+ CaptureTheFlag Playlist = "ctf"
+ FrontierDefenseEasy Playlist = "fd_easy"
+ FrontierDefenseHard Playlist = "fd_hard"
+ FrontierDefenseInsane Playlist = "fd_insane"
+ FrontierDefenseMaster Playlist = "fd_master"
+ FrontierDefenseRegular Playlist = "fd_normal"
+ LastTitanStanding Playlist = "lts"
+ MarkedForDeath Playlist = "mfd"
+ PilotsVsPilots Playlist = "ps"
+ Campaign Playlist = "solo"
+ Skirmish Playlist = "tdm"
+ TitanBrawl Playlist = "ttdm"
+ LiveFire Playlist = "lf" // mp_gamemode speedball
+
+ // vanilla featured
+ AegisLastTitanStanding Playlist = "alts"
+ AegisTitanBrawl Playlist = "attdm"
+ FreeForAll Playlist = "ffa"
+ FreeAgents Playlist = "fra"
+ TheGreatBamboozle Playlist = "holopilot_lf"
+ RocketArena Playlist = "rocket_lf"
+ TurboLastTitanStanding Playlist = "turbo_lts"
+ TurboTitanBrawl Playlist = "turbo_ttdm"
+
+ // Northstar.Custom
+ OneInTheChamber Playlist = "chamber"
+ CompetitiveCTF Playlist = "ctf_comp"
+ Fastball Playlist = "fastball"
+ GunGame Playlist = "gg"
+ TheHidden Playlist = "hidden"
+ HideAndSeek Playlist = "hs"
+ Infection Playlist = "inf"
+ AmpedKillrace Playlist = "kr"
+ SticksAndStones Playlist = "sns"
+ TitanFFA Playlist = "tffa"
+ TitanTag Playlist = "tt"
+
+ // Northstar.Coop
+ SingleplayerCoop Playlist = "sp_coop"
+)
+
+// Playalists gets all known playlists.
+func Playlists() []Playlist {
+ return []Playlist{
+ PrivateMatch,
+ Attrition,
+ BountyHunt,
+ Coliseum,
+ AmpedHardpoint,
+ CaptureTheFlag,
+ FrontierDefenseEasy,
+ FrontierDefenseHard,
+ FrontierDefenseInsane,
+ FrontierDefenseMaster,
+ FrontierDefenseRegular,
+ LastTitanStanding,
+ MarkedForDeath,
+ PilotsVsPilots,
+ Campaign,
+ Skirmish,
+ TitanBrawl,
+ LiveFire,
+ AegisLastTitanStanding,
+ AegisTitanBrawl,
+ FreeForAll,
+ FreeAgents,
+ TheGreatBamboozle,
+ RocketArena,
+ TurboLastTitanStanding,
+ TurboTitanBrawl,
+ OneInTheChamber,
+ CompetitiveCTF,
+ Fastball,
+ GunGame,
+ TheHidden,
+ HideAndSeek,
+ Infection,
+ AmpedKillrace,
+ SticksAndStones,
+ TitanFFA,
+ TitanTag,
+ SingleplayerCoop,
+ }
+}
+
+// GoString gets the map in Go syntax.
+func (p Playlist) GoString() string {
+ return "Playlist(" + string(p) + ")"
+}
+
+// SourceString gets the raw playlist name.
+func (p Playlist) SourceString() string {
+ return string(p)
+}
+
+// Known checks if the playlist is a known Northstar playlist.
+func (p Playlist) Known() bool {
+ _, ok := p.Title()
+ return ok
+}
+
+// String returns the title or raw playlist name.
+func (p Playlist) String() string {
+ if t, ok := p.Title(); ok {
+ return t
+ }
+ return p.SourceString()
+}
+
+// Title returns the title of known Northstar playlists.
+func (p Playlist) Title() (string, bool) {
+ switch p {
+ case "private_match":
+ return "Private Match", true
+ case "aitdm":
+ return "Attrition", true
+ case "at":
+ return "Bounty Hunt", true
+ case "coliseum":
+ return "Coliseum", true
+ case "cp":
+ return "Amped Hardpoint", true
+ case "ctf":
+ return "Capture the Flag", true
+ case "fd_easy":
+ return "Frontier Defense (Easy)", true
+ case "fd_hard":
+ return "Frontier Defense (Hard)", true
+ case "fd_insane":
+ return "Frontier Defense (Insane)", true
+ case "fd_master":
+ return "Frontier Defense (Master)", true
+ case "fd_normal":
+ return "Frontier Defense (Regular)", true
+ case "lts":
+ return "Last Titan Standing", true
+ case "mfd":
+ return "Marked For Death", true
+ case "ps":
+ return "Pilots vs. Pilots", true
+ case "solo":
+ return "Campaign", true
+ case "tdm":
+ return "Skirmish", true
+ case "ttdm":
+ return "Titan Brawl", true
+ case "lf":
+ return "Live Fire", true
+ case "alts":
+ return "Aegis Last Titan Standing", true
+ case "attdm":
+ return "Aegis Titan Brawl", true
+ case "ffa":
+ return "Free For All", true
+ case "fra":
+ return "Free Agents", true
+ case "holopilot_lf":
+ return "The Great Bamboozle", true
+ case "rocket_lf":
+ return "Rocket Arena", true
+ case "turbo_lts":
+ return "Turbo Last Titan Standing", true
+ case "turbo_ttdm":
+ return "Turbo Titan Brawl", true
+ case "chamber":
+ return "One in the Chamber", true
+ case "ctf_comp":
+ return "Competitive CTF", true
+ case "fastball":
+ return "Fastball", true
+ case "gg":
+ return "Gun Game", true
+ case "hidden":
+ return "The Hidden", true
+ case "hs":
+ return "Hide and Seek", true
+ case "inf":
+ return "Infection", true
+ case "kr":
+ return "Amped Killrace", true
+ case "sns":
+ return "Sticks and Stones", true
+ case "tffa":
+ return "Titan FFA", true
+ case "tt":
+ return "Titan Tag", true
+ case "sp_coop":
+ return "Singleplayer Coop", true
+ }
+ return "", false
+}