-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add optional built building count to recipe rows #118
Open
Saklad5
wants to merge
5
commits into
ShadowTheAge:master
Choose a base branch
from
Saklad5:built-amount
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This variable, which defaults to null, can be used to track the number of buildings that have actually been built. This number has no impact on the model.
Dropdown menu items for setting or clearing the builtBuildings value have been added for each recipe row. These items mirror the behavior and implementation of those for fixedBuildings, for the most part. The initial value is buildingCount rounded up, or 0 if buildingCount is negative. As 0 is a valid value, clearing builtBuildings returns it to null. Shopping lists now use the builtBuildings value instead of buildingCount if the former is not null.
The text field is only visible if builtBuildings is not null, and is placed under the building count. It is colored grey to indicate that it is not playing a role in the model.
If the number of buildings needed for the model's solution is greater than the specified number of built buildings, the recipe will now be flagged accordingly. This makes it substantially easier to determine which recipes need to be revisited if a change is made.
To make issues more apparent, the entire page now displays an error message (like with deadlocks) if a recipe needs more machines than it currenty has built.
shpaass
added a commit
to shpaass/yafc-ce
that referenced
this pull request
Feb 6, 2024
This PR extends PR ShadowTheAge#118 by @Saklad5 (their commits were rebased for YAFC-CE) Users can now specify the actual number of buildings that are built for a recipe. This has no impact on the model itself, but makes it easier to tell if existing infrastructure needs to be revisited following a change. A certain amount of surplus production capacity is almost always necessary, whether to futureproof, maintain belt balance, maximize beacon utility, or because demand is met by a non-integral number of machines. With this feature, that surplus can be tracked even if the recipe is linked. My own addition is to make the check recursive so it shows the error on the top recipe and all subgroups until the actual recipe that has not enough buildings. ![image](https://github.com/have-fun-was-taken/yafc-ce/assets/171827/2b202499-3f5f-4ae6-8a8f-88e60a34169a) You can see that `Tree seedling` requires 1.04 build instead of the 1 I have. The parent group (`Wood`) also has the exclamation mark and error message. And the sheet itself shows a red error box with the message as well. (not visible in the screenshot). This makes lack of buildings more clear, compared when they are hidden in multiple nested groups deep.
DaleStan
referenced
this pull request
in DaleStan/yafc
May 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Users can now specify the actual number of buildings that are built for a recipe. This has no impact on the model itself, but makes it easier to tell if existing infrastructure needs to be revisited following a change.
A certain amount of surplus production capacity is almost always necessary, whether to futureproof, maintain belt balance, maximize beacon utility, or because demand is met by a non-integral number of machines. With this feature, that surplus can be tracked even if the recipe is linked.