I didn't found anyone mention this, but I came to note that you're doing onRelay[direction] manually in classes/server/selection.cs:2358, but there was nothing that handles direction in event output parameters: setItemDirection, setEmitterDirection, spawnProjectile and my own fireRelayNum, to name a few. It shouldn't be that hard to add. In fact, in a short time I made my own version for fireRelayNum which should be quite easy to add for default add-ons at least and then each modder will do their own addition for their mods:
// Handle New Duplicator
function ND_Selection::plantBrick(%this, %i, %position, %angleID, %brickGroup, %client, %bl_id)
{
%brick = Parent::plantBrick(%this, %i, %position, %angleID, %brickGroup, %client, %bl_id);
// Handle error
if (%brick <= 0)
return %brick;
// Locate our event
for (%n = 0; %n < %brick.numEvents; %n++)
{
if (%brick.eventOutput[%n] !$= "fireRelayNum")
continue;
// Get direction and normalize it
%dir = %brick.eventOutputParameter[%n, 2] - 1;
if (%dir >= 0)
{
if (%dir >= 2)
{
if (%this.ghostMirrorX && %dir % 2 == 1 || %this.ghostMirrorY && %dir % 2 == 0)
%dir += 2;
%dir = (%dir + %angleID - 2) % 4 + 2;
}
else if (%this.ghostMirrorZ)
%dir = !%dir;
// Put direction back as it was
%brick.eventOutputParameter[%n, 2] = %dir + 1;
}
}
return %brick;
}
I also found out that if you've a named brick as target and if that brick is not in the duplication, it will still change direction. In some cases this is not a desired feature.
I like this new tool. Just came around recently to test it.