Skip to content

Commit

Permalink
Final multi-CoC push.
Browse files Browse the repository at this point in the history
General changes:
- Save As now shows the correct number of save slots depending on the game (CoC vs. CoC-Revamp-Mod).
- Added missing Bee cock.

CoC-Revamp-Mod changes:
- Added support for beards.
- Added missing body part types.
  • Loading branch information
tmedwards committed Jul 15, 2015
1 parent 27fe02c commit abbad65
Show file tree
Hide file tree
Showing 12 changed files with 103 additions and 27 deletions.
1 change: 1 addition & 0 deletions CoCEd/CoCEd.Data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@
<CockType ID="9" Name="Dragon"/>
<CockType ID="10" Name="C&#x0153;url"/>
<CockType ID="11" Name="Fox"/>
<CockType ID="12" Name="Bee"/>
</CockTypes>
<!-- ========================================================================================================================================== -->
<CockSockTypes>
Expand Down
18 changes: 18 additions & 0 deletions CoCEd/CoCEd.DataRevampMod.xml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,13 @@
<HairColor>rubbery white</HairColor>
</HairColors>
<!-- ========================================================================================================================================== -->
<BeardTypes>
<BeardType ID="0" Name="Normal"/>
<BeardType ID="1" Name="Goatee"/>
<BeardType ID="2" Name="Cleancut"/>
<BeardType ID="3" Name="Mountain-man"/>
</BeardTypes>
<!-- ========================================================================================================================================== -->
<FaceTypes>
<FaceType ID="0" Name="Human"/>
<FaceType ID="1" Name="Horse"/>
Expand All @@ -195,6 +202,8 @@
<FaceType ID="16" Name="Mouse"/>
<FaceType ID="17" Name="Ferret Mask"/>
<FaceType ID="18" Name="Ferret Face"/>
<FaceType ID="19" Name="Pig"/>
<FaceType ID="20" Name="Boar"/>
</FaceTypes>
<!-- ========================================================================================================================================== -->
<TongueTypes>
Expand Down Expand Up @@ -225,6 +234,7 @@
<EarType ID="11" Name="Raccoon"/>
<EarType ID="12" Name="Mouse"/>
<EarType ID="13" Name="Ferret"/>
<EarType ID="14" Name="Pig"/>
</EarTypes>
<!-- ========================================================================================================================================== -->
<HornTypes>
Expand Down Expand Up @@ -266,6 +276,9 @@
<TailType ID="15" Name="Raccoon"/>
<TailType ID="16" Name="Mouse"/>
<TailType ID="17" Name="Ferret"/>
<TailType ID="18" Name="Behemoth"/>
<TailType ID="19" Name="Pig"/>
<TailType ID="20" Name="Scorpion"/>
</TailTypes>
<!-- ========================================================================================================================================== -->
<WingTypes>
Expand Down Expand Up @@ -315,6 +328,7 @@
<LowerBodyType ID="18" Name="Dragon"/>
<LowerBodyType ID="19" Name="Raccoon"/>
<LowerBodyType ID="20" Name="Ferret"/>
<LowerBodyType ID="21" Name="Pig"/>
</LowerBodyTypes>
<!-- ========================================================================================================================================== -->
<PiercingTypes>
Expand Down Expand Up @@ -354,6 +368,9 @@
<CockType ID="9" Name="Dragon"/>
<CockType ID="10" Name="C&#x0153;url"/>
<CockType ID="11" Name="Fox"/>
<CockType ID="12" Name="Bee"/>
<CockType ID="13" Name="Pig"/>
<CockType ID="14" Name="Avian"/>
</CockTypes>
<!-- ========================================================================================================================================== -->
<CockSockTypes>
Expand All @@ -373,6 +390,7 @@
<!-- ========================================================================================================================================== -->
<VaginaTypes>
<VaginaType ID="0" Name="Human"/>
<VaginaType ID="1" Name="Horse"/>
<VaginaType ID="5" Name="Black (Sand Trap)"/>
</VaginaTypes>
<!-- ========================================================================================================================================== -->
Expand Down
4 changes: 2 additions & 2 deletions CoCEd/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@
<TabItem Header="Items">
<view:ItemsPage Background="White"/>
</TabItem>
<TabItem Header="Key items">
<TabItem Header="Key Items">
<view:KeyItemsPage Background="White"/>
</TabItem>
<TabItem Header="Perks">
<view:PerkPage Background="White"/>
</TabItem>
<TabItem Header="Raw data" BorderThickness="0">
<TabItem Header="Raw Data" BorderThickness="0">
<view:RawPage Background="White"/>
</TabItem>
</TabControl>
Expand Down
11 changes: 9 additions & 2 deletions CoCEd/Model/FileManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,17 @@ public static class FileManager
static readonly List<string> _externalPaths = new List<string>();
static readonly List<FlashDirectory> _directories = new List<FlashDirectory>();


