diff --git a/Subsurface/Content/Items/Reactor/reactor.xml b/Subsurface/Content/Items/Reactor/reactor.xml
index 597b35ba8..e2c291d3a 100644
--- a/Subsurface/Content/Items/Reactor/reactor.xml
+++ b/Subsurface/Content/Items/Reactor/reactor.xml
@@ -59,7 +59,7 @@
-
+
@@ -78,7 +78,7 @@
-
+
diff --git a/Subsurface/Properties/AssemblyInfo.cs b/Subsurface/Properties/AssemblyInfo.cs
index 595743d0d..d100587cb 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.1.3")]
-[assembly: AssemblyFileVersion("0.3.1.3")]
+[assembly: AssemblyVersion("0.3.1.5")]
+[assembly: AssemblyFileVersion("0.3.1.5")]
diff --git a/Subsurface/Source/Items/Components/Machines/Deconstructor.cs b/Subsurface/Source/Items/Components/Machines/Deconstructor.cs
index 49feba547..0b777ed80 100644
--- a/Subsurface/Source/Items/Components/Machines/Deconstructor.cs
+++ b/Subsurface/Source/Items/Components/Machines/Deconstructor.cs
@@ -58,9 +58,11 @@ namespace Barotrauma.Items.Components
return;
}
- foreach (string deconstructProduct in targetItem.Prefab.DeconstructItems)
+ foreach (DeconstructItem deconstructProduct in targetItem.Prefab.DeconstructItems)
{
- var itemPrefab = ItemPrefab.list.FirstOrDefault(ip => ip.Name.ToLower() == deconstructProduct.ToLower()) as ItemPrefab;
+ if (deconstructProduct.RequireFullCondition && targetItem.Condition < 100.0f) continue;
+
+ var itemPrefab = ItemPrefab.list.FirstOrDefault(ip => ip.Name.ToLower() == deconstructProduct.ItemPrefabName.ToLower()) as ItemPrefab;
if (itemPrefab==null)
{
DebugConsole.ThrowError("Tried to deconstruct item ''"+targetItem.Name+"'' but couldn't find item prefab ''"+deconstructProduct+"''!");
diff --git a/Subsurface/Source/Items/ItemPrefab.cs b/Subsurface/Source/Items/ItemPrefab.cs
index a10c81bbc..6f7d92597 100644
--- a/Subsurface/Source/Items/ItemPrefab.cs
+++ b/Subsurface/Source/Items/ItemPrefab.cs
@@ -9,6 +9,18 @@ using Microsoft.Xna.Framework.Input;
namespace Barotrauma
{
+ struct DeconstructItem
+ {
+ public readonly string ItemPrefabName;
+ public readonly bool RequireFullCondition;
+
+ public DeconstructItem(string itemPrefabName, bool requireFullCondition)
+ {
+ ItemPrefabName = itemPrefabName;
+ RequireFullCondition = requireFullCondition;
+ }
+ }
+
class ItemPrefab : MapEntityPrefab
{
//static string contentFolder = "Content/Items/";
@@ -38,7 +50,7 @@ namespace Barotrauma
get { return configFile; }
}
- public List DeconstructItems
+ public List DeconstructItems
{
get;
private set;
@@ -216,7 +228,7 @@ namespace Barotrauma
Triggers = new List();
- DeconstructItems = new List();
+ DeconstructItems = new List();
DeconstructTime = 1.0f;
foreach (XElement subElement in element.Elements())
@@ -238,7 +250,12 @@ namespace Barotrauma
foreach (XElement deconstructItem in subElement.Elements())
{
- DeconstructItems.Add(ToolBox.GetAttributeString(deconstructItem, "name", "not found"));
+
+ string deconstructItemName = ToolBox.GetAttributeString(deconstructItem, "name", "not found");
+ bool requireFullCondition = ToolBox.GetAttributeBool(deconstructItem, "requirefullcondition", false);
+
+ DeconstructItems.Add(new DeconstructItem(deconstructItemName, requireFullCondition));
+
}
break;
diff --git a/Subsurface/Source/Map/Levels/Level.cs b/Subsurface/Source/Map/Levels/Level.cs
index 70c495875..7c7f34af5 100644
--- a/Subsurface/Source/Map/Levels/Level.cs
+++ b/Subsurface/Source/Map/Levels/Level.cs
@@ -148,13 +148,12 @@ namespace Barotrauma
Rand.SetSyncedSeed(ToolBox.StringToInt(seed));
- float minWidth = Submarine.Loaded == null ? 3000.0f : Math.Max(Submarine.Borders.Width, Submarine.Borders.Height);
+ float minWidth = Submarine.Loaded == null ? 0.0f : Math.Max(Submarine.Borders.Width, Submarine.Borders.Height);
+ minWidth = Math.Max(minWidth, 3500.0f);
startPosition = new Vector2((int)minWidth * 2, Rand.Range((int)minWidth * 2, borders.Height - (int)minWidth * 2, false));
endPosition = new Vector2(borders.Width - (int)minWidth * 2, Rand.Range((int)minWidth * 2, borders.Height - (int)minWidth * 2, false));
-
-
-
+
List pathNodes = new List();
Rectangle pathBorders = borders;// new Rectangle((int)minWidth, (int)minWidth, borders.Width - (int)minWidth * 2, borders.Height - (int)minWidth);
pathBorders.Inflate(-minWidth*2, -minWidth*2);
@@ -871,7 +870,10 @@ namespace Barotrauma
#if DEBUG
DebugConsole.ThrowError("Invalid right normal");
#endif
+ GameMain.World.RemoveBody(cell.body);
+ cell.body = null;
leftNormal = Vector2.UnitX;
+ break;
}
@@ -891,7 +893,10 @@ namespace Barotrauma
#if DEBUG
DebugConsole.ThrowError("Invalid right normal");
#endif
+ GameMain.World.RemoveBody(cell.body);
+ cell.body = null;
rightNormal = Vector2.UnitX;
+ break;
}
diff --git a/Subsurface/Source/Networking/GameClient.cs b/Subsurface/Source/Networking/GameClient.cs
index 619822fb2..e523df138 100644
--- a/Subsurface/Source/Networking/GameClient.cs
+++ b/Subsurface/Source/Networking/GameClient.cs
@@ -602,7 +602,7 @@ namespace Barotrauma.Networking
gameStarted = true;
- endRoundButton.Visible = Voting.AllowEndVoting;
+ endRoundButton.Visible = Voting.AllowEndVoting && myCharacter != null;
GameMain.GameScreen.Select();
diff --git a/Subsurface/Source/Networking/GameServerSettings.cs b/Subsurface/Source/Networking/GameServerSettings.cs
index da5013140..ea7640a3c 100644
--- a/Subsurface/Source/Networking/GameServerSettings.cs
+++ b/Subsurface/Source/Networking/GameServerSettings.cs
@@ -85,7 +85,7 @@ namespace Barotrauma.Networking
get { return allowSpectating; }
}
- public float EndVoteRequiredRatio;
+ public float EndVoteRequiredRatio = 0.5f;
private void CreateSettingsFrame()
{
diff --git a/Subsurface/changelog.txt b/Subsurface/changelog.txt
index 4b18426f9..8fc87b287 100644
--- a/Subsurface/changelog.txt
+++ b/Subsurface/changelog.txt
@@ -1,3 +1,16 @@
+---------------------------------------------------------------------------------------------------------
+v0.3.1.5
+---------------------------------------------------------------------------------------------------------
+
+- fixed projectiles/weapons not colliding with characters
+
+---------------------------------------------------------------------------------------------------------
+v0.3.1.4
+---------------------------------------------------------------------------------------------------------
+
+- fixed items ''floating'' in some of the custom subs
+- fuel rods can't be turned back to uranium/incendium bars if they've been used
+
---------------------------------------------------------------------------------------------------------
v0.3.1.3
---------------------------------------------------------------------------------------------------------
diff --git a/Subsurface_Solution.v12.suo b/Subsurface_Solution.v12.suo
index bf165a2e7..614a01d49 100644
Binary files a/Subsurface_Solution.v12.suo and b/Subsurface_Solution.v12.suo differ