diff --git a/Subsurface/Barotrauma.csproj b/Subsurface/Barotrauma.csproj
index 21105dc66..49b1d72d8 100644
--- a/Subsurface/Barotrauma.csproj
+++ b/Subsurface/Barotrauma.csproj
@@ -431,6 +431,9 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
@@ -849,8 +852,12 @@
PreserveNewest
+ Designer
+
+ PreserveNewest
+
PreserveNewest
@@ -1172,8 +1179,8 @@
-
+
diff --git a/Subsurface/Content/Items/Tools/tools.xml b/Subsurface/Content/Items/Tools/tools.xml
index 4df507e77..6682a8348 100644
--- a/Subsurface/Content/Items/Tools/tools.xml
+++ b/Subsurface/Content/Items/Tools/tools.xml
@@ -10,6 +10,7 @@
+
@@ -33,7 +34,8 @@
-
+
+
diff --git a/Subsurface/Content/Items/connectionpanel.png b/Subsurface/Content/Items/connectionpanel.png
new file mode 100644
index 000000000..84d4818df
Binary files /dev/null and b/Subsurface/Content/Items/connectionpanel.png differ
diff --git a/Subsurface/Data/ContentPackages/Vanilla 0.3.xml b/Subsurface/Data/ContentPackages/Vanilla 0.3.xml
index 51c13221f..226776875 100644
--- a/Subsurface/Data/ContentPackages/Vanilla 0.3.xml
+++ b/Subsurface/Data/ContentPackages/Vanilla 0.3.xml
@@ -34,6 +34,7 @@
+
\ No newline at end of file
diff --git a/Subsurface/Mods/info.txt b/Subsurface/Mods/info.txt
new file mode 100644
index 000000000..9b9c0d597
--- /dev/null
+++ b/Subsurface/Mods/info.txt
@@ -0,0 +1,225 @@
+------------------------------------------------------------------------
+Modding info/tips:
+------------------------------------------------------------------------
+
+ When doing an automatic update through the launcher, any old/unnecessary
+ files in the Content folder will be deleted. This also includes any new
+ files you may have added to the folder.
+
+ It is recommended to save all modifications to the ''Mods'' folder, or
+ in the case of custom subs, to the 'Submarines'' folder.
+
+----------------------------------
+Content Packages:
+----------------------------------
+
+ Content packages determine which configuration files the game will be using.
+ This includes the configuration files for items, map structures, characters,
+ monsters and jobs.
+
+ In the multiplayer mode, players are required to use the same content package
+ as the server or they won't be able to join.
+
+ If you are making a mod for the game, it is recommended to create a new content
+ package instead of just replacing existing files in the content folder.
+ This way you and anyone else using the mod can easily change between different
+ mods and the vanilla version, without having to manually replace files in the
+ Content folder or keep backups of different files.
+
+ The content packages are configured in XML files which are saved in Data\ContentPackages.
+
+Example:
+
+ A very simple content package could be configured as follows:
+
+
+
+
+
+
+
+
+
+
+
+
+ This content package would replace all the items in the game with whatever items are
+ configured in the "Mods\BestModEver\items.xml" file. It would also use a modified
+ version of the human characters and have all the monsters in the game replaced with
+ crawlers and Cthulhus. The random events have also been changed - perhaps by adding
+ a new event that spawns Cthulhu and removing the events that spawn monsters/items
+ which aren't included in the mod.
+
+----------------------------------
+Creature modding:
+----------------------------------
+
+ All the creatures/characters in the game are configured in XML files.
+
+ The XML files should be formatted in the following way:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ------------------------------------------
+
+ Elements:
+
+ Character:
+ - has to be the root element of the file
+
+ Attributes:
+ name: the name of the creature
+ humanoid: true/false, if set to true the character is animated using
+ a bipedal animator (like humans)
+ needsair: true/false, does the character drown/suffocate without
+ oxygen (false by default)
+ drowningtime: how fast the character drowns (in seconds)
+ doesbleed: if set to false, the character takes no bleeding damage
+ health: self explanatory (100.0 by default)
+
+ Ragdoll:
+ - has to be a child element of the character element
+
+ Attributes:
+ headposition: how high from the ground the head of the character should
+ be when the character is standing (50.0 by default)
+ headangle: an angle which the head is rotated to when the character is walking
+ (0.0 by default, meaning that the head will face straight forward)
+ torsoposition: same as headposition but for torso (50.0 by default)
+ torsoangle: an angle which the torso is rotated to when the character is walking
+ (0.0 by default, meaning that it will face straight forward)
+ waveamplitude, wavelength: if the character is not a humanoid, it will
+ do a "wave-like" swimming movement with the selected amplitude and
+ wavelength. To put it simply, amplitude affects how large up-and-down
+ movement the character will do and wavelength affects how fast the
+ character does the movement (both 0.0 by default)
+ flip: should the entire character be "mirrored" over the y-axis when it
+ switches its movement direction from left to right or vice versa,
+ or should it just rotate along the z-axis (false by default)
+ walkspeed, swimspeed: how fast the character should move on land and
+ in water, (the actual speeds are also affected by the weight, shape
+ and steerforces of individual limbs) (both 1.0 by default)
+ swimspeed: how fast the character should move in water
+
+ Limb:
+ - an individual part of the ragdoll
+ - has to be a child element of the ragdoll element
+
+ Attributes:
+ id: an integer that is used to distinguish between limbs when connecting them
+ with joints. The first limb should have the id "0", the second "1" and so on.
+ radius, width, height: used for setting the dimensions of the physics body
+ of the limb. If only radius is set, the limb will be a circle with
+ the selected radius. If width and height are set, it will be a rectangle.
+ If radius and height are set, it will be a capsule.
+ density: the mass of the limb will be area_of_the_limb * density (default 10.0)
+ friction: the friction coefficient of the limb (0.3 by default)
+ flip: true/false, if set to true the limb will be "flipped" from one side
+ to another when the character turns around (as in, if a character is
+ facing left and has an arm extended left, the arm will be extended
+ to the right when the character faces to the right) (false by default)
+ ignorecollisions: true/false, should the limb collide with walls (true by default)
+ impacttolerance: if the limb receives an impact larger than this value, it takes
+ damage (20.0 by default)
+ type: determines how the limb should be animated and what kind of items can be
+ equipped on the limb. Can be set to None, LeftHand, RightHand, LeftArm,
+ RightArm, LeftLeg, RightLeg, LeftFoot, RightFoot, Head, Torso, Waist, Tail,
+ Legs, RightThigh or LeftThigh
+ pullpos: when animating the character, forces will be applied to this
+ point of the physics body of the limb. Defaults to "0.0, 0.0" which
+ is the center of the limb.
+ refjoint: index of the joint that is used as the "center point" along
+ the x-axis when doing a walking animation. For example, if the joint
+ between a characters thigh and waist is set as refjoint, the feet of the
+ character will be moved directly under said joint when the character is
+ standing still.
+ steerforce: how much force is applied to the limb when the character moves (0.0 by default)
+ armorsector: an armored sector between two angles (in degrees). For example,
+ -90,90 would make the front sector of the limb armored (0.0,0.0 by default)
+ armor: how effective the armor is: damage is divided by this value if an attack hits the
+ armored sector (1.0 by default)
+
+ Sprite:
+ - a child element of a limb element
+
+ Attributes:
+ texture: file path of the texture
+ sourcerect: which part of the texture should be used. If either width or
+ height are 0, they will be set to the width or height of the texture.
+ (0,0,0,0 by default)
+ origin: what point in the sprite is considered the "middle point". "0,0"
+ is the upper left corner of the sprite and "1,1" the lower right
+ corner. ("0.5, 0.5" by default)
+ depth: Affects the order which sprites are drawn in. Sprites with a
+ depth of 1.0 will be drawn under sprites that have the depth set
+ to 0.9 for example. Note that setting several limbs to the same
+ depth value may cause them to "flicker" on top of each other, so
+ it's recommended that every sprite has a slightly different depth.
+
+ Attack:
+ - a child element of a limb element
+
+ Attributes:
+ type: affects the logic for moving the attacking limb. At the moment the only
+ types are None, PinchCW and PinchCW
+
+ PinchCW: the limb rotates clockwise when attacking (or counter-clockwise
+ if the character is facing left). Useful for attacks like biting
+ or slashing
+ PinchCCW: the same as PinchCW, but in the limb is rotated in the
+ opposite direction
+ Hit: the limb will "punch" the target
+
+ damage: damage done to other characters (0.0 by default)
+ bleedingdamage: how much the attack affects the bleeding rate (0.0 by default)
+ structuredamage: damage done to structures (0.0 by default)
+ stun: how long the target is stunned (in seconds, 0.0 by default)
+ range: how close the limb doing the attack has to be to the target to do damage
+ (0.0 by default, but should be set to a higher value or otherwise it
+ will only do damage if the limb is exactly at the position of the target,
+ so practically never)
+ duration: how long the attack lasts - if set to zero, it will be a "one-hit"
+ attack, otherwise it will be active for a while and the damage values
+ will be damage per second
+ priority: can be used for adjusting how likely the character is to use specific
+ attacks. For example, if a character has two attacks, first one
+ having the priority 2.0 and the second 1.0, the character is twice as
+ likely to use the first one.
+
+ Joint:
+ - a revolute joint connecting two limbs to each other
+ - a child element of the ragdoll element
+
+ Attributes:
+ limb1, limb2: thes id of the limbs that should be connected
+ limb1anchor, limb2anchor: the points where the joint is attached to on
+ the limbs (0.0, 0.0 being the center)
+ lowerlimit, upperlimit: how much the joint can turn. If both are set to 0.0,
+ the joint can rotate freely.
+
+----------------------------------
+Editing items:
+----------------------------------
+
+ (A more extensive tutorial coming up in the future)
+
+ Items are also configured in XML files. An item consist of several ''components''
+ which determine the functionality of the item. See the existing item files for
+ examples on the components.
+
+ TO BE CONTINUED
\ No newline at end of file
diff --git a/Subsurface/Properties/AssemblyInfo.cs b/Subsurface/Properties/AssemblyInfo.cs
index c3d10bc58..dc527216d 100644
--- a/Subsurface/Properties/AssemblyInfo.cs
+++ b/Subsurface/Properties/AssemblyInfo.cs
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.3.0.3")]
-[assembly: AssemblyFileVersion("0.3.0.3")]
+[assembly: AssemblyVersion("0.3.0.5")]
+[assembly: AssemblyFileVersion("0.3.0.5")]
diff --git a/Subsurface/Source/ContentPackage.cs b/Subsurface/Source/ContentPackage.cs
index b46003f20..803fbef5b 100644
--- a/Subsurface/Source/ContentPackage.cs
+++ b/Subsurface/Source/ContentPackage.cs
@@ -10,7 +10,7 @@ namespace Barotrauma
{
public enum ContentType
{
- None, Jobs, Item, Character, Structure, Executable
+ None, Jobs, Item, Character, Structure, Executable, RandomEvents
}
public class ContentPackage
diff --git a/Subsurface/Source/DebugConsole.cs b/Subsurface/Source/DebugConsole.cs
index 985985281..887db9015 100644
--- a/Subsurface/Source/DebugConsole.cs
+++ b/Subsurface/Source/DebugConsole.cs
@@ -452,17 +452,23 @@ namespace Barotrauma
DebugConsole.NewMessage("Deleted filelist", Color.Green);
}
- if (System.IO.File.Exists("Data/SavedSubs/TutorialSub.sub"))
+ if (System.IO.File.Exists("Submarines/TutorialSub.sub"))
{
- System.IO.File.Delete("Data/SavedSubs/TutorialSub.sub");
+ System.IO.File.Delete("Submarines/TutorialSub.sub");
- DebugConsole.NewMessage("Deleted TutorialSub from SavedSubs", Color.Green);
+ DebugConsole.NewMessage("Deleted TutorialSub from the submarine folder", Color.Green);
+ }
+
+ if (System.IO.File.Exists("crashreport.txt"))
+ {
+ DebugConsole.NewMessage("Deleted crashreport.txt", Color.Green);
}
if (!System.IO.File.Exists("Content/Map/TutorialSub.sub"))
{
DebugConsole.ThrowError("TutorialSub.sub not found!");
}
+
break;
default:
NewMessage("Command not found", Color.Red);
diff --git a/Subsurface/Source/Events/ScriptedEvent.cs b/Subsurface/Source/Events/ScriptedEvent.cs
index 6528cf79c..47bfe6a1f 100644
--- a/Subsurface/Source/Events/ScriptedEvent.cs
+++ b/Subsurface/Source/Events/ScriptedEvent.cs
@@ -8,8 +8,6 @@ namespace Barotrauma
{
class ScriptedEvent
{
- private static string configFile = "Content/randomevents.xml";
-
//const int MaxPreviousEvents = 6;
//const float PreviouslyUsedWeight = 10.0f;
@@ -94,6 +92,16 @@ namespace Barotrauma
public static ScriptedEvent LoadRandom(Random rand)
{
+ var configFiles = GameMain.Config.SelectedContentPackage.GetFilesOfType(ContentType.RandomEvents);
+
+ if (!configFiles.Any())
+ {
+ DebugConsole.ThrowError("No config files for random events found in the selected content package");
+ return null;
+ }
+
+ string configFile = configFiles[0];
+
XDocument doc = ToolBox.TryLoadXml(configFile);
if (doc == null) return null;
diff --git a/Subsurface/Source/Items/Components/Machines/Reactor.cs b/Subsurface/Source/Items/Components/Machines/Reactor.cs
index b1ad20a8c..638dd963a 100644
--- a/Subsurface/Source/Items/Components/Machines/Reactor.cs
+++ b/Subsurface/Source/Items/Components/Machines/Reactor.cs
@@ -242,7 +242,7 @@ namespace Barotrauma.Items.Components
if (particle != null) particle.Size *= Rand.Range(0.5f, 1.0f);
}
- new FireSource(item.Position);
+ new FireSource(item.WorldPosition);
}
if (temperature > meltDownTemp)
diff --git a/Subsurface/Source/Items/Components/Machines/Steering.cs b/Subsurface/Source/Items/Components/Machines/Steering.cs
index 72c0ccb24..d989ab449 100644
--- a/Subsurface/Source/Items/Components/Machines/Steering.cs
+++ b/Subsurface/Source/Items/Components/Machines/Steering.cs
@@ -99,8 +99,8 @@ namespace Barotrauma.Items.Components
{
IsActive = true;
- var tickBox = new GUITickBox(new Rectangle(0,25,20,20), "Autopilot", Alignment.TopLeft, GuiFrame);
- tickBox.OnSelected = (GUITickBox box) =>
+ autopilotTickBox = new GUITickBox(new Rectangle(0,25,20,20), "Autopilot", Alignment.TopLeft, GuiFrame);
+ autopilotTickBox.OnSelected = (GUITickBox box) =>
{
AutoPilot = box.Selected;
item.NewComponentEvent(this, true, true);
diff --git a/Subsurface/Source/Items/Components/Signal/Connection.cs b/Subsurface/Source/Items/Components/Signal/Connection.cs
index 887dea405..b147278bf 100644
--- a/Subsurface/Source/Items/Components/Signal/Connection.cs
+++ b/Subsurface/Source/Items/Components/Signal/Connection.cs
@@ -10,6 +10,7 @@ namespace Barotrauma.Items.Components
class Connection
{
+ private static Texture2D panelTexture;
private static Sprite connector;
private static Sprite wireCorner, wireVertical, wireHorizontal;
@@ -61,10 +62,14 @@ namespace Barotrauma.Items.Components
if (connector == null)
{
- connector = new Sprite("Content/Items/connector.png", new Vector2(0.5f, 0.5f));
- wireCorner = new Sprite("Content/Items/wireCorner.png", new Vector2(0.5f, 0.1f));
- wireVertical = new Sprite("Content/Items/wireVertical.png", new Vector2(0.5f, 0.5f));
- wireHorizontal = new Sprite("Content/Items/wireHorizontal.png", new Vector2(0.5f, 0.5f));
+ panelTexture = Sprite.LoadTexture("Content/Items/connectionpanel.png");
+
+ connector = new Sprite(panelTexture, new Rectangle(448, 80, 64, 64), Vector2.Zero, 0.0f);
+ connector.Origin = new Vector2(32.0f, 32.0f);
+ wireCorner = new Sprite(panelTexture, new Rectangle(448, 0, 64, 64), Vector2.Zero, 0.0f);
+ wireCorner.Origin = new Vector2(32.0f, 32.0f);
+ wireVertical = new Sprite(panelTexture, new Rectangle(480, 64, 16, 16), new Vector2(-8.0f, -8.0f), 0.0f);
+ wireHorizontal = new Sprite(panelTexture, new Rectangle(496, 64, 16, 16), new Vector2(-8.0f, -8.0f), 0.0f);
}
this.item = item;
@@ -186,13 +191,15 @@ namespace Barotrauma.Items.Components
public static void DrawConnections(SpriteBatch spriteBatch, ConnectionPanel panel, Character character)
{
-
+
int width = 400, height = 200;
- int x = GameMain.GraphicsWidth/2 - width/2, y = GameMain.GraphicsHeight - height;
+ int x = GameMain.GraphicsWidth / 2 - width / 2, y = GameMain.GraphicsHeight - height;
Rectangle panelRect = new Rectangle(x, y, width, height);
- GUI.DrawRectangle(spriteBatch, panelRect, Color.Black, true);
+ spriteBatch.Draw(panelTexture, panelRect, new Rectangle(0, 512 - height, width, height), Color.White);
+
+ //GUI.DrawRectangle(spriteBatch, panelRect, Color.Black, true);
bool mouseInRect = panelRect.Contains(PlayerInput.MousePosition);
@@ -209,8 +216,8 @@ namespace Barotrauma.Items.Components
if (wireComponent != null) equippedWire = wireComponent;
}
- Vector2 rightPos = new Vector2(x + width - 110, y + 20);
- Vector2 leftPos = new Vector2(x + 110, y + 20);
+ Vector2 rightPos = new Vector2(x + width - 110, y + 50);
+ Vector2 leftPos = new Vector2(x + 110, y + 50);
float wireInterval = 10.0f;
@@ -291,6 +298,9 @@ namespace Barotrauma.Items.Components
draggingConnected = null;
}
}
+
+ spriteBatch.Draw(panelTexture, panelRect, new Rectangle(0, 0, width, height), Color.White);
+
}
private void Draw(SpriteBatch spriteBatch, Item item, Vector2 position, Vector2 labelPos, Vector2 wirePosition, bool mouseIn, bool wireEquipped)
@@ -299,7 +309,7 @@ namespace Barotrauma.Items.Components
spriteBatch.DrawString(GUI.Font, Name, new Vector2(labelPos.X, labelPos.Y-10), Color.White);
GUI.DrawRectangle(spriteBatch, new Rectangle((int)position.X-10, (int)position.Y-10, 20, 20), Color.White);
-
+ spriteBatch.Draw(panelTexture, position - new Vector2(16.0f, 16.0f), new Rectangle(64, 256, 32, 32), Color.White);
for (int i = 0; i w != null && w.Item != draggingConnected))
+ {
+ spriteBatch.Draw(panelTexture, position - new Vector2(16.0f, 16.0f), new Rectangle(32, 256, 32, 32), Color.White);
+ }
+
}
private static void DrawWire(SpriteBatch spriteBatch, Item wireItem, Item item, Vector2 end, Vector2 start, bool mouseIn, bool wireEquipped)
@@ -373,7 +388,9 @@ namespace Barotrauma.Items.Components
new Vector2(end.X - wireVertical.size.X / 2, end.Y + connLength),
new Vector2(wireVertical.size.X, (float)Math.Abs(end.Y - start.Y)), wireItem.Color * alpha);
textX = (int)end.X;
- connector.Draw(spriteBatch, end, Color.White*alpha);
+ connector.Draw(spriteBatch, end, Color.White*alpha);
+
+ //spriteBatch.Draw(panelTexture, end, new Rectangle(32, 256, 32, 32), Color.White);
}
else
{
@@ -387,7 +404,7 @@ namespace Barotrauma.Items.Components
float dir = (end.X > start.X) ? -1.0f : 1.0f;
wireCorner.Draw(spriteBatch,
- new Vector2(start.X, end.Y-1), wireItem.Color * alpha, 0.0f, 1.0f,
+ new Vector2(start.X, end.Y+24), wireItem.Color * alpha, 0.0f, 1.0f,
(end.X > start.X) ? SpriteEffects.None : SpriteEffects.FlipHorizontally);
float wireStartX = start.X - wireCorner.size.X / 2 * dir;
@@ -400,7 +417,7 @@ namespace Barotrauma.Items.Components
rect = new Rectangle((int)pos.X, (int)pos.Y, (int)size.X, (int)size.Y);
if (!wireEquipped && rect.Contains(PlayerInput.MousePosition)) mouseOn = true;
- connector.Draw(spriteBatch, end, Color.White*alpha, -MathHelper.PiOver2 * dir);
+ connector.Draw(spriteBatch, end, Color.White*alpha, -MathHelper.PiOver2*dir);
}
if (draggingConnected == null && !wireEquipped)
diff --git a/Subsurface/Source/Map/EntityGrid.cs b/Subsurface/Source/Map/EntityGrid.cs
index df8c3f666..f4524c3c1 100644
--- a/Subsurface/Source/Map/EntityGrid.cs
+++ b/Subsurface/Source/Map/EntityGrid.cs
@@ -17,10 +17,10 @@ namespace Barotrauma
this.limits = limits;
this.cellSize = cellSize;
- entities = new List[(int)Math.Ceiling(limits.Width / cellSize),(int)Math.Ceiling(limits.Height / cellSize)];
- for (int x = 0; x[(int)Math.Ceiling(limits.Width / cellSize), (int)Math.Ceiling(limits.Height / cellSize)];
+ for (int x = 0; x < entities.GetLength(0); x++)
{
- for (int y=0; y();
}
@@ -32,29 +32,29 @@ namespace Barotrauma
Rectangle rect = entity.Rect;
//if (Submarine.Loaded != null) rect.Offset(-Submarine.HiddenSubPosition);
Rectangle indices = GetIndices(rect);
- if (indices.X<0 || indices.Width>=entities.GetLength(0) ||
- indices.Y<0 || indices.Height>=entities.GetLength(1))
+ if (indices.X < 0 || indices.Width >= entities.GetLength(0) ||
+ indices.Y < 0 || indices.Height >= entities.GetLength(1))
{
- DebugConsole.ThrowError("Error in EntityGrid.InsertEntity: "+entity+" is outside the grid");
+ DebugConsole.ThrowError("Error in EntityGrid.InsertEntity: " + entity + " is outside the grid");
return;
}
- for (int x=indices.X; x<=indices.Width; x++)
+ for (int x = indices.X; x <= indices.Width; x++)
{
- for (int y = indices.Y; y<=indices.Height; y++)
+ for (int y = indices.Y; y <= indices.Height; y++)
{
entities[x, y].Add(entity);
}
}
}
-
+
public void RemoveEntity(MapEntity entity)
{
for (int x = 0; x < entities.GetLength(0); x++)
{
for (int y = 0; y < entities.GetLength(1); y++)
{
- if (entities[x,y].Contains(entity)) entities[x, y].Remove(entity);
+ if (entities[x, y].Contains(entity)) entities[x, y].Remove(entity);
}
}
}
@@ -76,14 +76,13 @@ namespace Barotrauma
if (Submarine.Loaded != null) position -= Submarine.HiddenSubPosition;
- if (position.X < limits.X || position.Y > limits.Y ||
- position.X > limits.Right || position.Y < limits.Y - limits.Height)
+ Point indices = GetIndices(position);
+
+ if (indices.X < 0 || indices.Y < 0 || indices.X >= entities.GetLength(0) || indices.Y >= entities.GetLength(1))
{
return new List();
}
- Point indices = GetIndices(position);
-
return entities[indices.X, indices.Y];
}
@@ -91,10 +90,10 @@ namespace Barotrauma
{
Rectangle indices = Rectangle.Empty;
indices.X = (int)Math.Floor((rect.X - limits.X) / cellSize);
- indices.Y = (int)Math.Floor((limits.Y - rect.Y)/cellSize);
+ indices.Y = (int)Math.Floor((limits.Y - rect.Y) / cellSize);
indices.Width = (int)Math.Floor((rect.Right - limits.X) / cellSize);
- indices.Height = (int)Math.Floor((limits.Y - (rect.Y-rect.Height)) / cellSize);
+ indices.Height = (int)Math.Floor((limits.Y - (rect.Y - rect.Height)) / cellSize);
return indices;
}
@@ -103,7 +102,7 @@ namespace Barotrauma
{
return new Point(
(int)Math.Floor((position.X - limits.X) / cellSize),
- (int)Math.Floor((limits.Y - position.Y) / cellSize));
+ (int)Math.Floor((limits.Y - position.Y) / cellSize));
}
}
}
diff --git a/Subsurface/Source/Map/Submarine.cs b/Subsurface/Source/Map/Submarine.cs
index 5f46b32fb..c9f080fb2 100644
--- a/Subsurface/Source/Map/Submarine.cs
+++ b/Subsurface/Source/Map/Submarine.cs
@@ -20,7 +20,7 @@ namespace Barotrauma
class Submarine : Entity
{
- public static string SavePath = "Data" + System.IO.Path.DirectorySeparatorChar + "SavedSubs";
+ public static string SavePath = "Submarines";
//position of the "actual submarine" which is rendered wherever the SubmarineBody is
//should be in an unreachable place
diff --git a/Subsurface/Source/Screens/MainMenuScreen.cs b/Subsurface/Source/Screens/MainMenuScreen.cs
index f870fb958..a760808d4 100644
--- a/Subsurface/Source/Screens/MainMenuScreen.cs
+++ b/Subsurface/Source/Screens/MainMenuScreen.cs
@@ -38,7 +38,7 @@ namespace Barotrauma
//menuTabs[(int)Tabs.Main].Padding = GUI.style.smallPadding;
- int y = 170;
+ int y = (int)(GameMain.GraphicsHeight * 0.3f);
Rectangle panelRect = new Rectangle(
290, y,
@@ -81,6 +81,8 @@ namespace Barotrauma
button.Color = button.Color * 0.8f;
button.OnClicked = QuitClicked;
+ panelRect.Y += 10;
+
//----------------------------------------------------------------------
menuTabs[(int)Tab.NewGame] = new GUIFrame(panelRect, GUI.Style);
diff --git a/Subsurface/Source/Screens/NetLobbyScreen.cs b/Subsurface/Source/Screens/NetLobbyScreen.cs
index d6725fac3..8607b25df 100644
--- a/Subsurface/Source/Screens/NetLobbyScreen.cs
+++ b/Subsurface/Source/Screens/NetLobbyScreen.cs
@@ -464,8 +464,9 @@ namespace Barotrauma
GameMain.Server.CharacterInfo = null;
GameMain.Server.Character = null;
- var playYourself = new GUITickBox(new Rectangle(0, -20, 20, 20), "Play yourself", Alignment.TopLeft, myPlayerFrame);
+ var playYourself = new GUITickBox(new Rectangle(0, 0, 20, 20), "Play yourself", Alignment.TopLeft, myPlayerFrame);
playYourself.OnSelected = TogglePlayYourself;
+ playYourself.UserData = "playyourself";
}
}
return false;
diff --git a/Subsurface/Source/Utils/UpdaterUtil.cs b/Subsurface/Source/Utils/UpdaterUtil.cs
index 41eb8c3a0..ac41d6a70 100644
--- a/Subsurface/Source/Utils/UpdaterUtil.cs
+++ b/Subsurface/Source/Utils/UpdaterUtil.cs
@@ -10,7 +10,7 @@ namespace Barotrauma
{
public static class UpdaterUtil
{
- public const string Version = "1.0";
+ public const string Version = "1.1";
public static void SaveFileList(string filePath)
{
@@ -174,7 +174,7 @@ namespace Barotrauma
string relativePath = GetRelativePath(file, currentDir);
string dirRoot = relativePath.Split(Path.DirectorySeparatorChar).First();
- if (dirRoot != "Content" && dirRoot != "") continue;
+ if (dirRoot != "Content") continue;
if (filesToKeep.Contains(relativePath)) continue;
diff --git a/Subsurface/Data/SavedSubs/Aegir Mark II.sub b/Subsurface/Submarines/Aegir Mark II.sub
similarity index 100%
rename from Subsurface/Data/SavedSubs/Aegir Mark II.sub
rename to Subsurface/Submarines/Aegir Mark II.sub
diff --git a/Subsurface/Data/SavedSubs/Nehalennia.sub b/Subsurface/Submarines/Nehalennia.sub
similarity index 100%
rename from Subsurface/Data/SavedSubs/Nehalennia.sub
rename to Subsurface/Submarines/Nehalennia.sub
diff --git a/Subsurface/Data/SavedSubs/TutorialSub.sub b/Subsurface/Submarines/TutorialSub.sub
similarity index 100%
rename from Subsurface/Data/SavedSubs/TutorialSub.sub
rename to Subsurface/Submarines/TutorialSub.sub
diff --git a/Subsurface/Data/SavedSubs/Vellamo.sub b/Subsurface/Submarines/Vellamo.sub
similarity index 100%
rename from Subsurface/Data/SavedSubs/Vellamo.sub
rename to Subsurface/Submarines/Vellamo.sub
diff --git a/Subsurface/changelog.txt b/Subsurface/changelog.txt
index fed5f56a1..83f1d06d5 100644
--- a/Subsurface/changelog.txt
+++ b/Subsurface/changelog.txt
@@ -1,3 +1,11 @@
+---------------------------------------------------------------------------------------------------------
+v0.3.0.5
+---------------------------------------------------------------------------------------------------------
+
+- fixed autopilot crashing the game
+- fixed reactor not catching fire when going above the configured ''fire temperature''
+- fixed a duplicate "Play yourself" checkbox appearing in the lobby screen after rounds
+
---------------------------------------------------------------------------------------------------------
v0.3.0.4
---------------------------------------------------------------------------------------------------------
@@ -11,6 +19,8 @@ v0.3.0.4
name of the submarine
- fixed new structures not lining up with existing ones if switching to editor while a round is running
- fixed a bug in shadow rendering which caused memory leaks
+- the autoupdater only checks the Content folder when deleting files that don't belong to the latest version
+(i.e. the autoupdater won't delete your mods as long as they aren't saved in the Content folder)
- molochs and endworms are immune to bleeding!
---------------------------------------------------------------------------------------------------------
diff --git a/Subsurface_Solution.v12.suo b/Subsurface_Solution.v12.suo
index bb7149411..98cd18d40 100644
Binary files a/Subsurface_Solution.v12.suo and b/Subsurface_Solution.v12.suo differ