mirror of
https://github.com/misenhower/splatoon2.ink.git
synced 2026-07-18 17:02:22 -05:00
Add reward gear info to the Salmon Run shift tweet
This commit is contained in:
parent
ec52eae6fc
commit
558ca28aa6
|
|
@ -19,25 +19,42 @@ class SalmonRunTweet extends TwitterPostBase {
|
|||
return Object.values(results);
|
||||
}
|
||||
|
||||
getSalmonRunGear() {
|
||||
let timeline = readData('timeline.json');
|
||||
|
||||
return timeline.coop && timeline.coop.reward_gear;
|
||||
}
|
||||
|
||||
getData() {
|
||||
return this.getSalmonRunSchedules().find(s => s.start_time == this.getDataTime());
|
||||
const schedule = this.getSalmonRunSchedules().find(s => s.start_time == this.getDataTime());
|
||||
const gear = this.getSalmonRunGear();
|
||||
|
||||
return { schedule, gear };
|
||||
}
|
||||
|
||||
getTestData() {
|
||||
return this.getSalmonRunSchedules()[0];
|
||||
const schedule = this.getSalmonRunSchedules()[0];
|
||||
const gear = this.getSalmonRunGear();
|
||||
|
||||
return { schedule, gear };
|
||||
}
|
||||
|
||||
getImage(data) {
|
||||
return captureSalmonRunScreenshot(data.start_time);
|
||||
return captureSalmonRunScreenshot(data.schedule.start_time);
|
||||
}
|
||||
|
||||
getText(data) {
|
||||
let hasMysteryWeapon = data.weapons.some(w => w === null || w.coop_special_weapon);
|
||||
let gear = '';
|
||||
if (data.gear) {
|
||||
gear = `Current reward gear is the ${data.gear.gear.name}. `;
|
||||
}
|
||||
|
||||
let hasMysteryWeapon = data.schedule.weapons.some(w => w === null || w.coop_special_weapon);
|
||||
|
||||
if (hasMysteryWeapon)
|
||||
return `Salmon Run is now open on ${data.stage.name} with MYSTERY WEAPONS! #salmonrun #splatoon2`;
|
||||
return `Salmon Run is now open on ${data.schedule.stage.name} with MYSTERY WEAPONS! ${gear} #salmonrun #splatoon2`;
|
||||
|
||||
return `Salmon Run is now open on ${data.stage.name}! #salmonrun #splatoon2`;
|
||||
return `Salmon Run is now open on ${data.schedule.stage.name}! ${gear} #salmonrun #splatoon2`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<div class="column is-4 salmon-run-ad-img">
|
||||
<div class="image is-16by9 is-hidden-desktop"></div>
|
||||
|
||||
<template v-if="!screenshotMode && rewardGear">
|
||||
<template v-if="rewardGear">
|
||||
<div class="salmon-run-gear-text">
|
||||
{{ $t('coop.current_gear') }}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user