Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 2.61 KB

README.md

File metadata and controls

30 lines (21 loc) · 2.61 KB

greenbox-script

packages
...
└── greenbox-script
    └── src
        |   ...
        └── greenbox.ts
...

The greenbox-script folder is where the core KoLMafia script for greenbox lives. The bundle that gets packaged to our release branch and is pulled by the git install demarcated on the website & overarching readme is generated through this script.

Somewhat humorously, the code itself in greenbox-script is actually very, very simple -- when this walkthrough was written, it was only 3 files, totaling less than 300 lines of code overall.

Example Pull Requests

Here are some use cases where you may want to change a file in greenbox-script:

  • Greenbox is not correctly handling ownership conditions for a specific class of items.
  • You are adding an entirely new set of items to test, and must tell Mafia to check ownership on those items.

For the vast majority of cases, changes within greenbox-script will involve a change to greenbox.ts, as that file represents the primary file packaged and built for release.

It is also important to note that greenbox-script is the only area within greenbox that a developer should be referencing libram functions or base kolmafia functions -- items in greenbox-data and greenbox-web are meant to function without any KoLMafia overhead whatsoever. Ergo, if you want to use either of those tools to do something cool, this is (by definition) where your code -has- to go.

We would caution that the greenbox-script folder, in a general sense, should not require significant changes for most simple PRs that are not adding entirely new classifications of things to track; most changes that impact this script will happen within the greenbox-data folder. However, if you would like to add anything new that is being parsed and passed to the greenbox-web website, you will need to update this to ensure Mafia is checking ownership conditions on the new items or values.