Skip to content

Commit

Permalink
Merge pull request #19 from ilujito2/ExportOtherTargetInTranslationFile
Browse files Browse the repository at this point in the history
Adding otherTarget to the translated mission files - Part1
  • Loading branch information
GlowPuff committed Jul 3, 2024
2 parents 7dc1418 + 480987a commit a5c44a1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Converters/TranslatedEventActionConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ public override object ReadJson( JsonReader reader, Type objectType, object exis
case 21://D6
eventActionAction = item.ToObject<TranslatedCustomEnemyDeployment>();
break;
case 12://GM2
eventActionAction = item.ToObject<TranslatedChangeTarget>();
break;
}
eObserver.Add( eventActionAction );
}
Expand Down
25 changes: 25 additions & 0 deletions Models/TranslatedMission.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ public TranslatedEvent( MissionEvent ev )
case EventActionType.D6:
eventActions.Add( new TranslatedCustomEnemyDeployment( item ) );
break;
case EventActionType.GM2:
eventActions.Add(new TranslatedChangeTarget(item));
break;
}
}
}
Expand Down Expand Up @@ -429,6 +432,28 @@ public TranslatedChangeRepositionInstructions( IEventAction ea )
}
}

public class TranslatedChangeTarget : ITranslatedEventAction
{
public Guid GUID { get; set; }
public EventActionType eventActionType { get; set; }
public string eaName { get; set; }

public string otherTarget;

public TranslatedChangeTarget()
{

}

public TranslatedChangeTarget(IEventAction ea)
{
eaName = ea.displayName;
GUID = ea.GUID;
eventActionType = ea.eventActionType;
otherTarget = ((ChangeTarget)ea).otherTarget;
}
}

public class TranslatedCustomEnemyDeployment : ITranslatedEventAction//D6
{
public Guid GUID { get; set; }
Expand Down

0 comments on commit a5c44a1

Please sign in to comment.