public FrozenActor(Actor self, PPos[] footprint, Shroud shroud, bool startsRevealed)
{
actor = self;
this.shroud = shroud;
NeedRenderables = startsRevealed;
// Consider all cells inside the map area (ignoring the current map bounds)
Footprint = footprint
.Where(m => shroud.Contains(m))
.ToArray();
if (Footprint.Length == 0)
{
throw new ArgumentException(("This frozen actor has no footprint.\n" +
"Actor Name: {0}\n" +
"Actor Location: {1}\n" +
"Input footprint: [{2}]\n" +
"Input footprint (after shroud.Contains): [{3}]")
.F(actor.Info.Name,
actor.Location.ToString(),
footprint.Select(p => p.ToString()).JoinWith("|"),
footprint.Select(p => shroud.Contains(p).ToString()).JoinWith("|")));
}
CenterPosition = self.CenterPosition;
Bounds = self.Bounds;
TargetTypes = self.GetEnabledTargetTypes().ToHashSet();
tooltip = self.TraitsImplementing <ITooltip>().FirstOrDefault();
health = self.TraitOrDefault <IHealth>();
UpdateVisibility();
}