Fix IDE0039

This commit is contained in:
RoosterDragon
2023-02-19 11:56:54 +00:00
committed by abcdefg30
parent 4b3f7034b2
commit d4135d608e
67 changed files with 498 additions and 505 deletions

View File

@@ -218,7 +218,7 @@ namespace OpenRA.Mods.Common.Scripting
foreach (var q in player.PlayerActor.TraitsImplementing<ClassicProductionQueue>().Where(q => q.Enabled))
queues.Add(q.Info.Type, q);
Action<Actor, Actor> globalProductionHandler = (factory, unit) =>
void GlobalProductionHandler(Actor factory, Actor unit)
{
if (factory.Owner != player)
return;
@@ -227,10 +227,10 @@ namespace OpenRA.Mods.Common.Scripting
if (productionHandlers.ContainsKey(queue))
productionHandlers[queue](factory, unit);
};
}
var triggers = TriggerGlobal.GetScriptTriggers(player.PlayerActor);
triggers.OnOtherProducedInternal += globalProductionHandler;
triggers.OnOtherProducedInternal += GlobalProductionHandler;
}
[Desc("Build the specified set of actors using classic (RA-style) production queues. " +
@@ -259,7 +259,7 @@ namespace OpenRA.Mods.Common.Scripting
var squad = new List<Actor>();
var func = actionFunc.CopyReference() as LuaFunction;
Action<Actor, Actor> productionHandler = (factory, unit) =>
void ProductionHandler(Actor factory, Actor unit)
{
squad.Add(unit);
if (squad.Count >= squadSize)
@@ -271,10 +271,10 @@ namespace OpenRA.Mods.Common.Scripting
foreach (var q in queueTypes)
productionHandlers.Remove(q);
}
};
}
foreach (var q in queueTypes)
productionHandlers.Add(q, productionHandler);
productionHandlers.Add(q, ProductionHandler);
}
foreach (var actorType in actorTypes)