Final Working Version

This commit is contained in:
2025-07-05 18:09:35 -03:00
parent 3e9851a2c9
commit 996578de85
6 changed files with 24 additions and 39 deletions

2
.gitignore vendored
View File

@@ -16,7 +16,7 @@
/typings
# Screeps Config
screeps.json
.screeps.yml
# ScreepsServer data from integration tests
/server

16
.screeps.example.yml Normal file
View 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

View File

@@ -3,8 +3,10 @@
"version": "3.0.0",
"description": "",
"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": {
"type": "git",
@@ -42,6 +44,7 @@
"lodash": "^4.17.21",
"mocha": "^11.7.1",
"prettier": "^3.6.2",
"screeps-api": "^1.7.2",
"shelljs": "^0.10.0",
"sinon": "^21.0.0",
"sinon-chai": "^4.0.0",

View File

@@ -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"
}
}

View File

@@ -41,4 +41,5 @@ declare global {
// });
export const loop = () => {
console.log(`Current game tick is ${Game.time}`);
console.log(`Current game CPU is ${Game.cpu.getUsed()}`);
};

View File

@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "es2018",
"lib": ["es2018"],
"lib": ["es2018", "dom"],
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist",