diff --git a/OpenFK/Form1.cs b/OpenFK/Form1.cs index 13676ca..a526a29 100644 --- a/OpenFK/Form1.cs +++ b/OpenFK/Form1.cs @@ -38,6 +38,7 @@ namespace OpenFK public string Host2; //Host2 public string Store; //FilestoreV2 (For updates) public string TStore; //Trunk + public string bittyData; public bool DebugMB; public bool DebugOnline; public DiscordRpcClient client; @@ -83,6 +84,12 @@ namespace OpenFK Debug.WriteLine("Main.swf is Loaded"); AS2Container.FSCommand += new _IShockwaveFlashEvents_FSCommandEventHandler(flashPlayer_FSCommand); //This sets up the FSCommand handler, which CCommunicator likes to use a lot. + //BityByte + if (Settings.Default.customF == true) //If using no USB + { + setVar(@""); + } + AS3Container.Quality = Settings.Default.Quality; AS3Container.ScaleMode = Settings.Default.ScaleMode; AS3Container.Movie = Directory.GetCurrentDirectory() + @"\MainAS3.swf"; //Sets MainAS3.swf as the Flash Movie to Play. @@ -142,7 +149,7 @@ namespace OpenFK { try //Runs a loop to keep reading until the file is not being saved. { - setVar(@""); + setBitty(File.ReadAllText(Directory.GetCurrentDirectory() + @"\customF.txt").Remove(0, 14)); } catch { @@ -185,15 +192,6 @@ namespace OpenFK } - //BityByte - if (Settings.Default.customF == true) //If using no USB - { - if (e.args.Contains("trunk_main")) - { - setVar(@""); - } - } - //Rich Prescense if (Settings.Default.RPC == true) { @@ -445,11 +443,20 @@ namespace OpenFK { Encoding iso_8859_1 = Encoding.GetEncoding("iso-8859-1"); string index = ""; + string filedata = ""; if (Settings.Default.RDF == true) { byte[] RDFData = File.ReadAllBytes(Directory.GetCurrentDirectory() + @"\data\" + folder + @"\" + file + ".rdf"); - index = @"" + RDFTool.decode(iso_8859_1.GetString(RDFData)) + @""; //Puts RDF file to string - }else index = @"" + File.ReadAllText(Directory.GetCurrentDirectory() + @"\data\" + folder + @"\" + file + ".xml") + @""; //Puts XML file to string + filedata = RDFTool.decode(iso_8859_1.GetString(RDFData)); + } + else filedata = File.ReadAllText(Directory.GetCurrentDirectory() + @"\data\" + folder + @"\" + file + ".xml"); //Puts XML file to string + index = @"" + filedata + @""; + + if(file == "funkeys") + { + bittyData = filedata; + } + setVar(index.ToString()); //Sends XML data to the game Debug.WriteLine("RDF - Sent " + file); //Debug Output } @@ -493,6 +500,20 @@ namespace OpenFK //END OF RICH PRESENCE // + // + //SET BITTY + // + + void setBitty(string bittyID) + { + setVar(@""); + //TODO - Add rich presence + } + + // + //END OF SET BITTY + // + // //POST REQUESTS //