Merge remote-tracking branch 'refs/remotes/barotrauma/master'

Conflicts:
	Subsurface/Source/Networking/FileStreamReceiver.cs
	Subsurface/Source/Networking/FileStreamSender.cs
	Subsurface/Source/Networking/GameClient.cs
	Subsurface/Source/Networking/GameServer.cs
	Subsurface/Source/Networking/GameServerLogin.cs
	Subsurface/Source/Networking/NetworkEvent.cs
	Subsurface/Source/Screens/NetLobbyScreen.cs
This commit is contained in:
juanjp600
2016-09-24 21:28:37 -03:00
45 changed files with 97 additions and 97 deletions

View File

@@ -273,7 +273,7 @@ namespace Launcher2
string exePath = Directory.GetCurrentDirectory() + "//" + executables[0];
if (!File.Exists(exePath))
{
ShowError("Error", "Couldn't find the executable ''" + exePath + "''!");
ShowError("Error", "Couldn't find the executable \"" + exePath + "\"!");
return false;
}
@@ -283,7 +283,7 @@ namespace Launcher2
}
catch (Exception exception)
{
ShowError("Error while opening executable ''" + exePath + "''", exception.Message);
ShowError("Error while opening executable \"" + exePath + "\"", exception.Message);
return false;
}

View File

@@ -252,7 +252,7 @@ namespace Barotrauma
refLimb = GetLimb(LimbType.Torso);
if (refLimb == null) refLimb = GetLimb(LimbType.Head);
if (refLimb == null) DebugConsole.ThrowError("Character ''" + character + "'' doesn't have a head or torso!");
if (refLimb == null) DebugConsole.ThrowError("Character \"" + character + "\" doesn't have a head or torso!");
UpdateCollisionCategories();
@@ -960,7 +960,7 @@ namespace Barotrauma
//clamp the magnitude of the correction movement between 0.5f - 5.0f
Vector2 newCorrectionMovement = Vector2.Normalize(diff) * MathHelper.Clamp(dist * 2.0f, 0.5f, 5.0f);
//heading in the right direction -> use the ''normal'' movement if it's faster than correctionMovement
//heading in the right direction -> use the \"normal\" movement if it's faster than correctionMovement
//i.e. the character is close to the targetposition but the character is still running
if (Math.Sign(targetMovement.X) == Math.Sign(newCorrectionMovement.X))
{

View File

@@ -457,14 +457,14 @@ namespace Barotrauma
if (!System.IO.File.Exists(file))
{
DebugConsole.ThrowError("Spawning a character failed - file ''"+file+"'' not found!");
DebugConsole.ThrowError("Spawning a character failed - file \""+file+"\" not found!");
return null;
}
}
#else
if (!System.IO.File.Exists(file))
{
DebugConsole.ThrowError("Spawning a character failed - file ''"+file+"'' not found!");
DebugConsole.ThrowError("Spawning a character failed - file \""+file+"\" not found!");
return null;
}
#endif
@@ -632,7 +632,7 @@ namespace Barotrauma
if (humanConfigFile == null)
{
DebugConsole.ThrowError("Couldn't find a config file for humans from the selected content package!");
DebugConsole.ThrowError("(The config file must end with ''human.xml'')");
DebugConsole.ThrowError("(The config file must end with \"human.xml\")");
return "";
}
}

View File

@@ -101,7 +101,7 @@ namespace Barotrauma
ItemPrefab itemPrefab = ItemPrefab.list.Find(ip => ip.Name == itemName) as ItemPrefab;
if (itemPrefab == null)
{
DebugConsole.ThrowError("Tried to spawn ''" + Name + "'' with the item ''" + itemName + "''. Matching item prefab not found.");
DebugConsole.ThrowError("Tried to spawn \"" + Name + "\" with the item \"" + itemName + "\". Matching item prefab not found.");
return;
}

View File

@@ -236,7 +236,7 @@ namespace Barotrauma
catch
{
type = LimbType.None;
DebugConsole.ThrowError("Error in "+element+"! ''"+element.Attribute("type").Value+"'' is not a valid limb type");
DebugConsole.ThrowError("Error in "+element+"! \""+element.Attribute("type").Value+"\" is not a valid limb type");
}

View File

@@ -316,7 +316,7 @@ namespace Barotrauma
}
else
{
DebugConsole.ThrowError("Couldn't apply value "+value.ToString()+" ("+type+") to property ''"+property.Name+"'' ("+property.GetValue().GetType()+")! "
DebugConsole.ThrowError("Couldn't apply value "+value.ToString()+" ("+type+") to property \""+property.Name+"\" ("+property.GetValue().GetType()+")! "
+"Make sure the type of the value set in the config files matches the type of the property.");
}
}

