Skip to content

Commit

Permalink
Bugfixes and decided to not implement Retro as a separate mode. Incre…
Browse files Browse the repository at this point in the history
…mented version number for release.
  • Loading branch information
trippsc2 committed Apr 21, 2020
1 parent d24d1aa commit bf03336
Show file tree
Hide file tree
Showing 11 changed files with 281 additions and 380 deletions.
533 changes: 240 additions & 293 deletions OpenTracker.Models/BossSection.cs

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions OpenTracker.Models/Enums/WorldState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
public enum WorldState
{
StandardOpen,
Inverted,
Retro
Inverted
}
}
12 changes: 1 addition & 11 deletions OpenTracker.Models/ItemSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5882,18 +5882,8 @@ public ItemSection(Game game, Location location, int index = 0)
_updateOnDungeonItemShuffleChange = true;

_regionSubscriptions.Add(RegionID.TurtleRockFront, new Mode());
_regionSubscriptions.Add(RegionID.DeathMountainEastTop, new Mode());
_regionSubscriptions.Add(RegionID.DarkDeathMountainTop, new Mode());
_regionSubscriptions.Add(RegionID.TurtleRockBack, new Mode());

_itemSubscriptions.Add(ItemType.Hammer, new Mode());
_itemSubscriptions.Add(ItemType.Sword, new Mode());
_itemSubscriptions.Add(ItemType.Bombos, new Mode());
_itemSubscriptions.Add(ItemType.BombosDungeons, new Mode());
_itemSubscriptions.Add(ItemType.Ether, new Mode());
_itemSubscriptions.Add(ItemType.EtherDungeons, new Mode());
_itemSubscriptions.Add(ItemType.Quake, new Mode());
_itemSubscriptions.Add(ItemType.QuakeDungeons, new Mode());
_itemSubscriptions.Add(ItemType.Mirror, new Mode());
_itemSubscriptions.Add(ItemType.CaneOfSomaria, new Mode());
_itemSubscriptions.Add(ItemType.FireRod, new Mode());
_itemSubscriptions.Add(ItemType.Lamp, new Mode());
Expand Down
19 changes: 3 additions & 16 deletions OpenTracker.Models/Mode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,22 +153,9 @@ public bool Validate(Mode gameMode)
}

if (gameMode.WorldState != null &&
WorldState != null)
{
switch (gameMode.WorldState.Value)
{
case Enums.WorldState.StandardOpen:
if (WorldState.Value != Enums.WorldState.StandardOpen &&
WorldState.Value != Enums.WorldState.Retro)
return false;
break;
case Enums.WorldState.Inverted:
case Enums.WorldState.Retro:
if (WorldState != gameMode.WorldState)
return false;
break;
}
}
WorldState != null &&
WorldState != gameMode.WorldState)
return false;

