FairlySadPanda/Stronk

Write a plugin porting guide

FairlySadPanda opened this issue · 0 comments

Plugins need modification to work. A good plugin that is being used in this engine needs:

  1. Any global variables assigned to the window object
  2. All modifications to classes defined in declaration merges, either in file or in an independent d.ts file
  3. All modifications to game objects that remain in state on saves and loads (that is, that uses JsonEx) using the replacement process for saving and loading objects on load (gameLoadInput options inside class files)
  4. CommonJS requires or import statements for any imported classes
  5. Manipulation of export modules when redefining constructors (please note: please stop redefining constructors. It's a pain in the ass.)

We need a good documentation guide to cover this. We want to encourage plugin writers to use ES6, rather than TS, as TS would be too much work to learn for most indie JS devs who are not being paid.