Replace '' (two single quotes) with \" (double quote)

We must correct post-traumatic Blitz disorder
This commit is contained in:
juanjp600
2016-09-24 21:26:08 -03:00
parent f21000124b
commit d537e8795a
50 changed files with 120 additions and 120 deletions
+2 -2
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;
}
@@ -248,7 +248,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();
@@ -935,7 +935,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))
{
+3 -3
View File
@@ -443,14 +443,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
@@ -618,7 +618,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 "";
}
}
+1 -1
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;
}
+1 -1
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");
}
+1 -1
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.");
}
}
+1 -1
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;
}
+1 -1
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;
}
}
+5 -5
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;
@@ -673,7 +673,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");
@@ -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;
}
+2 -2
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;
}
+2 -2
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;
}
+1 -1
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;
}
+1 -1
View File
@@ -191,7 +191,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);
@@ -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;
}
@@ -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")
{
@@ -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");
+1 -1
View File
@@ -336,7 +336,7 @@ namespace Barotrauma
}
catch
{
DebugConsole.ThrowError("Saving gamesession to ''" + filePath + "'' failed!");
DebugConsole.ThrowError("Saving gamesession to \"" + filePath + "\" failed!");
}
}
}
@@ -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
+1 -1
View File
@@ -207,7 +207,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);
}
}
@@ -298,7 +298,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(
@@ -314,7 +314,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;
}
@@ -754,13 +754,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;
}
@@ -771,13 +771,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;
}
@@ -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);
@@ -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;
}
@@ -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;
}
@@ -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;
}
@@ -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
+1 -1
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;
+1 -1
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;
+13 -13
View File
@@ -609,7 +609,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Saving submarine ''" + filePath + "'' failed!", e);
DebugConsole.ThrowError("Saving submarine \"" + filePath + "\" failed!", e);
return false;
}
@@ -647,7 +647,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)
@@ -668,7 +668,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\".");
}
}
@@ -687,7 +687,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;
}
}
@@ -702,7 +702,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Couldn't open directory ''" + SavePath + "''!", e);
DebugConsole.ThrowError("Couldn't open directory \"" + SavePath + "\"!", e);
return;
}
@@ -714,7 +714,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Couldn't open subdirectory ''" + subDirectory + "''!", e);
DebugConsole.ThrowError("Couldn't open subdirectory \"" + subDirectory + "\"!", e);
return;
}
}
@@ -757,7 +757,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Loading submarine ''" + file + "'' failed!", e);
DebugConsole.ThrowError("Loading submarine \"" + file + "\" failed!", e);
return null;
}
@@ -771,7 +771,7 @@ namespace Barotrauma
catch (Exception e)
{
DebugConsole.ThrowError("Loading submarine ''" + file + "'' failed! ("+e.Message+")");
DebugConsole.ThrowError("Loading submarine \"" + file + "\" failed! ("+e.Message+")");
return null;
}
}
@@ -784,13 +784,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;
}
@@ -836,13 +836,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;
}
@@ -853,7 +853,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);
}
}
+1 -1
View File
@@ -311,7 +311,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;
@@ -94,7 +94,7 @@ namespace Barotrauma.Networking
}
catch (Exception e)
{
ErrorMessage = "Error while receiving file ''"+FileName+"'' {"+e.Message+"}";
ErrorMessage = "Error while receiving file \""+FileName+"\" {"+e.Message+"}";
DeleteFile();
if (onFinished != null) onFinished(this);
@@ -111,13 +111,13 @@ namespace Barotrauma.Networking
if (type != (byte)fileType)
{
ErrorMessage = "Unexpected file type ''" + type + "'' (expected " + fileType + ")";
ErrorMessage = "Unexpected file type \"" + type + "\" (expected " + fileType + ")";
return false;
}
if (!Regex.Match(fileName, @"^[\w\- ]+[\w\-. ]*$").Success)
{
ErrorMessage = "Illegal characters in file name ''" + fileName + "''";
ErrorMessage = "Illegal characters in file name \"" + fileName + "\"";
return false;
}
@@ -126,7 +126,7 @@ namespace Barotrauma.Networking
case (byte)FileTransferMessageType.Submarine:
if (Path.GetExtension(fileName) != ".sub")
{
ErrorMessage = "Wrong file extension ''" + Path.GetExtension(fileName) + "''! (Expected .sub)";
ErrorMessage = "Wrong file extension \"" + Path.GetExtension(fileName) + "\"! (Expected .sub)";
return false;
}
break;
@@ -159,7 +159,7 @@ namespace Barotrauma.Networking
}
catch (Exception e)
{
DebugConsole.ThrowError("Couldn't delete file ''" + file + "''!", e);
DebugConsole.ThrowError("Couldn't delete file \"" + file + "\"!", e);
}
}
}
@@ -256,13 +256,13 @@ namespace Barotrauma.Networking
}
catch (Exception e)
{
ErrorMessage = "Loading submarine ''" + file + "'' failed! {"+ e.Message + "}";
ErrorMessage = "Loading submarine \"" + file + "\" failed! {"+ e.Message + "}";
return false;
}
if (stream == null)
{
ErrorMessage = "Decompressing submarine file''" + file + "'' failed!";
ErrorMessage = "Decompressing submarine file\"" + file + "\" failed!";
return false;
}
@@ -287,7 +287,7 @@ namespace Barotrauma.Networking
stream.Close();
stream.Dispose();
ErrorMessage = "Parsing file ''"+file+"'' failed! The file may not be a valid submarine file.";
ErrorMessage = "Parsing file \""+file+"\" failed! The file may not be a valid submarine file.";
return false;
}
@@ -67,7 +67,7 @@ namespace Barotrauma.Networking
{
if (!File.Exists(filePath))
{
DebugConsole.ThrowError("Sending a file failed. File ''"+filePath+"'' not found.");
DebugConsole.ThrowError("Sending a file failed. File \""+filePath+"\" not found.");
return null;
}
@@ -80,7 +80,7 @@ namespace Barotrauma.Networking
catch (Exception e)
{
DebugConsole.ThrowError("Couldn't open file ''"+filePath+"''",e);
DebugConsole.ThrowError("Couldn't open file \""+filePath+"\"",e);
}
return sender;
+7 -7
View File
@@ -143,7 +143,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;
}
@@ -174,9 +174,9 @@ namespace Barotrauma.Networking
}
String sendPw = "";
if (password.Length>0)
{
sendPw = Encoding.UTF8.GetString(NetUtility.ComputeSHAHash(Encoding.UTF8.GetBytes(password)));
if (password.Length>0)
{
sendPw = Encoding.UTF8.GetString(NetUtility.ComputeSHAHash(Encoding.UTF8.GetBytes(password)));
}
CoroutineManager.StartCoroutine(WaitForStartingInfo(sendPw));
@@ -742,7 +742,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;
}
@@ -782,7 +782,7 @@ namespace Barotrauma.Networking
GameMain.GameScreen.Select();
AddChatMessage("Press TAB to chat. Use ''r;'' to talk through the radio.", ChatMessageType.Server);
AddChatMessage("Press TAB to chat. Use \"r;\" to talk through the radio.", ChatMessageType.Server);
//GameMain.GameSession.CrewManager.CreateCrewFrame(crew);
@@ -984,7 +984,7 @@ namespace Barotrauma.Networking
}
else if (receiver.Status == FileTransferStatus.Finished)
{
new GUIMessageBox("Download finished", "File ''" + receiver.FileName + "'' was downloaded succesfully.");
new GUIMessageBox("Download finished", "File \"" + receiver.FileName + "\" was downloaded succesfully.");
switch (receiver.FileType)
{
+4 -4
View File
@@ -973,12 +973,12 @@ namespace Barotrauma.Networking
if (myCharacter == null)
{
AddChatMessage("Press TAB to chat. Use ''d;'' to talk to dead players and spectators, "
+ "and ''player name;'' to only send the message to a specific player.", ChatMessageType.Server);
AddChatMessage("Press TAB to chat. Use \"d;\" to talk to dead players and spectators, "
+ "and \"player name;\" to only send the message to a specific player.", ChatMessageType.Server);
}
else
{
AddChatMessage("Press TAB to chat. Use ''r;'' to talk through the radio.", ChatMessageType.Server);
AddChatMessage("Press TAB to chat. Use \"r;\" to talk through the radio.", ChatMessageType.Server);
}
GameMain.NetLobbyScreen.StartButton.Enabled = true;
@@ -1578,7 +1578,7 @@ namespace Barotrauma.Networking
if (targetClient == null)
{
AddChatMessage("Player ''" + command + "'' not found!", ChatMessageType.Error);
AddChatMessage("Player \"" + command + "\" not found!", ChatMessageType.Error);
return;
}
}
@@ -140,7 +140,7 @@ namespace Barotrauma.Networking
}
else if (connectedClients.Any(c => c.name.ToLower() == name.ToLower() && c.Connection != inc.SenderConnection))
{
inc.SenderConnection.Disconnect("The name ''" + name + "'' is already in use. Please choose another name.");
inc.SenderConnection.Disconnect("The name \"" + name + "\" is already in use. Please choose another name.");
DebugConsole.NewMessage(name + " couldn't join the server (name already in use)", Color.Red);
return;
}
@@ -222,7 +222,7 @@ namespace Barotrauma.Networking
else if (connectedClients.Find(x => x.name == sender.name && x != sender) != null)
{
DisconnectClient(sender, sender.name + " was unable to connect to the server (name already in use)",
"The name ''" + sender.name + "'' is already in use. Please choose another name.");
"The name \"" + sender.name + "\" is already in use. Please choose another name.");
}
else
{
+1 -1
View File
@@ -215,7 +215,7 @@ namespace Barotrauma.Networking
if (e == null)
{
#if DEBUG
DebugConsole.ThrowError("Couldn't find an entity matching the ID ''" + id + "''");
DebugConsole.ThrowError("Couldn't find an entity matching the ID \"" + id + "\"");
#endif
return false;
}
@@ -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;
}
+1 -1
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.");
}
}
+2 -2
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;
+1 -1
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);
}
}
+3 -3
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;
}
@@ -569,7 +569,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Loading save ''"+saveFile+"'' failed", e);
DebugConsole.ThrowError("Loading save \""+saveFile+"\" failed", e);
return false;
}
+4 -4
View File
@@ -1179,24 +1179,24 @@ 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 + ". ";
}
string downloadMsg = string.IsNullOrEmpty(GameMain.Client.ActiveFileTransferName) ?
"Do you want to download the file from the server host?" :
"Do you want to download the file and cancel downloading ''" + GameMain.Client.ActiveFileTransferName + "''?";
"Do you want to download the file and cancel downloading \"" + GameMain.Client.ActiveFileTransferName + "\"?";
if (GUIMessageBox.MessageBoxes.Count>0)
{
+1 -1
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;
}
@@ -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)");
+1 -1
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;
}
+1 -1
View File
@@ -181,7 +181,7 @@ namespace Barotrauma
}
else
{
DebugConsole.ThrowError("Sprite ''"+file+"'' not found!");
DebugConsole.ThrowError("Sprite \""+file+"\" not found!");
}
return null;
+5 -5
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;
}
+1 -1
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;
}
+7 -7
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 "";
}
+2 -2
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;
}
}