Merge pull request #312 from bra1n/develop

script tool fixes
This commit is contained in:
Steffen 2023-11-06 13:07:45 +01:00 committed by GitHub
commit 69ab4105f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 4701 additions and 17670 deletions

View File

@ -9,6 +9,8 @@ module.exports = {
},
rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"vue/multi-word-component-names": "off",
"vue/no-reserved-component-names": "off",
}
};

View File

@ -1,7 +1,13 @@
# Release Notes
### Version 2.16.2
- fixed custom script format to support new script tool JSON
- updated packages to be compatible with Node >= 18 again
---
### Version 2.16.1
Updated character night order to be consistent with script tool
- Updated character night order to be consistent with script tool
---

22299
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "townsquare",
"version": "2.16.0",
"version": "2.16.2",
"description": "Blood on the Clocktower Town Square",
"author": "Steffen Baumgart",
"scripts": {
@ -15,22 +15,22 @@
"@fortawesome/free-brands-svg-icons": "^5.15.1",
"@fortawesome/free-solid-svg-icons": "^5.15.1",
"@fortawesome/vue-fontawesome": "^0.1.10",
"@vue/cli-service": "^4.5.9",
"@vue/cli-service": "^5.0.8",
"prom-client": "^13.0.0",
"sass": "^1.30.0",
"sass-loader": "^8.0.2",
"vue": "^2.6.12",
"vue-template-compiler": "^2.6.12",
"vue-template-compiler": "^2.7.15",
"vuex": "^3.6.0",
"ws": "^7.4.6"
},
"devDependencies": {
"@vue/cli-plugin-eslint": "^4.5.9",
"@vue/eslint-config-prettier": "^6.0.0",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.2.0",
"eslint-plugin-vue": "^6.2.2",
"prettier": "^1.19.1"
"@vue/cli-plugin-eslint": "^5.0.8",
"@vue/eslint-config-prettier": "^8.0.0",
"eslint": "^8.53.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-vue": "^9.18.1",
"prettier": "^3.0.3"
},
"keywords": [
"botc",

View File

@ -257,6 +257,7 @@ export default {
</script>
<style lang="scss">
@use "sass:math";
@import "../vars.scss";
#townsquare {
@ -301,14 +302,14 @@ export default {
}
@mixin on-circle($item-count) {
$angle: (360 / $item-count);
$angle: math.div(360, $item-count);
$rot: 0;
// rotation and tooltip placement
@for $i from 1 through $item-count {
&:nth-child(#{$i}) {
transform: rotate($rot * 1deg);
@if $i - 1 <= $item-count / 2 {
@if $i - 1 <= math.div($item-count, 2) {
// first half of players
z-index: $item-count - $i + 1;
// open menu on the left
@ -372,15 +373,15 @@ export default {
}
// move reminders closer to the sides of the circle
$q: $item-count / 4;
$q: math.div($item-count, 4);
$x: $i - 1;
@if $x < $q or ($x >= $item-count / 2 and $x < $q * 3) {
@if $x < $q or ($x >= math.div($item-count, 2) and $x < $q * 3) {
.player {
margin-bottom: -10% + 20% * (1 - ($x % $q / $q));
margin-bottom: -10% + 20% * (1 - math.div($x % $q, $q));
}
} @else {
.player {
margin-bottom: -10% + 20% * ($x % $q / $q);
margin-bottom: -10% + 20% * math.div($x % $q, $q);
}
}
}

View File

@ -170,6 +170,7 @@ export default {
},
parseRoles(roles) {
if (!roles || !roles.length) return;
roles = roles.map(role => typeof role === "string" ? { id: role } : role);
const metaIndex = roles.findIndex(({ id }) => id === "_meta");
let meta = {};
if (metaIndex > -1) {
@ -181,11 +182,11 @@ export default {
Object.assign({}, meta, { id: "custom" })
);
// check for fabled and set those too, if present
if (roles.some(({ id }) => this.$store.state.fabled.has(id))) {
if (roles.some((role) => this.$store.state.fabled.has(role.id || role))) {
const fabled = [];
roles.forEach(({ id }) => {
if (this.$store.state.fabled.has(id)) {
fabled.push(this.$store.state.fabled.get(id));
roles.forEach((role) => {
if (this.$store.state.fabled.has(role.id || role)) {
fabled.push(this.$store.state.fabled.get(role.id || role));
}
});
this.$store.commit("players/setFabled", { fabled });