View File

@@ -61,7 +61,7 @@ namespace Barotrauma
if (doc==null)
{
DebugConsole.ThrowError("Couldn't load content package ''"+filePath+"''!");
DebugConsole.ThrowError("Couldn't load content package \""+filePath+"\"!");
return;
}

View File

@@ -75,7 +75,7 @@ namespace Barotrauma
return true;
case CoroutineStatus.Failure:
DebugConsole.ThrowError("Coroutine ''" + handle.Name + "'' has failed");
DebugConsole.ThrowError("Coroutine \"" + handle.Name + "\" has failed");
return true;
}
}

View File

@@ -65,7 +65,7 @@ namespace Barotrauma
textBox.Color = Color.Black * 0.7f;
NewMessage("Press F3 to open/close the debug console", Color.Cyan);
NewMessage("Enter ''help'' for a list of available console commands", Color.Cyan);
NewMessage("Enter \"help\" for a list of available console commands", Color.Cyan);
}
@@ -163,7 +163,7 @@ namespace Barotrauma
#if !DEBUG
if (GameMain.Client != null && !IsCommandPermitted(commands[0].ToLowerInvariant(), GameMain.Client))
{
ThrowError("You're not permitted to use the command ''" + commands[0].ToLowerInvariant()+"''!");
ThrowError("You're not permitted to use the command \"" + commands[0].ToLowerInvariant()+"\"!");
return;
}
#endif
@@ -172,7 +172,7 @@ namespace Barotrauma
{
case "help":
NewMessage("menu: go to main menu", Color.Cyan);
NewMessage("game: enter the ''game screen''", Color.Cyan);
NewMessage("game: enter the \"game screen\"", Color.Cyan);
NewMessage("edit: switch to submarine editor", Color.Cyan);
NewMessage("edit [submarine name]: load a submarine and switch to submarine editor", Color.Cyan);
NewMessage("load [submarine name]: load a submarine", Color.Cyan);
@@ -212,7 +212,7 @@ namespace Barotrauma
NewMessage("kick [name]: kick a player out from the server", Color.Cyan);
NewMessage("ban [name]: kick and ban the player from the server", Color.Cyan);
NewMessage("banip [IP address]: ban the IP address from the server", Color.Cyan);
NewMessage("debugdraw: toggles the ''debug draw mode''", Color.Cyan);
NewMessage("debugdraw: toggles the \"debug draw mode\"", Color.Cyan);
NewMessage("netstats: toggles the visibility of the network statistics panel", Color.Cyan);
break;
@@ -661,7 +661,7 @@ namespace Barotrauma
if (GameMain.Config.MasterServerUrl != "http://www.undertowgames.com/baromaster")
{
DebugConsole.ThrowError("MasterServerUrl ''"+GameMain.Config.MasterServerUrl+"''!");
DebugConsole.ThrowError("MasterServerUrl \""+GameMain.Config.MasterServerUrl+"\"!");
}
GameMain.Config.Save("config.xml");

View File

@@ -50,7 +50,7 @@ namespace Barotrauma
ItemPrefab itemPrefab = ItemPrefab.list.Find(ip => ip.Name == itemName) as ItemPrefab;
if (itemPrefab==null)
{
DebugConsole.ThrowError("Couldn't spawn item for cargo mission: item prefab ''"+element.Name.ToString()+"'' not found");
DebugConsole.ThrowError("Couldn't spawn item for cargo mission: item prefab \""+element.Name.ToString()+"\" not found");
return;
}

View File

@@ -173,13 +173,13 @@ namespace Barotrauma
t = Type.GetType("Barotrauma." + type, true, true);
if (t == null)
{
DebugConsole.ThrowError("Error in " + configFile + "! Could not find a mission class of the type ''" + type + "''.");
DebugConsole.ThrowError("Error in " + configFile + "! Could not find a mission class of the type \"" + type + "\".");
continue;
}
}
catch
{
DebugConsole.ThrowError("Error in " + configFile + "! Could not find a mission class of the type ''" + type + "''.");
DebugConsole.ThrowError("Error in " + configFile + "! Could not find a mission class of the type \"" + type + "\".");
continue;
}

View File

@@ -152,13 +152,13 @@ namespace Barotrauma
t = Type.GetType("Barotrauma." + type, true, true);
if (t == null)
{
DebugConsole.ThrowError("Error in " + configFile + "! Could not find an event class of the type ''" + type + "''.");
DebugConsole.ThrowError("Error in " + configFile + "! Could not find an event class of the type \"" + type + "\".");
continue;
}
}
catch
{
DebugConsole.ThrowError("Error in " + configFile + "! Could not find an event class of the type ''" + type + "''.");
DebugConsole.ThrowError("Error in " + configFile + "! Could not find an event class of the type \"" + type + "\".");
continue;
}

