Improve visibility of building placement preview.

This commit is contained in:
Paul Chote
2019-05-18 09:02:35 +00:00
committed by reaperrr
parent cdad07d172
commit 3f9e4a313f
19 changed files with 79 additions and 17 deletions

View File

@@ -33,10 +33,10 @@ namespace OpenRA.Mods.Common.Traits
public readonly bool OverridePaletteIsPlayerPalette = true;
[Desc("Footprint types to draw underneath the actor preview.")]
public readonly PlaceBuildingCellType FootprintUnderPreview = PlaceBuildingCellType.None;
public readonly PlaceBuildingCellType FootprintUnderPreview = PlaceBuildingCellType.Valid | PlaceBuildingCellType.LineBuild;
[Desc("Footprint types to draw above the actor preview.")]
public readonly PlaceBuildingCellType FootprintOverPreview = PlaceBuildingCellType.Valid | PlaceBuildingCellType.LineBuild | PlaceBuildingCellType.Invalid;
public readonly PlaceBuildingCellType FootprintOverPreview = PlaceBuildingCellType.Invalid;
protected override IPlaceBuildingPreview CreatePreview(WorldRenderer wr, ActorInfo ai, TypeDictionary init)
{

View File

@@ -33,10 +33,10 @@ namespace OpenRA.Mods.Common.Traits
public readonly bool SequencePaletteIsPlayerPalette = true;
[Desc("Footprint types to draw underneath the actor preview.")]
public readonly PlaceBuildingCellType FootprintUnderPreview = PlaceBuildingCellType.None;
public readonly PlaceBuildingCellType FootprintUnderPreview = PlaceBuildingCellType.Valid | PlaceBuildingCellType.LineBuild;
[Desc("Footprint types to draw above the actor preview.")]
public readonly PlaceBuildingCellType FootprintOverPreview = PlaceBuildingCellType.Valid | PlaceBuildingCellType.LineBuild | PlaceBuildingCellType.Invalid;
public readonly PlaceBuildingCellType FootprintOverPreview = PlaceBuildingCellType.Invalid;
protected override IPlaceBuildingPreview CreatePreview(WorldRenderer wr, ActorInfo ai, TypeDictionary init)
{

View File

@@ -1,5 +1,6 @@
^Palettes:
-PlayerColorPalette:
-PaletteFromPlayerPaletteWithAlpha@placebuilding:
IndexedPlayerPalette:
BasePalette: terrain
RemapIndex: 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191
@@ -15,6 +16,10 @@
GDI: 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191
Nod: 161, 200, 201, 202, 204, 205, 206, 12, 201, 202, 203, 204, 205, 115, 198, 114
Neutral: 192, 164, 132, 155, 133, 197, 112, 12, 163, 132, 155, 133, 134, 197, 154, 198
PaletteFromPlayerPaletteWithAlpha@Placebuilding:
BaseName: placebuilding
Alpha: 0.65
BasePalette: player
^Vehicle:
RenderSprites:

View File

@@ -700,6 +700,7 @@
Dimensions: 1,1
Footprint: x
ActorPreviewPlaceBuildingPreview:
OverridePalette: placebuilding
SoundOnDamageTransition:
DamagedSounds: xplos.aud
DestroyedSounds: crumble.aud

View File

@@ -123,3 +123,7 @@
RotationPaletteEffect@water:
ExcludePalettes: effect, chrome
RotationBase: 32
PaletteFromPlayerPaletteWithAlpha@placebuilding:
BaseName: placebuilding
Alpha: 0.65
BasePalette: player

View File

@@ -507,6 +507,10 @@ WEAP:
Power:
Amount: -40
ProvidesPrerequisite@buildingname:
-ActorPreviewPlaceBuildingPreview:
SequencePlaceBuildingPreview:
Sequence: place
SequencePalette: placebuilding
HPAD:
Inherits: ^BaseBuilding
@@ -909,6 +913,10 @@ SAM:
Amount: -20
BodyOrientation:
UseClassicFacingFudge: True
-ActorPreviewPlaceBuildingPreview:
SequencePlaceBuildingPreview:
Sequence: place
SequencePalette: placebuilding
OBLI:
Inherits: ^Defense

View File

@@ -166,6 +166,8 @@ weap:
Start: 10
Length: 10
ZOffset: -1024
place: weapmake
Start: 19
make: weapmake
Length: *
Tick: 80
@@ -496,6 +498,8 @@ sam:
dead:
Start: 128
Tick: 800
place:
Start: 0
make: sammake
Length: 20
Tick: 30

View File

@@ -2,6 +2,7 @@
-PlayerColorPalette:
-PaletteFromPlayerPaletteWithAlpha@deviatorgas:
-PaletteFromPlayerPaletteWithAlpha@cloak:
-PaletteFromPlayerPaletteWithAlpha@placebuilding:
IndexedPlayerPalette:
BasePalette: d2k
BaseName: player
@@ -25,3 +26,7 @@
BaseName: cloak
BasePalette: player
Alpha: 0.55
PaletteFromPlayerPaletteWithAlpha@Placebuilding:
BaseName: placebuilding
BasePalette: player
Alpha: 0.65

View File

@@ -386,6 +386,7 @@
TerrainTypes: Rock, Concrete
BuildSounds: BUILD1.WAV
ActorPreviewPlaceBuildingPreview:
OverridePalette: placebuilding
RequiresBuildableArea:
AreaTypes: building
Adjacent: 3

View File

@@ -84,3 +84,7 @@
BaseName: cloak
BasePalette: player
Alpha: 0.55
PaletteFromPlayerPaletteWithAlpha@placebuilding:
BaseName: placebuilding
BasePalette: player
Alpha: 0.65

View File

@@ -1,6 +1,7 @@
^Palettes:
-PlayerColorPalette:
-PaletteFromPlayerPaletteWithAlpha@cloak:
-PaletteFromPlayerPaletteWithAlpha@placebuilding:
IndexedPlayerPalette:
BasePalette: player
BaseName: player
@@ -22,3 +23,7 @@
BaseName: cloak
BasePalette: player
Alpha: 0.55
PaletteFromPlayerPaletteWithAlpha@Placebuilding:
BaseName: placebuilding
BasePalette: player
Alpha: 0.65

View File

@@ -647,6 +647,7 @@
BuildSounds: placbldg.aud, build5.aud
UndeploySounds: cashturn.aud
ActorPreviewPlaceBuildingPreview:
OverridePalette: placebuilding
RequiresBuildableArea:
AreaTypes: building
SoundOnDamageTransition:

View File

@@ -154,6 +154,10 @@ WEAF:
HP: 150000
Armor:
Type: Wood
-ActorPreviewPlaceBuildingPreview:
SequencePlaceBuildingPreview:
Sequence: place
SequencePalette: placebuilding
DOMF:
Inherits: ^FakeBuilding

View File

@@ -119,3 +119,7 @@
ChronoshiftPaletteEffect:
FlashPaletteEffect@NUKE:
Type: Nuke
PaletteFromPlayerPaletteWithAlpha@placebuilding:
BaseName: placebuilding
BasePalette: player
Alpha: 0.65

View File

@@ -1073,6 +1073,10 @@ WEAP:
ReferencePoint: Top
ZOffset: 256
RequiresCondition: primary
-ActorPreviewPlaceBuildingPreview:
SequencePlaceBuildingPreview:
Sequence: place
SequencePalette: placebuilding
FACT:
Inherits: ^Building
@@ -1243,6 +1247,10 @@ PROC:
Type: Rectangle
TopLeft: -1536, 598
BottomRight: -512, 1280
-ActorPreviewPlaceBuildingPreview:
SequencePlaceBuildingPreview:
Sequence: idle
SequencePalette: placebuilding
SILO:
Inherits: ^Building

View File

@@ -255,6 +255,8 @@ weap:
idle:
damaged-idle:
Start: 1
place: weapmake
Start: 14
make: weapmake
Length: *
build-top: weap3

View File

@@ -318,8 +318,11 @@
TerrainTypes: Clear, Rough, Road, DirtRoad, Green, Sand, Pavement
UndeploySounds: cashturn.aud
ActorPreviewPlaceBuildingPreview:
Palette: placebuilding
Palette: placefootprint
LineBuildSegmentPalette: placelinesegment
OverridePalette: placebuilding
FootprintUnderPreview: Valid, LineBuild, Invalid
FootprintOverPreview: None
RequiresBuildableArea:
AreaTypes: building
Adjacent: 4
@@ -470,7 +473,7 @@
TerrainTypes: Clear, Rough, Road, DirtRoad, Green, Sand, Pavement
UndeploySounds: cashturn.aud
FootprintPlaceBuildingPreview:
Palette: placebuilding
Palette: placefootprint
LineBuildSegmentPalette: placelinesegment
RequiresBuildableArea:
AreaTypes: building
@@ -520,8 +523,7 @@
BuildSounds: place2.aud
UndeploySounds: cashturn.aud
FootprintPlaceBuildingPreview:
Palette: placebuilding
LineBuildSegmentPalette: placelinesegment
Palette: placefootprint
KillsSelf:
RemoveInstead: true
RenderSprites:

View File

@@ -123,14 +123,6 @@
G: 0
B: 0
A: 180
PaletteFromPaletteWithAlpha@placebuilding:
Name: placebuilding
BasePalette: ra
Alpha: 0.75
PaletteFromPaletteWithAlpha@placelinesegment:
Name: placelinesegment
BasePalette: ra
Alpha: 0.4
TSShroudPalette@shroud:
Name: shroud
VoxelNormalsPalette@normals:
@@ -149,6 +141,18 @@
PlayerColorPalette:
BasePalette: player
RemapIndex: 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
PaletteFromPaletteWithAlpha@placebuilding:
Name: placefootprint
BasePalette: ra
Alpha: 0.7
PaletteFromPaletteWithAlpha@placelinesegment:
Name: placelinesegment
BasePalette: ra
Alpha: 0.5
PaletteFromPlayerPaletteWithAlpha@placebuilding:
BaseName: placebuilding
BasePalette: player
Alpha: 0.55
PaletteFromPlayerPaletteWithAlpha@cloak:
BaseName: cloak
BasePalette: player

View File

@@ -376,5 +376,5 @@ EditorWorld:
EditorActorLayer:
EditorResourceLayer:
EditorSelectionLayer:
Palette: placebuilding
Palette: placefootprint
LoadWidgetAtGameStart: