Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }