updated readme, added role selection warning for orange leaf roles

This commit is contained in:
Steffen 2020-04-18 21:47:13 +02:00
parent c03dc1b1de
commit 429d9845b1
No known key found for this signature in database
GPG Key ID: 764D74E98267DFC6
5 changed files with 39 additions and 6 deletions

View File

@ -7,4 +7,12 @@ It is supposed to aid storytellers and allow them to quickly set up and capture
[You can try it online!](https://bra1n.github.io/townsquare) [You can try it online!](https://bra1n.github.io/townsquare)
**Todo:**
- add night sheet data to roles.json
- add night sheet view to Grimoire
- add global reminder space
- add LICENSE and finish README (shortcuts)
- (maybe) switch to vectorized SVG token icons
- allow using custom scripts
WORK IN PROGRESS WORK IN PROGRESS

View File

@ -247,7 +247,11 @@ body {
position: relative; position: relative;
} }
h1, h2, h3, h4, h5 { h1,
h2,
h3,
h4,
h5 {
margin: 0; margin: 0;
text-align: center; text-align: center;
} }

View File

@ -227,10 +227,14 @@ export default {
span { span {
display: none; display: none;
} }
&:hover span { &:hover {
display: inline-block; color: red;
&:hover { span {
color: red; display: inline-block;
color: white;
&:hover {
color: red;
}
} }
} }
} }

View File

@ -19,6 +19,10 @@
<Token :role="role" /> <Token :role="role" />
</li> </li>
</ul> </ul>
<div class="warning" v-if="hasSelectedSetupRoles">
Warning: there are roles selected that modify the game setup! The
randomizer does not account for these roles.
</div>
<div class="button-group"> <div class="button-group">
<div <div
class="button" class="button"
@ -80,6 +84,11 @@ export default {
return Object.values(this.roleSelection) return Object.values(this.roleSelection)
.map(roles => roles.filter(role => role.selected).length) .map(roles => roles.filter(role => role.selected).length)
.reduce((a, b) => a + b, 0); .reduce((a, b) => a + b, 0);
},
hasSelectedSetupRoles: function() {
return Object.values(this.roleSelection).some(roles =>
roles.some(role => role.selected && role.setup)
);
} }
}, },
methods: { methods: {
@ -177,4 +186,10 @@ export default {
} }
} }
} }
.roles .modal .warning {
color: red;
text-align: center;
margin: auto;
}
</style> </style>

View File

@ -99,7 +99,9 @@ export default {
selectedPlayer: false, selectedPlayer: false,
availableReminders: [], availableReminders: [],
availableRoles: [], availableRoles: [],
bluffs: Array(3).fill({}).map(() => ({ role: {} })) bluffs: Array(3)
.fill({})
.map(() => ({ role: {} }))
}; };
}, },
methods: { methods: {