public SystemViewModel(ISaveKh3 save) { this.save = save; Difficulty = new KhEnumListModel <DifficultyType>(() => save.Difficulty, x => save.Difficulty = x); WorldIcon = new KhEnumListModel <WorldType>(() => save.WorldLogo, x => save.WorldLogo = x); Location = new KhEnumListModel <LocationType>(() => save.LocationName, x => save.LocationName = x); CharacterIcon = new KhEnumListModel <CharacterIconType>(() => save.MySaveIcon, x => save.MySaveIcon = x); RoomWorld = new KhEnumListModel <GenericEntryModel <string, string>, WorldType, string>( () => RoomWorldId, x => RoomWorldId = x, x => WorldAttribute.GetWorldId(x)); Maps = Lib3.Presets.Presets.MAPS.Select(x => new MapViewModel(x.Key, x.Value)).ToList(); PlayableCharacters = Lib3.Presets.Presets.PlayablePawns.Select(x => new SpawnModel { Name = x.Value.Name, Value = string.Format(Lib3.Presets.Presets.PlayablePawnPath, x.Key) }) .Concat(Lib3.Presets.Presets.NpcPawns.Select(x => new SpawnModel { Name = x.Value.Name, Value = string.Format(Lib3.Presets.Presets.NpcPawnPath, x.Key) })) .Concat(Lib3.Presets.Presets.EnemyPawns.Select(x => new SpawnModel { Name = x.Value.Name, Value = string.Format(Lib3.Presets.Presets.EnemyPawnPath, x.Key) })) .ToArray(); }
public RoomViewModel(RoomModel room) { World = room.World; Value = (byte)room.RoomIndex; Name = $"{WorldAttribute.GetWorldId(World)}{room.RoomIndex:D02} {room.Description}"; if (room.Edition == GameType.Fm) { Name += " (Final Mix)"; } }
public override string ToString() { var sb = new StringBuilder(); sb.Append($"{WorldAttribute.GetWorldId(World)}_{RoomIndex:D02}"); sb.Append($" | {WorldAttribute.GetInfo(World)}"); if (!string.IsNullOrEmpty(Description)) { sb.Append($" - {Description}"); } return(sb.ToString()); }
public SystemViewModel(SaveKh3 save) { this.save = save; Difficulty = new KhEnumListModel <DifficultyType>(() => save.Difficulty, x => save.Difficulty = x); WorldIcon = new KhEnumListModel <WorldType>(() => save.WorldLogo, x => save.WorldLogo = x); Location = new KhEnumListModel <LocationType>(() => save.LocationName, x => save.LocationName = x); CharacterIcon = new KhEnumListModel <CharacterIconType>(() => save.MySaveIcon, x => save.MySaveIcon = x); RoomWorld = new KhEnumListModel <GenericEntryModel <string, string>, WorldType, string>( () => RoomWorldId, x => RoomWorldId = x, x => WorldAttribute.GetWorldId(x)); DesireChoice = new KhEnumListModel <DesireChoice>(() => save.DesireChoice, x => save.DesireChoice = x); PowerChoice = new KhEnumListModel <PowerChoice>(() => save.PowerChoice, x => save.PowerChoice = x); }