Skip to content

Financial additions of new data types and the start of Gangs #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions AboutBox.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion FileModel/Finance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ internal class Finance : Node {
public int BankLoan;
public double BankCreditRating;
public int Ownership;

public double WardensCut;
public double DailyShopRevenue;

public Finance()
: base("Finance") {}
Expand All @@ -34,6 +35,12 @@ public override void ReadKey(string key, string value) {
case "Ownership":
Ownership = Int32.Parse(value);
break;
case "WardensCut":
WardensCut = double.Parse(value);
break;
case "DailyShopRevenue":
DailyShopRevenue = double.Parse(value);
break;
default:
base.ReadKey(key, value);
break;
Expand All @@ -48,6 +55,8 @@ public override void WriteProperties(Writer writer) {
writer.WriteProperty("BankLoan", BankLoan);
writer.WriteProperty("BankCreditRating", BankCreditRating);
writer.WriteProperty("Ownership", Ownership);
writer.WriteProperty("WardensCut", WardensCut);
writer.WriteProperty("DailyShopRevenue", DailyShopRevenue);
}
}
}
42 changes: 42 additions & 0 deletions FileModel/Gangs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using System;

namespace PASaveEditor.FileModel
{
internal class Gang : Node
{
public int gangId;
public String gangRank;
public double recruitment;

public Gang(string label)
: base(label) { }


public override void ReadKey(string key, string value)
{
switch (key)
{
case "Gang.Id":
gangId = Int32.Parse(value);
break;
case "Gang.Rank":
gangRank = value;
break;
case "Gang.Recruitment":
recruitment = Double.Parse(value);
break;
default:
base.ReadKey(key, value);
break;
}
}


public override void WriteProperties(Writer writer)
{
writer.WriteProperty("Prisoner.i", gangId);
writer.WriteProperty("Coverage", gangRank);
writer.WriteProperty("Suspicion", recruitment);
}
}
}
11 changes: 11 additions & 0 deletions FileModel/PrisonerBio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ internal class PrisonerBio : Node {
public int Nitg;
public List<string> Reputations;
public bool ReputationRevealed;
public double Age;
public int BodyType;
public List<string> Traits; // might use this later TODO


public PrisonerBio(string label)
Expand Down Expand Up @@ -41,6 +44,12 @@ public override void ReadKey(string key, string value) {
case "ReputationRevealed":
ReputationRevealed = Boolean.Parse(value);
break;
case "Age":
Age = Double.Parse(value);
break;
case "BodyType":
BodyType = Int32.Parse(value);
break;
default:
base.ReadKey(key, value);
break;
Expand All @@ -60,6 +69,8 @@ public override void WriteProperties(Writer writer) {
}
writer.WriteProperty("ReputationRevealed", ReputationRevealed);
}
writer.WriteProperty("Age", Age);
writer.WriteProperty("BodyType", BodyType);
}
}
}
181 changes: 151 additions & 30 deletions MainForm.Designer.cs

Large diffs are not rendered by default.

Loading