fix outfit resets for emotion/gp

This commit is contained in:
Matt Dunn-Rankin 2020-05-03 01:08:43 -07:00
parent 2214fe2815
commit 5d6b267992
2 changed files with 5 additions and 2 deletions

View file

@ -55,6 +55,8 @@ function OutfitResetModal({ isOpen, onClose, dispatchToOutfit }) {
name: petName,
speciesId: species.id,
colorId: color.id,
emotion: "HAPPY", // TODO: Ask PetService
genderPresentation: "FEMININE", // TODO: Ask PetService
wornItemIds: items.map((i) => i.id),
closetedItemIds: [],
});

View file

@ -202,8 +202,9 @@ const outfitStateReducer = (apolloClient) => (baseState, action) => {
state.name = name;
state.speciesId = speciesId ? String(speciesId) : baseState.speciesId;
state.colorId = colorId ? String(colorId) : baseState.colorId;
state.emotion = emotion;
state.genderPresentation = genderPresentation;
state.emotion = emotion || baseState.emotion;
state.genderPresentation =
genderPresentation || baseState.genderPresentation;
state.wornItemIds = wornItemIds
? new Set(wornItemIds.map(String))
: baseState.wornItemIds;