Fix Maraquan modeling
This was a known oversight, that I've finally fixed because I realized this subquery probably would be just fine lol! Now, instead of removing rows with _all_ species modeled, we remove rows with all species _for that color_ modeled. This leaves the rest of the modeling list unchanged, but removed 10 Maraquan items that were done modeling but still on the list: - Dyeworks Coral: Maraquan White Beaded Gown - Dyeworks Green: Maraquan White Beaded Gown - Dyeworks Lavender: Maraquan White Beaded Gown - Dyeworks Purple: Maraquan Wig with Negg Accessory - Dyeworks Lavender: Maraquan Sea Blue Gown - Dyeworks Pink: Maraquan Sea Blue Gown - Dyeworks Silver: Maraquan Sea Blue Gown - Maraquan White Lace Gown - Underwater Maraquan Markings (I also went in the database and marked the "Maraquan Ocean Blue Contacts" with the `modeling_status_hint = "done"`, because it's not compatible with Lutari.)
This commit is contained in:
parent
a5c3108a90
commit
d461686bc3
2 changed files with 18 additions and 8 deletions
|
@ -427,7 +427,11 @@ const buildItemsThatNeedModelsLoader = (db) =>
|
||||||
GROUP_CONCAT(
|
GROUP_CONCAT(
|
||||||
T_BODIES.species_id
|
T_BODIES.species_id
|
||||||
ORDER BY T_BODIES.species_id
|
ORDER BY T_BODIES.species_id
|
||||||
) AS modeled_species_ids
|
) AS modeled_species_ids,
|
||||||
|
(
|
||||||
|
SELECT GROUP_CONCAT(DISTINCT species_id ORDER BY species_id)
|
||||||
|
FROM pet_types WHERE color_id = T_BODIES.color_id
|
||||||
|
) AS all_species_ids_for_this_color
|
||||||
FROM (
|
FROM (
|
||||||
-- NOTE: I found that extracting this as a separate query that runs
|
-- NOTE: I found that extracting this as a separate query that runs
|
||||||
-- first made things WAAAY faster. Less to join/group, I guess?
|
-- first made things WAAAY faster. Less to join/group, I guess?
|
||||||
|
@ -457,8 +461,8 @@ const buildItemsThatNeedModelsLoader = (db) =>
|
||||||
modeled_species_count = 0
|
modeled_species_count = 0
|
||||||
-- Single species (probably just their item)
|
-- Single species (probably just their item)
|
||||||
OR modeled_species_count = 1
|
OR modeled_species_count = 1
|
||||||
-- All species modeled
|
-- All species modeled (that are compatible with this color)
|
||||||
OR modeled_species_count = 55
|
OR modeled_species_ids = all_species_ids_for_this_color
|
||||||
-- All species modeled except Vandagyre, for items that don't support it
|
-- All species modeled except Vandagyre, for items that don't support it
|
||||||
OR (NOT T_ITEMS.supports_vandagyre AND modeled_species_count = 54 AND modeled_species_ids = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54")
|
OR (NOT T_ITEMS.supports_vandagyre AND modeled_species_count = 54 AND modeled_species_ids = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54")
|
||||||
)
|
)
|
||||||
|
|
|
@ -438,12 +438,18 @@ const resolvers = {
|
||||||
}
|
}
|
||||||
|
|
||||||
const modeledSpeciesIds = row.modeledSpeciesIds.split(",");
|
const modeledSpeciesIds = row.modeledSpeciesIds.split(",");
|
||||||
// HACK: Needs to be updated if more species are added!
|
const allSpeciesIdsForThisColor = row.allSpeciesIdsForThisColor.split(
|
||||||
const allSpeciesIds = Array.from(
|
","
|
||||||
{ length: row.supportsVandagyre ? 55 : 54 },
|
|
||||||
(_, i) => String(i + 1)
|
|
||||||
);
|
);
|
||||||
const unmodeledSpeciesIds = allSpeciesIds.filter(
|
|
||||||
|
let allModelableSpeciesIds = allSpeciesIdsForThisColor;
|
||||||
|
if (!row.supportsVandagyre) {
|
||||||
|
allModelableSpeciesIds = allModelableSpeciesIds.filter(
|
||||||
|
(s) => s !== "55"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const unmodeledSpeciesIds = allModelableSpeciesIds.filter(
|
||||||
(id) => !modeledSpeciesIds.includes(id)
|
(id) => !modeledSpeciesIds.includes(id)
|
||||||
);
|
);
|
||||||
return unmodeledSpeciesIds.map((id) => ({ id }));
|
return unmodeledSpeciesIds.map((id) => ({ id }));
|
||||||
|
|
Loading…
Reference in a new issue