rmobjective fix (#15850)

Co-authored-by: vanx <vanx#5477>
This commit is contained in:
vanx
2023-04-29 15:26:47 +07:00
committed by GitHub
parent a298424886
commit 46dc364dc8
2 changed files with 3 additions and 3 deletions

View File

@@ -289,12 +289,12 @@ namespace Content.Server.Mind
} }
/// <summary> /// <summary>
/// Removes an objective to this mind. /// Removes an objective from this mind.
/// </summary> /// </summary>
/// <returns>Returns true if the removal succeeded.</returns> /// <returns>Returns true if the removal succeeded.</returns>
public bool TryRemoveObjective(int index) public bool TryRemoveObjective(int index)
{ {
if (_objectives.Count >= index) return false; if (index < 0 || index >= _objectives.Count) return false;
var objective = _objectives[index]; var objective = _objectives[index];

View File

@@ -42,7 +42,7 @@ namespace Content.Server.Objectives.Commands
} }
for (var i = 0; i < objectives.Count; i++) for (var i = 0; i < objectives.Count; i++)
{ {
shell.WriteLine($"- [{i + 1}] {objectives[i].Conditions[0].Title}"); shell.WriteLine($"- [{i}] {objectives[i].Conditions[0].Title}");
} }
} }