Skip to content

Conversation

@htmlcsjs
Copy link
Member

What

Add the ability for spray cans to mass colour pipenets when shift-clicked, up until a branch

Implementation Details

When the player is crouching and holding a spraycan over a pipe, the machine grid is show, which allows for the player to select which direction to colour. This is achieved

Outcome

The player can now colour pipes in a build nicer

Additional Information

2024-01-30.18-35-01.mp4

Potential Compatibility Issues

hasPipeCollisionChangingItem in BlockPipe now takes a nullable entity but an overload was added to retain compatability

@htmlcsjs htmlcsjs added the type: feature New feature or request label Jan 30, 2024
@htmlcsjs htmlcsjs requested a review from a team as a code owner January 30, 2024 19:21
boolean painted = false;
while (connectedTe instanceof IPipeTile<?, ?>connectedPipe && count < MAX_PIPE_TRAVERSAL_LENGTH) {
if (connectedPipe.getPaintingColor() != (this.color == null ? -1 : this.color.colorValue)) {
connectedPipe.setPaintingColor(this.color == null ? -1 : this.color.colorValue);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The color is already null checked in the constructor, so I don't think it needs to be done here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isnt this.color null for solvent spray?
the null check in the constructor is for the colour of the durability gradient

Copy link
Contributor

@ALongStringOfNumbers ALongStringOfNumbers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, this is off by 1 one use. If I have a spray can with 3 uses remaining, it paints 4 pipes.

For a spraycan with 1 use left, it walks once in each connected pipe direction

Zorbatron added a commit that referenced this pull request Aug 5, 2025
@Zorbatron
Copy link
Member

Superseded by #2858

@Zorbatron Zorbatron closed this Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants