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

Unable to set workflow quantity of quarry bush leaves #524

Open
drakesiard opened this issue Feb 1, 2015 · 2 comments
Open

Unable to set workflow quantity of quarry bush leaves #524

drakesiard opened this issue Feb 1, 2015 · 2 comments
Labels

Comments

@drakesiard
Copy link

Setup: Vanilla df 0.40.24 and dfhack 0.40.24-r1
To reproduce:

  1. Create a "Process plant to bag" task at a Farmer's Workshop.
  2. Use the workshop-job plugin to change the material to "quarry bush plant"
  3. Try to set a range constraint using the workflow plugin
    Note that quarry bush leaves are not in the list of possible outputs.

I assume this was broken by the plant part rewrite.

@expwnent expwnent added the bug label Feb 1, 2015
@cdombroski
Copy link
Contributor

This is because workflow does not understand GET_ITEM_DATA_FROM_REAGENT token used in the reaction. No idea if it's fixable or not, but changing the reaction provides a workaround (assuming you only want to process quarry bushes to bags and not any other future processable plants):

[REACTION:PROCESS_PLANT_TO_BAG]
    [NAME:process plant to bag]
    [BUILDING:FARMER:CUSTOM_B]
    [REAGENT:plant:1:PLANT:NONE:PLANT_MAT:BUSH_QUARRY:STRUCTURAL]
        [UNROTTEN]
    [REAGENT:bag:1:BOX:NONE:NONE:NONE]
        [EMPTY]
        [BAG]
        [PRESERVE_REAGENT]
        [DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
    [PRODUCT:100:5:PLANT_GROWTH:LEAVES:PLANT_MAT:BUSH_QUARRY:LEAF]
        [PRODUCT_TO_CONTAINER:bag]
    [PRODUCT:100:1:SEEDS:NONE:GET_MATERIAL_FROM_REAGENT:plant:SEED_MAT]
    [SKILL:PROCESSPLANTS]

@KlonZK
Copy link
Contributor

KlonZK commented Jul 26, 2018

more specifically, the item type selection dialog used by workflow is implemented in the materials plugin, which uses dfhack.items.getSubtypeCount() to find the number of subtypes for a given type of item. however the function returns -1 for the type PLANT_GROWTH.

afaik to find the actual subtypes for the plant_growths one has to browse through the complete list of plant raws. if the plant material is known finding the growth is simple, but the item type dialog doesnt know about materials.

@myk002 myk002 removed the workflow label Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants