Change the Salmon Run tweet text if there are Grizzco mystery weapons

This commit is contained in:
Matt Isenhower 2019-08-02 16:17:54 -07:00
parent 0c91c5d101
commit c15f30c28c

View File

@ -103,12 +103,16 @@ class SalmonRunTweet extends TwitterPostBase {
}
let hasMysteryWeapon = data.current.weapons.some(w => w === null || w.coop_special_weapon);
let hasGrizzcoMysteryWeapon = data.current.weapons.some(w => w && w.coop_special_weapon && w.id === '-2');
let justOpened = data.current.start_time === this.getDataTime();
let state = (justOpened) ? 'is now open' : 'is still open';
let hashtags = (justOpened) ? '#salmonrun #splatoon2' : '#salmonrun #ongoingshift #splatoon2';
if (hasGrizzcoMysteryWeapon)
return `Salmon Run ${state} on ${data.current.stage.name} with GRIZZCO MYSTERY WEAPONS! ${gear}${hashtags}`;
if (hasMysteryWeapon)
return `Salmon Run ${state} on ${data.current.stage.name} with MYSTERY WEAPONS! ${gear}${hashtags}`;