diff --git a/Subsurface/Content/Items/Fabricators/fabricators.xml b/Subsurface/Content/Items/Fabricators/fabricators.xml
index 42bda98e8..af44d57d9 100644
--- a/Subsurface/Content/Items/Fabricators/fabricators.xml
+++ b/Subsurface/Content/Items/Fabricators/fabricators.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/Subsurface/Content/Items/Weapons/explosives.xml b/Subsurface/Content/Items/Weapons/explosives.xml
index c704fd35a..257e79c46 100644
--- a/Subsurface/Content/Items/Weapons/explosives.xml
+++ b/Subsurface/Content/Items/Weapons/explosives.xml
@@ -31,8 +31,8 @@
-
-
+
+
diff --git a/Subsurface/Content/Items/Weapons/weapons.xml b/Subsurface/Content/Items/Weapons/weapons.xml
index bdeb5765c..29e8d4262 100644
--- a/Subsurface/Content/Items/Weapons/weapons.xml
+++ b/Subsurface/Content/Items/Weapons/weapons.xml
@@ -84,7 +84,7 @@
-
+
diff --git a/Subsurface/Content/Map/TutorialSub.sub b/Subsurface/Content/Map/TutorialSub.sub
index e251a3bcb..01fabb912 100644
Binary files a/Subsurface/Content/Map/TutorialSub.sub and b/Subsurface/Content/Map/TutorialSub.sub differ
diff --git a/Subsurface/Content/Orders.xml b/Subsurface/Content/Orders.xml
index 3116c0339..6f7450632 100644
--- a/Subsurface/Content/Orders.xml
+++ b/Subsurface/Content/Orders.xml
@@ -13,11 +13,11 @@
-
+
-
+
diff --git a/Subsurface/Data/SavedSubs/Aegir Mark II.sub b/Subsurface/Data/SavedSubs/Aegir Mark II.sub
index 9b93473bc..974cbbb76 100644
Binary files a/Subsurface/Data/SavedSubs/Aegir Mark II.sub and b/Subsurface/Data/SavedSubs/Aegir Mark II.sub differ
diff --git a/Subsurface/Data/SavedSubs/Nehalennia.sub b/Subsurface/Data/SavedSubs/Nehalennia.sub
new file mode 100644
index 000000000..e10a0a6bc
Binary files /dev/null and b/Subsurface/Data/SavedSubs/Nehalennia.sub differ
diff --git a/Subsurface/Data/SavedSubs/Vellamo.sub b/Subsurface/Data/SavedSubs/Vellamo.sub
index 750dc6371..59efc6351 100644
Binary files a/Subsurface/Data/SavedSubs/Vellamo.sub and b/Subsurface/Data/SavedSubs/Vellamo.sub differ
diff --git a/Subsurface/Data/SavedSubs/test.sub b/Subsurface/Data/SavedSubs/test.sub
deleted file mode 100644
index 183ff5b7b..000000000
Binary files a/Subsurface/Data/SavedSubs/test.sub and /dev/null differ
diff --git a/Subsurface/Source/DebugConsole.cs b/Subsurface/Source/DebugConsole.cs
index 6ea859b83..8012e0e4c 100644
--- a/Subsurface/Source/DebugConsole.cs
+++ b/Subsurface/Source/DebugConsole.cs
@@ -418,8 +418,20 @@ namespace Barotrauma
case "cleanbuild":
GameMain.Config.MusicVolume = 0.5f;
GameMain.Config.SoundVolume = 0.5f;
+ DebugConsole.NewMessage("Music and sound volume set to 0.5", Color.Green);
+
+ GameMain.Config.GraphicsWidth = 0;
+ GameMain.Config.GraphicsHeight = 0;
+ GameMain.Config.FullScreenEnabled = true;
+ DebugConsole.NewMessage("Resolution set to 0 x 0 (screen resolution will be used)", Color.Green);
+ DebugConsole.NewMessage("Fullscreen enabled", Color.Green);
+
+ if (GameMain.Config.MasterServerUrl != "http://www.undertowgames.com/baromaster")
+ {
+ DebugConsole.ThrowError("MasterServerUrl ''"+GameMain.Config.MasterServerUrl+"''!");
+ }
+
GameMain.Config.Save("config.xml");
- DebugConsole.NewMessage("Set music and sound volume to 0.5", Color.Green);
var saveFiles = System.IO.Directory.GetFiles(SaveUtil.SaveFolder);
@@ -432,6 +444,14 @@ namespace Barotrauma
if (System.IO.File.Exists("filelist.xml"))
{
System.IO.File.Delete("filelist.xml");
+ DebugConsole.NewMessage("Deleted filelist", Color.Green);
+ }
+
+ if (System.IO.File.Exists("Data/SavedSubs/TutorialSub.sub"))
+ {
+ System.IO.File.Delete("Data/SavedSubs/TutorialSub.sub");
+
+ DebugConsole.NewMessage("Deleted TutorialSub from SavedSubs", Color.Green);
}
if (!System.IO.File.Exists("Content/Map/TutorialSub.sub"))
diff --git a/Subsurface/Source/Events/Quests/SalvageQuest.cs b/Subsurface/Source/Events/Quests/SalvageQuest.cs
index 5bea75a85..c96ba3185 100644
--- a/Subsurface/Source/Events/Quests/SalvageQuest.cs
+++ b/Subsurface/Source/Events/Quests/SalvageQuest.cs
@@ -68,8 +68,8 @@ namespace Barotrauma
public override void End()
{
+ if (item.CurrentHull == null || item.Removed) return;
item.Remove();
- if (item.CurrentHull == null) return;
GiveReward();
diff --git a/Subsurface/Source/GameSession/GameModes/TraitorMode.cs b/Subsurface/Source/GameSession/GameModes/TraitorMode.cs
index 4c981882f..22f3f0fbf 100644
--- a/Subsurface/Source/GameSession/GameModes/TraitorMode.cs
+++ b/Subsurface/Source/GameSession/GameModes/TraitorMode.cs
@@ -17,14 +17,14 @@ namespace Barotrauma
{
if (GameMain.Server == null || traitorCharacter == null || targetCharacter == null) return "";
- if (targetCharacter == null || targetCharacter.IsDead)
+ if (targetCharacter.IsDead)
{
string endMessage = traitorCharacter.Name + " was a traitor! ";
endMessage += (traitorCharacter.Info.Gender == Gender.Male) ? "His" : "Her";
endMessage += " task was to assassinate " + targetCharacter.Name + ". The task was successful.";
//End(endMessage);
}
- else if (traitorCharacter == null || traitorCharacter.IsDead)
+ else if (traitorCharacter.IsDead)
{
string endMessage = traitorCharacter.Name + " was a traitor! ";
endMessage += (traitorCharacter.Info.Gender == Gender.Male) ? "His" : "Her";
@@ -35,12 +35,14 @@ namespace Barotrauma
return endMessage;
}
- else if (Submarine.Loaded.AtEndPosition)
+ else
{
string endMessage = traitorCharacter.Name + " was a traitor! ";
endMessage += (traitorCharacter.Info.Gender == Gender.Male) ? "His" : "Her";
endMessage += " task was to assassinate " + targetCharacter.Name + ". ";
- endMessage += "The task was unsuccessful - the has submarine reached its destination.";
+ endMessage += (Submarine.Loaded.AtEndPosition) ?
+ "The task was unsuccessful - the has submarine reached its destination." :
+ "The task was unsuccessful.";
return endMessage;
}
diff --git a/Subsurface/Source/GameSession/GameModes/Tutorials/BasicTutorial.cs b/Subsurface/Source/GameSession/GameModes/Tutorials/BasicTutorial.cs
index ecf39f758..2fd280b3d 100644
--- a/Subsurface/Source/GameSession/GameModes/Tutorials/BasicTutorial.cs
+++ b/Subsurface/Source/GameSession/GameModes/Tutorials/BasicTutorial.cs
@@ -156,7 +156,7 @@ namespace Barotrauma.Tutorials
infoBox = CreateInfoFrame("Here you can see all the wires connected to the terminal. Apparently there's no wire"
+ " going into the to the power connection - that's why the monitor isn't working."
+ " You should find a piece of wire to connect it. Try searching some of the cabinets scattered around the sub.");
-
+
while (!HasItem("Wire"))
{
yield return CoroutineStatus.Running;
@@ -227,7 +227,7 @@ namespace Barotrauma.Tutorials
yield return CoroutineStatus.Running;
}
- infoBox = CreateInfoFrame("You can take a look at the area around the sub by pressing ''Activate Radar''.");
+ infoBox = CreateInfoFrame("You can take a look at the area around the sub by selecting the ''Sonar'' checkbox.");
while (!radar.IsActive)
{
@@ -235,7 +235,7 @@ namespace Barotrauma.Tutorials
}
yield return new WaitForSeconds(0.5f);
- infoBox = CreateInfoFrame("The white box in the middle is the submarine, and the white lines outside it are the walls of an underwater cavern. "
+ infoBox = CreateInfoFrame("The green rectangle in the middle is the submarine, and the flickering shapes outside it are the walls of an underwater cavern. "
+ "Try moving the submarine by clicking somewhere on the monitor and dragging the pointer to the direction you want to go to.");
while (steering.CurrTargetVelocity == Vector2.Zero && steering.CurrTargetVelocity.Length() < 50.0f)
@@ -254,13 +254,13 @@ namespace Barotrauma.Tutorials
infoBox = CreateInfoFrame("Steer the submarine downwards, heading further into the cavern.");
- while (Submarine.Loaded.Position.Y > 10000.0f)
+ while (Submarine.Loaded.WorldPosition.Y > 33000.0f)
{
yield return CoroutineStatus.Running;
}
yield return new WaitForSeconds(1.0f);
- var moloch = Character.Create("Content/Characters/Moloch/moloch.xml", steering.Item.SimPosition + Vector2.UnitX * 25.0f);
+ var moloch = Character.Create("Content/Characters/Moloch/moloch.xml", steering.Item.WorldPosition + Vector2.UnitX * 3000.0f);
moloch.PlaySound(AIController.AiState.Attack);
yield return new WaitForSeconds(1.0f);
@@ -281,7 +281,7 @@ namespace Barotrauma.Tutorials
Submarine.Loaded.Velocity = Vector2.Zero;
moloch.AIController.SelectTarget(steering.Item.CurrentHull.AiTarget);
- Vector2 steeringDir = windows[0].Position - moloch.Position;
+ Vector2 steeringDir = windows[0].WorldPosition - moloch.WorldPosition;
if (steeringDir != Vector2.Zero) steeringDir = Vector2.Normalize(steeringDir);
//foreach (Limb limb in moloch.AnimController.Limbs)
@@ -306,6 +306,18 @@ namespace Barotrauma.Tutorials
yield return new WaitForSeconds(0.1f);
} while (!broken);
+ //fix everything except the command windows
+ foreach (Structure w in Structure.WallList)
+ {
+ for (int i = 0; i < w.SectionCount; i++)
+ {
+ if (!w.SectionHasHole(i)) continue;
+ if (windows.Contains(w)) continue;
+
+ w.AddDamage(i, -100000.0f);
+ }
+ }
+
yield return new WaitForSeconds(0.5f);
Submarine.Loaded.GodMode = true;
@@ -486,20 +498,27 @@ namespace Barotrauma.Tutorials
GameMain.GameScreen.Cam.TargetPos = Vector2.Zero;
GameMain.LightManager.LosEnabled = false;
- do
+ //do
+ //{
+ // secondsLeft = (float)(endTime - DateTime.Now).TotalSeconds;
+
+ // float camAngle = (float)((DateTime.Now - endTime).TotalSeconds / endPreviewLength) * MathHelper.TwoPi;
+ // Vector2 offset = (new Vector2(
+ // (float)Math.Cos(camAngle) * (Submarine.Borders.Width / 2.0f),
+ // (float)Math.Sin(camAngle) * (Submarine.Borders.Height / 2.0f)));
+
+ // GameMain.GameScreen.Cam.TargetPos = offset * 0.8f;
+ // //Game1.GameScreen.Cam.MoveCamera((float)deltaTime);
+
+ // yield return CoroutineStatus.Running;
+ //} while (secondsLeft > 0.0f);
+
+ var cinematic = new TransitionCinematic(Submarine.Loaded, GameMain.GameScreen.Cam, 5.0f);
+
+ while (cinematic.Running)
{
- secondsLeft = (float)(endTime - DateTime.Now).TotalSeconds;
-
- float camAngle = (float)((DateTime.Now - endTime).TotalSeconds / endPreviewLength) * MathHelper.TwoPi;
- Vector2 offset = (new Vector2(
- (float)Math.Cos(camAngle) * (Submarine.Borders.Width / 2.0f),
- (float)Math.Sin(camAngle) * (Submarine.Borders.Height / 2.0f)));
-
- GameMain.GameScreen.Cam.TargetPos = offset * 0.8f;
- //Game1.GameScreen.Cam.MoveCamera((float)deltaTime);
-
yield return CoroutineStatus.Running;
- } while (secondsLeft > 0.0f);
+ }
Submarine.Unload();
GameMain.MainMenuScreen.Select();
@@ -543,9 +562,9 @@ namespace Barotrauma.Tutorials
enemy.AIController.State = AIController.AiState.None;
- Vector2 targetPos = Character.Controlled.Position + new Vector2(0.0f, 3000.0f);
+ Vector2 targetPos = Character.Controlled.WorldPosition + new Vector2(0.0f, 3000.0f);
- Vector2 steering = targetPos - enemy.Position;
+ Vector2 steering = targetPos - enemy.WorldPosition;
if (steering != Vector2.Zero) steering = Vector2.Normalize(steering);
enemy.AIController.Steering = steering * 2.0f;
diff --git a/Subsurface/Source/GameSettings.cs b/Subsurface/Source/GameSettings.cs
index 9c42d788d..a09070837 100644
--- a/Subsurface/Source/GameSettings.cs
+++ b/Subsurface/Source/GameSettings.cs
@@ -210,10 +210,18 @@ namespace Barotrauma
doc.Root.Add(gMode);
}
- gMode.ReplaceAttributes(
- new XAttribute("width", GraphicsWidth),
- new XAttribute("height", GraphicsHeight),
- new XAttribute("fullscreen", FullScreenEnabled ? "true" : "false"));
+ if (GraphicsWidth==0 || GraphicsHeight==0)
+ {
+ gMode.ReplaceAttributes(new XAttribute("fullscreen", FullScreenEnabled ? "true" : "false"));
+ }
+ else
+ {
+ gMode.ReplaceAttributes(
+ new XAttribute("width", GraphicsWidth),
+ new XAttribute("height", GraphicsHeight),
+ new XAttribute("fullscreen", FullScreenEnabled ? "true" : "false"));
+ }
+
if (SelectedContentPackage != null)
{
diff --git a/Subsurface/Source/Items/Components/Holdable/Holdable.cs b/Subsurface/Source/Items/Components/Holdable/Holdable.cs
index eb84b6a33..c1352485a 100644
--- a/Subsurface/Source/Items/Components/Holdable/Holdable.cs
+++ b/Subsurface/Source/Items/Components/Holdable/Holdable.cs
@@ -134,6 +134,8 @@ namespace Barotrauma.Items.Components
{
picker = character;
+ if (character != null) item.Submarine = character.Submarine;
+
if (item.body == null)
{
if (body!=null)
diff --git a/Subsurface/Source/Items/Components/Holdable/Throwable.cs b/Subsurface/Source/Items/Components/Holdable/Throwable.cs
index 70d1eddf3..48bbc0c3d 100644
--- a/Subsurface/Source/Items/Components/Holdable/Throwable.cs
+++ b/Subsurface/Source/Items/Components/Holdable/Throwable.cs
@@ -122,7 +122,7 @@ namespace Barotrauma.Items.Components
if (throwPos < -0.0)
{
- Vector2 throwVector = picker.CursorPosition - picker.AnimController.RefLimb.Position;
+ Vector2 throwVector = picker.CursorWorldPosition - picker.WorldPosition;
throwVector = Vector2.Normalize(throwVector);
item.Drop();
diff --git a/Subsurface/Source/Items/Components/Machines/Engine.cs b/Subsurface/Source/Items/Components/Machines/Engine.cs
index 63fd6fb92..3b01a68d4 100644
--- a/Subsurface/Source/Items/Components/Machines/Engine.cs
+++ b/Subsurface/Source/Items/Components/Machines/Engine.cs
@@ -94,18 +94,17 @@ namespace Barotrauma.Items.Components
spriteBatch.DrawString(GUI.Font, "Force: " + (int)(targetForce) + " %", new Vector2(GuiFrame.Rect.X + 30, GuiFrame.Rect.Y + 30), Color.White);
- if (GUI.DrawButton(spriteBatch, new Rectangle(GuiFrame.Rect.X + 280, GuiFrame.Rect.Y + 30, 40, 40), "+", true))
- {
- targetForce += 1.0f;
- item.NewComponentEvent(this, true, false);
- }
if (GUI.DrawButton(spriteBatch, new Rectangle(GuiFrame.Rect.X + 280, GuiFrame.Rect.Y + 80, 40, 40), "-", true))
{
targetForce -= 1.0f;
item.NewComponentEvent(this, true, false);
}
-
-
+
+ if (GUI.DrawButton(spriteBatch, new Rectangle(GuiFrame.Rect.X + 280, GuiFrame.Rect.Y + 30, 40, 40), "+", true))
+ {
+ targetForce += 1.0f;
+ item.NewComponentEvent(this, true, false);
+ }
}
public override void UpdateBroken(float deltaTime, Camera cam)
diff --git a/Subsurface/Source/Items/Components/Machines/Fabricator.cs b/Subsurface/Source/Items/Components/Machines/Fabricator.cs
index 3525b1c68..1a4efc1d1 100644
--- a/Subsurface/Source/Items/Components/Machines/Fabricator.cs
+++ b/Subsurface/Source/Items/Components/Machines/Fabricator.cs
@@ -20,12 +20,12 @@ namespace Barotrauma.Items.Components
public FabricableItem(XElement element)
{
- string name = ToolBox.GetAttributeString(element, "name", "").ToLower();
+ string name = ToolBox.GetAttributeString(element, "name", "");
- TargetItem = ItemPrefab.list.Find(ip => ip.Name.ToLower() == name) as ItemPrefab;
+ TargetItem = ItemPrefab.list.Find(ip => ip.Name.ToLower() == name.ToLower()) as ItemPrefab;
if (TargetItem == null)
{
- DebugConsole.ThrowError("Error in Fabricable Item! Item ''" + element.Name + "'' not found.");
+ DebugConsole.ThrowError("Error in fabricable item "+name+"! Item ''" + element.Name + "'' not found.");
return;
}
@@ -35,7 +35,12 @@ namespace Barotrauma.Items.Components
foreach (string requiredItemName in requiredItemNames)
{
ItemPrefab requiredItem = ItemPrefab.list.Find(ip => ip.Name.ToLower() == requiredItemName.Trim().ToLower()) as ItemPrefab;
- if (requiredItem == null) continue;
+ if (requiredItem == null)
+ {
+ DebugConsole.ThrowError("Error in fabricable item " + name + "! Required item ''" + requiredItemName + "'' not found.");
+
+ continue;
+ }
var existing = RequiredItems.Find(r => r.Item1 == requiredItem);
diff --git a/Subsurface/Source/Items/Components/Machines/OxygenGenerator.cs b/Subsurface/Source/Items/Components/Machines/OxygenGenerator.cs
index 3c9834d64..d519fc762 100644
--- a/Subsurface/Source/Items/Components/Machines/OxygenGenerator.cs
+++ b/Subsurface/Source/Items/Components/Machines/OxygenGenerator.cs
@@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Xml.Linq;
+using System.Linq;
namespace Barotrauma.Items.Components
{
@@ -73,7 +74,7 @@ namespace Barotrauma.Items.Components
running = true;
- CurrFlow = Math.Min(voltage, 1.0f) * generatedAmount * 1000.0f;
+ CurrFlow = Math.Min(voltage, 1.0f) * generatedAmount*100.0f;
item.CurrentHull.Oxygen += CurrFlow * deltaTime;
UpdateVents(CurrFlow);
@@ -88,7 +89,9 @@ namespace Barotrauma.Items.Components
}
private void GetVents()
- {
+ {
+ ventList.Clear();
+
foreach (MapEntity entity in item.linkedTo)
{
Item linkedItem = entity as Item;
@@ -101,7 +104,7 @@ namespace Barotrauma.Items.Components
private void UpdateVents(float deltaOxygen)
{
- if (ventList.Count == 0) return;
+ if (!ventList.Any()) return;
deltaOxygen = deltaOxygen / ventList.Count;
foreach (Vent v in ventList)
diff --git a/Subsurface/Source/Items/Components/Machines/Reactor.cs b/Subsurface/Source/Items/Components/Machines/Reactor.cs
index 520ff24f2..e79d5b9fd 100644
--- a/Subsurface/Source/Items/Components/Machines/Reactor.cs
+++ b/Subsurface/Source/Items/Components/Machines/Reactor.cs
@@ -161,16 +161,7 @@ namespace Barotrauma.Items.Components
IsActive = true;
- var button = new GUIButton(new Rectangle(410, 70, 40,40), "+", GUI.Style, GuiFrame);
- button.OnPressed = () =>
- {
- unsentChanges = true;
- ShutDownTemp += 100.0f;
-
- return true;
- };
-
- button = new GUIButton(new Rectangle(460, 70, 40, 40), "-", GUI.Style, GuiFrame);
+ var button = new GUIButton(new Rectangle(410, 70, 40, 40), "-", GUI.Style, GuiFrame);
button.OnPressed = () =>
{
unsentChanges = true;
@@ -179,6 +170,15 @@ namespace Barotrauma.Items.Components
return true;
};
+ button = new GUIButton(new Rectangle(460, 70, 40,40), "+", GUI.Style, GuiFrame);
+ button.OnPressed = () =>
+ {
+ unsentChanges = true;
+ ShutDownTemp += 100.0f;
+
+ return true;
+ };
+
autoTempTickBox = new GUITickBox(new Rectangle(410, 170, 20, 20), "Automatic temperature control", Alignment.TopLeft, GuiFrame);
autoTempTickBox.OnSelected = ToggleAutoTemp;
@@ -453,7 +453,7 @@ namespace Barotrauma.Items.Components
DrawGraph(loadGraph, spriteBatch,
new Rectangle(x + 30, y + 30, 400, 250), 10000.0f, xOffset, Color.Yellow);
- spriteBatch.DrawString(GUI.Font, "Shutdown Temperature: " + shutDownTemp, new Vector2(x + 450, y + 80), Color.White);
+ spriteBatch.DrawString(GUI.Font, "Shutdown Temperature: " + (int)shutDownTemp, new Vector2(x + 450, y + 80), Color.White);
//spriteBatch.DrawString(GUI.Font, "Automatic Temperature Control: " + ((autoTemp) ? "ON" : "OFF"), new Vector2(x + 450, y + 180), Color.White);
diff --git a/Subsurface/Source/Items/Components/Power/PowerContainer.cs b/Subsurface/Source/Items/Components/Power/PowerContainer.cs
index 2de7c6d51..cb330400c 100644
--- a/Subsurface/Source/Items/Components/Power/PowerContainer.cs
+++ b/Subsurface/Source/Items/Components/Power/PowerContainer.cs
@@ -77,7 +77,7 @@ namespace Barotrauma.Items.Components
var button = new GUIButton(new Rectangle(160, 50, 30,30), "-", GUI.Style, GuiFrame);
button.OnClicked = (GUIButton btn, object obj) =>
{
- rechargeSpeed = Math.Max(rechargeSpeed - maxRechargeSpeed * 0.1f, 0.0f);
+ RechargeSpeed = Math.Max(rechargeSpeed - maxRechargeSpeed * 0.1f, 0.0f);
item.NewComponentEvent(this, true, false);
return true;
@@ -86,7 +86,7 @@ namespace Barotrauma.Items.Components
button = new GUIButton(new Rectangle(200, 50, 30, 30), "+", GUI.Style, GuiFrame);
button.OnClicked = (GUIButton btn, object obj) =>
{
- rechargeSpeed = Math.Max(rechargeSpeed + maxRechargeSpeed * 0.1f, 0.0f);
+ RechargeSpeed = Math.Max(rechargeSpeed + maxRechargeSpeed * 0.1f, 0.0f);
item.NewComponentEvent(this, true, false);
return true;
@@ -213,8 +213,8 @@ namespace Barotrauma.Items.Components
public override bool FillNetworkData(Networking.NetworkEventType type, Lidgren.Network.NetBuffer message)
{
- message.WriteRangedSingle(MathHelper.Clamp(rechargeSpeed/MaxRechargeSpeed, 0.0f, 1.0f), 0.0f, 1.0f, 8);
- message.WriteRangedSingle(MathHelper.Clamp(charge/capacity,0.0f, 1.0f), 0.0f, 1.0f, 8);
+ message.WriteRangedSingle(MathHelper.Clamp(rechargeSpeed / MaxRechargeSpeed, 0.0f, 1.0f), 0.0f, 1.0f, 8);
+ message.WriteRangedSingle(MathHelper.Clamp(charge / capacity, 0.0f, 1.0f), 0.0f, 1.0f, 8);
return true;
}
diff --git a/Subsurface/Source/Items/Item.cs b/Subsurface/Source/Items/Item.cs
index 0f46d2664..d9ef618a6 100644
--- a/Subsurface/Source/Items/Item.cs
+++ b/Subsurface/Source/Items/Item.cs
@@ -203,6 +203,12 @@ namespace Barotrauma
get { return prefab.ConfigFile; }
}
+ public bool Removed
+ {
+ get;
+ private set;
+ }
+
//which type of inventory slots (head, torso, any, etc) the item can be placed in
public List AllowedSlots
{
@@ -1504,6 +1510,8 @@ namespace Barotrauma
{
base.Remove();
+ Removed = true;
+
//sprite.Remove();
//if (body != null) body.Remove();
diff --git a/Subsurface/Source/Map/Explosion.cs b/Subsurface/Source/Map/Explosion.cs
index 91dbfe117..329e3c5e8 100644
--- a/Subsurface/Source/Map/Explosion.cs
+++ b/Subsurface/Source/Map/Explosion.cs
@@ -30,7 +30,7 @@ namespace Barotrauma
shockwave = ToolBox.GetAttributeBool(element, "shockwave", true);
flames = ToolBox.GetAttributeBool(element, "flames", true);
- CameraShake = ToolBox.GetAttributeFloat(element, "camerashake", attack.Range);
+ CameraShake = ToolBox.GetAttributeFloat(element, "camerashake", attack.Range*0.1f);
}
public void Explode(Vector2 worldPosition)
diff --git a/Subsurface/Source/Map/TransitionCinematic.cs b/Subsurface/Source/Map/TransitionCinematic.cs
index e0ba932c5..c161ce65b 100644
--- a/Subsurface/Source/Map/TransitionCinematic.cs
+++ b/Subsurface/Source/Map/TransitionCinematic.cs
@@ -59,6 +59,8 @@ namespace Barotrauma
yield return new WaitForSeconds(0.1f);
GUI.ScreenOverlayColor = Color.TransparentBlack;
+
+ Running = false;
yield return CoroutineStatus.Success;
}
diff --git a/Subsurface/Source/Screens/EditMapScreen.cs b/Subsurface/Source/Screens/EditMapScreen.cs
index 24884605d..f10f5b324 100644
--- a/Subsurface/Source/Screens/EditMapScreen.cs
+++ b/Subsurface/Source/Screens/EditMapScreen.cs
@@ -83,8 +83,8 @@ namespace Barotrauma
//nameBox.OnEnterPressed = ChangeSubName;
nameBlock.TextGetter = GetSubName;
- GUIButton button = new GUIButton(new Rectangle(0,70,0,20), "Save", GUI.Style, GUIpanel);
- button.OnClicked = SaveSub;
+ //GUIButton button = new GUIButton(new Rectangle(0,70,0,20), "Save", GUI.Style, GUIpanel);
+ //button.OnClicked = SaveSub;
GUITextBlock itemCount = new GUITextBlock(new Rectangle(0, 100, 0, 20), "", GUI.Style, GUIpanel);
itemCount.TextGetter = GetItemCount;
@@ -161,7 +161,7 @@ namespace Barotrauma
}
y+=50;
- button = new GUIButton(new Rectangle(0, y, 0, 20), "Character mode", Alignment.Left, GUI.Style, GUIpanel);
+ var button = new GUIButton(new Rectangle(0, y, 0, 20), "Character mode", Alignment.Left, GUI.Style, GUIpanel);
button.ToolTip = "Allows you to pick up and use items. Useful for things such as placing items inside closets, turning devices on/off and doing the wiring.";
button.OnClicked = ToggleCharacterMode;
diff --git a/Subsurface/Source/Screens/MainMenuScreen.cs b/Subsurface/Source/Screens/MainMenuScreen.cs
index 06eeff66c..547c6382a 100644
--- a/Subsurface/Source/Screens/MainMenuScreen.cs
+++ b/Subsurface/Source/Screens/MainMenuScreen.cs
@@ -130,14 +130,14 @@ namespace Barotrauma
maxPlayersBox.Text = "8";
maxPlayersBox.Enabled = false;
- var plusPlayersBox = new GUIButton(new Rectangle(230, 100, 30, 30), "+", GUI.Style, menuTabs[(int)Tab.HostServer]);
- plusPlayersBox.UserData = 1;
- plusPlayersBox.OnClicked = ChangeMaxPlayers;
-
var minusPlayersBox = new GUIButton(new Rectangle(160, 100, 30, 30), "-", GUI.Style, menuTabs[(int)Tab.HostServer]);
minusPlayersBox.UserData = -1;
minusPlayersBox.OnClicked = ChangeMaxPlayers;
+ var plusPlayersBox = new GUIButton(new Rectangle(230, 100, 30, 30), "+", GUI.Style, menuTabs[(int)Tab.HostServer]);
+ plusPlayersBox.UserData = 1;
+ plusPlayersBox.OnClicked = ChangeMaxPlayers;
+
new GUITextBlock(new Rectangle(0, 150, 0, 30), "Password (optional):", GUI.Style, Alignment.TopLeft, Alignment.Left, menuTabs[(int)Tab.HostServer]);
passwordBox = new GUITextBox(new Rectangle(160, 150, 200, 30), null, null, Alignment.TopLeft, Alignment.Left, GUI.Style, menuTabs[(int)Tab.HostServer]);
diff --git a/Subsurface/Source/Screens/NetLobbyScreen.cs b/Subsurface/Source/Screens/NetLobbyScreen.cs
index a89c08ce6..2b41a7f4e 100644
--- a/Subsurface/Source/Screens/NetLobbyScreen.cs
+++ b/Subsurface/Source/Screens/NetLobbyScreen.cs
@@ -262,7 +262,7 @@ namespace Barotrauma
traitorProbabilityButtons[0] = new GUIButton(new Rectangle(columnX, 205, 20, 20), "<", GUI.Style, infoFrame);
traitorProbabilityButtons[0].UserData = -1;
- traitorProbabilityText = new GUITextBlock(new Rectangle(columnX, 205, 120, 20), "No", null,null, Alignment.TopCenter, GUI.Style, infoFrame);
+ traitorProbabilityText = new GUITextBlock(new Rectangle(columnX+20, 205, 80, 20), "No", null,null, Alignment.TopCenter, GUI.Style, infoFrame);
traitorProbabilityButtons[1] = new GUIButton(new Rectangle(columnX + 100, 205, 20, 20), ">", GUI.Style, infoFrame);
traitorProbabilityButtons[1].UserData = 1;
diff --git a/Subsurface_Solution.v12.suo b/Subsurface_Solution.v12.suo
index 79c467196..a7c6b9d3c 100644
Binary files a/Subsurface_Solution.v12.suo and b/Subsurface_Solution.v12.suo differ