Require explicit INotifyCreated
This commit is contained in:
@@ -129,7 +129,10 @@ namespace OpenRA.Traits
|
||||
public interface IResolveOrder { void ResolveOrder(Actor self, Order order); }
|
||||
public interface IValidateOrder { bool OrderValidation(OrderManager orderManager, World world, int clientId, Order order); }
|
||||
public interface IOrderVoice { string VoicePhraseForOrder(Actor self, Order order); }
|
||||
|
||||
[RequireExplicitImplementation]
|
||||
public interface INotifyCreated { void Created(Actor self); }
|
||||
|
||||
public interface INotifyAddedToWorld { void AddedToWorld(Actor self); }
|
||||
public interface INotifyRemovedFromWorld { void RemovedFromWorld(Actor self); }
|
||||
public interface INotifyActorDisposing { void Disposing(Actor self); }
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
PaletteName = info.IsPlayerPalette ? info.Palette + self.Owner.InternalName : info.Palette;
|
||||
}
|
||||
|
||||
public void Created(Actor self)
|
||||
void INotifyCreated.Created(Actor self)
|
||||
{
|
||||
self.World.Add(new RallyPointIndicator(self, this, self.Info.TraitInfos<ExitInfo>().ToArray()));
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
deployState = init.Get<DeployStateInit, DeployState>();
|
||||
}
|
||||
|
||||
public void Created(Actor self)
|
||||
void INotifyCreated.Created(Actor self)
|
||||
{
|
||||
conditionManager = self.TraitOrDefault<ConditionManager>();
|
||||
notify = self.TraitsImplementing<INotifyDeployTriggered>().ToArray();
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public void Created(Actor self)
|
||||
void INotifyCreated.Created(Actor self)
|
||||
{
|
||||
move = self.Trait<IMove>();
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
finalPosition = init.World.Map.CenterOfCell(TopLeft);
|
||||
}
|
||||
|
||||
public void Created(Actor self)
|
||||
void INotifyCreated.Created(Actor self)
|
||||
{
|
||||
var distance = (finalPosition - CenterPosition).Length;
|
||||
if (dragSpeed > 0 && distance > 0)
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
}
|
||||
}
|
||||
|
||||
public void Created(Actor self)
|
||||
void INotifyCreated.Created(Actor self)
|
||||
{
|
||||
conditionManager = self.TraitOrDefault<ConditionManager>();
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public void Created(Actor self)
|
||||
void INotifyCreated.Created(Actor self)
|
||||
{
|
||||
if (!self.Owner.PlayerActor.Trait<TechTree>().HasPrerequisites(info.Prerequisites))
|
||||
return;
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
throw new InvalidOperationException("No queues available for production type '{0}'".F(type));
|
||||
}
|
||||
|
||||
public void Created(Actor self)
|
||||
void INotifyCreated.Created(Actor self)
|
||||
{
|
||||
FindQueue();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user