Skip to content
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

Changes made to the starmap screen fleet arrows #1086

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

hemoridos
Copy link
Contributor

@hemoridos hemoridos commented Oct 5, 2023

  • Replaced the line drawn between fleets and it's targets with a arrow similar to the one in the original.
  • Changed the color of the movement arrow to be the same as the original.
  • Increased the line's thickness to 1.5 for better visibility.

Fixed some java8 related compiler issue.

Attached some pictures of the new arrows and one with the original.
The arrow does not scale with zooming in or out.
Original IG:
arrow_original
Changed in open-IG:
arrow_arrow_zoomed_out
arrow_attack
arrow_move
arrow_waypoint

 - Replaced the line drawn between fleets and it's targets with a arrow similar to the one in the original.
 - Changed the color of the movement arrow to be the same as the original.
 - Inreased the line's thickness to 1.5 for better visibility.

Fixed some java8 related compiler issue.
@akarnokd
Copy link
Owner

akarnokd commented Oct 6, 2023

Why did you need that Java 8 change?

@hemoridos
Copy link
Contributor Author

Apparently since java8 these method signatures are considered ambiguous and the compiler throws an error about it:
public void add(Trait t) public void add(Iterable<? extends Trait> ts)

The problematic method call is here in SkirmishDefinition,java:56:
sp.traits.addAll(traits.trait(xtrait.get("id")));
When the compiler sees the generic type returned by the traits.trait method, for some reason it also matches it with the generic parameter in public void add(Iterable<? extends Trait> ts)

The jdk I used is the one bundled with eclipse. jdk-17.0.8.101

@hemoridos
Copy link
Contributor Author

Added a commit without typecasting. Simply changed the add(Iterable...) to addAll(iterable...)

@akarnokd akarnokd merged commit d4a3e06 into akarnokd:master Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants