Skip to content

How to: Add a new operator

Ronan edited this page Jul 20, 2020 · 2 revisions

Adding a new operator

  1. Run npm install r6operators@latest to install the latest operator images from marcopixel r6-operatoricons
  2. Add the new operator to the bottom of the list in: /r6-operator-counters/src/main/create-operator-json/core/operatorIdEnum.js
  3. Add a new class for the operator here: /r6-operator-counters/src/main/create-operator-json/operators/. There are lots of other examples to copy from in the same folder.
'use strict';

import counterType from '../core/counterTypeEnums';
import operatorId from '../core/operatorIdEnum';
import Operator from '../core/operatorFactory';
import r6operators from "r6operators";

let ace = new Operator(r6operators.ace, operatorId.ace, "Operation Steel Wave");

export default ace
  1. Add the new class as an import and add the operator alphabetically to the list: /r6-operator-counters/src/main/create-operator-json/core/operatorList.js
  2. Add the new operator to the image location list alphabetically: /r6-operator-counters/src/main/scripts/imageLocation.js
'Ace': 'img/' + fileFormat + '/ace.' + fileFormat,

Example commit that added Steel Wave operators: https://github.com/BurkusCat/r6-operator-counters/commit/ae94afc6b449fcf45e9b18e9edd74b7eecdd83ed

Clone this wiki locally