fCraft.BuildingCommands.DrawOperationCallback C# (CSharp) Method

DrawOperationCallback() private static method

private static DrawOperationCallback ( Player player, Vector3I marks, object tag ) : void
player Player
marks Vector3I
tag object
return void
        private static void DrawOperationCallback( Player player, Vector3I[] marks, object tag )
        {
            DrawOperation op = ( DrawOperation )tag;
            if ( !op.Prepare( marks ) )
                return;
            if ( !player.CanDraw( op.BlocksTotalEstimate ) ) {
                player.MessageNow( "You are only allowed to run draw commands that affect up to {0} blocks. This one would affect {1} blocks.",
                                   player.Info.Rank.DrawLimit,
                                   op.Bounds.Volume );
                op.Cancel();
                return;
            }
            player.Message( "{0}: Processing ~{1} blocks.",
                            op.Description, op.BlocksTotalEstimate );
            op.Begin();
        }