From c7dd6e55f0f9569d35473c63e24f11ac1e4f4517 Mon Sep 17 00:00:00 2001 From: Regalis Date: Thu, 30 Jul 2015 18:52:20 +0300 Subject: [PATCH] Online quest mode, fixed bug when swimming from hull to another, monitors with editable text, choosing exe in content package, monster quests, misc bugfixes --- Launcher/Form1.cs | 2 +- Launcher/PackageManager.Designer.cs | 97 +- Launcher/PackageManager.cs | 78 +- Launcher/PackageManager.resx | 2772 ++++++++++++++++- .../Characters/HumanoidAnimController.cs | 26 +- Subsurface/Characters/Ragdoll.cs | 2 +- Subsurface/Content/Characters/Human/human.xml | 8 +- .../Content/Items/Diving/divinggear.xml | 4 +- .../Content/Items/Electricity/monitor.png | Bin 0 -> 216 bytes .../Content/Items/Electricity/monitors.xml | 19 + .../Content/Items/Electricity/poweritems.xml | 1 - .../Content/Items/MiniMap/fabricator.png | Bin 0 -> 29453 bytes Subsurface/Content/Items/MiniMap/item.xml | 2 +- .../Items/OxygenGenerator/oxygengenerator.xml | 4 +- Subsurface/Content/Items/Pump/pump.xml | 2 +- Subsurface/Content/Items/Tools/tools.xml | 10 +- Subsurface/Content/Items/Weapons/weapons.xml | 2 +- Subsurface/Content/Map/StructurePrefabs.xml | 6 +- Subsurface/Content/Quests.xml | 31 +- Subsurface/Content/randomevents.xml | 6 +- Subsurface/ContentPackage.cs | 7 +- Subsurface/Events/Quests/MonsterQuest.cs | 58 + Subsurface/Events/Quests/Quest.cs | 8 +- Subsurface/Events/Quests/SalvageQuest.cs | 2 +- Subsurface/GUI/GUI.cs | 2 +- Subsurface/GUI/GUIMessageBox.cs | 12 +- Subsurface/GUI/GUITextBlock.cs | 30 +- Subsurface/GUI/GUITextBox.cs | 8 +- Subsurface/GameSession/GameMode.cs | 17 +- Subsurface/GameSession/GameSession.cs | 23 +- Subsurface/GameSession/QuestMode.cs | 51 + Subsurface/GameSession/SinglePlayerMode.cs | 14 +- Subsurface/GameSession/TraitorMode.cs | 2 + Subsurface/GameSettings.cs | 10 +- .../Items/Components/Holdable/Holdable.cs | 91 +- Subsurface/Items/Components/Label.cs | 105 + Subsurface/Items/Components/Machines/Pump.cs | 29 +- Subsurface/Items/Components/Machines/Radar.cs | 71 +- .../Items/Components/Power/PowerContainer.cs | 14 +- .../Items/Components/Power/PowerTransfer.cs | 3 +- .../Items/Components/Signal/LightComponent.cs | 3 +- Subsurface/Items/Item.cs | 6 +- Subsurface/Map/Levels/Level.cs | 13 +- Subsurface/Map/Map.cs | 8 +- Subsurface/Map/Submarine.cs | 6 +- Subsurface/Networking/GameClient.cs | 2 +- Subsurface/Physics/PhysicsBody.cs | 4 +- Subsurface/Screens/LobbyScreen.cs | 2 +- Subsurface/Screens/NetLobbyScreen.cs | 5 +- Subsurface/Sprite.cs | 4 +- Subsurface/Subsurface.csproj | 12 + Subsurface/Subsurface.csproj.user | 2 +- Subsurface_Solution.v12.suo | Bin 475648 -> 485888 bytes 53 files changed, 3477 insertions(+), 219 deletions(-) create mode 100644 Subsurface/Content/Items/Electricity/monitor.png create mode 100644 Subsurface/Content/Items/Electricity/monitors.xml create mode 100644 Subsurface/Content/Items/MiniMap/fabricator.png create mode 100644 Subsurface/Events/Quests/MonsterQuest.cs create mode 100644 Subsurface/GameSession/QuestMode.cs create mode 100644 Subsurface/Items/Components/Label.cs diff --git a/Launcher/Form1.cs b/Launcher/Form1.cs index 0e810866c..d80ed81b5 100644 --- a/Launcher/Form1.cs +++ b/Launcher/Form1.cs @@ -105,7 +105,7 @@ namespace Launcher { SaveSettings(configPath); - Process.Start(Directory.GetCurrentDirectory() + "/Subsurface.exe"); + Process.Start(new ProcessStartInfo(Directory.GetCurrentDirectory() + "//"+settings.SelectedContentPackage.GetFilesOfType(ContentType.Executable)[0])); Application.Exit(); } diff --git a/Launcher/PackageManager.Designer.cs b/Launcher/PackageManager.Designer.cs index d308263eb..9cfc78428 100644 --- a/Launcher/PackageManager.Designer.cs +++ b/Launcher/PackageManager.Designer.cs @@ -49,20 +49,25 @@ this.itemFolder = new System.Windows.Forms.Button(); this.structureFolder = new System.Windows.Forms.Button(); this.jobFolder = new System.Windows.Forms.Button(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.label5 = new System.Windows.Forms.Label(); + this.exeBox = new System.Windows.Forms.TextBox(); + this.exeButton = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // // packageList // this.packageList.FormattingEnabled = true; - this.packageList.Location = new System.Drawing.Point(12, 73); + this.packageList.Location = new System.Drawing.Point(12, 87); this.packageList.Name = "packageList"; - this.packageList.Size = new System.Drawing.Size(180, 342); + this.packageList.Size = new System.Drawing.Size(180, 381); this.packageList.TabIndex = 3; this.packageList.SelectedIndexChanged += new System.EventHandler(this.packageList_SelectedIndexChanged); // // newPackageName // - this.newPackageName.Location = new System.Drawing.Point(12, 421); + this.newPackageName.Location = new System.Drawing.Point(12, 474); this.newPackageName.Name = "newPackageName"; this.newPackageName.Size = new System.Drawing.Size(129, 20); this.newPackageName.TabIndex = 4; @@ -71,7 +76,7 @@ // newPackage // this.newPackage.Enabled = false; - this.newPackage.Location = new System.Drawing.Point(147, 421); + this.newPackage.Location = new System.Drawing.Point(147, 474); this.newPackage.Name = "newPackage"; this.newPackage.Size = new System.Drawing.Size(45, 20); this.newPackage.TabIndex = 5; @@ -84,7 +89,7 @@ this.label1.AutoSize = true; this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.ForeColor = System.Drawing.SystemColors.Control; - this.label1.Location = new System.Drawing.Point(215, 285); + this.label1.Location = new System.Drawing.Point(215, 338); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(51, 13); this.label1.TabIndex = 7; @@ -93,14 +98,14 @@ // itemList // this.itemList.FormattingEnabled = true; - this.itemList.Location = new System.Drawing.Point(218, 307); + this.itemList.Location = new System.Drawing.Point(218, 360); this.itemList.Name = "itemList"; this.itemList.Size = new System.Drawing.Size(255, 134); this.itemList.TabIndex = 8; // // itemButton // - this.itemButton.Location = new System.Drawing.Point(301, 281); + this.itemButton.Location = new System.Drawing.Point(317, 334); this.itemButton.Name = "itemButton"; this.itemButton.Size = new System.Drawing.Size(75, 23); this.itemButton.TabIndex = 9; @@ -113,7 +118,7 @@ this.label2.AutoSize = true; this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.ForeColor = System.Drawing.SystemColors.Control; - this.label2.Location = new System.Drawing.Point(215, 120); + this.label2.Location = new System.Drawing.Point(215, 173); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(77, 13); this.label2.TabIndex = 7; @@ -122,14 +127,15 @@ // characterList // this.characterList.FormattingEnabled = true; - this.characterList.Location = new System.Drawing.Point(218, 145); + this.characterList.Location = new System.Drawing.Point(218, 198); this.characterList.Name = "characterList"; this.characterList.Size = new System.Drawing.Size(255, 121); this.characterList.TabIndex = 8; + this.characterList.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.fileList_KeyPress); // // characterButton // - this.characterButton.Location = new System.Drawing.Point(301, 116); + this.characterButton.Location = new System.Drawing.Point(317, 169); this.characterButton.Name = "characterButton"; this.characterButton.Size = new System.Drawing.Size(75, 23); this.characterButton.TabIndex = 9; @@ -142,7 +148,7 @@ this.label3.AutoSize = true; this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.ForeColor = System.Drawing.SystemColors.Control; - this.label3.Location = new System.Drawing.Point(489, 121); + this.label3.Location = new System.Drawing.Point(489, 174); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(96, 13); this.label3.TabIndex = 7; @@ -151,14 +157,14 @@ // structureList // this.structureList.FormattingEnabled = true; - this.structureList.Location = new System.Drawing.Point(492, 145); + this.structureList.Location = new System.Drawing.Point(492, 198); this.structureList.Name = "structureList"; this.structureList.Size = new System.Drawing.Size(255, 121); this.structureList.TabIndex = 8; // // structureButton // - this.structureButton.Location = new System.Drawing.Point(603, 116); + this.structureButton.Location = new System.Drawing.Point(591, 169); this.structureButton.Name = "structureButton"; this.structureButton.Size = new System.Drawing.Size(75, 23); this.structureButton.TabIndex = 9; @@ -168,7 +174,7 @@ // // jobButton // - this.jobButton.Location = new System.Drawing.Point(603, 281); + this.jobButton.Location = new System.Drawing.Point(591, 334); this.jobButton.Name = "jobButton"; this.jobButton.Size = new System.Drawing.Size(75, 23); this.jobButton.TabIndex = 12; @@ -179,7 +185,7 @@ // jobList // this.jobList.FormattingEnabled = true; - this.jobList.Location = new System.Drawing.Point(492, 307); + this.jobList.Location = new System.Drawing.Point(492, 360); this.jobList.Name = "jobList"; this.jobList.Size = new System.Drawing.Size(255, 134); this.jobList.TabIndex = 11; @@ -189,7 +195,7 @@ this.label4.AutoSize = true; this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.ForeColor = System.Drawing.SystemColors.Control; - this.label4.Location = new System.Drawing.Point(489, 286); + this.label4.Location = new System.Drawing.Point(489, 339); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(48, 13); this.label4.TabIndex = 10; @@ -197,7 +203,7 @@ // // okButton // - this.okButton.Location = new System.Drawing.Point(623, 503); + this.okButton.Location = new System.Drawing.Point(623, 513); this.okButton.Name = "okButton"; this.okButton.Size = new System.Drawing.Size(124, 37); this.okButton.TabIndex = 13; @@ -207,7 +213,7 @@ // // characterFolder // - this.characterFolder.Location = new System.Drawing.Point(398, 116); + this.characterFolder.Location = new System.Drawing.Point(398, 169); this.characterFolder.Name = "characterFolder"; this.characterFolder.Size = new System.Drawing.Size(75, 23); this.characterFolder.TabIndex = 9; @@ -217,7 +223,7 @@ // // itemFolder // - this.itemFolder.Location = new System.Drawing.Point(398, 280); + this.itemFolder.Location = new System.Drawing.Point(398, 333); this.itemFolder.Name = "itemFolder"; this.itemFolder.Size = new System.Drawing.Size(75, 23); this.itemFolder.TabIndex = 14; @@ -227,7 +233,7 @@ // // structureFolder // - this.structureFolder.Location = new System.Drawing.Point(672, 116); + this.structureFolder.Location = new System.Drawing.Point(672, 169); this.structureFolder.Name = "structureFolder"; this.structureFolder.Size = new System.Drawing.Size(75, 23); this.structureFolder.TabIndex = 15; @@ -237,7 +243,7 @@ // // jobFolder // - this.jobFolder.Location = new System.Drawing.Point(672, 281); + this.jobFolder.Location = new System.Drawing.Point(672, 334); this.jobFolder.Name = "jobFolder"; this.jobFolder.Size = new System.Drawing.Size(75, 23); this.jobFolder.TabIndex = 16; @@ -245,6 +251,46 @@ this.jobFolder.UseVisualStyleBackColor = true; this.jobFolder.Click += new System.EventHandler(this.addFolderButton_Click); // + // pictureBox1 + // + this.pictureBox1.BackColor = System.Drawing.Color.OrangeRed; + this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); + this.pictureBox1.Location = new System.Drawing.Point(0, 26); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(784, 42); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox1.TabIndex = 17; + this.pictureBox1.TabStop = false; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.BackColor = System.Drawing.Color.Transparent; + this.label5.ForeColor = System.Drawing.SystemColors.Control; + this.label5.Location = new System.Drawing.Point(215, 87); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(63, 13); + this.label5.TabIndex = 18; + this.label5.Text = "Executable:"; + // + // exeBox + // + this.exeBox.Enabled = false; + this.exeBox.Location = new System.Drawing.Point(284, 84); + this.exeBox.Name = "exeBox"; + this.exeBox.Size = new System.Drawing.Size(176, 20); + this.exeBox.TabIndex = 19; + // + // exeButton + // + this.exeButton.Location = new System.Drawing.Point(466, 84); + this.exeButton.Name = "exeButton"; + this.exeButton.Size = new System.Drawing.Size(32, 20); + this.exeButton.TabIndex = 20; + this.exeButton.Text = "..."; + this.exeButton.UseVisualStyleBackColor = true; + this.exeButton.Click += new System.EventHandler(this.button1_Click); + // // PackageManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -252,6 +298,10 @@ this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.ClientSize = new System.Drawing.Size(784, 562); + this.Controls.Add(this.exeButton); + this.Controls.Add(this.exeBox); + this.Controls.Add(this.label5); + this.Controls.Add(this.pictureBox1); this.Controls.Add(this.jobFolder); this.Controls.Add(this.structureFolder); this.Controls.Add(this.itemFolder); @@ -275,6 +325,7 @@ this.DoubleBuffered = true; this.Name = "PackageManager"; this.Text = "PackageManager"; + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -302,6 +353,10 @@ private System.Windows.Forms.Button itemFolder; private System.Windows.Forms.Button structureFolder; private System.Windows.Forms.Button jobFolder; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox exeBox; + private System.Windows.Forms.Button exeButton; } } \ No newline at end of file diff --git a/Launcher/PackageManager.cs b/Launcher/PackageManager.cs index 4b1d5ec10..61e9b7e2e 100644 --- a/Launcher/PackageManager.cs +++ b/Launcher/PackageManager.cs @@ -18,6 +18,8 @@ namespace Launcher private ContentPackage selectedPackage; private List fileBoxes; + private List singleFileBoxes; + private List