How to use the oni-save-parser.makeAccessoryID 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 / services / save-editor / duplicants / appearance / reducer.ts View on Github external
state = modifyAccessory(
                state,
                action,
                duplicantID,
                "hair",
                accessoryID
            );

            const ordinal = getAccessoryOrdinal(accessoryID);
            state = modifyAccessory(
                state,
                action,
                duplicantID,
                "hat_hair",
                makeAccessoryID("hat_hair", ordinal || 1)
            );

            // TODO: Also hair_always?  Seems that way from MinionStartingStates CreateBodyData,
            //  but saved dups have a DEFAULT here

            return state;
        }
        case ACTION_DUPLICANT_APPEARANCE_HEAD_SET: {
            const {
                duplicantID,
                accessoryID
            } = action.payload;

            return modifyAccessory(
                state,
                action,
github RoboPhred / oni-duplicity / src / services / save-editor / duplicants / appearance / reducer.ts View on Github external
state = modifyAccessory(
                state,
                action,
                duplicantID,
                "body",
                accessoryID
            );

            const ordinal = getAccessoryOrdinal(accessoryID);
            state = modifyAccessory(
                state,
                action,
                duplicantID,
                "arm",
                makeAccessoryID("arm", ordinal || 1)
            );

            return state;
        }
        default:
            return state;
    }
}