A few more misc explicit interface changes
By-products of making ITick require explicit implementation.
This commit is contained in:
committed by
Matthias Mailänder
parent
28e1f391e0
commit
32df83d3c4
@@ -30,13 +30,14 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
{
|
||||
readonly LuaScriptInfo info;
|
||||
ScriptContext context;
|
||||
bool disposed;
|
||||
|
||||
public LuaScript(LuaScriptInfo info)
|
||||
{
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public void WorldLoaded(World world, WorldRenderer worldRenderer)
|
||||
void IWorldLoaded.WorldLoaded(World world, WorldRenderer worldRenderer)
|
||||
{
|
||||
var scripts = info.Scripts ?? Enumerable.Empty<string>();
|
||||
context = new ScriptContext(world, worldRenderer, scripts);
|
||||
@@ -48,8 +49,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
context.Tick(self);
|
||||
}
|
||||
|
||||
bool disposed;
|
||||
public void Disposing(Actor self)
|
||||
void INotifyActorDisposing.Disposing(Actor self)
|
||||
{
|
||||
if (disposed)
|
||||
return;
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
Color.FromArgb(178, 205, 250, 220),
|
||||
};
|
||||
|
||||
public void AdjustPalette(IReadOnlyDictionary<string, MutablePalette> b)
|
||||
void IPaletteModifier.AdjustPalette(IReadOnlyDictionary<string, MutablePalette> b)
|
||||
{
|
||||
var i = (int)t;
|
||||
var p = b[paletteName];
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
TurretFacing = TurretFacingFromInit(init, info.InitialFacing, info.Turret)();
|
||||
}
|
||||
|
||||
public void Created(Actor self)
|
||||
void INotifyCreated.Created(Actor self)
|
||||
{
|
||||
attack = self.TraitOrDefault<AttackTurreted>();
|
||||
facing = self.TraitOrDefault<IFacing>();
|
||||
|
||||
Reference in New Issue
Block a user