|
|
@ -11,99 +11,211 @@ namespace rabi_splitter_WPF |
|
|
|
{ |
|
|
|
{ |
|
|
|
variableExportContext.DefineVariableExports(new ExportableVariable[] { |
|
|
|
variableExportContext.DefineVariableExports(new ExportableVariable[] { |
|
|
|
ExportVariable<int> ( |
|
|
|
ExportVariable<int> ( |
|
|
|
handle: "playtime", |
|
|
|
handle: "deaths", |
|
|
|
displayName: "Playtime", |
|
|
|
displayName: "Deaths", |
|
|
|
tracker: () => snapshot.playtime |
|
|
|
tracker: () => inGameState == null ? 0 : inGameState.nDeaths |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<int> ( |
|
|
|
ExportVariable<int> ( |
|
|
|
handle: "blackness", |
|
|
|
handle: "restarts", |
|
|
|
displayName: "Blackness", |
|
|
|
displayName: "Restarts", |
|
|
|
tracker: () => snapshot.blackness |
|
|
|
tracker: () => inGameState == null ? 0 : inGameState.nRestarts |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<int> ( |
|
|
|
ExportVariable<string> ( |
|
|
|
handle: "mapid", |
|
|
|
handle: "currentBoss", |
|
|
|
displayName: "Map Id", |
|
|
|
displayName: "Current Boss Fight", |
|
|
|
tracker: () => snapshot.mapid |
|
|
|
tracker: () => (inGameState == null || !inGameState.CurrentActivityIs(InGameActivity.BOSS_BATTLE)) ? |
|
|
|
|
|
|
|
"None" : |
|
|
|
|
|
|
|
inGameState.currentBossFight.displayName |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<TimeSpan> ( |
|
|
|
|
|
|
|
handle: "currentBossTime", |
|
|
|
|
|
|
|
displayName: "Current Boss Time", |
|
|
|
|
|
|
|
tracker: () => (inGameState == null || !inGameState.CurrentActivityIs(InGameActivity.BOSS_BATTLE)) ? |
|
|
|
|
|
|
|
TimeSpan.Zero : |
|
|
|
|
|
|
|
(DateTime.Now - inGameState.currentBossStartTime) |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<string> ( |
|
|
|
ExportVariable<string> ( |
|
|
|
handle: "map", |
|
|
|
handle: "lastBoss", |
|
|
|
displayName: "Map", |
|
|
|
displayName: "Last Boss Fight", |
|
|
|
tracker: () => StaticData.GetMapName(snapshot.mapid) |
|
|
|
tracker: () => inGameState?.lastBossFight == null ? "None" : inGameState.lastBossFight.displayName |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<TimeSpan> ( |
|
|
|
|
|
|
|
handle: "lastBossTime", |
|
|
|
|
|
|
|
displayName: "Last Boss Time", |
|
|
|
|
|
|
|
tracker: () => inGameState?.lastBossFight == null ? TimeSpan.Zero : inGameState.lastBossFightDuration |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<int> ( |
|
|
|
ExportVariable<int> ( |
|
|
|
handle: "musicid", |
|
|
|
handle: "musicid", |
|
|
|
displayName: "Music Id", |
|
|
|
displayName: "Music Id", |
|
|
|
tracker: () => snapshot.musicid |
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.musicid |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<string> ( |
|
|
|
ExportVariable<string> ( |
|
|
|
handle: "music", |
|
|
|
handle: "music", |
|
|
|
displayName: "Music", |
|
|
|
displayName: "Music", |
|
|
|
tracker: () => StaticData.GetMusicName(snapshot.musicid) |
|
|
|
tracker: () => snapshot == null ? "" : StaticData.GetMusicName(snapshot.musicid) |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<int> ( |
|
|
|
|
|
|
|
handle: "mapid", |
|
|
|
|
|
|
|
displayName: "Map Id", |
|
|
|
|
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.mapid |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<string> ( |
|
|
|
|
|
|
|
handle: "map", |
|
|
|
|
|
|
|
displayName: "Map", |
|
|
|
|
|
|
|
tracker: () => snapshot == null ? "" : StaticData.GetMapName(snapshot.mapid) |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<string> ( |
|
|
|
|
|
|
|
handle: "mapTile", |
|
|
|
|
|
|
|
displayName: "Map Tile", |
|
|
|
|
|
|
|
tracker: () => snapshot == null ? "" : snapshot.mapTile.ToString() |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<int> ( |
|
|
|
ExportVariable<int> ( |
|
|
|
handle: "hp", |
|
|
|
handle: "hp", |
|
|
|
displayName: "HP", |
|
|
|
displayName: "HP", |
|
|
|
tracker: () => snapshot.hp |
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.hp |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<int> ( |
|
|
|
|
|
|
|
handle: "maxhp", |
|
|
|
|
|
|
|
displayName: "Max HP", |
|
|
|
|
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.maxhp |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<float> ( |
|
|
|
|
|
|
|
handle: "itempercent", |
|
|
|
|
|
|
|
displayName: "Item %", |
|
|
|
|
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.itemPercent |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<int> ( |
|
|
|
|
|
|
|
handle: "hammerXp", |
|
|
|
|
|
|
|
displayName: "Hammer Exp", |
|
|
|
|
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.hammerXp |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<int> ( |
|
|
|
|
|
|
|
handle: "nextHammerExp", |
|
|
|
|
|
|
|
displayName: "Next Hammer Level Exp", |
|
|
|
|
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.nextHammer.Item1 |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<string> ( |
|
|
|
|
|
|
|
handle: "nextHammerName", |
|
|
|
|
|
|
|
displayName: "Next Hammer Level Name (Short)", |
|
|
|
|
|
|
|
tracker: () => snapshot == null ? "" : snapshot.nextHammer.Item2 |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<string> ( |
|
|
|
|
|
|
|
handle: "nextHammerNameLong", |
|
|
|
|
|
|
|
displayName: "Next Hammer Level Name (Long)", |
|
|
|
|
|
|
|
tracker: () => snapshot == null ? "" : snapshot.nextHammer.Item3 |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<int> ( |
|
|
|
|
|
|
|
handle: "ribbonXp", |
|
|
|
|
|
|
|
displayName: "Ribbon Exp", |
|
|
|
|
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.ribbonXp |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<int> ( |
|
|
|
|
|
|
|
handle: "nextRibbonExp", |
|
|
|
|
|
|
|
displayName: "Next Ribbon Level Exp", |
|
|
|
|
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.nextRibbon.Item1 |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<string> ( |
|
|
|
|
|
|
|
handle: "nextRibbonName", |
|
|
|
|
|
|
|
displayName: "Next Ribbon Level Name (Short)", |
|
|
|
|
|
|
|
tracker: () => snapshot == null ? "" : snapshot.nextRibbon.Item2 |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<string> ( |
|
|
|
|
|
|
|
handle: "nextRibbonNameLong", |
|
|
|
|
|
|
|
displayName: "Next Ribbon Level Name (Long)", |
|
|
|
|
|
|
|
tracker: () => snapshot == null ? "" : snapshot.nextRibbon.Item3 |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<int> ( |
|
|
|
|
|
|
|
handle: "carrotXp", |
|
|
|
|
|
|
|
displayName: "Carrot Exp", |
|
|
|
|
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.carrotXp |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<int> ( |
|
|
|
|
|
|
|
handle: "nextCarrotExp", |
|
|
|
|
|
|
|
displayName: "Next Carrot Level Exp", |
|
|
|
|
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.nextCarrot.Item1 |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<string> ( |
|
|
|
|
|
|
|
handle: "nextCarrotName", |
|
|
|
|
|
|
|
displayName: "Next Carrot Level Name (Short)", |
|
|
|
|
|
|
|
tracker: () => snapshot == null ? "" : snapshot.nextCarrot.Item2 |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<string> ( |
|
|
|
|
|
|
|
handle: "nextCarrotNameLong", |
|
|
|
|
|
|
|
displayName: "Next Carrot Level Name (Long)", |
|
|
|
|
|
|
|
tracker: () => snapshot == null ? "" : snapshot.nextCarrot.Item3 |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<float> ( |
|
|
|
ExportVariable<float> ( |
|
|
|
handle: "amulet", |
|
|
|
handle: "amulet", |
|
|
|
displayName: "Amulet", |
|
|
|
displayName: "Amulet", |
|
|
|
tracker: () => snapshot.amulet |
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.amulet |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<int> ( |
|
|
|
ExportVariable<int> ( |
|
|
|
handle: "boost", |
|
|
|
handle: "boost", |
|
|
|
displayName: "Boost", |
|
|
|
displayName: "Boost", |
|
|
|
tracker: () => snapshot.boost |
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.boost |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<float> ( |
|
|
|
ExportVariable<float> ( |
|
|
|
handle: "mana", |
|
|
|
handle: "mana", |
|
|
|
displayName: "MP", |
|
|
|
displayName: "MP", |
|
|
|
tracker: () => snapshot.mana |
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.mana |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<int> ( |
|
|
|
ExportVariable<int> ( |
|
|
|
handle: "stamina", |
|
|
|
handle: "stamina", |
|
|
|
displayName: "SP", |
|
|
|
displayName: "SP", |
|
|
|
tracker: () => snapshot.stamina |
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.stamina |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<float> ( |
|
|
|
ExportVariable<float> ( |
|
|
|
handle: "x", |
|
|
|
handle: "x", |
|
|
|
displayName: "x", |
|
|
|
displayName: "x", |
|
|
|
tracker: () => snapshot.px |
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.px |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<float> ( |
|
|
|
ExportVariable<float> ( |
|
|
|
handle: "y", |
|
|
|
handle: "y", |
|
|
|
displayName: "y", |
|
|
|
displayName: "y", |
|
|
|
tracker: () => snapshot.py |
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.py |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<MapTileCoordinate> ( |
|
|
|
|
|
|
|
handle: "mapTile", |
|
|
|
|
|
|
|
displayName: "Map Tile", |
|
|
|
|
|
|
|
tracker: () => snapshot.mapTile |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<int> ( |
|
|
|
ExportVariable<int> ( |
|
|
|
handle: "deaths", |
|
|
|
handle: "playtime", |
|
|
|
displayName: "Deaths", |
|
|
|
displayName: "Playtime", |
|
|
|
tracker: () => inGameState.nDeaths |
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.playtime |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
ExportVariable<int> ( |
|
|
|
ExportVariable<int> ( |
|
|
|
handle: "restarts", |
|
|
|
handle: "blackness", |
|
|
|
displayName: "Restarts", |
|
|
|
displayName: "Blackness", |
|
|
|
tracker: () => inGameState.nRestarts |
|
|
|
tracker: () => snapshot == null ? 0 : snapshot.blackness |
|
|
|
), |
|
|
|
), |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|