public override void Use(Player p, string message, CommandData data) { FixGrassDrawOp op = new FixGrassDrawOp(); if (message.Length == 0) { op.FixDirt = true; op.FixGrass = true; } else if (message.CaselessEq("light")) { op.LightMode = true; } else if (message.CaselessEq("grass")) { op.FixGrass = true; } else if (message.CaselessEq("dirt")) { op.FixDirt = true; } else { Help(p); return; } p.Message("Place or break two blocks to determine the bounds within which grass/dirt is fixed"); p.MakeSelection(2, "Selecting corners for &SFixGrass", op, DoFixGrass); }
bool DoFixGrass(Player p, Vec3S32[] marks, object state, BlockID block) { FixGrassDrawOp op = (FixGrassDrawOp)state; op.AlwaysUsable = true; DrawOpPerformer.Do(op, null, p, marks, false); return(false); }