using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace rabi_splitter_WPF { partial class RabiRibiDisplay { void ConfigureVariableExports() { variableExportContext.DefineVariableExports(new ExportableVariable[] { ExportVariable ( handle: "deaths", displayName: "Deaths", tracker: () => inGameState == null ? 0 : inGameState.nDeaths ), ExportVariable ( handle: "restarts", displayName: "Restarts", tracker: () => inGameState == null ? 0 : inGameState.nRestarts ), ExportVariable ( handle: "currentBoss", displayName: "Current Boss Fight", tracker: () => (inGameState == null || !inGameState.CurrentActivityIs(InGameActivity.BOSS_BATTLE)) ? "None" : inGameState.currentBossFight.displayName ), ExportVariable ( handle: "currentBossTime", displayName: "Current Boss Time", tracker: () => (inGameState == null || !inGameState.CurrentActivityIs(InGameActivity.BOSS_BATTLE)) ? TimeSpan.Zero : (DateTime.Now - inGameState.currentBossStartTime) ), ExportVariable ( handle: "lastBoss", displayName: "Last Boss Fight", tracker: () => inGameState?.lastBossFight == null ? "None" : inGameState.lastBossFight.displayName ), ExportVariable ( handle: "lastBossTime", displayName: "Last Boss Time", tracker: () => inGameState?.lastBossFight == null ? TimeSpan.Zero : inGameState.lastBossFightDuration ), ExportVariable ( handle: "musicid", displayName: "Music Id", tracker: () => snapshot == null ? 0 : snapshot.musicid ), ExportVariable ( handle: "music", displayName: "Music", tracker: () => snapshot == null ? "" : StaticData.GetMusicName(snapshot.musicid) ), ExportVariable ( handle: "mapid", displayName: "Map Id", tracker: () => snapshot == null ? 0 : snapshot.mapid ), ExportVariable ( handle: "map", displayName: "Map", tracker: () => snapshot == null ? "" : StaticData.GetMapName(snapshot.mapid) ), ExportVariable ( handle: "mapTile", displayName: "Map Tile", tracker: () => snapshot == null ? "" : snapshot.mapTile.ToString() ), ExportVariable ( handle: "hp", displayName: "HP", tracker: () => snapshot == null ? 0 : snapshot.hp ), ExportVariable ( handle: "maxhp", displayName: "Max HP", tracker: () => snapshot == null ? 0 : snapshot.maxhp ), ExportVariable ( handle: "itempercent", displayName: "Item %", tracker: () => snapshot == null ? 0 : snapshot.itemPercent ), ExportVariable ( handle: "hammerXp", displayName: "Hammer Exp", tracker: () => snapshot == null ? 0 : snapshot.hammerXp ), ExportVariable ( handle: "nextHammerExp", displayName: "Next Hammer Level Exp", tracker: () => snapshot?.nextHammer == null ? 0 : snapshot.nextHammer.Item1 ), ExportVariable ( handle: "nextHammerName", displayName: "Next Hammer Level Name (Short)", tracker: () => snapshot?.nextHammer == null ? "" : snapshot.nextHammer.Item2 ), ExportVariable ( handle: "nextHammerNameLong", displayName: "Next Hammer Level Name (Long)", tracker: () => snapshot?.nextHammer == null ? "" : snapshot.nextHammer.Item3 ), ExportVariable ( handle: "ribbonXp", displayName: "Ribbon Exp", tracker: () => snapshot == null ? 0 : snapshot.ribbonXp ), ExportVariable ( handle: "nextRibbonExp", displayName: "Next Ribbon Level Exp", tracker: () => snapshot?.nextRibbon == null ? 0 : snapshot.nextRibbon.Item1 ), ExportVariable ( handle: "nextRibbonName", displayName: "Next Ribbon Level Name (Short)", tracker: () => snapshot?.nextRibbon == null ? "" : snapshot.nextRibbon.Item2 ), ExportVariable ( handle: "nextRibbonNameLong", displayName: "Next Ribbon Level Name (Long)", tracker: () => snapshot?.nextRibbon == null ? "" : snapshot.nextRibbon.Item3 ), ExportVariable ( handle: "carrotXp", displayName: "Carrot Exp", tracker: () => snapshot == null ? 0 : snapshot.carrotXp ), ExportVariable ( handle: "nextCarrotExp", displayName: "Next Carrot Level Exp", tracker: () => snapshot?.nextCarrot == null ? 0 : snapshot.nextCarrot.Item1 ), ExportVariable ( handle: "nextCarrotName", displayName: "Next Carrot Level Name (Short)", tracker: () => snapshot?.nextCarrot == null ? "" : snapshot.nextCarrot.Item2 ), ExportVariable ( handle: "nextCarrotNameLong", displayName: "Next Carrot Level Name (Long)", tracker: () => snapshot?.nextCarrot == null ? "" : snapshot.nextCarrot.Item3 ), ExportVariable ( handle: "amulet", displayName: "Amulet", tracker: () => snapshot == null ? 0 : snapshot.amulet ), ExportVariable ( handle: "boost", displayName: "Boost", tracker: () => snapshot == null ? 0 : snapshot.boost ), ExportVariable ( handle: "mana", displayName: "MP", tracker: () => snapshot == null ? 0 : snapshot.mana ), ExportVariable ( handle: "stamina", displayName: "SP", tracker: () => snapshot == null ? 0 : snapshot.stamina ), ExportVariable ( handle: "healthups", displayName: "No. of Health Ups", tracker: () => snapshot == null ? 0 : snapshot.nHpUps ), ExportVariable ( handle: "manaups", displayName: "No. of Mana Ups", tracker: () => snapshot == null ? 0 : snapshot.nManaUps ), ExportVariable ( handle: "regenups", displayName: "No. of Regen Ups", tracker: () => snapshot == null ? 0 : snapshot.nRegenUps ), ExportVariable ( handle: "packups", displayName: "No. of Pack Ups", tracker: () => snapshot == null ? 0 : snapshot.nPackUps ), ExportVariable ( handle: "attackups", displayName: "No. of Attack Ups", tracker: () => snapshot == null ? 0 : snapshot.nAttackUps ), ExportVariable ( handle: "x", displayName: "x", tracker: () => snapshot == null ? 0 : snapshot.px ), ExportVariable ( handle: "y", displayName: "y", tracker: () => snapshot == null ? 0 : snapshot.py ), ExportVariable ( handle: "playtime", displayName: "Playtime", tracker: () => snapshot == null ? 0 : snapshot.playtime ), ExportVariable ( handle: "blackness", displayName: "Blackness", tracker: () => snapshot == null ? 0 : snapshot.blackness ), }); } private ExportableVariable ExportVariable(string handle, string displayName, Func tracker) { return new ExportableVariable(handle, displayName, tracker); } } }