View File

@@ -17,7 +17,7 @@ namespace Barotrauma
try { doc = XDocument.Load(file); }
catch (Exception e)
{
DebugConsole.ThrowError("Loading style ''" + file + "'' failed", e);
DebugConsole.ThrowError("Loading style \"" + file + "\" failed", e);
return;
}

View File

@@ -203,7 +203,7 @@ namespace Barotrauma
GUIComponent.Init(Window);
DebugConsole.Init(Window);
DebugConsole.Log(SelectedPackage == null ? "No content package selected" : "Content package ''" + SelectedPackage.Name + "'' selected");
DebugConsole.Log(SelectedPackage == null ? "No content package selected" : "Content package \"" + SelectedPackage.Name + "\" selected");
yield return CoroutineStatus.Running;
LightManager = new Lights.LightManager(GraphicsDevice);

View File

@@ -109,7 +109,7 @@ namespace Barotrauma.Tutorials
yield return new WaitForSeconds(0.5f);
infoBox = CreateInfoFrame("The reactor core has started generating heat, which in turn generates power for the submarine. The power generation is very low at the moment,"
+ " because the reactor is set to shut itself down when the temperature rises above 500 degrees Celsius. You can adjust the temperature limit by changing the ''Shutdown Temperature'' in the control panel.", true);
+ " because the reactor is set to shut itself down when the temperature rises above 500 degrees Celsius. You can adjust the temperature limit by changing the \"Shutdown Temperature\" in the control panel.", true);
while (infoBox != null)
{
@@ -130,7 +130,7 @@ namespace Barotrauma.Tutorials
}
yield return new WaitForSeconds(0.5f);
infoBox = CreateInfoFrame("Looks like we're up and running! Now you should turn on the ''Automatic temperature control'', which will make the reactor "
infoBox = CreateInfoFrame("Looks like we're up and running! Now you should turn on the \"Automatic temperature control\", which will make the reactor "
+ "automatically adjust the temperature to a suitable level. Even though it's an easy way to keep the reactor up and running most of the time, "
+ "you should keep in mind that it changes the temperature very slowly and carefully, which may cause issues if there are sudden changes in grid load.");
@@ -256,7 +256,7 @@ namespace Barotrauma.Tutorials
yield return CoroutineStatus.Running;
}
infoBox = CreateInfoFrame("You can take a look at the area around the sub by selecting the ''Sonar'' checkbox.");
infoBox = CreateInfoFrame("You can take a look at the area around the sub by selecting the \"Sonar\" checkbox.");
while (!radar.IsActive)
{
@@ -555,7 +555,7 @@ namespace Barotrauma.Tutorials
brokenBox = Character.Controlled.SelectedConstruction;
infoBox = CreateInfoFrame("Here's our problem: this junction box is broken. Luckily engineers are adept at fixing electrical devices - "
+"you just need to find a spare wire and click the ''Fix''-button to repair the box.");
+"you just need to find a spare wire and click the \"Fix\"-button to repair the box.");
break;
}

View File

@@ -18,14 +18,14 @@ namespace Barotrauma.Tutorials
yield return CoroutineStatus.Running;
}
infoBox = CreateInfoFrame("Press ''Structure'' at the left side of the screen to start placing some walls.");
infoBox = CreateInfoFrame("Press \"Structure\" at the left side of the screen to start placing some walls.");
while (GameMain.EditMapScreen.SelectedTab != (int)MapEntityCategory.Structure)
{
yield return CoroutineStatus.Running;
}
infoBox = CreateInfoFrame("Select ''topwall'' from the list.", true);
infoBox = CreateInfoFrame("Select \"topwall\" from the list.", true);
while (MapEntityPrefab.Selected == null || MapEntityPrefab.Selected.Name != "topwall")
{

View File

@@ -52,7 +52,7 @@ namespace Barotrauma.Tutorials
WayPoint wayPoint = WayPoint.GetRandom(SpawnType.Cargo, null);
if (wayPoint == null)
{
DebugConsole.ThrowError("A waypoint with the spawntype ''cargo'' is required for the tutorial event");
DebugConsole.ThrowError("A waypoint with the spawntype \"cargo\" is required for the tutorial event");
return;
}
@@ -65,7 +65,7 @@ namespace Barotrauma.Tutorials
var idCard = character.Inventory.FindItem("ID Card");
if (idCard == null)
{
DebugConsole.ThrowError("Item prefab ''ID Card'' not found!");
DebugConsole.ThrowError("Item prefab \"ID Card\" not found!");
return;
}
idCard.AddTag("com");

View File

@@ -336,7 +336,7 @@ namespace Barotrauma
}
catch
{
DebugConsole.ThrowError("Saving gamesession to ''" + filePath + "'' failed!");
DebugConsole.ThrowError("Saving gamesession to \"" + filePath + "\" failed!");
}
}
}

View File

@@ -44,7 +44,7 @@ namespace Barotrauma
if (!infoTexts.TryGetValue(infoName.ToLowerInvariant(), out infoList) || !infoList.Any())
{
#if DEBUG
return "Info text ''" + infoName + "'' not found";
return "Info text \"" + infoName + "\" not found";
#else
return "";
#endif

View File

@@ -210,7 +210,7 @@ namespace Barotrauma
{
if (keyMapping[(int)inputType]==null)
{
DebugConsole.ThrowError("Key binding for the input type ''" + inputType + " not set!");
DebugConsole.ThrowError("Key binding for the input type \"" + inputType + " not set!");
keyMapping[(int)inputType] = new KeyOrMouse(Keys.D1);
}
}

View File

@@ -304,7 +304,7 @@ namespace Barotrauma.Items.Components
}
catch
{
DebugConsole.ThrowError("Error in " + element + "! ''" + element.Attribute("type").Value + "'' is not a valid alignment");
DebugConsole.ThrowError("Error in " + element + "! \"" + element.Attribute("type").Value + "\" is not a valid alignment");
}
guiFrame = new GUIFrame(
@@ -320,7 +320,7 @@ namespace Barotrauma.Items.Components
if (filePath == "")
{
DebugConsole.ThrowError("Error when instantiating item ''"+item.Name+"'' - sound with no file path set");
DebugConsole.ThrowError("Error when instantiating item \""+item.Name+"\" - sound with no file path set");
continue;
}
@@ -732,13 +732,13 @@ namespace Barotrauma.Items.Components
t = Type.GetType("Barotrauma.Items.Components." + type + "", false, true);
if (t == null)
{
if (errorMessages) DebugConsole.ThrowError("Could not find the component ''" + type + "'' (" + file + ")");
if (errorMessages) DebugConsole.ThrowError("Could not find the component \"" + type + "\" (" + file + ")");
return null;
}
}
catch (Exception e)
{
if (errorMessages) DebugConsole.ThrowError("Could not find the component ''" + type + "'' (" + file + ")", e);
if (errorMessages) DebugConsole.ThrowError("Could not find the component \"" + type + "\" (" + file + ")", e);
return null;
}
@@ -749,13 +749,13 @@ namespace Barotrauma.Items.Components
constructor = t.GetConstructor(new Type[] { typeof(Item), typeof(XElement) });
if (constructor == null)
{
DebugConsole.ThrowError("Could not find the constructor of the component ''" + type + "'' (" + file + ")");
DebugConsole.ThrowError("Could not find the constructor of the component \"" + type + "\" (" + file + ")");
return null;
}
}
catch (Exception e)
{
DebugConsole.ThrowError("Could not find the constructor of the component ''" + type + "'' (" + file + ")", e);
DebugConsole.ThrowError("Could not find the constructor of the component \"" + type + "\" (" + file + ")", e);
return null;
}

View File

@@ -65,7 +65,7 @@ namespace Barotrauma.Items.Components
var itemPrefab = ItemPrefab.list.FirstOrDefault(ip => ip.Name.ToLowerInvariant() == deconstructProduct.ItemPrefabName.ToLowerInvariant()) as ItemPrefab;
if (itemPrefab==null)
{
DebugConsole.ThrowError("Tried to deconstruct item ''"+targetItem.Name+"'' but couldn't find item prefab ''"+deconstructProduct+"''!");
DebugConsole.ThrowError("Tried to deconstruct item \""+targetItem.Name+"\" but couldn't find item prefab \""+deconstructProduct+"\"!");
continue;
}
Item.Spawner.QueueItem(itemPrefab, containers[1].Inventory);

View File

@@ -25,7 +25,7 @@ namespace Barotrauma.Items.Components
TargetItem = ItemPrefab.list.Find(ip => ip.Name.ToLowerInvariant() == name.ToLowerInvariant()) as ItemPrefab;
if (TargetItem == null)
{
DebugConsole.ThrowError("Error in fabricable item "+name+"! Item ''" + element.Name + "'' not found.");
DebugConsole.ThrowError("Error in fabricable item "+name+"! Item \"" + element.Name + "\" not found.");
return;
}
@@ -43,7 +43,7 @@ namespace Barotrauma.Items.Components
ItemPrefab requiredItem = ItemPrefab.list.Find(ip => ip.Name.ToLowerInvariant() == requiredItemName.Trim().ToLowerInvariant()) as ItemPrefab;
if (requiredItem == null)
{
DebugConsole.ThrowError("Error in fabricable item " + name + "! Required item ''" + requiredItemName + "'' not found.");
DebugConsole.ThrowError("Error in fabricable item " + name + "! Required item \"" + requiredItemName + "\" not found.");
continue;
}

View File

@@ -80,7 +80,7 @@ namespace Barotrauma.Items.Components
if (subElement.Attribute("texture") == null)
{
DebugConsole.ThrowError("Item ''" + item.Name + "'' doesn't have a texture specified!");
DebugConsole.ThrowError("Item \"" + item.Name + "\" doesn't have a texture specified!");
return;
}

View File

@@ -34,21 +34,21 @@ namespace Barotrauma.RuinGeneration
if (Prefab == null)
{
DebugConsole.ThrowError("Loading ruin structure failed - structure prefab ''"+prefab+" not found");
DebugConsole.ThrowError("Loading ruin structure failed - structure prefab \""+prefab+" not found");
return;
}
string alignmentStr = ToolBox.GetAttributeString(element,"alignment","Bottom");
if (!Enum.TryParse<Alignment>(alignmentStr, true, out Alignment))
{
DebugConsole.ThrowError("Error in ruin structure ''"+prefab+"'' - "+alignmentStr+" is not a valid alignment");
DebugConsole.ThrowError("Error in ruin structure \""+prefab+"\" - "+alignmentStr+" is not a valid alignment");
}
string typeStr = ToolBox.GetAttributeString(element,"type","");
if (!Enum.TryParse<RuinStructureType>(typeStr,true, out Type))
{
DebugConsole.ThrowError("Error in ruin structure ''" + prefab + "'' - " + typeStr + " is not a valid type");
DebugConsole.ThrowError("Error in ruin structure \"" + prefab + "\" - " + typeStr + " is not a valid type");
return;
}

View File

@@ -20,7 +20,7 @@
of conditions and the following disclaimer in the documentation and/or other materials
provided with the distribution.
THIS SOFTWARE IS PROVIDED BY James Humphreys ``AS IS'' AND ANY EXPRESS OR IMPLIED
THIS SOFTWARE IS PROVIDED BY James Humphreys ``AS IS\" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR

View File

@@ -212,7 +212,7 @@ namespace Barotrauma
if (!File.Exists(pathBox.Text))
{
new GUIMessageBox("Error", "Submarine file ''" + pathBox.Text + "'' not found!");
new GUIMessageBox("Error", "Submarine file \"" + pathBox.Text + "\" not found!");
pathBox.Flash(Color.Red);
pathBox.Text = filePath;
return false;

View File

@@ -91,7 +91,7 @@ namespace Barotrauma
{
MapEntityPrefab ep = new MapEntityPrefab();
ep.name = "Hull";
ep.Description = "Hulls determine which parts are considered to be ''inside the sub''. Generally every room should be enclosed by a hull.";
ep.Description = "Hulls determine which parts are considered to be \"inside the sub\". Generally every room should be enclosed by a hull.";
ep.constructor = typeof(Hull).GetConstructor(new Type[] { typeof(MapEntityPrefab), typeof(Rectangle) });
ep.resizeHorizontal = true;
ep.resizeVertical = true;

View File

@@ -569,7 +569,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Saving submarine ''" + filePath + "'' failed!", e);
DebugConsole.ThrowError("Saving submarine \"" + filePath + "\" failed!", e);
return false;
}
@@ -607,7 +607,7 @@ namespace Barotrauma
{
if (!Hull.hullList.Any())
{
DebugConsole.ThrowError("No hulls found in the submarine. Hulls determine the ''borders'' of an individual room and are required for water and air distribution to work correctly.");
DebugConsole.ThrowError("No hulls found in the submarine. Hulls determine the \"borders\" of an individual room and are required for water and air distribution to work correctly.");
}
foreach (Item item in Item.ItemList)
@@ -628,7 +628,7 @@ namespace Barotrauma
if (WayPoint.WayPointList.Find(wp => wp.SpawnType == SpawnType.Cargo) == null)
{
DebugConsole.ThrowError("The submarine doesn't have spawnpoints for cargo (which are used for determining where to place bought items). "
+"To fix this, create a new spawnpoint and change its ''spawn type'' parameter to ''cargo''.");
+"To fix this, create a new spawnpoint and change its \"spawn type\" parameter to \"cargo\".");
}
}
@@ -647,7 +647,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Directory ''" + SavePath + "'' not found and creating the directory failed.", e);
DebugConsole.ThrowError("Directory \"" + SavePath + "\" not found and creating the directory failed.", e);
return;
}
}
@@ -662,7 +662,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Couldn't open directory ''" + SavePath + "''!", e);
DebugConsole.ThrowError("Couldn't open directory \"" + SavePath + "\"!", e);
return;
}
@@ -674,7 +674,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Couldn't open subdirectory ''" + subDirectory + "''!", e);
DebugConsole.ThrowError("Couldn't open subdirectory \"" + subDirectory + "\"!", e);
return;
}
}
@@ -717,7 +717,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Loading submarine ''" + file + "'' failed!", e);
DebugConsole.ThrowError("Loading submarine \"" + file + "\" failed!", e);
return null;
}
@@ -731,7 +731,7 @@ namespace Barotrauma
catch (Exception e)
{
DebugConsole.ThrowError("Loading submarine ''" + file + "'' failed! ("+e.Message+")");
DebugConsole.ThrowError("Loading submarine \"" + file + "\" failed! ("+e.Message+")");
return null;
}
}
@@ -744,13 +744,13 @@ namespace Barotrauma
catch (Exception e)
{
DebugConsole.ThrowError("Loading submarine ''" + file + "'' failed! (" + e.Message + ")");
DebugConsole.ThrowError("Loading submarine \"" + file + "\" failed! (" + e.Message + ")");
return null;
}
}
else
{
DebugConsole.ThrowError("Couldn't load submarine ''" + file + "! (Unrecognized file extension)");
DebugConsole.ThrowError("Couldn't load submarine \"" + file + "! (Unrecognized file extension)");
return null;
}
@@ -796,13 +796,13 @@ namespace Barotrauma
t = Type.GetType("Barotrauma." + typeName, true, true);
if (t == null)
{
DebugConsole.ThrowError("Error in " + filePath + "! Could not find a entity of the type ''" + typeName + "''.");
DebugConsole.ThrowError("Error in " + filePath + "! Could not find a entity of the type \"" + typeName + "\".");
continue;
}
}
catch (Exception e)
{
DebugConsole.ThrowError("Error in " + filePath + "! Could not find a entity of the type ''" + typeName + "''.", e);
DebugConsole.ThrowError("Error in " + filePath + "! Could not find a entity of the type \"" + typeName + "\".", e);
continue;
}
@@ -813,7 +813,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Could not find the method ''Load'' in " + t + ".", e);
DebugConsole.ThrowError("Could not find the method \"Load\" in " + t + ".", e);
}
}

View File

@@ -309,7 +309,7 @@ namespace Barotrauma
//should never be null when casting a line out from inside the bounding box
Debug.Assert(intersection != null);
//''+ translatedir'' in order to move the character slightly away from the wall
//\"+ translatedir\" in order to move the character slightly away from the wall
c.AnimController.SetPosition(ConvertUnits.ToSimUnits(c.WorldPosition + ((Vector2)intersection - limb.WorldPosition)) + translateDir);
return;

View File

@@ -131,7 +131,7 @@ namespace Barotrauma.Networking
}
catch
{
new GUIMessageBox("Could not connect to server", "Failed to resolve address ''"+serverIP+":"+Port+"''. Please make sure you have entered a valid IP address.");
new GUIMessageBox("Could not connect to server", "Failed to resolve address \""+serverIP+":"+Port+"\". Please make sure you have entered a valid IP address.");
return;
}
@@ -574,7 +574,7 @@ namespace Barotrauma.Networking
if (gameMode == null)
{
DebugConsole.ThrowError("Game mode ''" + modeName + "'' not found!");
DebugConsole.ThrowError("Game mode \"" + modeName + "\" not found!");
yield return CoroutineStatus.Success;
}

View File

@@ -58,7 +58,7 @@ namespace Barotrauma.Particles
if (prefab == null)
{
DebugConsole.ThrowError("Particle prefab ''" + prefabName+"'' not found!");
DebugConsole.ThrowError("Particle prefab \"" + prefabName+"\" not found!");
return null;
}

View File

@@ -97,7 +97,7 @@ namespace Barotrauma
sw.WriteLine(sb.ToString());
sw.Close();
CrashMessageBox( "A crash report (''crashreport.txt'') was saved in the root folder of the game."+
CrashMessageBox( "A crash report (\"crashreport.txt\") was saved in the root folder of the game."+
" If you'd like to help fix this bug, please post the report on the Undertow Games forums.");
}
}

View File

