diff --git a/Subsurface/Barotrauma.csproj b/Subsurface/Barotrauma.csproj
index c9d2e5a0b..64f70eddc 100644
--- a/Subsurface/Barotrauma.csproj
+++ b/Subsurface/Barotrauma.csproj
@@ -273,6 +273,13 @@
PreserveNewest
+
+ PreserveNewest
+
+
+ Designer
+ PreserveNewest
+
PreserveNewest
diff --git a/Subsurface/Barotrauma.csproj.user b/Subsurface/Barotrauma.csproj.user
index df35fcf91..1782abafa 100644
--- a/Subsurface/Barotrauma.csproj.user
+++ b/Subsurface/Barotrauma.csproj.user
@@ -9,7 +9,7 @@
en-US
false
- ProjectFiles
+ ShowAllFiles
diff --git a/Subsurface/Content/Characters/Coelanth/Coelanth.png b/Subsurface/Content/Characters/Coelanth/Coelanth.png
new file mode 100644
index 000000000..0c9b63349
Binary files /dev/null and b/Subsurface/Content/Characters/Coelanth/Coelanth.png differ
diff --git a/Subsurface/Content/Characters/Coelanth/coelanth.xml b/Subsurface/Content/Characters/Coelanth/coelanth.xml
new file mode 100644
index 000000000..0de557050
--- /dev/null
+++ b/Subsurface/Content/Characters/Coelanth/coelanth.xml
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Subsurface/Content/Map/StructurePrefabs.xml b/Subsurface/Content/Map/StructurePrefabs.xml
index 29096ffc1..3e7b7f062 100644
--- a/Subsurface/Content/Map/StructurePrefabs.xml
+++ b/Subsurface/Content/Map/StructurePrefabs.xml
@@ -1,9 +1,9 @@
+ width = "128" height ="64" resizehorizontal="true"/>
+ width = "128" height ="32" resizehorizontal="true"/>
@@ -34,19 +34,19 @@
width = "16" height ="16"/>
+ width = "16" height ="16"/>
+ width = "32" height ="64" resizevertical="true" fliphorizontal="true" body="true" health="500"/>
+ width = "32" height ="64" resizevertical="true" body="true" health="500"/>
+ width = "64" height ="32" resizehorizontal="true" body="true" health="500"/>
@@ -54,29 +54,35 @@
+
+
+
+
+ width = "128" height ="32" resizehorizontal="true"/>
+ width = "64" height ="64" resizehorizontal="true" body="true" platform="true"/>
+ width = "64" height ="32" resizehorizontal="true" body="true" platform="true"/>
+ width="64" height="64" resizehorizontal="true" resizevertical="true"/>
+ width="64" height="64" resizehorizontal="true" resizevertical="true"/>
+ width="64" height="64" resizehorizontal="true" resizevertical="true"/>
+ width="256" height="320" depth = "0.1" stairdirection="Right"/>
+ width="256" height="320" depth = "0.1" stairdirection="Left"/>
diff --git a/Subsurface/Content/Map/testroom.png b/Subsurface/Content/Map/testroom.png
index 75870c026..01924bcc7 100644
Binary files a/Subsurface/Content/Map/testroom.png and b/Subsurface/Content/Map/testroom.png differ
diff --git a/Subsurface/Content/randomevents.xml b/Subsurface/Content/randomevents.xml
index ff6ea15a4..653076aa8 100644
--- a/Subsurface/Content/randomevents.xml
+++ b/Subsurface/Content/randomevents.xml
@@ -25,4 +25,13 @@
difficulty="25"
minamount="1" maxamount="2"
musictype="monster"/>
+
+
+
\ No newline at end of file
diff --git a/Subsurface/Properties/AssemblyInfo.cs b/Subsurface/Properties/AssemblyInfo.cs
index 91f993b8a..09223bc74 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.2.4.1")]
-[assembly: AssemblyFileVersion("0.2.4.1")]
+[assembly: AssemblyVersion("0.2.5.0")]
+[assembly: AssemblyFileVersion("0.2.5.0")]
diff --git a/Subsurface/Source/Characters/AICharacter.cs b/Subsurface/Source/Characters/AICharacter.cs
index 2f265fe20..c56f4814e 100644
--- a/Subsurface/Source/Characters/AICharacter.cs
+++ b/Subsurface/Source/Characters/AICharacter.cs
@@ -13,7 +13,7 @@ namespace Barotrauma
const float AttackBackPriority = 1.0f;
private AIController aiController;
-
+
public override AIController AIController
{
get { return aiController; }
diff --git a/Subsurface/Source/Characters/Character.cs b/Subsurface/Source/Characters/Character.cs
index fe7777f30..00183e073 100644
--- a/Subsurface/Source/Characters/Character.cs
+++ b/Subsurface/Source/Characters/Character.cs
@@ -825,15 +825,26 @@ namespace Barotrauma
{
if (!Enabled) return;
- AnimController.SimplePhysicsEnabled = (Character.controlled!=this && Vector2.Distance(cam.WorldViewCenter, Position)>5000.0f);
+ AnimController.SimplePhysicsEnabled = (Character.controlled != this && Vector2.Distance(cam.WorldViewCenter, Position) > 5000.0f);
if (isDead) return;
-
- if (PressureProtection==0.0f &&
- (AnimController.CurrentHull == null || AnimController.CurrentHull.LethalPressure >= 100.0f))
+
+ if (!(this is AICharacter))
{
- Implode();
- return;
+ bool protectedFromPressure = PressureProtection > 0.0f;
+
+ if (Submarine.Loaded!=null && Level.Loaded !=null)
+ {
+ protectedFromPressure = protectedFromPressure && (Position-Level.Loaded.Position).Y > SubmarineBody.DamageDepth;
+ }
+
+
+ if (!protectedFromPressure &&
+ (AnimController.CurrentHull == null || AnimController.CurrentHull.LethalPressure >= 100.0f))
+ {
+ Implode();
+ return;
+ }
}
if (controlled == this)
diff --git a/Subsurface/Source/EventInput/EventInput.cs b/Subsurface/Source/EventInput/EventInput.cs
index d166c78c9..d6818366e 100644
--- a/Subsurface/Source/EventInput/EventInput.cs
+++ b/Subsurface/Source/EventInput/EventInput.cs
@@ -154,7 +154,10 @@ namespace EventInput
public static void Initialize(GameWindow window)
{
if (initialized)
- throw new InvalidOperationException("TextInput.Initialize can only be called once!");
+ {
+ return;
+ }
+ //throw new InvalidOperationException("TextInput.Initialize can only be called once!");
hookProcDelegate = HookProc;
#if WINDOWS
diff --git a/Subsurface/Source/Events/MonsterEvent.cs b/Subsurface/Source/Events/MonsterEvent.cs
index 609bdc736..7bd7bdc44 100644
--- a/Subsurface/Source/Events/MonsterEvent.cs
+++ b/Subsurface/Source/Events/MonsterEvent.cs
@@ -12,6 +12,8 @@ namespace Barotrauma
private Character[] monsters;
+ private bool spawnDeep;
+
public MonsterEvent(XElement element)
: base (element)
{
@@ -19,6 +21,8 @@ namespace Barotrauma
minAmount = ToolBox.GetAttributeInt(element, "minamount", 1);
maxAmount = Math.Max(ToolBox.GetAttributeInt(element, "maxamount", 1), minAmount);
+
+ spawnDeep = ToolBox.GetAttributeBool(element, "spawndeep", false);
}
private void SpawnMonsters()
@@ -32,6 +36,13 @@ namespace Barotrauma
for (int i = 0; i < amount; i++)
{
Vector2 position = (randomWayPoint == null) ? Vector2.Zero : FarseerPhysics.ConvertUnits.ToSimUnits(randomWayPoint.Position + Level.Loaded.Position);
+
+
+ if (spawnDeep)
+ {
+ position.Y = FarseerPhysics.ConvertUnits.ToSimUnits(Level.Loaded.Position.Y);
+ }
+
position.X += Rand.Range(-0.5f, 0.5f);
position.Y += Rand.Range(-0.5f, 0.5f);
monsters[i] = new AICharacter(characterFile, position);
diff --git a/Subsurface/Source/GUI/GUIMessageBox.cs b/Subsurface/Source/GUI/GUIMessageBox.cs
index 6768ca6be..a47b7fa4b 100644
--- a/Subsurface/Source/GUI/GUIMessageBox.cs
+++ b/Subsurface/Source/GUI/GUIMessageBox.cs
@@ -64,5 +64,10 @@ namespace Barotrauma
return true;
}
+
+ public static void CloseAll()
+ {
+ MessageBoxes.Clear();
+ }
}
}
diff --git a/Subsurface/Source/GameMain.cs b/Subsurface/Source/GameMain.cs
index 165acfe56..40aa5f961 100644
--- a/Subsurface/Source/GameMain.cs
+++ b/Subsurface/Source/GameMain.cs
@@ -20,6 +20,8 @@ namespace Barotrauma
static int graphicsWidth, graphicsHeight;
static SpriteBatch spriteBatch;
+ public static GameMain Instance;
+
public static bool DebugDraw;
public static GraphicsDevice CurrGraphicsDevice;
@@ -99,6 +101,8 @@ namespace Barotrauma
{
Graphics = new GraphicsDeviceManager(this);
+ Instance = this;
+
Config = new GameSettings("config.xml");
if (Config.WasGameUpdated)
{
@@ -169,7 +173,7 @@ namespace Barotrauma
CoroutineManager.StartCoroutine(Load());
}
- private IEnumerable