diff --git a/package.json b/package.json index 561b94f83f..90c3564611 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "4.1.11-pre1+20210113.2235", + "version": "4.1.11+20210123.1723", "license": "CC-BY-NC-SA-4.0", "scripts": { "predev": "tsc -b scripts && node scripts predev", @@ -16,8 +16,8 @@ "tsc:docs": "tsc -b scripts && node scripts tscDocs" }, "dependencies": { - "@fortawesome/fontawesome-svg-core": "^1.2.32", - "@fortawesome/free-solid-svg-icons": "^5.15.1", + "@fortawesome/fontawesome-svg-core": "^1.2.34", + "@fortawesome/free-solid-svg-icons": "^5.15.2", "@fortawesome/vue-fontawesome": "^2.0.2", "broadcast-channel": "^3.3.0", "combokeys": "^3.0.1", @@ -26,12 +26,12 @@ "lodash": ">=4.17.19", "mini-svg-data-uri": "^1.2.3", "moment": "^2.29.1", - "pdfmake": "^0.1.69", + "pdfmake": "^0.1.70", "semver": "^7.3.4", "showdown": "^1.9.1", "ua-parser-js": "^0.7.23", "vue": "^2.6.12", - "vue-i18n": "^8.22.3", + "vue-i18n": "^8.22.4", "vue-js-modal": "2.0.0-rc.3", "vue-js-toggle-button": "^1.3.3", "vue-notification": "^1.3.20", @@ -44,9 +44,9 @@ "@types/combokeys": "^2.4.6", "@types/i18n-js": "^3.8.0", "@types/jquery": "^3.5.5", - "@types/leaflet": "^1.5.19", - "@types/lodash": "^4.14.167", - "@types/node": "^14.14.20", + "@types/leaflet": "^1.5.21", + "@types/lodash": "^4.14.168", + "@types/node": "^14.14.22", "@types/pdfmake": "^0.1.16", "@types/semver": "^7.3.4", "@types/showdown": "^1.9.3", @@ -54,8 +54,8 @@ "@types/ua-parser-js": "^0.7.35", "@types/vue-select": "^2.5.1", "@types/webpack-env": "^1.16.0", - "@typescript-eslint/eslint-plugin": "^4.13.0", - "@typescript-eslint/parser": "^4.13.0", + "@typescript-eslint/eslint-plugin": "^4.14.0", + "@typescript-eslint/parser": "^4.14.0", "@vuepress/plugin-active-header-links": "^1.8.0", "@vuepress/plugin-back-to-top": "^1.8.0", "all-contributors-cli": "^6.19.0", @@ -63,11 +63,11 @@ "clean-webpack-plugin": "^3.0.0", "copy-dir": "^1.3.0", "css-loader": "^3.6.0", - "eslint": "^7.17.0", + "eslint": "^7.18.0", "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-vue": "^7.4.1", + "eslint-plugin-vue": "^7.5.0", "html-loader": "^1.3.2", - "sass": "^1.32.4", + "sass": "^1.32.5", "sass-loader": "^10.1.1", "speed-measure-webpack-plugin": "^1.3.3", "string-replace-loader": "^2.3.0", @@ -82,7 +82,7 @@ "vuepress-plugin-smooth-scroll": "^0.0.10", "vuepress-plugin-zooming": "^1.1.8", "webpack": "^4.46.0", - "webpack-cli": "^4.3.1", + "webpack-cli": "^4.4.0", "webpack-loader-append-prepend": "^1.0.2" }, "engines": { diff --git a/src/i18n/cs_CZ.ts b/src/i18n/cs_CZ.ts index f786342c55..a78b4427d6 100644 --- a/src/i18n/cs_CZ.ts +++ b/src/i18n/cs_CZ.ts @@ -107,7 +107,6 @@ export default { credits: 5_000, minPersonnel: 4, maxPersonnel: 6, - wtank: 0, }, 1: { caption: 'CAS 30', @@ -116,7 +115,6 @@ export default { credits: 5_000, minPersonnel: 1, maxPersonnel: 6, - wtank: 0, }, 2: { caption: 'AZ', @@ -125,7 +123,6 @@ export default { credits: 10_000, minPersonnel: 1, maxPersonnel: 2, - wtank: 0, special: 'Požadováno po vybudování 3 požárních stanic', }, 3: { @@ -135,7 +132,6 @@ export default { credits: 10_000, minPersonnel: 1, maxPersonnel: 1, - wtank: 0, special: 'Požadováno po vybudování 6 požárních stanic', }, 4: { @@ -145,7 +141,6 @@ export default { credits: 12_180, minPersonnel: 2, maxPersonnel: 3, - wtank: 0, special: 'Požadováno po vybudování 4 požárních stanic', }, 5: { @@ -155,7 +150,6 @@ export default { credits: 5_000, minPersonnel: 3, maxPersonnel: 3, - wtank: 0, }, 6: { caption: 'KHA', @@ -164,7 +158,6 @@ export default { credits: 17_300, minPersonnel: 1, maxPersonnel: 2, - wtank: 0, special: 'Požadováno po vybudování 7 požárních stanic', }, 7: { @@ -174,7 +167,6 @@ export default { credits: 19_200, minPersonnel: 1, maxPersonnel: 3, - wtank: 3_000, schooling: 'Požární stanice - Nebezpečné látky', shownSchooling: 'Nebezpečné látky', special: 'Požadováno po vybudování 11 požárních stanic', @@ -186,7 +178,6 @@ export default { credits: 5_000, minPersonnel: 2, maxPersonnel: 4, - wtank: 0, }, 9: { caption: 'Vrtulník LZS', @@ -195,7 +186,6 @@ export default { credits: 300_000, minPersonnel: 3, maxPersonnel: 5, - wtank: 0, }, 10: { caption: 'AP', @@ -204,7 +194,6 @@ export default { credits: 14_000, minPersonnel: 1, maxPersonnel: 2, - wtank: 0, }, 11: { caption: 'Policejní vrtulník', @@ -213,7 +202,6 @@ export default { credits: 300_000, minPersonnel: 1, maxPersonnel: 3, - wtank: 0, schooling: 'Policie - Kurz Letecké služby PČR', shownSchooling: 'Členové Letecké služby PČR', }, @@ -224,7 +212,6 @@ export default { credits: 10_000, minPersonnel: 6, maxPersonnel: 6, - wtank: 0, schooling: 'Policie - URNA', shownSchooling: 'URNA', special: 'Požadováno po vybudování 8 Obvodních oddělení Policie', @@ -236,7 +223,6 @@ export default { credits: 7_000, minPersonnel: 1, maxPersonnel: 2, - wtank: 0, schooling: 'Policie - Kynologové Policie', shownSchooling: 'Kynologové Policie', special: 'Požadováno po vybudování 6 Obvodních oddělení Policie', @@ -248,7 +234,6 @@ export default { credits: 2_500, minPersonnel: 1, maxPersonnel: 1, - wtank: 0, schooling: 'Policie - Policejní motocykl', shownSchooling: 'Strážník na motocyklu', }, @@ -259,7 +244,6 @@ export default { credits: 7_000, minPersonnel: 2, maxPersonnel: 4, - wtank: 0, schooling: 'Policie - URNA', shownSchooling: 'URNA', special: 'Požadováno po vybudování 8 Obvodních oddělení Policie', @@ -271,7 +255,6 @@ export default { credits: 11_680, minPersonnel: 1, maxPersonnel: 3, - wtank: 0, special: 'Požadováno po vybudování 5 požárních stanic', }, 17: { @@ -281,7 +264,6 @@ export default { credits: 25_500, minPersonnel: 1, maxPersonnel: 6, - wtank: 0, schooling: 'Požární stanice - MOS (mobilní operační středisko)', shownSchooling: 'MOS', special: 'Požadováno po vybudování 13 požárních stanic', @@ -293,7 +275,6 @@ export default { credits: 15_000, minPersonnel: 2, maxPersonnel: 3, - wtank: 0, schooling: 'Policie - vyšetřovatel DN', shownSchooling: 'Vyšetřovatel DN', }, @@ -304,15 +285,56 @@ export default { credits: 35_000, minPersonnel: 2, maxPersonnel: 3, - wtank: 0, schooling: 'Policie - Policejní pyrotechnik', shownSchooling: 'Policejní pyrotechnik', }, + 20: { + caption: 'Přívěs se člunem', + color: '#990000', + coins: 0, + credits: 0_000, + minPersonnel: 0, + maxPersonnel: 0, + special: 'Požadováno po vybudování 11 požárních stanic', + }, + 21: { + caption: 'Přívěs se člunem VZS ČČK', + color: '#990000', + coins: 12, + credits: 6_000, + minPersonnel: 0, + maxPersonnel: 0, + special: + 'Je potřeba tažné vozidlo (SUV VZS ČČK, Dodávka VZS ČČK). Vyžaduje osoby(4) se speciálním vzděláním v oboru odtahové vozidlo', + }, + 22: { + caption: 'Potápěčský automobil', + color: '#990000', + coins: 0, + credits: 0_000, + minPersonnel: 0, + maxPersonnel: 0, + special: 'Požadováno po vybudování 11 požárních stanic', + }, + 23: { + caption: 'SUV VZS ČČK', + color: '#990000', + coins: 25, + credits: 10_000, + minPersonnel: 1, + maxPersonnel: 4, + }, + 24: { + caption: 'Dodávka VZS ČČK', + color: '#990000', + coins: 25, + credits: 10_000, + minPersonnel: 2, + maxPersonnel: 4, + }, }, - //here ends - - buildings: [ - { + buildings: { + 0: { caption: 'Fire station', color: '#bb0000', coins: 30, @@ -330,12 +352,6 @@ export default { coins: 20, duration: '7 Days', }, - { - caption: 'Forestry Expansion', - credits: 50_000, - coins: 13, - duration: '7 Days', - }, { caption: 'Water rescue expansion', credits: 100_000, @@ -352,7 +368,7 @@ export default { startVehicles: ['Type 1 fire engine', 'Type 2 fire engine'], maxBuildingsFunction: (): number => 4_000, }, - { + 1: { caption: 'Fire academy', color: '#992222', coins: 50, @@ -371,7 +387,7 @@ export default { startPersonnel: 0, startVehicles: [], }, - { + 2: { caption: 'Ambulance station', color: '#ffa500', coins: 35, @@ -384,7 +400,7 @@ export default { startPersonnel: 3, startVehicles: ['ALS Ambulance'], }, - { + 4: { caption: 'Hospital', color: '#bbe944', coins: 25, @@ -453,7 +469,7 @@ export default { startPersonnel: 0, startVehicles: [], }, - { + 5: { caption: 'Helicopter station', color: '#e7ad2f', coins: 50, @@ -471,7 +487,7 @@ export default { ? 4 : Math.floor(buildingsAmountTotal / 25), }, - { + 6: { caption: 'Police station', color: '#007700', coins: 35, @@ -493,7 +509,7 @@ export default { startVehicles: ['Patrol car'], maxBuildingsFunction: (): number => 1_500, }, - { + 7: { caption: 'Dispatch Center', color: '#24c3ae', coins: 0, @@ -508,7 +524,7 @@ export default { maxBuildingsFunction: (buildingsAmountTotal: number): number => Math.floor(buildingsAmountTotal / 25) + 1, }, - { + 8: { caption: 'Police academy', color: '#225522', coins: 50, @@ -527,7 +543,7 @@ export default { startPersonnel: 0, startVehicles: [], }, - { + 13: { caption: 'Police Aviation', color: '#148423', coins: 50, @@ -545,7 +561,7 @@ export default { ? 4 : Math.floor(buildingsAmountTotal / 25), }, - { + 14: { caption: 'Staging area', coins: 0, credits: 0, @@ -559,7 +575,20 @@ export default { startVehicles: [], maxBuildingsFunction: (): number => 4, }, - { + 15: { + caption: 'Vodní záchranná služba ČČK/Waterrescue', + color: '#ffa500', + coins: 35, + credits: 200_000, + extensions: [], + levelcost: ['1. 10.000', '2. 50.000', '3.-39. 100.000'], + maxBuildings: 'No limit', + maxLevel: 39, + special: '', + startPersonnel: 3, + startVehicles: ['x'], + }, + 16: { caption: 'Prison Cells', coins: 'x', credits: 100_000, @@ -577,7 +606,7 @@ export default { startPersonnel: 0, startVehicles: [], }, - { + 18: { caption: 'Fire station (Small station) ', color: '#aa1111', coins: 25, @@ -597,7 +626,7 @@ export default { startVehicles: ['Type 1 fire engine', 'Type 2 fire engine'], maxBuildingsFunction: (): number => 4_000, }, - { + 19: { caption: 'Police station (Small station)', color: '#116611', coins: 25, @@ -617,7 +646,7 @@ export default { startVehicles: ['Patrol Car'], maxBuildingsFunction: (): number => 1_500, }, - { + 20: { caption: 'Ambulance station (Small station)', color: '#eeb611', coins: 25, @@ -635,28 +664,8 @@ export default { startPersonnel: 3, startVehicles: ['ALS Ambulance'], }, - { - caption: 'Clinic', - color: '#663300', - coins: 25, - credits: 100_000, - extensions: [ - { - caption: 'General Internal', - credits: 10_000, - coins: 10, - duration: '7 Days', - }, - ], - levelcost: ['1. 10.000', '2. 50.000', '3.-5. 100.000'], - maxBuildings: 'No limit', - maxLevel: 5, - special: '', - startPersonnel: 0, - startVehicles: ['Non. You can buy max. 2 Vehicles'], - }, - { - caption: 'Federal Police Station', + 21: { + caption: 'Pyrotechnická služba PČR', color: '#663300', coins: 50, credits: 5_000_000, @@ -668,46 +677,26 @@ export default { startPersonnel: 10, startVehicles: ['FBI Unit'], }, - { - caption: 'Rescue Boat Dock', - color: '#663300', - coins: 35, - credits: 500_000, - extensions: [], - levelcost: ['1. 10.000', '2. 50.000', '3.-16. 100.000'], - maxBuildings: 'No limit', - maxLevel: 16, - special: '', - startPersonnel: 2, - startVehicles: [''], - }, - { - caption: 'Fire Boat Dock', - color: '#663300', - coins: 35, + 22: { + caption: 'Školící středisko VZS ČČK', + color: '#225522', + coins: 50, credits: 500_000, - extensions: [], - levelcost: ['1. 10.000', '2. 50.000', '3.-16. 100.000'], - maxBuildings: 'No limit', - maxLevel: 16, - special: '', - startPersonnel: 2, - startVehicles: [''], - }, - { - caption: 'Firefighting plane station', - color: '#663300', - coins: 65, - credits: 1_500_000, - extensions: [], - levelcost: ['1. 1.500.000'], + extensions: new Array(3).fill({ + caption: 'Additional classroom', + credits: 400_000, + coins: 40, + duration: '7 Days', + }), + levelcost: [], maxBuildings: 'No limit', - maxLevel: 2, - special: '', - startPersonnel: 2, - startVehicles: ['Water drop helicopter'], + maxLevel: 0, + special: + "Finance ministers and admins can (expand) association police schools with the help of credits from the association's treasury.Training course masters and admins can start training courses at association police schools.", + startPersonnel: 0, + startVehicles: [], }, - ], + }, buildingCategories: { 'Fire Department': { buildings: [0, 4, 11, 13, 17], @@ -763,9 +752,9 @@ export default { }, }, small_buildings: { - 0: 13, - 3: 16, - 5: 15, + 0: 18, + 2: 20, + 6: 19, }, vehicleBuildings: [0, 3, 5, 6, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18], cellBuildings: [5], diff --git a/src/libraries.json b/src/libraries.json index 9a06968289..31007dbc34 100644 --- a/src/libraries.json +++ b/src/libraries.json @@ -2,12 +2,12 @@ "@fortawesome/fontawesome-svg-core": { "icon": "https://fontawesome.com/images/favicons/apple-icon-180x180.png", "url": "https://fontawesome.com", - "version": "1.2.32" + "version": "1.2.34" }, "@fortawesome/free-solid-svg-icons": { "icon": "https://fontawesome.com/images/favicons/apple-icon-180x180.png", "url": "https://fontawesome.com", - "version": "5.15.1" + "version": "5.15.2" }, "@fortawesome/vue-fontawesome": { "icon": "https://fontawesome.com/images/favicons/apple-icon-180x180.png", @@ -24,13 +24,13 @@ "version": "3.5.5" }, "@types/leaflet": { - "version": "1.5.19" + "version": "1.5.21" }, "@types/lodash": { - "version": "4.14.167" + "version": "4.14.168" }, "@types/node": { - "version": "14.14.20" + "version": "14.14.22" }, "@types/pdfmake": { "version": "0.1.16" @@ -54,10 +54,10 @@ "version": "1.16.0" }, "@typescript-eslint/eslint-plugin": { - "version": "4.13.0" + "version": "4.14.0" }, "@typescript-eslint/parser": { - "version": "4.13.0" + "version": "4.14.0" }, "@vuepress/plugin-active-header-links": { "icon": "https://vuepress.vuejs.org/hero.png", @@ -104,7 +104,7 @@ "eslint": { "icon": "https://eslint.org/assets/img/favicon.512x512.png", "url": "https://eslint.org", - "version": "7.17.0" + "version": "7.18.0" }, "eslint-plugin-prettier": { "icon": "https://prettier.io/icon.png", @@ -114,7 +114,7 @@ "eslint-plugin-vue": { "icon": "https://vuejs.org/images/logo.png", "url": "https://eslint.vuejs.org", - "version": "7.4.1" + "version": "7.5.0" }, "highcharts": { "icon": "https://www.highcharts.com/images/ico/favicon-192x192.png", @@ -146,12 +146,12 @@ }, "pdfmake": { "url": "http://pdfmake.org", - "version": "0.1.69" + "version": "0.1.70" }, "sass": { "icon": "https://sass-lang.com/assets/img/logos/logo-b6e1ef6e.svg", "url": "https://github.com/sass/dart-sass", - "version": "1.32.4" + "version": "1.32.5" }, "sass-loader": { "icon": "https://webpack.js.org/assets/icon-square-big.svg", @@ -209,7 +209,7 @@ "vue-i18n": { "icon": "https://kazupon.github.io/vue-i18n/vue-i18n-logo.png", "url": "https://github.com/kazupon/vue-i18n#readme", - "version": "8.22.3" + "version": "8.22.4" }, "vue-js-modal": { "url": "http://vue-js-modal.yev.io/", @@ -278,7 +278,7 @@ "webpack-cli": { "icon": "https://webpack.js.org/assets/icon-square-big.svg", "url": "https://webpack.js.org/api/cli/", - "version": "4.3.1" + "version": "4.4.0" }, "webpack-loader-append-prepend": { "icon": "https://webpack.js.org/assets/icon-square-big.svg", diff --git a/src/modules/asyncButtons/assets/buildingPersonal.ts b/src/modules/asyncButtons/assets/buildingPersonal.ts new file mode 100644 index 0000000000..857bca2673 --- /dev/null +++ b/src/modules/asyncButtons/assets/buildingPersonal.ts @@ -0,0 +1,69 @@ +import { $m } from 'typings/Module'; + +export default (LSSM: Vue, $m: $m, MODULE_ID: string): void => { + const $sm = (key: string, args?: Parameters<$m>[1]) => + $m(`buildingPersonal.${key}`, args); + const btns = Array.from( + document.querySelectorAll( + 'a[href^="/personals/"][data-method="delete"]' + ) as NodeListOf + ); + btns.forEach(btn => { + btn.addEventListener('click', async e => { + e.preventDefault(); + btn.removeAttribute('data-confirm'); + btn.removeAttribute('data-method'); + LSSM.$modal.show('dialog', { + title: $sm('deleteModal.title'), + text: $sm('deleteModal.text'), + buttons: [ + { + title: $sm('deleteModal.btnCancel'), + default: true, + handler() { + LSSM.$modal.hide('dialog'); + }, + }, + { + title: $sm('deleteModal.btnConfirm'), + async handler() { + const url = new URL(btn.href); + url.searchParams.append('_method', 'delete'); + url.searchParams.append( + 'authenticity_token', + document + .querySelector('meta[name="csrf-token"]') + ?.getAttribute('content') || '' + ); + await LSSM.$store + .dispatch('api/request', { + url: btn.href, + init: { + method: 'POST', + body: url.searchParams.toString(), + credentials: 'include', + mode: 'cors', + headers: { + 'Accept': + 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', + 'Content-Type': + 'application/x-www-form-urlencoded', + 'Upgrade-Insecure-Requests': '1', + }, + }, + feature: `${MODULE_ID}-buildingPersonal`, + }) + .then(({ status }) => { + if (status !== 200) return; + btn.parentElement?.parentElement?.parentElement?.classList.add( + 'hide' + ); + }); + LSSM.$modal.hide('dialog'); + }, + }, + ], + }); + }); + }); +}; diff --git a/src/modules/asyncButtons/i18n/de_DE.json b/src/modules/asyncButtons/i18n/de_DE.json index 128857cde2..693469cabf 100644 --- a/src/modules/asyncButtons/i18n/de_DE.json +++ b/src/modules/asyncButtons/i18n/de_DE.json @@ -1,4 +1,12 @@ { + "buildingPersonal": { + "deleteModal": { + "btnCancel": "Abbrechen", + "btnConfirm": "Kündigen", + "text": "Möchtest du diese Person kündigen?", + "title": "Kündigen?" + } + }, "deleteARR": { "deleteModal": { "btnCancel": "Abbrechen", diff --git a/src/modules/asyncButtons/i18n/de_DE.root.json b/src/modules/asyncButtons/i18n/de_DE.root.json index c1f98a2f38..3f2184ef80 100644 --- a/src/modules/asyncButtons/i18n/de_DE.root.json +++ b/src/modules/asyncButtons/i18n/de_DE.root.json @@ -2,6 +2,10 @@ "description": "Vermeide mit diesem Modul, dass das Spiel neu geladen wird, wenn du bestimmte Knöpfe drückst.", "name": "Asynchrone Knöpfe", "settings": { + "buildingPersonal": { + "description": "Verhindert ein Neuladen, wenn du einer Person kündigst.", + "title": "Personal Kündigen" + }, "buildingTax": { "description": "Verhindert ein Neuladen, wenn du die Kosten von eigenen Zellen oder Krankenhausbetten festlegst.", "title": "Kostenübernahme von Zellen und Betten" diff --git a/src/modules/asyncButtons/i18n/en_AU.json b/src/modules/asyncButtons/i18n/en_AU.json index b33b893b9e..ea73879301 100644 --- a/src/modules/asyncButtons/i18n/en_AU.json +++ b/src/modules/asyncButtons/i18n/en_AU.json @@ -1,4 +1,12 @@ { + "buildingPersonal": { + "deleteModal": { + "btnCancel": "Cancel", + "btnConfirm": "Release", + "text": "Are you sure you want to release this person?", + "title": "Releasing?" + } + }, "deleteARR": { "deleteModal": { "btnCancel": "Cancel", diff --git a/src/modules/asyncButtons/i18n/en_AU.root.json b/src/modules/asyncButtons/i18n/en_AU.root.json index fcf96b36b3..8c147fbeab 100644 --- a/src/modules/asyncButtons/i18n/en_AU.root.json +++ b/src/modules/asyncButtons/i18n/en_AU.root.json @@ -2,6 +2,10 @@ "description": "Avoid with this module that the game is reloaded when you press certain buttons.", "name": "Asynchronous buttons", "settings": { + "buildingPersonal": { + "description": "Prevents reloading when you release personal.", + "title": "Release of personal" + }, "buildingTax": { "description": "Prevents recharging when you set the cost of own cells or hospital beds.", "title": "Cost absorption of cells and beds" diff --git a/src/modules/asyncButtons/i18n/en_GB.json b/src/modules/asyncButtons/i18n/en_GB.json index b33b893b9e..ea73879301 100644 --- a/src/modules/asyncButtons/i18n/en_GB.json +++ b/src/modules/asyncButtons/i18n/en_GB.json @@ -1,4 +1,12 @@ { + "buildingPersonal": { + "deleteModal": { + "btnCancel": "Cancel", + "btnConfirm": "Release", + "text": "Are you sure you want to release this person?", + "title": "Releasing?" + } + }, "deleteARR": { "deleteModal": { "btnCancel": "Cancel", diff --git a/src/modules/asyncButtons/i18n/en_GB.root.json b/src/modules/asyncButtons/i18n/en_GB.root.json index fcf96b36b3..8c147fbeab 100644 --- a/src/modules/asyncButtons/i18n/en_GB.root.json +++ b/src/modules/asyncButtons/i18n/en_GB.root.json @@ -2,6 +2,10 @@ "description": "Avoid with this module that the game is reloaded when you press certain buttons.", "name": "Asynchronous buttons", "settings": { + "buildingPersonal": { + "description": "Prevents reloading when you release personal.", + "title": "Release of personal" + }, "buildingTax": { "description": "Prevents recharging when you set the cost of own cells or hospital beds.", "title": "Cost absorption of cells and beds" diff --git a/src/modules/asyncButtons/i18n/en_US.json b/src/modules/asyncButtons/i18n/en_US.json index b33b893b9e..ea73879301 100644 --- a/src/modules/asyncButtons/i18n/en_US.json +++ b/src/modules/asyncButtons/i18n/en_US.json @@ -1,4 +1,12 @@ { + "buildingPersonal": { + "deleteModal": { + "btnCancel": "Cancel", + "btnConfirm": "Release", + "text": "Are you sure you want to release this person?", + "title": "Releasing?" + } + }, "deleteARR": { "deleteModal": { "btnCancel": "Cancel", diff --git a/src/modules/asyncButtons/i18n/en_US.root.json b/src/modules/asyncButtons/i18n/en_US.root.json index fcf96b36b3..8c147fbeab 100644 --- a/src/modules/asyncButtons/i18n/en_US.root.json +++ b/src/modules/asyncButtons/i18n/en_US.root.json @@ -2,6 +2,10 @@ "description": "Avoid with this module that the game is reloaded when you press certain buttons.", "name": "Asynchronous buttons", "settings": { + "buildingPersonal": { + "description": "Prevents reloading when you release personal.", + "title": "Release of personal" + }, "buildingTax": { "description": "Prevents recharging when you set the cost of own cells or hospital beds.", "title": "Cost absorption of cells and beds" diff --git a/src/modules/asyncButtons/i18n/nl_NL.json b/src/modules/asyncButtons/i18n/nl_NL.json index 0fbec6c228..4004988a41 100644 --- a/src/modules/asyncButtons/i18n/nl_NL.json +++ b/src/modules/asyncButtons/i18n/nl_NL.json @@ -1,4 +1,12 @@ { + "buildingPersonal": { + "deleteModal": { + "btnCancel": "Annuleren", + "btnConfirm": "Verwijderen", + "text": "Wil je deze persoon verwijderen?", + "title": "Verwijderen?" + } + }, "deleteARR": { "deleteModal": { "btnCancel": "Annuleren", diff --git a/src/modules/asyncButtons/i18n/nl_NL.root.json b/src/modules/asyncButtons/i18n/nl_NL.root.json index 5eb8149fbc..03a037c2dd 100644 --- a/src/modules/asyncButtons/i18n/nl_NL.root.json +++ b/src/modules/asyncButtons/i18n/nl_NL.root.json @@ -2,6 +2,10 @@ "description": "Voorkom met deze module dat het venster opnieuw wordt geladen als je op bepaalde knoppen drukt.", "name": "Niet herladen", "settings": { + "buildingPersonal": { + "description": "Voorkomt herladen wanneer u een personeelslid verwijdert", + "title": "Personeel verwijderen" + }, "buildingTax": { "description": "Voorkomt herladen wanneer u de kosten van eigen cellen of ziekenhuisbedden instelt.", "title": "Kosten van cellen en bedden" diff --git a/src/modules/asyncButtons/i18n/pl_PL.json b/src/modules/asyncButtons/i18n/pl_PL.json new file mode 100644 index 0000000000..2aaf76418c --- /dev/null +++ b/src/modules/asyncButtons/i18n/pl_PL.json @@ -0,0 +1,37 @@ +{ + "deleteARR": { + "deleteModal": { + "btnCancel": "anuluj", + "btnConfirm": "usuń", + "text": "Czy chcesz usunąć ten wpis (Zasad reagowania)", + "title": "Usunąć?" + } + }, + "forumPost": { + "deleteModal": { + "btnCancel": "anuluj", + "btnConfirm": "usuń", + "text": "Czy chcesz usunąć ten wpis?", + "title": "Usunąć?" + } + }, + "memberlistManageUser": { + "hide": "ukryj", + "kickModal": { + "btnCancel": "anuluj", + "btnConfirm": "Wyrzuć (Kick)", + "text": "Czy naprawdę chcesz wyrzucić gracza?", + "title": "Wyrzucić?" + }, + "set": "zestaw", + "unset": "usuń" + }, + "memberlistRoles": { + "admin": "Administrator sojuszu", + "aufsichtsrat": "Dziennik działań moderatora", + "coadmin": "Współadministrator sojuszu", + "finance": "Finanse sojuszu", + "schooling": "Szkoleniowy sojuszu", + "sprechwunsch_admin": "Żądanie transportu - Administrator" + } +} \ No newline at end of file diff --git a/src/modules/asyncButtons/main.ts b/src/modules/asyncButtons/main.ts index 48cbf1d56c..2141a38c1e 100644 --- a/src/modules/asyncButtons/main.ts +++ b/src/modules/asyncButtons/main.ts @@ -25,6 +25,17 @@ export default (async (LSSM, MODULE_ID, $m) => { ).default(LSSM, buildings, MODULE_ID); } + if ( + window.location.pathname.match(/^\/buildings\/\d+\/personals\/?$/) && + (await getSetting('buildingPersonal')) + ) { + ( + await import( + /* webpackChunkName: "modules/asyncButtons/buildingPersonal" */ './assets/buildingPersonal' + ) + ).default(LSSM, $m, MODULE_ID); + } + if ( window.location.pathname.match(/^\/missions\/\d+\/?$/) && missions.length diff --git a/src/modules/asyncButtons/register.json b/src/modules/asyncButtons/register.json index befed50f6c..0f0eac7686 100644 --- a/src/modules/asyncButtons/register.json +++ b/src/modules/asyncButtons/register.json @@ -1,5 +1,5 @@ { "dev": true, - "location": "(^/(buildings|missions|alliance_threads)/\\d+/?$)|(^/(verband/mitglieder|aaos)/?)", + "location": "(^/(buildings|missions|alliance_threads)/\\d+/?$)|(^/(verband/mitglieder|aaos)/?)|(^/buildings/\\d+/personals/?$)", "settings": true } \ No newline at end of file diff --git a/src/modules/asyncButtons/settings.ts b/src/modules/asyncButtons/settings.ts index 4a0628942c..1009061c5c 100644 --- a/src/modules/asyncButtons/settings.ts +++ b/src/modules/asyncButtons/settings.ts @@ -27,4 +27,8 @@ export default (() => ({ type: 'toggle', default: true, }, + buildingPersonal: { + type: 'toggle', + default: true, + }, })) as ModuleSettingFunction; diff --git a/src/modules/buildingHover/i18n/pl_PL.root.json b/src/modules/buildingHover/i18n/pl_PL.root.json new file mode 100644 index 0000000000..ab66aa81b5 --- /dev/null +++ b/src/modules/buildingHover/i18n/pl_PL.root.json @@ -0,0 +1,4 @@ +{ + "description": "Pokazuje krótkie informacje o każdym budynku po najechaniu na niego myszą na mapie.", + "name": "Krótkie informacje o budynku" +} \ No newline at end of file diff --git a/src/modules/chatExtras/i18n/pl_PL.root.json b/src/modules/chatExtras/i18n/pl_PL.root.json new file mode 100644 index 0000000000..2e8bcbdbd5 --- /dev/null +++ b/src/modules/chatExtras/i18n/pl_PL.root.json @@ -0,0 +1,14 @@ +{ + "description": "Rozszerza czat o kilka fajnych funkcji", + "name": "Rozszerzony czat", + "settings": { + "chatTime": { + "description": "Dostosowuje sygnaturę czasową do ustawionego formatu!", + "title": "Własny format sygnatury czasowej" + }, + "chatTimeFormat": { + "description": "Tutaj możesz wybrać żądany format. Możesz znaleźć pomoc here.", + "title": "Format daty i godziny" + } + } +} \ No newline at end of file diff --git a/src/modules/extendedBuilding/assets/buildingsLeftRight.ts b/src/modules/extendedBuilding/assets/buildingsLeftRight.ts index 51f426829e..7581199805 100644 --- a/src/modules/extendedBuilding/assets/buildingsLeftRight.ts +++ b/src/modules/extendedBuilding/assets/buildingsLeftRight.ts @@ -8,11 +8,17 @@ export default (LSSM: Vue): void => { ({ id }) => id === buildingId ); if (!building) return; - const buildings = ( - (LSSM.$store.getters['api/buildingsByType'] as { - [type: number]: Building[]; - })[building.building_type] || [] - ) + const buildingsByType = LSSM.$store.getters['api/buildingsByType'] as { + [type: number]: Building[]; + }; + const small_building = + ((LSSM.$t('small_buildings') as unknown) as { [type: number]: number })[ + building.building_type + ] ?? (NaN as number); + const buildings = [ + ...(buildingsByType[building.building_type] || []), + ...(isNaN(small_building) ? [] : buildingsByType[small_building] || []), + ] .map(({ id }) => id) .sort(); const position = buildings.indexOf(buildingId); diff --git a/src/modules/extendedBuilding/assets/enhanceVehicleList.ts b/src/modules/extendedBuilding/assets/enhanceVehicleList.ts index eda82299f3..2570b16aeb 100644 --- a/src/modules/extendedBuilding/assets/enhanceVehicleList.ts +++ b/src/modules/extendedBuilding/assets/enhanceVehicleList.ts @@ -145,7 +145,7 @@ export default async ( ]?.caption; typeWrapper.append(vehicleTypeNode); if (storedVehicle.vehicle_type_caption) { - const customTypeNode = document.createElement('button'); + const customTypeNode = document.createElement('a'); customTypeNode.classList.add( 'btn', 'btn-default', diff --git a/src/modules/extendedBuilding/i18n/pl_PL.root.json b/src/modules/extendedBuilding/i18n/pl_PL.root.json new file mode 100644 index 0000000000..f04f26a3c1 --- /dev/null +++ b/src/modules/extendedBuilding/i18n/pl_PL.root.json @@ -0,0 +1,62 @@ +{ + "description": "Dodaje przydatne funkcje do budynków.", + "name": "Rozszerzony widok budynku", + "settings": { + "buildingsLeftRight": { + "description": "Pokazuje w budynkach, ile innych budynków tego samego typu w danym kierunku.", + "title": "Liczba budynków tego samego typu" + }, + "enhanceVehicleList": { + "description": "Rozszerza listę pojazdów o przydatne funkcje - niektóre z nich można regulować.", + "title": "Rozszerz listę pojazdów" + }, + "enhancedPersonnelAssignment": { + "description": "Daje możliwość ukrycia personelu bez odpowiedniego przeszkolenia.", + "title": "Lepsza alokacja personelu" + }, + "expansions": { + "description": "Pokazuje rozszerzenia budynku bez konieczności wcześniejszego naciskania karty rozszerzeń.", + "title": "Pokaż rozszerzenia bezpośrednio" + }, + "fastDispatchChooser": { + "description": "Pozwala wybrać bezpośrednio w budynku, do którego centrum sterowania jest przypisane, bez konieczności wcześniejszego uzyskiwania dostępu do ustawień.", + "title": "Szybki wybór centrum sterowania" + }, + "fmsSwitch": { + "description": "Umożliwia przełączanie się między stanem 2 i 6, klikając stan.", + "title": "Szybka zmiana statusu 2 <=> 6 switch" + }, + "personnelAssignmentBtn": { + "description": "Wstawia obok przycisku 'Edytuj ', aby dodać przycisk do przydziału personelu. - Jeszcze nie działa w centrach kontroli!", + "title": "Przycisk przydziału personelu" + }, + "personnelDemands": { + "description": "Pokazuje, ile personelu jest wymagane przy minimalnym i maksymalnym obłożeniu pojazdu.", + "title": "Wymagania dotyczące personelu" + }, + "schoolingSummary": { + "description": "Pokazuje w przeglądzie personelu budynku, ile osób przeszło które szkolenie (a).", + "title": "Podsumowanie personelu" + }, + "vehicleTypes": { + "description": "Pokazuje typ pojazdu (i jeśli jest dostępna, własną klasę pojazdu) w oddzielnej kolumnie", + "title": "Typ pojazdu" + }, + "vehiclesPersonnelAssigned": { + "description": "Pokazuje, ile osób jest przypisanych do pojazdu.", + "title": "Przydzielona załoga" + }, + "vehiclesPersonnelColorized": { + "description": "Podświetla liczbę przydzielonych załóg na czerwono, jeśli jest mniejsza niż maksymalna możliwa, a na zielono, gdy maksymalna liczba zostanie osiągnięta.", + "title": "Kod koloru dla przydzielonej załogi" + }, + "vehiclesPersonnelCurrent": { + "description": "Pokazuje, ile osób aktualnie siedzi w pojeździe.", + "title": "Obecna załoga" + }, + "vehiclesPersonnelMax": { + "description": "Pokazuje maksymalną liczbę osób, które mogą się zmieścić w pojeździe.", + "title": "Maksymalna załoga" + } + } +} \ No newline at end of file diff --git a/src/modules/extendedCallList/assets/vehicleMissionParticipitationState.ts b/src/modules/extendedCallList/assets/vehicleMissionParticipitationState.ts new file mode 100644 index 0000000000..89fc7a019c --- /dev/null +++ b/src/modules/extendedCallList/assets/vehicleMissionParticipitationState.ts @@ -0,0 +1,36 @@ +import { Vehicle } from 'typings/Vehicle'; + +export default async (LSSM: Vue, MODULE_ID: string): Promise => { + await LSSM.$store.dispatch('api/registerVehiclesUsage', { + feature: `${MODULE_ID}-vehicleMissionParticipitationState`, + }); + + const vehicles: Vehicle[] = LSSM.$store.state.api.vehicles; + const missions: number[] = []; + vehicles.forEach(({ target_type, target_id }) => { + if (target_type === 'mission' && target_id) missions.push(target_id); + }); + document + .querySelectorAll( + '#mission_own table tbody tr, #mission_alliance table tbody tr' + ) + .forEach(row => { + const span = document.createElement('span'); + span.classList.add( + 'glyphicon', + missions.includes( + parseInt( + row + .querySelector( + 'a[href^="/missions/"]' + ) + ?.getAttribute('href') + ?.replace(/.*?(?=\d+$)/, '') ?? '-1' + ) + ) + ? 'glyphicon-user' + : 'glyphicon-asterisk' + ); + row.firstElementChild?.append(span); + }); +}; diff --git a/src/modules/extendedCallList/main.ts b/src/modules/extendedCallList/main.ts index ec6fccd639..3be2265c55 100644 --- a/src/modules/extendedCallList/main.ts +++ b/src/modules/extendedCallList/main.ts @@ -8,6 +8,14 @@ export default (async (LSSM, MODULE_ID) => { }); }; + if (window.location.pathname.match(/^\/vehicles\/\d+\/?/)) { + return await ( + await import( + /* webpackChunkName: "modules/extendedCallList/vehicleMissionParticipitationState" */ './assets/vehicleMissionParticipitationState' + ) + ).default(LSSM, MODULE_ID); + } + if (await getSetting('remainingTime')) { ( await import( diff --git a/src/modules/extendedCallList/register.json b/src/modules/extendedCallList/register.json index ca1689d591..f7417c8dd1 100644 --- a/src/modules/extendedCallList/register.json +++ b/src/modules/extendedCallList/register.json @@ -1,4 +1,4 @@ { - "location": "^/?$", + "location": "^(/vehicles/\\d+)/?$", "settings": true } \ No newline at end of file diff --git a/src/modules/extendedCallWindow/assets/generationDate.ts b/src/modules/extendedCallWindow/assets/generationDate.ts index c7ceba4524..a4b9ad60d2 100644 --- a/src/modules/extendedCallWindow/assets/generationDate.ts +++ b/src/modules/extendedCallWindow/assets/generationDate.ts @@ -28,9 +28,10 @@ export default (LSSM: Vue, yellowBorder: number, redBorder: boolean): void => { if (yellowBorder && moment().diff(generationDate, 'hours') >= yellowBorder) generationDateNode.style.border = 'yellow 1px solid'; - if ( - redBorder && - (generationDate.hours() <= 3 || generationDate.day() !== moment().day()) - ) + const nextDeletion = moment(); + if (moment().hours() > 3) nextDeletion.add(1, 'd'); + nextDeletion.hours(3).minutes(0); + + if (redBorder && generationDate.isBefore(nextDeletion.subtract(1, 'd'))) generationDateNode.style.border = 'red 1px solid'; }; diff --git a/src/modules/extendedCallWindow/i18n/cs_CZ.root.json b/src/modules/extendedCallWindow/i18n/cs_CZ.root.json index 1089fe4188..fff6866acc 100644 --- a/src/modules/extendedCallWindow/i18n/cs_CZ.root.json +++ b/src/modules/extendedCallWindow/i18n/cs_CZ.root.json @@ -126,20 +126,7 @@ 9, 12, 17, - 21, - 22, - 24, - 30, - 31, - 32, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41 + 21 ] }, { @@ -163,8 +150,7 @@ 16, 19, 23, - 26, - 47 + 26 ] }, { @@ -175,16 +161,6 @@ 24, 25 ] - }, - { - "name": "FBI", - "vehicleTypes": [ - 42, - 43, - 44, - 45, - 46 - ] } ] } diff --git a/src/modules/extendedCallWindow/i18n/nl_NL.js b/src/modules/extendedCallWindow/i18n/nl_NL.js index 53b9b54cb2..a0d6034242 100644 --- a/src/modules/extendedCallWindow/i18n/nl_NL.js +++ b/src/modules/extendedCallWindow/i18n/nl_NL.js @@ -34,6 +34,7 @@ module.exports = { elw2: 'Hoofdofficier van Dienst - Brandweer', elw3: 'Commandovoertuig of haakarmbak', dlk: 'Redvoertuig', + wasser_amount: 'Water (in Liters)', arff: 'Crashtender', elw_airport: 'Airport Fire Officer / On Scene Commander', rtw: 'Ambulance', @@ -46,7 +47,8 @@ module.exports = { ambulance_or_rapid_responder: 'Ambulance of Rapid Responder', kdow_orgl_any: 'OVD-G of OVDG-RR', fly_car_any: 'OVDG-RR of Rapid Responder', - rw: 'Hulpverleningsvoertuig', + rw_only: 'Hulpverleningsvoertuig', + rw: 'HV of TS-HV', gwl2wasser: 'Slangenwagen / Watertankwagen of Watertransportsysteem-haakarmbak', gwl2wasser_only: 'Alleen Slangenwagen / Watertankwagen', diff --git a/src/modules/generalExtensions/assets/extensionCloseCall.ts b/src/modules/generalExtensions/assets/extensionCloseCall.ts new file mode 100644 index 0000000000..1b21cf7d17 --- /dev/null +++ b/src/modules/generalExtensions/assets/extensionCloseCall.ts @@ -0,0 +1,18 @@ +export default (): void => { + const listenerTarget = document.getElementById('radio_messages_important'); + if (!listenerTarget) return; + listenerTarget.addEventListener('click', event => { + const clickedBtn = event.target as HTMLElement | null; + + if ( + clickedBtn && + clickedBtn.nextElementSibling?.hasAttribute('vehicle_id') + ) { + clickedBtn.classList.add('radio_message_close'); + clickedBtn.setAttribute( + 'vehicle_id', + clickedBtn.nextElementSibling?.getAttribute('vehicle_id') ?? '0' + ); + } + }); +}; diff --git a/src/modules/generalExtensions/docs/de_DE.md b/src/modules/generalExtensions/docs/de_DE.md index 0078cf3e34..7e90bd9c90 100644 --- a/src/modules/generalExtensions/docs/de_DE.md +++ b/src/modules/generalExtensions/docs/de_DE.md @@ -68,3 +68,9 @@ Mittels `←` und `→` kannst du auch durch die Vorschläge durchwechseln und m ::: Als zusätzliches Feature werden sog. gängige Shortcuts automatisch ersetzt. Zum Beispiel wird `;)` in `😉` ersetzt, sobald du ein Leerzeichen dahinter setzt. + +## Ausbreitung verbesserter FMS 5 + +Nervt es dich auch das bei Ausbreitungen der Sprechwunsch beim Klick auf "zum Einsatz" nicht beendet wird? Diese kleine Erweiterung fügt genau das ein. + +Ausbreitungssprechwünsche werden auch beim Klick auf "zum Einsatz" geschlossen. \ No newline at end of file diff --git a/src/modules/generalExtensions/i18n/de_DE.root.json b/src/modules/generalExtensions/i18n/de_DE.root.json index 57af115ed5..ff843f2af9 100644 --- a/src/modules/generalExtensions/i18n/de_DE.root.json +++ b/src/modules/generalExtensions/i18n/de_DE.root.json @@ -14,6 +14,10 @@ "description": "Zeigt dir Emojis zur auswahl an, wenn du : gefolgt von Text eingibst.", "title": "Emoji-Picker" }, + "extensionCloseCall": { + "description": "Schließt Ausbreitungssprechwünsche auch bei drücken des Buttons \"zum Einsatz\".", + "title": "Ausbreitung verbesserter FMS 5" + }, "linkPreviews": { "buildings": "Gebäude", "description": "Zeigt eine kleine Infobox an, wenn du mit der Maus kurz über einem Link wartest. Du kannst hier einstellen, bei welchen Links die Infobox aktiviert sein soll:", diff --git a/src/modules/generalExtensions/i18n/en_AU.root.json b/src/modules/generalExtensions/i18n/en_AU.root.json index a62c11b750..5a9f14bd8c 100644 --- a/src/modules/generalExtensions/i18n/en_AU.root.json +++ b/src/modules/generalExtensions/i18n/en_AU.root.json @@ -14,6 +14,10 @@ "description": "Shows you emojis for selection when you type : followed by text.", "title": "Emoji picker" }, + "extensionCloseCall": { + "description": "Closes propagation speech requests even if the button \"to mission\" is pressed.", + "title": "Spreading improved FMS 5" + }, "linkPreviews": { "buildings": "Buildings", "description": "Shows a small info box when you wait with the mouse over a link for a short time. Here you can set for which links the infobox should be activated:", diff --git a/src/modules/generalExtensions/i18n/en_GB.root.json b/src/modules/generalExtensions/i18n/en_GB.root.json index a62c11b750..5a9f14bd8c 100644 --- a/src/modules/generalExtensions/i18n/en_GB.root.json +++ b/src/modules/generalExtensions/i18n/en_GB.root.json @@ -14,6 +14,10 @@ "description": "Shows you emojis for selection when you type : followed by text.", "title": "Emoji picker" }, + "extensionCloseCall": { + "description": "Closes propagation speech requests even if the button \"to mission\" is pressed.", + "title": "Spreading improved FMS 5" + }, "linkPreviews": { "buildings": "Buildings", "description": "Shows a small info box when you wait with the mouse over a link for a short time. Here you can set for which links the infobox should be activated:", diff --git a/src/modules/generalExtensions/i18n/en_US.root.json b/src/modules/generalExtensions/i18n/en_US.root.json index a62c11b750..5a9f14bd8c 100644 --- a/src/modules/generalExtensions/i18n/en_US.root.json +++ b/src/modules/generalExtensions/i18n/en_US.root.json @@ -14,6 +14,10 @@ "description": "Shows you emojis for selection when you type : followed by text.", "title": "Emoji picker" }, + "extensionCloseCall": { + "description": "Closes propagation speech requests even if the button \"to mission\" is pressed.", + "title": "Spreading improved FMS 5" + }, "linkPreviews": { "buildings": "Buildings", "description": "Shows a small info box when you wait with the mouse over a link for a short time. Here you can set for which links the infobox should be activated:", diff --git a/src/modules/generalExtensions/i18n/fr_FR.root.json b/src/modules/generalExtensions/i18n/fr_FR.root.json index aa09d947a7..d8e11a9b7d 100644 --- a/src/modules/generalExtensions/i18n/fr_FR.root.json +++ b/src/modules/generalExtensions/i18n/fr_FR.root.json @@ -14,6 +14,10 @@ "description": "Affiche une séléction d'émoji quand vous tapez : suivi d'un texte.", "title": "Émojis" }, + "extensionCloseCall": { + "description": "Closes propagation speech requests even if the button \"to mission\" is pressed.", + "title": "Spreading improved FMS 5" + }, "linkPreviews": { "buildings": "Bâtiments", "description": "Affiche une info-bulle au survol d'un lien. Choisissez ici pour quels lien les info-bulles sont actives :", diff --git a/src/modules/generalExtensions/i18n/it_IT.root.json b/src/modules/generalExtensions/i18n/it_IT.root.json index 686d1afb4e..5d8a5713df 100644 --- a/src/modules/generalExtensions/i18n/it_IT.root.json +++ b/src/modules/generalExtensions/i18n/it_IT.root.json @@ -14,6 +14,10 @@ "description": "Ti mostra le emoji per la selezione quando digiti : seguito da testo.", "title": "Selettore di emoji" }, + "extensionCloseCall": { + "description": "Closes propagation speech requests even if the button \"to mission\" is pressed.", + "title": "Spreading improved FMS 5" + }, "linkPreviews": { "buildings": "Edifici", "description": "Ti mostra un piccolo box di informazioni se ti fermi col mouse sopra un link per un breve periodo. Qui puoi impostare per quali link la finestra d'informazioni dovrebbe essere attivata:", diff --git a/src/modules/generalExtensions/i18n/nb_NO.root.json b/src/modules/generalExtensions/i18n/nb_NO.root.json index 583818c115..aa18441411 100644 --- a/src/modules/generalExtensions/i18n/nb_NO.root.json +++ b/src/modules/generalExtensions/i18n/nb_NO.root.json @@ -14,6 +14,10 @@ "description": "Shows you emojis for selection when you type : followed by text.", "title": "Emoji picker" }, + "extensionCloseCall": { + "description": "Closes propagation speech requests even if the button \"to mission\" is pressed.", + "title": "Spreading improved FMS 5" + }, "linkPreviews": { "buildings": "Buildings", "description": "Shows a small info box when you wait with the mouse over a link for a short time. Here you can set for which links the infobox should be activated:", diff --git a/src/modules/generalExtensions/i18n/nl_NL.root.json b/src/modules/generalExtensions/i18n/nl_NL.root.json index 4910268cef..d40f776d7a 100644 --- a/src/modules/generalExtensions/i18n/nl_NL.root.json +++ b/src/modules/generalExtensions/i18n/nl_NL.root.json @@ -14,6 +14,10 @@ "description": "Toont je emoji's die je kunt selecteren wanneer je typt : gevolgd door tekst.", "title": "Emoji-kiezer" }, + "extensionCloseCall": { + "description": "Sluit de uitbreidingsspraakaanvraag ook bij het indrukken van de knop \"Naar incident\".", + "title": "Uitbreiding verbeterde status 7" + }, "linkPreviews": { "buildings": "Gebouwen", "description": "Toont een klein informatievenster als u een korte tijd met de muis op een link wacht. Hier kunt u instellen voor welke links de infobox moet worden geactiveerd:", diff --git a/src/modules/generalExtensions/i18n/sv_SE.root.json b/src/modules/generalExtensions/i18n/sv_SE.root.json index 7dcf70cff8..bfa1109fc0 100644 --- a/src/modules/generalExtensions/i18n/sv_SE.root.json +++ b/src/modules/generalExtensions/i18n/sv_SE.root.json @@ -14,6 +14,10 @@ "description": "Visar dig emojis för val när du skriver: följt av text.", "title": "Emoji-picker" }, + "extensionCloseCall": { + "description": "Closes propagation speech requests even if the button \"to mission\" is pressed.", + "title": "Spreading improved FMS 5" + }, "linkPreviews": { "byggnader": "Byggnader", "description": "Visar en liten inforuta när du väntar med musen över en länk en kort stund. Här kan du ställa in för vilka länkar infoboxen ska aktiveras:", diff --git a/src/modules/generalExtensions/main.ts b/src/modules/generalExtensions/main.ts index 01918afc0a..7e787b0c76 100644 --- a/src/modules/generalExtensions/main.ts +++ b/src/modules/generalExtensions/main.ts @@ -61,6 +61,16 @@ export default (async (LSSM, MODULE_ID, $m) => { ) ).default(LSSM, mapUndo, ownMapMarkers, getSetting, MODULE_ID); } + if ( + window.location.pathname === '/' && + (await getSetting('extensionCloseCall')) + ) { + ( + await import( + /* webpackChunkName: "modules/generalExtensions/extensionCloseCall" */ './assets/extensionCloseCall' + ) + ).default(); + } const saveLastBuildingType = await getSetting( 'saveLastBuildingType' ); diff --git a/src/modules/generalExtensions/settings.ts b/src/modules/generalExtensions/settings.ts index f89f200b18..2ed604357a 100644 --- a/src/modules/generalExtensions/settings.ts +++ b/src/modules/generalExtensions/settings.ts @@ -54,4 +54,8 @@ export default (() => ({ deleteSingleProtocolEntry: { type: 'hidden', }, + extensionCloseCall: { + type: 'toggle', + default: true, + }, })) as ModuleSettingFunction; diff --git a/src/modules/missionHelper/i18n/de_DE.json b/src/modules/missionHelper/i18n/de_DE.json index 3e50c279a5..b44e2eac37 100644 --- a/src/modules/missionHelper/i18n/de_DE.json +++ b/src/modules/missionHelper/i18n/de_DE.json @@ -9,6 +9,7 @@ "nef": "Wahrscheinlichkeit für einen Notarzt", "patient_allow_first_responder_chance": "First Responder Wahrscheinlichkeit", "patient_at_end_of_mission": "Der Patient tritt erst am Ende des Einsatzes auf! | Die Patienten treten erst am Ende des Einsatzes auf!", + "patient_other_treatment": "Wahrscheinlichkeit für Tragehilfe", "patient_transport": "Transportwahrscheinlichkeit", "possible_patient": "Patient maximal | Patienten maximal", "possible_patient_exact": "genau {n} Patient | genau {n} Patienten", diff --git a/src/modules/missionHelper/i18n/en_AU.root.json b/src/modules/missionHelper/i18n/en_AU.root.json index ea7ba7954f..5bf3a849d6 100644 --- a/src/modules/missionHelper/i18n/en_AU.root.json +++ b/src/modules/missionHelper/i18n/en_AU.root.json @@ -85,12 +85,6 @@ "title": "Show Heavy Rescue / rescue engine instead of firetrucks" } }, - "patient": { - "code_possible": { - "description": "Shows possible patient codes", - "title": "Details of possible patient codes" - } - }, "patients": { "content": { "description": "Shows details about possible patients.", diff --git a/src/modules/missionHelper/i18n/en_GB.json b/src/modules/missionHelper/i18n/en_GB.json index 7d4eb616b9..4f430dc12e 100644 --- a/src/modules/missionHelper/i18n/en_GB.json +++ b/src/modules/missionHelper/i18n/en_GB.json @@ -4,6 +4,8 @@ "followups": "Follow-up Mission | Follow-up Missions", "generated_by": "Generated by", "patients": { + "code_possible": "Possible Patient Codes", + "critical_care": "Critical Care Chance", "helicopter": "Probability for HEMS", "patient_allow_first_responder_chance": "First Responder Probability", "patient_at_end_of_mission": "The patient only appears at the end of the operation!", diff --git a/src/modules/missionHelper/i18n/en_GB.root.json b/src/modules/missionHelper/i18n/en_GB.root.json index e6018ac844..a999387b91 100644 --- a/src/modules/missionHelper/i18n/en_GB.root.json +++ b/src/modules/missionHelper/i18n/en_GB.root.json @@ -80,17 +80,19 @@ "title": "Show Heavy Rescue / rescue engine instead of firetrucks" } }, - "patient": { + "patients": { "code_possible": { "description": "Shows possible patient codes", "title": "Details of possible patient codes" - } - }, - "patients": { + }, "content": { "description": "Shows details about possible patients.", "title": "Details of potential patients" }, + "critical_care": { + "description": "Shows the possible Critical Care Chance", + "title": "Details of possible Critical Chances" + }, "hideWhenNoNeed": { "description": "Hides the patient details if there are no more patients and patients do not appear until the end of the assignment.", "title": "Show patient details only when needed" diff --git a/src/modules/missionHelper/i18n/en_US.root.json b/src/modules/missionHelper/i18n/en_US.root.json index c85c4ebf12..1a574b2136 100644 --- a/src/modules/missionHelper/i18n/en_US.root.json +++ b/src/modules/missionHelper/i18n/en_US.root.json @@ -98,13 +98,11 @@ "title": "Show Heavy Rescue / rescue engine instead of firetrucks" } }, - "patient": { + "patients": { "code_possible": { "description": "Shows possible patient codes", "title": "Details of possible patient codes" - } - }, - "patients": { + }, "content": { "description": "Shows details about possible patients.", "title": "Details of potential patients" diff --git a/src/modules/missionHelper/i18n/fr_FR.root.json b/src/modules/missionHelper/i18n/fr_FR.root.json index 879ddf2d08..6cc567f5a0 100644 --- a/src/modules/missionHelper/i18n/fr_FR.root.json +++ b/src/modules/missionHelper/i18n/fr_FR.root.json @@ -85,12 +85,6 @@ "title": "Show Heavy Rescue / rescue engine instead of firetrucks" } }, - "patient": { - "code_possible": { - "description": "Shows possible patient codes", - "title": "Details of possible patient codes" - } - }, "patients": { "content": { "description": "Affiche des détail sur les patients éventuels.", diff --git a/src/modules/missionHelper/i18n/it_IT.root.json b/src/modules/missionHelper/i18n/it_IT.root.json index 1d108d28cb..37e89ea4ab 100644 --- a/src/modules/missionHelper/i18n/it_IT.root.json +++ b/src/modules/missionHelper/i18n/it_IT.root.json @@ -71,13 +71,11 @@ "title": "Mostra Salvataggio Pesante / Motre di salvataggio invece dei camion VVF" } }, - "patient": { + "patients": { "code_possible": { "description": "Mostra i possibili codici dei pazienti", "title": "Dettagli sui possibili codici dei pazienti" - } - }, - "patients": { + }, "content": { "description": "Mostra i dettagli sui potenziali pazienti.", "title": "Dettagli sui potenziali pazienti" diff --git a/src/modules/missionHelper/i18n/nb_NO.json b/src/modules/missionHelper/i18n/nb_NO.json index 1c3097d9d2..602cfbf936 100644 --- a/src/modules/missionHelper/i18n/nb_NO.json +++ b/src/modules/missionHelper/i18n/nb_NO.json @@ -5,6 +5,7 @@ "generated_by": "Generert av", "patients": { "allow_ktw_instead_of_rtw": "En syketransport kan bli brukt.", + "critical_care": "Sannsynlighet for at legevaktslege trengs", "helicopter": "Sannsynlighet for Luftambulanse:", "patient_allow_first_responder_chance": "sjanse for anmodning av First Responder.", "patient_at_end_of_mission": "NB: Pasienten dukker opp på slutten av oppdraget!", diff --git a/src/modules/missionHelper/i18n/nb_NO.root.json b/src/modules/missionHelper/i18n/nb_NO.root.json index 62bb6c7bdc..7bf80334f9 100644 --- a/src/modules/missionHelper/i18n/nb_NO.root.json +++ b/src/modules/missionHelper/i18n/nb_NO.root.json @@ -89,17 +89,15 @@ "title": "Show Heavy Rescue / rescue engine instead of firetrucks" } }, - "patient": { - "code_possible": { - "description": "Shows possible patient codes", - "title": "Details of possible patient codes" - } - }, "patients": { "content": { "description": "Shows details about possible patients.", "title": "Details of potential patients" }, + "critical_care": { + "description": "Viser den mulige kritiske omsorgsmuligheten", + "title": "Detaljer om mulige kritiske sjanser" + }, "hideWhenNoNeed": { "description": "Hides the patient details if there are no more patients and patients do not appear until the end of the assignment.", "title": "Show patient details only when needed" diff --git a/src/modules/missionHelper/i18n/pl_PL.root.json b/src/modules/missionHelper/i18n/pl_PL.root.json index 5160798e19..972b8c7bf7 100644 --- a/src/modules/missionHelper/i18n/pl_PL.root.json +++ b/src/modules/missionHelper/i18n/pl_PL.root.json @@ -86,12 +86,6 @@ "title": "Show Heavy Rescue / rescue engine instead of firetrucks" } }, - "patient": { - "code_possible": { - "description": "Shows possible patient codes", - "title": "Details of possible patient codes" - } - }, "patients": { "content": { "description": "Shows details about possible patients.", diff --git a/src/modules/missionHelper/i18n/sv_SE.root.json b/src/modules/missionHelper/i18n/sv_SE.root.json index d5a0dffdb2..58cde1a353 100644 --- a/src/modules/missionHelper/i18n/sv_SE.root.json +++ b/src/modules/missionHelper/i18n/sv_SE.root.json @@ -67,12 +67,6 @@ "title": "Visa Lastväxlare / Räddningsbil istället för brandbilar" } }, - "patient": { - "code_possible": { - "description": "Shows possible patient codes", - "title": "Details of possible patient codes" - } - }, "patients": { "content": { "description": "Visar detaljer om möjliga patienter.", diff --git a/src/modules/missionHelper/missionHelper.vue b/src/modules/missionHelper/missionHelper.vue index df398bf3a5..0ad01d4a4c 100644 --- a/src/modules/missionHelper/missionHelper.vue +++ b/src/modules/missionHelper/missionHelper.vue @@ -167,6 +167,17 @@ ) +
  • + {{ $m('patients.critical_care') }} +
  • {{ $m('patients.helicopter') }}
  • +
  • + {{ $m('patients.patient_other_treatment') }} +
  • =0.8.1, pdfkit@^0.11.0: linebreak "^1.0.2" png-js "^1.0.0" -pdfmake@^0.1.69: - version "0.1.69" - resolved "https://registry.yarnpkg.com/pdfmake/-/pdfmake-0.1.69.tgz#e4c6dcc9b058ab7a639061e295518a8fd196097d" - integrity sha512-XGMtTpbgEwXsa9DcuKhMowOPVJ+8cnGuJz7LV/bE5pnMmxBXAlMGgidQVyEfEUPFywCU2Y/4xibeX1vEm0hd7g== +pdfmake@^0.1.70: + version "0.1.70" + resolved "https://registry.yarnpkg.com/pdfmake/-/pdfmake-0.1.70.tgz#b5102799deef264defa675dbb2dbf12ad49a9bae" + integrity sha512-xPhkblaQ71U97qhRTPj/1HknAHHFZ3cPRmRdrqEWD2xXBcEjEM3Yw0MIjML8DRy9Dt9n6QRjHVf662f0eLtd7Q== dependencies: iconv-lite "^0.6.2" linebreak "^1.0.2" @@ -8086,10 +8100,10 @@ sass-loader@^10.1.1: schema-utils "^3.0.0" semver "^7.3.2" -sass@^1.32.4: - version "1.32.4" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.32.4.tgz#308bf29dd7f53d44ae4f06580e9a910ad9aa411e" - integrity sha512-N0BT0PI/t3+gD8jKa83zJJUb7ssfQnRRfqN+GIErokW6U4guBpfYl8qYB+OFLEho+QvnV5ZH1R9qhUC/Z2Ch9w== +sass@^1.32.5: + version "1.32.5" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.32.5.tgz#2882d22ad5748c05fa9bff6c3b0ffbc4f4b9e1dc" + integrity sha512-kU1yJ5zUAmPxr7f3q0YXTAd1oZjSR1g3tYyv+xu0HZSl5JiNOaE987eiz7wCUvbm4I9fGWGU2TgApTtcP4GMNQ== dependencies: chokidar ">=2.0.0 <4.0.0" @@ -8286,6 +8300,13 @@ sha.js@^2.4.0, sha.js@^2.4.8: inherits "^2.0.1" safe-buffer "^5.0.1" +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== + dependencies: + kind-of "^6.0.2" + shallow-copy@~0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/shallow-copy/-/shallow-copy-0.0.1.tgz#415f42702d73d810330292cc5ee86eae1a11a170" @@ -9442,10 +9463,10 @@ vue-element-resize-detector@^1.0.6: dependencies: element-resize-detector "^1.2.1" -vue-eslint-parser@^7.3.0: - version "7.3.0" - resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-7.3.0.tgz#894085839d99d81296fa081d19643733f23d7559" - integrity sha512-n5PJKZbyspD0+8LnaZgpEvNCrjQx1DyDHw8JdWwoxhhC+yRip4TAvSDpXGf9SWX6b0umeB5aR61gwUo6NVvFxw== +vue-eslint-parser@^7.4.1: + version "7.4.1" + resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-7.4.1.tgz#e4adcf7876a7379758d9056a72235af18a587f92" + integrity sha512-AFvhdxpFvliYq1xt/biNBslTHE/zbEvSnr1qfHA/KxRIpErmEDrQZlQnvEexednRHmLfDNOMuDYwZL5xkLzIXQ== dependencies: debug "^4.1.1" eslint-scope "^5.0.0" @@ -9459,10 +9480,10 @@ vue-hot-reload-api@^2.3.0: resolved "https://registry.yarnpkg.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz#532955cc1eb208a3d990b3a9f9a70574657e08f2" integrity sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog== -vue-i18n@^8.22.3: - version "8.22.3" - resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-8.22.3.tgz#4ac0fdc3e71d4fe188938c40a9ffca32cde60732" - integrity sha512-Vhyx7sZEmmW/aZLkzSlXei08Rv3hTondx4J9wbOjnThocTIK1QiXV6QRdT4BTnhT24JixDSf6kGkxqCXSaJ3Jw== +vue-i18n@^8.22.4: + version "8.22.4" + resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-8.22.4.tgz#255cbdab4ffa7337c5819b82dd171208af74e385" + integrity sha512-XLI5s0AdqMP2Lf4I4CmdmOq8kjb5DDFGR77wAuxCfpEuYSfhTRyyx6MetgZMiL6Lxa0DasjBOiOcciU3NkL3/Q== vue-js-modal@2.0.0-rc.3: version "2.0.0-rc.3" @@ -9673,14 +9694,15 @@ webpack-chain@^6.0.0: deepmerge "^1.5.2" javascript-stringify "^2.0.1" -webpack-cli@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.3.1.tgz#87a7873bc9c6a4708aa657759274b691e72a04a8" - integrity sha512-/F4+9QNZM/qKzzL9/06Am8NXIkGV+/NqQ62Dx7DSqudxxpAgBqYn6V7+zp+0Y7JuWksKUbczRY3wMTd+7Uj6OA== +webpack-cli@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.4.0.tgz#38c7fa01ea31510f5c490245dd1bb28018792f1b" + integrity sha512-/Qh07CXfXEkMu5S8wEpjuaw2Zj/CC0hf/qbTDp6N8N7JjdGuaOjZ7kttz+zhuJO/J5m7alQEhNk9lsc4rC6xgQ== dependencies: "@discoveryjs/json-ext" "^0.5.0" + "@webpack-cli/configtest" "^1.0.0" "@webpack-cli/info" "^1.2.1" - "@webpack-cli/serve" "^1.2.1" + "@webpack-cli/serve" "^1.2.2" colorette "^1.2.1" commander "^6.2.0" enquirer "^2.3.6" @@ -9690,7 +9712,7 @@ webpack-cli@^4.3.1: interpret "^2.2.0" rechoir "^0.7.0" v8-compile-cache "^2.2.0" - webpack-merge "^4.2.2" + webpack-merge "^5.7.3" webpack-dev-middleware@^3.7.2: version "3.7.2" @@ -9755,13 +9777,21 @@ webpack-log@^2.0.0: ansi-colors "^3.0.0" uuid "^3.3.2" -webpack-merge@^4.1.2, webpack-merge@^4.2.2: +webpack-merge@^4.1.2: version "4.2.2" resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d" integrity sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g== dependencies: lodash "^4.17.15" +webpack-merge@^5.7.3: + version "5.7.3" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.7.3.tgz#2a0754e1877a25a8bbab3d2475ca70a052708213" + integrity sha512-6/JUQv0ELQ1igjGDzHkXbVDRxkfA57Zw7PfiupdLFJYrgFqY5ZP8xxbpp2lU3EPwYx89ht5Z/aDkD40hFCm5AA== + dependencies: + clone-deep "^4.0.1" + wildcard "^2.0.0" + webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1: version "1.4.3" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" @@ -9865,6 +9895,11 @@ widest-line@^3.1.0: dependencies: string-width "^4.0.0" +wildcard@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" + integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== + word-wrap@^1.2.3, word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"