- File transfer improvements (switching the sub selection during transfer works, max transfer duration, waiting for transfers to finish before starting the round)
- Firesource changes (more particles with shorter lifetimes, combining bugfix) - StatusEffects can target hulls and always be active - Cyrillic character support - Saving server settings - Swapping items in inventory by dropping an item to a non-free slot
This commit is contained in:
@@ -116,11 +116,13 @@ namespace Barotrauma
|
||||
|
||||
if (!fireSources[i].CheckOverLap(fireSources[j])) continue;
|
||||
|
||||
fireSources[j].position.X = Math.Min(fireSources[i].position.X, fireSources[j].position.X);
|
||||
float leftEdge = Math.Min(fireSources[i].position.X, fireSources[j].position.X);
|
||||
|
||||
fireSources[j].size.X =
|
||||
Math.Max(fireSources[i].position.X + fireSources[i].size.X, fireSources[j].position.X + fireSources[j].size.X)
|
||||
- fireSources[j].position.X;
|
||||
- leftEdge;
|
||||
|
||||
fireSources[j].position.X = leftEdge;
|
||||
|
||||
fireSources[i].Remove();
|
||||
}
|
||||
@@ -140,7 +142,7 @@ namespace Barotrauma
|
||||
|
||||
public void Update(float deltaTime)
|
||||
{
|
||||
float count = Rand.Range(0.0f, (float)Math.Sqrt(size.X)/3.0f);
|
||||
float count = Rand.Range(0.0f, size.X/50.0f);
|
||||
|
||||
if (fireSoundBasic != null)
|
||||
{
|
||||
@@ -173,10 +175,10 @@ namespace Barotrauma
|
||||
spawnPos, speed, 0.0f, hull);
|
||||
|
||||
if (particle == null) continue;
|
||||
|
||||
|
||||
if (Rand.Int(20) == 1) particle.OnChangeHull = OnChangeHull;
|
||||
|
||||
particle.Size *= MathHelper.Clamp(size.X/100.0f * Math.Max(hull.Oxygen/hull.FullVolume, 0.4f), 0.5f, 4.0f);
|
||||
particle.Size *= MathHelper.Clamp(size.X/60.0f * Math.Max(hull.Oxygen/hull.FullVolume, 0.4f), 0.5f, 3.0f);
|
||||
|
||||
if (size.X < 100.0f) continue;
|
||||
|
||||
@@ -218,7 +220,7 @@ namespace Barotrauma
|
||||
|
||||
if (particleHull.FireSources.Find(fs => pos.X > fs.position.X-100.0f && pos.X < fs.position.X+fs.size.X+100.0f)!=null) return;
|
||||
|
||||
new FireSource(new Vector2(pos.X, particleHull.Rect.Y-particleHull.Rect.Height + 5.0f));
|
||||
new FireSource(new Vector2(pos.X, particleHull.WorldRect.Y-particleHull.Rect.Height + 5.0f));
|
||||
}
|
||||
|
||||
private void DamageCharacters(float deltaTime)
|
||||
|
||||
@@ -11,7 +11,7 @@ using Lidgren.Network;
|
||||
namespace Barotrauma
|
||||
{
|
||||
|
||||
class Hull : MapEntity
|
||||
class Hull : MapEntity, IPropertyObject
|
||||
{
|
||||
public static List<Hull> hullList = new List<Hull>();
|
||||
private static EntityGrid entityGrid;
|
||||
@@ -19,7 +19,7 @@ namespace Barotrauma
|
||||
public static bool ShowHulls = true;
|
||||
|
||||
public static bool EditWater, EditFire;
|
||||
|
||||
|
||||
public static WaterRenderer renderer;
|
||||
|
||||
private List<FireSource> fireSources;
|
||||
@@ -36,7 +36,11 @@ namespace Barotrauma
|
||||
//how much excess water the room can contain (= more than the volume of the room)
|
||||
public const float MaxCompress = 10000f;
|
||||
|
||||
public readonly Dictionary<string, PropertyDescriptor> properties;
|
||||
public readonly Dictionary<string, ObjectProperty> properties;
|
||||
public Dictionary<string, ObjectProperty> ObjectProperties
|
||||
{
|
||||
get { return properties; }
|
||||
}
|
||||
|
||||
private float lethalPressure;
|
||||
|
||||
@@ -161,9 +165,7 @@ namespace Barotrauma
|
||||
|
||||
fireSources = new List<FireSource>();
|
||||
|
||||
properties = TypeDescriptor.GetProperties(GetType())
|
||||
.Cast<PropertyDescriptor>()
|
||||
.ToDictionary(pr => pr.Name);
|
||||
properties = ObjectProperty.GetProperties(this);
|
||||
|
||||
int arraySize = (rectangle.Width / WaveWidth + 1);
|
||||
waveY = new float[arraySize];
|
||||
|
||||
@@ -511,17 +511,17 @@ namespace Barotrauma
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool SaveCurrent(string fileName)
|
||||
public static bool SaveCurrent(string filePath)
|
||||
{
|
||||
if (loaded==null)
|
||||
{
|
||||
loaded = new Submarine(fileName);
|
||||
loaded = new Submarine(filePath);
|
||||
// return;
|
||||
}
|
||||
|
||||
loaded.filePath = SavePath + System.IO.Path.DirectorySeparatorChar + fileName;
|
||||
loaded.filePath = filePath;
|
||||
|
||||
return loaded.SaveAs(SavePath+System.IO.Path.DirectorySeparatorChar+fileName);
|
||||
return loaded.SaveAs(filePath);
|
||||
}
|
||||
|
||||
public void CheckForErrors()
|
||||
|
||||
Reference in New Issue
Block a user