Skip to content

Commit

Permalink
πŸ”€ #1012 from LSS-Manager/dev
Browse files Browse the repository at this point in the history
πŸ”€πŸ”– 4.4.1
  • Loading branch information
jxn-30 authored Nov 19, 2021
2 parents 50fb535 + 38dc6bd commit 8cc19d5
Show file tree
Hide file tree
Showing 67 changed files with 1,377 additions and 14,319 deletions.
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.4.0+20211113.1630",
"version": "4.4.1+20211119.1009",
"license": "CC-BY-NC-SA-4.0",
"scripts": {
"predev": "ts-node scripts predev",
Expand Down Expand Up @@ -29,6 +29,7 @@
"mini-svg-data-uri": "^1.4.3",
"moment": "^2.29.1",
"pdfmake": "^0.2.4",
"qrcode": "^1.4.4",
"semver": "^7.3.5",
"showdown": "^1.9.1",
"ua-parser-js": "^1.0.2",
Expand All @@ -47,18 +48,19 @@
"@types/he": "^1.1.2",
"@types/i18n-js": "^3.8.2",
"@types/jquery": "^3.5.8",
"@types/leaflet": "^1.7.5",
"@types/lodash": "^4.14.176",
"@types/node": "^16.11.7",
"@types/leaflet": "^1.7.6",
"@types/lodash": "^4.14.177",
"@types/node": "^16.11.8",
"@types/pdfmake": "^0.1.19",
"@types/qrcode": "^1.4.1",
"@types/semver": "^7.3.9",
"@types/showdown": "^1.9.4",
"@types/speed-measure-webpack-plugin": "^1.3.4",
"@types/ua-parser-js": "^0.7.36",
"@types/vue-select": "^3.16.0",
"@types/webpack-env": "^1.16.3",
"@typescript-eslint/eslint-plugin": "^5.3.1",
"@typescript-eslint/parser": "^5.3.1",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"@vuepress/plugin-active-header-links": "^1.8.2",
"@vuepress/plugin-back-to-top": "^1.8.2",
"all-contributors-cli": "^6.20.0",
Expand All @@ -68,17 +70,17 @@
"eslint": "^8.2.0",
"eslint-formatter-table": "^7.32.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.0.3",
"eslint-plugin-vue": "^8.1.1",
"html-loader": "^3.0.1",
"moment-timezone": "^0.5.34",
"sass": "^1.43.4",
"sass-loader": "^10.1.1",
"speed-measure-webpack-plugin": "^1.5.0",
"string-replace-loader": "^2.3.0",
"terser": "^5.9.0",
"terser": "^5.10.0",
"ts-loader": "^9.0.0",
"ts-node": "^10.4.0",
"typescript": "^4.4.4",
"typescript": "^4.5.2",
"url-loader": "^4.1.1",
"vue-loader": "^15.9.8",
"vue-template-compiler": "^2.6.14",
Expand Down
2 changes: 1 addition & 1 deletion prebuild/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import setVersion from './setVersion';
console.log('Running LSSM-Prebuild-Scripts...');

console.info('\tsetVersion');
setVersion();
console.info(setVersion());
console.info('\tbuildUserscript');
await buildUserscript();
console.info('\temptyDir');
Expand Down
3 changes: 2 additions & 1 deletion prebuild/setVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ staticConfigs.versions = {};
// @ts-ignore
staticConfigs.versions[process.argv[2] === 'production' ? 'stable' : 'beta'] =
packageJson.version;
export default (): void => {
export default (): string => {
fs.writeFileSync('./package.json', JSON.stringify(packageJson, null, 4));
fs.writeFileSync(
'./static/.configs.json',
JSON.stringify(staticConfigs, null, 4)
);
return packageJson.version;
};
3 changes: 2 additions & 1 deletion scripts/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ChildProcess, execSync } from 'child_process';

import fetchEmojis from './utils/fetchEmojis';
import sort from './sort';

const scripts = process.argv.splice(2);
Expand All @@ -13,7 +14,7 @@ const build = (mode: string) => {
const scriptHandlers = {
sort,
emojis() {
console.log(execSync('ts-node ./scripts/utils/fetchEmojis').toString());
fetchEmojis();
},
lint() {
this.sort();
Expand Down
1 change: 1 addition & 0 deletions scripts/sort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default (): string => {
'typings',
].forEach(folder =>
getJsons(`./${folder}`).forEach(file => {
if (file === './src/utils/emojis.json') return;
currentFile = file;
const sortArray = false;
fs.writeFileSync(
Expand Down
82 changes: 45 additions & 37 deletions scripts/utils/fetchEmojis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,43 +37,51 @@ const writeFile = (emojis: { [unicode: string]: string[] }) => {
);
};

https.get(
'https://raw.githubusercontent.com/joypixels/emoji-toolkit/master/emoji.json',
res => {
let data = '';
res.on('data', chunk => {
data += chunk;
});
res.on('end', () => {
const emojis = JSON.parse(data) as {
[unicode: string]: EmojiData;
};
export default () =>
https.get(
'https://raw.githubusercontent.com/joypixels/emoji-toolkit/master/emoji.json',
res => {
let data = '';
res.on('data', chunk => {
data += chunk;
});
res.on('end', () => {
const emojis = JSON.parse(data) as {
[unicode: string]: EmojiData;
};

writeFile(
Object.fromEntries(
Object.entries(emojis).map(
([
unicode,
{ name, shortname, shortname_alternates, ascii },
]) => [
unicode
.split('-')
.map(n => String.fromCodePoint(parseInt(n, 16)))
.join(''),
[
...new Set([
`:${name
.replace(/[: ,-]/g, '_')
.replace(/_+/g, '_')}:`,
writeFile(
Object.fromEntries(
Object.entries(emojis).map(
([
unicode,
{
name,
shortname,
...shortname_alternates,
...ascii,
]),
],
]
shortname_alternates,
ascii,
},
]) => [
unicode
.split('-')
.map(n =>
String.fromCodePoint(parseInt(n, 16))
)
.join(''),
[
...new Set([
`:${name
.replace(/[: ,-]/g, '_')
.replace(/_+/g, '_')}:`,
shortname,
...shortname_alternates,
...ascii,
]),
],
]
)
)
)
);
});
}
);
);
});
}
);
10 changes: 10 additions & 0 deletions src/LSSM-Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@
</li>
<li role="presentation">
<label>
<button
@click="resetIconBg"
class="pull-right btn btn-xs btn-default"
>
Reset
</button>
Icon
<input
type="color"
Expand Down Expand Up @@ -409,6 +415,10 @@ export default Vue.extend<
`url("${dataURL}")`
);
},
resetIconBg() {
this.iconBg = this.$store.state.policechief ? '#004997' : '#C9302C';
this.storeIconBg();
},
},
beforeMount() {
this.iconBg = null;
Expand Down
36 changes: 36 additions & 0 deletions src/i18n/cs_CZ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,42 @@ export default {
schooling: 'ZΓ‘chranΓ‘Ε™i - Ε kolenΓ­ lΓ©kaΕ™e',
shownSchooling: 'Ε kolenΓ­ lΓ©kaΕ™e',
},
28: {
caption: 'VYA',
color: '#791515',
coins: 10,
credits: 35_000,
minPersonnel: 1,
maxPersonnel: 2,
schooling: 'PoΕΎΓ‘rnΓ­ stanice - ',
shownSchooling: '',
},
29: {
caption: 'AJ',
color: '#791515',
coins: 10,
credits: 35_000,
minPersonnel: 1,
maxPersonnel: 2,
schooling: 'PoΕΎΓ‘rnΓ­ stanice - ',
shownSchooling: '',
},
30: {
caption: 'DA',
color: '#791515',
coins: 10,
credits: 10_000,
minPersonnel: 1,
maxPersonnel: 9,
},
31: {
caption: 'RZA',
color: '#791515',
coins: 10,
credits: 20_000,
minPersonnel: 2,
maxPersonnel: 3,
},
},
buildings: {
0: {
Expand Down
32 changes: 31 additions & 1 deletion src/i18n/de_DE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1615,6 +1615,25 @@ export default {
icon: 'trailer',
possibleBuildings: [9],
},
103: {
caption: 'FuStW (DGL)',
color: '#339900',
coins: 25,
credits: 25000,
minPersonnel: 1,
maxPersonnel: 2,
schooling: {
Polizei: {
['Dienstgruppenleitung']: {
min: 1,
},
},
},
icon: 'taxi',
special:
'Pro aktivierten Dienstgruppenleitung-Ausbau kann ein Funkstreifenwagen (Dienstgruppenleitung) gekauft werden.',
possibleBuildings: [6],
},
},
buildings: {
0: {
Expand Down Expand Up @@ -1873,6 +1892,12 @@ export default {
coins: 20,
duration: '7 Tage',
},
{
caption: 'Dienstgruppenleitung-Erweiterung',
credits: 200_000,
coins: 25,
duration: '7 Tage',
},
],
levelcost: ['1. 10.000', '2. 50.000', '3.-14. 100.000'],
maxBuildings: '1.700 mit kleinen Polizeiwachen zusammen',
Expand Down Expand Up @@ -2510,7 +2535,7 @@ export default {
},
Polizei: {
vehicles: {
'Funkstreifenwagen': [32, 95, 98],
'Funkstreifenwagen': [32, 95, 98, 103],
'Bereitschaftspolizei-Fahrzeuge': [35, 50, 51, 52, 72],
'Polizeihubschrauber': [61, 96],
'SEK': [79, 80],
Expand Down Expand Up @@ -2703,6 +2728,11 @@ export default {
duration: '7 Tage',
staffList: 'Kriminalpolizist',
},
{
caption: 'Dienstgruppenleitung',
duration: '7 Tage',
staffList: 'Dienstgruppenleitung',
},
],
Rettungsdienst: [
{
Expand Down
Loading

0 comments on commit 8cc19d5

Please sign in to comment.