Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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,
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;
}
}