Skip to content

Commit

Permalink
Added reserve driver to the list of drivers in the teams tab
Browse files Browse the repository at this point in the history
Added player tab back
Started adding driver personality traits
  • Loading branch information
realworld666 committed Jul 24, 2017
1 parent 875b47b commit 97921a3
Show file tree
Hide file tree
Showing 22 changed files with 452 additions and 268 deletions.
Binary file modified .vs/MMSaveEditor/v15/.suo
Binary file not shown.
14 changes: 14 additions & 0 deletions MMSaveEditor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -657,12 +657,18 @@
<Compile Include="View\TabPages\PersonPage_DriverStats.xaml.cs">
<DependentUpon>PersonPage_DriverStats.xaml</DependentUpon>
</Compile>
<Compile Include="View\TabPages\PersonPage_Traits.xaml.cs">
<DependentUpon>PersonPage_Traits.xaml</DependentUpon>
</Compile>
<Compile Include="View\TabPages\PersonPage_TPStats.xaml.cs">
<DependentUpon>PersonPage_TPStats.xaml</DependentUpon>
</Compile>
<Compile Include="View\TabPages\TeamPage.xaml.cs">
<DependentUpon>TeamPage.xaml</DependentUpon>
</Compile>
<Compile Include="View\TabPages\PersonPage_Trait.xaml.cs">
<DependentUpon>PersonPage_Trait.xaml</DependentUpon>
</Compile>
<Compile Include="View\TabPages\TeamPage_CarPart.xaml.cs">
<DependentUpon>TeamPage_CarPart.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -694,6 +700,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="View\TabPages\PersonPage_Traits.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="View\TabPages\PersonPage_TPStats.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand All @@ -702,6 +712,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\TabPages\PersonPage_Trait.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="View\TabPages\TeamPage_CarPart.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down
97 changes: 52 additions & 45 deletions Model/Contract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,62 @@
using FullSerializer;
using System;

[fsObject( MemberSerialization = fsMemberSerialization.OptOut )]
[fsObject(MemberSerialization = fsMemberSerialization.OptOut)]
public class Contract
{
public Contract.Job job = Contract.Job.Unemployed;
public DateTime startDate = new DateTime();
private DateTime mEndDate = new DateTime();
private Contract.ContractStatus mContractStatus = Contract.ContractStatus.OnGoing;
public Action OnOptionClauseEnd;
protected CalendarEvent_v1 mCalendarEvent;
public Contract.Job job = Contract.Job.Unemployed;
public DateTime startDate = new DateTime();
private DateTime mEndDate = new DateTime();
private Contract.ContractStatus mContractStatus = Contract.ContractStatus.OnGoing;
public Action OnOptionClauseEnd;
protected CalendarEvent_v1 mCalendarEvent;

public Contract.ContractStatus contractStatus
{
get
{
return this.mContractStatus;
}
}

public enum ContractStatus
{
InProposalState,
OnGoing,
InOptionClause,
Terminated,
}
public enum ContractStatus
{
InProposalState,
OnGoing,
InOptionClause,
Terminated,
}

public enum Job
{
[LocalisationID( "PSG_10003547" )] Driver,
[LocalisationID( "PSG_10003548" )] Staff,
[LocalisationID( "PSG_10003549" )] Engineer,
[LocalisationID( "PSG_10004602" )] EngineerLead,
[LocalisationID( "PSG_10009360" )] TeamAssistant,
[LocalisationID( "PSG_10003552" )] TeamPrincipal,
[LocalisationID( "PSG_10003553" )] Scout,
[LocalisationID( "PSG_10003554" )] Mechanic,
[LocalisationID( "PSG_10003555" )] Chairman,
[LocalisationID( "PSG_10007918" )] IMAPresident,
[LocalisationID( "PSG_10003556" )] PrivateInvestigator,
[LocalisationID( "PSG_10003557" )] Photographer,
[LocalisationID( "PSG_10003558" )] BookKeeper,
[LocalisationID( "PSG_10003559" )] Barrister,
[LocalisationID( "PSG_10003560" )] Actor,
[LocalisationID( "PSG_10003561" )] SponsorLiasion,
[LocalisationID( "PSG_10003562" )] Journalist,
[LocalisationID( "PSG_10005269" )] Fan,
[LocalisationID( "PSG_10003563" )] Unemployed,
[LocalisationID( "PSG_10003555" )] InvestorChairman,
}
public enum Job
{
[LocalisationID("PSG_10003547")] Driver,
[LocalisationID("PSG_10003548")] Staff,
[LocalisationID("PSG_10003549")] Engineer,
[LocalisationID("PSG_10004602")] EngineerLead,
[LocalisationID("PSG_10009360")] TeamAssistant,
[LocalisationID("PSG_10003552")] TeamPrincipal,
[LocalisationID("PSG_10003553")] Scout,
[LocalisationID("PSG_10003554")] Mechanic,
[LocalisationID("PSG_10003555")] Chairman,
[LocalisationID("PSG_10007918")] IMAPresident,
[LocalisationID("PSG_10003556")] PrivateInvestigator,
[LocalisationID("PSG_10003557")] Photographer,
[LocalisationID("PSG_10003558")] BookKeeper,
[LocalisationID("PSG_10003559")] Barrister,
[LocalisationID("PSG_10003560")] Actor,
[LocalisationID("PSG_10003561")] SponsorLiasion,
[LocalisationID("PSG_10003562")] Journalist,
[LocalisationID("PSG_10005269")] Fan,
[LocalisationID("PSG_10003563")] Unemployed,
[LocalisationID("PSG_10003555")] InvestorChairman,
}

public enum ContractTerminationType
{
Generic,
ContractElapsed,
FiredByPlayer,
HiredBySomeoneElse,
IsRetiring,
}
public enum ContractTerminationType
{
Generic,
ContractElapsed,
FiredByPlayer,
HiredBySomeoneElse,
IsRetiring,
}
}
13 changes: 13 additions & 0 deletions Model/ContractManagerTeam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,17 @@ public class ContractManagerTeam
private Team mTeam;
private Driver mLatestFiredActiveDriver;


