always only allow 3 stars to be bought

This commit is contained in:
Ellpeck 2020-06-25 13:02:53 +02:00
parent bf7f7d3ee2
commit 28550a8edf
4 changed files with 4 additions and 8 deletions

View file

@ -7,7 +7,7 @@
"ReallyEarnStar": "Wenn du jetzt deine <i ticket> eintauschst, erhältst du {0}<i star>. Alle platzierten Attraktionen und deine <i ticket> werden gelöscht. Bist du sicher?", "ReallyEarnStar": "Wenn du jetzt deine <i ticket> eintauschst, erhältst du {0}<i star>. Alle platzierten Attraktionen und deine <i ticket> werden gelöscht. Bist du sicher?",
"Yes": "Ja", "Yes": "Ja",
"Okay": "Okay", "Okay": "Okay",
"RequiresTickets": "{0}<i ticket> für 1<i star>. Höchstens {1}.", "RequiresTickets": "{0}<i ticket> für 1<i star>. Höchstens 3.",
"AppliedUpgrades": "Aktives Upgrade", "AppliedUpgrades": "Aktives Upgrade",
"Options": "Optionen", "Options": "Optionen",
"RainingTicketLimit": "Max. Fallende Tickets", "RainingTicketLimit": "Max. Fallende Tickets",

View file

@ -7,7 +7,7 @@
"ReallyEarnStar": "Cashing in your <i ticket> now would earn you {0}<i star>. It will also remove all placed attractions and reset your <i ticket>. Are you sure?", "ReallyEarnStar": "Cashing in your <i ticket> now would earn you {0}<i star>. It will also remove all placed attractions and reset your <i ticket>. Are you sure?",
"Yes": "Yes", "Yes": "Yes",
"Okay": "Okay", "Okay": "Okay",
"RequiresTickets": "{0}<i ticket> for 1<i star>. Maximum {1}.", "RequiresTickets": "{0}<i ticket> for 1<i star>. Maximum 3.",
"AppliedUpgrades": "Active Upgrades", "AppliedUpgrades": "Active Upgrades",
"Options": "Options", "Options": "Options",
"RainingTicketLimit": "Max Raining Tickets", "RainingTicketLimit": "Max Raining Tickets",

View file

@ -108,12 +108,8 @@ namespace TouchyTickets {
return 1000000000 * BigInteger.Pow(10, this.TimesRestarted); return 1000000000 * BigInteger.Pow(10, this.TimesRestarted);
} }
public int GetMaxStars() {
return 3 * (this.TimesRestarted + 1);
}
public int GetBuyableStars() { public int GetBuyableStars() {
return Math.Min(this.GetMaxStars(), (int) (this.Tickets / this.GetStarPrice())); return Math.Min(3, (int) (this.Tickets / this.GetStarPrice()));
} }
} }

View file

@ -339,7 +339,7 @@ namespace TouchyTickets {
this.uiSystem.Add("ReallyEarnStarBox", infoBox); this.uiSystem.Add("ReallyEarnStarBox", infoBox);
} }
}); });
upgradeHeader.AddChild(new Paragraph(Anchor.AutoCenter, 1, p => string.Format(Localization.Get("RequiresTickets"), PrettyPrintNumber(GameImpl.Instance.GetStarPrice()), GameImpl.Instance.GetMaxStars()), true) { upgradeHeader.AddChild(new Paragraph(Anchor.AutoCenter, 1, p => string.Format(Localization.Get("RequiresTickets"), PrettyPrintNumber(GameImpl.Instance.GetStarPrice())), true) {
PositionOffset = new Vector2(0, 2) PositionOffset = new Vector2(0, 2)
}); });
var upgradeList = upgradeUi.AddChild(new Panel(Anchor.AutoLeft, new Vector2(1), Vector2.Zero, false, true, new Point(10, 30), false) { var upgradeList = upgradeUi.AddChild(new Panel(Anchor.AutoLeft, new Vector2(1), Vector2.Zero, false, true, new Point(10, 30), false) {