Remove RenderBuilding

This commit is contained in:
reaperrr
2015-07-15 07:29:45 +02:00
parent bf51e0600d
commit 9da56f51e2
42 changed files with 196 additions and 248 deletions

View File

@@ -14,7 +14,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
[Desc("Building animation to play when ProductionAirdrop is used to deliver units.")]
public class WithDeliveryAnimationInfo : ITraitInfo, Requires<RenderBuildingInfo>
public class WithDeliveryAnimationInfo : ITraitInfo, Requires<WithSpriteBodyInfo>
{
public readonly string ActiveSequence = "active";
@@ -26,23 +26,23 @@ namespace OpenRA.Mods.Cnc.Traits
public class WithDeliveryAnimation : INotifyDelivery
{
readonly WithDeliveryAnimationInfo info;
readonly RenderBuilding building;
readonly WithSpriteBody wsb;
public WithDeliveryAnimation(Actor self, WithDeliveryAnimationInfo info)
{
building = self.Trait<RenderBuilding>();
wsb = self.Trait<WithSpriteBody>();
this.info = info;
}
public void IncomingDelivery(Actor self)
{
building.PlayCustomAnimRepeating(self, info.ActiveSequence);
wsb.PlayCustomAnimationRepeating(self, info.ActiveSequence);
}
public void Delivered(Actor self)
{
building.PlayCustomAnimRepeating(self, info.IdleSequence);
wsb.PlayCustomAnimationRepeating(self, info.IdleSequence);
}
}
}

View File

@@ -48,7 +48,7 @@ namespace OpenRA.Mods.Common.Activities
continue;
// HACK to check if we are on the helipad/airfield/etc.
var hostBuilding = self.World.ActorMap.GetUnitsAt(self.Location).FirstOrDefault(a => a.HasTrait<RenderBuilding>());
var hostBuilding = self.World.ActorMap.GetUnitsAt(self.Location).FirstOrDefault(a => a.HasTrait<Building>());
if (hostBuilding == null || !hostBuilding.IsInWorld)
return NextActivity;
@@ -56,7 +56,7 @@ namespace OpenRA.Mods.Common.Activities
if (!pool.GiveAmmo())
continue;
hostBuilding.Trait<RenderBuilding>().PlayCustomAnim(hostBuilding, "active");
hostBuilding.Trait<WithSpriteBody>().PlayCustomAnimation(hostBuilding, "active");
var sound = pool.Info.RearmSound;
if (sound != null)

View File

@@ -405,7 +405,6 @@
<Compile Include="Traits\Render\AutoSelectionSize.cs" />
<Compile Include="Traits\Render\Hovers.cs" />
<Compile Include="Traits\Render\LeavesTrails.cs" />
<Compile Include="Traits\Render\RenderBuilding.cs" />
<Compile Include="Traits\Render\RenderSpritesEditorOnly.cs" />
<Compile Include="Traits\Render\WithTurretedSpriteBody.cs" />
<Compile Include="Traits\Render\RenderNameTag.cs" />

View File

@@ -105,7 +105,8 @@ namespace OpenRA.Mods.Common.Traits
// Harvester was killed while unloading
if (dockedHarv != null && dockedHarv.IsDead)
{
self.Trait<RenderBuilding>().CancelCustomAnim(self);
var wsb = self.Trait<WithSpriteBody>();
wsb.PlayCustomAnimation(self, wsb.Info.Sequence);
dockedHarv = null;
}

View File

@@ -1,81 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Render trait for stationary objects that can be placed from the build palette.")]
public class RenderBuildingInfo : RenderSimpleInfo, Requires<BuildingInfo>
{
public readonly bool PauseOnLowPower = false;
public override object Create(ActorInitializer init) { return new RenderBuilding(init, this); }
}
public class RenderBuilding : RenderSimple, INotifyDamageStateChanged, INotifyBuildComplete
{
RenderBuildingInfo info;
public RenderBuilding(ActorInitializer init, RenderBuildingInfo info)
: this(init, info, () => 0) { }
public RenderBuilding(ActorInitializer init, RenderBuildingInfo info, Func<int> baseFacing)
: base(init, info, baseFacing)
{
var self = init.Self;
this.info = info;
DefaultAnimation.PlayRepeating(NormalizeSequence(self, info.Sequence));
}
public virtual void BuildingComplete(Actor self)
{
DefaultAnimation.PlayRepeating(NormalizeSequence(self, info.Sequence));
if (info.PauseOnLowPower)
DefaultAnimation.Paused = () =>
self.IsDisabled() && DefaultAnimation.CurrentSequence.Name == NormalizeSequence(self, info.Sequence);
}
public void PlayCustomAnimThen(Actor self, string name, Action a)
{
DefaultAnimation.PlayThen(NormalizeSequence(self, name),
() => { DefaultAnimation.PlayRepeating(NormalizeSequence(self, info.Sequence)); a(); });
}
public void PlayCustomAnimRepeating(Actor self, string name)
{
DefaultAnimation.PlayThen(NormalizeSequence(self, name),
() => PlayCustomAnimRepeating(self, name));
}
public void PlayCustomAnimBackwards(Actor self, string name, Action a)
{
DefaultAnimation.PlayBackwardsThen(NormalizeSequence(self, name),
() => { DefaultAnimation.PlayRepeating(NormalizeSequence(self, info.Sequence)); a(); });
}
public void CancelCustomAnim(Actor self)
{
DefaultAnimation.PlayRepeating(NormalizeSequence(self, info.Sequence));
}
public virtual void DamageStateChanged(Actor self, AttackInfo e)
{
if (DefaultAnimation.CurrentSequence != null)
DefaultAnimation.ReplaceAnim(NormalizeSequence(self, DefaultAnimation.CurrentSequence.Name));
}
}
}

View File

@@ -16,7 +16,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Replaces the idle animation of a building.")]
public class WithActiveAnimationInfo : ITraitInfo, Requires<RenderBuildingInfo>
public class WithActiveAnimationInfo : ITraitInfo, Requires<WithSpriteBodyInfo>
{
[Desc("Sequence name to use")]
[SequenceReference] public readonly string Sequence = "active";
@@ -31,11 +31,11 @@ namespace OpenRA.Mods.Common.Traits
public class WithActiveAnimation : ITick, INotifyBuildComplete, INotifySold
{
readonly WithActiveAnimationInfo info;
readonly RenderBuilding renderBuilding;
readonly WithSpriteBody wsb;
public WithActiveAnimation(Actor self, WithActiveAnimationInfo info)
{
renderBuilding = self.Trait<RenderBuilding>();
wsb = self.Trait<WithSpriteBody>();
this.info = info;
}
@@ -48,7 +48,7 @@ namespace OpenRA.Mods.Common.Traits
if (--ticks <= 0)
{
if (!(info.PauseOnLowPower && self.IsDisabled()))
renderBuilding.PlayCustomAnim(self, info.Sequence);
wsb.PlayCustomAnimation(self, info.Sequence);
ticks = info.Interval;
}
}

View File

@@ -13,10 +13,10 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Changes the animation when the actor constructed a building.")]
public class WithBuildingPlacedAnimationInfo : ITraitInfo, Requires<RenderSimpleInfo>
public class WithBuildingPlacedAnimationInfo : ITraitInfo, Requires<WithSpriteBodyInfo>
{
[Desc("Sequence name to use")]
[SequenceReference] public readonly string Sequence = "build";
[Desc("Sequence name to use"), SequenceReference]
public readonly string Sequence = "build";
public object Create(ActorInitializer init) { return new WithBuildingPlacedAnimation(init.Self, this); }
}
@@ -24,13 +24,13 @@ namespace OpenRA.Mods.Common.Traits
public class WithBuildingPlacedAnimation : INotifyBuildingPlaced, INotifyBuildComplete
{
readonly WithBuildingPlacedAnimationInfo info;
readonly RenderSimple renderSimple;
readonly WithSpriteBody wsb;
bool buildComplete;
public WithBuildingPlacedAnimation(Actor self, WithBuildingPlacedAnimationInfo info)
{
this.info = info;
renderSimple = self.Trait<RenderSimple>();
wsb = self.Trait<WithSpriteBody>();
buildComplete = !self.HasTrait<Building>();
}
@@ -42,7 +42,7 @@ namespace OpenRA.Mods.Common.Traits
public void BuildingPlaced(Actor self)
{
if (buildComplete)
renderSimple.PlayCustomAnim(self, info.Sequence);
wsb.PlayCustomAnimation(self, info.Sequence, () => wsb.CancelCustomAnimation(self));
}
}
}

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Replaces the sprite during construction.")]
public class WithMakeAnimationInfo : ITraitInfo, Requires<BuildingInfo>, Requires<RenderBuildingInfo>
public class WithMakeAnimationInfo : ITraitInfo, Requires<WithSpriteBodyInfo>
{
[Desc("Sequence name to use")]
[SequenceReference] public readonly string Sequence = "make";
@@ -29,18 +29,18 @@ namespace OpenRA.Mods.Common.Traits
public class WithMakeAnimation
{
readonly WithMakeAnimationInfo info;
readonly RenderBuilding renderBuilding;
readonly WithSpriteBody wsb;
public WithMakeAnimation(ActorInitializer init, WithMakeAnimationInfo info)
{
this.info = info;
var self = init.Self;
renderBuilding = self.Trait<RenderBuilding>();
wsb = self.Trait<WithSpriteBody>();
var building = self.Trait<Building>();
if (!building.SkipMakeAnimation)
var building = self.TraitOrDefault<Building>();
if (building != null && !building.SkipMakeAnimation)
{
renderBuilding.PlayCustomAnimThen(self, info.Sequence, () =>
wsb.PlayCustomAnimation(self, info.Sequence, () =>
{
building.NotifyBuildingComplete(self);
});
@@ -49,10 +49,10 @@ namespace OpenRA.Mods.Common.Traits
public void Reverse(Actor self, Activity activity, bool queued = true)
{
renderBuilding.PlayCustomAnimBackwards(self, info.Sequence, () =>
wsb.PlayCustomAnimationBackwards(self, info.Sequence, () =>
{
// avoids visual glitches as we wait for the actor to get destroyed
renderBuilding.DefaultAnimation.PlayFetchIndex(info.Sequence, () => 0);
wsb.DefaultAnimation.PlayFetchIndex(info.Sequence, () => 0);
self.QueueActivity(queued, activity);
});
}

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Replaces the building animation when it repairs a unit.")]
public class WithRepairAnimationInfo : ITraitInfo, Requires<RenderBuildingInfo>
public class WithRepairAnimationInfo : ITraitInfo, Requires<WithSpriteBodyInfo>
{
[Desc("Sequence name to use")]
[SequenceReference] public readonly string Sequence = "active";
@@ -36,9 +36,9 @@ namespace OpenRA.Mods.Common.Traits
public void Repairing(Actor self, Actor host)
{
var building = host.TraitOrDefault<RenderBuilding>();
if (building != null && !(info.PauseOnLowPower && self.IsDisabled()))
building.PlayCustomAnim(host, info.Sequence);
var spriteBody = host.TraitOrDefault<WithSpriteBody>();
if (spriteBody != null && !(info.PauseOnLowPower && self.IsDisabled()))
spriteBody.PlayCustomAnimation(host, info.Sequence);
}
}
}

View File

@@ -14,7 +14,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Displays the fill status of PlayerResources with an extra sprite overlay on the actor.")]
class WithResourcesInfo : ITraitInfo, Requires<RenderSimpleInfo>
class WithResourcesInfo : ITraitInfo, Requires<WithSpriteBodyInfo>, Requires<RenderSpritesInfo>
{
[Desc("Sequence name to use")]
[SequenceReference] public readonly string Sequence = "resources";
@@ -26,7 +26,8 @@ namespace OpenRA.Mods.Common.Traits
{
readonly WithResourcesInfo info;
readonly AnimationWithOffset anim;
readonly RenderSimple rs;
readonly RenderSprites rs;
readonly WithSpriteBody wsb;
PlayerResources playerResources;
bool buildComplete;
@@ -34,7 +35,8 @@ namespace OpenRA.Mods.Common.Traits
public WithResources(Actor self, WithResourcesInfo info)
{
this.info = info;
rs = self.Trait<RenderSimple>();
rs = self.Trait<RenderSprites>();
wsb = self.Trait<WithSpriteBody>();
playerResources = self.Owner.PlayerActor.Trait<PlayerResources>();
var a = new Animation(self.World, rs.GetImage(self));
@@ -55,7 +57,7 @@ namespace OpenRA.Mods.Common.Traits
public void DamageStateChanged(Actor self, AttackInfo e)
{
if (anim.Animation.CurrentSequence != null)
anim.Animation.ReplaceAnim(rs.NormalizeSequence(self, info.Sequence));
anim.Animation.ReplaceAnim(wsb.NormalizeSequence(self, info.Sequence));
}
public void OnOwnerChanged(Actor self, Player oldOwner, Player newOwner)

View File

@@ -19,11 +19,11 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Default trait for rendering sprite-based actors.")]
public class WithSpriteBodyInfo : UpgradableTraitInfo, IRenderActorPreviewSpritesInfo, Requires<RenderSpritesInfo>
{
[Desc("Animation to play when the actor is created.")]
[SequenceReference] public readonly string StartSequence = null;
[Desc("Animation to play when the actor is created."), SequenceReference]
public readonly string StartSequence = null;
[Desc("Animation to play when the actor is idle.")]
[SequenceReference] public readonly string Sequence = "idle";
[Desc("Animation to play when the actor is idle."), SequenceReference]
public readonly string Sequence = "idle";
[Desc("Pause animation when actor is disabled.")]
public readonly bool PauseAnimationWhenDisabled = false;

View File

@@ -30,6 +30,9 @@ namespace OpenRA.Mods.Common.Traits
public readonly int Range = 1;
public readonly string GrantUpgradeSound = "ironcur9.aud";
[Desc("Sequence to play for granting actor when activated."), SequenceReference]
public readonly string GrantUpgradeSequence = "active";
public override object Create(ActorInitializer init) { return new GrantUpgradePower(init.Self, this); }
}
@@ -53,7 +56,7 @@ namespace OpenRA.Mods.Common.Traits
{
base.Activate(self, order, manager);
self.Trait<RenderBuilding>().PlayCustomAnim(self, "active");
self.Trait<WithSpriteBody>().PlayCustomAnimation(self, info.GrantUpgradeSequence);
Sound.Play(info.GrantUpgradeSound, self.World.Map.CenterOfCell(order.TargetLocation));

View File

@@ -47,6 +47,10 @@ namespace OpenRA.Mods.Common.Traits
public readonly string FlashType = null;
[SequenceReference]
[Desc("Sequence the launching actor should play when activating this power.")]
public readonly string ActivationSequence = "active";
public override object Create(ActorInitializer init) { return new NukePower(init.Self, this); }
}
@@ -71,8 +75,8 @@ namespace OpenRA.Mods.Common.Traits
else
Sound.Play(Info.IncomingSound);
var rb = self.Trait<RenderSimple>();
rb.PlayCustomAnim(self, "active");
var wsb = self.Trait<WithSpriteBody>();
wsb.PlayCustomAnimation(self, info.ActivationSequence);
var targetPosition = self.World.Map.CenterOfCell(order.TargetLocation);
var missile = new NukeLaunch(self.Owner, info.MissileWeapon,

View File

@@ -1931,6 +1931,40 @@ namespace OpenRA.Mods.Common.UtilityCommands
}
}
if (engineVersion < 20150828)
{
// Replaced RenderBuilding with RenderSprites + WithSpriteBody (+AutoSelectionSize)
if (depth == 0)
{
var childKeysExcludeFromRS = new[] { "Sequence", "PauseOnLowPower" };
var rb = node.Value.Nodes.FirstOrDefault(n => n.Key.StartsWith("RenderBuilding"));
if (rb != null)
{
rb.Key = "WithSpriteBody";
var rsNodes = rb.Value.Nodes.Where(n => !childKeysExcludeFromRS.Contains(n.Key)).ToList();
if (rsNodes.Any())
node.Value.Nodes.Add(new MiniYamlNode("RenderSprites", new MiniYaml("", rsNodes)));
else
node.Value.Nodes.Add(new MiniYamlNode("RenderSprites", ""));
node.Value.Nodes.Add(new MiniYamlNode("AutoSelectionSize", ""));
rb.Value.Nodes.RemoveAll(n => rsNodes.Contains(n));
}
var rrb = node.Value.Nodes.FirstOrDefault(n => n.Key.StartsWith("-RenderBuilding"));
if (rrb != null)
rrb.Key = "-WithSpriteBody";
if (depth == 2 && node.Key == "PauseOnLowPower" && (parentKey == "WithSpriteBody"
|| parentKey == "WithTurretedSpriteBody" || parentKey == "WithWallSpriteBody"))
node.Key = "PauseAnimationWhenDisabled";
}
}
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
}
}

View File

@@ -92,9 +92,9 @@ namespace OpenRA.Mods.RA.Activities
if (teleporter != null && self != teleporter && !teleporter.Disposed)
{
var building = teleporter.TraitOrDefault<RenderBuilding>();
var building = teleporter.TraitOrDefault<WithSpriteBody>();
if (building != null)
building.PlayCustomAnim(teleporter, "active");
building.PlayCustomAnimation(teleporter, "active");
}
return NextActivity;

View File

@@ -432,7 +432,9 @@
DamagedSounds: xplos.aud
DestroyedSounds: crumble.aud
QuantizeFacingsFromSequence:
RenderBuilding:
RenderSprites:
WithSpriteBody:
AutoSelectionSize:
WithBuildingExplosion:
Delay: 1
CaptureNotification:
@@ -489,7 +491,9 @@
Dimensions: 1,1
Footprint: x
QuantizeFacingsFromSequence:
RenderBuilding:
RenderSprites:
WithSpriteBody:
AutoSelectionSize:
Tooltip:
Name: Civilian Building (Destroyed)
GenericVisibility: None
@@ -518,8 +522,10 @@
-WithBuildingExplosion:
-TargetableBuilding:
-Demolishable:
RenderBuilding:
RenderSprites:
Palette: terrain
WithSpriteBody:
AutoSelectionSize:
^CivFieldHusk:
AppearsOnRadar:
@@ -601,8 +607,10 @@
Name: Blossom Tree
BodyOrientation:
QuantizedFacings: 1
RenderBuilding:
RenderSprites:
Palette: staticterrain
WithSpriteBody:
AutoSelectionSize:
Building:
Footprint: x
Dimensions: 1,1

View File

@@ -47,7 +47,7 @@ waypoint:
^fact.colorpicker:
Inherits: FACT
RenderBuilding:
RenderSprites:
Image: fact
Palette: colorpicker

View File

@@ -72,7 +72,7 @@ FACT:
FACT.GDI:
Inherits: FACT
RenderBuilding:
RenderSprites:
Image: fact
Buildable:
Queue: Building.GDI, Building.Nod
@@ -84,7 +84,7 @@ FACT.GDI:
FACT.NOD:
Inherits: FACT
RenderBuilding:
RenderSprites:
Image: fact
Buildable:
Queue: Building.GDI, Building.Nod
@@ -218,7 +218,6 @@ SILO:
PipCount: 10
PipColor: Green
Capacity: 2000
-RenderBuilding:
-EmitInfantryOnSell:
Power:
Amount: -10
@@ -226,7 +225,6 @@ SILO:
RequiredForShortGame: false
SelectionDecorations:
VisualBounds: 49,30
-WithMakeAnimation:
PYLE:
Inherits: ^BaseBuilding
@@ -463,8 +461,8 @@ HQ:
RequiresPower:
CanPowerDown:
DisabledOverlay:
RenderBuilding:
PauseOnLowPower: yes
WithSpriteBody:
PauseAnimationWhenDisabled: true
Health:
HP: 700
RevealsShroud:
@@ -549,8 +547,8 @@ EYE:
RequiresPower:
CanPowerDown:
DisabledOverlay:
RenderBuilding:
PauseOnLowPower: yes
WithSpriteBody:
PauseAnimationWhenDisabled: true
Health:
HP: 1200
RevealsShroud:
@@ -654,7 +652,7 @@ GUN:
Turreted:
ROT: 12
InitialFacing: 50
RenderSprites:
-WithSpriteBody:
WithTurretedSpriteBody:
Armament:
Weapon: TurretGun
@@ -662,13 +660,11 @@ GUN:
MuzzleSequence: muzzle
AttackTurreted:
WithMuzzleFlash:
-RenderBuilding:
-WithDeathAnimation:
DetectCloaked:
Range: 3
Power:
Amount: -20
-WithMakeAnimation:
SAM:
Inherits: ^Defense
@@ -697,7 +693,7 @@ SAM:
Turreted:
ROT: 10
InitialFacing: 0
RenderSprites:
-WithSpriteBody:
WithTurretedSpriteBody:
AutoSelectionSize:
Armament:
@@ -705,11 +701,9 @@ SAM:
MuzzleSequence: muzzle
AttackPopupTurreted:
WithMuzzleFlash:
-RenderBuilding:
-RenderDetectionCircle:
Power:
Amount: -20
-WithMakeAnimation:
OBLI:
Inherits: ^Defense
@@ -739,8 +733,6 @@ OBLI:
Range: 8c0
Bib:
HasMinibib: Yes
RenderSprites:
WithSpriteBody:
WithChargeAnimation:
Armament:
Weapon: Laser
@@ -750,13 +742,11 @@ OBLI:
ChargeAudio: obelpowr.aud
ReloadTime: 40
InitialChargeDelay: 50
-RenderBuilding:
-EmitInfantryOnSell:
DetectCloaked:
Range: 5
Power:
Amount: -150
-WithMakeAnimation:
GTWR:
Inherits: ^Defense

View File

@@ -11,7 +11,6 @@ V19:
V19.Husk:
Inherits: ^CivBuildingHusk
-RenderBuilding:
AutoSelectionSize:
RenderSprites:
BodyOrientation:
@@ -88,7 +87,6 @@ BIO.Husk:
MISS:
Inherits: ^CivBuilding
RenderBuilding:
Building:
Footprint: xxx xxx
Dimensions: 3,2

View File

@@ -7,7 +7,7 @@ SPLIT2:
SPLIT3:
Inherits: ^TibTree
RenderBuilding:
RenderSprites:
Image: split2
SeedsResource:
ResourceType: Tiberium
@@ -16,7 +16,7 @@ SPLIT3:
SPLITBLUE:
Inherits: ^TibTree
RenderBuilding:
RenderSprites:
Image: split3
SeedsResource:
ResourceType: BlueTiberium

View File

@@ -1,6 +1,8 @@
spicebloom:
HiddenUnderShroud:
RenderBuilding:
RenderSprites:
WithSpriteBody:
AutoSelectionSize:
Building:
Footprint: x
Dimensions: 1,1

View File

@@ -275,7 +275,9 @@
DamagedSounds: EXPLSML1.WAV
DestroyedSounds: EXPLHG1.WAV
QuantizeFacingsFromSequence:
RenderBuilding:
RenderSprites:
WithSpriteBody:
AutoSelectionSize:
WithBuildingExplosion:
RepairableBuilding:
EmitInfantryOnSell:
@@ -311,7 +313,7 @@
-GivesBuildableArea:
-WithCrumbleOverlay:
-WithMakeAnimation:
-RenderBuilding:
-WithSpriteBody:
RenderSprites:
WithWallSpriteBody:
AutoSelectionSize:

View File

@@ -67,7 +67,7 @@ conyard:
ProductionBar:
Power:
Amount: 20
RenderBuilding:
RenderSprites:
Image: conyard.harkonnen
FactionImages:
atreides: conyard.atreides
@@ -99,7 +99,7 @@ power:
Type: Wood
RevealsShroud:
Range: 4c0
RenderBuilding:
RenderSprites:
Image: power.harkonnen
FactionImages:
atreides: power.atreides
@@ -160,7 +160,7 @@ barracks:
Factions: atreides, ordos
Power:
Amount: -20
RenderBuilding:
RenderSprites:
Image: barracks.harkonnen
FactionImages:
atreides: barracks.atreides
@@ -205,7 +205,7 @@ refinery:
DeliveryOffset: 2,2
DeliveringActor: carryall.reinforce
Facing: 160
RenderBuilding:
RenderSprites:
Image: refinery.harkonnen
FactionImages:
atreides: refinery.atreides
@@ -241,7 +241,6 @@ silo:
Type: Wood
RevealsShroud:
Range: 4c0
-RenderBuilding:
RenderSprites:
Image: silo.harkonnen
FactionImages:
@@ -258,7 +257,6 @@ silo:
Amount: -5
MustBeDestroyed:
RequiredForShortGame: false
-WithMakeAnimation:
light:
Inherits: ^Building
@@ -283,7 +281,7 @@ light:
Type: Wood
RevealsShroud:
Range: 4c0
RenderBuilding:
RenderSprites:
Image: light.harkonnen
FactionImages:
atreides: light.atreides
@@ -361,7 +359,7 @@ heavy:
ProvidesPrerequisite@missiletank:
Prerequisite: heavy.missiletank
Factions: atreides, harkonnen
RenderBuilding:
RenderSprites:
Image: heavy.harkonnen
FactionImages:
atreides: heavy.atreides
@@ -407,7 +405,7 @@ radar:
DetectCloaked:
Range: 6
RenderDetectionCircle:
RenderBuilding:
RenderSprites:
Image: radar.harkonnen
FactionImages:
atreides: radar.atreides
@@ -452,7 +450,7 @@ starport:
ProductionAirdrop:
Produces: Starport
ActorType: frigate
RenderBuilding:
RenderSprites:
Image: starport.harkonnen
FactionImages:
atreides: starport.atreides
@@ -642,7 +640,7 @@ repair:
FinishRepairingNotification: UnitRepaired
RallyPoint:
Offset: 1,3
RenderBuilding:
RenderSprites:
Image: repair.harkonnen
FactionImages:
atreides: repair.atreides
@@ -681,7 +679,7 @@ hightech:
Type: Wood
RevealsShroud:
Range: 4c0
RenderBuilding:
RenderSprites:
Image: hightech.harkonnen
FactionImages:
atreides: hightech.atreides
@@ -742,7 +740,7 @@ research:
Type: Wood
RevealsShroud:
Range: 4c0
RenderBuilding:
RenderSprites:
Image: research.harkonnen
FactionImages:
atreides: research.atreides
@@ -779,7 +777,7 @@ palace:
Type: Wood
RevealsShroud:
Range: 8c0
RenderBuilding:
RenderSprites:
Image: palace.harkonnen
FactionImages:
atreides: palace.atreides
@@ -823,7 +821,7 @@ conyard.atreides:
BuildPaletteOrder: 1000
Prerequisites: ~disabled
ForceFaction: atreides
RenderBuilding:
RenderSprites:
Image: conyard.atreides
-FactionImages:
@@ -834,7 +832,7 @@ conyard.harkonnen:
BuildPaletteOrder: 1000
Prerequisites: ~disabled
ForceFaction: harkonnen
RenderBuilding:
RenderSprites:
Image: conyard.harkonnen
-FactionImages:
@@ -845,7 +843,7 @@ conyard.ordos:
BuildPaletteOrder: 1000
Prerequisites: ~disabled
ForceFaction: ordos
RenderBuilding:
RenderSprites:
Image: conyard.ordos
-FactionImages:

View File

@@ -1737,9 +1737,7 @@ Rules:
LocalOffset: 432,150,-30, 432,-150,-30
AttackTurreted:
AutoTarget:
-RenderBuilding:
-Selectable:
-WithMakeAnimation:
E1.Autotarget:
Inherits: E1
Buildable:

View File

@@ -877,6 +877,7 @@ Rules:
EndChargeSound: ironrdy1.aud
Range: 1
Upgrades: invulnerability
GrantUpgradeSequence: idle
Power:
Amount: 0
MINVV:
@@ -893,9 +894,10 @@ Rules:
Cost: 30
Health:
HP: 200
RenderBuilding:
RenderSprites:
Image: miner
HasMakeAnimation: false
WithSpriteBody:
AutoSelectionSize:
Tooltip:
Name: Bomb
Description: Bomb (Hotkey B)
@@ -943,6 +945,7 @@ Rules:
EndChargeSound: ironrdy1.aud
Range: 1
Upgrades: invulnerability
GrantUpgradeSequence: idle
Sequences:
miner:

View File

@@ -891,13 +891,13 @@ Rules:
Inherits: OILB
Health:
HP: 6000
RenderBuilding:
RenderSprites:
Image: OILB
OILB.Weak:
Inherits: OILB
Health:
HP: 900
RenderBuilding:
RenderSprites:
Image: OILB
Sequences:

View File

@@ -2238,7 +2238,7 @@ Rules:
Inherits: DOME
Buildable:
Prerequisites: ~disabled
RenderBuilding:
RenderSprites:
Image: DOME
-InfiltrateForExploration:
TargetableBuilding:

View File

@@ -721,7 +721,7 @@ Rules:
Prerequisites: ~disabled
DOME.IGNORE:
Inherits: DOME
RenderBuilding:
RenderSprites:
Image: DOME
AutoTargetIgnore:
Buildable:

View File

@@ -1273,7 +1273,7 @@ Rules:
-ParatroopersPower@paratroopers:
-AirstrikePower@parabombs:
-SupportPowerChargeBar:
RenderBuilding:
RenderSprites:
Image: AFLD
ATEK.mission:
Inherits: ATEK
@@ -1285,7 +1285,7 @@ Rules:
-TargetableBuilding:
-GivesBuildableArea:
-Huntable:
RenderBuilding:
RenderSprites:
Image: ATEK
GUN:
Valued:

View File

@@ -232,7 +232,6 @@ V19.Husk:
ExcludeTilesets: DESERT
Tooltip:
Name: Husk (Oil Pump)
-RenderBuilding:
AutoSelectionSize:
RenderSprites:
BodyOrientation:
@@ -628,7 +627,7 @@ SNOWHUT:
Building:
Footprint: x x
Dimensions: 1,2
RenderBuilding:
RenderSprites:
Scale: 0.7
LHUS:

View File

@@ -396,7 +396,9 @@
DamagedSounds: kaboom1.aud
DestroyedSounds: kaboom22.aud
QuantizeFacingsFromSequence:
RenderBuilding:
RenderSprites:
AutoSelectionSize:
WithSpriteBody:
WithBuildingExplosion:
CaptureNotification:
ShakeOnDeath:
@@ -521,7 +523,7 @@
^CivBuilding:
Inherits: ^TechBuilding
RenderBuilding:
RenderSprites:
Palette: terrain
EditorTilesetFilter:
ExcludeTilesets: INTERIOR
@@ -664,7 +666,7 @@
^DesertCivBuilding:
Inherits: ^CivBuilding
RenderBuilding:
RenderSprites:
Palette: terrain
EditorTilesetFilter:
RequireTilesets: DESERT

View File

@@ -15,7 +15,7 @@ FACF:
Footprint: xxx xxx xxx
Dimensions: 3,3
Bib:
RenderBuilding:
RenderSprites:
Image: FACT
Valued:
Cost: 250
@@ -37,7 +37,7 @@ WEAF:
Footprint: xxx xxx
Dimensions: 3,2
Bib:
RenderBuilding:
RenderSprites:
Image: WEAP
WithProductionDoorOverlay:
Sequence: build-top
@@ -64,7 +64,7 @@ SYRF:
Dimensions: 3,3
Adjacent: 8
TerrainTypes: Water
RenderBuilding:
RenderSprites:
Image: SYRD
Valued:
Cost: 100
@@ -91,7 +91,7 @@ SPEF:
Dimensions: 3,3
Adjacent: 8
TerrainTypes: Water
RenderBuilding:
RenderSprites:
Image: SPEN
Valued:
Cost: 100
@@ -115,7 +115,7 @@ DOMF:
Footprint: xx xx
Dimensions: 2,2
Bib:
RenderBuilding:
RenderSprites:
Image: DOME
Valued:
Cost: 180
@@ -139,7 +139,7 @@ ATEF:
Footprint: xx xx
Dimensions: 2,2
Bib:
RenderBuilding:
RenderSprites:
Image: ATEK
Valued:
Cost: 150
@@ -163,7 +163,7 @@ PDOF:
Building:
Footprint: xx xx
Dimensions: 2,2
RenderBuilding:
RenderSprites:
Image: PDOX
Bib:
HasMinibib: Yes
@@ -189,7 +189,7 @@ MSLF:
Building:
Footprint: xx
Dimensions: 2,1
RenderBuilding:
RenderSprites:
Image: MSLO
Valued:
Cost: 250

View File

@@ -414,7 +414,7 @@ waypoint:
^fact.colorpicker:
Inherits: FACT
RenderBuilding:
RenderSprites:
Image: fact
Palette: colorpicker

View File

@@ -69,8 +69,8 @@ GAP:
RequiresPower:
CanPowerDown:
DisabledOverlay:
RenderBuilding:
PauseOnLowPower: yes
WithSpriteBody:
PauseAnimationWhenDisabled: true
Health:
HP: 1000
Armor:
@@ -401,8 +401,6 @@ TSLA:
Range: 8c0
Bib:
HasMinibib: Yes
RenderSprites:
WithSpriteBody:
WithChargeAnimation:
Armament:
Weapon: TeslaZap
@@ -411,13 +409,11 @@ TSLA:
ChargeAudio: tslachg2.aud
MaxCharges: 3
ReloadTime: 120
-RenderBuilding:
Power:
Amount: -100
DetectCloaked:
Range: 8
ProvidesPrerequisite@buildingname:
-WithMakeAnimation:
AGUN:
Inherits: ^Defense
@@ -451,7 +447,7 @@ AGUN:
Turreted:
ROT: 15
InitialFacing: 224
RenderSprites:
-WithSpriteBody:
WithTurretedSpriteBody:
Armament:
Weapon: ZSU-23
@@ -459,14 +455,12 @@ AGUN:
MuzzleSequence: muzzle
AttackTurreted:
WithMuzzleFlash:
-RenderBuilding:
RenderRangeCircle:
RangeCircleType: aa
Power:
Amount: -50
DetectCloaked:
Range: 6
-WithMakeAnimation:
DOME:
Inherits: ^Building
@@ -612,7 +606,7 @@ GUN:
Turreted:
ROT: 12
InitialFacing: 50
RenderSprites:
-WithSpriteBody:
WithTurretedSpriteBody:
Armament:
Weapon: TurretGun
@@ -620,12 +614,10 @@ GUN:
MuzzleSequence: muzzle
AttackTurreted:
WithMuzzleFlash:
-RenderBuilding:
Power:
Amount: -40
DetectCloaked:
Range: 7
-WithMakeAnimation:
FTUR:
Inherits: ^Defense
@@ -690,21 +682,19 @@ SAM:
Turreted:
ROT: 30
InitialFacing: 0
RenderSprites:
-WithSpriteBody:
WithTurretedSpriteBody:
Armament:
Weapon: Nike
MuzzleSequence: muzzle
AttackTurreted:
WithMuzzleFlash:
-RenderBuilding:
RenderRangeCircle:
RangeCircleType: aa
Power:
Amount: -40
DetectCloaked:
Range: 5
-WithMakeAnimation:
ATEK:
Inherits: ^Building
@@ -988,17 +978,13 @@ SILO:
Range: 4c0
Bib:
HasMinibib: Yes
RenderSprites:
WithSpriteBody:
WithSiloAnimation:
StoresResources:
PipCount: 5
Capacity: 1500
-RenderBuilding:
-EmitInfantryOnSell:
Power:
Amount: -10
-WithMakeAnimation:
HPAD:
Inherits: ^Building

View File

@@ -261,7 +261,7 @@ AMMOCRAT:
Type: none
Health:
HP: 1
RenderBuilding:
RenderSprites:
Palette: player
BBOARD01:
@@ -625,7 +625,7 @@ CAARAY:
Type: concrete
Health:
HP: 400
RenderBuilding:
RenderSprites:
Palette: player
CAARMR:
@@ -639,7 +639,7 @@ CAARMR:
Type: concrete
Health:
HP: 800
RenderBuilding:
RenderSprites:
Palette: player
ProvidesPrerequisite:
Prerequisite: barracks.upgraded
@@ -655,7 +655,7 @@ CABHUT:
Dimensions: 1, 1
Health:
HP: 2000
RenderBuilding:
RenderSprites:
Palette: player
CACRSH01:
@@ -729,7 +729,7 @@ CAHOSP:
Type: concrete
Health:
HP: 800
RenderBuilding:
RenderSprites:
Palette: player
CAPYR01:
@@ -1126,7 +1126,7 @@ GAKODK:
Type: heavy
Health:
HP: 1500
RenderBuilding:
RenderSprites:
Palette: player
GAOLDCC1:
@@ -1140,7 +1140,7 @@ GAOLDCC1:
Type: heavy
Health:
HP: 400
RenderBuilding:
RenderSprites:
Palette: player
GAOLDCC2:
@@ -1154,7 +1154,7 @@ GAOLDCC2:
Type: heavy
Health:
HP: 400
RenderBuilding:
RenderSprites:
Palette: player
GAOLDCC3:
@@ -1168,7 +1168,7 @@ GAOLDCC3:
Type: heavy
Health:
HP: 400
RenderBuilding:
RenderSprites:
Palette: player
GAOLDCC4:
@@ -1182,7 +1182,7 @@ GAOLDCC4:
Type: heavy
Health:
HP: 400
RenderBuilding:
RenderSprites:
Palette: player
GAOLDCC5:
@@ -1196,7 +1196,7 @@ GAOLDCC5:
Type: heavy
Health:
HP: 400
RenderBuilding:
RenderSprites:
Palette: player
GAOLDCC6:
@@ -1210,7 +1210,7 @@ GAOLDCC6:
Type: heavy
Health:
HP: 400
RenderBuilding:
RenderSprites:
Palette: player
GASAND:
@@ -1273,7 +1273,7 @@ GALITE:
Cost: 200
Tooltip:
Name: Light Post
RenderBuilding:
RenderSprites:
Palette: terraindecoration
-WithMakeAnimation:
-WithDeathAnimation:
@@ -1330,7 +1330,7 @@ NAMNTK:
Type: heavy
Health:
HP: 1500
RenderBuilding:
RenderSprites:
Palette: player
NTPYRA:
@@ -1346,7 +1346,7 @@ NTPYRA:
Type: heavy
Health:
HP: 1500
RenderBuilding:
RenderSprites:
Palette: player
UFO:
@@ -1354,7 +1354,7 @@ UFO:
Building:
Dimensions: 6, 4
Footprint: xxxxxx xxxxxx xxxxxx xxxxxx
RenderBuilding:
RenderSprites:
Palette: terraindecoration
Selectable:
Bounds: 144, 72, 0, 0

View File

@@ -63,7 +63,9 @@
DamagedSounds: expnew01.aud
DestroyedSounds: crmble2.aud
QuantizeFacingsFromSequence:
RenderBuilding:
RenderSprites:
WithSpriteBody:
AutoSelectionSize:
WithBuildingExplosion:
Sequences: building, large_bang, large_brnl, verylarge_clsn, large_tumu
EngineerRepairable:
@@ -115,7 +117,7 @@
Range: 4c0
Tooltip:
Description: Civilian Building
RenderBuilding:
RenderSprites:
Palette: terraindecoration
^CivBillboard:
@@ -530,8 +532,10 @@
^BlossomTree:
Tooltip:
Name: Blossom Tree
RenderBuilding:
RenderSprites:
Palette: player
WithSpriteBody:
AutoSelectionSize:
Building:
Footprint: x
Dimensions: 1,1
@@ -636,7 +640,9 @@
Dimensions: 1,1
Footprint: x
TerrainTypes: Clear, Road, DirtRoad, Rough
RenderBuilding:
RenderSprites:
WithSpriteBody:
AutoSelectionSize:
WithMakeAnimation:
SelectionDecorations:
Palette: pips

View File

@@ -247,7 +247,7 @@ GADEPT:
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 98, 68, -6, -6
RenderBuilding:
RenderSprites:
Image: gadept.gdi
FactionImages:
gdi: gadept.gdi
@@ -348,7 +348,6 @@ GAPLUG:
CanPowerDown:
IndicatorPalette: mouse
DisabledOverlay:
RenderBuilding:
WithIdleOverlay@DISH:
Sequence: idle-dish
WithIdleOverlay@LIGHTS:

View File

@@ -25,6 +25,9 @@ GAWALL:
GACTWR:
Inherits: ^Defense
-WithSpriteBody:
WithWallSpriteBody:
Type: wall
Valued:
Cost: 600
Tooltip:
@@ -102,10 +105,6 @@ GACTWR:
Sequence: idle-lights
LineBuildNode:
Types: turret
-RenderBuilding:
RenderSprites:
WithWallSpriteBody:
Type: wall
Power@base:
Amount: -10
Power@turrets:
@@ -124,7 +123,6 @@ GACTWR:
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 48, 48, 0, -12
-WithMakeAnimation:
GAVULC:
Inherits: ^BuildingPlug

View File

@@ -206,7 +206,6 @@ GAARTY:
MuzzleSequence: muzzle
BodyOrientation:
QuantizedFacings: 32
RenderBuilding:
RenderVoxels:
LightAmbientColor: 0.4, 0.4, 0.4
WithVoxelBarrel:

View File

@@ -97,7 +97,7 @@ PROC:
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 134, 122, 0, -18
RenderBuilding:
RenderSprites:
Image: proc.gdi
FactionImages:
gdi: proc.gdi
@@ -126,7 +126,6 @@ GASILO:
Type: Wood
RevealsShroud:
Range: 4c0
-RenderBuilding:
RenderSprites:
Image: gasilo.gdi
FactionImages:
@@ -145,7 +144,6 @@ GASILO:
Amount: -10
SelectionDecorations:
VisualBounds: 80, 48, -5, 0
-WithMakeAnimation:
ANYPOWER:
AlwaysVisible:

View File

@@ -60,7 +60,7 @@ NAPULS:
Amount: -150
SelectionDecorations:
VisualBounds: 78, 54, 0, -12
RenderBuilding:
RenderSprites:
Image: napuls.gdi
FactionImages:
gdi: napuls.gdi

View File

@@ -11,7 +11,7 @@ BIGBLUE:
Inherits: ^BlossomTree
Tooltip:
Name: Large Blue Tiberium Crystal
RenderBuilding:
RenderSprites:
Palette: bluetiberium
RadarColorFromTerrain:
Terrain: BlueTiberium