@@ -232,10 +232,10 @@ namespace OpenRA.Traits
|
|||||||
Stance oldStance, Stance newStance);
|
Stance oldStance, Stance newStance);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface ILintPass { void Run(Action<string> emitError, Action<string> emitWarning); }
|
public interface ILintPass { void Run(Action<string> emitError, Action<string> emitWarning, Map map); }
|
||||||
|
|
||||||
public interface IObjectivesPanel { string ObjectivesPanel { get; } }
|
public interface IObjectivesPanel { string ObjectivesPanel { get; } }
|
||||||
|
|
||||||
public static class DisableExts
|
public static class DisableExts
|
||||||
{
|
{
|
||||||
public static bool IsDisabled(this Actor a)
|
public static bool IsDisabled(this Actor a)
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ namespace OpenRA.Lint
|
|||||||
if (verbose)
|
if (verbose)
|
||||||
Console.WriteLine("Pass: {0}".F(customPassType.ToString()));
|
Console.WriteLine("Pass: {0}".F(customPassType.ToString()));
|
||||||
|
|
||||||
customPass.Run(EmitError, EmitWarning);
|
customPass.Run(EmitError, EmitWarning, testMap);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
Action<string> EmitError;
|
Action<string> EmitError;
|
||||||
|
|
||||||
public void Run(Action<string> emitError, Action<string> emitWarning)
|
public void Run(Action<string> emitError, Action<string> emitWarning, Map map)
|
||||||
{
|
{
|
||||||
EmitError = emitError;
|
EmitError = emitError;
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,11 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
class CheckSequences : ILintPass
|
class CheckSequences : ILintPass
|
||||||
{
|
{
|
||||||
public void Run(Action<string> emitError, Action<string> emitWarning)
|
public void Run(Action<string> emitError, Action<string> emitWarning, Map map)
|
||||||
{
|
{
|
||||||
var sequences = Game.modData.Manifest.Sequences
|
var sequences = MiniYaml.MergeLiberal(map.Sequences,
|
||||||
.Select(s => MiniYaml.FromFile(s)).Aggregate(MiniYaml.MergeLiberal);
|
Game.modData.Manifest.Sequences.Select(s => MiniYaml.FromFile(s))
|
||||||
|
.Aggregate(MiniYaml.MergeLiberal));
|
||||||
|
|
||||||
foreach (var actorInfo in Rules.Info)
|
foreach (var actorInfo in Rules.Info)
|
||||||
foreach (var renderInfo in actorInfo.Value.Traits.WithInterface<RenderSimpleInfo>())
|
foreach (var renderInfo in actorInfo.Value.Traits.WithInterface<RenderSimpleInfo>())
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
class CheckSyncAnnotations : ILintPass
|
class CheckSyncAnnotations : ILintPass
|
||||||
{
|
{
|
||||||
public void Run(Action<string> emitError, Action<string> emitWarning)
|
public void Run(Action<string> emitError, Action<string> emitWarning, Map map)
|
||||||
{
|
{
|
||||||
/* first, check all the types implementing ISync */
|
/* first, check all the types implementing ISync */
|
||||||
foreach (var t in Game.modData.ObjectCreator.GetTypesImplementing<ISync>())
|
foreach (var t in Game.modData.ObjectCreator.GetTypesImplementing<ISync>())
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
public class CheckTraitPrerequisites : ILintPass
|
public class CheckTraitPrerequisites : ILintPass
|
||||||
{
|
{
|
||||||
public void Run(Action<string> emitError, Action<string> emitWarning)
|
public void Run(Action<string> emitError, Action<string> emitWarning, Map map)
|
||||||
{
|
{
|
||||||
foreach (var actorInfo in Rules.Info.Where(a => !a.Key.StartsWith("^")))
|
foreach (var actorInfo in Rules.Info.Where(a => !a.Key.StartsWith("^")))
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
class LintBuildablePrerequisites : ILintPass
|
class LintBuildablePrerequisites : ILintPass
|
||||||
{
|
{
|
||||||
public void Run(Action<string> emitError, Action<string> emitWarning)
|
public void Run(Action<string> emitError, Action<string> emitWarning, Map map)
|
||||||
{
|
{
|
||||||
var providedPrereqs = Rules.Info.Keys.Concat(
|
var providedPrereqs = Rules.Info.Keys.Concat(
|
||||||
Rules.Info.SelectMany(a => a.Value.Traits
|
Rules.Info.SelectMany(a => a.Value.Traits
|
||||||
|
|||||||
Reference in New Issue
Block a user