Skip to content

Make milestone list scrollable and support more milestones#19

Merged
shpaass merged 3 commits intoYafc-CE:masterfrom
veger:scrollable-milestone-view-ce
Feb 7, 2024
Merged

Make milestone list scrollable and support more milestones#19
shpaass merged 3 commits intoYafc-CE:masterfrom
veger:scrollable-milestone-view-ce

Conversation

@veger
Copy link
Copy Markdown
Collaborator

@veger veger commented Feb 7, 2024

By embedding the milestone elements in a (virtual) scroll list, it will be possible to scroll them, which lifts the restriction of only allowing 60 milestones.

Background: when playing extensive mod packs with lots of new/unknown technologies it is often hard to determine the research path to take. I find it convenient to add a lot (all) technologies to the milestone list, so YAFC shows which technologies I should research to unlock some item/recipe.

This PR also fixes the original (probable) reason for this limitation: ulong can only hold 64 bits, and the Analyser uses bits to keep track of the dependencies of the milestones (and other objects). By replacing ulong with the custom build Bits class, this limitation is lifted.

To be more confident that I did not break things, I first added a (simple) test suite for milestones. Then applied the changes and with minimal changed (had to use the Bits class now) the test suite still runs properly.
Additionally, I made these changes more than a year ago (ShadowTheAge#203) and have been playing with loads/all (!) technologies of Pyanodons added to the milestones without issues:

image

Note that these (open) PRs are very convenient combined with this feature:

I'll open PRs for these features after this one (to keep the list of open PRs reasonable)

veger added 3 commits February 7, 2024 13:08
Introduces a Bits class that is able to handle a dynamic amount of bits,
instead of the 64 bits stored in the ulong.
Comment thread YAFCmodel.Tests/Analysis/Milestones.cs
Comment thread YAFC/Widgets/ObjectTooltip.cs
@shpaass shpaass merged commit deec621 into Yafc-CE:master Feb 7, 2024
@veger veger deleted the scrollable-milestone-view-ce branch February 7, 2024 20:47
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.

2 participants