fixing bug where reminder tokens were not being displayed correctly for out of script travellers.

This commit is contained in:
Dave 2021-01-17 21:01:32 +00:00
parent 59105beb78
commit 3fc1c3c1a5
1 changed files with 25 additions and 0 deletions

View File

@ -82,6 +82,31 @@ export default {
})) }))
]; ];
}); });
// add out of script traveller reminders
this.$store.state.extraTravellers.forEach(role => {
if (players.some(p => p.role.id === role.id)) {
reminders = [
...reminders,
...role.reminders.map(name => ({
role: role.id,
image: role.image,
name
}))
];
}
if (role.remindersGlobal && role.remindersGlobal.length) {
reminders = [
...reminders,
...role.remindersGlobal.map(name => ({
role: role.id,
image: role.image,
name
}))
];
}
});
reminders.push({ role: "good", name: "Good" }); reminders.push({ role: "good", name: "Good" });
reminders.push({ role: "evil", name: "Evil" }); reminders.push({ role: "evil", name: "Evil" });
reminders.push({ role: "custom", name: "Custom note" }); reminders.push({ role: "custom", name: "Custom note" });