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

Support for bots that don't auto spawn #10

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ module.exports = {
"endOfLine": "auto"
},
],
"indent": ["error", 4]
"indent": ["error", 2]
}
}
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ This is a Screeps server setup that includes milestones and the [Stats mod](http
1. Create a new folder in the `bots` directory
2. Add your bot's JS files to the new folder (the entry file must be named `main.js`)
3. Update the `config.yml` file's `bots.bot` string to the path of your bot
4. Update `config.json` with the bot spawn requirements

opts properties:

* room - the room to spawn the bot into
* name - the name of a bot player from `config.yml`
* x - the X position of the spawn in the room, default is random (optional)
* y - the Y position of the spawn in the room, default is random (optional)
* auto - true/false if the bot supports auto spawning (optional)

### Run commands

Expand Down
24 changes: 12 additions & 12 deletions config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
"W2N5": "76561198092401383"
},

"rooms": {
"W1N1": "bot",
"W6N1": "bot",
"W2N5": "bot",
"W5N8": "bot",
"W7N3": "bot",
"W9N9": "bot",
"W3N9": "bot",
"W8N6": "bot",
"W3N3": "bot",
"W1N8": "bot"
},
"rooms": [
{"room":"W1N1", "name": "bot", "opts": {"x": 15, "y": 30}},
{"room":"W6N1", "name": "bot", "opts": {"auto": true }},
{"room":"W2N5", "name": "bot"},
{"room":"W5N8", "name": "bot"},
{"room":"W7N3", "name": "bot"},
{"room":"W9N9", "name": "bot"},
{"room":"W3N9", "name": "bot"},
{"room":"W8N6", "name": "bot"},
{"room":"W3N3", "name": "bot"},
{"room":"W1N8", "name": "bot"}
],

"trackedRooms": ["W1N1", "W5N8", "W7N3", "W2N5"],

Expand Down
Loading
Loading