src/devices/base.js
/**
 * Creates a simple device class which only supports crafting operations. This is enough for a lot
 * of devices, so they don't all need dedicated classes. The device will automatically get
 * recipe, recipes, and make/build commands.
 *
 * @param tf
 * @param id Device ID
 * @param interactive If recipes require the player to be present
 * @returns BaseDeviceClass
 */
Creates a simple device class which only supports crafting operations. This is enough for a lot
of devices, so they don't all need dedicated classes. The device will automatically get
recipe, recipes, and make/build commands.

@param tf
@param id Device ID
@param interactive If recipes require the player to be present
@returns BaseDeviceClass
Creates a simple device class which only supports crafting operations . This is enough for a lot of devices so they don ' t all need dedicated classes . The device will automatically get recipe recipes and make / build commands . @param tf @param id Device ID @param interactive If recipes require the player to be present @returns BaseDeviceClass
function createSimpleDeviceClass(tf, id, interactive) {
    let klass = class extends BaseDeviceClass {
        constructor(tf) {
            super(tf, id);
            this.addRecipeSupport(id, interactive);
        }
    };
    return new klass(tf);
}
function createSimpleDeviceClass ( tf , id , interactive ) { let klass = class extends BaseDeviceClass { constructor ( tf ) { super ( tf , id ) ; this . addRecipeSupport ( id , interactive ) ; } } ; return new klass ( tf ) ; }
Creates a simple device class which only supports crafting operations.
Creates a simple device class which only supports crafting operations .