diff --git a/Subsurface/Content/Items/Engine/engine.xml b/Subsurface/Content/Items/Engine/engine.xml
index 56ce5cb6d..741dc979e 100644
--- a/Subsurface/Content/Items/Engine/engine.xml
+++ b/Subsurface/Content/Items/Engine/engine.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/Subsurface/Data/ContentPackages/Vanilla 0.3.xml b/Subsurface/Data/ContentPackages/Vanilla 0.3.xml
index 9348a625f..7c02ddc28 100644
--- a/Subsurface/Data/ContentPackages/Vanilla 0.3.xml
+++ b/Subsurface/Data/ContentPackages/Vanilla 0.3.xml
@@ -36,6 +36,8 @@
+
+
diff --git a/Subsurface/Properties/AssemblyInfo.cs b/Subsurface/Properties/AssemblyInfo.cs
index 63dd17eb2..17cfa604d 100644
--- a/Subsurface/Properties/AssemblyInfo.cs
+++ b/Subsurface/Properties/AssemblyInfo.cs
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.3.2.5")]
-[assembly: AssemblyFileVersion("0.3.2.5")]
+[assembly: AssemblyVersion("0.3.2.6")]
+[assembly: AssemblyFileVersion("0.3.2.6")]
diff --git a/Subsurface/Source/ContentPackage.cs b/Subsurface/Source/ContentPackage.cs
index 803fbef5b..caa18b81c 100644
--- a/Subsurface/Source/ContentPackage.cs
+++ b/Subsurface/Source/ContentPackage.cs
@@ -10,7 +10,7 @@ namespace Barotrauma
{
public enum ContentType
{
- None, Jobs, Item, Character, Structure, Executable, RandomEvents
+ None, Jobs, Item, Character, Structure, Executable, LocationTypes, RandomEvents, Missions
}
public class ContentPackage
diff --git a/Subsurface/Source/Events/Quests/Quest.cs b/Subsurface/Source/Events/Quests/Quest.cs
index 87e3ef798..64b1ec523 100644
--- a/Subsurface/Source/Events/Quests/Quest.cs
+++ b/Subsurface/Source/Events/Quests/Quest.cs
@@ -10,9 +10,7 @@ namespace Barotrauma
class Mission
{
private static List list = new List();
-
- private static string configFile = "Content/Missions.xml";
-
+
private string name;
private string description;
@@ -96,6 +94,9 @@ namespace Barotrauma
public static Mission LoadRandom(Location[] locations, Random rand)
{
+ var files = GameMain.SelectedPackage.GetFilesOfType(ContentType.Missions);
+ string configFile = files[rand.Next(files.Count)];
+
XDocument doc = ToolBox.TryLoadXml(configFile);
if (doc == null) return null;
diff --git a/Subsurface/Source/GameMain.cs b/Subsurface/Source/GameMain.cs
index 70bc95b17..dd83c7cb0 100644
--- a/Subsurface/Source/GameMain.cs
+++ b/Subsurface/Source/GameMain.cs
@@ -253,7 +253,7 @@ namespace Barotrauma
ParticleManager = new ParticleManager("Content/Particles/ParticlePrefabs.xml", Cam);
yield return CoroutineStatus.Running;
- LocationType.Init("Content/Map/locationTypes.xml");
+ LocationType.Init();
MainMenuScreen.Select();
TitleScreen.LoadState = 100.0f;
diff --git a/Subsurface/Source/Items/Components/Machines/Steering.cs b/Subsurface/Source/Items/Components/Machines/Steering.cs
index 9bc6e3bc1..3a8b59066 100644
--- a/Subsurface/Source/Items/Components/Machines/Steering.cs
+++ b/Subsurface/Source/Items/Components/Machines/Steering.cs
@@ -117,18 +117,10 @@ namespace Barotrauma.Items.Components
{
//base.Update(deltaTime, cam);
- //if (voltage < minVoltage) return;
+ if (voltage < minVoltage) return;
if (autoPilot)
{
- //if (steeringPath==null)
- //{
- // PathFinder pathFinder = new PathFinder(WayPoint.WayPointList, false);
- // steeringPath = pathFinder.FindPath(
- // ConvertUnits.ToSimUnits(Level.Loaded.StartPosition),
- // ConvertUnits.ToSimUnits(Level.Loaded.EndPosition));
- //}
-
UpdateAutoPilot(deltaTime);
}
else if (valueChanged)
@@ -149,6 +141,9 @@ namespace Barotrauma.Items.Components
targetLevel += (neutralBallastLevel - 0.5f) * 100.0f;
item.SendSignal(targetLevel.ToString(CultureInfo.InvariantCulture), "velocity_y_out");
+
+
+ voltage -= deltaTime;
}
public override void DrawHUD(SpriteBatch spriteBatch, Character character)
@@ -162,13 +157,15 @@ namespace Barotrauma.Items.Components
GuiFrame.Update(1.0f / 60.0f);
GuiFrame.Draw(spriteBatch);
+ if (voltage < minVoltage) return;
+
Rectangle velRect = new Rectangle(x + 20, y + 20, width - 40, height - 40);
//GUI.DrawRectangle(spriteBatch, velRect, Color.White, false);
if (Submarine.Loaded != null && Level.Loaded != null)
{
Vector2 realWorldVelocity = ConvertUnits.ToDisplayUnits(Submarine.Loaded.Velocity * Physics.DisplayToRealWorldRatio) * 3.6f;
- float realWorldDepth = (Submarine.Loaded.Position.Y - Level.Loaded.Size.Y) *Physics.DisplayToRealWorldRatio;
+ float realWorldDepth = Math.Abs(Submarine.Loaded.Position.Y - Level.Loaded.Size.Y) * Physics.DisplayToRealWorldRatio;
GUI.DrawString(spriteBatch, new Vector2(x + 20, y + height - 65),
"Velocity: " + (int)realWorldVelocity.X + " km/h", Color.LightGreen, null, 0, GUI.SmallFont);
GUI.DrawString(spriteBatch, new Vector2(x + 20, y + height - 50),
@@ -306,7 +303,11 @@ namespace Barotrauma.Items.Components
if (connection.Name == "velocity_in")
{
currVelocity = ToolBox.ParseToVector2(signal, false);
- }
+ }
+ else
+ {
+ base.ReceiveSignal(signal, connection, sender, power);
+ }
}
public override bool FillNetworkData(Networking.NetworkEventType type, Lidgren.Network.NetBuffer message)
diff --git a/Subsurface/Source/Map/Map/LocationType.cs b/Subsurface/Source/Map/Map/LocationType.cs
index cbf510651..1d0e8bc3d 100644
--- a/Subsurface/Source/Map/Map/LocationType.cs
+++ b/Subsurface/Source/Map/Map/LocationType.cs
@@ -127,20 +127,26 @@ namespace Barotrauma
return null;
}
- public static void Init(string file)
+ public static void Init()
{
- XDocument doc = ToolBox.TryLoadXml(file);
-
- if (doc==null)
+ var locationTypeFiles = GameMain.SelectedPackage.GetFilesOfType(ContentType.LocationTypes);
+
+ foreach (string file in locationTypeFiles)
{
- return;
+ XDocument doc = ToolBox.TryLoadXml(file);
+
+ if (doc==null)
+ {
+ return;
+ }
+
+ foreach (XElement element in doc.Root.Elements())
+ {
+ LocationType locationType = new LocationType(element);
+ list.Add(locationType);
+ }
}
- foreach (XElement element in doc.Root.Elements())
- {
- LocationType locationType = new LocationType(element);
- list.Add(locationType);
- }
}
}
}
diff --git a/Subsurface/changelog.txt b/Subsurface/changelog.txt
index 2f7e64523..f5643c177 100644
--- a/Subsurface/changelog.txt
+++ b/Subsurface/changelog.txt
@@ -1,3 +1,14 @@
+---------------------------------------------------------------------------------------------------------
+v0.3.2.6
+---------------------------------------------------------------------------------------------------------
+
+- fixed the broken password box
+- location types and missions are included in content packages
+- junction boxes and power sources can be connected with multiple parallel wires without multiplying
+the power output
+-
+
+
---------------------------------------------------------------------------------------------------------
v0.3.2.5
---------------------------------------------------------------------------------------------------------
diff --git a/Subsurface_Solution.v12.suo b/Subsurface_Solution.v12.suo
index 1da1054f4..569f66c8b 100644
Binary files a/Subsurface_Solution.v12.suo and b/Subsurface_Solution.v12.suo differ