const int MaxBackupFiles = 10;

const int MaxSaveSlotsCoC = 9;
const int MaxSaveSlotsRevampMod = 14;
public const int SaveSlotsLowerBound = 1;
public const int SaveSlotsUpperBound = 14;
public const int SaveSlotsUpperBound = MaxSaveSlotsRevampMod; // must use largest value here

public static int SaveSlotsUpperBoundByGame
{
get { return VM.Instance.IsRevampMod ? MaxSaveSlotsRevampMod : MaxSaveSlotsCoC; }
}

public static string PathWithMissingPermissions { get; private set; }

Expand Down
2 changes: 2 additions & 0 deletions CoCEd/Model/XmlData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ public sealed class XmlBodySet
public XmlEnum[] HairTypes { get; set; }
[XmlArray, XmlArrayItem("HairColor")]
public String[] HairColors { get; set; }
[XmlArray, XmlArrayItem("BeardType")]
public XmlEnum[] BeardTypes { get; set; }
[XmlArray, XmlArrayItem("SkinTone")]
public String[] SkinTones { get; set; }
[XmlArray, XmlArrayItem("SkinAdjective")]
Expand Down
32 changes: 20 additions & 12 deletions CoCEd/View/GeneralPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,43 +126,51 @@
<ComboBox Text="{Binding Game.HairColor}" ItemsSource="{Binding Data.Body.HairColors}" Style="{StaticResource EditableTextBox}"/>

<TextBlock Text="Hair type"/>
<common:MyComboBox SelectedValue="{Binding Game.HairType}" ItemsSource="{Binding Data.Body.HairTypes}"/>
<common:MyComboBox SelectedValue="{Binding Game.HairType}" ItemsSource="{Binding Data.Body.HairTypes}"/>
</common:AutoGrid>
<common:AutoGrid IsEnabled="{Binding Game.IsRevampMod}" Visibility="{Binding Game.RevampModVisibility, FallbackValue={x:Static Visibility.Collapsed}}">
<TextBlock Text="Beard length&#x202F;*" ToolTip="Enable with any value greater than 0."/>
<common:MyNumericBox Value="{Binding Game.BeardLength}" Type="Double" Unit="inches"/>

<TextBlock Text="Beard style"/>
<common:MyComboBox SelectedValue="{Binding Game.BeardType}" ItemsSource="{Binding Data.Body.BeardTypes}"/>
</common:AutoGrid>
<common:AutoGrid>
<TextBlock Text="Face"/>
<common:MyComboBox SelectedValue="{Binding Game.FaceType}" ItemsSource="{Binding Data.Body.FaceTypes}"/>
<common:MyComboBox SelectedValue="{Binding Game.FaceType}" ItemsSource="{Binding Data.Body.FaceTypes}"/>

<TextBlock Text="Tongue"/>
<common:MyComboBox SelectedValue="{Binding Game.TongueType}" ItemsSource="{Binding Data.Body.TongueTypes}"/>
<common:MyComboBox SelectedValue="{Binding Game.TongueType}" ItemsSource="{Binding Data.Body.TongueTypes}"/>

<TextBlock Text="Eyes"/>
<common:MyComboBox SelectedValue="{Binding Game.EyeType}" ItemsSource="{Binding Data.Body.EyeTypes}"/>
<common:MyComboBox SelectedValue="{Binding Game.EyeType}" ItemsSource="{Binding Data.Body.EyeTypes}"/>

<TextBlock Text="Ears"/>
<common:MyComboBox SelectedValue="{Binding Game.EarType}" ItemsSource="{Binding Data.Body.EarTypes}"/>
<common:MyComboBox SelectedValue="{Binding Game.EarType}" ItemsSource="{Binding Data.Body.EarTypes}"/>

<TextBlock Text="Antennae"/>
<common:MyComboBox SelectedValue="{Binding Game.AntennaeType}" ItemsSource="{Binding Data.Body.AntennaeTypes}"/>
<common:MyComboBox SelectedValue="{Binding Game.AntennaeType}" ItemsSource="{Binding Data.Body.AntennaeTypes}"/>

<TextBlock Text="Horns"/>
<common:MyComboBox SelectedValue="{Binding Game.HornType}" ItemsSource="{Binding Data.Body.HornTypes}"/>
<common:MyComboBox SelectedValue="{Binding Game.HornType}" ItemsSource="{Binding Data.Body.HornTypes}"/>

<TextBlock Text="{Binding Game.HornsValueLabel}" IsEnabled="{Binding Game.HornsValueEnabled}"/>
<common:MyNumericBox Value="{Binding Game.HornsValue}" Unit="{Binding Game.HornsValueUnit}" IsEnabled="{Binding Game.HornsValueEnabled}"/>

<TextBlock Text="Eyebrow piercing"/>
<common:MyPiercingBox DataContext="{Binding Game.EyebrowPiercing}"/>
<common:MyPiercingBox DataContext="{Binding Game.EyebrowPiercing}"/>

<TextBlock Text="Ears piercing"/>
<common:MyPiercingBox DataContext="{Binding Game.EarsPiercing}"/>
<common:MyPiercingBox DataContext="{Binding Game.EarsPiercing}"/>

<TextBlock Text="Nose piercing"/>
<common:MyPiercingBox DataContext="{Binding Game.NosePiercing}"/>
<common:MyPiercingBox DataContext="{Binding Game.NosePiercing}"/>

<TextBlock Text="Lip piercing"/>
<common:MyPiercingBox DataContext="{Binding Game.LipPiercing}"/>
<common:MyPiercingBox DataContext="{Binding Game.LipPiercing}"/>

<TextBlock Text="Tongue piercing"/>
<common:MyPiercingBox DataContext="{Binding Game.TonguePiercing}"/>
<common:MyPiercingBox DataContext="{Binding Game.TonguePiercing}"/>
</common:AutoGrid>
</StackPanel>
</Grid>
Expand Down
3 changes: 0 additions & 3 deletions CoCEd/View/MiscPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@
<TextBlock Text="Pregnancy&#x202F;*" ToolTip="A &#x25CA; denotes special pregnancies. Do not set these manually."/>
<common:MyComboBox SelectedValue="{Binding Game.PregnancyType}" ItemsSource="{Binding Data.Body.PregnancyTypes}"/>

<TextBlock Text="Pregnancy&#x202F;*" ToolTip="A &#x25CA; denotes special pregnancies. Do not set these manually."/>
<ComboBox ItemsSource="{Binding Data.Body.PregnancyTypes}"/>

<TextBlock Text="Remaining&#x202F;*" IsEnabled="{Binding Game.IsPregnancyEnabled}" ToolTip="A virgin vagina will put pregnancy on hold. With the diapause perk it will only progress when you absorb fluids."/>
<common:MyNumericBox Value="{Binding Game.PregnancyTime}" Unit="hours" IsEnabled="{Binding Game.IsPregnancyEnabled}"/>

Expand Down
2 changes: 1 addition & 1 deletion CoCEd/View/TopBar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
</ToggleButton.ContextMenu>
</ToggleButton>