@@ -94,7 +94,7 @@ namespace Barotrauma
}
else
{
DebugConsole.ThrowError("Failed to set the value of the property ''" + Name + "'' of ''" + obj + "'' to " + value);
DebugConsole.ThrowError("Failed to set the value of the property \"" + Name + "\" of \"" + obj + "\" to " + value);
DebugConsole.ThrowError("(Type not implemented)");
return false;
@@ -109,7 +109,7 @@ namespace Barotrauma
if (property.PropertyType!= value.GetType())
{
DebugConsole.ThrowError("Failed to set the value of the property ''"+Name+"'' of ''"+obj.ToString()+"'' to "+value.ToString());
DebugConsole.ThrowError("Failed to set the value of the property \""+Name+"\" of \""+obj.ToString()+"\" to "+value.ToString());
DebugConsole.ThrowError("(Non-matching type, should be "+property.PropertyType+" instead of " +value.GetType()+")");
return false;

View File

@@ -485,7 +485,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Couldn't delete file ''"+sub.FilePath+"''!", e);
DebugConsole.ThrowError("Couldn't delete file \""+sub.FilePath+"\"!", e);
}
}

View File

@@ -192,7 +192,7 @@ namespace Barotrauma
passwordBox = new GUITextBox(new Rectangle(160, 150, 200, 30), null, null, Alignment.TopLeft, Alignment.Left, GUI.Style, menuTabs[(int)Tab.HostServer]);
isPublicBox = new GUITickBox(new Rectangle(10, 200, 20, 20), "Public server", Alignment.TopLeft, menuTabs[(int)Tab.HostServer]);
isPublicBox.ToolTip = "Public servers are shown in the list of available servers in the ''Join Server'' -tab";
isPublicBox.ToolTip = "Public servers are shown in the list of available servers in the \"Join Server\" -tab";
useUpnpBox = new GUITickBox(new Rectangle(10, 250, 20, 20), "Attempt UPnP port forwarding", Alignment.TopLeft, menuTabs[(int)Tab.HostServer]);
@@ -407,7 +407,7 @@ namespace Barotrauma
if (doc==null)
{
DebugConsole.ThrowError("Error loading save file ''"+fileName+"''. The file may be corrupted.");
DebugConsole.ThrowError("Error loading save file \""+fileName+"\". The file may be corrupted.");
return false;
}
@@ -573,7 +573,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Loading save ''"+saveFile+"'' failed", e);
DebugConsole.ThrowError("Loading save \""+saveFile+"\" failed", e);
return false;
}

View File

@@ -1174,17 +1174,17 @@ namespace Barotrauma
string errorMsg = "";
if (sub == null)
{
errorMsg = "Submarine ''" + subName + "'' was selected by the server. Matching file not found in your submarine folder. ";
errorMsg = "Submarine \"" + subName + "\" was selected by the server. Matching file not found in your submarine folder. ";
}
else if (sub.MD5Hash.Hash == null)
{
errorMsg = "Couldn't load submarine ''" + subName + "''. The file may be corrupted. ";
errorMsg = "Couldn't load submarine \"" + subName + "\". The file may be corrupted. ";
if (matchingListSub != null) matchingListSub.TextColor = Color.Red;
}
else
{
errorMsg = "Your version of the submarine file ''" + sub.Name + "'' doesn't match the server's version! "
errorMsg = "Your version of the submarine file \"" + sub.Name + "\" doesn't match the server's version! "
+ "Your MD5 hash: " + sub.MD5Hash.Hash + " \n"
+ "Server's MD5 hash: " + md5Hash + ". ";
}

View File

@@ -68,7 +68,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Failed to cast vote type ''"+voteTypeByte+"''", e);
DebugConsole.ThrowError("Failed to cast vote type \""+voteTypeByte+"\"", e);
return;
}

View File

