- item sprites visible in fabricator menu
- deth charge rotation fix - sonar tweaking (ruin walls look slightly different from cave walls) - connector sprite positioning fix - repairtool is active when in use
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
<Sprite texture ="railgunetc.png" depth="0.01" sourcerect="64,180,47,76"/>
|
<Sprite texture ="railgunetc.png" depth="0.01" sourcerect="64,180,47,76"/>
|
||||||
|
|
||||||
<Turret canbeselected = "true" linkable="true" barrelpos="23, 76"
|
<Turret canbeselected = "true" linkable="true" barrelpos="23, 76"
|
||||||
rotationlimits="90,90"
|
rotationlimits="270,270"
|
||||||
powerconsumption="0.0"/>
|
powerconsumption="0.0"/>
|
||||||
|
|
||||||
<ConnectionPanel selectkey="Action" canbeselected = "true" msg="Rewire [Screwdriver]">
|
<ConnectionPanel selectkey="Action" canbeselected = "true" msg="Rewire [Screwdriver]">
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<Sprite texture="railgunetc.png" depth="0.8" sourcerect="0,160,61,96"/>
|
<Sprite texture="railgunetc.png" depth="0.8" sourcerect="0,160,61,96"/>
|
||||||
|
|
||||||
<ItemContainer hideitems="false" drawinventory="true" capacity="1" itempos="30,-55" iteminterval="26,0" itemrotation="0" canbeselected = "true">
|
<ItemContainer hideitems="false" drawinventory="true" capacity="1" itempos="30,-55" iteminterval="26,0" itemrotation="-90" canbeselected = "true">
|
||||||
<Containable name="Depth Charge Shell"/>
|
<Containable name="Depth Charge Shell"/>
|
||||||
<Containable name="Nuclear Depth Charge"/>
|
<Containable name="Nuclear Depth Charge"/>
|
||||||
</ItemContainer>
|
</ItemContainer>
|
||||||
@@ -45,9 +45,9 @@
|
|||||||
<Item name="Steel Bar"/>
|
<Item name="Steel Bar"/>
|
||||||
</Deconstruct>
|
</Deconstruct>
|
||||||
|
|
||||||
<Sprite texture="railgunetc.png" sourcerect="113,188,47,68" depth ="0.5"/>
|
<Sprite texture="railgunetc.png" sourcerect="114,210,68,47" depth ="0.5"/>
|
||||||
|
|
||||||
<Body width="47" height="68" density="30"/>
|
<Body width="68" height="47" density="30"/>
|
||||||
|
|
||||||
<Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,20" handle2="10,20" aimable="false"/>
|
<Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,20" handle2="10,20" aimable="false"/>
|
||||||
|
|
||||||
@@ -74,9 +74,9 @@
|
|||||||
<Item name="Uranium Bar"/>
|
<Item name="Uranium Bar"/>
|
||||||
</Deconstruct>
|
</Deconstruct>
|
||||||
|
|
||||||
<Sprite texture="railgunetc.png" sourcerect="163,188,46,68" depth="0.5"/>
|
<Sprite texture="railgunetc.png" sourcerect="187,210,68,47" depth="0.5"/>
|
||||||
|
|
||||||
<Body width="47" height="68" density="30"/>
|
<Body width="68" height="47" density="30"/>
|
||||||
|
|
||||||
<Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,20" handle2="10,20" aimable="false"/>
|
<Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,20" handle2="10,20" aimable="false"/>
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
@@ -20,6 +20,8 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
private string particles;
|
private string particles;
|
||||||
|
|
||||||
|
private float activeTimer;
|
||||||
|
|
||||||
[HasDefaultValue(0.0f, false)]
|
[HasDefaultValue(0.0f, false)]
|
||||||
public float Range
|
public float Range
|
||||||
{
|
{
|
||||||
@@ -92,11 +94,11 @@ namespace Barotrauma.Items.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//public override void Update(float deltaTime, Camera cam)
|
public override void Update(float deltaTime, Camera cam)
|
||||||
//{
|
{
|
||||||
// base.Update(deltaTime, cam);
|
activeTimer -= deltaTime;
|
||||||
|
if (activeTimer <= 0.0f) IsActive = false;
|
||||||
//}
|
}
|
||||||
|
|
||||||
public override bool Use(float deltaTime, Character character = null)
|
public override bool Use(float deltaTime, Character character = null)
|
||||||
{
|
{
|
||||||
@@ -127,6 +129,9 @@ namespace Barotrauma.Items.Components
|
|||||||
ignoredBodies.Add(limb.body.FarseerBody);
|
ignoredBodies.Add(limb.body.FarseerBody);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IsActive = true;
|
||||||
|
activeTimer = 0.1f;
|
||||||
|
|
||||||
|
|
||||||
for (int n = 0; n < 2; n++)
|
for (int n = 0; n < 2; n++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -114,12 +114,9 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
foreach (FabricableItem fi in fabricableItems)
|
foreach (FabricableItem fi in fabricableItems)
|
||||||
{
|
{
|
||||||
Color color = ((itemList.CountChildren % 2) == 0) ? Color.Transparent : Color.Black*0.3f;
|
Color color = ((itemList.CountChildren % 2) == 0) ? Color.Transparent : Color.Black * 0.3f;
|
||||||
|
|
||||||
new GUITextBlock(
|
GUIFrame frame = new GUIFrame(new Rectangle(0, 0, 0, 50), Color.Transparent, null, itemList)
|
||||||
new Rectangle(0, 0, 0, 25), fi.TargetItem.Name,
|
|
||||||
color, Color.White,
|
|
||||||
Alignment.Left, Alignment.Left, null, itemList)
|
|
||||||
{
|
{
|
||||||
UserData = fi,
|
UserData = fi,
|
||||||
Padding = new Vector4(5.0f, 5.0f, 5.0f, 5.0f),
|
Padding = new Vector4(5.0f, 5.0f, 5.0f, 5.0f),
|
||||||
@@ -128,6 +125,21 @@ namespace Barotrauma.Items.Components
|
|||||||
ToolTip = fi.TargetItem.Description
|
ToolTip = fi.TargetItem.Description
|
||||||
};
|
};
|
||||||
|
|
||||||
|
GUITextBlock textBlock = new GUITextBlock(
|
||||||
|
new Rectangle(40, 0, 0, 25),
|
||||||
|
fi.TargetItem.Name,
|
||||||
|
Color.Transparent, Color.White,
|
||||||
|
Alignment.Left, Alignment.Left,
|
||||||
|
null, frame);
|
||||||
|
textBlock.Padding = new Vector4(5.0f, 0.0f, 5.0f, 0.0f);
|
||||||
|
|
||||||
|
if (fi.TargetItem.sprite != null)
|
||||||
|
{
|
||||||
|
GUIImage img = new GUIImage(new Rectangle(0, 0, 40, 40), fi.TargetItem.sprite, Alignment.Left, frame);
|
||||||
|
img.Scale = Math.Min(Math.Min(40.0f / img.SourceRect.Width, 40.0f / img.SourceRect.Height), 1.0f);
|
||||||
|
img.Color = fi.TargetItem.SpriteColor;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ namespace Barotrauma.Items.Components
|
|||||||
CreateBlipsForLine(
|
CreateBlipsForLine(
|
||||||
start + Submarine.Loaded.WorldPosition,
|
start + Submarine.Loaded.WorldPosition,
|
||||||
end + Submarine.Loaded.WorldPosition,
|
end + Submarine.Loaded.WorldPosition,
|
||||||
radius, displayScale, 2.0f);
|
radius, displayScale, 200.0f, 2.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -170,7 +170,7 @@ namespace Barotrauma.Items.Components
|
|||||||
CreateBlipsForLine(
|
CreateBlipsForLine(
|
||||||
new Vector2(item.WorldPosition.X - range, Level.Loaded.Size.Y),
|
new Vector2(item.WorldPosition.X - range, Level.Loaded.Size.Y),
|
||||||
new Vector2(item.WorldPosition.X + range, Level.Loaded.Size.Y),
|
new Vector2(item.WorldPosition.X + range, Level.Loaded.Size.Y),
|
||||||
radius, displayScale, 1.0f);
|
radius, displayScale, 300.0f, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<VoronoiCell> cells = Level.Loaded.GetCells(item.WorldPosition, 7);
|
List<VoronoiCell> cells = Level.Loaded.GetCells(item.WorldPosition, 7);
|
||||||
@@ -179,14 +179,14 @@ namespace Barotrauma.Items.Components
|
|||||||
foreach (GraphEdge edge in cell.edges)
|
foreach (GraphEdge edge in cell.edges)
|
||||||
{
|
{
|
||||||
if (!edge.isSolid) continue;
|
if (!edge.isSolid) continue;
|
||||||
float cellDot = Vector2.Dot(cell.Center - item.WorldPosition, (edge.Center+cell.Translation) - cell.Center);
|
float cellDot = Vector2.Dot(cell.Center - item.WorldPosition, (edge.Center + cell.Translation) - cell.Center);
|
||||||
if (cellDot > 0) continue;
|
if (cellDot > 0) continue;
|
||||||
|
|
||||||
float facingDot = Vector2.Dot(
|
float facingDot = Vector2.Dot(
|
||||||
Vector2.Normalize(edge.point1 - edge.point2),
|
Vector2.Normalize(edge.point1 - edge.point2),
|
||||||
Vector2.Normalize(cell.Center-item.WorldPosition));
|
Vector2.Normalize(cell.Center - item.WorldPosition));
|
||||||
|
|
||||||
CreateBlipsForLine(edge.point1 + cell.Translation, edge.point2+cell.Translation, radius, displayScale, 3.0f * (Math.Abs(facingDot) + 1.0f));
|
CreateBlipsForLine(edge.point1 + cell.Translation, edge.point2 + cell.Translation, radius, displayScale, 350.0f, 3.0f * (Math.Abs(facingDot) + 1.0f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,7 +204,7 @@ namespace Barotrauma.Items.Components
|
|||||||
Vector2.Normalize((wall.A+wall.B)/2.0f - ruinShape.Center));
|
Vector2.Normalize((wall.A+wall.B)/2.0f - ruinShape.Center));
|
||||||
if (cellDot > 0) continue;
|
if (cellDot > 0) continue;
|
||||||
|
|
||||||
CreateBlipsForLine(wall.A, wall.B, radius, displayScale, -cellDot*5.0f);
|
CreateBlipsForLine(wall.A, wall.B, radius, displayScale, 100.0f, 1000.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -295,7 +295,7 @@ namespace Barotrauma.Items.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateBlipsForLine(Vector2 point1, Vector2 point2, float radius, float displayScale, float step)
|
private void CreateBlipsForLine(Vector2 point1, Vector2 point2, float radius, float displayScale, float lineStep, float zStep)
|
||||||
{
|
{
|
||||||
float pingRadius = radius * pingState;
|
float pingRadius = radius * pingState;
|
||||||
|
|
||||||
@@ -303,7 +303,7 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
Vector2 lineDir = (point2 - point1) / length;
|
Vector2 lineDir = (point2 - point1) / length;
|
||||||
|
|
||||||
for (float x = 0; x < length; x += Rand.Range(300.0f, 400.0f))
|
for (float x = 0; x < length; x += lineStep*Rand.Range(0.8f,1.2f))
|
||||||
{
|
{
|
||||||
Vector2 point = point1 + lineDir * x;
|
Vector2 point = point1 + lineDir * x;
|
||||||
//point += cell.Translation;
|
//point += cell.Translation;
|
||||||
@@ -316,7 +316,7 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
//float step = 3.0f * (Math.Abs(facingDot) + 1.0f);
|
//float step = 3.0f * (Math.Abs(facingDot) + 1.0f);
|
||||||
float alpha = Rand.Range(1.5f, 2.0f);
|
float alpha = Rand.Range(1.5f, 2.0f);
|
||||||
for (float z = 0; z < radius - pointDist; z += step)
|
for (float z = 0; z < radius - pointDist; z += zStep)
|
||||||
{
|
{
|
||||||
|
|
||||||
var blip = new RadarBlip(
|
var blip = new RadarBlip(
|
||||||
@@ -324,7 +324,7 @@ namespace Barotrauma.Items.Components
|
|||||||
alpha);
|
alpha);
|
||||||
|
|
||||||
radarBlips.Add(blip);
|
radarBlips.Add(blip);
|
||||||
step += 0.5f;
|
zStep += 0.5f;
|
||||||
alpha -= (z == 0) ? 0.5f : 0.1f;
|
alpha -= (z == 0) ? 0.5f : 0.1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -409,6 +409,8 @@ namespace Barotrauma.Items.Components
|
|||||||
SpriteEffects.None,
|
SpriteEffects.None,
|
||||||
0.0f);
|
0.0f);
|
||||||
|
|
||||||
|
connector.Draw(spriteBatch, end, Color.White, new Vector2(10.0f, 10.0f), MathUtils.VectorToAngle(end - start)+MathHelper.PiOver2);
|
||||||
|
|
||||||
if (draggingConnected == null && !wireEquipped)
|
if (draggingConnected == null && !wireEquipped)
|
||||||
{
|
{
|
||||||
if (mouseOn)
|
if (mouseOn)
|
||||||
|
|||||||
@@ -131,6 +131,8 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
|
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
|
||||||
|
|
||||||
|
if (minRotation == maxRotation) return;
|
||||||
|
|
||||||
float targetMidDiff = MathHelper.WrapAngle(targetRotation - (minRotation + maxRotation) / 2.0f);
|
float targetMidDiff = MathHelper.WrapAngle(targetRotation - (minRotation + maxRotation) / 2.0f);
|
||||||
|
|
||||||
float maxDist = (maxRotation - minRotation) / 2.0f;
|
float maxDist = (maxRotation - minRotation) / 2.0f;
|
||||||
@@ -184,6 +186,7 @@ namespace Barotrauma.Items.Components
|
|||||||
Item projectile = projectiles[0].Item;
|
Item projectile = projectiles[0].Item;
|
||||||
|
|
||||||
projectile.Drop();
|
projectile.Drop();
|
||||||
|
projectile.body.Dir = 1.0f;
|
||||||
|
|
||||||
projectile.body.ResetDynamics();
|
projectile.body.ResetDynamics();
|
||||||
projectile.body.Enabled = true;
|
projectile.body.Enabled = true;
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
public static void Draw(SpriteBatch spriteBatch, bool editing = false)
|
public static void Draw(SpriteBatch spriteBatch, bool editing = false)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MapEntity.mapEntityList.Count(); i++ )
|
for (int i = 0; i < MapEntity.mapEntityList.Count; i++ )
|
||||||
{
|
{
|
||||||
MapEntity.mapEntityList[i].Draw(spriteBatch, editing);
|
MapEntity.mapEntityList[i].Draw(spriteBatch, editing);
|
||||||
}
|
}
|
||||||
@@ -232,7 +232,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
public static void DrawFront(SpriteBatch spriteBatch, bool editing = false)
|
public static void DrawFront(SpriteBatch spriteBatch, bool editing = false)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MapEntity.mapEntityList.Count(); i++)
|
for (int i = 0; i < MapEntity.mapEntityList.Count; i++)
|
||||||
{
|
{
|
||||||
if (MapEntity.mapEntityList[i].Sprite == null || MapEntity.mapEntityList[i].Sprite.Depth < 0.5f)
|
if (MapEntity.mapEntityList[i].Sprite == null || MapEntity.mapEntityList[i].Sprite.Depth < 0.5f)
|
||||||
MapEntity.mapEntityList[i].Draw(spriteBatch, editing, false);
|
MapEntity.mapEntityList[i].Draw(spriteBatch, editing, false);
|
||||||
@@ -241,7 +241,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
public static void DrawBack(SpriteBatch spriteBatch, bool editing = false)
|
public static void DrawBack(SpriteBatch spriteBatch, bool editing = false)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MapEntity.mapEntityList.Count(); i++)
|
for (int i = 0; i < MapEntity.mapEntityList.Count; i++)
|
||||||
{
|
{
|
||||||
if (MapEntity.mapEntityList[i].Sprite == null || MapEntity.mapEntityList[i].Sprite.Depth >= 0.5f)
|
if (MapEntity.mapEntityList[i].Sprite == null || MapEntity.mapEntityList[i].Sprite.Depth >= 0.5f)
|
||||||
MapEntity.mapEntityList[i].Draw(spriteBatch, editing, true);
|
MapEntity.mapEntityList[i].Draw(spriteBatch, editing, true);
|
||||||
@@ -608,7 +608,6 @@ namespace Barotrauma
|
|||||||
|
|
||||||
foreach (string path in filePaths)
|
foreach (string path in filePaths)
|
||||||
{
|
{
|
||||||
//Map savedMap = new Map(mapPath);
|
|
||||||
SavedSubmarines.Add(new Submarine(path));
|
SavedSubmarines.Add(new Submarine(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user