예제 #1
0
 public static CommandContext Create(CommandContext parent, FileInfo fileInfo, TagCache cache, StringIdCache stringIds, HaloTag tag, Model model)
 {
     var context = new CommandContext(parent, string.Format("{0:X8}.hlmt", tag.Index));
     context.AddCommand(new HlmtListVariantsCommand(model, stringIds));
     context.AddCommand(new HlmtExtractModeCommand(cache, fileInfo, model, stringIds));
     return context;
 }
        public HlmtListVariantsCommand(Model model, StringIdCache stringIds)
            : base(CommandFlags.Inherit,

			"listvariants",
			"List available variants",

			"listvariants",

			"Lists variant names which can be used with \"extractmode\".")
        {
            _model = model;
            _stringIds = stringIds;
        }
        public HlmtExtractModeCommand(TagCache cache, FileInfo fileInfo, Model model, StringIdCache stringIds)
            : base(CommandFlags.Inherit,

			"extractmode",
			"Extract the render model",

			"extractmode <variant> <filetype> <filename>",

			"Extracts a variant of the render model to a file.\n" +
			"Use the \"listvariants\" command to list available variants.\n" +
			"If the model does not have any variants, just use \"default\"." +
			"\n" +
			"Supported file types: obj")
        {
            _cache = cache;
            _fileInfo = fileInfo;
            _model = model;
            _stringIds = stringIds;
        }