dont select generated bricks; ctrl+select generated bricks selects parent; remove copy

This commit is contained in:
Redo
2025-07-22 17:32:45 -07:00
parent 2084d75180
commit a17e88ab0d
6 changed files with 68 additions and 23 deletions

View File

@ -191,6 +191,8 @@ function NDM_BoxSelect::onSelectObject(%this, %client, %obj, %pos, %normal)
%box = ndGetBoxFromZone(%obj);
%client.ndSelectionBox.zoneBrick = %obj;
%client.ndSelectionBox.setZoneColors();
} else if(%obj.generated && isObject(%obj.generatedParent)) {
%box = %obj.generatedParent.getWorldBox();
} else {
%box = ndGetPlateBoxFromRayCast(%pos, %normal);
}
@ -472,10 +474,10 @@ function NDM_BoxSelect::onCancelBrick(%this, %client)
}
//Copy Selection
function NDM_BoxSelect::onCopy(%this, %client)
{
%this.onPlantBrick(%client);
}
//function NDM_BoxSelect::onCopy(%this, %client)
//{
// %this.onPlantBrick(%client);
//}
//Cut Selection
function NDM_BoxSelect::onCut(%this, %client)

View File

@ -170,10 +170,10 @@ function NDM_StackSelect::onCancelBrick(%this, %client)
}
//Copy Selection
function NDM_StackSelect::onCopy(%this, %client)
{
%this.onPlantBrick(%client);
}
//function NDM_StackSelect::onCopy(%this, %client)
//{
// %this.onPlantBrick(%client);
//}
//Cut Selection
function NDM_StackSelect::onCut(%this, %client)

View File

@ -212,6 +212,10 @@ function ND_Selection::startStackSelection(%this, %brick, %direction, %limited)
if(%queueCount >= %brickLimit)
continue;
// Skip generated bricks
if(%nextBrick.generated)
continue;
//Check trust
if(!ndTrustCheckSelect(%nextBrick, %group, %bl_id, %admin))
{
@ -239,6 +243,10 @@ function ND_Selection::startStackSelection(%this, %brick, %direction, %limited)
if(%queueCount >= %brickLimit)
continue;
// Skip generated bricks
if(%nextBrick.generated)
continue;
//Check trust
if(!ndTrustCheckSelect(%nextBrick, %group, %bl_id, %admin))
{
@ -268,6 +276,10 @@ function ND_Selection::startStackSelection(%this, %brick, %direction, %limited)
if(%queueCount >= %brickLimit)
continue;
// Skip generated bricks
if(%nextBrick.generated)
continue;
//Check trust
if(!ndTrustCheckSelect(%nextBrick, %group, %bl_id, %admin))
{
@ -364,6 +376,10 @@ function ND_Selection::startStackSelectionAdditive(%this, %brick, %direction, %l
if(%queueCount >= %brickLimit)
continue;
// Skip generated bricks
if(%nextBrick.generated)
continue;
//Check trust
if(!ndTrustCheckSelect(%nextBrick, %group, %bl_id, %admin))
{
@ -409,6 +425,10 @@ function ND_Selection::startStackSelectionAdditive(%this, %brick, %direction, %l
if(%queueCount >= %brickLimit)
continue;
// Skip generated bricks
if(%nextBrick.generated)
continue;
//Check trust
if(!ndTrustCheckSelect(%nextBrick, %group, %bl_id, %admin))
{
@ -456,6 +476,10 @@ function ND_Selection::startStackSelectionAdditive(%this, %brick, %direction, %l
if(%queueCount >= %brickLimit)
continue;
// Skip generated bricks
if(%nextBrick.generated)
continue;
//Check trust
if(!ndTrustCheckSelect(%nextBrick, %group, %bl_id, %admin))
{
@ -570,6 +594,10 @@ function ND_Selection::tickStackSelection(%this, %direction, %limited, %heightLi
if(%queueCount >= %brickLimit)
continue;
// Skip generated bricks
if(%nextBrick.generated)
continue;
//Check trust
if(!ndTrustCheckSelect(%nextBrick, %group, %bl_id, %admin))
{
@ -603,6 +631,10 @@ function ND_Selection::tickStackSelection(%this, %direction, %limited, %heightLi
if(%queueCount >= %brickLimit)
continue;
// Skip generated bricks
if(%nextBrick.generated)
continue;
//Check trust
if(!ndTrustCheckSelect(%nextBrick, %group, %bl_id, %admin))
{
@ -652,6 +684,10 @@ function ND_Selection::tickStackSelection(%this, %direction, %limited, %heightLi
if(%queueCount >= %brickLimit)
continue;
// Skip generated bricks
if(%nextBrick.generated)
continue;
//Check trust
if(!ndTrustCheckSelect(%nextBrick, %group, %bl_id, %admin))
{
@ -883,6 +919,10 @@ function ND_Selection::tickBoxSelectionChunk(%this, %limited, %brickLimit)
continue;
}
// Skip generated bricks
if(%obj.generated)
continue;
//Check trust
if(!ndTrustCheckSelect(%obj, %group, %bl_id, %admin))
{

View File

@ -8,9 +8,9 @@ function ndRegisterKeybinds() {
$RemapDivision[$RemapCount] = "New Duplicator";
$RemapName[$RemapCount] = "Copy Selection (Ctrl C)";
$RemapCmd[$RemapCount] = "ndInputCopy";
$RemapCount++;
//$RemapName[$RemapCount] = "Copy Selection (Ctrl C)";
//$RemapCmd[$RemapCount] = "ndInputCopy";
//$RemapCount++;
//$RemapName[$RemapCount] = "Paste Selection (Ctrl V)";
//$RemapCmd[$RemapCount] = "ndInputPaste";
//$RemapCount++;
@ -104,7 +104,7 @@ function clientCmdNdEnableKeybinds(%bool)
//Input handlers
function ndInputNewDuplicator (%bool) {if(!%bool)return; commandToServer('newDuplicator' );}
function ndInputCopy (%bool) {if(!%bool)return; commandToServer('ndCopy' );}
//function ndInputCopy (%bool) {if(!%bool)return; commandToServer('ndCopy' );}
//function ndInputPaste (%bool) {if(!%bool)return; commandToServer('ndPaste' );}
function ndInputCut (%bool) {if(!%bool)return; commandToServer('ndCut' );}
function ndInputFillWrench (%bool) {if(!%bool)return; commandToServer('fillWrench' );}

View File

@ -269,11 +269,14 @@ package NewDuplicator_Server_Final
//Planting the ghost brick (default: numpad enter)
function serverCmdPlantBrick(%client)
{
if(%client.ndModeIndex)
if(%client.ndModeIndex) {
%client.ndMode.onPlantBrick(%client);
else
if(isObject(%client.player))
%client.player.playThread(3, plant);
} else {
parent::serverCmdPlantBrick(%client);
}
}
//Removing the ghost brick (default: numpad 0)
function serverCmdCancelBrick(%client)
@ -291,11 +294,11 @@ package NewDuplicator_Server_Final
///////////////////////////////////////////////////////////////////////////
//Copy selection (ctrl c)
function serverCmdNdCopy(%client)
{
if(%client.ndModeIndex)
%client.ndMode.onCopy(%client);
}
//function serverCmdNdCopy(%client)
//{
// if(%client.ndModeIndex)
// %client.ndMode.onCopy(%client);
//}
//Paste selection (ctrl v)
//function serverCmdNdPaste(%client)

View File

@ -19,10 +19,10 @@ function NewDuplicatorMode::onRotateBrick(%this, %client, %direction){}
function NewDuplicatorMode::onPlantBrick(%this, %client){}
function NewDuplicatorMode::onCancelBrick(%this, %client){}
function NewDuplicatorMode::onCopy(%this, %client)
{
ndmessageClient(%client, '', "\c6Copy can not be used in your current duplicator mode.");
}
//function NewDuplicatorMode::onCopy(%this, %client)
//{
// ndmessageClient(%client, '', "\c6Copy can not be used in your current duplicator mode.");
//}
//function NewDuplicatorMode::onPaste(%this, %client)
//{