diff --git a/OpenRA.Mods.Common/Traits/Buildings/ActorPreviewPlaceBuildingPreview.cs b/OpenRA.Mods.Common/Traits/Buildings/ActorPreviewPlaceBuildingPreview.cs index 21d4952aed..d30d9f7b69 100644 --- a/OpenRA.Mods.Common/Traits/Buildings/ActorPreviewPlaceBuildingPreview.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/ActorPreviewPlaceBuildingPreview.cs @@ -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) { diff --git a/OpenRA.Mods.Common/Traits/Buildings/SequencePlaceBuildingPreview.cs b/OpenRA.Mods.Common/Traits/Buildings/SequencePlaceBuildingPreview.cs index 83c48b0182..98ef86d52c 100644 --- a/OpenRA.Mods.Common/Traits/Buildings/SequencePlaceBuildingPreview.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/SequencePlaceBuildingPreview.cs @@ -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) { diff --git a/mods/cnc/rules/campaign-palettes.yaml b/mods/cnc/rules/campaign-palettes.yaml index c03156ef9a..138a1bed66 100644 --- a/mods/cnc/rules/campaign-palettes.yaml +++ b/mods/cnc/rules/campaign-palettes.yaml @@ -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: diff --git a/mods/cnc/rules/defaults.yaml b/mods/cnc/rules/defaults.yaml index 86b5f4d079..09e43509f5 100644 --- a/mods/cnc/rules/defaults.yaml +++ b/mods/cnc/rules/defaults.yaml @@ -700,6 +700,7 @@ Dimensions: 1,1 Footprint: x ActorPreviewPlaceBuildingPreview: + OverridePalette: placebuilding SoundOnDamageTransition: DamagedSounds: xplos.aud DestroyedSounds: crumble.aud diff --git a/mods/cnc/rules/palettes.yaml b/mods/cnc/rules/palettes.yaml index e769d1cb5d..7bdd928414 100644 --- a/mods/cnc/rules/palettes.yaml +++ b/mods/cnc/rules/palettes.yaml @@ -123,3 +123,7 @@ RotationPaletteEffect@water: ExcludePalettes: effect, chrome RotationBase: 32 + PaletteFromPlayerPaletteWithAlpha@placebuilding: + BaseName: placebuilding + Alpha: 0.65 + BasePalette: player diff --git a/mods/cnc/rules/structures.yaml b/mods/cnc/rules/structures.yaml index 30869a8cb2..b98a723579 100644 --- a/mods/cnc/rules/structures.yaml +++ b/mods/cnc/rules/structures.yaml @@ -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 diff --git a/mods/cnc/sequences/structures.yaml b/mods/cnc/sequences/structures.yaml index 8ca158f787..2bf9ebd338 100644 --- a/mods/cnc/sequences/structures.yaml +++ b/mods/cnc/sequences/structures.yaml @@ -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 diff --git a/mods/d2k/rules/campaign-palettes.yaml b/mods/d2k/rules/campaign-palettes.yaml index 140ea3f3f2..f85d4a81a0 100644 --- a/mods/d2k/rules/campaign-palettes.yaml +++ b/mods/d2k/rules/campaign-palettes.yaml @@ -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 diff --git a/mods/d2k/rules/defaults.yaml b/mods/d2k/rules/defaults.yaml index 9225f11567..24d093789a 100644 --- a/mods/d2k/rules/defaults.yaml +++ b/mods/d2k/rules/defaults.yaml @@ -386,6 +386,7 @@ TerrainTypes: Rock, Concrete BuildSounds: BUILD1.WAV ActorPreviewPlaceBuildingPreview: + OverridePalette: placebuilding RequiresBuildableArea: AreaTypes: building Adjacent: 3 diff --git a/mods/d2k/rules/palettes.yaml b/mods/d2k/rules/palettes.yaml index c75685b093..c898c28a29 100644 --- a/mods/d2k/rules/palettes.yaml +++ b/mods/d2k/rules/palettes.yaml @@ -84,3 +84,7 @@ BaseName: cloak BasePalette: player Alpha: 0.55 + PaletteFromPlayerPaletteWithAlpha@placebuilding: + BaseName: placebuilding + BasePalette: player + Alpha: 0.65 diff --git a/mods/ra/rules/campaign-palettes.yaml b/mods/ra/rules/campaign-palettes.yaml index c215288703..3c4c1530f4 100644 --- a/mods/ra/rules/campaign-palettes.yaml +++ b/mods/ra/rules/campaign-palettes.yaml @@ -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 diff --git a/mods/ra/rules/defaults.yaml b/mods/ra/rules/defaults.yaml index 8401f9d85c..9ce3229319 100644 --- a/mods/ra/rules/defaults.yaml +++ b/mods/ra/rules/defaults.yaml @@ -647,6 +647,7 @@ BuildSounds: placbldg.aud, build5.aud UndeploySounds: cashturn.aud ActorPreviewPlaceBuildingPreview: + OverridePalette: placebuilding RequiresBuildableArea: AreaTypes: building SoundOnDamageTransition: diff --git a/mods/ra/rules/fakes.yaml b/mods/ra/rules/fakes.yaml index 199821ce3e..52ec449de3 100644 --- a/mods/ra/rules/fakes.yaml +++ b/mods/ra/rules/fakes.yaml @@ -154,6 +154,10 @@ WEAF: HP: 150000 Armor: Type: Wood + -ActorPreviewPlaceBuildingPreview: + SequencePlaceBuildingPreview: + Sequence: place + SequencePalette: placebuilding DOMF: Inherits: ^FakeBuilding diff --git a/mods/ra/rules/palettes.yaml b/mods/ra/rules/palettes.yaml index ee741aad29..07d5ddc404 100644 --- a/mods/ra/rules/palettes.yaml +++ b/mods/ra/rules/palettes.yaml @@ -119,3 +119,7 @@ ChronoshiftPaletteEffect: FlashPaletteEffect@NUKE: Type: Nuke + PaletteFromPlayerPaletteWithAlpha@placebuilding: + BaseName: placebuilding + BasePalette: player + Alpha: 0.65 diff --git a/mods/ra/rules/structures.yaml b/mods/ra/rules/structures.yaml index 3eb35d7d31..009c9819b4 100644 --- a/mods/ra/rules/structures.yaml +++ b/mods/ra/rules/structures.yaml @@ -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 diff --git a/mods/ra/sequences/structures.yaml b/mods/ra/sequences/structures.yaml index 79e78924ea..ff8463b088 100644 --- a/mods/ra/sequences/structures.yaml +++ b/mods/ra/sequences/structures.yaml @@ -255,6 +255,8 @@ weap: idle: damaged-idle: Start: 1 + place: weapmake + Start: 14 make: weapmake Length: * build-top: weap3 diff --git a/mods/ts/rules/defaults.yaml b/mods/ts/rules/defaults.yaml index 01e5d27afd..f3e96cf09a 100644 --- a/mods/ts/rules/defaults.yaml +++ b/mods/ts/rules/defaults.yaml @@ -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: diff --git a/mods/ts/rules/palettes.yaml b/mods/ts/rules/palettes.yaml index 39dd6980de..e7dcf02165 100644 --- a/mods/ts/rules/palettes.yaml +++ b/mods/ts/rules/palettes.yaml @@ -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 diff --git a/mods/ts/rules/world.yaml b/mods/ts/rules/world.yaml index f6fc19d4d1..20ba6a273f 100644 --- a/mods/ts/rules/world.yaml +++ b/mods/ts/rules/world.yaml @@ -376,5 +376,5 @@ EditorWorld: EditorActorLayer: EditorResourceLayer: EditorSelectionLayer: - Palette: placebuilding + Palette: placefootprint LoadWidgetAtGameStart: