Remove legacy bounds code.

This commit is contained in:
Paul Chote
2017-12-09 00:01:00 +00:00
committed by reaperrr
parent bf57eceeec
commit c87409ed1a
83 changed files with 418 additions and 563 deletions

View File

@@ -48,9 +48,6 @@ namespace OpenRA
public int Generation;
public Rectangle RenderBounds { get; private set; }
public Rectangle SelectableBounds { get; private set; }
public Rectangle SelectionOverlayBounds { get; private set; }
public IEffectiveOwner EffectiveOwner { get; private set; }
public IOccupySpace OccupiesSpace { get; private set; }
public ITargetable[] Targetables { get; private set; }
@@ -113,14 +110,6 @@ namespace OpenRA
// PERF: Cache all these traits as soon as the actor is created. This is a fairly cheap one-off cost per
// actor that allows us to provide some fast implementations of commonly used methods that are relied on by
// performance-sensitive parts of the core game engine, such as pathfinding, visibility and rendering.
// RenderBounds are used for ScreenMap binning
// SelectableBounds define the selectable area of the actor
// SelectionOverlayBounds are used to draw the selection box and determine offsets for other selection overlays
RenderBounds = DetermineRenderBounds();
SelectableBounds = DetermineSelectableBounds();
SelectionOverlayBounds = DetermineSelectionOverlayBounds();
EffectiveOwner = TraitOrDefault<IEffectiveOwner>();
facing = TraitOrDefault<IFacing>();
health = TraitOrDefault<IHealth>();
@@ -135,44 +124,6 @@ namespace OpenRA
SyncHashes = TraitsImplementing<ISync>().Select(sync => new SyncHash(sync)).ToArray();
}
Rectangle DetermineRenderBounds()
{
var size = TraitsImplementing<IAutoRenderSize>().Select(x => x.RenderSize(this)).FirstOrDefault(Exts.IsTraitEnabled);
var offset = -size / 2;
return new Rectangle(offset.X, offset.Y, size.X, size.Y);
}
Rectangle DetermineSelectableBounds()
{
var si = Info.TraitInfoOrDefault<SelectableInfo>();
if (si == null || si.Bounds == null)
return RenderBounds;
var size = new int2(si.Bounds[0], si.Bounds[1]);
var offset = -size / 2;
if (si.Bounds.Length > 2)
offset += new int2(si.Bounds[2], si.Bounds[3]);
return new Rectangle(offset.X, offset.Y, size.X, size.Y);
}
Rectangle DetermineSelectionOverlayBounds()
{
var sd = Info.TraitInfoOrDefault<ISelectionDecorationsInfo>();
if (sd == null || sd.SelectionBoxBounds == null)
return SelectableBounds;
var size = new int2(sd.SelectionBoxBounds[0], sd.SelectionBoxBounds[1]);
var offset = -size / 2;
if (sd.SelectionBoxBounds.Length > 2)
offset += new int2(sd.SelectionBoxBounds[2], sd.SelectionBoxBounds[3]);
return new Rectangle(offset.X, offset.Y, size.X, size.Y);
}
public void Tick()
{
var wasIdle = IsIdle;

View File

@@ -263,6 +263,7 @@
<Compile Include="UtilityCommands\ClearInvalidModRegistrationsCommand.cs" />
<Compile Include="HotkeyManager.cs" />
<Compile Include="HotkeyDefinition.cs" />
<Compile Include="Traits\Interactable.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="FileSystem\Folder.cs" />

View File

@@ -0,0 +1,80 @@
#region Copyright & License Information
/*
* Copyright 2007-2017 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, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System.Drawing;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Traits
{
[Desc("Used to enable mouse interaction on actors that are not Selectable.")]
public class InteractableInfo : ITraitInfo, IMouseBoundsInfo, IDecorationBoundsInfo
{
[Desc("Defines a custom rectangle for mouse interaction with the actor.",
"If null, the engine will guess an appropriate size based on the With*Body trait.",
"The first two numbers define the width and height of the rectangle.",
"The (optional) second two numbers define an x and y offset from the actor center.")]
public readonly int[] Bounds = null;
[Desc("Defines a custom rectangle for Decorations (e.g. the selection box).",
"If null, Bounds will be used instead")]
public readonly int[] DecorationBounds = null;
public virtual object Create(ActorInitializer init) { return new Interactable(this); }
}
public class Interactable : INotifyCreated, IMouseBounds, IDecorationBounds
{
readonly InteractableInfo info;
IAutoMouseBounds[] autoBounds;
public Interactable(InteractableInfo info)
{
this.info = info;
}
void INotifyCreated.Created(Actor self)
{
autoBounds = self.TraitsImplementing<IAutoMouseBounds>().ToArray();
}
Rectangle AutoBounds(Actor self, WorldRenderer wr)
{
return autoBounds.Select(s => s.AutoMouseoverBounds(self, wr)).FirstOrDefault(r => !r.IsEmpty);
}
Rectangle Bounds(Actor self, WorldRenderer wr, int[] bounds)
{
if (bounds == null)
return AutoBounds(self, wr);
var size = new int2(bounds[0], bounds[1]);
var offset = -size / 2;
if (bounds.Length > 2)
offset += new int2(bounds[2], bounds[3]);
var xy = wr.ScreenPxPosition(self.CenterPosition) + offset;
return new Rectangle(xy.X, xy.Y, size.X, size.Y);
}
Rectangle IMouseBounds.MouseoverBounds(Actor self, WorldRenderer wr)
{
return Bounds(self, wr, info.Bounds);
}
Rectangle IDecorationBounds.DecorationBounds(Actor self, WorldRenderer wr)
{
return Bounds(self, wr, info.DecorationBounds ?? info.Bounds);
}
}
}

View File

@@ -31,7 +31,6 @@ namespace OpenRA.Traits
{
public readonly PPos[] Footprint;
public readonly WPos CenterPosition;
public readonly Rectangle SelectableBounds;
public readonly HashSet<string> TargetTypes;
readonly Actor actor;
readonly Shroud shroud;
@@ -83,7 +82,6 @@ namespace OpenRA.Traits
footprint.Select(p => shroud.Contains(p).ToString()).JoinWith("|")));
CenterPosition = self.CenterPosition;
SelectableBounds = self.SelectableBounds;
TargetTypes = self.GetEnabledTargetTypes().ToHashSet();
tooltips = self.TraitsImplementing<ITooltip>().ToArray();

View File

@@ -16,65 +16,29 @@ using OpenRA.Graphics;
namespace OpenRA.Traits
{
[Desc("This actor is selectable. Defines bounds of selectable area, selection class and selection priority.")]
public class SelectableInfo : ITraitInfo, IDecorationBoundsInfo
public class SelectableInfo : InteractableInfo
{
public readonly int Priority = 10;
[Desc("Bounds for the selectable area.")]
public readonly int[] Bounds = null;
[Desc("Area outside the visible selection box that is enabled for selection")]
public readonly int Margin = 0;
[Desc("All units having the same selection class specified will be selected with select-by-type commands (e.g. double-click). "
+ "Defaults to the actor name when not defined or inherited.")]
public readonly string Class = null;
[VoiceReference] public readonly string Voice = "Select";
public object Create(ActorInitializer init) { return new Selectable(init.Self, this); }
public override object Create(ActorInitializer init) { return new Selectable(init.Self, this); }
}
public class Selectable : IMouseBounds, IDecorationBounds
public class Selectable : Interactable
{
public readonly string Class = null;
public SelectableInfo Info;
public readonly SelectableInfo Info;
public Selectable(Actor self, SelectableInfo info)
: base(info)
{
Class = string.IsNullOrEmpty(info.Class) ? self.Info.Name : info.Class;
Info = info;
}
Rectangle IMouseBounds.MouseoverBounds(Actor self, WorldRenderer wr)
{
if (Info.Bounds == null)
return Rectangle.Empty;
var size = new int2(Info.Bounds[0], Info.Bounds[1]);
var offset = -size / 2 - new int2(Info.Margin, Info.Margin);
if (Info.Bounds.Length > 2)
offset += new int2(Info.Bounds[2], Info.Bounds[3]);
var xy = wr.ScreenPxPosition(self.CenterPosition) + offset;
return new Rectangle(xy.X, xy.Y, size.X + 2 * Info.Margin, size.Y + 2 * Info.Margin);
}
Rectangle IDecorationBounds.DecorationBounds(Actor self, WorldRenderer wr)
{
if (Info.Bounds == null)
return Rectangle.Empty;
var size = new int2(Info.Bounds[0], Info.Bounds[1]);
var offset = -size / 2;
if (Info.Bounds.Length > 2)
offset += new int2(Info.Bounds[2], Info.Bounds[3]);
var xy = wr.ScreenPxPosition(self.CenterPosition) + offset;
return new Rectangle(xy.X, xy.Y, size.X, size.Y);
}
}
}

View File

@@ -102,20 +102,15 @@ namespace OpenRA.Traits
IEnumerable<Rectangle> ScreenBounds(Actor self, WorldRenderer wr);
}
public interface IAutoSelectionSizeInfo : ITraitInfoInterface { }
public interface IAutoSelectionSize { int2 SelectionSize(Actor self); }
// TODO: Replace Rectangle with an int2[] polygon
public interface IMouseBounds { Rectangle MouseoverBounds(Actor self, WorldRenderer wr); }
public interface IMouseBoundsInfo : ITraitInfoInterface { }
public interface IAutoMouseBounds { Rectangle AutoMouseoverBounds(Actor self, WorldRenderer wr); }
// HACK: This provides a shim for legacy code until it can be rewritten
public interface IDecorationBounds { Rectangle DecorationBounds(Actor self, WorldRenderer wr); }
public interface IDecorationBoundsInfo : ITraitInfoInterface { }
public interface IAutoRenderSizeInfo : ITraitInfoInterface { }
public interface IAutoRenderSize { int2 RenderSize(Actor self); }
public interface IIssueOrder
{
IEnumerable<IOrderTargeter> Orders { get; }
@@ -159,11 +154,6 @@ namespace OpenRA.Traits
public interface INotifyOwnerChanged { void OnOwnerChanged(Actor self, Player oldOwner, Player newOwner); }
public interface INotifyEffectiveOwnerChanged { void OnEffectiveOwnerChanged(Actor self, Player oldEffectiveOwner, Player newEffectiveOwner); }
public interface ISelectionDecorationsInfo : ITraitInfoInterface
{
int[] SelectionBoxBounds { get; }
}
public interface IVoiced
{
string VoiceSet { get; }

View File

@@ -22,7 +22,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits.Render
{
// TODO: This trait is hacky and should go away as soon as we support granting a condition on docking, in favor of toggling two regular WithVoxelBodies
public class WithVoxelUnloadBodyInfo : ITraitInfo, IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo>, IAutoSelectionSizeInfo, IAutoRenderSizeInfo
public class WithVoxelUnloadBodyInfo : ITraitInfo, IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo>
{
[Desc("Voxel sequence name to use when docked to a refinery.")]
public readonly string UnloadSequence = "unload";
@@ -46,11 +46,10 @@ namespace OpenRA.Mods.Cnc.Traits.Render
}
}
public class WithVoxelUnloadBody : IAutoSelectionSize, IAutoRenderSize, IAutoMouseBounds
public class WithVoxelUnloadBody : IAutoMouseBounds
{
public bool Docked;
readonly int2 size;
readonly ModelAnimation modelAnimation;
readonly RenderVoxels rv;
@@ -67,11 +66,6 @@ namespace OpenRA.Mods.Cnc.Traits.Render
rv.Add(modelAnimation);
// Selection size
var rvi = self.Info.TraitInfo<RenderVoxelsInfo>();
var s = (int)(rvi.Scale * idleModel.Size.Aggregate(Math.Max));
size = new int2(s, s);
var unloadModel = self.World.ModelCache.GetModelSequence(rv.Image, info.UnloadSequence);
rv.Add(new ModelAnimation(unloadModel, () => WVec.Zero,
() => new[] { body.QuantizeOrientation(self, self.Orientation) },
@@ -79,9 +73,6 @@ namespace OpenRA.Mods.Cnc.Traits.Render
() => 0, info.ShowShadow));
}
int2 IAutoSelectionSize.SelectionSize(Actor self) { return size; }
int2 IAutoRenderSize.RenderSize(Actor self) { return size; }
Rectangle IAutoMouseBounds.AutoMouseoverBounds(Actor self, WorldRenderer wr)
{
return modelAnimation.ScreenBounds(self.CenterPosition, wr, rv.Info.Scale);

View File

@@ -23,8 +23,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits.Render
{
public class WithVoxelWalkerBodyInfo : ITraitInfo, IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo>, Requires<IMoveInfo>, Requires<IFacingInfo>,
IAutoSelectionSizeInfo, IAutoRenderSizeInfo
public class WithVoxelWalkerBodyInfo : ITraitInfo, IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo>, Requires<IMoveInfo>, Requires<IFacingInfo>
{
public readonly string Sequence = "idle";
@@ -48,12 +47,11 @@ namespace OpenRA.Mods.Cnc.Traits.Render
}
}
public class WithVoxelWalkerBody : IAutoSelectionSize, ITick, IActorPreviewInitModifier, IAutoRenderSize, IAutoMouseBounds
public class WithVoxelWalkerBody : ITick, IActorPreviewInitModifier, IAutoMouseBounds
{
readonly WithVoxelWalkerBodyInfo info;
readonly IMove movement;
readonly IFacing facing;
readonly int2 size;
readonly ModelAnimation modelAnimation;
readonly RenderVoxels rv;
@@ -76,16 +74,8 @@ namespace OpenRA.Mods.Cnc.Traits.Render
() => false, () => frame, info.ShowShadow);
rv.Add(modelAnimation);
// Selection size
var rvi = self.Info.TraitInfo<RenderVoxelsInfo>();
var s = (int)(rvi.Scale * model.Size.Aggregate(Math.Max));
size = new int2(s, s);
}
int2 IAutoSelectionSize.SelectionSize(Actor self) { return size; }
int2 IAutoRenderSize.RenderSize(Actor self) { return size; }
void ITick.Tick(Actor self)
{
if (movement.IsMoving || facing.Facing != oldFacing)

View File

@@ -327,8 +327,6 @@
<Compile Include="Traits\Crates\SupportPowerCrateAction.cs" />
<Compile Include="Traits\Crushable.cs" />
<Compile Include="Traits\CustomSellValue.cs" />
<Compile Include="Traits\CustomSelectionSize.cs" />
<Compile Include="Traits\Render\CustomRenderSize.cs" />
<Compile Include="Traits\DamagedByTerrain.cs" />
<Compile Include="Traits\DeliversCash.cs" />
<Compile Include="Traits\DeliversExperience.cs" />
@@ -417,8 +415,6 @@
<Compile Include="Traits\ProximityCapturable.cs" />
<Compile Include="Traits\BodyOrientation.cs" />
<Compile Include="Traits\QuantizeFacingsFromSequence.cs" />
<Compile Include="Traits\Render\AutoSelectionSize.cs" />
<Compile Include="Traits\Render\AutoRenderSize.cs" />
<Compile Include="Traits\Render\CashTricklerBar.cs" />
<Compile Include="Traits\Render\CustomTerrainDebugOverlay.cs" />
<Compile Include="Traits\Render\Hovers.cs" />

View File

@@ -1,35 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2017 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, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Special case trait for actors that need to define targetable area and screen map bounds manually.")]
public class CustomSelectionSizeInfo : ITraitInfo, IAutoSelectionSizeInfo
{
[FieldLoader.Require]
public readonly int[] CustomBounds = null;
public object Create(ActorInitializer init) { return new CustomSelectionSize(this); }
}
public class CustomSelectionSize : IAutoSelectionSize
{
readonly CustomSelectionSizeInfo info;
public CustomSelectionSize(CustomSelectionSizeInfo info) { this.info = info; }
public int2 SelectionSize(Actor self)
{
return new int2(info.CustomBounds[0], info.CustomBounds[1]);
}
}
}

View File

@@ -19,17 +19,11 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("This actor will remain visible (but not updated visually) under fog, once discovered.")]
public class FrozenUnderFogInfo : ITraitInfo, Requires<BuildingInfo>, IDefaultVisibilityInfo, IRulesetLoaded
public class FrozenUnderFogInfo : ITraitInfo, Requires<BuildingInfo>, IDefaultVisibilityInfo
{
[Desc("Players with these stances can always see the actor.")]
public readonly Stance AlwaysVisibleStances = Stance.Ally;
void IRulesetLoaded<ActorInfo>.RulesetLoaded(Ruleset rules, ActorInfo info)
{
if (!info.HasTraitInfo<SelectableInfo>() && !info.HasTraitInfo<IAutoSelectionSizeInfo>())
throw new YamlException("Cannot create a frozen actor for actor type '{0}' with empty bounds (no selection size given).".F(info.Name));
}
public object Create(ActorInitializer init) { return new FrozenUnderFog(init, this); }
}

View File

@@ -1,57 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2017 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, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
[Desc("Automatically calculates the screen map boundaries from the sprite size.")]
public class AutoRenderSizeInfo : ITraitInfo, Requires<RenderSpritesInfo>, IAutoRenderSizeInfo, IDecorationBoundsInfo
{
public object Create(ActorInitializer init) { return new AutoRenderSize(init.Self); }
}
public class AutoRenderSize : IAutoRenderSize, IMouseBounds, IDecorationBounds
{
readonly RenderSprites rs;
public AutoRenderSize(Actor self)
{
rs = self.Trait<RenderSprites>();
}
public int2 RenderSize(Actor self)
{
return rs.AutoRenderSize(self);
}
Rectangle Bounds(Actor self, WorldRenderer wr)
{
return self.TraitsImplementing<IAutoMouseBounds>()
.Select(s => s.AutoMouseoverBounds(self, wr))
.FirstOrDefault(r => !r.IsEmpty);
}
Rectangle IMouseBounds.MouseoverBounds(Actor self, WorldRenderer wr)
{
return Bounds(self, wr);
}
Rectangle IDecorationBounds.DecorationBounds(Actor self, WorldRenderer wr)
{
return Bounds(self, wr);
}
}
}

View File

@@ -1,32 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2017 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, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
[Desc("Automatically calculates the targetable area and screen map boundaries from the sprite size.")]
public class AutoSelectionSizeInfo : ITraitInfo, Requires<RenderSpritesInfo>, IAutoSelectionSizeInfo
{
public object Create(ActorInitializer init) { return new AutoSelectionSize(this); }
}
public class AutoSelectionSize : IAutoSelectionSize
{
public AutoSelectionSize(AutoSelectionSizeInfo info) { }
public int2 SelectionSize(Actor self)
{
var rs = self.Trait<RenderSprites>();
return rs.AutoSelectionSize(self);
}
}
}

View File

@@ -1,72 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2017 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, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System.Drawing;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Special case trait for actors that need to define targetable area and screen map bounds manually.")]
public class CustomRenderSizeInfo : ITraitInfo, IAutoRenderSizeInfo, IDecorationBoundsInfo
{
[FieldLoader.Require]
public readonly int[] CustomBounds = null;
[Desc("Defines a custom rectangle for Decorations.",
"If null, CustomBounds will be used instead")]
public readonly int[] DecorationBounds = null;
public object Create(ActorInitializer init) { return new CustomRenderSize(this); }
}
public class CustomRenderSize : IAutoRenderSize, IMouseBounds, IDecorationBounds
{
readonly CustomRenderSizeInfo info;
public CustomRenderSize(CustomRenderSizeInfo info) { this.info = info; }
public int2 RenderSize(Actor self)
{
return new int2(info.CustomBounds[0], info.CustomBounds[1]);
}
Rectangle IMouseBounds.MouseoverBounds(Actor self, WorldRenderer wr)
{
if (info.CustomBounds == null)
return Rectangle.Empty;
var size = new int2(info.CustomBounds[0], info.CustomBounds[1]);
var offset = -size / 2;
if (info.CustomBounds.Length > 2)
offset += new int2(info.CustomBounds[2], info.CustomBounds[3]);
var xy = wr.ScreenPxPosition(self.CenterPosition);
return new Rectangle(xy.X, xy.Y, size.X, size.Y);
}
Rectangle IDecorationBounds.DecorationBounds(Actor self, WorldRenderer wr)
{
var bounds = info.DecorationBounds ?? info.CustomBounds;
if (bounds == null)
return Rectangle.Empty;
var size = new int2(bounds[0], bounds[1]);
var offset = -size / 2;
if (bounds.Length > 2)
offset += new int2(bounds[2], bounds[3]);
var xy = wr.ScreenPxPosition(self.CenterPosition);
return new Rectangle(xy.X, xy.Y, size.X, size.Y);
}
}
}

View File

@@ -18,15 +18,10 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
public class SelectionDecorationsInfo : ITraitInfo, ISelectionDecorationsInfo, Requires<IDecorationBoundsInfo>
public class SelectionDecorationsInfo : ITraitInfo, Requires<IDecorationBoundsInfo>
{
[PaletteReference] public readonly string Palette = "chrome";
[Desc("Bounds for visual selection box. If null, it uses AutoSelectionSize.",
"The first two values define the bounds' size, the optional third and fourth",
"values specify the position relative to the actors' center. Defaults to selectable bounds.")]
public readonly int[] VisualBounds = null;
[Desc("Health bar, production progress bar etc.")]
public readonly bool RenderSelectionBars = true;
@@ -37,8 +32,6 @@ namespace OpenRA.Mods.Common.Traits.Render
public readonly string Image = "pips";
public object Create(ActorInitializer init) { return new SelectionDecorations(init.Self, this); }
public int[] SelectionBoxBounds { get { return VisualBounds; } }
}
public class SelectionDecorations : IRenderAboveShroud, INotifyCreated, ITick

View File

@@ -20,7 +20,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render
{
[Desc("Also returns a default selection size that is calculated automatically from the voxel dimensions.")]
public class WithVoxelBodyInfo : ConditionalTraitInfo, IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo>, IAutoSelectionSizeInfo, IAutoRenderSizeInfo
public class WithVoxelBodyInfo : ConditionalTraitInfo, IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo>
{
public readonly string Sequence = "idle";
@@ -40,9 +40,8 @@ namespace OpenRA.Mods.Common.Traits.Render
}
}
public class WithVoxelBody : ConditionalTrait<WithVoxelBodyInfo>, IAutoSelectionSize, IAutoRenderSize, IAutoMouseBounds
public class WithVoxelBody : ConditionalTrait<WithVoxelBodyInfo>, IAutoMouseBounds
{
readonly int2 size;
readonly ModelAnimation modelAnimation;
readonly RenderVoxels rv;
@@ -58,15 +57,8 @@ namespace OpenRA.Mods.Common.Traits.Render
() => IsTraitDisabled, () => 0, info.ShowShadow);
rv.Add(modelAnimation);
// Selection size
var rvi = self.Info.TraitInfo<RenderVoxelsInfo>();
var s = (int)(rvi.Scale * model.Size.Aggregate(Math.Max));
size = new int2(s, s);
}
public int2 SelectionSize(Actor self) { return size; }
public int2 RenderSize(Actor self) { return size; }
Rectangle IAutoMouseBounds.AutoMouseoverBounds(Actor self, WorldRenderer wr)
{
return modelAnimation.ScreenBounds(self.CenterPosition, wr, rv.Info.Scale);

View File

@@ -13,7 +13,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
public abstract class TooltipInfoBase : ConditionalTraitInfo
public abstract class TooltipInfoBase : ConditionalTraitInfo, Requires<IMouseBoundsInfo>
{
[Translate] public readonly string Name = "";
}

View File

@@ -1253,6 +1253,48 @@ namespace OpenRA.Mods.Common.UtilityCommands
}
}
if (engineVersion < 20171208)
{
// Move SelectionDecorations.VisualBounds to Selectable.Bounds
if (node.Key.StartsWith("AutoRenderSize", StringComparison.Ordinal))
RenameNodeKey(node, "Interactable");
if (node.Key.StartsWith("CustomRenderSize", StringComparison.Ordinal))
{
RenameNodeKey(node, "Interactable");
var boundsNode = node.Value.Nodes.FirstOrDefault(n => n.Key == "CustomBounds");
if (boundsNode != null)
RenameNodeKey(boundsNode, "Bounds");
}
if (node.Key.StartsWith("SelectionDecorations", StringComparison.Ordinal))
{
var boundsNode = node.Value.Nodes.FirstOrDefault(n => n.Key == "VisualBounds");
if (boundsNode != null)
{
RenameNodeKey(boundsNode, "DecorationBounds");
node.Value.Nodes.Remove(boundsNode);
var selectable = parent.Value.Nodes.FirstOrDefault(n => n.Key.StartsWith("Selectable", StringComparison.Ordinal));
if (selectable == null)
{
selectable = new MiniYamlNode("Selectable", new MiniYaml(""));
addNodes.Add(selectable);
}
selectable.Value.Nodes.Add(boundsNode);
}
}
if (node.Key == "-Selectable")
addNodes.Add(new MiniYamlNode("Interactable", new MiniYaml("")));
if (depth == 0)
{
node.Value.Nodes.RemoveAll(n => n.Key.StartsWith("CustomSelectionSize", StringComparison.Ordinal));
node.Value.Nodes.RemoveAll(n => n.Key.StartsWith("AutoSelectionSize", StringComparison.Ordinal));
}
}
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
}

View File

@@ -46,3 +46,4 @@ OLDLST:
RejectsOrders:
Cargo:
Types: disabled
Interactable:

View File

@@ -46,6 +46,7 @@ OLDLST:
RejectsOrders:
Cargo:
Types: disabled
Interactable:
TREX:
Health:

View File

@@ -115,3 +115,4 @@ OLDLST:
RejectsOrders:
Cargo:
Types: disabled
Interactable:

View File

@@ -121,3 +121,4 @@ OLDLST:
RejectsOrders:
Cargo:
Types: disabled
Interactable:

View File

@@ -65,6 +65,7 @@ OLDLST:
RejectsOrders:
Cargo:
Types: disabled
Interactable:
SAM:
SpawnActorOnDeath:

View File

@@ -117,6 +117,7 @@ OLDLST:
RejectsOrders:
Cargo:
Types: disabled
Interactable:
HQ:
Tooltip:

View File

@@ -25,3 +25,4 @@ TRAN:
-Selectable:
RevealsShroud:
Range: 5c0
Interactable:

View File

@@ -35,3 +35,4 @@ FLARE:
TRAN:
-Selectable:
Interactable:

View File

@@ -28,3 +28,4 @@ FLARE:
TRAN:
-Selectable:
Interactable:

View File

@@ -131,6 +131,7 @@ TRAN:
-Selectable:
Buildable:
Prerequisites: ~disabled
Interactable:
ORCA:
Buildable:

View File

@@ -140,3 +140,4 @@ TRAN.IN:
Image: TRAN
Buildable:
Prerequisites: ~disabled
Interactable:

View File

@@ -127,6 +127,7 @@ TRAN.IN:
Image: TRAN
Buildable:
Prerequisites: ~disabled
Interactable:
HPAD.IN:
Inherits: HPAD

View File

@@ -196,3 +196,4 @@ TRAN.IN:
Image: TRAN
Buildable:
Prerequisites: ~disabled
Interactable:

View File

@@ -224,3 +224,4 @@ TRAN.IN:
Image: TRAN
Buildable:
Prerequisites: ~disabled
Interactable:

View File

@@ -151,6 +151,7 @@ TRAN.IN:
Image: TRAN
Buildable:
Prerequisites: ~disabled
Interactable:
NUKEOUT.IN:
Inherits: NUKE

View File

@@ -49,7 +49,8 @@ TRAN:
Weapon: HeliExplode
EmptyWeapon: HeliExplode
SelectionDecorations:
VisualBounds: 41,41
Selectable:
DecorationBounds: 41,41
HELI:
Inherits: ^Helicopter
@@ -107,10 +108,11 @@ HELI:
Weapon: HeliExplode
EmptyWeapon: HeliExplode
SelectionDecorations:
VisualBounds: 30,24
ReloadAmmoPool:
Delay: 40
Count: 1
Selectable:
DecorationBounds: 30,24
ORCA:
Inherits: ^Helicopter
@@ -158,13 +160,15 @@ ORCA:
WithMoveAnimation:
MoveSequence: move
SelectionDecorations:
VisualBounds: 30,24
ReloadAmmoPool:
Delay: 100
Count: 2
Selectable:
DecorationBounds: 30,24
C17:
Inherits: ^Plane
Interactable:
Tooltip:
Name: Supply Aircraft
Valued:
@@ -199,6 +203,7 @@ C17:
A10:
Inherits: ^Plane
Interactable:
Tooltip:
Name: A10 Bomber
Valued:

View File

@@ -409,16 +409,14 @@ BRIDGE1:
Building:
Footprint: ____ ____ ____ ____
Dimensions: 4,4
CustomSelectionSize:
CustomBounds: 96,96
FreeActor@north:
Actor: bridgehut
SpawnOffset: 2,0
FreeActor@south:
Actor: bridgehut
SpawnOffset: 0,2
CustomRenderSize:
CustomBounds: 96,96
Interactable:
Bounds: 96,96
BRIDGE2:
Inherits: ^Bridge
@@ -428,16 +426,14 @@ BRIDGE2:
Building:
Footprint: _____ _____ _____ _____ _____
Dimensions: 5,5
CustomSelectionSize:
CustomBounds: 120,120
FreeActor@north:
Actor: bridgehut
SpawnOffset: 0,0
FreeActor@south:
Actor: bridgehut
SpawnOffset: 2,2
CustomRenderSize:
CustomBounds: 120,120
Interactable:
Bounds: 120,120
BRIDGE3:
Inherits: ^Bridge
@@ -447,16 +443,14 @@ BRIDGE3:
Building:
Footprint: ______ ______ ______ ______ ______
Dimensions: 6,5
CustomSelectionSize:
CustomBounds: 144,120
FreeActor@north:
Actor: bridgehut
SpawnOffset: 3,0
FreeActor@south:
Actor: bridgehut
SpawnOffset: 1,2
CustomRenderSize:
CustomBounds: 144,120
Interactable:
Bounds: 144,120
BRIDGE4:
Inherits: ^Bridge
@@ -466,29 +460,25 @@ BRIDGE4:
Building:
Footprint: ______ ______ ______ ______
Dimensions: 6,4
CustomSelectionSize:
CustomBounds: 144,96
FreeActor@north:
Actor: bridgehut
SpawnOffset: 1,0
FreeActor@south:
Actor: bridgehut
SpawnOffset: 3,2
CustomRenderSize:
CustomBounds: 144,96
Interactable:
Bounds: 144,96
BRIDGEHUT:
AlwaysVisible:
Building:
Footprint: __ __
Dimensions: 2,2
CustomSelectionSize:
CustomBounds: 48,48
LegacyBridgeHut:
Targetable:
TargetTypes: BridgeHut, C4
CustomRenderSize:
CustomBounds: 48,48
Interactable:
Bounds: 48,48
C1:
Inherits: ^CivInfantry

View File

@@ -11,9 +11,7 @@
^SpriteActor:
BodyOrientation:
QuantizeFacingsFromSequence:
AutoSelectionSize:
RenderSprites:
AutoRenderSize:
^1x1Shape:
HitShape:
@@ -730,6 +728,7 @@
^CivBuildingHusk:
Inherits@1: ^SpriteActor
Interactable:
AppearsOnRadar:
Building:
Dimensions: 1,1
@@ -765,6 +764,7 @@
Inherits: ^CivBuilding
-Selectable:
-SelectionDecorations:
Interactable:
Tooltip:
GenericName: Field
-Explodes:
@@ -775,6 +775,7 @@
^CivFieldHusk:
Inherits@1: ^SpriteActor
Interactable:
AppearsOnRadar:
Building:
Dimensions: 1,1
@@ -794,6 +795,7 @@
^Wall:
Inherits@1: ^SpriteActor
Inherits@shape: ^1x1Shape
Interactable:
CombatDebugOverlay:
AppearsOnRadar:
Building:
@@ -830,6 +832,7 @@
^Tree:
Inherits@1: ^SpriteActor
Interactable:
Tooltip:
Name: Tree
ShowOwnerRow: false
@@ -871,6 +874,7 @@
^TreeHusk:
Inherits@1: ^SpriteActor
Interactable:
AppearsOnRadar:
Building:
Footprint: __ x_
@@ -886,6 +890,7 @@
^TibTree:
Inherits@1: ^SpriteActor
Interactable:
Tooltip:
Name: Blossom Tree
ShowOwnerRow: false
@@ -905,6 +910,7 @@
^Rock:
Inherits@1: ^SpriteActor
Interactable:
Tooltip:
Name: Rock
ShowOwnerRow: false
@@ -925,6 +931,7 @@
^CommonHuskDefaults:
Inherits@1: ^SpriteActor
Interactable:
Health:
HP: 140
Armor:
@@ -1001,6 +1008,7 @@
^Crate:
Inherits@1: ^SpriteActor
Interactable:
HiddenUnderFog:
Tooltip:
Name: Crate

View File

@@ -254,8 +254,8 @@ TREX:
Weapon: teeth
Selectable:
Bounds: 48,36,2,1
DecorationBounds: 52,38
SelectionDecorations:
VisualBounds: 52,38
Buildable:
Description: Bipedal carnivore with a massive skull
@@ -266,9 +266,10 @@ TRIC:
Armament:
Weapon: horn
SelectionDecorations:
VisualBounds: 34,24,0,2
Buildable:
Description: Quadruped with large bony frill and three horns
Selectable:
DecorationBounds: 34,24,0,2
RAPT:
Inherits: ^DINO

View File

@@ -46,6 +46,7 @@ SCRATE:
Name: Steel Crate
mpspawn:
Interactable:
EditorOnlyTooltip:
Name: (multiplayer player starting point)
AlwaysVisible:
@@ -59,6 +60,7 @@ mpspawn:
Categories: System
waypoint:
Interactable:
EditorOnlyTooltip:
Name: (waypoint for scripted behavior)
AlwaysVisible:
@@ -78,6 +80,7 @@ waypoint:
Palette: colorpicker
CAMERA:
Interactable:
EditorOnlyTooltip:
Name: (reveals area to owner)
AlwaysVisible:
@@ -94,6 +97,7 @@ CAMERA:
Categories: System
CAMERA.small:
Interactable:
EditorOnlyTooltip:
Name: (reveals small area to owner)
AlwaysVisible:
@@ -131,7 +135,6 @@ FLARE:
ShowOwnerRow: false
BodyOrientation:
QuantizedFacings: 1
AutoSelectionSize:
EditorTilesetFilter:
Categories: System
AutoRenderSize:
Interactable:

View File

@@ -29,11 +29,11 @@ BOAT:
Sequence: left # Just a work-around to avoid crash
Selectable:
Bounds: 42,24
DecorationBounds: 42,24
AutoTarget:
AllowMovement: false
RejectsOrders:
SelectionDecorations:
VisualBounds: 42,24
GrantConditionOnDamageState@HEAVY:
Condition: heavy-damage
ValidDamageStates: Heavy

View File

@@ -192,6 +192,7 @@ PROC:
Capacity: 700
Selectable:
Bounds: 72,56,0,12
DecorationBounds: 73,72
CustomSellValue:
Value: 500
FreeActor:
@@ -203,7 +204,6 @@ PROC:
Amount: -40
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 73,72
SILO:
Inherits: ^BaseBuilding
@@ -229,7 +229,6 @@ SILO:
HasMinibib: Yes
RenderSprites:
WithSpriteBody:
AutoSelectionSize:
WithSiloAnimation:
StoresResources:
PipCount: 10
@@ -241,9 +240,9 @@ SILO:
MustBeDestroyed:
RequiredForShortGame: false
SelectionDecorations:
VisualBounds: 49,30
-AcceptsDeliveredCash:
AutoRenderSize:
Selectable:
DecorationBounds: 49,30
PYLE:
Inherits: ^BaseBuilding
@@ -338,8 +337,8 @@ HAND:
ProvidesPrerequisite@buildingname:
Selectable:
Bounds: 48,48
DecorationBounds: 48,68,0,-10
SelectionDecorations:
VisualBounds: 48,68,0,-10
AFLD:
Inherits: ^BaseBuilding
@@ -414,8 +413,8 @@ WEAP:
LocalCenterOffset: 0,-512,0
Selectable:
Bounds: 72,48
DecorationBounds: 72,64,0,-16
SelectionDecorations:
VisualBounds: 72,64,0,-16
Health:
HP: 1100
RevealsShroud:
@@ -515,8 +514,8 @@ HQ:
LocalCenterOffset: 0,-512,0
Selectable:
Bounds: 48,40,0,9
DecorationBounds: 48,53,0,-4
SelectionDecorations:
VisualBounds: 48,53,0,-4
WithSpriteBody:
PauseOnCondition: lowpower
Health:
@@ -581,8 +580,8 @@ FIX:
Dimensions: 3,3
Selectable:
Bounds: 64,34,0,3
DecorationBounds: 72,48
SelectionDecorations:
VisualBounds: 72,48
Health:
HP: 800
RevealsShroud:
@@ -624,8 +623,8 @@ EYE:
LocalCenterOffset: 0,-512,0
Selectable:
Bounds: 48,40,0,9
DecorationBounds: 48,53,0,-4
SelectionDecorations:
VisualBounds: 48,53,0,-4
WithSpriteBody:
PauseOnCondition: lowpower
Health:
@@ -683,8 +682,8 @@ TMPL:
LocalCenterOffset: 0,-512,0
Selectable:
Bounds: 72,48
DecorationBounds: 72,68,0,-12
SelectionDecorations:
VisualBounds: 72,68,0,-12
Health:
HP: 2100
RevealsShroud:
@@ -803,7 +802,6 @@ SAM:
RealignDelay: -1
-WithSpriteBody:
WithEmbeddedTurretSpriteBody:
AutoSelectionSize:
Armament:
Weapon: Dragon
MuzzleSequence: muzzle
@@ -815,7 +813,6 @@ SAM:
Amount: -20
BodyOrientation:
UseClassicFacingFudge: True
AutoRenderSize:
OBLI:
Inherits: ^Defense
@@ -834,8 +831,8 @@ OBLI:
Description: Advanced base defense.\nRequires power to operate.\n Strong vs all Ground units\n Cannot target Aircraft
Selectable:
Bounds: 24,24
DecorationBounds: 22,44,0,-10
SelectionDecorations:
VisualBounds: 22,44,0,-10
Health:
HP: 600
Armor:
@@ -916,8 +913,8 @@ ATWR:
Description: All-purpose defensive structure.\n Strong vs Aircraft, Tanks\n Weak vs Infantry
Selectable:
Bounds: 24,24
DecorationBounds: 22,48,0,-12
SelectionDecorations:
VisualBounds: 22,48,0,-12
Health:
HP: 550
Armor:
@@ -1028,6 +1025,7 @@ BRIK:
BARRACKS:
AlwaysVisible:
Interactable:
Tooltip:
Name: Infantry Production
Buildable:
@@ -1035,6 +1033,7 @@ BARRACKS:
VEHICLEPRODUCTION:
AlwaysVisible:
Interactable:
Tooltip:
Name: Vehicle Production
Buildable:
@@ -1042,6 +1041,7 @@ VEHICLEPRODUCTION:
ANYPOWER:
AlwaysVisible:
Interactable:
Tooltip:
Name: Power Plant
Buildable:
@@ -1049,6 +1049,7 @@ ANYPOWER:
ANYHQ:
AlwaysVisible:
Interactable:
Tooltip:
Name: a communications center
Buildable:

View File

@@ -13,6 +13,7 @@ MCV:
Description: Deploys into another Construction Yard.\n Unarmed
Selectable:
Priority: 4
DecorationBounds: 36,36
Mobile:
Speed: 71
Crushes: crate, infantry
@@ -34,7 +35,6 @@ MCV:
SpawnActorOnDeath:
Actor: MCV.Husk
SelectionDecorations:
VisualBounds: 36,36
HARV:
Inherits: ^Tank
@@ -53,6 +53,7 @@ HARV:
Description: Collects Tiberium for processing.\n Unarmed
Selectable:
Priority: 7
DecorationBounds: 36,36
Harvester:
Resources: Tiberium, BlueTiberium
PipCount: 7
@@ -76,7 +77,6 @@ HARV:
Explodes:
Weapon: TiberiumExplosion
SelectionDecorations:
VisualBounds: 36,36
APC:
Inherits: ^Tank
@@ -386,7 +386,8 @@ MTNK:
SpawnActorOnDeath:
Actor: MTNK.Husk
SelectionDecorations:
VisualBounds: 28,28
Selectable:
DecorationBounds: 28,28
HTNK:
Inherits: ^Tank
@@ -437,7 +438,8 @@ HTNK:
SpawnActorOnDeath:
Actor: HTNK.Husk
SelectionDecorations:
VisualBounds: 34,34,0,-3
Selectable:
DecorationBounds: 34,34,0,-3
MSAM:
Inherits: ^Tank

View File

@@ -87,8 +87,7 @@ tile475:
WithSpriteBody:
BodyOrientation:
QuantizedFacings: 1
AutoSelectionSize:
AutoRenderSize:
Interactable:
# Placed after the sietch is destroyed so that the cliff is still unpassable
invisibleBlocker:

View File

@@ -57,6 +57,7 @@ frigate:
Inherits: ^Plane
ParaDrop:
DropRange: 1c0
Interactable:
Tooltip:
Name: Frigate
Aircraft:

View File

@@ -1,4 +1,5 @@
spicebloom.spawnpoint:
Interactable:
EditorOnlyTooltip:
Name: Spice Bloom spawnpoint
AlwaysVisible:
@@ -32,7 +33,6 @@ spicebloom:
HiddenUnderShroud:
BodyOrientation:
QuantizedFacings: 1
AutoSelectionSize:
RenderSprites:
AppearsOnRadar:
UseLocation: true
@@ -63,10 +63,11 @@ spicebloom:
Radius: 512
EditorTilesetFilter:
Categories: System
AutoRenderSize:
Interactable:
sandworm:
Inherits@1: ^SpriteActor
Interactable:
Tooltip:
Name: Sandworm
Health:

View File

@@ -11,9 +11,7 @@
^SpriteActor:
BodyOrientation:
QuantizeFacingsFromSequence:
AutoSelectionSize:
RenderSprites:
AutoRenderSize:
^GainsExperience:
GainsExperience:
@@ -226,6 +224,7 @@
^Husk:
Inherits@1: ^SpriteActor
Interactable:
Health:
HP: 75
Armor:
@@ -340,6 +339,7 @@
^Plane:
Inherits@1: ^ExistsInWorld
Inherits@2: ^SpriteActor
Interactable:
Huntable:
AppearsOnRadar:
UseLocation: true

View File

@@ -134,14 +134,13 @@ crate:
Palette: effect
WithCrateBody:
Passenger:
CustomSelectionSize:
CustomBounds: 20,20
EditorTilesetFilter:
Categories: System
CustomRenderSize:
CustomBounds: 20,20
Interactable:
Bounds: 20,20
mpspawn:
Interactable:
EditorOnlyTooltip:
Name: (multiplayer player starting point)
AlwaysVisible:
@@ -155,6 +154,7 @@ mpspawn:
Categories: System
waypoint:
Interactable:
EditorOnlyTooltip:
Name: (waypoint for scripted behavior)
AlwaysVisible:
@@ -177,6 +177,7 @@ waypoint:
Palette: colorpicker
camera:
Interactable:
EditorOnlyTooltip:
Name: (reveals area to owner)
AlwaysVisible:
@@ -193,6 +194,7 @@ camera:
Categories: System
wormspawner:
Interactable:
EditorOnlyTooltip:
Name: (worm spawning location)
AlwaysVisible:
@@ -208,6 +210,7 @@ wormspawner:
upgrade.conyard:
AlwaysVisible:
Interactable:
Tooltip:
Name: Construction Yard Upgrade
Buildable:
@@ -230,6 +233,7 @@ upgrade.conyard:
upgrade.barracks:
AlwaysVisible:
Interactable:
Tooltip:
Name: Barracks Upgrade
Buildable:
@@ -253,6 +257,7 @@ upgrade.barracks:
upgrade.light:
AlwaysVisible:
Interactable:
Tooltip:
Name: Light Factory Upgrade
Buildable:
@@ -276,6 +281,7 @@ upgrade.light:
upgrade.heavy:
AlwaysVisible:
Interactable:
Tooltip:
Name: Heavy Factory Upgrade
Buildable:
@@ -299,6 +305,7 @@ upgrade.heavy:
upgrade.hightech:
AlwaysVisible:
Interactable:
Tooltip:
Name: High Tech Factory Upgrade
Buildable:

View File

@@ -1,5 +1,6 @@
^concrete:
AlwaysVisible:
Interactable:
Building:
TerrainTypes: Rock
BuildSounds: CHUNG.WAV
@@ -454,6 +455,7 @@ heavy_factory:
Description: Produces heavy vehicles.
Selectable:
Bounds: 96,68,0,12
DecorationBounds: 96,96
Valued:
Cost: 1000
Tooltip:
@@ -515,7 +517,6 @@ heavy_factory:
Amount: -150
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 96,96
GrantConditionOnPrerequisite:
Prerequisites: upgrade.heavy
Condition: stardecoration
@@ -660,6 +661,7 @@ starport:
wall:
Inherits@1: ^SpriteActor
Interactable:
CombatDebugOverlay:
HiddenUnderShroud:
Buildable:
@@ -740,6 +742,7 @@ medium_gun_turret:
Selectable:
Bounds: 32,32
Priority: 3
DecorationBounds: 32,40,0,-8
Health:
HP: 2700
Armor:
@@ -759,7 +762,6 @@ medium_gun_turret:
Power:
Amount: -50
SelectionDecorations:
VisualBounds: 32,40,0,-8
large_gun_turret:
Inherits: ^Defense
@@ -787,6 +789,7 @@ large_gun_turret:
Selectable:
Bounds: 32,32
Priority: 3
DecorationBounds: 32,40,0,-8
Health:
HP: 3000
Armor:
@@ -804,7 +807,6 @@ large_gun_turret:
Power:
Amount: -60
SelectionDecorations:
VisualBounds: 32,40,0,-8
RevealOnDeath:
Radius: 5c768
@@ -840,8 +842,8 @@ repair_pad:
Range: 4c768
Selectable:
Bounds: 96,64
DecorationBounds: 96,80
SelectionDecorations:
VisualBounds: 96,80
Reservable:
RepairsUnits:
Interval: 10
@@ -874,6 +876,7 @@ high_tech_factory:
Description: Unlocks advanced technology.
Selectable:
Bounds: 96,68,0,12
DecorationBounds: 96,96
Valued:
Cost: 1150
Tooltip:
@@ -933,7 +936,6 @@ high_tech_factory:
Power:
Amount: -75
SelectionDecorations:
VisualBounds: 96,96
GrantConditionOnPrerequisite:
Prerequisites: upgrade.hightech
Condition: stardecoration
@@ -956,6 +958,7 @@ research_centre:
Description: Unlocks advanced tanks.
Selectable:
Bounds: 96,64,0,16
DecorationBounds: 96,80
Valued:
Cost: 1000
Tooltip:
@@ -994,7 +997,6 @@ research_centre:
Amount: -175
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 96,80
palace:
Inherits: ^Building

View File

@@ -14,6 +14,7 @@ mcv:
Selectable:
Class: mcv
Priority: 3
DecorationBounds: 42,42
Health:
HP: 4500
Armor:
@@ -40,7 +41,6 @@ mcv:
AttractsWorms:
Intensity: 700
SelectionDecorations:
VisualBounds: 42,42
SelfHealing:
Step: 5
Delay: 3
@@ -63,6 +63,7 @@ harvester:
Selectable:
Class: harvester
Priority: 7
DecorationBounds: 42,42
Harvester:
PipCount: 7
Capacity: 28
@@ -91,7 +92,6 @@ harvester:
AttractsWorms:
Intensity: 700
SelectionDecorations:
VisualBounds: 42,42
SelfHealing:
Step: 5
Delay: 3
@@ -360,11 +360,12 @@ devastator:
AttractsWorms:
Intensity: 700
SelectionDecorations:
VisualBounds: 44,38,0,0
SelfHealing:
Step: 5
Delay: 3
HealIfBelow: 50
Selectable:
DecorationBounds: 44,38,0,0
raider:
Inherits: ^Vehicle

View File

@@ -19,20 +19,19 @@ TRAN.Extraction:
Cargo:
Types: Einstein
MaxWeight: 1
AutoSelectionSize:
RenderSprites:
Image: tran
AutoRenderSize:
Interactable:
Interactable:
TRAN.Insertion:
Inherits: TRAN.Extraction
WithFacingSpriteBody:
Cargo:
MaxWeight: 0
AutoSelectionSize:
RenderSprites:
Image: tran
AutoRenderSize:
Interactable:
EINSTEIN:
Passenger:

View File

@@ -127,6 +127,7 @@ TRAN:
Range: 0c0
Cargo:
Types: ~disabled
Interactable:
JEEP.mission:
Inherits: JEEP
@@ -143,6 +144,7 @@ JEEP.mission:
Range: 0c0
RenderSprites:
Image: JEEP
Interactable:
E3:
Buildable:

View File

@@ -36,6 +36,7 @@ LST:
-Selectable:
Targetable:
TargetTypes: Ground, Water
Interactable:
LST.IN:
Inherits: LST
@@ -50,6 +51,7 @@ TRAN:
Range: 4c0
Targetable@GROUND:
TargetTypes: Ground
Interactable:
TRAN.IN:
Inherits: TRAN

View File

@@ -164,6 +164,7 @@ MINVV:
Weapon: CrateNuke
EmptyWeapon: CrateNuke
HitShape:
Interactable:
T17:
-Health:

View File

@@ -71,6 +71,7 @@ TRAN:
Prerequisites: ~disabled
RevealsShroud:
Range: 0c0
Interactable:
2TNK:
Buildable:

View File

@@ -131,8 +131,8 @@ MOBILETENT:
Name: Mobile Tent
Selectable:
Priority: 4
DecorationBounds: 21,21
SelectionDecorations:
VisualBounds: 21,21
Health:
HP: 600
Armor:

View File

@@ -45,6 +45,7 @@ LST.Unselectable.UnloadOnly:
PipCount: 0
Targetable:
TargetTypes: Ground, Water, Repair, NoAutoTarget
Interactable:
SPY.Strong:
Inherits: SPY

View File

@@ -65,6 +65,7 @@ WEAP:
MAINLAND:
AlwaysVisible:
Interactable:
Tooltip:
Name: Reach the mainland
ProvidesPrerequisite:
@@ -80,6 +81,7 @@ FIX:
GIVEFIX:
AlwaysVisible:
Interactable:
Tooltip:
Name: Weapons Factory or Helipad

View File

@@ -103,6 +103,7 @@ TRAN:
Types: Demitri
MaxWeight: 1
-Selectable:
Interactable:
LST:
Cargo:

View File

@@ -57,6 +57,7 @@ ATEK.mission:
-Huntable:
RenderSprites:
Image: ATEK
Interactable:
GUN:
Valued:

View File

@@ -36,6 +36,7 @@ BADR:
RejectsOrders:
GivesExperience:
Experience: 1000
Interactable:
BADR.Bomber:
Inherits: ^NeutralPlane
@@ -78,6 +79,7 @@ BADR.Bomber:
Image: badr
GivesExperience:
Experience: 1000
Interactable:
MIG:
Inherits: ^Plane
@@ -128,8 +130,8 @@ MIG:
ReturnOnIdle:
Selectable:
Bounds: 36,28,0,2
DecorationBounds: 40,29,0,1
SelectionDecorations:
VisualBounds: 40,29,0,1
Contrail@1:
Offset: -598,-683,0
Contrail@2:
@@ -197,7 +199,6 @@ YAK:
AmmoCondition: ammo
ReturnOnIdle:
SelectionDecorations:
VisualBounds: 30,28,0,2
WithMuzzleOverlay:
Contrail:
Offset: -853,0,0
@@ -208,6 +209,8 @@ YAK:
Interval: 2
ProducibleWithLevel:
Prerequisites: aircraft.upgraded
Selectable:
DecorationBounds: 30,28,0,2
TRAN:
Inherits: ^Helicopter
@@ -261,7 +264,8 @@ TRAN:
SpawnActorOnDeath:
Actor: TRAN.Husk
SelectionDecorations:
VisualBounds: 40,36
Selectable:
DecorationBounds: 40,36
HELI:
Inherits: ^Helicopter
@@ -319,13 +323,14 @@ HELI:
Ammo: 8
AmmoCondition: ammo
SelectionDecorations:
VisualBounds: 36,28
SpawnActorOnDeath:
Actor: HELI.Husk
SmokeTrailWhenDamaged:
Offset: -427,0,0
ProducibleWithLevel:
Prerequisites: aircraft.upgraded
Selectable:
DecorationBounds: 36,28
HIND:
Inherits: ^Helicopter
@@ -385,7 +390,6 @@ HIND:
ReloadDelay: 8
AmmoCondition: ammo
SelectionDecorations:
VisualBounds: 38,32
WithMuzzleOverlay:
SpawnActorOnDeath:
Actor: HIND.Husk
@@ -393,6 +397,8 @@ HIND:
Offset: -427,0,0
ProducibleWithLevel:
Prerequisites: aircraft.upgraded
Selectable:
DecorationBounds: 38,32
U2:
Inherits: ^NeutralPlane
@@ -424,3 +430,4 @@ U2:
Offset: -1c43,0,0
Interval: 2
RejectsOrders:
Interactable:

View File

@@ -296,14 +296,13 @@ V19.Husk:
-HitShape:
-Health:
-Explodes:
Interactable:
BARL:
Inherits: ^TechBuilding
-Selectable:
SelectionDecorations:
RenderSelectionBars: False
CustomSelectionSize:
CustomBounds: 24,24
Health:
HP: 10
Explodes:
@@ -320,16 +319,15 @@ BARL:
-Demolishable:
EditorTilesetFilter:
Categories: Decoration
CustomRenderSize:
CustomBounds: 24,24
Interactable:
Bounds: 24,24
Interactable:
BRL3:
Inherits: ^TechBuilding
-Selectable:
SelectionDecorations:
RenderSelectionBars: False
CustomSelectionSize:
CustomBounds: 24,24
Health:
HP: 10
Explodes:
@@ -346,8 +344,9 @@ BRL3:
-Demolishable:
EditorTilesetFilter:
Categories: Decoration
CustomRenderSize:
CustomBounds: 24,24
Interactable:
Bounds: 24,24
Interactable:
AMMOBOX1:
Inherits: ^AmmoBox
@@ -487,16 +486,14 @@ BRIDGE1:
Building:
Footprint: _____ _____ _____
Dimensions: 5,3
CustomSelectionSize:
CustomBounds: 120,72
FreeActor@north:
Actor: bridgehut
SpawnOffset: 2,-1
FreeActor@south:
Actor: bridgehut
SpawnOffset: 0,1
CustomRenderSize:
CustomBounds: 120,72
Interactable:
Bounds: 120,72
BRIDGE2:
Inherits: ^Bridge
@@ -507,16 +504,14 @@ BRIDGE2:
Building:
Footprint: _____ _____
Dimensions: 5,2
CustomSelectionSize:
CustomBounds: 120,48
FreeActor@north:
Actor: bridgehut
SpawnOffset: 0,-1
FreeActor@south:
Actor: bridgehut
SpawnOffset: 2,1
CustomRenderSize:
CustomBounds: 120,48
Interactable:
Bounds: 120,48
SBRIDGE1:
Inherits: ^Bridge
@@ -527,16 +522,14 @@ SBRIDGE1:
Building:
Footprint: ___ ___
Dimensions: 3,2
CustomSelectionSize:
CustomBounds: 72,48
FreeActor@north:
Actor: bridgehut.small
SpawnOffset: 1,0
FreeActor@south:
Actor: bridgehut.small
SpawnOffset: 1,1
CustomRenderSize:
CustomBounds: 72,48
Interactable:
Bounds: 72,48
SBRIDGE2:
Inherits: ^Bridge
@@ -547,16 +540,14 @@ SBRIDGE2:
Building:
Footprint: __ __ __
Dimensions: 2,3
CustomSelectionSize:
CustomBounds: 48,72
FreeActor@west:
Actor: bridgehut.small
SpawnOffset: 0,1
FreeActor@east:
Actor: bridgehut.small
SpawnOffset: 1,1
CustomRenderSize:
CustomBounds: 48,72
Interactable:
Bounds: 48,72
SBRIDGE3:
Inherits: ^Bridge
@@ -790,8 +781,8 @@ WINDMILL:
RequireTilesets: TEMPERAT
Selectable:
Bounds: 24,24,0,-14
DecorationBounds: 36,36,0,-14
SelectionDecorations:
VisualBounds: 36,36,0,-14
Tooltip:
Name: Windmill
Building:

View File

@@ -10,9 +10,7 @@
^SpriteActor:
BodyOrientation:
QuantizeFacingsFromSequence:
AutoSelectionSize:
RenderSprites:
AutoRenderSize:
^1x1Shape:
HitShape:
@@ -662,6 +660,7 @@
Inherits@1: ^ExistsInWorld
Inherits@2: ^SpriteActor
Inherits@shape: ^1x1Shape
Interactable:
Building:
Dimensions: 1,1
Footprint: x
@@ -773,8 +772,6 @@
-Selectable:
SelectionDecorations:
RenderSelectionBars: False
CustomSelectionSize:
CustomBounds: 24,24
Health:
HP: 10
Explodes:
@@ -787,8 +784,9 @@
Type: Light
EditorTilesetFilter:
Categories: Decoration
CustomRenderSize:
CustomBounds: 24,24
Interactable:
Bounds: 24,24
Interactable:
^CivBuilding:
Inherits: ^TechBuilding
@@ -822,10 +820,12 @@
-Demolishable:
EditorTilesetFilter:
ExcludeTilesets: INTERIOR
Interactable:
^Tree:
Inherits@1: ^SpriteActor
Inherits@shape: ^1x1Shape
Interactable:
Tooltip:
Name: Tree
ShowOwnerRow: false
@@ -867,6 +867,7 @@
^TreeHusk:
Inherits@1: ^SpriteActor
Interactable:
RenderSprites:
Palette: terrain
AppearsOnRadar:
@@ -884,6 +885,7 @@
^BasicHusk:
Inherits@1: ^SpriteActor
Interactable:
Health:
HP: 280
Armor:
@@ -959,6 +961,7 @@
^Bridge:
Inherits@shape: ^1x1Shape
AlwaysVisible:
Interactable:
Tooltip:
Name: Bridge
ShowOwnerRow: false
@@ -968,8 +971,6 @@
Building:
Footprint: ____ ____
Dimensions: 4,2
CustomSelectionSize:
CustomBounds: 96,48
Health:
HP: 1000
Armor:
@@ -977,11 +978,12 @@
ScriptTriggers:
BodyOrientation:
QuantizedFacings: 1
CustomRenderSize:
CustomBounds: 96,48
Interactable:
Bounds: 96,48
^Rock:
Inherits@1: ^SpriteActor
Interactable:
Tooltip:
Name: Rock
ShowOwnerRow: false
@@ -1009,6 +1011,7 @@
^Crate:
Inherits@1: ^SpriteActor
Interactable:
HiddenUnderFog:
Tooltip:
Name: Crate
@@ -1042,6 +1045,7 @@
^Mine:
Inherits: ^SpriteActor
Interactable:
WithSpriteBody:
HiddenUnderFog:
Mine:

View File

@@ -245,8 +245,8 @@ FAPW:
Image: APWR
Selectable:
Bounds: 72,48
DecorationBounds: 72,68,0,-10
SelectionDecorations:
VisualBounds: 72,68,0,-10
Valued:
Cost: 60

View File

@@ -13,8 +13,8 @@ DOG:
GenericName: Dog
Selectable:
Bounds: 12,17,-1,-4
DecorationBounds: 12,17,-1,-4
SelectionDecorations:
VisualBounds: 12,17,-1,-4
Health:
HP: 18
Mobile:
@@ -673,8 +673,8 @@ Ant:
Description: Irradiated insect that grew oversize.
Selectable:
Bounds: 24,24,0,-5
DecorationBounds: 30,30,0,-2
SelectionDecorations:
VisualBounds: 30,30,0,-2
Health:
HP: 750
Mobile:

View File

@@ -142,6 +142,7 @@ SCRATE:
Name: Steel Crate
CAMERA:
Interactable:
EditorOnlyTooltip:
Name: (reveals area to owner)
AlwaysVisible:
@@ -195,16 +196,16 @@ FLARE:
QuantizedFacings: 1
HiddenUnderFog:
Type: CenterPosition
Interactable:
Tooltip:
Name: Flare
ShowOwnerRow: false
AutoSelectionSize:
EditorTilesetFilter:
Categories: Decoration
AutoRenderSize:
MINE:
Inherits@1: ^SpriteActor
Interactable:
HiddenUnderShroud:
Tooltip:
Name: Ore Mine
@@ -223,6 +224,7 @@ MINE:
GMINE:
Inherits@1: ^SpriteActor
Interactable:
HiddenUnderShroud:
Tooltip:
Name: Gem Mine
@@ -242,6 +244,7 @@ GMINE:
RAILMINE:
Inherits@1: ^SpriteActor
Interactable:
HiddenUnderShroud:
Tooltip:
Name: Abandoned Mine
@@ -258,6 +261,7 @@ RAILMINE:
QUEE:
Inherits@1: ^SpriteActor
Inherits@shape: ^2x1Shape
Interactable:
HiddenUnderShroud:
Tooltip:
Name: Queen Ant
@@ -273,6 +277,7 @@ QUEE:
LAR1:
Inherits@1: ^SpriteActor
Inherits@shape: ^1x1Shape
Interactable:
HiddenUnderShroud:
Tooltip:
Name: Ant Larva
@@ -355,6 +360,7 @@ aircraft.upgraded:
ProvidesPrerequisite:
mpspawn:
Interactable:
EditorOnlyTooltip:
Name: (multiplayer player starting point)
AlwaysVisible:
@@ -368,6 +374,7 @@ mpspawn:
Categories: System
waypoint:
Interactable:
EditorOnlyTooltip:
Name: (waypoint for scripted behavior)
AlwaysVisible:
@@ -403,3 +410,4 @@ CTFLAG:
-Targetable:
EditorTilesetFilter:
Categories: Decoration
Interactable:

View File

@@ -47,7 +47,6 @@ SS:
FireDelay: 2
AttackFrontal:
SelectionDecorations:
VisualBounds: 38,38
AutoTarget:
InitialStance: HoldFire
InitialStanceAI: ReturnFire
@@ -63,6 +62,8 @@ SS:
Weapon: UnitExplodeSubmarine
EmptyWeapon: UnitExplodeSubmarine
-MustBeDestroyed:
Selectable:
DecorationBounds: 38,38
MSUB:
Inherits: ^Ship
@@ -118,7 +119,6 @@ MSUB:
FireDelay: 2
AttackFrontal:
SelectionDecorations:
VisualBounds: 44,44
AutoTarget:
InitialStance: HoldFire
InitialStanceAI: ReturnFire
@@ -130,6 +130,8 @@ MSUB:
Weapon: UnitExplodeSubmarine
EmptyWeapon: UnitExplodeSubmarine
-MustBeDestroyed:
Selectable:
DecorationBounds: 44,44
DD:
Inherits: ^Ship
@@ -173,12 +175,13 @@ DD:
LocalYaw: 64, -64
AttackTurreted:
SelectionDecorations:
VisualBounds: 38,38
WithSpriteTurret:
DetectCloaked:
CloakTypes: Underwater
Range: 4c0
RenderDetectionCircle:
Selectable:
DecorationBounds: 38,38
CA:
Inherits: ^Ship
@@ -232,11 +235,12 @@ CA:
AttackTurreted:
WithMuzzleOverlay:
SelectionDecorations:
VisualBounds: 44,44
WithSpriteTurret@PRIMARY:
Turret: primary
WithSpriteTurret@SECONDARY:
Turret: secondary
Selectable:
DecorationBounds: 44,44
LST:
Inherits: ^Ship
@@ -265,7 +269,6 @@ LST:
RevealsShroud@GAPGEN:
Range: 5c0
SelectionDecorations:
VisualBounds: 36,36
WithLandingCraftAnimation:
OpenTerrainTypes: Clear, Rough, Road, Ore, Gems, Beach
Cargo:
@@ -275,6 +278,8 @@ LST:
PassengerFacing: 0
LoadingCondition: notmobile
-Chronoshiftable:
Selectable:
DecorationBounds: 36,36
PT:
Inherits: ^Ship
@@ -315,9 +320,10 @@ PT:
AttackTurreted:
WithMuzzleOverlay:
SelectionDecorations:
VisualBounds: 36,36
WithSpriteTurret:
DetectCloaked:
CloakTypes: Underwater
Range: 4c0
RenderDetectionCircle:
Selectable:
DecorationBounds: 36,36

View File

@@ -75,8 +75,8 @@ GAP:
Description: Obscures the enemy's view with shroud.\nRequires power to operate.
Selectable:
Bounds: 24,24
DecorationBounds: 24,48,0,-12
SelectionDecorations:
VisualBounds: 24,48,0,-12
WithSpriteBody:
PauseOnCondition: disabled
Health:
@@ -341,8 +341,8 @@ IRON:
Dimensions: 2,1
Selectable:
Bounds: 48,28,0,2
DecorationBounds: 50,50,0,-12
SelectionDecorations:
VisualBounds: 50,50,0,-12
Health:
HP: 1000
Armor:
@@ -473,8 +473,8 @@ TSLA:
Name: Tesla Coil
Selectable:
Bounds: 24,24
DecorationBounds: 24,40,0,-8
SelectionDecorations:
VisualBounds: 24,40,0,-8
Health:
HP: 400
Armor:
@@ -518,8 +518,8 @@ AGUN:
Name: AA Gun
Selectable:
Bounds: 24,24
DecorationBounds: 24,32,0,-4
SelectionDecorations:
VisualBounds: 24,32,0,-4
Health:
HP: 400
Armor:
@@ -1094,8 +1094,8 @@ PROC:
LocalCenterOffset: 0,-512,0
Selectable:
Bounds: 72,50,0,12
DecorationBounds: 72,70,0,-2
SelectionDecorations:
VisualBounds: 72,70,0,-2
Targetable:
TargetTypes: Ground, Structure, C4, DetonateAttack, SpyInfiltrate
Health:
@@ -1460,8 +1460,8 @@ APWR:
LocalCenterOffset: 0,-512,0
Selectable:
Bounds: 72,48
DecorationBounds: 72,68,0,-10
SelectionDecorations:
VisualBounds: 72,68,0,-10
Health:
HP: 700
Armor:
@@ -1743,8 +1743,8 @@ FIX:
Dimensions: 3,3
Selectable:
Bounds: 68,34,0,3
DecorationBounds: 72,48
SelectionDecorations:
VisualBounds: 72,48
Health:
HP: 800
Armor:
@@ -1943,6 +1943,7 @@ WOOD:
BARRACKS:
AlwaysVisible:
Interactable:
Tooltip:
Name: Infantry Production
Buildable:
@@ -1950,6 +1951,7 @@ BARRACKS:
TECHCENTER:
AlwaysVisible:
Interactable:
Tooltip:
Name: Tech Center
Buildable:
@@ -1957,6 +1959,7 @@ TECHCENTER:
ANYPOWER:
AlwaysVisible:
Interactable:
Tooltip:
Name: Power Plant
Buildable:

View File

@@ -39,11 +39,12 @@ V2RL:
RequiresCondition: !ammo
Sequence: empty-idle
SelectionDecorations:
VisualBounds: 28,28
Explodes:
Weapon: V2Explode
ProducibleWithLevel:
Prerequisites: vehicles.upgraded
Selectable:
DecorationBounds: 28,28
1TNK:
Inherits: ^Tank
@@ -125,9 +126,10 @@ V2RL:
SpawnActorOnDeath:
Actor: 2TNK.Husk
SelectionDecorations:
VisualBounds: 28,28
ProducibleWithLevel:
Prerequisites: vehicles.upgraded
Selectable:
DecorationBounds: 28,28
3TNK:
Inherits: ^Tank
@@ -168,9 +170,10 @@ V2RL:
SpawnActorOnDeath:
Actor: 3TNK.Husk
SelectionDecorations:
VisualBounds: 28,28
ProducibleWithLevel:
Prerequisites: vehicles.upgraded
Selectable:
DecorationBounds: 28,28
4TNK:
Inherits: ^Tank
@@ -225,11 +228,12 @@ V2RL:
HealIfBelow: 50
DamageCooldown: 150
SelectionDecorations:
VisualBounds: 44,38,0,-4
ProducibleWithLevel:
Prerequisites: vehicles.upgraded
DetectCloaked:
Range: 6c0
Selectable:
DecorationBounds: 44,38,0,-4
ARTY:
Inherits: ^Tank
@@ -283,8 +287,8 @@ HARV:
GenericName: Harvester
Selectable:
Priority: 7
DecorationBounds: 42,42
SelectionDecorations:
VisualBounds: 42,42
Harvester:
Capacity: 20
Resources: Ore,Gems
@@ -333,8 +337,8 @@ MCV:
Name: Mobile Construction Vehicle
Selectable:
Priority: 4
DecorationBounds: 42,42
SelectionDecorations:
VisualBounds: 42,42
Health:
HP: 600
Armor:
@@ -611,9 +615,10 @@ TTNK:
WithIdleOverlay@SPINNER:
Sequence: spinner
SelectionDecorations:
VisualBounds: 30,30
ProducibleWithLevel:
Prerequisites: vehicles.upgraded
Selectable:
DecorationBounds: 30,30
FTRK:
Inherits: ^Vehicle
@@ -657,9 +662,10 @@ FTRK:
WithMuzzleOverlay:
WithSpriteTurret:
SelectionDecorations:
VisualBounds: 28,28
ProducibleWithLevel:
Prerequisites: vehicles.upgraded
Selectable:
DecorationBounds: 28,28
DTRK:
Inherits: ^Vehicle
@@ -705,7 +711,6 @@ CTNK:
Tooltip:
Name: Chrono Tank
SelectionDecorations:
VisualBounds: 30,30
Health:
HP: 450
Armor:
@@ -731,6 +736,8 @@ CTNK:
ChargeDelay: 300
ProducibleWithLevel:
Prerequisites: vehicles.upgraded
Selectable:
DecorationBounds: 30,30
QTNK:
Inherits: ^Tank
@@ -756,10 +763,11 @@ QTNK:
RevealsShroud@GAPGEN:
Range: 4c0
SelectionDecorations:
VisualBounds: 44,38,0,-4
MadTank:
Targetable:
TargetTypes: Ground, MADTank, Repair, Vehicle
Selectable:
DecorationBounds: 44,38,0,-4
STNK:
Inherits: ^Vehicle

View File

@@ -378,15 +378,13 @@ HUNTER:
Hovers@CRUISING:
RequiresCondition: cruising
QuantizeFacingsFromSequence:
AutoSelectionSize:
DrawLineToTarget:
AppearsOnRadar:
UseLocation: true
Selectable:
Interactable:
SelectionDecorations:
Palette: pips
ActorLostNotification:
HitShape:
EditorTilesetFilter:
Categories: System
AutoRenderSize:

View File

@@ -23,7 +23,6 @@ CABHUT:
RenderSprites:
Palette: terraindecoration
WithSpriteBody:
AutoSelectionSize:
AppearsOnRadar:
RadarColorFromTerrain:
Terrain: Bridge
@@ -34,7 +33,7 @@ CABHUT:
Name: Bridge
EditorTilesetFilter:
Categories: Bridge
AutoRenderSize:
Interactable:
^LowBridge:
Inherits: ^LowBridgeRamp
@@ -80,10 +79,8 @@ LOBRDG_A_D:
RampActors: lobrdg_r_ne, lobrdg_r_sw
AOffset: 1,-1
BOffset: 1,1
CustomSelectionSize:
CustomBounds: 96, 48
CustomRenderSize:
CustomBounds: 96, 48
Interactable:
Bounds: 96, 48
LOBRDG_B:
Inherits: ^LowBridge
@@ -118,10 +115,8 @@ LOBRDG_B_D:
RampActors: lobrdg_r_nw, lobrdg_r_se
AOffset: 1,1
BOffset: -1,1
CustomSelectionSize:
CustomBounds: 96, 48
CustomRenderSize:
CustomBounds: 96, 48
Interactable:
Bounds: 96, 48
LOBRDG_R_SE:
Inherits: ^LowBridgeRamp
@@ -178,12 +173,10 @@ LOBRDG_R_SW:
Name: Bridge
Immobile:
OccupiesSpace: false
CustomSelectionSize:
CustomBounds: 96, 144
EditorTilesetFilter:
Categories: Bridge
CustomRenderSize:
CustomBounds: 96, 144
Interactable:
Bounds: 96, 144
BRIDGE1:
Inherits: ^ElevatedBridgePlaceholder

View File

@@ -1363,6 +1363,7 @@ GASPOT:
Dimensions: 1, 1
Selectable:
Bounds: 48, 30, 0, -4
DecorationBounds: 48, 82, 0, -25
Power:
Amount: -10
Armor:
@@ -1375,7 +1376,6 @@ GASPOT:
WithIdleOverlay@LIGHTS:
Sequence: idle-lights
SelectionDecorations:
VisualBounds: 48, 82, 0, -25
EditorTilesetFilter:
Categories: Civilian building
@@ -1404,8 +1404,8 @@ GALITE:
Palette: alpha
Selectable:
Bounds: 24, 24, 0, -4
DecorationBounds: 25, 35, 0, -12
SelectionDecorations:
VisualBounds: 25, 35, 0, -12
-Cloak@EXTERNALCLOAK:
-ExternalCondition@CLOAKGENERATOR:
-ExternalCondition@CRATE-CLOAK:
@@ -1492,6 +1492,7 @@ UFO:
Palette: terraindecoration
Selectable:
Bounds: 144, 72, 0, 0
DecorationBounds: 144, 72, 0, 0
Tooltip:
Name: Scrin Ship
Health:
@@ -1501,7 +1502,6 @@ UFO:
EditorTilesetFilter:
RequireTilesets: TEMPERATE
SelectionDecorations:
VisualBounds: 144, 72, 0, 0
ThrowsShrapnel@SMALL:
Pieces: 9, 12
ThrowsShrapnel@LARGE:

View File

@@ -13,9 +13,7 @@
UseClassicPerspectiveFudge: False
CameraPitch: 85
QuantizeFacingsFromSequence:
AutoSelectionSize:
RenderSprites:
AutoRenderSize:
^GainsExperience:
GainsExperience:
@@ -428,12 +426,10 @@
Palette: terraindecoration
WithCrateBody:
Images: crate
CustomSelectionSize:
CustomBounds: 24,24
EditorTilesetFilter:
Categories: System
CustomRenderSize:
CustomBounds: 24,24
Interactable:
Bounds: 24,24
^Wall:
Inherits@1: ^SpriteActor
@@ -441,6 +437,7 @@
CombatDebugOverlay:
HiddenUnderShroud:
AppearsOnRadar:
Interactable:
Building:
Dimensions: 1,1
Footprint: x
@@ -485,6 +482,7 @@
Height: 768
^BuildingPlug:
Interactable:
AlwaysVisible:
Building:
BuildSounds: place2.aud
@@ -873,6 +871,7 @@
HiddenUnderFog:
Type: GroundPosition
ScriptTriggers:
Interactable:
Tooltip:
GenericName: Destroyed Aircraft
FallsToEarth:
@@ -930,6 +929,7 @@
^BlossomTree:
Inherits@1: ^SpriteActor
Interactable:
Tooltip:
Name: Blossom Tree
RenderSprites:
@@ -951,6 +951,7 @@
^Tree:
Inherits@1: ^SpriteActor
Interactable:
HiddenUnderShroud:
RenderSprites:
Palette: terraindecoration
@@ -968,6 +969,7 @@
^Rock:
Inherits@1: ^SpriteActor
Interactable:
HiddenUnderShroud:
RenderSprites:
Palette: terraindecoration
@@ -985,6 +987,7 @@
^Decoration:
Inherits@1: ^SpriteActor
Interactable:
HiddenUnderShroud:
RenderSprites:
Palette: terraindecoration
@@ -1097,12 +1100,11 @@
Inherits: ^TerrainOverlay
EditorOnlyTooltip:
Name: Railway
AutoSelectionSize:
ChangesTerrain:
TerrainType: Rail
EditorTilesetFilter:
Categories: Railway
AutoRenderSize:
Interactable:
^Tunnel:
RenderSprites:
@@ -1114,16 +1116,14 @@
Building:
Dimensions: 3, 3
Footprint: ___ ___ ___
CustomSelectionSize:
CustomBounds: 144, 144
Targetable:
AlwaysVisible:
TunnelEntrance:
Dimensions: 3, 3
EditorTilesetFilter:
Categories: Tunnel
CustomRenderSize:
CustomBounds: 144, 144
Interactable:
Bounds: 144, 144
^Gate:
Inherits: ^Building

View File

@@ -171,7 +171,6 @@ JUMPJET.Husk:
VTOL: true
RenderSprites:
Image: jumpjet
AutoSelectionSize:
WithSpriteBody:
Sequence: die-falling
Health:
@@ -188,7 +187,7 @@ JUMPJET.Husk:
FallbackSequence: die-splash
EditorTilesetFilter:
Categories: Husk
AutoRenderSize:
Interactable:
GHOST:
Inherits: ^Soldier

View File

@@ -30,6 +30,7 @@ GAPOWR:
Sequence: idle-plug
Selectable:
Bounds: 90, 48, 0, -6
DecorationBounds: 90, 84, 0, -12
Power:
Amount: 100
RequiresCondition: !empdisable
@@ -61,7 +62,6 @@ GAPOWR:
Amount: 50
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 90, 84, 0, -12
GAPILE:
Inherits: ^Building
@@ -82,6 +82,7 @@ GAPILE:
Dimensions: 2,2
Selectable:
Bounds: 88, 48, 0, -8
DecorationBounds: 88, 56, 0, -8
Health:
HP: 800
Armor:
@@ -112,7 +113,6 @@ GAPILE:
Amount: -20
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 88, 56, 0, -8
WithTextDecoration@primary:
RequiresSelection: true
Text: PRIMARY
@@ -140,6 +140,7 @@ GAWEAP:
Dimensions: 4,3
Selectable:
Bounds: 154, 96, -2, -12
DecorationBounds: 154, 100, -2, -12
Health:
HP: 1000
RevealsShroud:
@@ -176,7 +177,6 @@ GAWEAP:
Amount: -30
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 154, 100, -2, -12
WithTextDecoration@primary:
RequiresSelection: true
Text: PRIMARY
@@ -231,9 +231,9 @@ GAHPAD:
Amount: -10
Selectable:
Bounds: 88, 66, 0, -5
DecorationBounds: 88, 66, 0, -5
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 88, 66, 0, -5
WithTextDecoration@primary:
RequiresSelection: true
Text: PRIMARY
@@ -259,6 +259,7 @@ GADEPT:
Dimensions: 3,3
Selectable:
Bounds: 96, 64, -6, -6
DecorationBounds: 98, 68, -6, -6
Health:
HP: 1100
RevealsShroud:
@@ -292,7 +293,6 @@ GADEPT:
Amount: -30
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 98, 68, -6, -6
RenderSprites:
Image: gadept.gdi
FactionImages:
@@ -319,6 +319,7 @@ GARADR:
Dimensions: 2,2
Selectable:
Bounds: 96, 48, 0, -6
DecorationBounds: 96, 118, 0, -38
Health:
HP: 1000
Armor:
@@ -342,7 +343,6 @@ GARADR:
RequiresCondition: !powerdown
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 96, 118, 0, -38
GATECH:
Inherits: ^Building
@@ -364,6 +364,7 @@ GATECH:
Dimensions: 3,2
Selectable:
Bounds: 110, 60, 3, -4
DecorationBounds: 110, 60, 3, -4
Health:
HP: 500
Armor:
@@ -378,7 +379,6 @@ GATECH:
Amount: -150
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 110, 60, 3, -4
GAPLUG:
Inherits: ^Building
@@ -390,6 +390,7 @@ GAPLUG:
Name: GDI Upgrade Center
Selectable:
Bounds: 115,72,0,-12
DecorationBounds: 115,104,0,-24
Buildable:
BuildPaletteOrder: 170
Prerequisites: proc, gatech, ~structures.gdi, ~techlevel.superweapons
@@ -487,4 +488,3 @@ GAPLUG:
Sequence: idle-hunterseekerb
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 115,104,0,-24

View File

@@ -54,6 +54,7 @@ GACTWR:
Building:
Selectable:
Bounds: 48, 36, 0, -6
DecorationBounds: 48, 48, 0, -12
Health:
HP: 500
Armor:
@@ -128,7 +129,6 @@ GACTWR:
tower.sam: tower.sam
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 48, 48, 0, -12
GAVULC:
Inherits: ^BuildingPlug

View File

@@ -386,4 +386,5 @@ JUGG:
RevealOnFire:
ArmamentNames: deployed
SelectionDecorations:
VisualBounds: 48,40,0,-8
Selectable:
DecorationBounds: 48,40,0,-8

View File

@@ -1,4 +1,5 @@
mpspawn:
Interactable:
EditorOnlyTooltip:
Name: (multiplayer player starting point)
AlwaysVisible:
@@ -12,6 +13,7 @@ mpspawn:
Categories: System
waypoint:
Interactable:
EditorOnlyTooltip:
Name: (waypoint for scripted behavior)
AlwaysVisible:
@@ -41,6 +43,7 @@ waypoint:
Palette: colorpicker
CAMERA:
Interactable:
EditorOnlyTooltip:
Name: (reveals area to owner)
AlwaysVisible:

View File

@@ -48,6 +48,7 @@ CYBORG:
Description: Cybernetic infantry unit.\n Strong vs Infantry, Light armor\n Weak vs Vehicles, Aircraft
Selectable:
Bounds: 16,31,0,-10
DecorationBounds: 16,31,0,-10
Voiced:
VoiceSet: Cyborg
Mobile:
@@ -62,7 +63,6 @@ CYBORG:
AttackFrontal:
Voice: Attack
SelectionDecorations:
VisualBounds: 16,31,0,-10
ProducibleWithLevel:
Prerequisites: barracks.upgraded
@@ -84,6 +84,7 @@ CYC2:
Description: Elite cybernetic infantry unit.\n Strong vs Infantry, Vehicles, Buildings\n Weak vs Aircraft\nMaximum 1 can be trained.
Selectable:
Bounds: 16,32,-1,-12
DecorationBounds: 16,32,-1,-12
Voiced:
VoiceSet: CyborgCommando
Mobile:
@@ -99,7 +100,6 @@ CYC2:
AttackFrontal:
Voice: Attack
SelectionDecorations:
VisualBounds: 16,32,-1,-12
ProducibleWithLevel:
Prerequisites: barracks.upgraded

View File

@@ -17,6 +17,7 @@ NAPOWR:
Dimensions: 2,2
Selectable:
Bounds: 88, 48, 2, -6
DecorationBounds: 88, 80, 2, -12
Health:
HP: 750
Armor:
@@ -35,7 +36,6 @@ NAPOWR:
ScalePowerWithHealth:
PowerTooltip:
SelectionDecorations:
VisualBounds: 88, 80, 2, -12
NAAPWR:
Inherits: ^Building
@@ -56,6 +56,7 @@ NAAPWR:
Dimensions: 2,3
Selectable:
Bounds: 100, 54, 0, -4
DecorationBounds: 100, 74, 0, -12
Health:
HP: 750
Armor:
@@ -74,7 +75,6 @@ NAAPWR:
ScalePowerWithHealth:
PowerTooltip:
SelectionDecorations:
VisualBounds: 100, 74, 0, -12
ProvidesPrerequisite@buildingname:
NAHAND:
@@ -96,6 +96,7 @@ NAHAND:
Dimensions: 3,2
Selectable:
Bounds: 116, 60, 3, -6
DecorationBounds: 116, 78, 3, -8
Health:
HP: 800
Armor:
@@ -124,7 +125,6 @@ NAHAND:
Amount: -20
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 116, 78, 3, -8
WithTextDecoration@primary:
RequiresSelection: true
Text: PRIMARY
@@ -152,6 +152,7 @@ NAWEAP:
Dimensions: 4,3
Selectable:
Bounds: 149, 80, -3, -10
DecorationBounds: 149, 116, -3, -20
Health:
HP: 1000
Armor:
@@ -184,7 +185,6 @@ NAWEAP:
Amount: -30
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 149, 116, -3, -20
WithTextDecoration@primary:
RequiresSelection: true
Text: PRIMARY
@@ -239,9 +239,9 @@ NAHPAD:
Amount: -10
Selectable:
Bounds: 78, 48, 0, -6
DecorationBounds: 78, 54, 0, -8
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 78, 54, 0, -8
WithTextDecoration@primary:
RequiresSelection: true
Text: PRIMARY
@@ -270,6 +270,7 @@ NARADR:
Dimensions: 2,2
Selectable:
Bounds: 96, 48, 0, -6
DecorationBounds: 96, 72, 0, -12
Health:
HP: 1000
Armor:
@@ -293,7 +294,6 @@ NARADR:
RequiresCondition: !powerdown
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 96, 72, 0, -12
NATECH:
Inherits: ^Building
@@ -315,6 +315,7 @@ NATECH:
Dimensions: 2,2
Selectable:
Bounds: 86, 48, 0, -4
DecorationBounds: 86, 58, 0, -4
Health:
HP: 500
Armor:
@@ -329,7 +330,6 @@ NATECH:
Amount: -150
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 86, 58, 0, -4
NATMPL:
Inherits: ^Building

View File

@@ -99,8 +99,6 @@ NAFNCE:
Direction: Y
Condition: laserfence-direction-y
-WithWallSpriteBody:
CustomSelectionSize:
CustomBounds: 48, 24
ExternalCondition@ACTIVE:
Condition: active-posts
WithWallSpriteBody@XENABLED:
@@ -129,8 +127,8 @@ NAFNCE:
Weapons: SmallDebris
Pieces: 0, 1
Range: 2c0, 5c0
CustomRenderSize:
CustomBounds: 48, 24
Interactable:
Bounds: 48, 24
NALASR:
Inherits: ^Defense
@@ -148,6 +146,7 @@ NALASR:
Building:
Selectable:
Bounds: 40, 30, -8, -6
DecorationBounds: 40, 36, -8, -8
Health:
HP: 500
Armor:
@@ -171,7 +170,6 @@ NALASR:
Amount: -40
RequiresCondition: !powerdown
SelectionDecorations:
VisualBounds: 40, 36, -8, -8
BodyOrientation:
QuantizedFacings: 0
@@ -194,6 +192,7 @@ NAOBEL:
Dimensions: 2,2
Selectable:
Bounds: 88, 42, 0, -6
DecorationBounds: 88, 72, 0, -12
Health:
HP: 725
Armor:
@@ -221,7 +220,6 @@ NAOBEL:
Amount: -150
RequiresCondition: !powerdown
SelectionDecorations:
VisualBounds: 88, 72, 0, -12
NASAM:
Inherits: ^Defense
@@ -238,6 +236,7 @@ NASAM:
Description: Nod Anti-Air base defense.\nRequires power to operate.\n Strong vs Aircraft\n Weak vs Ground units
Selectable:
Bounds: 40, 30, -3, -8
DecorationBounds: 40, 36, -3, -8
Health:
HP: 600
Armor:
@@ -260,7 +259,6 @@ NASAM:
Amount: -30
RequiresCondition: !powerdown
SelectionDecorations:
VisualBounds: 40, 36, -3, -8
NASTLH:
Inherits: ^Building
@@ -305,8 +303,8 @@ NASTLH:
AffectsParent: true
Selectable:
Bounds: 106, 48, 8, -6
DecorationBounds: 106, 60, 8, -15
SelectionDecorations:
VisualBounds: 106, 60, 8, -15
NAMISL:
Inherits: ^Building
@@ -329,6 +327,7 @@ NAMISL:
Dimensions: 2,2
Selectable:
Bounds: 75,48
DecorationBounds: 75,48
Health:
HP: 1000
Armor:
@@ -363,7 +362,6 @@ NAMISL:
CameraRange: 10c0
WithNukeLaunchOverlay:
SelectionDecorations:
VisualBounds: 75,48
NAWAST:
Inherits: ^Building
@@ -386,6 +384,7 @@ NAWAST:
Dimensions: 3,3
Selectable:
Bounds: 100, 60, 5, -5
DecorationBounds: 100, 60, 5, -5
Health:
HP: 400
RevealsShroud:
@@ -412,5 +411,4 @@ NAWAST:
Sequence: bib
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 100, 60, 5, -5
RenderSprites:

View File

@@ -46,6 +46,7 @@ GACNST:
Amount: 0
Selectable:
Bounds: 144, 60, 0, -6
DecorationBounds: 144, 80, 0, -12
ProvidesPrerequisite@gdi:
Factions: gdi
Prerequisite: structures.gdi
@@ -53,7 +54,6 @@ GACNST:
Factions: nod
Prerequisite: structures.nod
SelectionDecorations:
VisualBounds: 144, 80, 0, -12
PROC:
Inherits: ^Building
@@ -72,6 +72,7 @@ PROC:
Dimensions: 4,3
Selectable:
Bounds: 134, 96, 0, -12
DecorationBounds: 134, 122, 0, -18
Health:
HP: 900
RevealsShroud:
@@ -103,7 +104,6 @@ PROC:
Amount: -30
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 134, 122, 0, -18
RenderSprites:
Image: proc.gdi
FactionImages:
@@ -129,6 +129,7 @@ GASILO:
Dimensions: 2, 2
Selectable:
Bounds: 80, 48, -5, 0
DecorationBounds: 80, 48, -5, 0
-GivesBuildableArea:
Health:
HP: 300
@@ -155,12 +156,12 @@ GASILO:
Power:
Amount: -10
SelectionDecorations:
VisualBounds: 80, 48, -5, 0
Explodes:
Weapon: TiberiumExplosion
ANYPOWER:
AlwaysVisible:
Interactable:
Tooltip:
Name: Power Plant
Buildable:
@@ -168,6 +169,7 @@ ANYPOWER:
BARRACKS:
AlwaysVisible:
Interactable:
Tooltip:
Name: Infantry Production
Buildable:
@@ -175,6 +177,7 @@ BARRACKS:
FACTORY:
AlwaysVisible:
Interactable:
Tooltip:
Name: Vehicle Production
Buildable:
@@ -182,6 +185,7 @@ FACTORY:
RADAR:
AlwaysVisible:
Interactable:
Tooltip:
Name: Radar
Buildable:
@@ -189,6 +193,7 @@ RADAR:
TECH:
AlwaysVisible:
Interactable:
Tooltip:
Name: Tech Center
Buildable:

View File

@@ -16,6 +16,7 @@ NAPULS:
Dimensions: 2,2
Selectable:
Bounds: 78, 54, 0, -12
DecorationBounds: 78, 54, 0, -12
Health:
HP: 500
Armor:
@@ -37,7 +38,6 @@ NAPULS:
Amount: -150
RequiresCondition: !powerdown
SelectionDecorations:
VisualBounds: 78, 54, 0, -12
RenderSprites:
Image: napuls.gdi
FactionImages:

View File

@@ -12,6 +12,7 @@ MCV:
Name: Mobile Construction Vehicle
Selectable:
Priority: 3
DecorationBounds: 42,42
Health:
HP: 1000
Armor:
@@ -33,7 +34,6 @@ MCV:
NoTransformSounds:
Voice: Move
SelectionDecorations:
VisualBounds: 42,42
RenderSprites:
Image: mcv.gdi
FactionImages:
@@ -55,6 +55,7 @@ HARV:
Selectable:
Priority: 7
Bounds: 36,36
DecorationBounds: 36,36
Harvester:
DeliveryBuildings: proc
Capacity: 28
@@ -98,7 +99,6 @@ HARV:
LocalOffset: 543,0,0
Palette: effect
SelectionDecorations:
VisualBounds: 36,36
RenderSprites:
Image: harv.gdi
FactionImages:

View File

@@ -115,10 +115,9 @@ VEINHOLE:
RenderSprites:
Palette: player
WithSpriteBody:
AutoSelectionSize:
EditorTilesetFilter:
Categories: Resource spawn
AutoRenderSize:
Interactable:
^TibFlora:
Inherits: ^Tree