/// <inheritdoc /> public override void Run(MappingDatabase mappingDatabase) { var args = GetUnquotedArgs(); if (args.Length < 1 || args.Length > 2) { PrintErrorUsage(); return; } var input = args[0]; var output = args.Length == 1 ? $"{Path.GetFileNameWithoutExtension(input)}-mapped" : args[1]; if (!File.Exists(input)) { Lumberjack.Error($"Input file \"{input}\" does not exist!"); return; } var mappingSource = InteractiveMapper.GetSelectedMappingSource(); if (mappingSource == null) { return; } Mapper.MapArchive(mappingSource, input, output); }
/// <inheritdoc /> public override void Run(MappingDatabase mappingDatabase) { if (Args == null) { PrintErrorUsage(); return; } var mappingSource = InteractiveMapper.GetSelectedMappingSource(); if (mappingSource == null) { return; } var mappings = mappingSource.Search(Args); foreach (var mapping in mappings) { if (mapping.ParentOfficialName != null) { var parentMapping = mappingSource.GetClassByObf(mapping.ParentOfficialName); Lumberjack.Log($"{mapping.GetMappingString()} (child of {parentMapping.GetMappingString()})"); } else { Lumberjack.Log($"{mapping.GetMappingString()}"); } } }
/// <inheritdoc /> public override void Run(MappingDatabase mappingDatabase) { if (Args == null) { PrintErrorUsage(); return; } var mappingSource = InteractiveMapper.GetSelectedMappingSource(); if (mappingSource == null) { return; } var mapped = Mapper.MapString(mappingSource, Args); Lumberjack.Log("Mapped string:"); Lumberjack.Log($"\t{mapped}".Pastel(Color.White)); }
/// <inheritdoc /> public override void Run(MappingDatabase mappingDatabase) { if (Args == null) { PrintErrorUsage(); return; } var mappingSource = InteractiveMapper.GetSelectedMappingSource(); if (mappingSource == null) { return; } var mappings = mappingSource.GetChildren(Args); foreach (var mapping in mappings) { Lumberjack.Log(mapping.GetMappingString()); } }