diff options
| author | Michael <[email protected]> | 2017-05-29 20:08:30 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-05-29 20:08:30 -0400 |
| commit | 37ac4c684ce3904c5ec614362ed99bb9867ca0f3 (patch) | |
| tree | 0f2418da210f1f3c315d10f3b197c15f61291f49 /ShiftOS.WinForms/Applications | |
| parent | ff47625d2547deed441a853569f9fe84197e23b6 (diff) | |
| download | shiftos_thereturn-37ac4c684ce3904c5ec614362ed99bb9867ca0f3.tar.gz shiftos_thereturn-37ac4c684ce3904c5ec614362ed99bb9867ca0f3.tar.bz2 shiftos_thereturn-37ac4c684ce3904c5ec614362ed99bb9867ca0f3.zip | |
It's amazing what talking to Rylan can do to an integer datatype.
Diffstat (limited to 'ShiftOS.WinForms/Applications')
| -rw-r--r-- | ShiftOS.WinForms/Applications/Pong.cs | 20 | ||||
| -rw-r--r-- | ShiftOS.WinForms/Applications/ShiftLetters.cs | 2 | ||||
| -rw-r--r-- | ShiftOS.WinForms/Applications/ShiftLotto.cs | 4 | ||||
| -rw-r--r-- | ShiftOS.WinForms/Applications/ShiftSweeper.cs | 8 | ||||
| -rw-r--r-- | ShiftOS.WinForms/Applications/Shifter.cs | 2 | ||||
| -rw-r--r-- | ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs | 4 | ||||
| -rw-r--r-- | ShiftOS.WinForms/Applications/ShopItemCreator.cs | 4 |
7 files changed, 22 insertions, 22 deletions
diff --git a/ShiftOS.WinForms/Applications/Pong.cs b/ShiftOS.WinForms/Applications/Pong.cs index 84177b7..6d81c64 100644 --- a/ShiftOS.WinForms/Applications/Pong.cs +++ b/ShiftOS.WinForms/Applications/Pong.cs @@ -58,10 +58,10 @@ namespace ShiftOS.WinForms.Applications double incrementy = 0.2; int levelxspeed = 3; int levelyspeed = 3; - int beatairewardtotal; - int beataireward = 1; - int[] levelrewards = new int[50]; - int totalreward; + ulong beatairewardtotal; + ulong beataireward = 1; + ulong[] levelrewards = new ulong[50]; + ulong totalreward; int countdown = 3; bool aiShouldIsbeEnabled = true; @@ -297,11 +297,11 @@ namespace ShiftOS.WinForms.Applications lblmissedout.Text = Localization.Parse("{YOU_MISSED_OUT_ON}:") + Environment.NewLine + lblstatscodepoints.Text.Replace(Localization.Parse("{CODEPOINTS}: "), "") + Localization.Parse(" {CODEPOINTS}"); if (ShiftoriumFrontend.UpgradeInstalled("pong_upgrade_2")) { - totalreward = levelrewards[level - 1] + beatairewardtotal; + totalreward = (ulong)(levelrewards[level - 1] + beatairewardtotal); double onePercent = (totalreward / 100); lblbutyougained.Show(); lblbutyougained.Text = Localization.Parse("{BUT_YOU_GAINED}:") + Environment.NewLine + onePercent.ToString("") + (Localization.Parse(" {CODEPOINTS}")); - SaveSystem.TransferCodepointsFrom("pong", (totalreward / 100)); + SaveSystem.TransferCodepointsFrom("pong", (ulong)(totalreward / 100)); } else { @@ -715,10 +715,10 @@ namespace ShiftOS.WinForms.Applications { if (ShiftoriumFrontend.UpgradeInstalled("pong_upgrade")) { - beataireward = level * 10; + beataireward = (ulong)(level * 10); } else { - beataireward = level * 5; + beataireward = (ulong)(level * 5); } } else @@ -726,11 +726,11 @@ namespace ShiftOS.WinForms.Applications if (ShiftoriumFrontend.UpgradeInstalled("pong_upgrade")) { double br = levelrewards[level - 1] / 10; - beataireward = (int)Math.Round(br) * 10; + beataireward = (ulong)Math.Round(br) * 10; } else { double br = levelrewards[level - 1] / 10; - beataireward = (int)Math.Round(br) * 5; + beataireward = (ulong)Math.Round(br) * 5; } } diff --git a/ShiftOS.WinForms/Applications/ShiftLetters.cs b/ShiftOS.WinForms/Applications/ShiftLetters.cs index 42e19f8..0e9f74a 100644 --- a/ShiftOS.WinForms/Applications/ShiftLetters.cs +++ b/ShiftOS.WinForms/Applications/ShiftLetters.cs @@ -217,7 +217,7 @@ namespace ShiftOS.WinForms.Applications if (!lblword.Text.Contains("_")) { int oldlives = lives; - int cp = (word.Length * oldlives) * 2; //drunky michael made this 5x... + ulong cp = (ulong)(word.Length * oldlives) * 2; //drunky michael made this 5x... SaveSystem.TransferCodepointsFrom("shiftletters", cp); StartGame(); } diff --git a/ShiftOS.WinForms/Applications/ShiftLotto.cs b/ShiftOS.WinForms/Applications/ShiftLotto.cs index 5ab8154..3f940c7 100644 --- a/ShiftOS.WinForms/Applications/ShiftLotto.cs +++ b/ShiftOS.WinForms/Applications/ShiftLotto.cs @@ -88,7 +88,7 @@ namespace ShiftOS.WinForms.Applications } else { - if (SaveSystem.CurrentSave.Codepoints - (codePoints * difficulty) <= 0) + if (SaveSystem.CurrentSave.Codepoints - (ulong)(codePoints * difficulty) <= 0) { Infobox.Show("Not enough Codepoints", "You do not have enough Codepoints to gamble this amount!"); } @@ -102,7 +102,7 @@ namespace ShiftOS.WinForms.Applications int winningNumber = rnd.Next(0, difficulty); // Multiply CodePoints * Difficulty - int jackpot = codePoints * difficulty; + ulong jackpot = (ulong)(codePoints * difficulty); // Test the random ints if (guessedNumber == winningNumber) diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.cs index f23ed73..772ec26 100644 --- a/ShiftOS.WinForms/Applications/ShiftSweeper.cs +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.cs @@ -300,12 +300,12 @@ namespace ShiftOS.WinForms.Applications { } public void winGame() { - int cp = 0; - int origminecount = gameBombCount * 10; + ulong cp = 0; + ulong origminecount = (ulong)(gameBombCount * 10); if (minetimer < 31) cp = (origminecount * 3); - else if (minetimer < 61) cp = (Int32)(origminecount * 2.5); + else if (minetimer < 61) cp = (ulong)(origminecount * 2.5); else if (minetimer < 91) cp = (origminecount * 2); - else if (minetimer < 121) cp = (Int32)(origminecount * 1.5); + else if (minetimer < 121) cp = (ulong)(origminecount * 1.5); else if (minetimer > 120) cp = (origminecount * 1); SaveSystem.TransferCodepointsFrom("shiftsweeper", cp); panelGameStatus.Image = Properties.Resources.SweeperWinFace; diff --git a/ShiftOS.WinForms/Applications/Shifter.cs b/ShiftOS.WinForms/Applications/Shifter.cs index 1a59c80..3b3a4f1 100644 --- a/ShiftOS.WinForms/Applications/Shifter.cs +++ b/ShiftOS.WinForms/Applications/Shifter.cs @@ -391,7 +391,7 @@ namespace ShiftOS.WinForms.Applications } - public int CodepointValue = 0; + public uint CodepointValue = 0; public List<ShifterSetting> settings = new List<ShifterSetting>(); public Skin LoadedSkin = null; diff --git a/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs b/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs index 08e6c8f..d6b014d 100644 --- a/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs +++ b/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs @@ -213,9 +213,9 @@ namespace ShiftOS.WinForms.Applications private void btnbuy_Click(object sender, EventArgs e) { - long cpCost = 0; + ulong cpCost = 0; backend.Silent = true; - Dictionary<string, long> UpgradesToBuy = new Dictionary<string, long>(); + Dictionary<string, ulong> UpgradesToBuy = new Dictionary<string, ulong>(); foreach (var itm in lbupgrades.SelectedItems) { cpCost += upgrades[itm.ToString()].Cost; diff --git a/ShiftOS.WinForms/Applications/ShopItemCreator.cs b/ShiftOS.WinForms/Applications/ShopItemCreator.cs index 61e7491..d2836ee 100644 --- a/ShiftOS.WinForms/Applications/ShopItemCreator.cs +++ b/ShiftOS.WinForms/Applications/ShopItemCreator.cs @@ -73,7 +73,7 @@ namespace ShiftOS.WinForms.Applications Infobox.Show("No file chosen.", "Please select a file to sell."); return; } - Item.Cost = Convert.ToInt32(txtcost.Text); + Item.Cost = Convert.ToUInt64(txtcost.Text); Item.Description = txtdescription.Text; Item.Name = txtitemname.Text; Callback?.Invoke(Item); @@ -101,7 +101,7 @@ namespace ShiftOS.WinForms.Applications { try { - Item.Cost = Convert.ToInt32(txtcost.Text); + Item.Cost = Convert.ToUInt64(txtcost.Text); } catch { |
