Skip to content

Conversation

@TrollyLoki
Copy link
Contributor

@TrollyLoki TrollyLoki commented Feb 10, 2025

This pull request allows crafts to be repaired regardless of their current orientation. Every possible placement of both wall signs and "floor" signs should work.

Note that it is no longer possible to precalculate schematic coordinates since the schematic will be rotated differently depending on the sign used.

@DerToaster98
Copy link

How will this behave if a craft has multiple repair signs that face different directions?

@TrollyLoki
Copy link
Contributor Author

TrollyLoki commented Feb 10, 2025

How will this behave if a craft has multiple repair signs that face different directions?

Multiple repair signs with different repair states don't affect each other at all since they use different schematics. I actually had two signs like this when I was testing it and I could use them interchangeably just fine.

Multiple repair signs using the same repair state never worked as far as I know (and still don't) since there's no way to know which sign saved the schematic.

@TylerS1066
Copy link
Contributor

Note that it is no longer possible to precalculate schematic coordinates since the schematic will be different depending on the sign used.

Can you elaborate on this point? The schematic should not be changed depending on what rotation or state of the sign is used.

@TrollyLoki
Copy link
Contributor Author

Note that it is no longer possible to precalculate schematic coordinates since the schematic will be different depending on the sign used.

Can you elaborate on this point? The schematic should not be changed depending on what rotation or state of the sign is used.

The schematic is not changed permanently, but when the "clipboard" is rotated to align with the craft its dimensions and coordinates change. Any precalculated values would have to be rotated along with it which in my mind defeats the point of precalculating them in the first place.

Fixes an edge case that occurred if a repair sign was precisely on the craft's center of rotation. The issue occurred if a player right-clicked the sign once, rotated the craft, and then right-clicked the sign again in quick succession. This caused the repair to begin as if the craft had not been rotated.
@DerToaster98
Copy link

Note that it is no longer possible to precalculate schematic coordinates since the schematic will be different depending on the sign used.

Can you elaborate on this point? The schematic should not be changed depending on what rotation or state of the sign is used.

Pretty much what was mentioned. A craft that has the same repair sign (as in same "snapshot" name) in different positions of the ship.

@TylerS1066
Copy link
Contributor

Pretty much what was mentioned. A craft that has the same repair sign (as in same "snapshot" name) in different positions of the ship.

This behavior has not and never will be supported by Repair. It uses the repair sign location as the origin of the repair state.

@TylerS1066 TylerS1066 merged commit d471e1e into APDevTeam:main Mar 16, 2025
2 checks passed
@TrollyLoki TrollyLoki deleted the repair-state-rotation branch April 26, 2025 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants