mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-04-26 02:02:29 -05:00
commit
eb8ac47803
|
|
@ -1,4 +1,5 @@
|
||||||
export const EVENT6 = [
|
export let EVENT6 = [
|
||||||
|
'SERIALCODE_JP',
|
||||||
'DEMOGAME_PLAY',
|
'DEMOGAME_PLAY',
|
||||||
'MATCHING_MODE',
|
'MATCHING_MODE',
|
||||||
'MATCHING_MODE_FREE_IP',
|
'MATCHING_MODE_FREE_IP',
|
||||||
|
|
@ -39,13 +40,25 @@ export const EVENT6 = [
|
||||||
'SUBBG_DISABLE',
|
'SUBBG_DISABLE',
|
||||||
'NEMSYS_DISABLE',
|
'NEMSYS_DISABLE',
|
||||||
'S_PUC_EFFECT_ENABLE',
|
'S_PUC_EFFECT_ENABLE',
|
||||||
'BEGINNER_MUSIC_FOLDER',
|
'BEGINNER_MUSIC_FOLDER\t56,78,80,86,87,91,111,135,128,134,275,278,180,469,697,770,769,779,842,948,940,1057',
|
||||||
|
'BEGINNER_MUSIC_FOLDER\t1056,1096,1062,932,1222,1136,1341,1297,1441,1472,1446,1455,1469,1475,1454,1449,1448,1540,1453,1456,1447,1451,1452,1480,1458,1457,1450,1657,1649,1471',
|
||||||
|
'BEGINNER_MUSIC_FOLDER\t1735,1658,1756,1757,1754,1755,1758,1753,1749,1812,1820,1817,1741,1739,1740,1867,1871,1866,1872,1861,1858,1860,1862,1857,1903,1904,1859,1863,1856,1864,1865,1911,1916,1917,1914,1915,1918,1960',
|
||||||
'PLAYER_RADAR_ENABLE',
|
'PLAYER_RADAR_ENABLE',
|
||||||
'SINGLE_BATTLE_ENABLE',
|
'SINGLE_BATTLE_ENABLE',
|
||||||
// 'USE_CUDA_VIDEO_PRESENTER'
|
// 'SUBMONITOR_VSYNC_ENABLE',
|
||||||
|
'USE_CUDA_VIDEO_PRESENTER',
|
||||||
|
'CHARACTER_IGNORE_DISABLE\t122,123,131,139,140,143,149,160,162,163',
|
||||||
|
'SUBBG_IGNORE_DISABLE\t166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311',
|
||||||
|
'SUBBG_IGNORE_DISABLE\t312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,369,370,371,372,373,374,375,376,377,378,379,380,381,419,420,421',
|
||||||
|
'SUBBG_IGNORE_DISABLE\t422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482',
|
||||||
|
'STAMP_IGNORE_DISABLE\t273~312,773~820,993~1032,1245~1284,1469~1508',
|
||||||
|
'HEXA_OVERDRIVE_ENABLE\t1,2,3,4,5,6,7,8,9,10,11,12',
|
||||||
|
'TAMAADV_ENABLE',
|
||||||
|
'CAMERA_CALIBRATION_TEST_MENU_ENABLE',
|
||||||
|
'APRIL_RAINBOW_LINE_ACTIVE'
|
||||||
];
|
];
|
||||||
|
|
||||||
export const COURSES6 = [
|
export let COURSES6 = [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: 'SKILL ANALYZER 第1回 Aコース',
|
name: 'SKILL ANALYZER 第1回 Aコース',
|
||||||
|
|
@ -2818,7 +2831,7 @@ export const COURSES6 = [
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
export const SDVX_AUTOMATION_SONGS = [
|
export let SDVX_AUTOMATION_SONGS = [
|
||||||
1,
|
1,
|
||||||
2,
|
2,
|
||||||
3,
|
3,
|
||||||
|
|
@ -2893,6 +2906,7 @@ export const SDVX_AUTOMATION_SONGS = [
|
||||||
228,
|
228,
|
||||||
229,
|
229,
|
||||||
239,
|
239,
|
||||||
|
241,
|
||||||
247,
|
247,
|
||||||
250,
|
250,
|
||||||
251,
|
251,
|
||||||
|
|
@ -2940,6 +2954,7 @@ export const SDVX_AUTOMATION_SONGS = [
|
||||||
376,
|
376,
|
||||||
377,
|
377,
|
||||||
381,
|
381,
|
||||||
|
390,
|
||||||
393,
|
393,
|
||||||
398,
|
398,
|
||||||
408,
|
408,
|
||||||
|
|
@ -3051,7 +3066,7 @@ export const SDVX_AUTOMATION_SONGS = [
|
||||||
787,
|
787,
|
||||||
];
|
];
|
||||||
|
|
||||||
export const SDVX_AUTOMATION_SONGS_2 = [
|
export let SDVX_AUTOMATION_SONGS_2 = [
|
||||||
788,
|
788,
|
||||||
789,
|
789,
|
||||||
790,
|
790,
|
||||||
|
|
@ -3284,7 +3299,7 @@ export const SDVX_AUTOMATION_SONGS_2 = [
|
||||||
1280,
|
1280,
|
||||||
]
|
]
|
||||||
|
|
||||||
const SDVX_AUTOMATION_SONGS_3 = [
|
export let SDVX_AUTOMATION_SONGS_3 = [
|
||||||
1281,
|
1281,
|
||||||
1282,
|
1282,
|
||||||
1300,
|
1300,
|
||||||
|
|
@ -3504,8 +3519,7 @@ const SDVX_AUTOMATION_SONGS_3 = [
|
||||||
99004,
|
99004,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
export let EXTENDS6 = [
|
||||||
export const EXTENDS6 = [
|
|
||||||
{
|
{
|
||||||
id: 91,
|
id: 91,
|
||||||
type: 17,
|
type: 17,
|
||||||
|
|
@ -3553,9 +3567,26 @@ export const EXTENDS6 = [
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
],
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 94,
|
||||||
|
type: 20,
|
||||||
|
params: [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
'0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
],
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
var ITEM_TYPE_CREW = 11
|
var ITEM_TYPE_CREW = 11
|
||||||
var ITEM_TYPE_APPEAL = 15
|
var ITEM_TYPE_APPEAL = 15
|
||||||
var ITEM_TYPE_STAMP = 17
|
var ITEM_TYPE_STAMP = 17
|
||||||
|
|
|
||||||
3522
sdvx@asphyxia/data/exg_data.json
Normal file
3522
sdvx@asphyxia/data/exg_data.json
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -1,5 +1,6 @@
|
||||||
import { EVENT6, COURSES6, EXTENDS6, VALGENE6 } from '../data/exg';
|
import { EVENT6, COURSES6, EXTENDS6, VALGENE6 } from '../data/exg';
|
||||||
import {getVersion, getRandomIntInclusive} from '../utils';
|
import {getVersion, getRandomIntInclusive} from '../utils';
|
||||||
|
import fs from 'fs';
|
||||||
|
|
||||||
export const informationString =
|
export const informationString =
|
||||||
`[sz:120] [olc:555555][ol:4][c:ff3333,3333ff,77ff77]Asphyxia
|
`[sz:120] [olc:555555][ol:4][c:ff3333,3333ff,77ff77]Asphyxia
|
||||||
|
|
@ -32,17 +33,15 @@ export const common: EPR = async (info, data, send) => {
|
||||||
let courses = [];
|
let courses = [];
|
||||||
let extend = [];
|
let extend = [];
|
||||||
console.log("Calling common function");
|
console.log("Calling common function");
|
||||||
|
let exg_data_json = JSON.parse(fs.readFileSync('./plugins/sdvx@asphyxia/data/exg_data.json', 'utf8'));
|
||||||
const version = parseInt(info.model.split(":")[4]);
|
|
||||||
|
events = EVENT6;
|
||||||
|
courses = COURSES6;
|
||||||
|
// EXTENDS6.forEach(val => extend.push(Object.assign({}, val)));
|
||||||
|
extend = EXTENDS6;
|
||||||
|
extend = extend.concat(exg_data_json.extends_data);
|
||||||
|
// extend = extend.concat(exg_data.extends_data);
|
||||||
|
|
||||||
switch (info.method) {
|
|
||||||
case 'sv6_common': {
|
|
||||||
events = EVENT6;
|
|
||||||
courses = COURSES6;
|
|
||||||
EXTENDS6.forEach(val => extend.push(Object.assign({}, val)));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let songs = [];
|
let songs = [];
|
||||||
|
|
||||||
if (U.GetConfig('unlock_all_songs')) {
|
if (U.GetConfig('unlock_all_songs')) {
|
||||||
|
|
@ -258,8 +257,8 @@ export const common: EPR = async (info, data, send) => {
|
||||||
season: K.ITEM('s32',3),
|
season: K.ITEM('s32',3),
|
||||||
rule: K.ITEM('s32',0),
|
rule: K.ITEM('s32',0),
|
||||||
rank_match_target: K.ARRAY('s32', [
|
rank_match_target: K.ARRAY('s32', [
|
||||||
1,1,1,1,
|
2,2,2,2,
|
||||||
1,1,1,1,
|
2,2,2,2,
|
||||||
1,1,1,1,
|
1,1,1,1,
|
||||||
1,1,1,1,
|
1,1,1,1,
|
||||||
0,0,0,0,
|
0,0,0,0,
|
||||||
|
|
@ -286,6 +285,9 @@ export const common: EPR = async (info, data, send) => {
|
||||||
item_type: K.ITEM('s32', c.item_type),
|
item_type: K.ITEM('s32', c.item_type),
|
||||||
item_id: K.ITEM('s32', c.item_id),
|
item_id: K.ITEM('s32', c.item_id),
|
||||||
})),
|
})),
|
||||||
|
},
|
||||||
|
invest:{
|
||||||
|
limit_date: K.ITEM('u64',BigInt(newTime)),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ encoding: 'utf8' }
|
{ encoding: 'utf8' }
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ function unlockNavigators(items: Partial<Item>[]) {
|
||||||
console.log("Unlocking Navigators");
|
console.log("Unlocking Navigators");
|
||||||
// 10 genesis card for MITSURU's voice
|
// 10 genesis card for MITSURU's voice
|
||||||
items.push({ type: 4, id: 599, param: 10 });
|
items.push({ type: 4, id: 599, param: 10 });
|
||||||
|
// items.push({ type: 21, id: 1, param: 1 });
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -29,6 +30,16 @@ function unlockAppealCards(items: Partial<Item>[]) {
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function unlock_all_valkgen(items: Partial<Item>[]) {
|
||||||
|
// for (let i = 0; i < 500; ++i) items.push({ type: 17, id: i, param: 1 }); // stamp
|
||||||
|
// for (let i = 0; i < 600; ++i) items.push({ type: 18, id: i, param: 1 }); // subbg
|
||||||
|
// for (let i = 0; i < 100; ++i) items.push({ type: 19, id: i, param: 1 }); // bgm
|
||||||
|
// for (let i = 0; i < 100; ++i) items.push({ type: 20, id: i, param: 1 }); // nemsys
|
||||||
|
// for (let i = 0; i < 30; ++i) items.push({ type: 21, id: i, param: 1 }); // mainbg
|
||||||
|
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
export const loadScore: EPR = async (info, data, send) => {
|
export const loadScore: EPR = async (info, data, send) => {
|
||||||
console.log("Now loading score");
|
console.log("Now loading score");
|
||||||
const version = Math.abs(getVersion(info));
|
const version = Math.abs(getVersion(info));
|
||||||
|
|
@ -364,6 +375,7 @@ export const load: EPR = async (info, data, send) => {
|
||||||
|
|
||||||
let tempItem = U.GetConfig('unlock_all_navigators') ? unlockNavigators(items) : items;
|
let tempItem = U.GetConfig('unlock_all_navigators') ? unlockNavigators(items) : items;
|
||||||
tempItem = U.GetConfig('unlock_all_appeal_cards') ? unlockAppealCards(tempItem) : tempItem;
|
tempItem = U.GetConfig('unlock_all_appeal_cards') ? unlockAppealCards(tempItem) : tempItem;
|
||||||
|
tempItem = unlock_all_valkgen(tempItem);
|
||||||
|
|
||||||
// Make generator power always 100%,
|
// Make generator power always 100%,
|
||||||
for (let i = 0; i < 50; i++) {
|
for (let i = 0; i < 50; i++) {
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ import { Mix } from '../models/mix';
|
||||||
import { fstat } from 'fs';
|
import { fstat } from 'fs';
|
||||||
import { error } from 'console';
|
import { error } from 'console';
|
||||||
import { setMaxIdleHTTPParsers } from 'http';
|
import { setMaxIdleHTTPParsers } from 'http';
|
||||||
|
import { unpackS3P } from '../s3p';
|
||||||
|
import { secureHeapUsed } from 'crypto';
|
||||||
|
|
||||||
export const updateProfile = async (data: {
|
export const updateProfile = async (data: {
|
||||||
refid: string;
|
refid: string;
|
||||||
|
|
@ -203,7 +205,7 @@ export const deleteMix = async (data: { code: string }) => {
|
||||||
|
|
||||||
export const make_hexa_easier = async(data:{
|
export const make_hexa_easier = async(data:{
|
||||||
refid:string;
|
refid:string;
|
||||||
}) => {
|
}, send: WebUISend) => {
|
||||||
let all_hexa = await DB.Find<Item>(data.refid, { collection: 'item' ,type:16 })
|
let all_hexa = await DB.Find<Item>(data.refid, { collection: 'item' ,type:16 })
|
||||||
let playedNum = [] // Prevent previous unlocked hexa from being locked again
|
let playedNum = [] // Prevent previous unlocked hexa from being locked again
|
||||||
all_hexa.forEach((item:Item)=>{
|
all_hexa.forEach((item:Item)=>{
|
||||||
|
|
@ -213,7 +215,7 @@ export const make_hexa_easier = async(data:{
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
for(let i = 1; i <= 50; i++){ // Hexa Diver 7, up to id = 50
|
for(let i = 1; i <= 71; i++){ // Hexa Diver 7, up to id = 50
|
||||||
if(!playedNum.includes(i)){
|
if(!playedNum.includes(i)){
|
||||||
await DB.Upsert<Item>(
|
await DB.Upsert<Item>(
|
||||||
data.refid,
|
data.refid,
|
||||||
|
|
@ -222,19 +224,29 @@ export const make_hexa_easier = async(data:{
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
send.json({status:"ok"})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const converted_received = async (data: { zip_file:any }, send: WebUISend) => {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export const import_assets = async (data: { path: string }, send: WebUISend) => {
|
export const import_assets = async (data: { path: string }, send: WebUISend) => {
|
||||||
|
|
||||||
|
// await init(wasmUrl);
|
||||||
|
// let ffmpeg = await Wasmer.fromRegistry("wasmer/ffmpeg");
|
||||||
|
let Admzip = require('../../_shared/lib/adm-zip')
|
||||||
let path = data.path
|
let path = data.path
|
||||||
console.log(path)
|
console.log(path)
|
||||||
let fs = require('fs')
|
let fs = require('fs')
|
||||||
if (!fs.existsSync(path + '/data/graphics/')) {
|
if (!fs.existsSync(path + '/data/graphics/')) {
|
||||||
console.log('Path does not exist.')
|
console.log('Path for Graphics does not exist.')
|
||||||
send.error(400,'Path does not exist.')
|
send.error(400,'Path for Graphics does not exist.')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
await fs.promises.cp(path + "/data/graphics/ap_card", './plugins/sdvx@asphyxia/webui/asset/ap_card', {recursive: true}).catch((err: any) => {
|
await fs.promises.cp(path + "/data/graphics/ap_card", './plugins/sdvx@asphyxia/webui/asset/ap_card', {recursive: true}).catch((err: any) => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
|
|
@ -247,6 +259,210 @@ export const import_assets = async (data: { path: string }, send: WebUISend) =>
|
||||||
await fs.promises.cp(path + "/data/graphics/submonitor_bg", './plugins/sdvx@asphyxia/webui/asset/submonitor_bg', {recursive: true}).catch((err: any) => {
|
await fs.promises.cp(path + "/data/graphics/submonitor_bg", './plugins/sdvx@asphyxia/webui/asset/submonitor_bg', {recursive: true}).catch((err: any) => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
console.log('Assets imported.')
|
|
||||||
send.json({status:"ok"})
|
if (!fs.existsSync(path + '/data/sound/')) {
|
||||||
|
console.log('Path for sound does not exist.')
|
||||||
|
send.error(400,'Path for sound does not exist.')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
let zip = new Admzip()
|
||||||
|
await fs.promises.readdir(path + "/data/sound/custom").then((files: any) => {
|
||||||
|
// let file = files[0]
|
||||||
|
console.log(files)
|
||||||
|
|
||||||
|
for(let i in files){
|
||||||
|
let file = files[i]
|
||||||
|
if(file.endsWith('.s3p')){
|
||||||
|
fs.mkdirSync('./plugins/sdvx@asphyxia/webui/asset/temp/'+file, { recursive: true });
|
||||||
|
// fs.mkdirSync('./plugins/sdvx@asphyxia/webui/asset/audio/'+file.substring(0, 9), { recursive: true });
|
||||||
|
unpackS3P('./plugins/sdvx@asphyxia/webui/asset/temp/'+file, path + "/data/sound/custom/" + file, {})
|
||||||
|
// fs.promises.readFileSync('./plugins/sdvx@asphyxia/webui/asset/temp/'+file+'/0.wma').then(async (data: any) => {
|
||||||
|
// const instance = await ffmpeg.entrypoint.run({
|
||||||
|
// args: ["-i", "-", "-f", "wav", "-"],
|
||||||
|
// stdin: new Uint8Array(data),
|
||||||
|
// });
|
||||||
|
// const { stdout } = await instance.wait();
|
||||||
|
// fs.writeFileSync('./plugins/sdvx@asphyxia/webui/asset/audio/'+file.substring(0, 9)+'/0.wav', stdout);
|
||||||
|
|
||||||
|
// })
|
||||||
|
// exec(shell([ffmpeg, '-i', './plugins/sdvx@asphyxia/webui/asset/temp/'+file+'/0.wma', './plugins/sdvx@asphyxia/webui/asset/audio/'+file.substring(0, 9)+'/0.mp3']), (err: any, stdout: any, stderr: any) => {
|
||||||
|
// console.log(err)
|
||||||
|
// })
|
||||||
|
|
||||||
|
// exec(shell([ffmpeg, '-i', './plugins/sdvx@asphyxia/webui/asset/temp/'+file+'/1.wma', './plugins/sdvx@asphyxia/webui/asset/audio/'+file.substring(0, 9)+'/1.mp3']), (err: any, stdout: any, stderr: any) => {
|
||||||
|
// console.log(err)
|
||||||
|
// })
|
||||||
|
|
||||||
|
// if(fs.existsSync('./plugins/sdvx@asphyxia/webui/asset/temp/'+file+'/2.wma')){
|
||||||
|
// exec(shell([ffmpeg, '-i', './plugins/sdvx@asphyxia/webui/asset/temp/'+file+'/2.wma', './plugins/sdvx@asphyxia/webui/asset/audio/'+file.substring(0, 9)+'/2.mp3']), (err: any, stdout: any, stderr: any) => {
|
||||||
|
// console.log(err)
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}).finally(() => {
|
||||||
|
|
||||||
|
zip.addLocalFolder('./plugins/sdvx@asphyxia/webui/asset/temp', 'temp')
|
||||||
|
zip.writeZip('./plugins/sdvx@asphyxia/webui/asset/temp.zip')
|
||||||
|
})
|
||||||
|
|
||||||
|
await fs.promises.rm('./plugins/sdvx@asphyxia/webui/asset/temp', { recursive: true, force: true }).catch((err: any) => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
console.log('Assets imported. Now converting audio files on browser...')
|
||||||
|
send.file('webui/asset/temp.zip')
|
||||||
|
|
||||||
|
// fs.promises.rm('./plugins/sdvx@asphyxia/webui/asset/temp.zip', { force: true }).catch((err: any) => {
|
||||||
|
// console.log(err)
|
||||||
|
// })
|
||||||
|
// send.json({status:"ok"})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const update_webui_nemsys_data = async (data: any, send: WebUISend) => {
|
||||||
|
let string = data.file
|
||||||
|
let nemsys_xml = U.parseXML(string)
|
||||||
|
|
||||||
|
const fs = require('fs')
|
||||||
|
const filename = "../webui/asset/json/data.json"
|
||||||
|
const datajson = require(filename)
|
||||||
|
|
||||||
|
nemsys_xml.custom_nemsys_data.info.filter((e: any) => e.id != 8 && e.id != 9 && e.id != 10 && e.id != 11).forEach((item: any) => {
|
||||||
|
if(datajson.nemsys.filter((e: any) => e.value == item.id).length == 0){
|
||||||
|
datajson.nemsys.push({
|
||||||
|
value: item.id,
|
||||||
|
name: item.texture_name
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
fs.writeFileSync("./plugins/sdvx@asphyxia/webui/asset/json/data.json", JSON.stringify(datajson, null, 2))
|
||||||
|
send.json({status:"ok"})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const update_webui_stamp_data = async (data: any, send: WebUISend) => {
|
||||||
|
let string = data.file
|
||||||
|
let chat_stamp_xml = U.parseXML(string)
|
||||||
|
|
||||||
|
const fs = require('fs')
|
||||||
|
const filename = "../webui/asset/json/data.json"
|
||||||
|
const datajson = require(filename)
|
||||||
|
|
||||||
|
chat_stamp_xml.chat_stamp_data.info.forEach((item: any) => {
|
||||||
|
if(datajson.stamp.filter((e: any) => e.value == item.id).length == 0){
|
||||||
|
let addition = ""
|
||||||
|
if(item.filename != ""){
|
||||||
|
addition = item.filename.substring(item.filename.length - 2)
|
||||||
|
}
|
||||||
|
|
||||||
|
datajson.stamp.push({
|
||||||
|
value: item.id,
|
||||||
|
name: item.title + " " +addition
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
fs.writeFileSync("./plugins/sdvx@asphyxia/webui/asset/json/data.json", JSON.stringify(datajson, null, 2))
|
||||||
|
send.json({status:"ok"})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const update_webui_subbg_data = async (data: any, send: WebUISend) => {
|
||||||
|
const fs = require('fs')
|
||||||
|
const filename = "../webui/asset/json/data.json"
|
||||||
|
const datajson = require(filename)
|
||||||
|
|
||||||
|
let subbg_folder = fs.readdirSync("./plugins/sdvx@asphyxia/webui/asset/submonitor_bg")
|
||||||
|
let subbg_entry = {}
|
||||||
|
subbg_folder.forEach((item: any) => {
|
||||||
|
if(item.endsWith(".png")||item.endsWith(".mp4")){
|
||||||
|
if(subbg_entry[item.substring(6, 10)] == undefined){
|
||||||
|
subbg_entry[item.substring(6, 10)] = {"count":1, "video":false}
|
||||||
|
}else{
|
||||||
|
subbg_entry[item.substring(6, 10)]["count"] += 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(item.endsWith(".mp4")){
|
||||||
|
subbg_entry[item.substring(6, 10)]["video"] = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
console.log(JSON.stringify(subbg_entry, null, 2))
|
||||||
|
|
||||||
|
Object.keys(subbg_entry).forEach((item: any) => {
|
||||||
|
if(datajson.subbg.filter((e: any) => e.value == item).length == 0){
|
||||||
|
if(subbg_entry[item]["video"]){
|
||||||
|
datajson.subbg.push({
|
||||||
|
value: parseInt(item),
|
||||||
|
name: "SubBG "+ item,
|
||||||
|
video: true,
|
||||||
|
})
|
||||||
|
}else if(subbg_entry[item]["count"] > 1){
|
||||||
|
datajson.subbg.push({
|
||||||
|
value: parseInt(item),
|
||||||
|
name: "SubBG "+ item,
|
||||||
|
multi: true,
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
datajson.subbg.push({
|
||||||
|
value: parseInt(item),
|
||||||
|
name: "SubBG "+ item,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(subbg_entry[item]["video"]){
|
||||||
|
datajson.subbg.forEach((e: any) => {
|
||||||
|
if(e.value == parseInt(item)){
|
||||||
|
e.video = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else if(subbg_entry[item]["count"] > 1){
|
||||||
|
datajson.subbg.forEach((e: any) => {
|
||||||
|
if(e.value == parseInt(item)){
|
||||||
|
e.multi = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
fs.writeFileSync("./plugins/sdvx@asphyxia/webui/asset/json/data.json", JSON.stringify(datajson, null, 2))
|
||||||
|
send.json({status:"ok"})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const update_webui_bgm_data = async (data: any, send: WebUISend) => {
|
||||||
|
const fs = require('fs')
|
||||||
|
const filename = "../webui/asset/json/data.json"
|
||||||
|
const datajson = require(filename)
|
||||||
|
|
||||||
|
let bgm_folder = fs.readdirSync("./plugins/sdvx@asphyxia/webui/asset/audio")
|
||||||
|
let bgm_entry = []
|
||||||
|
|
||||||
|
bgm_folder.forEach((item: any) => {
|
||||||
|
if(item.substring(0, 6) == "custom"){
|
||||||
|
bgm_entry.push(parseInt(item.substring(item.length - 2)))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
console.log(bgm_entry)
|
||||||
|
|
||||||
|
bgm_entry.forEach((item: any) => {
|
||||||
|
if(datajson.bgm.filter((e: any) => e.value == item).length == 0){
|
||||||
|
datajson.bgm.push({
|
||||||
|
value: parseInt(item),
|
||||||
|
name: "BGM "+ item,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
fs.writeFileSync("./plugins/sdvx@asphyxia/webui/asset/json/data.json", JSON.stringify(datajson, null, 2))
|
||||||
|
send.json({status:"ok"})
|
||||||
|
}
|
||||||
|
|
@ -9,7 +9,11 @@ import {
|
||||||
importMix,
|
importMix,
|
||||||
deleteMix,
|
deleteMix,
|
||||||
make_hexa_easier,
|
make_hexa_easier,
|
||||||
import_assets
|
import_assets,
|
||||||
|
update_webui_nemsys_data,
|
||||||
|
update_webui_stamp_data,
|
||||||
|
update_webui_subbg_data,
|
||||||
|
update_webui_bgm_data
|
||||||
// sendImg,
|
// sendImg,
|
||||||
// sendImgWithID,
|
// sendImgWithID,
|
||||||
// getScore,
|
// getScore,
|
||||||
|
|
@ -59,7 +63,7 @@ export function register() {
|
||||||
R.Config('use_asphyxia_gameover',{ type: 'boolean', default: true, name:'Use Asphyxia Gameover', desc:'Enable the Asphyxia gameover message after ending the game.'})
|
R.Config('use_asphyxia_gameover',{ type: 'boolean', default: true, name:'Use Asphyxia Gameover', desc:'Enable the Asphyxia gameover message after ending the game.'})
|
||||||
R.Config('use_blasterpass',{ type: 'boolean', default: true, name:'Use Blaster Pass', desc:'Enable Blaster Pass for VW and EG'});
|
R.Config('use_blasterpass',{ type: 'boolean', default: true, name:'Use Blaster Pass', desc:'Enable Blaster Pass for VW and EG'});
|
||||||
R.Config('new_year_special',{ type: 'boolean', default: true, name:'Use New Year Special', desc:'Enable New Year Special BGM for login'});
|
R.Config('new_year_special',{ type: 'boolean', default: true, name:'Use New Year Special', desc:'Enable New Year Special BGM for login'});
|
||||||
R.Config('music_count',{ type: 'integer', default: 2200, name:'Music Count', desc:'The total number of music in the game.'});
|
R.Config('music_count',{ type: 'integer', default: 2200, name:'Music Count', desc:'The maximum id of music in the game.'});
|
||||||
|
|
||||||
R.WebUIEvent('updateProfile', updateProfile);
|
R.WebUIEvent('updateProfile', updateProfile);
|
||||||
R.WebUIEvent('updateMix', updateMix);
|
R.WebUIEvent('updateMix', updateMix);
|
||||||
|
|
@ -67,6 +71,10 @@ export function register() {
|
||||||
R.WebUIEvent('deleteMix', deleteMix);
|
R.WebUIEvent('deleteMix', deleteMix);
|
||||||
R.WebUIEvent('easyHexa', make_hexa_easier);
|
R.WebUIEvent('easyHexa', make_hexa_easier);
|
||||||
R.WebUIEvent('import_assets', import_assets);
|
R.WebUIEvent('import_assets', import_assets);
|
||||||
|
R.WebUIEvent('update_webui_nemsys', update_webui_nemsys_data);
|
||||||
|
R.WebUIEvent('update_webui_chat_stamp', update_webui_stamp_data);
|
||||||
|
R.WebUIEvent('update_webui_subbg', update_webui_subbg_data);
|
||||||
|
R.WebUIEvent('update_webui_bgm', update_webui_bgm_data);
|
||||||
|
|
||||||
const MultiRoute = (method: string, handler: EPR | boolean) => {
|
const MultiRoute = (method: string, handler: EPR | boolean) => {
|
||||||
R.Route(`game.sv6_${method}`, handler);
|
R.Route(`game.sv6_${method}`, handler);
|
||||||
|
|
@ -127,6 +135,8 @@ export function register() {
|
||||||
//logerrlevel: K.ITEM('s32', 0),
|
//logerrlevel: K.ITEM('s32', 0),
|
||||||
//evtidnosendflg: K.ITEM('s32', 0)
|
//evtidnosendflg: K.ITEM('s32', 0)
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
R.Unhandled();
|
R.Unhandled();
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
- let music = 0;
|
|
||||||
- let event = 0;
|
|
||||||
- let catalog = 0;
|
|
||||||
|
|
||||||
game
|
|
||||||
limited
|
|
||||||
while music < 200
|
|
||||||
music(id=music++, flag=2)
|
|
||||||
|
|
||||||
event
|
|
||||||
while event < 16
|
|
||||||
info(id=event++)
|
|
||||||
|
|
||||||
catalog
|
|
||||||
while catalog < 256
|
|
||||||
info(id=catalog++, currency=1, price=1)
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
game
|
|
||||||
name(__type="str") #{name}
|
|
||||||
code(__type="str") #{code}
|
|
||||||
gamecoin_packet(__type="u32") #{packets}
|
|
||||||
gamecoin_block(__type="u32") #{blocks}
|
|
||||||
exp_point(__type="u32") #{expPoint ? expPoint : 0}
|
|
||||||
m_user_cnt(__type="u32") #{mUserCnt ? mUserCnt : 0}
|
|
||||||
have_item(__type="bool" __count=512) #{Array(512).fill(1).join(" ")}
|
|
||||||
have_note(__type="bool" __count=512) #{Array(512).fill(1).join(" ")}
|
|
||||||
|
|
||||||
last(
|
|
||||||
music_id=musicID,
|
|
||||||
music_type=musicType,
|
|
||||||
sort_type=sortType,
|
|
||||||
headphone=headphone,
|
|
||||||
hispeed=hiSpeed,
|
|
||||||
appeal_id=appeal,
|
|
||||||
frame0=boothFrame ? boothFrame[0] : 0,
|
|
||||||
frame1=boothFrame ? boothFrame[1] : 0,
|
|
||||||
frame2=boothFrame ? boothFrame[2] : 0,
|
|
||||||
frame3=boothFrame ? boothFrame[3] : 0,
|
|
||||||
frame4=boothFrame ? boothFrame[4] : 0,
|
|
||||||
)
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
- let music = 0;
|
|
||||||
- let event = 0;
|
|
||||||
- let catalog = 0;
|
|
||||||
|
|
||||||
|
|
||||||
game
|
|
||||||
music_limited
|
|
||||||
while music < 23
|
|
||||||
each type in [0,1,2,3]
|
|
||||||
info
|
|
||||||
music_id(__type="s32") #{music++}
|
|
||||||
music_type(__type="u8") #{type}
|
|
||||||
limited(__type="u8") 3
|
|
||||||
|
|
||||||
event
|
|
||||||
while event < 41
|
|
||||||
info
|
|
||||||
event_id(__type="u32") #{event++}
|
|
||||||
|
|
||||||
skill_course
|
|
||||||
each course in courses
|
|
||||||
info
|
|
||||||
course_id(__type="s16") #{course.id}
|
|
||||||
level(__type="s16") #{course.level}
|
|
||||||
season_id(__type="s16") #{course.season_id}
|
|
||||||
season_name(__type="str") #{course.season_name}
|
|
||||||
season_new_flg(__type="bool") #{course.new_flg}
|
|
||||||
course_name(_type="str") #{course.name}
|
|
||||||
course_type(__type="s16") #{course.type}
|
|
||||||
skill_name_id(__type="s16") #{course.name_id}
|
|
||||||
matching_assist(__type="bool") #{course.matching_assist}
|
|
||||||
guage_type(__type="s16") #{course.guage_type}
|
|
||||||
paseli_type(type="s16") #{course.paseli_type}
|
|
||||||
each trackinfo in course.tracks
|
|
||||||
track
|
|
||||||
track_no(__type="s16") #{trackinfo.no}
|
|
||||||
music_id(__type="s32") #{trackinfo.id}
|
|
||||||
music_type(__type="s8") #{trackinfo.type}
|
|
||||||
|
|
@ -1,105 +0,0 @@
|
||||||
game
|
|
||||||
result(__type="u8") 0
|
|
||||||
name(__type="str") #{name}
|
|
||||||
code(__type="str") #{code}
|
|
||||||
sdvx_id(__type="str") #{code}
|
|
||||||
gamecoin_packet(__type="u32") #{packets}
|
|
||||||
gamecoin_block(__type="u32") #{blocks}
|
|
||||||
|
|
||||||
|
|
||||||
last
|
|
||||||
music_id(__type="s32") #{musicID}
|
|
||||||
music_type(__type="u8") #{musicType}
|
|
||||||
sort_type(__type="u8") #{sortType}
|
|
||||||
comment_id(__type="u16") 0
|
|
||||||
appeal_id(__type="u16") #{appeal}
|
|
||||||
headphone(__type="u8") #{headphone}
|
|
||||||
narrow_down(__type="u8") #{narrowDown}
|
|
||||||
gauge_option(__type="u8") #{gaugeOption}
|
|
||||||
blaster_energy(__type="u32") #{blasterEnergy}
|
|
||||||
blaster_count(__type="u32") #{blasterCount}
|
|
||||||
extrack_energy(__type="u16") #{extrackEnergy}
|
|
||||||
|
|
||||||
hispeed(__type="s32") #{hiSpeed}
|
|
||||||
lanespeed(__type="u32") #{laneSpeed}
|
|
||||||
|
|
||||||
ars_option(__type="u8") #{arsOption}
|
|
||||||
notes_option(__type="u8") #{notesOption}
|
|
||||||
early_late_disp(__type="u8") #{earlyLateDisp}
|
|
||||||
draw_adjust(__type="s32") #{drawAdjust}
|
|
||||||
eff_c_left(__type="u8") #{effCLeft}
|
|
||||||
eff_c_right(__type="u8") #{effCRight}
|
|
||||||
|
|
||||||
|
|
||||||
kac_id(__type="str") #{name}
|
|
||||||
|
|
||||||
skill_level(__type="s16") #{skill.level}
|
|
||||||
skill_base_id(__type="s16") #{skill.base}
|
|
||||||
skill_name_id(__type="s16") #{skill.name}
|
|
||||||
|
|
||||||
ea_shop
|
|
||||||
packet_booster(__type="s32") 1
|
|
||||||
if version < 5
|
|
||||||
block_booster(__type="s32") 1
|
|
||||||
if version >= 5
|
|
||||||
blaster_pass_enable(__type="bool") 1
|
|
||||||
blaster_pass_limit_date(__type="u64") #{currentTime}
|
|
||||||
|
|
||||||
eaappli
|
|
||||||
relation(__type="s8") 1
|
|
||||||
cloud
|
|
||||||
relation(__type="s8") 1
|
|
||||||
block_no(__type="s32") 0
|
|
||||||
|
|
||||||
skill
|
|
||||||
course
|
|
||||||
each course in courses
|
|
||||||
d
|
|
||||||
ssnid(__type="s16") #{course.sid}
|
|
||||||
crsid(__type="s16") #{course.cid}
|
|
||||||
sc(__type="s32") #{course.score}
|
|
||||||
ex(__type="s32") 0
|
|
||||||
ct(__type="s16") #{course.clear}
|
|
||||||
gr(__type="s16") #{course.grade}
|
|
||||||
ar(__type="s16") #{course.rate}
|
|
||||||
cnt(__type="s16") #{course.count}
|
|
||||||
course_total
|
|
||||||
each course in courses
|
|
||||||
d
|
|
||||||
ssnid(__type="s16") #{course.sid}
|
|
||||||
crsid(__type="s16") #{course.cid}
|
|
||||||
sc(__type="s32") #{course.score}
|
|
||||||
ex(__type="s32") 0
|
|
||||||
ct(__type="s16") #{course.clear}
|
|
||||||
gr(__type="s16") #{course.grade}
|
|
||||||
ar(__type="s16") #{course.rate}
|
|
||||||
cnt(__type="s16") #{course.count}
|
|
||||||
course_all
|
|
||||||
each course in courses
|
|
||||||
d
|
|
||||||
ssnid(__type="s16") #{course.sid}
|
|
||||||
crsid(__type="s16") #{course.cid}
|
|
||||||
sc(__type="s32") #{course.score}
|
|
||||||
ex(__type="s32") 0
|
|
||||||
ct(__type="s16") #{course.clear}
|
|
||||||
gr(__type="s16") #{course.grade}
|
|
||||||
ar(__type="s16") #{course.rate}
|
|
||||||
cnt(__type="s16") #{course.count}
|
|
||||||
|
|
||||||
item
|
|
||||||
each item in tempItem
|
|
||||||
info
|
|
||||||
type(__type="u8") #{item.type}
|
|
||||||
id(__type="u32") #{item.id}
|
|
||||||
param(__type="u32") #{item.param}
|
|
||||||
|
|
||||||
|
|
||||||
play_count(__type="u32") 1001
|
|
||||||
day_count(__type="u32") 301
|
|
||||||
today_count(__type="u32") 21
|
|
||||||
play_chain(__type="u32") 31
|
|
||||||
max_play_chain(__type="u32") 31
|
|
||||||
week_count(__type="u32") 9
|
|
||||||
week_play_count(__type="u32") 101
|
|
||||||
week_chain(__type="u32") 31
|
|
||||||
max_week_chain(__type="u32") 31
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
game
|
|
||||||
new
|
|
||||||
each music in temp
|
|
||||||
music
|
|
||||||
music_id (__type="u32")#{music.mid}
|
|
||||||
music_type (__type="u32")#{music.type}
|
|
||||||
score (__type="u32")#{music.score}
|
|
||||||
cnt (__type="u32")1
|
|
||||||
clear_type (__type="u32")#{music.clear}
|
|
||||||
score_grade (__type="u32")#{music.grade}
|
|
||||||
btn_rate (__type="u32")#{music.buttonRate}
|
|
||||||
long_rate (__type="u32")#{music.longRate}
|
|
||||||
vol_rate (__type="u32")#{music.volRate}
|
|
||||||
old
|
|
||||||
Loading…
Reference in New Issue
Block a user