How to use the oni-save-parser.getAccessoryName function in oni-save-parser

To help you get started, we’ve selected a few oni-save-parser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github RoboPhred / oni-duplicity / src / pages / DuplicantEditorPage / components / DuplicantEditor / components / Appearance / Appearance.tsx View on Github external
function ordinalFromAccessory(guid: string) {
  const name = getAccessoryName(guid);
  if (!name) {
    return 1;
  }
  const parts = name.split("_");
  return Number(parts[parts.length - 1]);
}
github RoboPhred / oni-duplicity / src / pages / SaveEditor / components / editors / game-objects / MinionEditor / components / MinionAppearanceTab / derived-state.ts View on Github external
return createSelector(accessorizerBehavior, behavior => {
    if (!behavior) {
      return null;
    }

    const { accessories } = behavior.templateData;

    const accessory = getAccessoryOfType(accessories, accessoryType);
    if (!accessory) {
      return null;
    }

    return getAccessoryName(accessory);
  });
}