17 lines
491 B
C#
17 lines
491 B
C#
using EDPlayerJournal.Entries;
|
|
|
|
namespace EDPlayerJournal.CommanderContext;
|
|
|
|
internal class LocationParser : ICommanderParser {
|
|
public void Parse(Entry entry, CommanderContext ctx) {
|
|
LocationEntry? e = entry as LocationEntry;
|
|
|
|
if (e == null) {
|
|
throw new CommanderParserException("invalid entry");
|
|
}
|
|
|
|
ctx.Station = Station.ParseEntry(e);
|
|
ctx.System = StarSystem.ParseEntry(e);
|
|
ctx.IsDocked = e.Docked;
|
|
}
|
|
} |