﻿using LibPixelPet;
using System;

namespace PixelPet.CLI.Commands {
	internal class ClearTilesetCmd : CliCommand {
		public ClearTilesetCmd()
			: base("Clear-Tileset") { }

		public override void Run(Workbench workbench, ILogger logger) {
			int w = 8;
			int h = 8;

			workbench.Tileset = new Tileset(w, h);

			logger?.Log("Created new " + w + 'x' + h + " tileset.");
		}
	}
}

﻿using LibPixelPet;
using System;

namespace PixelPet.CLI.Commands {
	internal class ClearTilesetCmd : CliCommand {
		public ClearTilesetCmd()
			: base("Clear-Tileset",
				new Parameter("tile-size", "s", false, new ParameterValue("width", "8"), new ParameterValue("height", "8"))
			) { }

		public override void Run(Workbench workbench, ILogger logger) {
			int tw = FindNamedParameter("--tile-size").Values[0].ToInt32();
			int th = FindNamedParameter("--tile-size").Values[1].ToInt32();

			workbench.Tileset = new Tileset(tw, th);

			logger?.Log("Created new " + tw + 'x' + th + " tileset.");
		}
	}
}

Allow tile size to be changed from 8x8 using Clear-Tileset --tile-size.
Allow tile size to be changed from 8x8 using Clear-Tileset --tile-size.
