Skip to content

Commit

Permalink
Add "Discovered by player" and "Limpet attached" to list of events to…
Browse files Browse the repository at this point in the history
… check for object attachment
  • Loading branch information
Rampastring committed Apr 28, 2024
1 parent 6ef46e3 commit 946604e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/TSMapEditor/Models/Map.cs
Expand Up @@ -1835,6 +1835,7 @@ public List<string> CheckForIssues()
// Check for triggers using an object-specific event (like "destroyed" or "damaged") without
// being linked to any object
var objectSpecificEventIndexes = new List<int>() {
4, // Discovered by player
6, // Attacked by any house
7, // Destroyed by any house
33, // Selected by player
Expand All @@ -1847,9 +1848,11 @@ public List<string> CheckForIssues()
43, // Quarter health (any source)
44, // Attacked by (house)
48 // Destroyed by anything
/*55 Limpet Attached - need to think how to handle YR*/
};

if (!Constants.UseCountries)
objectSpecificEventIndexes.Add(55); // Limpet attached - Firestorm only, not in RA2/YR

foreach (var trigger in Triggers)
{
int indexInList = objectSpecificEventIndexes.FindIndex(eventIndex => trigger.Conditions.Exists(c => c.ConditionIndex == eventIndex));
Expand Down

0 comments on commit 946604e

Please sign in to comment.