Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 1.56 KB

README.md

File metadata and controls

26 lines (17 loc) · 1.56 KB

Introduction

Future development work for this script will be written in ts as possible. In long term, you can consider the lua files under <root>/bots/ folder are all generated by the ts scripts under <root>/typescript/bots/.

Starting from here, please use typescript to write the bot logic in ts and build to generate the relative lua files.

Developer notes

  1. Do not use relative filepath when importing module files with functions like require or dofile in a ts file. Make sure to use absolute filepath with bots/ as the root path. TLDR, this is because bot script lua files need to use absolute filepath for any non-in-same-folder path.
  2. Always try to modify/update ts files first for any modification, because ts files can replace the lua files and override whatever you might have changed in lua files.
  3. When adding/moving files, create the files/folders in typescript in the same file structure as in the root bots folder.

Usage

  1. Install node.
  2. Install yarn. npm install --global yarn
  3. Install dependencies. yarn install
  4. Run a watcher process to keep re-compiling code for any newly saved changes in TS: npm run dev
    • Or, compile to generate lua files only once: npm run build

Release a new version of the bot script

  1. Before releasing a new version, run: npm run release, this is to auto update script version number, prettify typescript code, convert any possible changes in typescript to lua.