Final Working Version
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -16,7 +16,7 @@
|
|||||||
/typings
|
/typings
|
||||||
|
|
||||||
# Screeps Config
|
# Screeps Config
|
||||||
screeps.json
|
.screeps.yml
|
||||||
|
|
||||||
# ScreepsServer data from integration tests
|
# ScreepsServer data from integration tests
|
||||||
/server
|
/server
|
||||||
|
|||||||
16
.screeps.example.yml
Normal file
16
.screeps.example.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
servers:
|
||||||
|
main:
|
||||||
|
host: screeps.com
|
||||||
|
secure: true
|
||||||
|
token: {TOKEN}
|
||||||
|
ptr:
|
||||||
|
host: screeps.com
|
||||||
|
secure: true
|
||||||
|
token: {TOKEN}
|
||||||
|
ptr: true
|
||||||
|
|
||||||
|
|
||||||
|
configs:
|
||||||
|
screepsconsole:
|
||||||
|
maxHistory: 20000
|
||||||
|
maxScroll: 20000
|
||||||
@@ -3,8 +3,10 @@
|
|||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"format": "prettier --config .prettierrc 'src/**/*.ts' --write && eslint --fix src/",
|
"build": "node esbuild.config.mjs",
|
||||||
"build": "node esbuild.config.mjs"
|
"push:main": "npm run build && screeps-api --server main upload dist/*",
|
||||||
|
"push:sim": "npm run build && screeps-api --server main upload --branch sim dist/*",
|
||||||
|
"format": "prettier --config .prettierrc 'src/**/*.ts' --write && eslint --fix src/"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -42,6 +44,7 @@
|
|||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"mocha": "^11.7.1",
|
"mocha": "^11.7.1",
|
||||||
"prettier": "^3.6.2",
|
"prettier": "^3.6.2",
|
||||||
|
"screeps-api": "^1.7.2",
|
||||||
"shelljs": "^0.10.0",
|
"shelljs": "^0.10.0",
|
||||||
"sinon": "^21.0.0",
|
"sinon": "^21.0.0",
|
||||||
"sinon-chai": "^4.0.0",
|
"sinon-chai": "^4.0.0",
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
{
|
|
||||||
"main": {
|
|
||||||
"token": "YOUR_TOKEN",
|
|
||||||
"protocol": "https",
|
|
||||||
"hostname": "screeps.com",
|
|
||||||
"port": 443,
|
|
||||||
"path": "/",
|
|
||||||
"branch": "main"
|
|
||||||
},
|
|
||||||
"sim": {
|
|
||||||
"token": "YOUR_TOKEN",
|
|
||||||
"protocol": "https",
|
|
||||||
"hostname": "screeps.com",
|
|
||||||
"port": 443,
|
|
||||||
"path": "/",
|
|
||||||
"branch": "sim"
|
|
||||||
},
|
|
||||||
"season": {
|
|
||||||
"token": "YOUR_TOKEN",
|
|
||||||
"protocol": "https",
|
|
||||||
"hostname": "screeps.com",
|
|
||||||
"port": 443,
|
|
||||||
"path": "/season",
|
|
||||||
"branch": "main"
|
|
||||||
},
|
|
||||||
"pserver": {
|
|
||||||
"email": "username",
|
|
||||||
"password": "Password",
|
|
||||||
"protocol": "http",
|
|
||||||
"hostname": "1.2.3.4",
|
|
||||||
"port": 21025,
|
|
||||||
"path": "/",
|
|
||||||
"branch": "main"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -41,4 +41,5 @@ declare global {
|
|||||||
// });
|
// });
|
||||||
export const loop = () => {
|
export const loop = () => {
|
||||||
console.log(`Current game tick is ${Game.time}`);
|
console.log(`Current game tick is ${Game.time}`);
|
||||||
|
console.log(`Current game CPU is ${Game.cpu.getUsed()}`);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es2018",
|
"target": "es2018",
|
||||||
"lib": ["es2018"],
|
"lib": ["es2018", "dom"],
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
|
|||||||
Reference in New Issue
Block a user