diff --git a/ProjectSWGScriptEditor.sln b/ProjectSWGScriptEditor.sln new file mode 100644 index 0000000..a5e835b --- /dev/null +++ b/ProjectSWGScriptEditor.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectSWGScriptEditor", "ProjectSWGScriptEditor\ProjectSWGScriptEditor.csproj", "{BDF562E6-942A-4E0B-BD6F-6FABC0465DC2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BDF562E6-942A-4E0B-BD6F-6FABC0465DC2}.Debug|x86.ActiveCfg = Debug|x86 + {BDF562E6-942A-4E0B-BD6F-6FABC0465DC2}.Debug|x86.Build.0 = Debug|x86 + {BDF562E6-942A-4E0B-BD6F-6FABC0465DC2}.Release|x86.ActiveCfg = Release|x86 + {BDF562E6-942A-4E0B-BD6F-6FABC0465DC2}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/ProjectSWGScriptEditor.suo b/ProjectSWGScriptEditor.suo new file mode 100644 index 0000000..dfba2f1 Binary files /dev/null and b/ProjectSWGScriptEditor.suo differ diff --git a/ProjectSWGScriptEditor/Assets/add.png b/ProjectSWGScriptEditor/Assets/add.png new file mode 100644 index 0000000..6332fef Binary files /dev/null and b/ProjectSWGScriptEditor/Assets/add.png differ diff --git a/ProjectSWGScriptEditor/Assets/delete.png b/ProjectSWGScriptEditor/Assets/delete.png new file mode 100644 index 0000000..08f2493 Binary files /dev/null and b/ProjectSWGScriptEditor/Assets/delete.png differ diff --git a/ProjectSWGScriptEditor/Config.cs b/ProjectSWGScriptEditor/Config.cs new file mode 100644 index 0000000..5ec89eb --- /dev/null +++ b/ProjectSWGScriptEditor/Config.cs @@ -0,0 +1,75 @@ +using System; +using System.IO; +using System.Collections.Generic; + +namespace ProjectSWGScriptEditor +{ + public class Config + { + static public String returnValue(string key) + { + var config = File.OpenText("./pswgse.cfg"); + while (config.BaseStream.CanSeek) + { + String[] entry = config.ReadLine().Split('='); + if (entry[0].Equals(key)) + { + config.Close(); + return entry[1].ToString(); + } + } + config.Close(); + return null; + } + + static public Boolean containsKey(string key) + { + var config = File.OpenText("./pswgse.cfg"); + while (config.BaseStream.CanSeek) + { + string line = config.ReadLine(); + if (line == null) + { + config.Close(); + return false; + } + + String[] entry = line.Split('='); + + if (entry[0].Equals(key)) + { + config.Close(); + return true; + } + } + config.Close(); + return false; + } + + static public void setValue(string key, object value) + { + var config = File.OpenText("./pswgse.cfg"); + SortedList entries = new SortedList(); + + while (config.Peek() >= 0) + { + string temp = config.ReadLine(); + + if (temp != null) + { + string[] entry = temp.Split('='); + entries.Add(entry[0], entry[1]); + } + } + config.Close(); + + if (!entries.ContainsKey(key)) entries.Add(key, value.ToString()); + else entries[key] = value.ToString(); + + List listToSave = new List(); + for (int i = 0; i < entries.Count; i++) listToSave.Add(entries.Keys[i] + "=" + entries.Values[i]); + + File.WriteAllLines("./pswgse.cfg", listToSave); + } + } +} diff --git a/ProjectSWGScriptEditor/Editors/BonusSetEditor.Designer.cs b/ProjectSWGScriptEditor/Editors/BonusSetEditor.Designer.cs new file mode 100644 index 0000000..5706622 --- /dev/null +++ b/ProjectSWGScriptEditor/Editors/BonusSetEditor.Designer.cs @@ -0,0 +1,114 @@ +namespace ProjectSWGScriptEditor.Editors +{ + partial class BonusSetEditor + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.scriptPathLbl = new System.Windows.Forms.Label(); + this.scriptTreeView = new System.Windows.Forms.TreeView(); + this.objectTemplateTb = new System.Windows.Forms.TextBox(); + this.addRequiredItemBtn = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // scriptPathLbl + // + this.scriptPathLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.scriptPathLbl.AutoSize = true; + this.scriptPathLbl.Location = new System.Drawing.Point(12, 271); + this.scriptPathLbl.Name = "scriptPathLbl"; + this.scriptPathLbl.Size = new System.Drawing.Size(59, 13); + this.scriptPathLbl.TabIndex = 0; + this.scriptPathLbl.Text = "Script Path"; + // + // scriptTreeView + // + this.scriptTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.scriptTreeView.Location = new System.Drawing.Point(12, 12); + this.scriptTreeView.Name = "scriptTreeView"; + this.scriptTreeView.Size = new System.Drawing.Size(372, 256); + this.scriptTreeView.TabIndex = 1; + // + // objectTemplateTb + // + this.objectTemplateTb.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.objectTemplateTb.Location = new System.Drawing.Point(390, 12); + this.objectTemplateTb.Name = "objectTemplateTb"; + this.objectTemplateTb.Size = new System.Drawing.Size(232, 20); + this.objectTemplateTb.TabIndex = 4; + this.objectTemplateTb.Text = "Object STF Name or Object Template"; + // + // addRequiredItemBtn + // + this.addRequiredItemBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.addRequiredItemBtn.Location = new System.Drawing.Point(390, 38); + this.addRequiredItemBtn.Name = "addRequiredItemBtn"; + this.addRequiredItemBtn.Size = new System.Drawing.Size(232, 23); + this.addRequiredItemBtn.TabIndex = 5; + this.addRequiredItemBtn.Text = "Add Required Item"; + this.addRequiredItemBtn.UseVisualStyleBackColor = true; + this.addRequiredItemBtn.Click += new System.EventHandler(this.addRequiredItemBtn_Click); + // + // label1 + // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.label1.Location = new System.Drawing.Point(390, 64); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(232, 204); + this.label1.TabIndex = 6; + this.label1.Text = "Warning:\r\nThis editor automically saves changes - please do not make a change wit" + + "hout being positive of the changes. \r\n\r\nThis is temporary.\r\n"; + // + // BonusSetEditor + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(634, 293); + this.Controls.Add(this.label1); + this.Controls.Add(this.addRequiredItemBtn); + this.Controls.Add(this.objectTemplateTb); + this.Controls.Add(this.scriptTreeView); + this.Controls.Add(this.scriptPathLbl); + this.Name = "BonusSetEditor"; + this.Text = "Bonus Set Editor"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label scriptPathLbl; + private System.Windows.Forms.TreeView scriptTreeView; + private System.Windows.Forms.TextBox objectTemplateTb; + private System.Windows.Forms.Button addRequiredItemBtn; + private System.Windows.Forms.Label label1; + } +} \ No newline at end of file diff --git a/ProjectSWGScriptEditor/Editors/BonusSetEditor.cs b/ProjectSWGScriptEditor/Editors/BonusSetEditor.cs new file mode 100644 index 0000000..424a3db --- /dev/null +++ b/ProjectSWGScriptEditor/Editors/BonusSetEditor.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using System.IO; + +namespace ProjectSWGScriptEditor.Editors +{ + public partial class BonusSetEditor : Form + { + public BonusSetEditor(string scriptPath) + { + InitializeComponent(); + scriptPathLbl.Text = scriptPath; + loadScriptIntoForm(); + if (!this.IsDisposed) this.Show(); + } + + private void loadScriptIntoForm() + { + scriptTreeView.Nodes.Clear(); + string[] file = File.ReadAllLines(scriptPathLbl.Text); + + TreeNode bonusSetNameNode = scriptTreeView.Nodes.Add("Set Name: "); + TreeNode requiredItemsNode = scriptTreeView.Nodes.Add("Required Items"); + TreeNode bonusesNode = scriptTreeView.Nodes.Add("Bonuses"); + try + { + for (int i = 0; i < file.Length; i++) + { + if (file[i].Contains("bonusSet = BonusSetTemplate")) + { + bonusSetNameNode.Text = "Set Name: " + file[i].Split('"')[1]; + } + else if (file[i].Contains("bonusSet.addRequiredItem")) + { + requiredItemsNode.Nodes.Add(file[i].Split('"')[1]); + } + else if (file[i].Contains("if wornItems == ")) + { + string requiredItemCount = file[i].Split('=')[2]; + TreeNode bonusNode = bonusesNode.Nodes.Add(requiredItemCount); + + int temp = i + 1; + while (!(file[temp].Contains("elif wornItems == ") || file[temp].Contains("else:"))) + { + bonusNode.Nodes.Add(file[temp]); + temp++; + } + } + } + } + catch (Exception ex) + { + MessageBox.Show("The editor has encountered an error while trying to parse the selected script."); + this.Close(); + } + } + + private void addRequiredItemBtn_Click(object sender, EventArgs e) + { + List file = File.ReadAllLines(scriptPathLbl.Text).ToList(); + foreach (string line in file) + { + if (line.Contains("bonusSet.addRequiredItem")) + { + file.Insert(file.IndexOf(line) + 1, "\tbonusSet.addRequiredItem(\"" + objectTemplateTb.Text + "\")"); + File.WriteAllLines(scriptPathLbl.Text, file); + loadScriptIntoForm(); + return; + } + } + } + } +} diff --git a/ProjectSWGScriptEditor/Editors/BonusSetEditor.resx b/ProjectSWGScriptEditor/Editors/BonusSetEditor.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ProjectSWGScriptEditor/Editors/BonusSetEditor.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ProjectSWGScriptEditor/Editors/LootEditor.Designer.cs b/ProjectSWGScriptEditor/Editors/LootEditor.Designer.cs new file mode 100644 index 0000000..4bcda81 --- /dev/null +++ b/ProjectSWGScriptEditor/Editors/LootEditor.Designer.cs @@ -0,0 +1,220 @@ +namespace ProjectSWGScriptEditor.Editors +{ + partial class LootEditor + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.lootPoolListbox = new System.Windows.Forms.ListBox(); + this.lootPoolContentsDataView = new System.Windows.Forms.DataGridView(); + this.itemName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.itemChance = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.listBox1 = new System.Windows.Forms.ListBox(); + this.createLootPool = new System.Windows.Forms.Button(); + this.deleteLootPool = new System.Windows.Forms.Button(); + this.tabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.lootPoolContentsDataView)).BeginInit(); + this.tabPage2.SuspendLayout(); + this.SuspendLayout(); + // + // tabControl1 + // + this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Controls.Add(this.tabPage2); + this.tabControl1.Location = new System.Drawing.Point(12, 12); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(714, 491); + this.tabControl1.TabIndex = 0; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.splitContainer1); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(706, 465); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "Loot Pools"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // splitContainer1 + // + this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.splitContainer1.Location = new System.Drawing.Point(6, 6); + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.deleteLootPool); + this.splitContainer1.Panel1.Controls.Add(this.createLootPool); + this.splitContainer1.Panel1.Controls.Add(this.lootPoolListbox); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.lootPoolContentsDataView); + this.splitContainer1.Size = new System.Drawing.Size(694, 453); + this.splitContainer1.SplitterDistance = 230; + this.splitContainer1.TabIndex = 2; + // + // lootPoolListbox + // + this.lootPoolListbox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lootPoolListbox.FormattingEnabled = true; + this.lootPoolListbox.Location = new System.Drawing.Point(3, 46); + this.lootPoolListbox.Name = "lootPoolListbox"; + this.lootPoolListbox.Size = new System.Drawing.Size(224, 407); + this.lootPoolListbox.TabIndex = 0; + this.lootPoolListbox.SelectedIndexChanged += new System.EventHandler(this.lootPoolListbox_SelectedIndexChanged); + // + // lootPoolContentsDataView + // + this.lootPoolContentsDataView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.lootPoolContentsDataView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.lootPoolContentsDataView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.itemName, + this.itemChance}); + this.lootPoolContentsDataView.Dock = System.Windows.Forms.DockStyle.Fill; + this.lootPoolContentsDataView.Location = new System.Drawing.Point(0, 0); + this.lootPoolContentsDataView.Name = "lootPoolContentsDataView"; + this.lootPoolContentsDataView.Size = new System.Drawing.Size(460, 453); + this.lootPoolContentsDataView.TabIndex = 1; + this.lootPoolContentsDataView.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.lootPoolContentsDataView_CellValueChanged); + this.lootPoolContentsDataView.RowsRemoved += new System.Windows.Forms.DataGridViewRowsRemovedEventHandler(this.lootPoolContentsDataView_RowsRemoved); + // + // itemName + // + this.itemName.HeaderText = "Item"; + this.itemName.Name = "itemName"; + this.itemName.ReadOnly = true; + // + // itemChance + // + this.itemChance.HeaderText = "Item Chance"; + this.itemChance.Name = "itemChance"; + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.listBox1); + this.tabPage2.Controls.Add(this.comboBox1); + this.tabPage2.Location = new System.Drawing.Point(4, 22); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(707, 415); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "Loot Items"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // comboBox1 + // + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Location = new System.Drawing.Point(6, 6); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(121, 21); + this.comboBox1.TabIndex = 0; + // + // listBox1 + // + this.listBox1.FormattingEnabled = true; + this.listBox1.Location = new System.Drawing.Point(7, 33); + this.listBox1.Name = "listBox1"; + this.listBox1.Size = new System.Drawing.Size(120, 95); + this.listBox1.TabIndex = 1; + // + // createLootPool + // + this.createLootPool.Dock = System.Windows.Forms.DockStyle.Top; + this.createLootPool.Location = new System.Drawing.Point(0, 0); + this.createLootPool.Name = "createLootPool"; + this.createLootPool.Size = new System.Drawing.Size(230, 23); + this.createLootPool.TabIndex = 1; + this.createLootPool.Text = "Create"; + this.createLootPool.UseVisualStyleBackColor = true; + this.createLootPool.Click += new System.EventHandler(this.createLootPool_Click); + // + // deleteLootPool + // + this.deleteLootPool.Dock = System.Windows.Forms.DockStyle.Top; + this.deleteLootPool.Location = new System.Drawing.Point(0, 23); + this.deleteLootPool.Name = "deleteLootPool"; + this.deleteLootPool.Size = new System.Drawing.Size(230, 23); + this.deleteLootPool.TabIndex = 2; + this.deleteLootPool.Text = "Delete"; + this.deleteLootPool.UseVisualStyleBackColor = true; + // + // LootEditor + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(738, 515); + this.Controls.Add(this.tabControl1); + this.Name = "LootEditor"; + this.Text = "LootEditor"; + this.tabControl1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.lootPoolContentsDataView)).EndInit(); + this.tabPage2.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.DataGridView lootPoolContentsDataView; + private System.Windows.Forms.ListBox lootPoolListbox; + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.DataGridViewTextBoxColumn itemName; + private System.Windows.Forms.DataGridViewTextBoxColumn itemChance; + private System.Windows.Forms.ListBox listBox1; + private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.Button deleteLootPool; + private System.Windows.Forms.Button createLootPool; + } +} \ No newline at end of file diff --git a/ProjectSWGScriptEditor/Editors/LootEditor.cs b/ProjectSWGScriptEditor/Editors/LootEditor.cs new file mode 100644 index 0000000..a891335 --- /dev/null +++ b/ProjectSWGScriptEditor/Editors/LootEditor.cs @@ -0,0 +1,150 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using System.IO; + +namespace ProjectSWGScriptEditor.Editors +{ + public partial class LootEditor : Form + { + string scriptPath; + bool ready = false; + + public LootEditor(string scriptPath) + { + InitializeComponent(); + this.scriptPath = scriptPath; + + loadScriptIntoForm(); + + if (!this.IsDisposed) this.Show(); + this.Activate(); + } + + private void loadScriptIntoForm() + { + string[] files = Directory.GetFiles(scriptPath + "/lootPools"); + + for (int i = 0; i < files.Length; i++) + { + lootPoolListbox.Items.Add(Path.GetFileNameWithoutExtension(files[i])); + } + } + + private void parseLootGroup(string filepath) + { + lootPoolContentsDataView.Rows.Clear(); + + try + { + string[] file = File.ReadAllLines(filepath); + + for (int i = 0; i < file.Length; i++) + { + string line = file[i].TrimStart(); + + if (line.Contains("itemNames()")) + { + line = file[i + 1]; + line = line.Replace("return [", ""); + line = line.Replace("]", ""); + line = line.Replace("'", ""); + + string[] lineContents = line.Split(','); + + for (int a = 0; a < lineContents.Length; a++) + { + lootPoolContentsDataView.Rows.Add(lineContents[a]); + } + } + + if (line.Contains("itemChances()")) + { + line = file[i + 1]; + line = line.Replace("return [", ""); + line = line.Replace("]", ""); + + string[] lineContents = line.Split(','); + + for (int a = 0; a < lineContents.Length; a++) + { + lootPoolContentsDataView.Rows[a].Cells[1].Value = lineContents[a]; + } + } + } + + int totalChance = 0; + for (int i = 0; i < lootPoolContentsDataView.Rows.Count - 1; i++) + { + totalChance += Int32.Parse((string) lootPoolContentsDataView.Rows[i].Cells[1].Value); + } + + ready = true; + //lootPoolContentsDataView.Rows.Add("Total Items: " + (lootPoolContentsDataView.Rows.Count - 1), "Total Chance: " + totalChance); + } + catch (Exception ex) + { + MessageBox.Show("The editor has encountered an error while trying to parse the selected loot pool."); + } + } + + public void saveLootGroupData() + { + string filePath = scriptPath + "/lootPools/" + lootPoolListbox.Text + ".py"; + StringBuilder sbuilder = new StringBuilder(); + + sbuilder.AppendLine("def itemNames():"); + sbuilder.Append("\treturn ["); + for (int i = 0; i < lootPoolContentsDataView.Rows.Count - 1; i++) + { + if (lootPoolContentsDataView.Rows[i].Cells[0].Value == null) continue; + + sbuilder.Append("'" + ((String)lootPoolContentsDataView.Rows[i].Cells[0].Value).TrimStart() + "'"); + if (i < lootPoolContentsDataView.Rows.Count - 2) sbuilder.Append(","); + } + sbuilder.Append("]"); + + sbuilder.AppendLine(); + + sbuilder.AppendLine("def itemChances():"); + sbuilder.Append("\treturn ["); + for (int i = 0; i < lootPoolContentsDataView.Rows.Count - 1; i++) + { + if (lootPoolContentsDataView.Rows[i].Cells[1].Value == null) continue; + + sbuilder.Append(((String)lootPoolContentsDataView.Rows[i].Cells[1].Value).TrimStart()); + if (i < lootPoolContentsDataView.Rows.Count - 2) sbuilder.Append(","); + } + sbuilder.Append("]"); + + Console.WriteLine(filePath); + File.WriteAllText(filePath, sbuilder.ToString()); + } + + private void lootPoolListbox_SelectedIndexChanged(object sender, EventArgs e) + { + ready = false; + parseLootGroup(scriptPath + "/lootPools/" + lootPoolListbox.Text + ".py"); + } + + private void lootPoolContentsDataView_CellValueChanged(object sender, DataGridViewCellEventArgs e) + { + if(ready) saveLootGroupData(); + } + + private void lootPoolContentsDataView_RowsRemoved(object sender, DataGridViewRowsRemovedEventArgs e) + { + if (ready) saveLootGroupData(); + } + + private void createLootPool_Click(object sender, EventArgs e) + { + + } + } +} diff --git a/ProjectSWGScriptEditor/Editors/LootEditor.resx b/ProjectSWGScriptEditor/Editors/LootEditor.resx new file mode 100644 index 0000000..5930b59 --- /dev/null +++ b/ProjectSWGScriptEditor/Editors/LootEditor.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/ProjectSWGScriptEditor/FileReaders/STF/StfEntry.cs b/ProjectSWGScriptEditor/FileReaders/STF/StfEntry.cs new file mode 100644 index 0000000..b353038 --- /dev/null +++ b/ProjectSWGScriptEditor/FileReaders/STF/StfEntry.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace ProjectSWGScriptEditor.FileReaders.STF +{ + public class StfEntry + { + public string key; + public string value; + + public StfEntry() { } + } +} diff --git a/ProjectSWGScriptEditor/FileReaders/STF/StfReader.cs b/ProjectSWGScriptEditor/FileReaders/STF/StfReader.cs new file mode 100644 index 0000000..9a5fcd3 --- /dev/null +++ b/ProjectSWGScriptEditor/FileReaders/STF/StfReader.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; +using System.Collections; + +namespace ProjectSWGScriptEditor.FileReaders.STF +{ + static public class StfReader + { + static public StfEntry[] read(String stfPath) + { + FileStream stream = File.Open(stfPath,FileMode.Open); + stream.Position = 9; + + int entryCount = readLittleEndianInt(stream); + StfEntry[] entries = new StfEntry[entryCount]; + + for (int i = 0; i < entryCount; i++) + { + int entryNumber = readLittleEndianInt(stream); + stream.Position += 4; + int characters = readLittleEndianInt(stream); + + byte[] characterBuffer = new byte[characters]; + for (int a = 0; a < characters; a++) + { + characterBuffer[a] = (byte) stream.ReadByte(); + stream.Position++; + } + + string value = System.Text.Encoding.Default.GetString(characterBuffer); + + StfEntry entry = new StfEntry(); + entry.value = value; + + entries[i] = entry; + } + + for (int i = 0; i < entryCount; i++) + { + int entryNumber = readLittleEndianInt(stream); + int characters = readLittleEndianInt(stream); + + byte[] characterBuffer = new byte[characters]; + + for (int a = 0; a < characters; a++) + { + characterBuffer[a] = (byte)stream.ReadByte(); + } + + string value = System.Text.Encoding.Default.GetString(characterBuffer); + entries[i].key = value; + } + + return entries; + } + + static private int readLittleEndianInt(FileStream stream) + { + byte[] endianBuffer = new byte[4]; + stream.Read(endianBuffer, 0, 4); + endianBuffer.Reverse(); + return BitConverter.ToInt32(endianBuffer, 0); + } + } +} diff --git a/ProjectSWGScriptEditor/MainForm.Designer.cs b/ProjectSWGScriptEditor/MainForm.Designer.cs new file mode 100644 index 0000000..6412f6b --- /dev/null +++ b/ProjectSWGScriptEditor/MainForm.Designer.cs @@ -0,0 +1,172 @@ +namespace ProjectSWGScriptEditor +{ + partial class MainForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); + this.treeView1 = new System.Windows.Forms.TreeView(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton(); + this.setScriptPathToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.scriptViewerTb = new System.Windows.Forms.TextBox(); + this.editorNameLbl = new System.Windows.Forms.Label(); + this.setClientdataPathToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.toolStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.SuspendLayout(); + // + // treeView1 + // + this.treeView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.treeView1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.treeView1.Location = new System.Drawing.Point(3, 3); + this.treeView1.Name = "treeView1"; + this.treeView1.Size = new System.Drawing.Size(157, 319); + this.treeView1.TabIndex = 0; + this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect); + // + // toolStrip1 + // + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripDropDownButton1}); + this.toolStrip1.Location = new System.Drawing.Point(0, 0); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(606, 25); + this.toolStrip1.TabIndex = 2; + this.toolStrip1.Text = "toolStrip1"; + // + // toolStripDropDownButton1 + // + this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.setScriptPathToolStripMenuItem, + this.setClientdataPathToolStripMenuItem}); + this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image"))); + this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; + this.toolStripDropDownButton1.Size = new System.Drawing.Size(62, 22); + this.toolStripDropDownButton1.Text = "Settings"; + // + // setScriptPathToolStripMenuItem + // + this.setScriptPathToolStripMenuItem.Name = "setScriptPathToolStripMenuItem"; + this.setScriptPathToolStripMenuItem.Size = new System.Drawing.Size(172, 22); + this.setScriptPathToolStripMenuItem.Text = "Set script path"; + this.setScriptPathToolStripMenuItem.Click += new System.EventHandler(this.setScriptPathToolStripMenuItem_Click); + // + // scriptViewerTb + // + this.scriptViewerTb.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.scriptViewerTb.Location = new System.Drawing.Point(6, 16); + this.scriptViewerTb.Multiline = true; + this.scriptViewerTb.Name = "scriptViewerTb"; + this.scriptViewerTb.ReadOnly = true; + this.scriptViewerTb.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.scriptViewerTb.Size = new System.Drawing.Size(406, 306); + this.scriptViewerTb.TabIndex = 5; + this.scriptViewerTb.Text = "Script Viewer"; + this.scriptViewerTb.WordWrap = false; + // + // editorNameLbl + // + this.editorNameLbl.AutoSize = true; + this.editorNameLbl.Location = new System.Drawing.Point(3, 0); + this.editorNameLbl.Name = "editorNameLbl"; + this.editorNameLbl.Size = new System.Drawing.Size(65, 13); + this.editorNameLbl.TabIndex = 4; + this.editorNameLbl.Text = "Editor Name"; + // + // setClientdataPathToolStripMenuItem + // + this.setClientdataPathToolStripMenuItem.Name = "setClientdataPathToolStripMenuItem"; + this.setClientdataPathToolStripMenuItem.Size = new System.Drawing.Size(172, 22); + this.setClientdataPathToolStripMenuItem.Text = "Set clientdata path"; + this.setClientdataPathToolStripMenuItem.Click += new System.EventHandler(this.setClientdataPathToolStripMenuItem_Click); + // + // splitContainer1 + // + this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.splitContainer1.Location = new System.Drawing.Point(12, 28); + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.treeView1); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.editorNameLbl); + this.splitContainer1.Panel2.Controls.Add(this.scriptViewerTb); + this.splitContainer1.Size = new System.Drawing.Size(582, 325); + this.splitContainer1.SplitterDistance = 163; + this.splitContainer1.TabIndex = 6; + // + // MainForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(606, 365); + this.Controls.Add(this.splitContainer1); + this.Controls.Add(this.toolStrip1); + this.Name = "MainForm"; + this.Text = "ProjectSWG Script Editor"; + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + this.splitContainer1.Panel2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TreeView treeView1; + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton1; + private System.Windows.Forms.ToolStripMenuItem setScriptPathToolStripMenuItem; + private System.Windows.Forms.TextBox scriptViewerTb; + private System.Windows.Forms.Label editorNameLbl; + private System.Windows.Forms.ToolStripMenuItem setClientdataPathToolStripMenuItem; + private System.Windows.Forms.SplitContainer splitContainer1; + } +} + diff --git a/ProjectSWGScriptEditor/MainForm.cs b/ProjectSWGScriptEditor/MainForm.cs new file mode 100644 index 0000000..758cae8 --- /dev/null +++ b/ProjectSWGScriptEditor/MainForm.cs @@ -0,0 +1,108 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using System.IO; + +namespace ProjectSWGScriptEditor +{ + public partial class MainForm : Form + { + static String scriptsDirectory = "./"; + static String clientdataDirectory = "./"; + + public MainForm() + { + if (!Config.containsKey("scriptsDirectory")) Config.setValue("scriptsDirectory", scriptsDirectory); + else scriptsDirectory = Config.returnValue("scriptsDirectory"); + + if (!Config.containsKey("clientdataDirectory")) Config.setValue("clientdataDirectory", scriptsDirectory); + else clientdataDirectory = Config.returnValue("clientdataDirectory"); + + InitializeComponent(); + loadContentToTreeView(); + } + + private void loadContentToTreeView() + { + string[] directories = Directory.GetDirectories(scriptsDirectory); + string[] files = Directory.GetFiles(scriptsDirectory); + + for (int i = 0; i < directories.Length; i++) treeView1.Nodes.Add(directories[i].Replace(scriptsDirectory, "")); + for (int i = 0; i < files.Length; i++) treeView1.Nodes.Add(files[i].Replace(scriptsDirectory, "")); + } + + private void setScriptPathToolStripMenuItem_Click(object sender, EventArgs e) + { + using (FolderBrowserDialog dialog = new FolderBrowserDialog()) + { + if (dialog.ShowDialog() == DialogResult.OK) scriptsDirectory = dialog.SelectedPath; + } + Config.setValue("scriptsDirectory", scriptsDirectory); + + treeView1.Nodes.Clear(); + loadContentToTreeView(); + } + + private void setClientdataPathToolStripMenuItem_Click(object sender, EventArgs e) + { + using (FolderBrowserDialog dialog = new FolderBrowserDialog()) + { + if (dialog.ShowDialog() == DialogResult.OK) clientdataDirectory = dialog.SelectedPath; + } + Config.setValue("clientdataDirectory", clientdataDirectory); + } + + private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) + { + string directory = scriptsDirectory + getNodeFilePath(treeView1.SelectedNode); + string childDirectory = getNodeFilePath(treeView1.SelectedNode); + + Console.WriteLine(childDirectory); + + if (!treeView1.SelectedNode.Text.EndsWith(".py")) + { + string[] directories = Directory.GetDirectories(directory); + string[] files = Directory.GetFiles(directory); + + treeView1.SelectedNode.Nodes.Clear(); + + for (int i = 0; i < directories.Length; i++) treeView1.SelectedNode.Nodes.Add(directories[i].Replace(directory, "")); + for (int i = 0; i < files.Length; i++) treeView1.SelectedNode.Nodes.Add(files[i].Replace(directory, "")); + + if (childDirectory.Equals(@"\loot")) + { + editorNameLbl.Text = "Loot Editor"; + + Editors.LootEditor editor = new Editors.LootEditor(directory); + } + } + else if (treeView1.SelectedNode.Text.EndsWith(".py")) + { + scriptViewerTb.Text = File.ReadAllText(directory); + + if (childDirectory.StartsWith(@"\equipment\bonus_sets\")) + { + editorNameLbl.Text = "Bonus Set Editor"; + + Editors.BonusSetEditor editor = new Editors.BonusSetEditor(directory); + } + else if (childDirectory == "") + { + + } + else editorNameLbl.Text = "Unknown script type"; + } + } + + private string getNodeFilePath(TreeNode node) + { + if(node.Parent == null) return node.Text; + return getNodeFilePath(node.Parent) + node.Text; + } + } +} diff --git a/ProjectSWGScriptEditor/MainForm.resx b/ProjectSWGScriptEditor/MainForm.resx new file mode 100644 index 0000000..30a20f7 --- /dev/null +++ b/ProjectSWGScriptEditor/MainForm.resx @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + \ No newline at end of file diff --git a/ProjectSWGScriptEditor/Program.cs b/ProjectSWGScriptEditor/Program.cs new file mode 100644 index 0000000..e577e34 --- /dev/null +++ b/ProjectSWGScriptEditor/Program.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace ProjectSWGScriptEditor +{ + static class Program + { + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new MainForm()); + } + } +} diff --git a/ProjectSWGScriptEditor/ProjectSWGScriptEditor.csproj b/ProjectSWGScriptEditor/ProjectSWGScriptEditor.csproj new file mode 100644 index 0000000..13ef275 --- /dev/null +++ b/ProjectSWGScriptEditor/ProjectSWGScriptEditor.csproj @@ -0,0 +1,109 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {BDF562E6-942A-4E0B-BD6F-6FABC0465DC2} + WinExe + Properties + ProjectSWGScriptEditor + ProjectSWGScriptEditor + v4.0 + Client + 512 + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + Form + + + BonusSetEditor.cs + + + Form + + + LootEditor.cs + + + Form + + + MainForm.cs + + + + + + BonusSetEditor.cs + + + LootEditor.cs + + + MainForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + \ No newline at end of file diff --git a/ProjectSWGScriptEditor/Properties/AssemblyInfo.cs b/ProjectSWGScriptEditor/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..efd0039 --- /dev/null +++ b/ProjectSWGScriptEditor/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ProjectSWG Script Editor")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("ProjectSWG")] +[assembly: AssemblyProduct("ProjectSWGScriptEditor.Properties")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("d183721b-3d4e-4c4a-8585-838fd58e200d")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProjectSWGScriptEditor/Properties/Resources.Designer.cs b/ProjectSWGScriptEditor/Properties/Resources.Designer.cs new file mode 100644 index 0000000..aaad932 --- /dev/null +++ b/ProjectSWGScriptEditor/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1008 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ProjectSWGScriptEditor.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SLManager.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/ProjectSWGScriptEditor/Properties/Resources.resx b/ProjectSWGScriptEditor/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/ProjectSWGScriptEditor/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ProjectSWGScriptEditor/Properties/Settings.Designer.cs b/ProjectSWGScriptEditor/Properties/Settings.Designer.cs new file mode 100644 index 0000000..d3fadbd --- /dev/null +++ b/ProjectSWGScriptEditor/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1008 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ProjectSWGScriptEditor.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/ProjectSWGScriptEditor/Properties/Settings.settings b/ProjectSWGScriptEditor/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/ProjectSWGScriptEditor/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ProjectSWGScriptEditor/bin/Debug/ProjectSWGScriptEditor.exe b/ProjectSWGScriptEditor/bin/Debug/ProjectSWGScriptEditor.exe new file mode 100644 index 0000000..95b1695 Binary files /dev/null and b/ProjectSWGScriptEditor/bin/Debug/ProjectSWGScriptEditor.exe differ diff --git a/ProjectSWGScriptEditor/bin/Debug/pswgse.cfg b/ProjectSWGScriptEditor/bin/Debug/pswgse.cfg new file mode 100644 index 0000000..85e6455 --- /dev/null +++ b/ProjectSWGScriptEditor/bin/Debug/pswgse.cfg @@ -0,0 +1,2 @@ +clientdataDirectory=C:\NGECore2\clientdata +scriptsDirectory=C:\NGECore2\scripts