@@ -255,7 +255,7 @@ namespace Barotrauma
switch (response.StatusCode)
{
case System.Net.HttpStatusCode.NotFound:
DebugConsole.ThrowError("Error while connecting to master server (404 - ''" + NetConfig.MasterServerUrl + "'' not found)");
DebugConsole.ThrowError("Error while connecting to master server (404 - \"" + NetConfig.MasterServerUrl + "\" not found)");
break;
case System.Net.HttpStatusCode.ServiceUnavailable:
DebugConsole.ThrowError("Error while connecting to master server (505 - Service Unavailable)");

View File

@@ -78,7 +78,7 @@ namespace Barotrauma
{
if (!File.Exists(file))
{
DebugConsole.ThrowError("File ''" + file + "'' not found!");
DebugConsole.ThrowError("File \"" + file + "\" not found!");
return null;
}

View File

@@ -181,7 +181,7 @@ namespace Barotrauma
}
else
{
DebugConsole.ThrowError("Sprite ''"+file+"'' not found!");
DebugConsole.ThrowError("Sprite \""+file+"\" not found!");
}
return null;

View File

@@ -110,7 +110,7 @@ namespace Barotrauma
catch (Exception e)
{
DebugConsole.ThrowError("ERROR: deleting save file ''"+fileName+" failed.", e);
DebugConsole.ThrowError("ERROR: deleting save file \""+fileName+" failed.", e);
}
}
@@ -119,14 +119,14 @@ namespace Barotrauma
{
if (!Directory.Exists(SaveFolder))
{
DebugConsole.ThrowError("Save folder ''" + SaveFolder + " not found! Attempting to create a new folder");
DebugConsole.ThrowError("Save folder \"" + SaveFolder + " not found! Attempting to create a new folder");
try
{
Directory.CreateDirectory(SaveFolder);
}
catch (Exception e)
{
DebugConsole.ThrowError("Failed to create the folder ''" + SaveFolder + "''!", e);
DebugConsole.ThrowError("Failed to create the folder \"" + SaveFolder + "\"!", e);
}
}
@@ -144,7 +144,7 @@ namespace Barotrauma
{
if (!Directory.Exists(SaveFolder))
{
DebugConsole.ThrowError("Save folder ''"+SaveFolder+"'' not found. Created new folder");
DebugConsole.ThrowError("Save folder \""+SaveFolder+"\" not found. Created new folder");
Directory.CreateDirectory(SaveFolder);
}
@@ -189,7 +189,7 @@ namespace Barotrauma
{
if (!File.Exists(fileName))
{
DebugConsole.ThrowError("File ''"+fileName+" doesn't exist!");
DebugConsole.ThrowError("File \""+fileName+" doesn't exist!");
return null;
}

View File

@@ -54,7 +54,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Loading texture ''"+path+"'' failed!", e);
DebugConsole.ThrowError("Loading texture \""+path+"\" failed!", e);
return null;
}

View File

@@ -36,7 +36,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Couldn't load xml document ''"+filePath+"''!", e);
DebugConsole.ThrowError("Couldn't load xml document \""+filePath+"\"!", e);
return null;
}
@@ -54,7 +54,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Loading font ''"+file+"'' failed", e);
DebugConsole.ThrowError("Loading font \""+file+"\" failed", e);
}
return font;
@@ -197,7 +197,7 @@ namespace Barotrauma
}
else
{
DebugConsole.ThrowError("Error in " + attribute.Value.ToString() + "! ''" + val + "'' is not a valid boolean value");
DebugConsole.ThrowError("Error in " + attribute.Value.ToString() + "! \"" + val + "\" is not a valid boolean value");
return false;
}
}
@@ -244,7 +244,7 @@ namespace Barotrauma
if (components.Length!=2)
{
if (!errorMessages) return vector;
DebugConsole.ThrowError("Failed to parse the string ''"+stringVector2+"'' to Vector2");
DebugConsole.ThrowError("Failed to parse the string \""+stringVector2+"\" to Vector2");
return vector;
}
@@ -267,7 +267,7 @@ namespace Barotrauma
if (components.Length < 3)
{
if (errorMessages) DebugConsole.ThrowError("Failed to parse the string ''" + stringVector4 + "'' to Vector4");
if (errorMessages) DebugConsole.ThrowError("Failed to parse the string \"" + stringVector4 + "\" to Vector4");
return vector;
}
@@ -488,7 +488,7 @@ namespace Barotrauma
if (lineCount == 0)
{
DebugConsole.ThrowError("File ''" + filePath + "'' is empty!");
DebugConsole.ThrowError("File \"" + filePath + "\" is empty!");
file.Close();
return "";
}
@@ -513,7 +513,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Couldn't open file ''" + filePath + "''!", e);
DebugConsole.ThrowError("Couldn't open file \"" + filePath + "\"!", e);
return "";
}

View File

@@ -189,7 +189,7 @@ namespace Barotrauma
catch (Exception e)
{
System.Diagnostics.Debug.WriteLine("Could not delete file ''" + file + "'' (" + e.Message + ")");
System.Diagnostics.Debug.WriteLine("Could not delete file \"" + file + "\" (" + e.Message + ")");
continue;
}
}
@@ -215,7 +215,7 @@ namespace Barotrauma
catch (Exception e)
{
System.Diagnostics.Debug.WriteLine("Could not delete file ''" + file + "'' (" + e.Message + ")");
System.Diagnostics.Debug.WriteLine("Could not delete file \"" + file + "\" (" + e.Message + ")");
continue;
}
}