if (gameMode.EntranceShuffle != null &&
EntranceShuffle != null &&
Expand Down
2 changes: 1 addition & 1 deletion OpenTracker.Models/OpenTracker.Models.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>0.8.1</Version>
<Version>0.8.2</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions OpenTracker.Models/Region.cs
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ public Region(Game game, RegionID iD)
newExcludedRegions.Add(ID);
// Standard, Open, and Retro modes
if (_game.Mode.WorldState != WorldState.StandardOpen)
if (_game.Mode.WorldState != WorldState.Inverted)
{
// Access via Turtle Rock Tunnel by mirror
if (_game.Items.Has(ItemType.TurtleRockTunnelAccess) ||
Expand Down Expand Up @@ -1806,8 +1806,8 @@ public Region(Game game, RegionID iD)
List<RegionID> newExcludedRegions = excludedRegions.GetRange(0, excludedRegions.Count);
newExcludedRegions.Add(ID);
// Standard and Open modes
if (_game.Mode.WorldState != WorldState.Retro)
// Standard, Open, and Retro modes
if (_game.Mode.WorldState != WorldState.Inverted)
{
// Access via Dark Death Mountain top entrance with proper number of crystals
if (_game.Items.Has(ItemType.TowerCrystals) && _game.Items.Has(ItemType.MoonPearl) &&
Expand Down
8 changes: 4 additions & 4 deletions OpenTracker.Setup/OpenTracker.Setup.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -274,15 +274,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:OpenTracker"
"ProductCode" = "8:{7ABF3E44-0DD5-48D4-A792-3BA6BCAB8C91}"
"PackageCode" = "8:{39BBFD34-33C5-432D-95C0-622DDFAC5408}"
"ProductCode" = "8:{DA8300DD-0D3F-47ED-BB1C-2E26D3D6B8EF}"
"PackageCode" = "8:{4979E0A2-6CDA-49D7-BB71-9933E800E906}"
"UpgradeCode" = "8:{C98C2121-B4C5-473A-9B86-5407FEFFE8F1}"
"AspNetVersion" = "8:2.0.50727.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:TRUE"
"ProductVersion" = "8:0.8.1"
"ProductVersion" = "8:0.8.2"
"Manufacturer" = "8:OpenTracker"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
Expand Down Expand Up @@ -824,7 +824,7 @@
{
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_9E6FFC26C1B94A308AE37383659B05F8"
{
"SourcePath" = "8:..\\OpenTracker\\obj\\Release\\netcoreapp3.1\\OpenTracker.exe"
"SourcePath" = "8:..\\OpenTracker\\obj\\Debug\\netcoreapp3.1\\OpenTracker.exe"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_B21EA2C01C014AC99A33B72F50C26B5D"
Expand Down
6 changes: 3 additions & 3 deletions OpenTracker/OpenTracker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
<ApplicationIcon>triforce.ico</ApplicationIcon>
<Win32Resource />
<Version>0.8.1</Version>
<Version>0.8.2</Version>
<Authors>Tripp</Authors>
<AssemblyVersion>0.8.1.0</AssemblyVersion>
<FileVersion>0.8.1.0</FileVersion>
<AssemblyVersion>0.8.2.0</AssemblyVersion>
<FileVersion>0.8.2.0</FileVersion>
<RuntimeIdentifiers>osx-x64;linux-x64;debian-x64;rhel-x64;win-x64;win-x86;win7-x64;win7-x86</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>
Expand Down
3 changes: 0 additions & 3 deletions OpenTracker/ViewModels/MapControlVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ private void UpdateMap()
{
WorldState worldState = WorldState.StandardOpen;

if (_game.Mode.WorldState != WorldState.Retro)
worldState = _game.Mode.WorldState.Value;

ImageSource = "avares://OpenTracker/Assets/Images/Maps/" +
worldState.ToString().ToLower() + "_" +
_iD.ToString().ToLower() + ".png";
Expand Down
31 changes: 8 additions & 23 deletions OpenTracker/ViewModels/ModeSettingsControlVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ public bool DungeonItemShuffleKeysanity
set => this.RaiseAndSetIfChanged(ref _dungeonItemShuffleKeysanity, value);
}

private bool _worldStateStandardOpen;
public bool WorldStateStandardOpen
private bool _worldStateStandardOpenRetro;
public bool WorldStateStandardOpenRetro
{
get => _worldStateStandardOpen;
set => this.RaiseAndSetIfChanged(ref _worldStateStandardOpen, value);
get => _worldStateStandardOpenRetro;
set => this.RaiseAndSetIfChanged(ref _worldStateStandardOpenRetro, value);
}

private bool _worldStateInverted;
Expand All @@ -83,13 +83,6 @@ public bool WorldStateInverted
set => this.RaiseAndSetIfChanged(ref _worldStateInverted, value);
}

private bool _worldStateRetro;
public bool WorldStateRetro
{
get => _worldStateRetro;
set => this.RaiseAndSetIfChanged(ref _worldStateRetro, value);
}

private bool _entranceShuffle;
public bool EntranceShuffle
{
Expand Down Expand Up @@ -132,7 +125,7 @@ public ModeSettingsControlVM(Mode mode, UndoRedoManager undoRedoManager)

_mode.PropertyChanged += OnModeChanged;

ItemPlacementCommand = ReactiveCommand.Create<string>(SetItemPlacement, this.WhenAnyValue(x => x.WorldStateStandardOpen));
ItemPlacementCommand = ReactiveCommand.Create<string>(SetItemPlacement, this.WhenAnyValue(x => x.WorldStateStandardOpenRetro));
DungeonItemShuffleCommand = ReactiveCommand.Create<string>(SetDungeonItemShuffle);
WorldStateCommand = ReactiveCommand.Create<string>(SetWorldState);
EntranceShuffleCommand = ReactiveCommand.Create(ToggleEntranceShuffle);
Expand Down Expand Up @@ -239,24 +232,16 @@ private void UpdateWorldState()
switch (_mode.WorldState)
{
case null:
WorldStateStandardOpen = false;
WorldStateStandardOpenRetro = false;
WorldStateInverted = false;
WorldStateRetro = false;
break;
case WorldState.StandardOpen:
WorldStateStandardOpen = true;
WorldStateStandardOpenRetro = true;
WorldStateInverted = false;
WorldStateRetro = false;
break;
case WorldState.Inverted:
WorldStateStandardOpen = false;
WorldStateStandardOpenRetro = false;
WorldStateInverted = true;
WorldStateRetro = false;
break;
case WorldState.Retro:
WorldStateStandardOpen = false;
WorldStateInverted = false;
WorldStateRetro = true;
break;
}
}
Expand Down
38 changes: 17 additions & 21 deletions OpenTracker/Views/ModeSettingsControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,50 @@
Mode=TwoWay}" StaysOpen="False" PlacementMode="Top" PlacementTarget="{Binding
RelativeSource={RelativeSource AncestorType=Panel}}" HorizontalOffset="8" VerticalOffset="8">
<Border Classes="Popup">
<Grid ColumnDefinitions="*,*,*,*,*,*,*,*,*,*,*,*"
<Grid ColumnDefinitions="*,*,*,*"
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">
<TextBlock Classes="ModeSettingsTitle" Grid.Column="0" Grid.ColumnSpan="12" Grid.Row="0"
<TextBlock Classes="ModeSettingsTitle" Grid.Column="0" Grid.ColumnSpan="4" Grid.Row="0"
Text="Item Placement" />
<RadioButton Classes="ModeSettings" Grid.Column="0" Grid.ColumnSpan="6" Grid.Row="1"
<RadioButton Classes="ModeSettings" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1"
IsChecked="{Binding Path=ItemPlacementBasic, Mode=OneWay}" GroupName="ItemPlacement"
Command="{Binding Path=ItemPlacementCommand}" CommandParameter="Basic">Basic</RadioButton>
<RadioButton Classes="ModeSettings" Grid.Column="6" Grid.ColumnSpan="6" Grid.Row="1"
<RadioButton Classes="ModeSettings" Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="1"
IsChecked="{Binding Path=ItemPlacementAdvanced, Mode=OneWay}"
GroupName="ItemPlacement" Command="{Binding Path=ItemPlacementCommand}"
CommandParameter="Advanced">Advanced</RadioButton>
<TextBlock Classes="ModeSettingsTitle" Grid.Column="0" Grid.ColumnSpan="12" Grid.Row="2"
<TextBlock Classes="ModeSettingsTitle" Grid.Column="0" Grid.ColumnSpan="4" Grid.Row="2"
Text="Dungeon Item Shuffle" />
<RadioButton Classes="ModeSettings" Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="3"
<RadioButton Classes="ModeSettings" Grid.Column="0" Grid.Row="3"
IsChecked="{Binding Path=DungeonItemShuffleStandard, Mode=OneWay}"
GroupName="DungeonItemShuffle" Command="{Binding Path=DungeonItemShuffleCommand}"
CommandParameter="Standard">Standard</RadioButton>
<RadioButton Classes="ModeSettings" Grid.Column="3" Grid.ColumnSpan="3" Grid.Row="3"
<RadioButton Classes="ModeSettings" Grid.Column="1" Grid.Row="3"
IsChecked="{Binding Path=DungeonItemShuffleMapsCompasses, Mode=OneWay}"
GroupName="DungeonItemShuffle" Command="{Binding Path=DungeonItemShuffleCommand}"
CommandParameter="MapsCompasses">Maps/Compasses</RadioButton>
<RadioButton Classes="ModeSettings" Grid.Column="6" Grid.ColumnSpan="3" Grid.Row="3"
<RadioButton Classes="ModeSettings" Grid.Column="2" Grid.Row="3"
IsChecked="{Binding Path=DungeonItemShuffleMapsCompassesSmallKeys, Mode=OneWay}"
GroupName="DungeonItemShuffle" Command="{Binding Path=DungeonItemShuffleCommand}"
CommandParameter="MapsCompassesSmallKeys">Maps/Compasses/Small Keys</RadioButton>
<RadioButton Classes="ModeSettings" Grid.Column="9" Grid.ColumnSpan="3" Grid.Row="3"
<RadioButton Classes="ModeSettings" Grid.Column="3" Grid.Row="3"
IsChecked="{Binding Path=DungeonItemShuffleKeysanity, Mode=OneWay}"
GroupName="DungeonItemShuffle" Command="{Binding Path=DungeonItemShuffleCommand}"
CommandParameter="Keysanity">Keysanity</RadioButton>
<TextBlock Classes="ModeSettingsTitle" Grid.Column="0" Grid.ColumnSpan="12" Grid.Row="4"
<TextBlock Classes="ModeSettingsTitle" Grid.Column="0" Grid.ColumnSpan="4" Grid.Row="4"
Text="World State" />
<RadioButton Classes="ModeSettings" Grid.Column="0" Grid.ColumnSpan="4" Grid.Row="5"
IsChecked="{Binding Path=WorldStateStandardOpen, Mode=OneWay}"
<RadioButton Classes="ModeSettings" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="5"
IsChecked="{Binding Path=WorldStateStandardOpenRetro, Mode=OneWay}"
GroupName="WorldState" Command="{Binding Path=WorldStateCommand}"
CommandParameter="StandardOpen">Standard/Open</RadioButton>
<RadioButton Classes="ModeSettings" Grid.Column="4" Grid.ColumnSpan="4" Grid.Row="5"
CommandParameter="StandardOpen">Standard/Open/Retro</RadioButton>
<RadioButton Classes="ModeSettings" Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="5"
IsChecked="{Binding Path=WorldStateInverted, Mode=OneWay}"
GroupName="WorldState" Command="{Binding Path=WorldStateCommand}"
CommandParameter="Inverted">Inverted</RadioButton>
<RadioButton Classes="ModeSettings" Grid.Column="8" Grid.ColumnSpan="4" Grid.Row="5"
IsChecked="{Binding Path=WorldStateRetro, Mode=OneWay}"
GroupName="WorldState" Command="{Binding Path=WorldStateCommand}"
CommandParameter="Retro">Retro</RadioButton>
<Border Classes="Separator" Grid.Row="6" Grid.ColumnSpan="12" Margin="0,4" />
<CheckBox Classes="ModeSettings" Grid.Column="0" Grid.ColumnSpan="12" Grid.Row="7"
<Border Classes="Separator" Grid.Row="6" Grid.ColumnSpan="4" Margin="0,4" />
<CheckBox Classes="ModeSettings" Grid.Column="0" Grid.ColumnSpan="4" Grid.Row="7"
IsChecked="{Binding Path=EntranceShuffle, Mode=OneWay}"
Command="{Binding Path=EntranceShuffleCommand}">Entrance Shuffle</CheckBox>
<CheckBox Classes="ModeSettings" Grid.Column="0" Grid.ColumnSpan="12" Grid.Row="8"
<CheckBox Classes="ModeSettings" Grid.Column="0" Grid.ColumnSpan="4" Grid.Row="8"
IsChecked="{Binding Path=BossShuffle, Mode=OneWay}"
Command="{Binding Path=BossShuffleCommand}">Boss Shuffle</CheckBox>
<CheckBox Classes="ModeSettings" Grid.Column="0" Grid.ColumnSpan="4" Grid.Row="9"
Expand Down

0 comments on commit bf03336

Please sign in to comment.