added x-record functionality by adding lm and vm point system
This commit is contained in:
@@ -94,7 +94,7 @@ export const common: EPR = async (info, data, send) => {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let RESTRICT_SONGS = XRECORDSONGS.concat(KONASTESONGS, BEMANI2021EVENTSONGS, BPLSTAMPRALLYSONGS, SDVX10THSTAMPSONGS, REFLECBEATSTAMPSONGS);
|
||||
let RESTRICT_SONGS = KONASTESONGS.concat(BEMANI2021EVENTSONGS, BPLSTAMPRALLYSONGS, SDVX10THSTAMPSONGS, REFLECBEATSTAMPSONGS);
|
||||
let mdb = JSON.parse(value);
|
||||
|
||||
let limitedNo = 2;
|
||||
|
||||
@@ -3,6 +3,7 @@ import { SDVX_AUTOMATION_SONGS } from '../data/vvw';
|
||||
import { Item } from '../models/item';
|
||||
import { Param } from '../models/param';
|
||||
import { Arena } from '../models/arena';
|
||||
import { XRecord } from '../models/xrecord';
|
||||
import { MusicRecord } from '../models/music_record';
|
||||
import { CourseRecord } from '../models/course_record';
|
||||
import { Profile } from '../models/profile';
|
||||
@@ -593,8 +594,22 @@ export const save: EPR = async (info, data, send) => {
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
console.log(earnedSP)
|
||||
// Add X-Record points
|
||||
if(U.GetConfig('x_record')) {
|
||||
await DB.Upsert<XRecord>(
|
||||
refid,
|
||||
{
|
||||
collection: 'x-record'
|
||||
},
|
||||
{
|
||||
$inc: {
|
||||
lm: 1,
|
||||
vm: 10
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
return send.success();
|
||||
@@ -628,6 +643,7 @@ export const load: EPR = async (info, data, send) => {
|
||||
const items = await DB.Find<Item>(refid, { collection: 'item' });
|
||||
const params = await DB.Find<Param>(refid, { collection: 'param' });
|
||||
const arena = await DB.FindOne<Arena>(refid, { collection: 'arena' });
|
||||
const xrecord = await DB.FindOne<XRecord>(refid, { collection: 'x-record' });
|
||||
let time = new Date();
|
||||
let tempHour = time.getHours();
|
||||
let tempDate = time.getDate();
|
||||
@@ -667,7 +683,6 @@ export const load: EPR = async (info, data, send) => {
|
||||
|
||||
const customize = [];
|
||||
customize.push(bgm, subbg, nemsys, stampA, stampB, stampC, stampD);
|
||||
console.log("ARENA POINTS: " + arena['shopPoint'])
|
||||
|
||||
var tempCustom = params.findIndex((e) => (e.type == 2 && e.id == 2))
|
||||
|
||||
@@ -692,6 +707,45 @@ export const load: EPR = async (info, data, send) => {
|
||||
const tempGene: Item = { collection: 'item', type: 7, id: i, param: 10 };
|
||||
tempItem.push(tempGene);
|
||||
}
|
||||
|
||||
// Check X-record data and unlock songs based on points
|
||||
if(U.GetConfig('x_record')) {
|
||||
// '1736', // discordia_penorerihumer - 150
|
||||
// '1737', // chewingood_toriena - 0
|
||||
// '1738', // verflucht_tirfing - 50
|
||||
// '1847', // 2 beasts unchained - 200
|
||||
// '1848', // fegrix - 0
|
||||
// '1849', // piano kyousoukyoku -100
|
||||
|
||||
let unlockedXRecordSongs = [1737, 1848]
|
||||
if(xrecord != null) {
|
||||
if(xrecord.lm >= 50) {
|
||||
unlockedXRecordSongs.push(1738)
|
||||
}
|
||||
|
||||
if(xrecord.lm >= 100) {
|
||||
unlockedXRecordSongs.push(1849)
|
||||
}
|
||||
|
||||
if(xrecord.lm >= 150) {
|
||||
unlockedXRecordSongs.push(1736)
|
||||
}
|
||||
|
||||
if(xrecord.lm >= 200) {
|
||||
unlockedXRecordSongs.push(1847)
|
||||
}
|
||||
}
|
||||
|
||||
unlockedXRecordSongs.forEach(song => {
|
||||
console.log("Unlocking xrecord song: " + song)
|
||||
tempItem.push({
|
||||
id: song,
|
||||
type: 0,
|
||||
param: 23,
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
return send.pugFile('templates/load.pug', {
|
||||
courses,
|
||||
items: tempItem,
|
||||
|
||||
@@ -35,6 +35,7 @@ export function register() {
|
||||
R.Config('unlock_all_valk_items', { type: 'boolean', default: false, name:'Unlock All Valkyrie Items', desc: 'Unlock Nemsys, BGM, Submonitor BG and Stamp Items (Valk crews not included; check \'unlock all navigators\' option)'});
|
||||
R.Config('enable_valk_songs' ,{ type: 'boolean', default: false, name:'Enable Valkyrie Model Songs', desc:'Unlock the valkyrie model songs on non-valkyrie mode.'});
|
||||
R.Config('arena_szn',{ type: 'string', options: Object.keys(ARENA), default: 'Set 1 (04/25/22)', name: 'Arena Station Item Set', desc: 'Choose which season set of items in the arena station you want to show up in arena station'});
|
||||
R.Config('x_record', {type: 'boolean', default: false, name: 'X-Record', desc: 'Activates X-record. 10 VM and 1 LM points per play.'})
|
||||
R.Config('unlock_all_songs', { type: 'boolean', default: false, name:'Unlock All Songs'});
|
||||
R.Config('unlock_all_navigators', { type: 'boolean', default: false, name:'Unlock All Navigators'} );
|
||||
R.Config('unlock_all_appeal_cards', { type: 'boolean', default: false, name:'Unlock All Appeal Cards'});
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
export interface XRecord {
|
||||
collection: 'x-record';
|
||||
|
||||
lm: number;
|
||||
vm: number;
|
||||
}
|
||||
@@ -660,6 +660,8 @@ $(document).ready(function() {
|
||||
profile_data = JSON.parse(document.getElementById("data-pass").innerText);
|
||||
score_db = JSON.parse(document.getElementById("score-pass").innerText);
|
||||
skill_data = JSON.parse(document.getElementById("skill-pass").innerText);
|
||||
xrecord_data = JSON.parse(document.getElementById("xrecord-pass").innerText);
|
||||
arena_data = JSON.parse(document.getElementById("arena-pass").innerText);
|
||||
|
||||
skill_data.sort(function(a, b) {
|
||||
return b.version - a.version;
|
||||
@@ -704,6 +706,16 @@ $(document).ready(function() {
|
||||
)
|
||||
}
|
||||
|
||||
var lm = vm = 0;
|
||||
if(xrecord_data != null) {
|
||||
lm = xrecord_data['lm'];
|
||||
vm = xrecord_data['vm'];
|
||||
}
|
||||
var arenaPower = 0;
|
||||
if(arena_data != null) {
|
||||
arenaPower = arena_data['shopPoint']
|
||||
}
|
||||
|
||||
$('#test').append(
|
||||
$('<div class="card is-inlineblocked">').append(
|
||||
$('<div class="card-header">').append(
|
||||
@@ -808,6 +820,62 @@ $(document).ready(function() {
|
||||
)
|
||||
)
|
||||
).append(
|
||||
$('<div class="card is-inlineblocked">').append(
|
||||
$('<div class="card-header">').append(
|
||||
$('<p class="card-header-title">').append(
|
||||
$('<span class="icon">').append(
|
||||
$('<i class="mdi mdi-pulse">')
|
||||
)
|
||||
).append("Other Data")
|
||||
)
|
||||
).append(
|
||||
$('<div class="card-content">').append(
|
||||
$('<div class="tile is-ancestor">').append(
|
||||
$('<div class="tile is-parent is-5">').append(
|
||||
$('<article class="tile is-child box">').append(
|
||||
$('<p class="title">').append(
|
||||
"X-Record Data"
|
||||
).append(
|
||||
$('<div class="content">').append(
|
||||
lm + " LM | " + vm + " VM"
|
||||
)
|
||||
).css('font-family', "testfont")
|
||||
)
|
||||
)
|
||||
).css('vertical-align', 'middle')
|
||||
)
|
||||
)
|
||||
|
||||
).append(
|
||||
$('<div class="card is-inlineblocked">').append(
|
||||
$('<div class="card-header">').append(
|
||||
$('<p class="card-header-title">').append(
|
||||
$('<span class="icon">').append(
|
||||
$('<i class="mdi mdi-pulse">')
|
||||
)
|
||||
).append("Arena")
|
||||
)
|
||||
).append(
|
||||
$('<div class="card-content">').append(
|
||||
$('<div class="tile is-ancestor">').append(
|
||||
$('<div class="tile is-parent is-5">').append(
|
||||
$('<article class="tile is-child box">').append(
|
||||
$('<p class="title">').append(
|
||||
"Arena Power"
|
||||
).append(
|
||||
$('<div class="content">').append(
|
||||
arenaPower
|
||||
)
|
||||
).css('font-family', "testfont")
|
||||
)
|
||||
)
|
||||
).css('vertical-align', 'middle')
|
||||
)
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
.append(
|
||||
$('<div class="card">').append(
|
||||
$('<div class="card-header">').append(
|
||||
$('<p class="card-header-title">').append(
|
||||
|
||||
@@ -13,57 +13,6 @@ function getInfDifficulty(inf_ver) {
|
||||
}
|
||||
}
|
||||
$(document).ready(function() {
|
||||
// jQuery.fn.dataTableExt.oSort['diff-asc'] = function(a, b) {
|
||||
// var x = difficultySort(a);
|
||||
// var y = difficultySort(b);
|
||||
|
||||
// return ((x < y) ? -1 : ((x > y) ? 1 : 0));
|
||||
// };
|
||||
|
||||
// jQuery.fn.dataTableExt.oSort['diff-desc'] = function(a, b) {
|
||||
// var x = difficultySort(a);
|
||||
// var y = difficultySort(b);
|
||||
|
||||
// return ((x < y) ? 1 : ((x > y) ? -1 : 0));
|
||||
// };
|
||||
|
||||
// jQuery.fn.dataTableExt.oSort['grade-asc'] = function(a, b) {
|
||||
// var x = gradeSort(a);
|
||||
// var y = gradeSort(b);
|
||||
|
||||
// return ((x < y) ? -1 : ((x > y) ? 1 : 0));
|
||||
// };
|
||||
|
||||
// jQuery.fn.dataTableExt.oSort['grade-desc'] = function(a, b) {
|
||||
// var x = gradeSort(a);
|
||||
// var y = gradeSort(b);
|
||||
|
||||
// return ((x < y) ? 1 : ((x > y) ? -1 : 0));
|
||||
// };
|
||||
|
||||
// jQuery.fn.dataTableExt.oSort['clear-mark-asc'] = function(a, b) {
|
||||
// var x = markSort(a);
|
||||
// var y = markSort(b);
|
||||
|
||||
// return ((x < y) ? -1 : ((x > y) ? 1 : 0));
|
||||
// };
|
||||
|
||||
// jQuery.fn.dataTableExt.oSort['clear-mark-desc'] = function(a, b) {
|
||||
// var x = markSort(a);
|
||||
// var y = markSort(b);
|
||||
|
||||
// return ((x < y) ? 1 : ((x > y) ? -1 : 0));
|
||||
// };
|
||||
// var profile_data = JSON.parse(document.getElementById("data-pass").innerText);
|
||||
// profile_data = profile_data.sort(function(a, b) {
|
||||
// if (a.mid > b.mid) return 1;
|
||||
// if (a.mid < b.mid) return -1;
|
||||
// return a.type > b.type ? 1 : -1;
|
||||
// });
|
||||
|
||||
//console.log(profile_data);
|
||||
//$('#music_score').DataTable();
|
||||
|
||||
$.getJSON("static/asset/json/music_db.json", function(json) {
|
||||
music_db = json;
|
||||
var music_data = [];
|
||||
@@ -71,7 +20,11 @@ $(document).ready(function() {
|
||||
var temp_data = {};
|
||||
temp_data.mid = music_db.mdb.music[mdata]['@id'];
|
||||
temp_data.songname = music_db.mdb.music[mdata]['info']['title_name'];
|
||||
temp_data.releasedate = music_db.mdb.music[mdata]['info']['distribution_date']['#text'];
|
||||
if('distribution_date' in music_db.mdb.music[mdata]['info']) {
|
||||
temp_data.releasedate = music_db.mdb.music[mdata]['info']['distribution_date']['#text'];
|
||||
} else {
|
||||
temp_data.releasedate = ''
|
||||
}
|
||||
temp_data.nov = "";
|
||||
temp_data.adv = "";
|
||||
temp_data.exh = "";
|
||||
@@ -86,12 +39,14 @@ $(document).ready(function() {
|
||||
if (music_db.mdb.music[mdata]['difficulty']['exhaust']['difnum']['#text'] != 0) {
|
||||
temp_data.exh = music_db.mdb.music[mdata]['difficulty']['exhaust']['difnum']['#text']
|
||||
}
|
||||
if (music_db.mdb.music[mdata]['difficulty']['maximum']['difnum']['#text'] != 0) {
|
||||
temp_data.mxm = music_db.mdb.music[mdata]['difficulty']['maximum']['difnum']['#text']
|
||||
}
|
||||
if (music_db.mdb.music[mdata]['info']['inf_ver']['#text'] != 0) {
|
||||
temp_data.oth = music_db.mdb.music[mdata]['difficulty']['infinite']['difnum']['#text'] + ' | ' + getInfDifficulty(music_db.mdb.music[mdata]['info']['inf_ver']['#text'])
|
||||
}
|
||||
}
|
||||
if ("maximum" in music_db.mdb.music[mdata]['difficulty']) {
|
||||
if (music_db.mdb.music[mdata]['difficulty']['maximum']['difnum']['#text'] != 0) {
|
||||
temp_data.mxm = music_db.mdb.music[mdata]['difficulty']['maximum']['difnum']['#text']
|
||||
}
|
||||
}
|
||||
music_data.push(temp_data);
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -2,6 +2,8 @@
|
||||
profile: DB.FindOne(refid, { collection: 'profile' })
|
||||
score_data: DB.Find(refid, { collection: 'music' })
|
||||
skill_data: DB.Find(refid,{collection: 'skill'})
|
||||
xrecord_data: DB.FindOne(refid,{collection: 'x-record'})
|
||||
arena_data: DB.FindOne(refid,{collection: 'arena'})
|
||||
|
||||
-
|
||||
const padded = _.padStart(profile.id.toString(), 8);
|
||||
@@ -31,4 +33,6 @@ div
|
||||
div(hidden id='data-pass') !{JSON.stringify(profile)}
|
||||
div(hidden id='score-pass') !{JSON.stringify(score_data)}
|
||||
div(hidden id='skill-pass') !{JSON.stringify(skill_data)}
|
||||
div(hidden id='xrecord-pass') !{JSON.stringify(xrecord_data)}
|
||||
div(hidden id='arena-pass') !{JSON.stringify(arena_data)}
|
||||
script(src="static/asset/js/detail.js")
|
||||
|
||||
Reference in New Issue
Block a user