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

fixed: mineral handling #703

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mschultheiss83
Copy link
Contributor

moved handleReaction to prototype_room_mineral.js
added Room.prototype.getEnergy

moved handleReaction to prototype_room_mineral.js
added Room.prototype.getEnergy
Copy link
Owner

@TooAngel TooAngel left a comment

Choose a reason for hiding this comment

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

🎉 I like to see, that there is progress on mineral handling and boosting.

Left some smaller comments. I need a bit more time to review and understand it fully.

src/prototype_room_mineral.js Outdated Show resolved Hide resolved
src/prototype_room_mineral.js Show resolved Hide resolved
src/prototype_room_mineral.js Show resolved Hide resolved
src/prototype_room_my.js Show resolved Hide resolved
- reduce findMyCreepsOfRole
- remove duplicate if's
- fast return
mschultheiss83 added a commit to mschultheiss83/screeps that referenced this pull request Feb 26, 2023
- buyEnergy if we have terminals and storage, mineral creeps should move energy to storage for builders and upgrader sell PR TooAngel#703
- fixed quests.js for incoming transactions
@mschultheiss83
Copy link
Contributor Author

basically thats the first part of mineral getting back to work

Copy link
Owner

@TooAngel TooAngel left a comment

Choose a reason for hiding this comment

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

The builder logic should be improved. This rest is hopefully fine :-)

src/prototype_room_my.js Show resolved Hide resolved
if (lab0 === null || lab1 === null || lab2 === null) {
delete this.memory.reaction;
return false;
} else {
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
} else {
}

(move the } up)
The if clause ends with a return. It is a bit easier to read.

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

Successfully merging this pull request may close these issues.

2 participants