Merge branch 'master' of https://bitbucket.org/Regalis11/barotrauma into multisub
Conflicts: Subsurface/Source/GUI/GUI.cs
This commit is contained in:
@@ -36,6 +36,13 @@ namespace Barotrauma.Items.Components
|
||||
get { return maxOutput; }
|
||||
}
|
||||
|
||||
[HasDefaultValue(10.0f, true), Editable]
|
||||
public float Capacity
|
||||
{
|
||||
get { return capacity; }
|
||||
set { capacity = Math.Max(value, 1.0f); }
|
||||
}
|
||||
|
||||
[Editable, HasDefaultValue(0.0f, true)]
|
||||
public float Charge
|
||||
{
|
||||
@@ -47,13 +54,6 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
}
|
||||
|
||||
[HasDefaultValue(10.0f, true), Editable]
|
||||
public float Capacity
|
||||
{
|
||||
get { return capacity; }
|
||||
set { capacity = Math.Max(value, 1.0f); }
|
||||
}
|
||||
|
||||
[HasDefaultValue(10.0f, true), Editable]
|
||||
public float RechargeSpeed
|
||||
{
|
||||
|
||||
@@ -67,6 +67,8 @@ namespace Barotrauma.Items.Components
|
||||
Vector2 vector = ToolBox.ParseToVector2(value);
|
||||
minRotation = MathHelper.ToRadians(vector.X);
|
||||
maxRotation = MathHelper.ToRadians(vector.Y);
|
||||
|
||||
rotation = (minRotation + maxRotation) / 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -813,6 +813,9 @@ namespace Barotrauma
|
||||
|
||||
if (prefab.sprite != null)
|
||||
{
|
||||
float depth = Sprite.Depth;
|
||||
depth += (ID % 255) * 0.000001f;
|
||||
|
||||
if (body == null)
|
||||
{
|
||||
if (prefab.ResizeHorizontal || prefab.ResizeVertical)
|
||||
@@ -821,7 +824,7 @@ namespace Barotrauma
|
||||
}
|
||||
else
|
||||
{
|
||||
prefab.sprite.Draw(spriteBatch, new Vector2(DrawPosition.X, -DrawPosition.Y), color);
|
||||
prefab.sprite.Draw(spriteBatch, new Vector2(DrawPosition.X, -DrawPosition.Y), color, 0.0f, 1.0f, SpriteEffects.None, depth);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -830,7 +833,6 @@ namespace Barotrauma
|
||||
var holdable = GetComponent<Holdable>();
|
||||
if (holdable!=null && holdable.Picker !=null)
|
||||
{
|
||||
float depth = Sprite.Depth;
|
||||
if (holdable.Picker.SelectedItems[0]==this)
|
||||
{
|
||||
depth = holdable.Picker.AnimController.GetLimb(LimbType.RightHand).sprite.Depth + 0.000001f;
|
||||
@@ -844,7 +846,7 @@ namespace Barotrauma
|
||||
}
|
||||
else
|
||||
{
|
||||
body.Draw(spriteBatch, prefab.sprite, color);
|
||||
body.Draw(spriteBatch, prefab.sprite, color, depth);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user