chore: layerid mod prefix

This commit is contained in:
Davide Fantino 2023-03-22 00:01:49 +01:00
parent 3148ee9bca
commit 246d904a92

View File

@ -1103,7 +1103,7 @@ export default class MapVote extends DiscordBasePlugin {
mapLayer(l) { mapLayer(l) {
l = l.replace(/[^a-z_\d]/gi, '') l = l.replace(/[^a-z_\d]/gi, '')
// this.verbose(1, 'Parsing layer', l) // this.verbose(1, 'Parsing layer', l)
const gl = /^(?<level>\w+)_(?<gamemode>\w+)_(?<version>\w+)$/i.exec(l)?.groups const gl = /^((?<mod>\w+_))?(?<level>\w+)_(?<gamemode>\w+)_(?<version>\w+)$/i.exec(l)?.groups
// this.verbose(1, 'Parsed layer', gl) // this.verbose(1, 'Parsed layer', gl)
if (!gl || Object.keys(gl).length != 3) return; if (!gl || Object.keys(gl).length != 3) return;