Skip to content

Commit

Permalink
Fix an issue with AI Triggers clone script
Browse files Browse the repository at this point in the history
  • Loading branch information
Shushishtok committed Sep 28, 2024
1 parent a5ecc70 commit cab9f7d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/TSMapEditor/UI/Windows/AITriggersWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,13 @@ private void DoCloneForEasierDifficulties()
var mediumAITrigger = editedAITrigger.Clone(map.GetNewUniqueInternalId());
mediumAITrigger.Hard = false;
mediumAITrigger.Medium = true;
mediumAITrigger.Name = Helpers.ConvertNameToNewDifficulty(editedAITrigger.Name, Difficulty.Hard, Difficulty.Medium);
map.AITriggerTypes.Add(mediumAITrigger);

var easyAITrigger = editedAITrigger.Clone(map.GetNewUniqueInternalId());
easyAITrigger.Hard = false;
easyAITrigger.Easy = true;

mediumAITrigger.Name = Helpers.ConvertNameToNewDifficulty(editedAITrigger.Name, Difficulty.Hard, Difficulty.Medium);
easyAITrigger.Name = Helpers.ConvertNameToNewDifficulty(editedAITrigger.Name, Difficulty.Hard, Difficulty.Easy);

map.AITriggerTypes.Add(mediumAITrigger);
map.AITriggerTypes.Add(easyAITrigger);

CloneTeamTypesAndAttachToAITrigger(mediumAITrigger, Difficulty.Medium, true);
Expand Down

0 comments on commit cab9f7d

Please sign in to comment.