From c4ca3ca743228fe00e349b1403088fa8404e4d4b Mon Sep 17 00:00:00 2001 From: RoosterDragon Date: Fri, 11 Aug 2023 19:43:52 +0100 Subject: [PATCH] Fix RCS1226 --- .editorconfig | 3 +++ OpenRA.Game/Activities/Activity.cs | 13 +++++++++---- OpenRA.Game/Scripting/ScriptContext.cs | 5 ++++- .../Pathfinder/HierarchicalPathFinder.cs | 5 ++++- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.editorconfig b/.editorconfig index 1dcc8d7ee8..5f68dd247f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1106,6 +1106,9 @@ dotnet_diagnostic.RCS1220.severity = warning # Make class sealed. dotnet_diagnostic.RCS1225.severity = warning +# Add paragraph to documentation comment. +dotnet_diagnostic.RCS1226.severity = warning + # Unnecessary explicit use of enumerator. dotnet_diagnostic.RCS1230.severity = warning diff --git a/OpenRA.Game/Activities/Activity.cs b/OpenRA.Game/Activities/Activity.cs index b4a31d33b4..3d9211017d 100644 --- a/OpenRA.Game/Activities/Activity.cs +++ b/OpenRA.Game/Activities/Activity.cs @@ -146,18 +146,22 @@ namespace OpenRA.Activities } /// + /// /// Called every tick to run activity logic. Returns false if the activity should /// remain active, or true if it is complete. Cancelled activities must ensure they /// return the actor to a consistent state before returning true. - /// + /// + /// /// Child activities can be queued using QueueChild, and these will be ticked /// instead of the parent while they are active. Activities that need to run logic /// in parallel with child activities should set ChildHasPriority to false and /// manually call TickChildren. - /// + /// + /// /// Queuing one or more child activities and returning true is valid, and causes /// the activity to be completed immediately (without ticking again) once the /// children have completed. + /// /// public virtual bool Tick(Actor self) { @@ -222,10 +226,11 @@ namespace OpenRA.Activities } /// - /// Prints the activity tree, starting from the top or optionally from a given origin. - /// + /// Prints the activity tree, starting from the top or optionally from a given origin. + /// /// Call this method from any place that's called during a tick, such as the Tick() method itself or /// the Before(First|Last)Run() methods. The origin activity will be marked in the output. + /// /// /// The actor performing this activity. /// Activity from which to start traversing, and which to mark. If null, mark the calling activity, and start traversal from the top. diff --git a/OpenRA.Game/Scripting/ScriptContext.cs b/OpenRA.Game/Scripting/ScriptContext.cs index 84c50f8746..16de82dd5f 100644 --- a/OpenRA.Game/Scripting/ScriptContext.cs +++ b/OpenRA.Game/Scripting/ScriptContext.cs @@ -74,14 +74,17 @@ namespace OpenRA.Scripting /// Provides global bindings in Lua code. /// /// + /// /// Instance methods and properties declared in derived classes will be made available in Lua. Use /// on your derived class to specify the name exposed in Lua. It is recommended /// to apply against each method or property to provide a description of what it does. - /// + /// + /// /// Any parameters to your method that are s will be disposed automatically when your method /// completes. If you need to return any of these values, or need them to live longer than your method, you must /// use to get your own copy of the value. Any copied values you return will /// be disposed automatically, but you assume responsibility for disposing any other copies. + /// /// public abstract class ScriptGlobal : ScriptObjectWrapper { diff --git a/OpenRA.Mods.Common/Pathfinder/HierarchicalPathFinder.cs b/OpenRA.Mods.Common/Pathfinder/HierarchicalPathFinder.cs index 9dcde2ad8f..b4eb50b3db 100644 --- a/OpenRA.Mods.Common/Pathfinder/HierarchicalPathFinder.cs +++ b/OpenRA.Mods.Common/Pathfinder/HierarchicalPathFinder.cs @@ -632,17 +632,20 @@ namespace OpenRA.Mods.Common.Pathfinder } /// + /// /// defines immovability based on the mobile trait. The blocking rules /// in allow units /// to pass these immovable actors if they are temporary blockers (e.g. gates) or crushable by the locomotor. /// Since our abstract graph must work for any actor, we have to be conservative and can only consider a subset /// of the immovable actors in the graph - ones we know cannot be passed by some actors due to these rules. /// Both this and must be true for a cell to be blocked. - /// + /// + /// /// This method is dependant on the logic in /// and /// . This method must be kept in sync with changes in the locomotor /// rules. + /// /// bool ActorIsBlocking(Actor actor) {