fix: give corresponding weapon when crafting Hound #1816
@ -139,20 +139,15 @@ export const modularWeaponCraftingController: RequestHandler = async (req, res)
|
||||
defaultUpgrades = getDefaultUpgrades(data.Parts);
|
||||
}
|
||||
|
||||
if (category == "MoaPets" && data.WeaponType.startsWith("/Lotus/Types/Friendly/Pets/ZanukaPets/ZanukaPet")) {
|
||||
const defaultWeaponMap = {
|
||||
"/Lotus/Types/Friendly/Pets/ZanukaPets/ZanukaPetAPowerSuit":
|
||||
"/Lotus/Types/Friendly/Pets/ZanukaPets/ZanukaPetMeleeWeaponIP",
|
||||
"/Lotus/Types/Friendly/Pets/ZanukaPets/ZanukaPetBPowerSuit":
|
||||
"/Lotus/Types/Friendly/Pets/ZanukaPets/ZanukaPetMeleeWeaponIS",
|
||||
"/Lotus/Types/Friendly/Pets/ZanukaPets/ZanukaPetCPowerSuit":
|
||||
"/Lotus/Types/Friendly/Pets/ZanukaPets/ZanukaPetMeleeWeaponPS"
|
||||
};
|
||||
if (data.WeaponType in defaultWeaponMap) {
|
||||
const weapon = defaultWeaponMap[data.WeaponType as keyof typeof defaultWeaponMap];
|
||||
if (category == "MoaPets") {
|
||||
const weapon = ExportSentinels[data.WeaponType].defaultWeapon;
|
||||
if (weapon) {
|
||||
const category = ExportWeapons[weapon].productCategory;
|
||||
addEquipment(inventory, category, weapon);
|
||||
occupySlot(inventory, productCategoryToInventoryBin(category)!, !!data.isWebUi);
|
||||
addEquipment(inventory, category, weapon, undefined, inventoryChanges);
|
||||
combineInventoryChanges(
|
||||
inventoryChanges,
|
||||
occupySlot(inventory, productCategoryToInventoryBin(category)!, !!data.isWebUi)
|
||||
);
|
||||
}
|
||||
}
|
||||
defaultOverwrites.Configs = applyDefaultUpgrades(inventory, defaultUpgrades);
|
||||
|
@ -66,7 +66,7 @@ const getItemListsController: RequestHandler = (req, response) => {
|
||||
});
|
||||
}
|
||||
for (const [uniqueName, item] of Object.entries(ExportSentinels)) {
|
||||
if (item.productCategory != "SpecialItems") {
|
||||
if (item.productCategory == "Sentinels" || item.productCategory == "KubrowPets") {
|
||||
Sainan marked this conversation as resolved
|
||||
res[item.productCategory].push({
|
||||
uniqueName,
|
||||
name: getString(item.name, lang),
|
||||
|
Loading…
x
Reference in New Issue
Block a user
Not really related to this PR, but alongside this, maybe the MoaPets array should be removed from
res
again.