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

Overmind completes its own terminal orders #202

Open
GrimReaper2654 opened this issue Sep 22, 2021 · 0 comments
Open

Overmind completes its own terminal orders #202

GrimReaper2654 opened this issue Sep 22, 2021 · 0 comments

Comments

@GrimReaper2654
Copy link

Issue summary

Overmind is selling energy to itself.

Description of issue:

I created a buy order for energy since my colony had little energy and overmind decided to sell energy to itself.
Screen Shot 2021-09-22 at 2 45 40 pm
The problem is somewhere around here

                let energyThreshold = Energetics.settings.terminal.energy.outThreshold;
                if (terminalNearCapacity) { // if you're close to full, be more agressive with selling energy
                    energyThreshold = Energetics.settings.terminal.energy.equilibrium;
                }
                if (terminal.store[RESOURCE_ENERGY] > 200000) {
                    if (terminalNearCapacity) { // just get rid of stuff at high capacities
                        let response = Overmind.tradeNetwork.sellDirectly(terminal, RESOURCE_ENERGY, 10000, true);
                        if (response == OK)
                            return;
                    }
                    else if (energyOrders.length < 0) {
                        let response = Overmind.tradeNetwork.sell(terminal, RESOURCE_ENERGY, 50000);
                        if (response == OK)
                            return;
                    }
                }

Steps to reproduce:

Create buy order for energy when you have some energy in the terminal.

Suggested fix (optional):

add something that checks if the order is yours.

Other information:

  • Overmind version: newest version
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