feat: nightcap syndicate #2934
@ -1400,6 +1400,12 @@ export const updateGeneric = async (data: IGenericUpdate, accountId: string): Pr
|
|||||||
|
|
||||||
const inventoryChanges: IInventoryChanges = {};
|
const inventoryChanges: IInventoryChanges = {};
|
||||||
for (const node of data.NodeIntrosCompleted) {
|
for (const node of data.NodeIntrosCompleted) {
|
||||||
|
if (inventory.NodeIntrosCompleted.indexOf(node) != -1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
inventory.NodeIntrosCompleted.push(node);
|
||||||
|
logger.debug(`completed dialogue/cutscene for ${node}`);
|
||||||
|
|
||||||
if (node == "TC2025") {
|
if (node == "TC2025") {
|
||||||
inventoryChanges.ShipDecorations = [
|
inventoryChanges.ShipDecorations = [
|
||||||
{
|
{
|
||||||
@ -1422,14 +1428,6 @@ export const updateGeneric = async (data: IGenericUpdate, accountId: string): Pr
|
|||||||
await addEmailItem(inventory, "/Lotus/Types/Items/EmailItems/ClearedFiveLoopsEmailItem", inventoryChanges);
|
await addEmailItem(inventory, "/Lotus/Types/Items/EmailItems/ClearedFiveLoopsEmailItem", inventoryChanges);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Combine the two arrays into one.
|
|
||||||
data.NodeIntrosCompleted = inventory.NodeIntrosCompleted.concat(data.NodeIntrosCompleted);
|
|
||||||
|
|
||||||
// Remove duplicate entries.
|
|
||||||
const nodes = [...new Set(data.NodeIntrosCompleted)];
|
|
||||||
|
|
||||||
inventory.NodeIntrosCompleted = nodes;
|
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user