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

realistic limits for combine #897

Merged
merged 16 commits into from
Nov 20, 2023

Conversation

silverflyone
Copy link
Contributor

Refer to #852.
Implemented reduced stack sizes.

Copy link
Member

@myk002 myk002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Could you delete the commented-out lines? I don't think we're going to need them again.

Also, looks like some leftover print statements in the unlimited stacks fn

edit: also needs changelog entry

combine.lua Outdated
local function unlimited_stacks(types)
log(4, 'Unlimited stacks\n')

if opts.unlimited_stack then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be cleaner/clearer if this if statement guarded the call to this function in populate_stacks instead of the body here

combine.lua Outdated
@@ -738,6 +758,7 @@ local function parse_commandline(opts, args)
{'t', 'types', hasArg=true, handler=function(optarg) opts.types=parse_types_opts(optarg) end},
{'d', 'dry-run', handler=function() opts.dry_run = true end},
{'q', 'quiet', handler=function() opts.quiet = true end},
{'u','unlimited-stack',handler=function() opts.unlimited_stack = true end},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs documenting in the rst file

@silverflyone
Copy link
Contributor Author

pre-commit.ci autofix

@silverflyone
Copy link
Contributor Author

@myk002 I've yet to complete the container volume allocations, but have put in the capture of the container volumes, as well as the item volumes.

Yet to update the update log file.

I've done the other review comments. Let me know if there are other changes needed.

@myk002
Copy link
Member

myk002 commented Nov 19, 2023

I saw that about the container volumes. I figured that would be completed in a later PR. The stack size limits in this PR is already good progress.

Copy link
Member

@myk002 myk002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit concerned about the -u flag. As currently written, combine all -u will have negative consequences.

I suggest one of the following:

  1. Change unlimited to a custom maximum
  2. Change seeds to only act on non-plantable seeds and change default size to 5
  3. Change body parts to teeth and change default size to 20

OR

Remove -u, corpse parts, and seeds from combine for now and implement the first option later

I'm thinking the second option would be best, given the short timeframe for -r4 (and I really want to get the max stack size changes at least into -r4)

docs/combine.rst Outdated

``parts``: CORPSEPIECE
``parts``: CORPSEPIECE. Max 1.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can corpsepiece be removed from this list if the max stack size is 1?

Edit: oh I see, it's still useful for -u.

Would this be more useful in general if it just handled teeth and the default stack size was large?

docs/combine.rst Outdated

``seed``: SEEDS
``seed``: SEEDS. Max 1.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be 5 if we filter for only non-plantable seeds. Also, we really should filter for non-plantable seeds or else -u could destroy farming

@silverflyone
Copy link
Contributor Author

Okay, I'll pull those out into another later branch.

What is the timing for the next release?

I'll take out corpse and seeds until I can figure out how to do non plantable seeds and teeth.

@myk002
Copy link
Member

myk002 commented Nov 20, 2023

Next release maybe this coming Thursday. Cuz DFHack/dfhack#4040

@silverflyone
Copy link
Contributor Author

Yeah that's close. I'll have a look at it tonight.

@silverflyone
Copy link
Contributor Author

pre-commit.ci autofix

@silverflyone
Copy link
Contributor Author

@myk002 I've reverted back to the realistic combine. Not sure why the pre-commit.ci isn't working. I'm heading to bed now. can have another look tomorrow evening.

@silverflyone
Copy link
Contributor Author

pre-commit.ci autofix

combine.lua Outdated Show resolved Hide resolved
@myk002 myk002 merged commit 64db4d9 into DFHack:master Nov 20, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants