-
Notifications
You must be signed in to change notification settings - Fork 205
Pipe colouring #2368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pipe colouring #2368
Conversation
| 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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
src/main/java/gregtech/common/items/behaviors/ColorSprayBehavior.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/common/items/behaviors/ColorSprayBehavior.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/common/items/behaviors/ColorSprayBehavior.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/common/items/behaviors/ColorSprayBehavior.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/common/items/behaviors/ColorSprayBehavior.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/common/items/behaviors/ColorSprayBehavior.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/common/pipelike/PipeCollectorWalker.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/common/pipelike/PipeCollectorWalker.java
Outdated
Show resolved
Hide resolved
ALongStringOfNumbers
left a comment
There was a problem hiding this 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
|
Superseded by #2858 |
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
hasPipeCollisionChangingIteminBlockPipenow takes a nullable entity but an overload was added to retain compatability