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

Build baseline #206

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0017256
.editorconfig
tiennou Aug 3, 2023
c6e5b62
.tool-versions
tiennou Aug 4, 2023
7037fd6
Cleanup .gitignore
tiennou Sep 10, 2023
f9facc7
Check room status when selecting rooms in RandomWalkerScoutOverlord
tiennou Aug 3, 2023
94d6456
Only plan expansion into rooms that have the same status as the colony
tiennou Aug 3, 2023
2f944a5
Check for room status when computing outpost candidates
tiennou Aug 3, 2023
5a7dbd6
Hack to get deref working again
tiennou Aug 3, 2023
45a2219
Ensure typing of exceptions in Overseer.try()
tiennou Aug 3, 2023
dda2043
Fix a few more _HasId warts
tiennou Aug 3, 2023
1a3bf4f
Fix types now that Store exist
tiennou Aug 3, 2023
661b643
Check empty memory with isEmpty instead of an object compare
tiennou Aug 3, 2023
817b471
Make Task generic over its target type
tiennou Aug 4, 2023
01851dc
Fix a type inconsistency with the superclass
tiennou Aug 4, 2023
c2142b8
Use a variable instead of deleting a mandatory property
tiennou Aug 4, 2023
61eaf71
Strict type a few Colony properties
tiennou Aug 4, 2023
b561071
TS all the prototypes
tiennou Aug 5, 2023
198d204
Strict-type the IOvermind properties
tiennou Aug 5, 2023
4a033d3
Fix the recharge task not accessing the correct property
tiennou Aug 5, 2023
db0f066
Fix getting energy from tombstones not on containers
tiennou Aug 5, 2023
9c70db8
Grab resources from ruins in the colony
tiennou Aug 5, 2023
34dec1a
Remove dead code
tiennou Aug 5, 2023
2d4caf0
Give the first hauler some priority
tiennou Aug 5, 2023
40386f1
Reassign fillers on bootstrap instead of suiciding
tiennou Aug 5, 2023
9954a10
Safe-guard the bunker-queen overlord against an invalid starting layout
tiennou Aug 5, 2023
c158599
Show more info about targets in the TransportRequestGroup summary
tiennou Aug 5, 2023
f575b60
Fix typo
tiennou Aug 5, 2023
1e0058b
Fix dismantling blockers for remote mines
tiennou Aug 5, 2023
b69d7cf
Align the logistic network summary correctly
tiennou Aug 5, 2023
dfd3486
Improve the output of the outpost efficiency commands
tiennou Aug 5, 2023
ab68173
Fix a bug that would have prevented non-move boots from being applied
tiennou Aug 5, 2023
ceb4ca0
Fix a bug that would prevent players to be detected correctly
tiennou Aug 5, 2023
4c7f6b3
Fix push priority calculation for Managers
tiennou Aug 5, 2023
07fee1b
Improve fortify response to nukes
tiennou Aug 5, 2023
364c284
Update package.json
tiennou Sep 11, 2023
266efb0
Update rollup configuration
tiennou Sep 11, 2023
98e1e06
Disable TS checking on utf15.ts
tiennou Aug 3, 2023
c51ffee
Replace types with ones from @types/screeps
tiennou Aug 3, 2023
08ba6ca
Fix enough TS issues to have it build
tiennou Aug 4, 2023
222c613
Update everything to the new Store interface
tiennou Aug 4, 2023
03d54eb
Provide an interface over store contents
tiennou Aug 4, 2023
d3f620f
Fix error in AnyZerg.move() and freezing CombatZergs
tiennou Aug 6, 2023
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
11 changes: 8 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
[*]
charset=utf-8
end_of_line=crlf
end_of_line=lf
insert_final_newline=false
indent_style=space
indent_size=4

[{.babelrc,.stylelintrc,.eslintrc,jest.config,*.json,*.jsb3,*.jsb2,*.bowerrc}]
indent_style=space
indent_size=2
end_of_line=lf
trim_trailing_whitespace=true

[{*.ats,*.ts}]
[{*.ats,*.ts,*.js}]
indent_style=tab
tab_width=4
end_of_line=lf
trim_trailing_whitespace=true

[tslint.json]
indent_style=space
indent_size=2

