From dc7f27512ab06de55d66d107d1709c2ed916164d Mon Sep 17 00:00:00 2001 From: Redo Date: Fri, 7 Oct 2022 22:04:47 -0600 Subject: [PATCH] add argument to fillbricks to bypass confirmation dialog --- scripts/server/commands.cs | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/scripts/server/commands.cs b/scripts/server/commands.cs index 5837d0b..0bd5402 100644 --- a/scripts/server/commands.cs +++ b/scripts/server/commands.cs @@ -359,7 +359,7 @@ function serverCmdNdConfirmSuperCut(%client) function serverCmdSC(%client){serverCmdSuperCut(%client);} //Fill volume with bricks -function serverCmdFillBricks(%client, %subsetname) +function serverCmdFillBricks(%client, %conf, %subsetname) { if($Pref::Server::ND::FillBricksAdminOnly && !%client.isAdmin) { @@ -386,12 +386,16 @@ function serverCmdFillBricks(%client, %subsetname) } %client.NDFillBrickSubset = (%subsetname !$= "") ? ndLookupSubsetName(%subsetname) : $ND::SubsetDefault; - - commandToClient(%client, 'messageBoxOkCancel', "New Duplicator | /FillBricks", - "/FillBricks will first do a Supercut\nbefore placing bricks, to fix overlap." @ - "\n\nSupercut is destructive and does\nNOT support undo at this time." @ - "\n\nPlease make sure the box is correct,\nthen press OK below to continue.", - 'ndConfirmFillBricks'); + + if(%conf) { + serverCmdNdConfirmFillBricks(%client, %subsetname); + } else { + commandToClient(%client, 'messageBoxOkCancel', "New Duplicator | /FillBricks", + "/FillBricks will first do a Supercut\nbefore placing bricks, to fix overlap." @ + "\n\nSupercut is destructive and does\nNOT support undo at this time." @ + "\n\nPlease make sure the box is correct,\nthen press OK below to continue.", + 'ndConfirmFillBricks'); + } } //Confirm fill volume with bricks @@ -434,8 +438,8 @@ function serverCmdNdConfirmFillBricks(%client, %subsetname) } //Alternative short command -function serverCmdFB(%client){serverCmdFillBricks(%client);} -function serverCmdFBW(%client) { serverCmdFillBricks(%client, "LogicWire"); } +function serverCmdFB (%client, %conf) { serverCmdFillBricks(%client, %conf); } +function serverCmdFBW(%client, %conf) { serverCmdFillBricks(%client, %conf, "LogicWire"); } //MultiSelect toggle (ctrl)