Create

Create

86M Downloads

Feature Request for Deployers on Contraptions: Repeat Schematic

nirp-s opened this issue ยท 0 comments

commented

Describe the Suggestion

"Repeat Schematic" would be a new mode for deployers on contraptions. The basic idea is that schematics function normally as they do now, placing the blocks in the positions laid out in the schematic, but instead of placing nothing outside the bounds of the schematic, they repeat the schematic infinitely throughout the world relative to the schematic's initial position.

Currently, the logic used by deployers to find the block to place at deployer.worldPosition goes something like this:

schematic.getBlock(deployer.worldPosition-schematic.worldPosition)

With repeat mode, the block to be placed would instead be found with this logic:

schematic.getBlock((deployer.worldPosition-schematic.worldPosition)%schematic.size)
(needs special handling for negative values to ensure that schematics repeat properly in the north, west, and down directions)

Instead of going out of bounds by asking for coordinates below 0 or above the length, height, or width, the requested coordinates just constantly loop through the schematic in every direction.

The only question is how the mode is implemented, which could be a setting on the deployers or some kind of contraption control that scrolls through options like elevator controls can, instead of the basic binary contraption controls that only allow toggling actors on/off.

Screenshots and Videos

No response

Additional Context

This system would have many uses, mainly for automatically decorating tunnels with complex designs by giving the deployers a single schematic. It is already possible with some convoluted methods to repeat basic block patterns, but this feature is necessary for quickly decorating tunnels with complex designs. The schematic could be some tiny area like 10x10 blocks laid out in any number of complex patterns desired for decoration. When repeated, this one small schematic lays out the blocks to be placed across thousands of blocks worth of tunnels. If all tunnels in a system line up in a perfectly regular grid that matches the schematic size, an entire world's tunnels could be decorated with just 2 schematics, one for north/south tunnels and one for east/west tunnels. All that would remain is decorating turns and intersections.