diff --git a/sdvx@asphyxia/data/exg.ts b/sdvx@asphyxia/data/exg.ts index 9cc72f3..e46c27a 100644 --- a/sdvx@asphyxia/data/exg.ts +++ b/sdvx@asphyxia/data/exg.ts @@ -93,10 +93,21 @@ export const VALKYRIEEXCLUSIVESONGS = [ '1736', '1737', '1738', '1848', '1847', '1849' // X-record ] +// arena station crew with name cheatsheet +// 29 nearnoah xmas +// 82 kanade halloween +// 95 rasis v +// 101 right v +// 103 nearnoah v +// 104 nana v +// 106 natsuhi +// 107 cocona + +// ARENA data export const ARENA = { 'Set 1 (04/25/22)': { details: { - season: 0, + // season: 1, time_start: BigInt(Date.parse('25 Apr 2022 00:00:00 GMT')), time_end: BigInt(Date.parse('31 Dec 2022 23:59:59 GMT')), shop_start: BigInt(Date.parse('25 Apr 2022 00:00:00 GMT')), @@ -108,7 +119,7 @@ export const ARENA = { { catalog_id: 1, catalog_type: 1, - price: 3000, + price: 15000, item_type: 11, item_id: 101, param: 1, @@ -116,7 +127,7 @@ export const ARENA = { { catalog_id: 1, catalog_type: 1, - price: 3000, + price: 15000, item_type: 11, item_id: 95, param: 1, @@ -124,7 +135,7 @@ export const ARENA = { { catalog_id: 1, catalog_type: 1, - price: 1000, + price: 8000, item_type: 0, item_id: 1855, param: 23, @@ -132,7 +143,7 @@ export const ARENA = { { catalog_id: 1, catalog_type: 1, - price: 1000, + price: 8000, item_type: 0, item_id: 381, param: 8, @@ -140,7 +151,7 @@ export const ARENA = { { catalog_id: 1, catalog_type: 1, - price: 1000, + price: 8000, item_type: 0, item_id: 633, param: 8, @@ -148,7 +159,7 @@ export const ARENA = { { catalog_id: 1, catalog_type: 1, - price: 1000, + price: 4000, item_type: 0, item_id: 332, param: 8, @@ -156,7 +167,7 @@ export const ARENA = { { catalog_id: 1, catalog_type: 1, - price: 1000, + price: 4000, item_type: 0, item_id: 711, param: 8, @@ -164,7 +175,7 @@ export const ARENA = { { catalog_id: 1, catalog_type: 1, - price: 1000, + price: 4000, item_type: 0, item_id: 871, param: 8, @@ -172,7 +183,7 @@ export const ARENA = { { catalog_id: 1, catalog_type: 1, - price: 1000, + price: 2000, item_type: 0, item_id: 872, param: 8, @@ -180,7 +191,7 @@ export const ARENA = { { catalog_id: 1, catalog_type: 1, - price: 1000, + price: 2000, item_type: 0, item_id: 64, param: 8, @@ -188,7 +199,7 @@ export const ARENA = { { catalog_id: 1, catalog_type: 1, - price: 1000, + price: 2000, item_type: 0, item_id: 88, param: 8, @@ -197,7 +208,7 @@ export const ARENA = { }, 'Set 2 (06/30/22)': { details: { - season: 0, + // season: 2, time_start: BigInt(Date.parse('30 Jun 2022 00:00:00 GMT')), time_end: BigInt(Date.parse('31 Dec 2022 23:59:59 GMT')), shop_start: BigInt(Date.parse('30 Jun 2022 00:00:00 GMT')), @@ -206,18 +217,18 @@ export const ARENA = { is_shop: 1 }, arena_items: [ - // { - // catalog_id: 1, - // catalog_type: 1, - // price: 3000, - // item_type: 11, - // item_id: 95, - // param: 1, - // }, { catalog_id: 1, catalog_type: 1, - price: 1000, + price: 15000, + item_type: 11, + item_id: 103, + param: 1, + }, + { + catalog_id: 1, + catalog_type: 1, + price: 8000, item_type: 0, item_id: 1742, param: 23, @@ -225,7 +236,7 @@ export const ARENA = { { catalog_id: 1, catalog_type: 1, - price: 1000, + price: 8000, item_type: 0, item_id: 632, param: 8, @@ -233,7 +244,7 @@ export const ARENA = { { catalog_id: 1, catalog_type: 1, - price: 1000, + price: 4000, item_type: 0, item_id: 37, param: 8, @@ -241,7 +252,7 @@ export const ARENA = { { catalog_id: 1, catalog_type: 1, - price: 1000, + price: 4000, item_type: 0, item_id: 239, param: 8, @@ -249,7 +260,7 @@ export const ARENA = { { catalog_id: 1, catalog_type: 1, - price: 1000, + price: 2000, item_type: 0, item_id: 111, param: 8, @@ -257,42 +268,42 @@ export const ARENA = { { catalog_id: 1, catalog_type: 1, - price: 1000, + price: 2000, item_type: 0, item_id: 132, param: 8, } ], }, - 'debug': { - details: { - season: 0, - time_start: BigInt(Date.parse('30 Jun 2022 00:00:00 GMT')), - time_end: BigInt(Date.parse('31 Dec 2022 23:59:59 GMT')), - shop_start: BigInt(Date.parse('30 Jun 2022 00:00:00 GMT')), - shop_end: BigInt(Date.parse('31 Dec 2022 23:59:59 GMT')), - is_open: 1, - is_shop: 1 - }, - arena_items: [ - { - catalog_id: 1, - catalog_type: 1, - price: 1000, - item_type: 1, - item_id: 10, - param: 1, - }, - { - catalog_id: 1, - catalog_type: 1, - price: 1000, - item_type: parseInt(U.GetConfig('arena_debug_item_type')), - item_id: 10, - param: 1, - } - ] - } + // 'debug': { + // details: { + // season: 0, + // time_start: BigInt(Date.parse('30 Jun 2022 00:00:00 GMT')), + // time_end: BigInt(Date.parse('31 Dec 2022 23:59:59 GMT')), + // shop_start: BigInt(Date.parse('30 Jun 2022 00:00:00 GMT')), + // shop_end: BigInt(Date.parse('31 Dec 2022 23:59:59 GMT')), + // is_open: 1, + // is_shop: 1 + // }, + // arena_items: [ + // { + // catalog_id: 1, + // catalog_type: 1, + // price: 1000, + // item_type: 1, + // item_id: 10, + // param: 1, + // }, + // { + // catalog_id: 1, + // catalog_type: 1, + // price: 1000, + // item_type: parseInt(U.GetConfig('arena_debug_item_type')), + // item_id: 10, + // param: 1, + // } + // ] + // } } export const VALGENE = { @@ -4084,7 +4095,6 @@ export const SDVX_AUTOMATION_SONGS_2 = [ 99004 ] - export const EXTENDS6 = [ { id: 91, diff --git a/sdvx@asphyxia/handlers/common.ts b/sdvx@asphyxia/handlers/common.ts index e171518..789fd34 100644 --- a/sdvx@asphyxia/handlers/common.ts +++ b/sdvx@asphyxia/handlers/common.ts @@ -286,30 +286,30 @@ export const common: EPR = async (info, data, send) => { let catalog = [] let campaign = [] - if(U.GetConfig('arena_szn') == 'debug') { - for(let xxx = 0; xxx<=20; xxx++){ - arena_catalog_items.push({ - catalog_id: K.ITEM('s32', 1), - catalog_type: K.ITEM('s32', 1), - price: K.ITEM('s32', 1000), - item_type: K.ITEM('s32', U.GetConfig('arena_debug_item_type')), - item_id: K.ITEM('s32', xxx), - param: K.ITEM('s32', 1), - }) - } - } - else{ - for (let catalog_item in ARENA[U.GetConfig('arena_szn')].arena_items) { - arena_catalog_items.push({ - catalog_id: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].catalog_id), - catalog_type: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].catalog_type), - price: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].price), - item_type: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].item_type), - item_id: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].item_id), - param: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].param), - }) - } + // if(U.GetConfig('arena_szn') == 'debug') { + // for(let xxx = 1; xxx<=150; xxx++){ + // arena_catalog_items.push({ + // catalog_id: K.ITEM('s32', 1), + // catalog_type: K.ITEM('s32', 1), + // price: K.ITEM('s32', 1000), + // item_type: K.ITEM('s32', 11), + // item_id: K.ITEM('s32', xxx), + // param: K.ITEM('s32', 1), + // }) + // } + // } + // else{ + for (let catalog_item in ARENA[U.GetConfig('arena_szn')].arena_items) { + arena_catalog_items.push({ + catalog_id: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].catalog_id), + catalog_type: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].catalog_type), + price: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].price), + item_type: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].item_type), + item_id: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].item_id), + param: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].param), + }) } + // } let valgene_info = [] let valgene_items = [] @@ -358,7 +358,7 @@ export const common: EPR = async (info, data, send) => { catalog: valgene_items }, arena: { - season: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].details.season), + // season: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].details.season), time_start: K.ITEM('u64', ARENA[U.GetConfig('arena_szn')].details.time_start), time_end: K.ITEM('u64', ARENA[U.GetConfig('arena_szn')].details.time_end), shop_start: K.ITEM('u64', ARENA[U.GetConfig('arena_szn')].details.shop_start), @@ -429,7 +429,6 @@ export const common: EPR = async (info, data, send) => { } }; - export const log: EPR = async (info, data, send) => { send.success(); } diff --git a/sdvx@asphyxia/handlers/profiles.ts b/sdvx@asphyxia/handlers/profiles.ts index 9463bd0..f98a102 100644 --- a/sdvx@asphyxia/handlers/profiles.ts +++ b/sdvx@asphyxia/handlers/profiles.ts @@ -9,6 +9,7 @@ import { CourseRecord } from '../models/course_record'; import { Profile } from '../models/profile'; import { getVersion, IDToCode } from '../utils'; import { Mix } from '../models/mix'; +import { ARENA } from '../data/exg'; async function getAutomationMixes(params: Param[]) { const mixids = params @@ -581,7 +582,8 @@ export const save: EPR = async (info, data, send) => { await DB.Upsert( refid, { - collection: 'arena' + collection: 'arena', + season: Object.keys(ARENA).findIndex(data => data == U.GetConfig('arena_szn')) + 1 }, { $inc: { @@ -655,8 +657,9 @@ export const load: EPR = async (info, data, send) => { const courses = await DB.Find(refid, { collection: 'course', version }); const items = await DB.Find(refid, { collection: 'item' }); const params = await DB.Find(refid, { collection: 'param' }); - const arena = await DB.FindOne(refid, { collection: 'arena' }); + const arena = await DB.FindOne(refid, { collection: 'arena', season: Object.keys(ARENA).findIndex(data => data == U.GetConfig('arena_szn')) + 1 }); const xrecord = await DB.FindOne(refid, { collection: 'x-record' }); + console.log(JSON.stringify(arena)) let time = new Date(); let tempHour = time.getHours(); let tempDate = time.getDate(); @@ -722,7 +725,6 @@ export const load: EPR = async (info, data, send) => { } // Check X-record data and unlock songs based on points - console.log(JSON.stringify(info.model.split(":")[2].match(/^(G|H)$/g))) if(U.GetConfig('x_record') && (info.model.split(":")[2].match(/^(G|H)$/g) != null || U.GetConfig('enable_valk_songs'))) { // '1736', // discordia_penorerihumer - 150 // '1737', // chewingood_toriena - 0 diff --git a/sdvx@asphyxia/webui/asset/js/detail.js b/sdvx@asphyxia/webui/asset/js/detail.js index ea28cd4..0f311a0 100644 --- a/sdvx@asphyxia/webui/asset/js/detail.js +++ b/sdvx@asphyxia/webui/asset/js/detail.js @@ -711,10 +711,11 @@ $(document).ready(function() { lm = xrecord_data['lm']; vm = xrecord_data['vm']; } - var arenaPower = 0; - if(arena_data != null) { - arenaPower = arena_data['shopPoint'] - } + var arenaPower = []; + arena_data.forEach(arena_sszn_data => { + arenaPower.push([arena_sszn_data.season, arena_sszn_data.shopPoint]) + }) + arenaPower.sort((a, b) => a[0] - b[0]) $('#test').append( $('
').append( @@ -836,9 +837,7 @@ $(document).ready(function() { $('

').append( "Arena Power" ).append( - $('

').append( - arenaPower - ) + $('
') ).css('font-family', "testfont") ) ) @@ -951,6 +950,22 @@ $(document).ready(function() { ) ) + arenaPower.forEach(ap => { + console.log('yes' + ap) + $('#arena-power-data').append( + $('
').append( + $('

').append( + "Season " + ap[0] + ).append( + $('

').append( + ap[1] + ) + ) + ) + ) + }) + + setUpStatistics(); setCMpD(); diff --git a/sdvx@asphyxia/webui/profile_--detail.pug b/sdvx@asphyxia/webui/profile_--detail.pug index dbdd0a5..64dfc4e 100644 --- a/sdvx@asphyxia/webui/profile_--detail.pug +++ b/sdvx@asphyxia/webui/profile_--detail.pug @@ -3,7 +3,7 @@ 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'}) + arena_data: DB.Find(refid,{collection: 'arena'}) - const padded = _.padStart(profile.id.toString(), 8);