Adjust waypoint linewidths.

This commit is contained in:
tovl
2019-08-10 13:51:05 +02:00
committed by Paul Chote
parent 8690a4a6ce
commit a8b9562d74
5 changed files with 30 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.Traits
public readonly string Image = "rallypoint"; public readonly string Image = "rallypoint";
[Desc("Width (in pixels) of the rallypoint line.")] [Desc("Width (in pixels) of the rallypoint line.")]
public readonly int LineWidth = 2; public readonly int LineWidth = 1;
[SequenceReference("Image")] [SequenceReference("Image")]
public readonly string FlagSequence = "flag"; public readonly string FlagSequence = "flag";

View File

@@ -24,10 +24,16 @@ namespace OpenRA.Mods.Common.Traits
public readonly int Delay = 60; public readonly int Delay = 60;
[Desc("Width (in pixels) of the target lines.")] [Desc("Width (in pixels) of the target lines.")]
public readonly int LineWidth = 2; public readonly int LineWidth = 1;
[Desc("Width (in pixels) of the queued target lines.")]
public readonly int QueuedLineWidth = 1;
[Desc("Width (in pixels) of the end node markers.")] [Desc("Width (in pixels) of the end node markers.")]
public readonly int MarkerWidth = 3; public readonly int MarkerWidth = 2;
[Desc("Width (in pixels) of the queued end node markers.")]
public readonly int QueuedMarkerWidth = 2;
public virtual object Create(ActorInitializer init) { return new DrawLineToTarget(init.Self, this); } public virtual object Create(ActorInitializer init) { return new DrawLineToTarget(init.Self, this); }
} }
@@ -80,12 +86,15 @@ namespace OpenRA.Mods.Common.Traits
{ {
if (n.Target.Type != TargetType.Invalid) if (n.Target.Type != TargetType.Invalid)
{ {
var lineWidth = renderableCache.Any() ? info.QueuedLineWidth : info.LineWidth;
var markerWidth = renderableCache.Any() ? info.QueuedMarkerWidth : info.MarkerWidth;
var pal = wr.Palette(TileSet.TerrainPaletteInternalName); var pal = wr.Palette(TileSet.TerrainPaletteInternalName);
var tile = n.Tile; var tile = n.Tile;
var pos = n.Target.CenterPosition; var pos = n.Target.CenterPosition;
if (tile == null) if (tile == null)
renderableCache.Add(new TargetLineRenderable(new[] { prev, pos }, n.Color, info.LineWidth, info.MarkerWidth)); renderableCache.Add(new TargetLineRenderable(new[] { prev, pos }, n.Color, lineWidth, markerWidth));
else else
renderableCache.Add(new SpriteRenderable(tile, pos, WVec.Zero, -511, pal, 1f, true)); renderableCache.Add(new SpriteRenderable(tile, pos, WVec.Zero, -511, pal, 1f, true));

View File

@@ -550,6 +550,8 @@
Action: Kill Action: Kill
DeathTypes: BulletDeath DeathTypes: BulletDeath
DrawLineToTarget: DrawLineToTarget:
QueuedLineWidth: 2
QueuedMarkerWidth: 3
Health: Health:
HP: 5000 HP: 5000
Armor: Armor:
@@ -752,6 +754,8 @@
OwnerLostAction: OwnerLostAction:
Action: Kill Action: Kill
DrawLineToTarget: DrawLineToTarget:
QueuedLineWidth: 2
QueuedMarkerWidth: 3
Mobile: Mobile:
PauseOnCondition: empdisable || being-captured || carried PauseOnCondition: empdisable || being-captured || carried
Locomotor: wheeled Locomotor: wheeled
@@ -855,6 +859,8 @@
OwnerLostAction: OwnerLostAction:
Action: Kill Action: Kill
DrawLineToTarget: DrawLineToTarget:
QueuedLineWidth: 2
QueuedMarkerWidth: 3
AppearsOnRadar: AppearsOnRadar:
UseLocation: true UseLocation: true
Targetable@GROUND: Targetable@GROUND:
@@ -945,6 +951,8 @@
Inherits@SELECTION_MODE: ^FlatSelectionMode Inherits@SELECTION_MODE: ^FlatSelectionMode
Huntable: Huntable:
DrawLineToTarget: DrawLineToTarget:
QueuedLineWidth: 2
QueuedMarkerWidth: 3
Health: Health:
Armor: Armor:
Type: Light Type: Light
@@ -1100,6 +1108,8 @@
RenderSprites: RenderSprites:
WithVoxelBody: WithVoxelBody:
DrawLineToTarget: DrawLineToTarget:
QueuedLineWidth: 2
QueuedMarkerWidth: 3
Mobile: Mobile:
TurnSpeed: 5 TurnSpeed: 5
Voice: Move Voice: Move

View File

@@ -99,6 +99,7 @@ GAPILE:
Offset: 2,3 Offset: 2,3
Palette: mouse Palette: mouse
IsPlayerPalette: false IsPlayerPalette: false
LineWidth: 2
Exit@1: Exit@1:
SpawnOffset: -256,1024,0 SpawnOffset: -256,1024,0
ExitCell: 2,2 ExitCell: 2,2
@@ -163,6 +164,7 @@ GAWEAP:
Offset: 4,1 Offset: 4,1
Palette: mouse Palette: mouse
IsPlayerPalette: false IsPlayerPalette: false
LineWidth: 2
Exit@1: Exit@1:
SpawnOffset: -384,-384,0 SpawnOffset: -384,-384,0
ExitCell: 3,1 ExitCell: 3,1
@@ -231,6 +233,7 @@ GAHPAD:
RallyPoint: RallyPoint:
Palette: mouse Palette: mouse
IsPlayerPalette: false IsPlayerPalette: false
LineWidth: 2
Production: Production:
Produces: Air Produces: Air
PauseOnCondition: empdisable PauseOnCondition: empdisable
@@ -301,6 +304,7 @@ GADEPT:
RallyPoint: RallyPoint:
Palette: mouse Palette: mouse
IsPlayerPalette: false IsPlayerPalette: false
LineWidth: 2
WithIdleOverlay@LIGHT: WithIdleOverlay@LIGHT:
RequiresCondition: !build-incomplete RequiresCondition: !build-incomplete
Sequence: idle-light Sequence: idle-light

View File

@@ -112,6 +112,7 @@ NAHAND:
Offset: 3,3 Offset: 3,3
Palette: mouse Palette: mouse
IsPlayerPalette: false IsPlayerPalette: false
LineWidth: 2
Production: Production:
Produces: Infantry Produces: Infantry
PauseOnCondition: empdisable PauseOnCondition: empdisable
@@ -169,6 +170,7 @@ NAWEAP:
Offset: 4,1 Offset: 4,1
Palette: mouse Palette: mouse
IsPlayerPalette: false IsPlayerPalette: false
LineWidth: 2
Exit@1: Exit@1:
SpawnOffset: -384,-384,0 SpawnOffset: -384,-384,0
ExitCell: 3,1 ExitCell: 3,1
@@ -231,6 +233,7 @@ NAHPAD:
RallyPoint: RallyPoint:
Palette: mouse Palette: mouse
IsPlayerPalette: false IsPlayerPalette: false
LineWidth: 2
Production: Production:
Produces: Air Produces: Air
PauseOnCondition: empdisable PauseOnCondition: empdisable