From 6df619f5680b3b63e19997e2307347e828b867dc Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Wed, 27 May 2020 20:55:03 -0700 Subject: [PATCH] actually commit the last bit (for loose grouping of the same effect from different causes). --- src/neighbor/arcologyDiplomacy.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/neighbor/arcologyDiplomacy.js b/src/neighbor/arcologyDiplomacy.js index b5dbda290f0..9283acf2496 100644 --- a/src/neighbor/arcologyDiplomacy.js +++ b/src/neighbor/arcologyDiplomacy.js @@ -143,8 +143,8 @@ globalThis.ArcologyFSPassiveInfluence = class { } t.push(`in ${arcology.name} is influenced by`); const sharedNames = shared.map((i) => V.arcologies[i].name + "'s"); - t.push(sharedNames.reduce((res, ch, i, arr) => res + (i === arr.length - 1 ? ' and ' : ', ') + ch)); - t.push(`more advanced ${shared.length === 1 ? "society" : "societies"}.`); + t.push(sharedNames.reduce((res, ch, i, arr) => res + (i === arr.length - 1 ? ' and ' : ', ') + ch) + + ` more advanced ${shared.length === 1 ? "society" : "societies"}.`); } // passive slowing influence @@ -156,12 +156,14 @@ globalThis.ArcologyFSPassiveInfluence = class { } else if (fs === "FSSupremacy") { actualDisplayName = `${arcology.FSSupremacistRace} Supremacy`; } + t.push(`Development of ${actualDisplayName} in ${arcology.name} is slowed by contact with`); + let conflictOutput = []; for (const [conflictFS, arcs] of conflicting) { - t.push(`Development of ${actualDisplayName} in ${arcology.name} is slowed by contact with`); const conflictNames = arcs.map((i) => V.arcologies[i].name + "'s"); - t.push(conflictNames.reduce((res, ch, i, arr) => res + (i === arr.length - 1 ? ' and ' : ', ') + ch)); - t.push(`more advanced ${FutureSocieties.displayAdj(conflictFS)} ${arcs.length === 1 ? "society" : "societies"}.`); + conflictOutput.push(conflictNames.reduce((res, ch, i, arr) => res + (i === arr.length - 1 ? ' and ' : ', ') + ch) + + ` more advanced ${FutureSocieties.displayAdj(conflictFS)} ${arcs.length === 1 ? "society" : "societies"}`); } + t.push(conflictOutput.reduce((res, ch, i, arr) => res + (i === arr.length - 1 ? ' and ' : ', ') + ch) + '.'); } return t.join(" "); -- GitLab