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

Rotator always rotates #45

Open
Curlychump opened this issue Aug 1, 2024 · 0 comments
Open

Rotator always rotates #45

Curlychump opened this issue Aug 1, 2024 · 0 comments

Comments

@Curlychump
Copy link

If a rotator (spinner) drawer is added it will always spin, regardless of status.

Code attached

 acidmixer = new MultiCrafter("Acid Mixer"){{
        hasPower = solid = hasLiquids = hasItems = true;
        isConsumePower = true;
        description = ("A Mixer made of materials capable of holding strong acids, making it suitable to mix acids.");
        rotate = false;
        size = 3;
        consumePower(2f);
        envEnabled = Env.any;
        drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawLiquidTile(Liquids.water), new DrawLiquidTile(clabLiquids.sAcid), new DrawRegion("-base"), new DrawRegion("-rotator"){{
            spinSprite = true;
            rotateSpeed = 4f;
        }});
        requirements(Category.crafting, with(clabItems.weldedframe, 100, clabItems.steel, 50, Items.silicon, 25, Items.titanium, 50));
        resolvedRecipes = Seq.with(
            new Recipe(
                //IOEntry input: this recipe's input goes here
                new IOEntry(
                    //input items go here (can be empty if you wish to use fluids only)
                    Seq.with(ItemStack.with(clabItems.sulfur, 5)),
                    //input fluids go here (there are no fluids required so this is empty)
                    Seq.with(LiquidStack.with(Liquids.water, 100f)),
                    5f
                ),
                //IOEntry output: this recipe's output goes here
                new IOEntry(
                    //output items
                    Seq.with(),
                    //output fluids, again, it can be empty
                    Seq.with(LiquidStack.with(clabLiquids.sAcid, 100f))
                ),
                //float craftTime: self-explanatory. measured in ticks
                60f
            ),
            new Recipe(
                //IOEntry input: this recipe's input goes here
                new IOEntry(
                    //input items go here (can be empty if you wish to use fluids only)
                    Seq.with(ItemStack.with()),
                    //input fluids go here (there are no fluids required so this is empty)
                    Seq.with(LiquidStack.with(clabLiquids.nitrogen, 10f, clabLiquids.oxygen, 20f)),
                    5f
                ),
                //IOEntry output: this recipe's output goes here
                new IOEntry(
                    //output items
                    Seq.with(),
                    //output fluids, again, it can be empty
                    Seq.with(LiquidStack.with(clabLiquids.nAcid, 100f/20f))
                ),
                //float craftTime: self-explanatory. measured in ticks
                60f
            ));
    }};
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

No branches or pull requests

1 participant