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;
|
readonly LuaScriptInfo info;
|
||||||
ScriptContext context;
|
ScriptContext context;
|
||||||
|
bool disposed;
|
||||||
|
|
||||||
public LuaScript(LuaScriptInfo info)
|
public LuaScript(LuaScriptInfo info)
|
||||||
{
|
{
|
||||||
this.info = 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>();
|
var scripts = info.Scripts ?? Enumerable.Empty<string>();
|
||||||
context = new ScriptContext(world, worldRenderer, scripts);
|
context = new ScriptContext(world, worldRenderer, scripts);
|
||||||
@@ -48,8 +49,7 @@ namespace OpenRA.Mods.Common.Scripting
|
|||||||
context.Tick(self);
|
context.Tick(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool disposed;
|
void INotifyActorDisposing.Disposing(Actor self)
|
||||||
public void Disposing(Actor self)
|
|
||||||
{
|
{
|
||||||
if (disposed)
|
if (disposed)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
Color.FromArgb(178, 205, 250, 220),
|
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 i = (int)t;
|
||||||
var p = b[paletteName];
|
var p = b[paletteName];
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
TurretFacing = TurretFacingFromInit(init, info.InitialFacing, info.Turret)();
|
TurretFacing = TurretFacingFromInit(init, info.InitialFacing, info.Turret)();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Created(Actor self)
|
void INotifyCreated.Created(Actor self)
|
||||||
{
|
{
|
||||||
attack = self.TraitOrDefault<AttackTurreted>();
|
attack = self.TraitOrDefault<AttackTurreted>();
|
||||||
facing = self.TraitOrDefault<IFacing>();
|
facing = self.TraitOrDefault<IFacing>();
|
||||||
|
|||||||
Reference in New Issue
Block a user