end_of_line=lf
trim_trailing_whitespace=true
192 changes: 192 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
/*
👋 Hi! This file was autogenerated by tslint-to-eslint-config.
https://github.com/typescript-eslint/tslint-to-eslint-config

It represents the closest reasonable ESLint configuration to this
project's original TSLint configuration.

We recommend eventually switching this configuration to extend from
the recommended rulesets in typescript-eslint.
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md

Happy linting! 💖
*/
module.exports = {
"env": {
"es6": true
},
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": [
"eslint-plugin-jsdoc",
"eslint-plugin-prefer-arrow",
"@typescript-eslint"
],
"root": true,
"rules": {
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/consistent-type-assertions": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/indent": [
"off",
"tab"
],
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/naming-convention": [
"off",
{
"selector": "variable",
"format": [
"camelCase",
"UPPER_CASE",
"PascalCase"
],
"leadingUnderscore": "allow",
"trailingUnderscore": "forbid"
}
],
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-shadow": [
"off",
{
"hoist": "all"
}
],
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/triple-slash-reference": [
"error",
{
"path": "always",
"types": "prefer-import",
"lib": "always"
}
],
"@typescript-eslint/typedef": "off",
"@typescript-eslint/unified-signatures": "error",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"arrow-parens": [
"off",
"always"
],
"brace-style": [
"error",
"1tbs"
],
"comma-dangle": "off",
"complexity": "off",
"constructor-super": "error",
"curly": [
"error",
"multi-line"
],
"dot-notation": "off",
"eqeqeq": [
"off",
"always"
],
"guard-for-in": "off",
"id-denylist": [
"error",
"any",
"Number",
"number",
"String",
"string",
"Boolean",
"boolean",
"Undefined",
"undefined"
],
"id-match": "error",
"indent": "off",
"jsdoc/check-alignment": "error",
"jsdoc/check-indentation": "error",
"max-classes-per-file": "off",
"max-len": [
"error",
{
"code": 120
}
],
"new-parens": "error",
"no-bitwise": "off",
"no-caller": "error",
"no-cond-assign": "error",
"no-console": "off",
"no-debugger": "error",
"no-empty": "off",
"no-empty-function": "off",
"no-eval": "error",
"no-fallthrough": "off",
"no-invalid-this": "off",
"no-multiple-empty-lines": "off",
"no-new-wrappers": "error",
"no-shadow": "off",
"no-throw-literal": "error",
"no-trailing-spaces": "off",
"no-undef-init": "error",
"no-underscore-dangle": "off",
"no-unsafe-finally": "error",
"no-unused-expressions": "off",
"no-unused-labels": "error",
"no-use-before-define": "off",
"no-var": "error",
"object-shorthand": "off",
"one-var": [
"off",
"never"
],
"prefer-arrow/prefer-arrow-functions": "off",
"prefer-const": [
"error",
{
"destructuring": "all"
}
],
"quotes": "off",
"radix": "error",
"spaced-comment": [
"error",
"always",
{
"markers": [
"/"
]
}
],
"use-isnan": "error",
"valid-typeof": "off"
}
};
76 changes: 0 additions & 76 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ screeps.json
/dist
/node_modules
/typings
/.rpt2_cache
/tsc-out

# Ignore Mathematica notebooks so they don't add 50 billion lines to contribution count
Expand All @@ -27,78 +26,3 @@ screeps.json

# Screeps config file
/config.json

# Numerous always-ignore extensions
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
*.zip
*.vi

# Editor folders
.cache
.project
.settings
.tmproj
*.esproj
nbproject
*.sublime-project
*.sublime-workspace
.idea

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# VStudio files
applicationhost.config
*.suo
*.njsproj
*.sln
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 18.9.1
36 changes: 21 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Overmind",
"name": "overmind",
"version": "0.6.0",
"description": "Overmind Screeps AI",
"author": "Ben Bartlett",
Expand All @@ -14,7 +14,7 @@
},
"scripts": {
"build": "tsc -p .",
"lint": "tslint \"src/**/*.ts\"",
"lint": "eslint \"src/**/*.ts\"",
"clean": "rm -rf tsc-out && rm -rf dist",
"obfuscate": "tsc && javascript-obfuscator tsc-out/Overmind.js --output src/Overmind_obfuscated.js --compact false --self-defending true --string-array true --string-array-threshold 1 --string-array-encoding true && javascript-obfuscator tsc-out/assimilation/Assimilator.js --output src/assimilation/Assimilator_obfuscated.js --compact false --self-defending true --string-array true --string-array-threshold 1 --string-array-encoding true",
"compile": "rollup -c",
Expand All @@ -23,26 +23,32 @@
"push-screepsplus": "rollup -c --environment DEST:screepsplus",
"test": "npm run clean && npm run build"
},
"type": "module",
"engines": {
"node": "10.x"
"node": ">= 18.9.1"
},
"devDependencies": {
"@types/node": "^10.17.18",
"@rollup/plugin-commonjs": "^25.0.3",
"@rollup/plugin-node-resolve": "^15.1.0",
"@types/columnify": "^1.5.1",
"@types/lodash": "3.10.2",
"@types/screeps": "^3.1.0",
"@rollup/plugin-commonjs": "^11.0.2",
"@rollup/plugin-node-resolve": "^7.1.1",
"rollup": "2.6.0",
"rollup-plugin-progress": "1.1.1",
"rollup-plugin-screeps": "1.0.0",
"rollup-plugin-typescript2": "0.27.0",
"tslint": "^5.20.0",
"typedoc": "^0.14.2",
"typescript": "2.9.2"
"@types/screeps": "^3.3.3",
"@typescript-eslint/eslint-plugin": "^6.3.0",
"@typescript-eslint/parser": "^6.3.0",
"eslint": "^8.46.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-jsdoc": "^46.4.5",
"eslint-plugin-prefer-arrow": "^1.2.3",
"rollup": "^3.27.1",
"rollup-plugin-progress": "^1.1.2",
"rollup-plugin-screeps": "^1.0.1",
"rollup-plugin-typescript2": "^0.35.0",
"typedoc": "^0.24.8",
"typescript": "^5.1.6"
},
"dependencies": {
"@tensorflow/tfjs": "^1.2.11",
"columnify": "1.5.4",
"columnify": "^1.6.0",
"onnxjs": "^0.1.6",
"source-map": "0.7.3"
}
Expand Down
Loading