/screeps

Primary LanguageTypeScriptMIT LicenseMIT

screeps-typescript

This is a typescript template for screeps and bun


Requirements

Setup

  1. Clone this repository

  2. Install the requirements

bun install

Building

To build the project run the build script

bun run build

A watch script is available as well

The compiled output will be available in dist/main.js


Main loop

The main loop is found in src/index.ts

Prototypes

Put prototypes into src/prototypes/... and add an import to src/prototypes/index.ts

Put prototype type definitions either into src/types.d.ts or into the respective prototype file

You can see an exmaple in src/prototypes/Creep.ts

Util

There are utilities available in src/util if you need any. You can import them directly or from the src/util/index.ts as they are re-exported there as well.


This template was inspired by screepers/screeps-typescript-starter