diff --git a/OpenRA.Mods.Common/UpdateRules/Rules/AddEditorPlayer.cs b/OpenRA.Mods.Common/UpdateRules/Rules/AddEditorPlayer.cs index 77b329a565..e5c6847078 100644 --- a/OpenRA.Mods.Common/UpdateRules/Rules/AddEditorPlayer.cs +++ b/OpenRA.Mods.Common/UpdateRules/Rules/AddEditorPlayer.cs @@ -21,20 +21,29 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules { get { - return "Map editor now requires an EditorPlayer to avoid loading all kinds of unnecessary player traits."; + return "Map editor now requires an EditorPlayer to avoid loading unnecessary player traits.\n" + + "A warning is displayed if this actor has not been defined."; } } - bool messageDisplayed; + bool warningRequired = true; public override IEnumerable AfterUpdate(ModData modData) { - if (!messageDisplayed) + if (warningRequired) { - messageDisplayed = true; + warningRequired = false; yield return "The map editor now requires an EditorPlayer actor.\n" + "Please add an EditorPlayer with the traits AlwaysVisible and Shroud to player.yaml\n(or a different rules yaml file of your choice)."; } } + + public override IEnumerable UpdateActorNode(ModData modData, MiniYamlNode actorNode) + { + if (actorNode.KeyMatches("EditorPlayer")) + warningRequired = false; + + yield break; + } } } diff --git a/OpenRA.Mods.Common/UpdateRules/Rules/DefineSoundDefaults.cs b/OpenRA.Mods.Common/UpdateRules/Rules/DefineSoundDefaults.cs index ec05c25257..93fc139b8c 100644 --- a/OpenRA.Mods.Common/UpdateRules/Rules/DefineSoundDefaults.cs +++ b/OpenRA.Mods.Common/UpdateRules/Rules/DefineSoundDefaults.cs @@ -22,8 +22,9 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules { get { - return "Mod-specific default sound values have been removed from several traits.\n" + - "The original values are added back via yaml."; + return "Mod-specific default sound values have been removed from several traits\n" + + "(" + fields.Select(f => f.Item1 + "." + f.Item2).JoinWith(", ") + ")\n" + + "Uses of these traits are listed for inspection so the values can be overriden in yaml."; } } @@ -38,10 +39,10 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules string BuildMessage(Tuple> field) { - return "The default value for {0}.{1} has been removed.\n".F(field.Item1, field.Item2) - + "You may wish to explicitly define `{0}: {1}` on the `{2}` trait \n".F(field.Item2, field.Item3, field.Item1) - + "definitions on the following actors (if they have not already been inherited from a parent).\n" - + UpdateUtils.FormatMessageList(field.Item4); + return "The default value for {0}.{1} has been removed.\n".F(field.Item1, field.Item2) + + "You may wish to explicitly define `{0}: {1}` on the `{2}` trait \n".F(field.Item2, field.Item3, field.Item1) + + "definitions on the following actors (if they have not already been inherited from a parent).\n" + + UpdateUtils.FormatMessageList(field.Item4); } public override IEnumerable AfterUpdate(ModData modData) diff --git a/OpenRA.Mods.Common/UpdateRules/Rules/DefineSquadExcludeHarvester.cs b/OpenRA.Mods.Common/UpdateRules/Rules/DefineSquadExcludeHarvester.cs index 9d228ad889..2a6df7c4b0 100644 --- a/OpenRA.Mods.Common/UpdateRules/Rules/DefineSquadExcludeHarvester.cs +++ b/OpenRA.Mods.Common/UpdateRules/Rules/DefineSquadExcludeHarvester.cs @@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules get { return "HackyAI no longer automatically excludes actors with Harvester trait from attack squads.\n" + - "They need to be explicitly added to ExcludeFromSquads."; + "They need to be explicitly added to ExcludeFromSquads. HackyAI instances are listed for inspection."; } } @@ -31,10 +31,10 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules public override IEnumerable AfterUpdate(ModData modData) { if (locations.Any()) - yield return "The automatic exclusion of harvesters from AI squads has been removed.\n" - + "You may wish to add your harvester-type actors to `ExcludeFromSquads` under `UnitCommonNames`\n" - + "on the following definitions:\n" - + UpdateUtils.FormatMessageList(locations); + yield return "The automatic exclusion of harvesters from AI squads has been removed.\n" + + "You may wish to add your harvester-type actors to `ExcludeFromSquads` under `UnitCommonNames`\n" + + "on the following definitions:\n" + + UpdateUtils.FormatMessageList(locations); locations.Clear(); } diff --git a/OpenRA.Mods.Common/UpdateRules/Rules/IgnoreAbstractActors.cs b/OpenRA.Mods.Common/UpdateRules/Rules/IgnoreAbstractActors.cs index d29cff932e..f9c5da7982 100644 --- a/OpenRA.Mods.Common/UpdateRules/Rules/IgnoreAbstractActors.cs +++ b/OpenRA.Mods.Common/UpdateRules/Rules/IgnoreAbstractActors.cs @@ -24,8 +24,8 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules { get { - return "Actor ids starting with '^' are now reserved for abstract\n" + - "inheritance templates, and will not be parsed by the game."; + return "Actor ids starting with '^' are now reserved for abstract inheritance templates.\n" + + "Definitions that may be affected are listed for inspection so that they can be renamed if necessary."; } } diff --git a/OpenRA.Mods.Common/UpdateRules/Rules/RemovePaletteFromCurrentTileset.cs b/OpenRA.Mods.Common/UpdateRules/Rules/RemovePaletteFromCurrentTileset.cs index 98218f92d9..a3d7a5c224 100644 --- a/OpenRA.Mods.Common/UpdateRules/Rules/RemovePaletteFromCurrentTileset.cs +++ b/OpenRA.Mods.Common/UpdateRules/Rules/RemovePaletteFromCurrentTileset.cs @@ -23,7 +23,8 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules get { return "The PaletteFromCurrentTileset trait and Palette field on TileSets have been removed.\n" + - "Terrain palettes are now explicitly defined on the world actor."; + "Terrain palettes are now explicitly defined on the world actor.\n" + + "Palette definitions are generated based on the Tileset metadata."; } } diff --git a/OpenRA.Mods.Common/UpdateRules/Rules/RemoveWithReloadingSpriteTurret.cs b/OpenRA.Mods.Common/UpdateRules/Rules/RemoveWithReloadingSpriteTurret.cs index 7ece90624d..2f6537ee6e 100644 --- a/OpenRA.Mods.Common/UpdateRules/Rules/RemoveWithReloadingSpriteTurret.cs +++ b/OpenRA.Mods.Common/UpdateRules/Rules/RemoveWithReloadingSpriteTurret.cs @@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules get { return "WithReloadingSpriteTurret has been superseded by conditions.\n" + - "The trait is switched for with WithSpriteTurret."; + "Instances of this trait are replaced by WithSpriteTurret."; } } @@ -31,10 +31,10 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules public override IEnumerable AfterUpdate(ModData modData) { if (locations.Any()) - yield return "WithReloadingSpriteTurret has been replaced by WithSpriteTurret\n" - + "You should use AmmoPool.AmmoConditions to switch turret type when reloading\n" - + "to restore the previous behaviour on the following actors:" - + UpdateUtils.FormatMessageList(locations); + yield return "WithReloadingSpriteTurret has been replaced by WithSpriteTurret\n" + + "You should use AmmoPool.AmmoConditions to switch turret type when reloading\n" + + "to restore the previous behaviour on the following actors:\n" + + UpdateUtils.FormatMessageList(locations); locations.Clear(); } diff --git a/OpenRA.Mods.Common/UpdateRules/Rules/RenameWormSpawner.cs b/OpenRA.Mods.Common/UpdateRules/Rules/RenameWormSpawner.cs index 86b36ba610..bba8217ba1 100644 --- a/OpenRA.Mods.Common/UpdateRules/Rules/RenameWormSpawner.cs +++ b/OpenRA.Mods.Common/UpdateRules/Rules/RenameWormSpawner.cs @@ -20,8 +20,8 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules { get { - return "The D2k-specific WormSpawner trait was renamed to ActorSpawner,\n" + - "generalized, and moved into the common mod code."; + return "The D2k-specific WormSpawner trait was renamed to ActorSpawner, generalized,\n" + + "and moved into the common mod code. Uses of the old traits are updated to account for this."; } }