aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications/ShiftLetters.cs
diff options
context:
space:
mode:
authorMichael VanOverbeek <[email protected]>2017-02-26 08:37:29 -0500
committerGitHub <[email protected]>2017-02-26 08:37:29 -0500
commitdcae8927d1d6e65c26638a24f99f95f7af467cd3 (patch)
treee670f4d26dbd03f218275550aa12640f729e12b5 /ShiftOS.WinForms/Applications/ShiftLetters.cs
parent3a46014d655a9d36e51fec5a6ddddde9937647e1 (diff)
parente1e0d142dc6a1c1f1b21d7ae2b7d7e699963d268 (diff)
downloadshiftos_thereturn-dcae8927d1d6e65c26638a24f99f95f7af467cd3.tar.gz
shiftos_thereturn-dcae8927d1d6e65c26638a24f99f95f7af467cd3.tar.bz2
shiftos_thereturn-dcae8927d1d6e65c26638a24f99f95f7af467cd3.zip
Merge pull request #96 from lempamo/master
extra shiftletters stuff
Diffstat (limited to 'ShiftOS.WinForms/Applications/ShiftLetters.cs')
-rw-r--r--ShiftOS.WinForms/Applications/ShiftLetters.cs38
1 files changed, 37 insertions, 1 deletions
diff --git a/ShiftOS.WinForms/Applications/ShiftLetters.cs b/ShiftOS.WinForms/Applications/ShiftLetters.cs
index 2578669..aa3bf18 100644
--- a/ShiftOS.WinForms/Applications/ShiftLetters.cs
+++ b/ShiftOS.WinForms/Applications/ShiftLetters.cs
@@ -46,6 +46,11 @@ namespace ShiftOS.WinForms.Applications
string word = "";
static Random rng = new Random();
string guessedCharacters = "";
+ List<String> shiftWordlist = new List<string> { "shiftos", "devx", "artpad", "shifter", "pong",
+ "shiftorium", "codepoints", "shiftletters", "shops", "mud", "notification", "namechanger",
+ "skinning", "skinloader", "calculator", "fileskimmer", "lua", "shiftnet", "terminal", "textpad"};
+ List<String> contributorsWordlist = new List<string> { "philipadams", "carverh", "computelinux", "lempamo",
+ "wowmom", "michaeltheshifter", "arencclc", "therandommelon", "pfg", "craftxbox"};
public ShiftLetters()
{
@@ -56,10 +61,12 @@ namespace ShiftOS.WinForms.Applications
{
guessedCharacters = "";
lives = 7;
+ comboBox1.Visible = false;
tbguess.Visible = true;
lbllives.Visible = true;
lblword.Visible = true;
btnrestart.Visible = false;
+
var wordlist = new List<string>
{
"shiftos",
@@ -83,6 +90,20 @@ namespace ShiftOS.WinForms.Applications
"terminal",
"textpad"
};
+ foreach(var w in shiftWordlist)
+ {
+ if (!wordlist.Contains(w.ToLower())
+ {
+ wordlist.Add(w.ToLower());
+ }
+ }
+ foreach(var w in contributorsWordlist)
+ {
+ if (!wordlist.Contains(w.ToLower())
+ {
+ wordlist.Add(w.ToLower());
+ }
+ }
//This can diversify the amount of ShiftOS-related words in the game.
foreach(var upg in Shiftorium.GetDefaults())
{
@@ -108,7 +129,10 @@ namespace ShiftOS.WinForms.Applications
public void OnLoad()
{
- StartGame();
+ tbguess.Visible = false;
+ comboBox1.Items.Add("ShiftOS");
+ if (ShiftoriumFrontend.UpgradeInstalled("sl_contributors_wordlist")) comboBox1.Items.Add("Contributors");
+ btnrestart.Visible = true;
}
public void OnUpgrade()
@@ -150,6 +174,8 @@ namespace ShiftOS.WinForms.Applications
lives = 0;
lbllives.Visible = true;
btnrestart.Visible = true;
+ btnrestart.Text = "Restart";
+ comboBox1.Visible = true;
int cp = word.Length * oldlives;
lbllives.Text = "You earned: " + cp + " codepoints!";
SaveSystem.TransferCodepointsFrom("shiftletters", cp);
@@ -166,6 +192,8 @@ namespace ShiftOS.WinForms.Applications
tbguess.Visible = false;
lbllives.Visible = false;
btnrestart.Visible = true;
+ btnrestart.Text = "Restart";
+ comboBox1.Visible = true;
}
}
}
@@ -175,5 +203,13 @@ namespace ShiftOS.WinForms.Applications
{
StartGame();
}
+
+ private class NullWordlistException : Exception
+ {
+ public NullWordlistException(string message) : base("ShiftLetters tried to use a Null Wordlist.")
+ {
+
+ }
+ }
}
}