-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
Rework adjacency connectors and make them work #1274
Rework adjacency connectors and make them work #1274
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Don't forget to update x6 from SteelWindow for SteelWindowReinforced |
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.
You forgot to link a material to the .fbx you added.
Go to DisposalPipes.fbx in Unity and look at the inspector window:
Set the correct materials, in this instance you just need to set Palette05 to use the Palette material. MAKE SURE TO HIT APPLY.
If you do not set these, it imports the material from the model file which we end up with copies of material files in the project for no reason.
@@ -13,11 +13,14 @@ public enum TileLayer | |||
Turf, | |||
Wire, | |||
Disposal, | |||
Pipes, | |||
PipeSurface, |
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.
Should probably group all 4 pipe lines, instead of having 1 separated. Prevents confusion.
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 issue with unity and enums is that when you modify the order in the enum, Unity gets confused with the enums you registerer in editor. I did not put them together because I was afraid to break something. It's probably not much change but that means retesting a lot of stuff, can we do a separate PR for that ? If you insist I will change it though.
@@ -445,7 +445,10 @@ public void OnDropDownChange() | |||
{ | |||
TileLayer.Wire, | |||
TileLayer.Disposal, | |||
TileLayer.Pipes | |||
TileLayer.PipeLeft, | |||
TileLayer.PipeRight, |
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.
Indentation
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.
done
Summary
The will to have a single script to handle all connectors led to hard to understand, unmaintainable and partly broken code.
This PR tries to simplify the mess by having multiple small scripts for different kind of connectors.
It's also making some old connectors work back, those who were working on the old branch.
Pictures/Videos (optional)
2023-11-02.12-32-53.mp4
Changes to Files
Technical Notes (optional)
Currently, adjacency connecting is mostly handled by MultiAdjacencyConnector, and it's a big mess. The approach "One script to rule them all" doesn't work well here, we have too many connectors with their own unique behavior. The idea is to to create a new connector each time we have a singular behavior, instead of adding cases to the multiAdjacencyConnector.
The IAdjacencyConnector interface has been expanded to cover for the needs of most connectors.
In particular, connectors are now responsible for getting their own neighbours. This is because the definition of neighbours can highly vary from one connector to another. e.g : disposal pipe connectors consider that disposal furnitures are a neighbour if it is directly above them.
Known issues
missing mesh for steel reinforced windows and walls, the X6 mesh. replaced for now with the X5.Fixes (optional)
closes Proper Airlock Tilemap Integration #1106
fixes advanced adjacency (some X position were broken)
fixes edge case with walls all around a door, displaying some visible transparent side next to the door.
fixes offset pipe connections
add working disposal pipe vertical connections. Vertical pipe connect only to disposal pipe in front of them.
fixes plenum covers
TODO