<ToggleButton x:Name="saveButton" Margin="5,1,0,0" Content="Save as" BorderThickness="0" FontSize="12" Checked="saveButton_StateChanged" Unchecked="saveButton_StateChanged" HorizontalContentAlignment="Left" VerticalAlignment="Top" Background="Transparent" IsEnabled="{Binding HasData}">
<ToggleButton x:Name="saveButton" Margin="5,1,0,0" Content="Save As" BorderThickness="0" FontSize="12" Checked="saveButton_StateChanged" Unchecked="saveButton_StateChanged" HorizontalContentAlignment="Left" VerticalAlignment="Top" Background="Transparent" IsEnabled="{Binding HasData}">
<ToggleButton.ContextMenu>
<ContextMenu x:Name="saveMenu" Closed="saveMenu_Closed" Placement="Bottom" MinWidth="150"/>
</ToggleButton.ContextMenu>
Expand Down
2 changes: 0 additions & 2 deletions CoCEd/View/TopBar.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ public TopBar()
private void checkForUpdates_Click(object sender, RoutedEventArgs e)
{
(new CheckForUpdateBox()).ShowDialog();
//var box = new CheckForUpdateBox();
//box.ShowDialog();
}

void OnSaveRequiredChanged(object sender, bool saveRequired)
Expand Down
4 changes: 2 additions & 2 deletions CoCEd/ViewModel/FilesVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@ public IEnumerable<IMenuItemVM> Children
if (_directory.Kind == DirectoryKind.Backup)
{
foreach (var file in _directory.Files) yield return new FileVM(file, _directory.Kind, false);
yield return new OpenDirectoryItemVM(_directory.Path); // Open directory
yield return new OpenDirectoryItemVM(_directory.Path); // Open directory
yield break;
}

// Path not found?
if (String.IsNullOrEmpty(_directory.Path)) yield break;

// Return either a SaveTargetVM or a FileVM for every slot
for (int i = FileManager.SaveSlotsLowerBound; i <= FileManager.SaveSlotsUpperBound; i++)
for (int i = FileManager.SaveSlotsLowerBound; i <= FileManager.SaveSlotsUpperBoundByGame; i++)
{
var name = "CoC_" + i + ".sol";
var file = _directory.Files.FirstOrDefault(x => x.FilePath.EndsWith(name, StringComparison.InvariantCultureIgnoreCase));
Expand Down
46 changes: 43 additions & 3 deletions CoCEd/ViewModel/GameVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ namespace CoCEd.ViewModel
// TeaseLevel / XP
public sealed partial class GameVM : ObjectVM
{
//public readonly bool IsRevampMod = false;
public bool IsCoC { get { return !IsRevampMod; } }
public bool IsRevampMod { get; private set; }
public Visibility CoCVisibility
{
get { return IsCoC ? Visibility.Visible : Visibility.Collapsed; }
}
public Visibility RevampModVisibility
{
get { return IsRevampMod ? Visibility.Visible : Visibility.Collapsed; }
Expand Down Expand Up @@ -1358,16 +1362,52 @@ public string HungerTip
}
}

public int BeardType
{
get { return GetInt("beardStyle"); }
set
{
if (IsRevampMod)
{
SetValue("beardStyle", value);
}
}
}

public double BeardLength
{
get { return GetDouble("beardLength"); }
set
{
if (IsRevampMod)
{
SetValue("beardLength", value);
}
}
}

public int ExploredGlacialRift
{
get { return GetFlag(2059).AsInt(); }
set { GetFlag(2059).SetValue(value); }
set
{
if (IsRevampMod)
{
GetFlag(2059).SetValue(value);
}
}
}

public int ExploredVolcanicCrag
{
get { return GetFlag(2060).AsInt(); }
set { GetFlag(2060).SetValue(value); }
set
{
if (IsRevampMod)
{
GetFlag(2060).SetValue(value);
}
}
}

#endregion
Expand Down
5 changes: 5 additions & 0 deletions CoCEd/ViewModel/VM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ public bool HasData
get { return _currentFile != null; }
}

public bool IsCoC
{
get { return !IsRevampMod; }
}

public bool IsRevampMod
{
get { return _currentFile != null && _currentFile.Contains("hunger"); }
Expand Down

0 comments on commit abbad65

Please sign in to comment.