From 17d75ee97fc0ef412410c9fad55a59f7f30468ca Mon Sep 17 00:00:00 2001 From: Matchu Date: Mon, 15 Mar 2021 13:28:16 -0700 Subject: [PATCH] Add color and step-value support for bulk add MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is enough to start fixing items like Baby in a Pumpkin! Hooray! 😁 --- .../support/AllItemLayersSupportModal.js | 110 +++++++++++++----- src/server/types/PetAppearance.js | 21 ++++ 2 files changed, 103 insertions(+), 28 deletions(-) diff --git a/src/app/WardrobePage/support/AllItemLayersSupportModal.js b/src/app/WardrobePage/support/AllItemLayersSupportModal.js index 07694a2..f585b8b 100644 --- a/src/app/WardrobePage/support/AllItemLayersSupportModal.js +++ b/src/app/WardrobePage/support/AllItemLayersSupportModal.js @@ -68,7 +68,9 @@ function BulkAddBodySpecificAssetsForm({ bulkAddProposal, onSubmit }) { const [minAssetId, setMinAssetId] = React.useState( bulkAddProposal?.minAssetId ); + const [assetIdStepValue, setAssetIdStepValue] = React.useState(1); const [numSpecies, setNumSpecies] = React.useState(55); + const [colorId, setColorId] = React.useState("8"); return ( { e.preventDefault(); - onSubmit({ minAssetId, numSpecies }); + onSubmit({ minAssetId, numSpecies, assetIdStepValue, colorId }); }} > - Bulk-add body-specific assets: + Bulk-add: @@ -124,14 +126,31 @@ function BulkAddBodySpecificAssetsForm({ bulkAddProposal, onSubmit }) { placeholder="Max ID" // Because this is an inclusive range, the offset between the numbers // is one less than the number of entries in the range. - value={minAssetId != null ? Number(minAssetId) + (numSpecies - 1) : ""} + value={ + minAssetId != null + ? Number(minAssetId) + assetIdStepValue * (numSpecies - 1) + : "" + } onChange={(e) => setMinAssetId( - e.target.value ? Number(e.target.value) - (numSpecies - 1) : null + e.target.value + ? Number(e.target.value) - assetIdStepValue * (numSpecies - 1) + : null ) } /> + + for + +