public void GetAllDrivers(ref List<Driver> drivers)
{
int count = this.mEmployeeSlots.Count;
for (int index = 0; index < count; ++index)
{
if (this.mEmployeeSlots[index].jobType == Contract.Job.Driver && !this.mEmployeeSlots[index].IsAvailable())
{
Driver personHired = this.mEmployeeSlots[index].personHired as Driver;
drivers.Add(personHired);
}
}
}
}
89 changes: 48 additions & 41 deletions Model/ContractPerson.cs
Original file line number Diff line number Diff line change
@@ -1,51 +1,58 @@
using FullSerializer;
using System;

[fsObject( MemberSerialization = fsMemberSerialization.OptOut )]
[fsObject(MemberSerialization = fsMemberSerialization.OptOut)]
public class ContractPerson : Contract
{
private ContractPerson.Status mCurrentStatus = ContractPerson.Status.Reserve;
private ContractPerson.Status mProposedStatus = ContractPerson.Status.Reserve;
public DateTime optionClauseEndDate = new DateTime();
public string employeerName = string.Empty;
public ContractPerson.BuyoutClauseSplit buyoutSplit = ContractPerson.BuyoutClauseSplit.PersonPaysAll;
public int yearlyWages;
public int signOnFee;
public int qualifyingBonus;
public int qualifyingBonusTargetPosition;
public int raceBonus;
public int raceBonusTargetPosition;
public int championBonus;
public int payDriver;
public int amountForContractorToPay;
public int amountForTargetToPay;
public Entity employeer;
public bool hasSignOnFee;
public bool hasRaceBonus;
public bool hasQualifyingBonus;
public ContractPerson.ContractLength length;
private Person mPerson;
private ContractPerson.Status mCurrentStatus = ContractPerson.Status.Reserve;
private ContractPerson.Status mProposedStatus = ContractPerson.Status.Reserve;
public DateTime optionClauseEndDate = new DateTime();
public string employeerName = string.Empty;
public ContractPerson.BuyoutClauseSplit buyoutSplit = ContractPerson.BuyoutClauseSplit.PersonPaysAll;
public int yearlyWages;
public int signOnFee;
public int qualifyingBonus;
public int qualifyingBonusTargetPosition;
public int raceBonus;
public int raceBonusTargetPosition;
public int championBonus;
public int payDriver;
public int amountForContractorToPay;
public int amountForTargetToPay;
public Entity employeer;
public bool hasSignOnFee;
public bool hasRaceBonus;
public bool hasQualifyingBonus;
public ContractPerson.ContractLength length;
private Person mPerson;

public ContractPerson.Status currentStatus
{
get
{
return this.mCurrentStatus;
}
}

public enum Status
{
[LocalisationID( "PSG_10005057" )] Equal,
[LocalisationID( "PSG_10005068" )] One,
[LocalisationID( "PSG_10005069" )] Two,
[LocalisationID( "PSG_10005070" )] Reserve,
}
public enum Status
{
[LocalisationID("PSG_10005057")] Equal,
[LocalisationID("PSG_10005068")] One,
[LocalisationID("PSG_10005069")] Two,
[LocalisationID("PSG_10005070")] Reserve,
}

public enum ContractLength
{
Short,
Medium,
Long,
}
public enum ContractLength
{
Short,
Medium,
Long,
}

public enum BuyoutClauseSplit
{
[LocalisationID( "PSG_10009283" )] TeamPaysAll,
[LocalisationID( "PSG_10009282" )] EvenSplit,
[LocalisationID( "PSG_10009281" )] PersonPaysAll,
}
public enum BuyoutClauseSplit
{
[LocalisationID("PSG_10009283")] TeamPaysAll,
[LocalisationID("PSG_10009282")] EvenSplit,
[LocalisationID("PSG_10009281")] PersonPaysAll,
}
}
Loading

0 comments on commit 97921a3

Please sign in to comment.