pref: format @/game.

This commit is contained in:
Rintim 2024-04-16 00:49:47 +08:00
parent 16555acdd8
commit 5197d6b2ce
No known key found for this signature in database
GPG Key ID: BE9E1EA615BACFCF
18 changed files with 34474 additions and 32178 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
// apk每次安装后第一次启动加载Service Worker会失败
// 所以每次导入这个ts判断是否会成功失败的话重启一次
export const text: string = 'ts文件导入成功';
export const text: string = "ts文件导入成功";

View File

@ -1,249 +1,410 @@
window.config={
extension_sources:{
'GitHub Proxy':'https://mirror.ghproxy.com/https://raw.githubusercontent.com/libccy/noname-extension/master/',
FastGit:'https://raw.fgit.cf/libccy/noname-extension/master/',
GitHub:'https://raw.githubusercontent.com/libccy/noname-extension/master/'
window.config = {
extension_sources: {
"GitHub Proxy":
"https://mirror.ghproxy.com/https://raw.githubusercontent.com/libccy/noname-extension/master/",
FastGit: "https://raw.fgit.cf/libccy/noname-extension/master/",
GitHub: "https://raw.githubusercontent.com/libccy/noname-extension/master/",
},
extension_source:'GitHub Proxy',
forbidai:['ns_liuzhang'],
forbidai_user:[],
forbidall:[],
forbidstone:['zhugedan','pal_xuanxiao','hs_malfurion','lusu','chenlin','hs_siwangzhiyi',
'gjqt_bailitusu','yuanshao','swd_anka','swd_nicole','daqiao','re_daqiao','hs_xuanzhuanjijia',
'zhuran','huatuo','swd_tuwei','hs_guldan','wangyi','caoang','swd_guyue','swd_rongshuang',
'swd_jiangziya','guojia','re_guojia','shen_caocao','swd_qiner','caopi','hs_yngvar','guansuo',
'gjqt_aruan','swd_hanluo','hs_anduin','swd_huanglei','yxs_yujix','yxs_luzhishen','swd_muyun','ow_tianshi',
'pal_yuejinzhao','hs_antonidas','xushi','hs_lreno'
extension_source: "GitHub Proxy",
forbidai: ["ns_liuzhang"],
forbidai_user: [],
forbidall: [],
forbidstone: [
"zhugedan",
"pal_xuanxiao",
"hs_malfurion",
"lusu",
"chenlin",
"hs_siwangzhiyi",
"gjqt_bailitusu",
"yuanshao",
"swd_anka",
"swd_nicole",
"daqiao",
"re_daqiao",
"hs_xuanzhuanjijia",
"zhuran",
"huatuo",
"swd_tuwei",
"hs_guldan",
"wangyi",
"caoang",
"swd_guyue",
"swd_rongshuang",
"swd_jiangziya",
"guojia",
"re_guojia",
"shen_caocao",
"swd_qiner",
"caopi",
"hs_yngvar",
"guansuo",
"gjqt_aruan",
"swd_hanluo",
"hs_anduin",
"swd_huanglei",
"yxs_yujix",
"yxs_luzhishen",
"swd_muyun",
"ow_tianshi",
"pal_yuejinzhao",
"hs_antonidas",
"xushi",
"hs_lreno",
],
forbidchess:['hetaihou','swd_kangnalishi'],
forbidboss:['caiwenji','gjqt_aruan','pal_xuanxiao','swd_hupo'],
forbiddouble:['zhugedan','swd_kangnalishi','dongzhuo','wutugu','hs_siwangzhiyi','hs_ronghejuren','hs_shanlingjuren'],
forbidthreecard:['qiankunbiao','shenhuofeiya','gw_ciguhanshuang','gw_birinongwu','gw_qinpendayu','gw_poxiao'],
zhinang_tricks:['guohe','wuxie','wuzhong','dongzhuxianji'],
connect_zhinang_tricks:['guohe','wuxie','wuzhong','dongzhuxianji'],
all:{
sgscharacters:['standard','shenhua','xinghuoliaoyuan','refresh','yijiang','sp','sp2','xianding','huicui','extra','old','mobile','shiji','tw','yingbian','offline','jsrg','sb','clan','collab','onlyOL'],
sgscards:['standard','extra','sp','guozhan','zhulu','yingbian','yongjian'],
sgsmodes:['identity','guozhan','versus','doudizhu','single','brawl','connect'],
stockmode:['identity','guozhan','versus','boss','doudizhu','single','chess','stone','connect','brawl','tafang'],
stockextension:['boss','cardpile','coin','wuxing'],
layout:['default','newlayout'],
theme:['woodden','music','simple'],
card_font:['xiaozhuan','huangcao','caoshu','xingshu'],
double_hp:['hejiansan','pingjun','zuidazhi','zuixiaozhi','zonghe'],
image_background_filter:['default','blur','gray','sepia','invert','saturate','contrast','hue','brightness'],
},
game:'sgs',
duration:500,
hoveration:1000,
doubleclick_intro:true,
cheat:false,
volumn_background:8,
volumn_audio:8,
connect_avatar:'caocao',
connect_nickname:'无名玩家',
config_menu:true,
auto_popped_config:true,
auto_popped_history:false,
auto_skill:true,
auto_confirm:true,
enable_drag:true,
enable_pressure:false,
pressure_taptic:true,
hover_handcard:true,
hover_all:true,
right_info:true,
longpress_info:true,
long_info:true,
background_music:'music_default',
background_audio:true,
background_speak:true,
glow_phase:'yellow',
die_move:'flip',
skin:{},
gameRecord:{},
extensionInfo:{},
autoskilllist:[],
hiddenModePack:[],
hiddenCharacterPack:[],
hiddenCardPack:[],
hiddenPlayPack:[],
hiddenBackgroundPack:[],
customBackgroundPack:[],
favouriteCharacter:[],
favouriteMode:[],
recentIP:[],
vintageSkills:[],
alteredSkills:[],
brokenFile:[],
theme:'woodden',
layout:'mobile',
card_style:'default',
cardback_style:'default',
hp_style:'default',
image_character:'default',
image_background:'default',
asset_image:true,
asset_font:true,
card_font:'xiaozhuan',
show_statusbar_ios:'off',
show_statusbar_android:false,
show_name:true,
show_replay:false,
show_round_menu:true,
show_pause:true,
show_auto:true,
show_volumn:true,
show_cardpile:true,
only_fullskin:true,
show_connect:true,
show_wuxie:false,
show_wuxie_self:true,
show_stat:true,
show_playerids:true,
show_scrollbar:false,
mousewheel:true,
fold_card:true,
threed_card:false,
vertical_scroll:false,
handcard_scroll:0,
animation:true,
skill_animation_type:'default',
paused:false,
title:false,
button_press:true,
damage_shake:true,
log_highlight:true,
player_border:'normal',
radius_size:'default',
modeconfig:false,
gameconfig:false,
appearence:false,
video:'20',
coin:0,
intro:'i',
right_click:'pause',
sort:'type_sort',
cards:['standard','extra'],
characters:['standard','shenhua','sp','sp2','yijiang','refresh','xinghuoliaoyuan','mobile','extra','yingbian','sb','tw','offline','clan','collab','xianding','huicui','shiji','jsrg','onlyOL'],
connect_characters:['diy'],
connect_cards:['huanlekapai','guozhan','sp','zhulu','yingbian','yongjian'],
plays:[],
extensions:[],
banned:[],
bannedcards:[],
forbidlist:[],
bannedpile:{},
customcardpile:{},
addedpile:{},
mode:'identity',
mode_config:{
global:{
player_number:8,
auto_identity:'off',
double_character:false,
save_progress:true,
free_choose:true,
swap:true,
change_identity:true,
battle_number:3,
double_hp:'pingjun',
},
identity:{
identity:[
['zhu','fan'],
['zhu','nei','fan'],
['zhu','zhong','nei','fan'],
['zhu','zhong','nei','fan','fan'],
['zhu','zhong','nei','fan','fan','fan'],
['zhu','zhong','zhong','nei','fan','fan','fan'],
['zhu','zhong','zhong','nei','fan','fan','fan','fan'],
['zhu','zhong','zhong','zhong','nei','fan','fan','fan','fan'],
['zhu','zhong','zhong','zhong','nei','nei','fan','fan','fan','fan'],
forbidchess: ["hetaihou", "swd_kangnalishi"],
forbidboss: ["caiwenji", "gjqt_aruan", "pal_xuanxiao", "swd_hupo"],
forbiddouble: [
"zhugedan",
"swd_kangnalishi",
"dongzhuo",
"wutugu",
"hs_siwangzhiyi",
"hs_ronghejuren",
"hs_shanlingjuren",
],
forbidthreecard: [
"qiankunbiao",
"shenhuofeiya",
"gw_ciguhanshuang",
"gw_birinongwu",
"gw_qinpendayu",
"gw_poxiao",
],
zhinang_tricks: ["guohe", "wuxie", "wuzhong", "dongzhuxianji"],
connect_zhinang_tricks: ["guohe", "wuxie", "wuzhong", "dongzhuxianji"],
all: {
sgscharacters: [
"standard",
"shenhua",
"xinghuoliaoyuan",
"refresh",
"yijiang",
"sp",
"sp2",
"xianding",
"huicui",
"extra",
"old",
"mobile",
"shiji",
"tw",
"yingbian",
"offline",
"jsrg",
"sb",
"clan",
"collab",
"onlyOL",
],
sgscards: [
"standard",
"extra",
"sp",
"guozhan",
"zhulu",
"yingbian",
"yongjian",
],
sgsmodes: [
"identity",
"guozhan",
"versus",
"doudizhu",
"single",
"brawl",
"connect",
],
stockmode: [
"identity",
"guozhan",
"versus",
"boss",
"doudizhu",
"single",
"chess",
"stone",
"connect",
"brawl",
"tafang",
],
stockextension: ["boss", "cardpile", "coin", "wuxing"],
layout: ["default", "newlayout"],
theme: ["woodden", "music", "simple"],
card_font: ["xiaozhuan", "huangcao", "caoshu", "xingshu"],
double_hp: ["hejiansan", "pingjun", "zuidazhi", "zuixiaozhi", "zonghe"],
image_background_filter: [
"default",
"blur",
"gray",
"sepia",
"invert",
"saturate",
"contrast",
"hue",
"brightness",
],
choice:{
zhu:3,
zhong:4,
nei:5,
fan:3,
},
show_identity:true,
difficulty:'normal',
dierestart:true
game: "sgs",
duration: 500,
hoveration: 1000,
doubleclick_intro: true,
cheat: false,
volumn_background: 8,
volumn_audio: 8,
connect_avatar: "caocao",
connect_nickname: "无名玩家",
config_menu: true,
auto_popped_config: true,
auto_popped_history: false,
auto_skill: true,
auto_confirm: true,
enable_drag: true,
enable_pressure: false,
pressure_taptic: true,
hover_handcard: true,
hover_all: true,
right_info: true,
longpress_info: true,
long_info: true,
background_music: "music_default",
background_audio: true,
background_speak: true,
glow_phase: "yellow",
die_move: "flip",
skin: {},
gameRecord: {},
extensionInfo: {},
autoskilllist: [],
hiddenModePack: [],
hiddenCharacterPack: [],
hiddenCardPack: [],
hiddenPlayPack: [],
hiddenBackgroundPack: [],
customBackgroundPack: [],
favouriteCharacter: [],
favouriteMode: [],
recentIP: [],
vintageSkills: [],
alteredSkills: [],
brokenFile: [],
theme: "woodden",
layout: "mobile",
card_style: "default",
cardback_style: "default",
hp_style: "default",
image_character: "default",
image_background: "default",
asset_image: true,
asset_font: true,
card_font: "xiaozhuan",
show_statusbar_ios: "off",
show_statusbar_android: false,
show_name: true,
show_replay: false,
show_round_menu: true,
show_pause: true,
show_auto: true,
show_volumn: true,
show_cardpile: true,
only_fullskin: true,
show_connect: true,
show_wuxie: false,
show_wuxie_self: true,
show_stat: true,
show_playerids: true,
show_scrollbar: false,
mousewheel: true,
fold_card: true,
threed_card: false,
vertical_scroll: false,
handcard_scroll: 0,
animation: true,
skill_animation_type: "default",
paused: false,
title: false,
button_press: true,
damage_shake: true,
log_highlight: true,
player_border: "normal",
radius_size: "default",
modeconfig: false,
gameconfig: false,
appearence: false,
video: "20",
coin: 0,
intro: "i",
right_click: "pause",
sort: "type_sort",
cards: ["standard", "extra"],
characters: [
"standard",
"shenhua",
"sp",
"sp2",
"yijiang",
"refresh",
"xinghuoliaoyuan",
"mobile",
"extra",
"yingbian",
"sb",
"tw",
"offline",
"clan",
"collab",
"xianding",
"huicui",
"shiji",
"jsrg",
"onlyOL",
],
connect_characters: ["diy"],
connect_cards: [
"huanlekapai",
"guozhan",
"sp",
"zhulu",
"yingbian",
"yongjian",
],
plays: [],
extensions: [],
banned: [],
bannedcards: [],
forbidlist: [],
bannedpile: {},
customcardpile: {},
addedpile: {},
mode: "identity",
mode_config: {
global: {
player_number: 8,
auto_identity: "off",
double_character: false,
save_progress: true,
free_choose: true,
swap: true,
change_identity: true,
battle_number: 3,
double_hp: "pingjun",
},
guozhan:{
difficulty:'normal',
initshow_draw:'mark',
dierestart:true
identity: {
identity: [
["zhu", "fan"],
["zhu", "nei", "fan"],
["zhu", "zhong", "nei", "fan"],
["zhu", "zhong", "nei", "fan", "fan"],
["zhu", "zhong", "nei", "fan", "fan", "fan"],
["zhu", "zhong", "zhong", "nei", "fan", "fan", "fan"],
["zhu", "zhong", "zhong", "nei", "fan", "fan", "fan", "fan"],
[
"zhu",
"zhong",
"zhong",
"zhong",
"nei",
"fan",
"fan",
"fan",
"fan",
],
[
"zhu",
"zhong",
"zhong",
"zhong",
"nei",
"nei",
"fan",
"fan",
"fan",
"fan",
],
],
choice: {
zhu: 3,
zhong: 4,
nei: 5,
fan: 3,
},
show_identity: true,
difficulty: "normal",
dierestart: true,
},
guozhan: {
difficulty: "normal",
initshow_draw: "mark",
dierestart: true,
},
},
current_mode:{},
customforbid:[],
forbid:[
['huashen'],
['rehuashen'],
['xinmanjuan'],
current_mode: {},
customforbid: [],
forbid: [
["huashen"],
["rehuashen"],
["xinmanjuan"],
//['xinleiji','fuji'],
['xinleiji','xinfu_jijun'],
['reluanji','jueqing'],
['lianying','rende'],
['lianying','anxian'],
['lianying','yinguo'],
['lianying','qingjian'],
['boss_juejing','rende'],
['boss_juejing','anxian'],
['boss_juejing','yinguo'],
['boss_juejing','qingjian'],
['shangshi','rende'],
['shangshi','anxian'],
['shangshi','yinguo'],
['shangshi','qingjian'],
['rende','relianying'],
['anxian','relianying'],
['yinguo','relianying'],
['shenxing','relianying'],
['qingjian','relianying'],
['rende','yuling'],
['anxian','yuling'],
['yinguo','yuling'],
['qingjian','yuling'],
["xinleiji", "xinfu_jijun"],
["reluanji", "jueqing"],
["lianying", "rende"],
["lianying", "anxian"],
["lianying", "yinguo"],
["lianying", "qingjian"],
["boss_juejing", "rende"],
["boss_juejing", "anxian"],
["boss_juejing", "yinguo"],
["boss_juejing", "qingjian"],
["shangshi", "rende"],
["shangshi", "anxian"],
["shangshi", "yinguo"],
["shangshi", "qingjian"],
["rende", "relianying"],
["anxian", "relianying"],
["yinguo", "relianying"],
["shenxing", "relianying"],
["qingjian", "relianying"],
["rende", "yuling"],
["anxian", "yuling"],
["yinguo", "yuling"],
["qingjian", "yuling"],
//['qingnang','yiji'],
//['qingnang','reyiji'],
//['qingjian','tuntian'],
// ['yiji','tuntian'],
// ['reyiji','tuntian'],
['tuntian','guidao'],
['tuntian','tiandao'],
['tuntian','huanshi'],
["tuntian", "guidao"],
["tuntian", "tiandao"],
["tuntian", "huanshi"],
// ['tuntian','guicai'],
// ['jiang','chongzhen'],
// ['fenji','yuling'],
['jiushi','guixin'],
['xiuhua','qiaoxie'],
['xiuhua','xuanfeng'],
['xiuhua','duanxing'],
['xiuhua','xiaoji'],
['xiuhua','xiaoji'],
["jiushi", "guixin"],
["xiuhua", "qiaoxie"],
["xiuhua", "xuanfeng"],
["xiuhua", "duanxing"],
["xiuhua", "xiaoji"],
["xiuhua", "xiaoji"],
// ['jiushi','jushou'],
// ['jiushi','kuiwei'],
['zishu','xinfu_songsang'],
['zishu','shenxing'],
['minishendao','luoshen'],
['minishendao','reluoshen'],
['akane_quanqing','lianying'],
['akane_quanqing','relianying'],
['akane_quanqing','shangshi'],
['dcruyi','cxliushi'],
]
["zishu", "xinfu_songsang"],
["zishu", "shenxing"],
["minishendao", "luoshen"],
["minishendao", "reluoshen"],
["akane_quanqing", "lianying"],
["akane_quanqing", "relianying"],
["akane_quanqing", "shangshi"],
["dcruyi", "cxliushi"],
],
};

View File

@ -1,176 +1,198 @@
var fs=require('fs');
var path=require('path');
var exec = require('child_process').exec;
global.window=global;
require(__dirname+'/update.js');
require(__dirname+'/asset.js');
var fs = require("fs");
var path = require("path");
var exec = require("child_process").exec;
global.window = global;
require(__dirname + "/update.js");
require(__dirname + "/asset.js");
var updates=window.noname_update;
var newversion=false;
var commit=false
if(process.argv[2]){
if(/[0-9]/.test(process.argv[2][0])){
newversion=true;
var updates = window.noname_update;
var newversion = false;
var commit = false;
if (process.argv[2]) {
if (/[0-9]/.test(process.argv[2][0])) {
newversion = true;
updates.update = updates.version;
updates.version = '1.9.' + process.argv[2];
commit=updates.version;
}
else{
commit=process.argv[2];
updates.version = "1.9." + process.argv[2];
commit = updates.version;
} else {
commit = process.argv[2];
}
}
var assetlist='';
var skinlist='window.noname_skin_list={\n';
var entrylist=[];
var entrymap={};
var get = function(dir,callback){
fs.readdir(dir,function(err,list){
var shift=function(){
if(list.length){
var filename=list.shift();
var delay=false;
if(!/\.|~|_/.test(filename[0])){
var url=dir+'/'+filename;
var stat=fs.statSync(url);
if(stat.isFile()){
if(['.jpg','.png','.mp3','.ttf'].indexOf(path.extname(url))!=-1){
var assetentry=path.relative(path.dirname(__dirname),url);
assetlist+=',\n\t\''+assetentry+'\'';
var assetlist = "";
var skinlist = "window.noname_skin_list={\n";
var entrylist = [];
var entrymap = {};
var get = function (dir, callback) {
fs.readdir(dir, function (err, list) {
var shift = function () {
if (list.length) {
var filename = list.shift();
var delay = false;
if (!/\.|~|_/.test(filename[0])) {
var url = dir + "/" + filename;
var stat = fs.statSync(url);
if (stat.isFile()) {
if (
[".jpg", ".png", ".mp3", ".ttf"].indexOf(
path.extname(url)
) != -1
) {
var assetentry = path.relative(
path.dirname(__dirname),
url
);
assetlist += ",\n\t'" + assetentry + "'";
entrylist.push(assetentry);
}
}
else if(stat.isDirectory()){
if(dir==path.dirname(__dirname)+'/image/skin'){
fs.readdir(url,function(err,list){
var num=0;
for(var i=0;i<list.length;i++){
var url2=url+'/'+list[i];
var stat=fs.statSync(url2);
if(stat.isFile()&&path.extname(url2)=='.jpg'){
} else if (stat.isDirectory()) {
if (dir == path.dirname(__dirname) + "/image/skin") {
fs.readdir(url, function (err, list) {
var num = 0;
for (var i = 0; i < list.length; i++) {
var url2 = url + "/" + list[i];
var stat = fs.statSync(url2);
if (
stat.isFile() &&
path.extname(url2) == ".jpg"
) {
num++;
}
}
skinlist+='\t'+filename+':'+num+',\n';
entrymap[filename]=num;
skinlist += "\t" + filename + ":" + num + ",\n";
entrymap[filename] = num;
shift();
});
delay=true;
}
else{
get(url,shift);
delay=true;
delay = true;
} else {
get(url, shift);
delay = true;
}
}
}
if(!delay){
if (!delay) {
shift();
}
}
else{
} else {
callback();
}
}
};
shift();
});
};
get(path.dirname(__dirname),function(){
var diff=false;
if(window.noname_asset_list.length==entrylist.length+1){
for(var i=0;i<entrylist.length;i++){
if(entrylist[i]!=window.noname_asset_list[i+1]){
diff=true;
get(path.dirname(__dirname), function () {
var diff = false;
if (window.noname_asset_list.length == entrylist.length + 1) {
for (var i = 0; i < entrylist.length; i++) {
if (entrylist[i] != window.noname_asset_list[i + 1]) {
diff = true;
break;
}
}
if(!diff){
for(var i in entrymap){
if(window.noname_skin_list[i]!==entrymap[i]){
diff=true;
if (!diff) {
for (var i in entrymap) {
if (window.noname_skin_list[i] !== entrymap[i]) {
diff = true;
break;
}
}
for(var i in noname_skin_list){
if(window.noname_skin_list[i]!==entrymap[i]){
diff=true;
for (var i in noname_skin_list) {
if (window.noname_skin_list[i] !== entrymap[i]) {
diff = true;
break;
}
}
}
} else {
diff = true;
}
else{
diff=true;
var next = function () {
exec("git diff --name-only", (error, stdout, stderr) => {
var updatelist =
"window.noname_update={\n\tversion:'" + updates.version + "',";
updatelist += "\n\tupdate:'" + (updates.update || "") + "',";
var apply = function (name, list) {
updatelist += "\n\t" + name + ":[\n";
for (var i = 0; i < list.length; i++) {
updatelist += "\t\t'" + list[i] + "'";
if (i < list.length - 1) {
updatelist += ",";
}
var next=function(){
exec('git diff --name-only', (error, stdout, stderr) => {
var updatelist='window.noname_update={\n\tversion:\''+updates.version+'\',';
updatelist+='\n\tupdate:\''+(updates.update||'')+'\',';
var apply=function(name,list){
updatelist+='\n\t'+name+':[\n';
for(var i=0;i<list.length;i++){
updatelist+='\t\t\''+list[i]+'\'';
if(i<list.length-1){
updatelist+=',';
updatelist += "\n";
}
updatelist+='\n';
}
updatelist+='\t]';
updatelist += "\t]";
};
if(updates.changeLog){
apply('changeLog',updates.changeLog);
updatelist+=',';
if (updates.changeLog) {
apply("changeLog", updates.changeLog);
updatelist += ",";
}
if(updates.players){
apply('players',updates.players);
updatelist+=',';
if (updates.players) {
apply("players", updates.players);
updatelist += ",";
}
if(updates.cards){
apply('cards',updates.cards);
updatelist+=',';
if (updates.cards) {
apply("cards", updates.cards);
updatelist += ",";
}
var changes = stdout.split('\n');
for(var i=0;i<changes.length;i++){
var extname=path.extname(changes[i]);
if(!changes[i]||(extname!='.js'&&extname!='.css')||changes[i]=='game/update.js'){
changes.splice(i--,1);
var changes = stdout.split("\n");
for (var i = 0; i < changes.length; i++) {
var extname = path.extname(changes[i]);
if (
!changes[i] ||
(extname != ".js" && extname != ".css") ||
changes[i] == "game/update.js"
) {
changes.splice(i--, 1);
}
}
var files;
if(newversion){
if (newversion) {
files = [];
}
else{
} else {
files = updates.files || [];
}
for(var i=0;i<changes.length;i++){
if(files.indexOf(changes[i])===-1){
files.push(changes[i])
for (var i = 0; i < changes.length; i++) {
if (files.indexOf(changes[i]) === -1) {
files.push(changes[i]);
}
}
files.sort(function(a,b){
if (a>b) return 1;
if (a<b) return -1;
files.sort(function (a, b) {
if (a > b) return 1;
if (a < b) return -1;
return 0;
})
apply('files',files);
fs.writeFile('game/update.js',updatelist+'\n};','utf-8',function(){
console.log('updated update.js');
if(commit && typeof commit==='string'){
exec('git add . && git commit -am '+commit);
console.log('committed '+commit);
}
});
});
apply("files", files);
fs.writeFile(
"game/update.js",
updatelist + "\n};",
"utf-8",
function () {
console.log("updated update.js");
if (commit && typeof commit === "string") {
exec("git add . && git commit -am " + commit);
console.log("committed " + commit);
}
if(diff){
var assetversion='window.noname_asset_list=[\n\t\''+updates.version+'\'';
fs.writeFile('game/asset.js',assetversion+assetlist+'\n];\n'+skinlist.slice(0,skinlist.length-2)+'\n};','utf-8',function(){
console.log('udpated asset.js');
}
);
});
};
if (diff) {
var assetversion =
"window.noname_asset_list=[\n\t'" + updates.version + "'";
fs.writeFile(
"game/asset.js",
assetversion +
assetlist +
"\n];\n" +
skinlist.slice(0, skinlist.length - 2) +
"\n};",
"utf-8",
function () {
console.log("udpated asset.js");
next();
});
}
else{
);
} else {
next();
}
});

View File

@ -3,15 +3,19 @@ import { canUseHttpProtocol, sendUpdate } from "../noname/init/index.js";
import { userAgent } from "../noname/util/index.js";
const coreAndVersion = get.coreInfo();
const core = coreAndVersion[0], version = coreAndVersion[1];
const core = coreAndVersion[0],
version = coreAndVersion[1];
//@todo: 77 -> 80
if (core === 'chrome' && !isNaN(version) && version < 77) {
const tip = '检测到您的浏览器内核版本小于77请及时升级浏览器或手机webview内核';
if (core === "chrome" && !isNaN(version) && version < 77) {
const tip =
"检测到您的浏览器内核版本小于77请及时升级浏览器或手机webview内核";
console.warn(tip);
game.print(tip);
const redirect_tip = `您使用的浏览器或无名杀客户端内核版本过低,将在未来的版本被废弃!\n目前使用的浏览器UA信息为\n${userAgent}\n点击“确认”以前往GitHub下载最新版无名杀客户端可能需要科学上网`;
if (confirm(redirect_tip)) {
window.open('https://github.com/libccy/noname/releases/tag/chromium77-client');
window.open(
"https://github.com/libccy/noname/releases/tag/chromium77-client"
);
}
}
@ -27,10 +31,15 @@ boot().then(() => {
// 导出数据到根目录的noname.config.txt
let data;
let export_data = function (data) {
game.promises.writeFile(lib.init.encode(JSON.stringify(data)), './', 'noname.config.txt')
game.promises
.writeFile(
lib.init.encode(JSON.stringify(data)),
"./",
"noname.config.txt"
)
.then(saveProtocol)
.catch(e => {
console.error('升级失败:', e);
.catch((e) => {
console.error("升级失败:", e);
});
};
// @ts-ignore
@ -42,13 +51,12 @@ boot().then(() => {
}
}
export_data(data);
}
else {
game.getDB('config', null, function (data1) {
game.getDB('data', null, function (data2) {
} else {
game.getDB("config", null, function (data1) {
game.getDB("data", null, function (data2) {
export_data({
config: data1,
data: data2
data: data2,
});
});
});
@ -56,10 +64,13 @@ boot().then(() => {
// 保存协议的切换状态
function saveProtocol() {
const url = sendUpdate();
if (typeof url == 'string') {
if (typeof window.require == 'function' && typeof window.process == 'object') {
if (typeof url == "string") {
if (
typeof window.require == "function" &&
typeof window.process == "object"
) {
// @ts-ignore
const remote = require('@electron/remote');
const remote = require("@electron/remote");
const thisWindow = remote.getCurrentWindow();
thisWindow.loadURL(url);
} else {
@ -71,62 +82,86 @@ boot().then(() => {
// 成功导入后删除noname.config.txt
let searchParams = new URLSearchParams(location.search);
for (let [key, value] of searchParams) {
if (key === 'sendUpdate' && value === 'true') {
game.promises.readFileAsText('noname.config.txt').then(data => {
return /** @type {Promise<void>} */(new Promise(async (resolve, reject) => {
if (!data) return reject('!data');
if (key === "sendUpdate" && value === "true") {
game.promises
.readFileAsText("noname.config.txt")
.then((data) => {
return /** @type {Promise<void>} */ (
new Promise(async (resolve, reject) => {
if (!data) return reject("!data");
try {
data = JSON.parse(lib.init.decode(data));
if (!data || typeof data != 'object') {
throw ('err');
if (!data || typeof data != "object") {
throw "err";
}
// @ts-ignore
if (lib.db && (!data.config || !data.data)) {
throw ('err');
if (
lib.db &&
(!data.config || !data.data)
) {
throw "err";
}
}
catch (e) {
} catch (e) {
console.log(e);
if (e == 'err') {
alert('导入文件格式不正确');
reject('导入文件格式不正确');
if (e == "err") {
alert("导入文件格式不正确");
reject("导入文件格式不正确");
} else {
alert('导入失败: ' + e.message);
reject('导入失败: ' + e.message);
alert("导入失败: " + e.message);
reject("导入失败: " + e.message);
}
return;
}
alert('导入成功, 即将自动重启');
alert("导入成功, 即将自动重启");
// @ts-ignore
if (!lib.db) {
const noname_inited = localStorage.getItem('noname_inited');
const onlineKey = localStorage.getItem(lib.configprefix + 'key');
const noname_inited =
localStorage.getItem("noname_inited");
const onlineKey = localStorage.getItem(
lib.configprefix + "key"
);
localStorage.clear();
if (noname_inited) {
localStorage.setItem('noname_inited', noname_inited);
localStorage.setItem(
"noname_inited",
noname_inited
);
}
if (onlineKey) {
localStorage.setItem(lib.configprefix + 'key', onlineKey);
localStorage.setItem(
lib.configprefix + "key",
onlineKey
);
}
for (let i in data) {
localStorage.setItem(i, data[i]);
}
}
else {
} else {
for (let i in data.config) {
await game.putDB('config', i, data.config[i]);
await game.putDB(
"config",
i,
data.config[i]
);
lib.config[i] = data.config[i];
}
for (let i in data.data) {
await game.putDB('data', i, data.data[i]);
await game.putDB(
"data",
i,
data.data[i]
);
}
}
lib.init.background();
resolve();
}));
}).then(() => {
return game.promises.removeFile('noname.config.txt');
}).then(() => {
})
);
})
.then(() => {
return game.promises.removeFile("noname.config.txt");
})
.then(() => {
const url = new URL(location.href);
location.href = url.origin + url.pathname;
});
@ -134,4 +169,3 @@ boot().then(() => {
}
}
});

View File

@ -1,35 +1,51 @@
"use strict";
new Promise(resolve => {
new Promise((resolve) => {
// 客户端自带core.js的请注意跟进core.js版本
if ('__core-js_shared__' in window) resolve(null);
if ("__core-js_shared__" in window) resolve(null);
else {
const nonameInitialized = localStorage.getItem('noname_inited');
const assetURL = location.protocol.startsWith('http') || typeof nonameInitialized != 'string' || nonameInitialized == 'nodejs' ? '' : nonameInitialized;
const coreJSBundle = document.createElement('script');
const nonameInitialized = localStorage.getItem("noname_inited");
const assetURL =
location.protocol.startsWith("http") ||
typeof nonameInitialized != "string" ||
nonameInitialized == "nodejs"
? ""
: nonameInitialized;
const coreJSBundle = document.createElement("script");
coreJSBundle.onerror = coreJSBundle.onload = resolve;
coreJSBundle.src = `${assetURL}game/core-js-bundle.js`;
document.head.appendChild(coreJSBundle);
}
}).then(() => {
const nonameInitialized = localStorage.getItem('noname_inited');
const assetURL = location.protocol.startsWith('http') || typeof nonameInitialized != 'string' || nonameInitialized == 'nodejs' ? '' : nonameInitialized;
const nonameInitialized = localStorage.getItem("noname_inited");
const assetURL =
location.protocol.startsWith("http") ||
typeof nonameInitialized != "string" ||
nonameInitialized == "nodejs"
? ""
: nonameInitialized;
const userAgent = navigator.userAgent.toLowerCase();
const exit = () => {
const ios = userAgent.includes('iphone') || userAgent.includes('ipad') || userAgent.includes('macintosh');
const ios =
userAgent.includes("iphone") ||
userAgent.includes("ipad") ||
userAgent.includes("macintosh");
//electron
if (typeof window.process == 'object' && typeof window.require == 'function') {
if (
typeof window.process == "object" &&
typeof window.require == "function"
) {
const versions = window.process.versions;
// @ts-ignore
const electronVersion = parseFloat(versions.electron);
let remote;
if (electronVersion >= 14) {
// @ts-ignore
remote = require('@electron/remote');
remote = require("@electron/remote");
} else {
// @ts-ignore
remote = require('electron').remote;
remote = require("electron").remote;
}
const thisWindow = remote.getCurrentWindow();
thisWindow.destroy();
@ -44,108 +60,128 @@ new Promise(resolve => {
};
// 这个弹窗在升级到http协议下的客户端不应该进行提示。
if (!localStorage.getItem('gplv3_noname_alerted')) {
const nonameInitialized = localStorage.getItem('noname_inited');
if (!localStorage.getItem("gplv3_noname_alerted")) {
const nonameInitialized = localStorage.getItem("noname_inited");
const callback = () => {
if (confirm('①无名杀是一款基于GPLv3协议的开源软件\n你可以在遵守GPLv3协议的基础上任意使用修改并转发《无名杀》以及所有基于《无名杀》开发的拓展。\n点击“确定”即代表您认可并接受GPLv3协议↓\nhttps://www.gnu.org/licenses/gpl-3.0.html\n②无名杀官方发布地址仅有GitHub仓库\n其他所有的所谓“无名杀”社群包括但不限于绝大多数“官方”QQ群、QQ频道等均为玩家自发组织与无名杀官方无关')) {
if (
confirm(
"①无名杀是一款基于GPLv3协议的开源软件\n你可以在遵守GPLv3协议的基础上任意使用修改并转发《无名杀》以及所有基于《无名杀》开发的拓展。\n点击“确定”即代表您认可并接受GPLv3协议↓\nhttps://www.gnu.org/licenses/gpl-3.0.html\n②无名杀官方发布地址仅有GitHub仓库\n其他所有的所谓“无名杀”社群包括但不限于绝大多数“官方”QQ群、QQ频道等均为玩家自发组织与无名杀官方无关"
)
) {
// @ts-ignore
localStorage.setItem('gplv3_noname_alerted', true);
}
else {
localStorage.setItem("gplv3_noname_alerted", true);
} else {
exit();
}
};
if (location.protocol.startsWith('http')) {
if (location.protocol.startsWith("http")) {
if (!nonameInitialized || nonameInitialized.length == 0) {
callback();
} else {
// @ts-ignore
localStorage.setItem('gplv3_noname_alerted', true);
localStorage.setItem("gplv3_noname_alerted", true);
}
} else callback();
}
window['b' + 'ann' + 'e' + 'dE' + 'x' + 'ten' + 's' + 'i' + 'o' + 'ns'] = ['\u4fa0\u4e49', '\u5168\u6559\u7a0b'];
window["b" + "ann" + "e" + "dE" + "x" + "ten" + "s" + "i" + "o" + "ns"] = [
"\u4fa0\u4e49",
"\u5168\u6559\u7a0b",
];
/**
*
* @returns {["firefox" | "chrome" | "safari" | "other", number, number, number]}
*/
function coreInfo() {
const regex = /(firefox|chrome|safari)\/(\d+(?:\.\d+)+)/
let result
if (!(result = userAgent.match(regex))) return ["other", NaN, NaN, NaN]
const regex = /(firefox|chrome|safari)\/(\d+(?:\.\d+)+)/;
let result;
if (!(result = userAgent.match(regex))) return ["other", NaN, NaN, NaN];
if (result[1] != "safari") {
const [major, minor, patch] = result[2].split(".")
const [major, minor, patch] = result[2].split(".");
// @ts-ignore
return [result[1], parseInt(major), parseInt(minor), parseInt(patch)]
return [
result[1],
parseInt(major),
parseInt(minor),
parseInt(patch),
];
}
result = userAgent.match(/version\/(\d+(?:\.\d+)+).*safari/)
result = userAgent.match(/version\/(\d+(?:\.\d+)+).*safari/);
// @ts-ignore
const [major, minor, patch] = result[1].split(".")
return ["safari", parseInt(major), parseInt(minor), parseInt(patch)]
const [major, minor, patch] = result[1].split(".");
return ["safari", parseInt(major), parseInt(minor), parseInt(patch)];
}
const [core, major, minor, patch] = coreInfo();
const supportMap = {
"firefox": [60, 0, 0],
"chrome": [61, 0, 0],
"safari": [14, 5, 0]
}
const versions = [major, minor, patch]
firefox: [60, 0, 0],
chrome: [61, 0, 0],
safari: [14, 5, 0],
};
const versions = [major, minor, patch];
// require是需求的版本号current是浏览器环境本身的版本号
const check = (require, current) => {
// 防止不存在的意外,提前截断当前版本号的长度
if (current.length > require.length) current.length = require.length
if (current.length > require.length) current.length = require.length;
// 考虑到玄学的NaN情况记录是否存在NaN
let flag = false
let flag = false;
// 从主版本号遍历到修订版本号,只考虑当前版本号的长度
for (let i = 0; i < current.length; ++i) {
// 当前环境版本号当前位若是NaN则记录后直接到下一位
if (isNaN(current[i])) {
flag = true
continue
flag = true;
continue;
}
// 如果此时flag为true且current[i]不为NaN版本号则不合法直接否
if (flag) return false
if (flag) return false;
// 上位版本号未达到要求,直接否决
if (require[i] > current[i]) return false
if (require[i] > current[i]) return false;
// 上位版本号已超过要求,直接可行
if (current[i] > require[i]) return true
}
return true
if (current[i] > require[i]) return true;
}
return true;
};
if (core in supportMap && !check(supportMap[core], versions)) {
const tip = '检测到您的浏览器内核版本无法支持当前无名杀所需的功能请立即升级浏览器或手机webview内核';
const tip =
"检测到您的浏览器内核版本无法支持当前无名杀所需的功能请立即升级浏览器或手机webview内核";
console.error(tip);
let redirect_tip = `您使用的浏览器或无名杀客户端内核版本过低,已经无法正常运行无名杀!\n目前使用的浏览器UA信息为\n${userAgent}\n点击“确认”以前往GitHub下载最新版无名杀客户端可能需要科学上网\n稍后您的无名杀将自动退出(可能的话)`;
if (core === 'safari') {
alert(`您使用的safari浏览器无法支持当前无名杀所需的功能请至少升级至14.5.0\n稍后您的无名杀将自动退出(可能的话)`);
if (core === "safari") {
alert(
`您使用的safari浏览器无法支持当前无名杀所需的功能请至少升级至14.5.0\n稍后您的无名杀将自动退出(可能的话)`
);
} else {
if (confirm(redirect_tip)) {
window.open('https://github.com/libccy/noname/releases/tag/chromium77-client');
window.open(
"https://github.com/libccy/noname/releases/tag/chromium77-client"
);
}
}
exit();
}
else {
} else {
// node环境下
if (typeof window.require == 'function' &&
typeof window.process == 'object' &&
typeof window.__dirname == 'string') {
if (
typeof window.require == "function" &&
typeof window.process == "object" &&
typeof window.__dirname == "string"
) {
// 在http环境下修改__dirname和require的逻辑
if (location.protocol.startsWith('http') &&
window.__dirname.endsWith('electron.asar\\renderer')) {
const path = require('path');
window.__dirname = path.join(path.resolve(), 'resources/app');
if (
location.protocol.startsWith("http") &&
window.__dirname.endsWith("electron.asar\\renderer")
) {
const path = require("path");
window.__dirname = path.join(path.resolve(), "resources/app");
const oldData = Object.entries(window.require);
// @ts-ignore
window.require = function (moduleId) {
try {
return module.require(moduleId);
} catch {
return module.require(path.join(window.__dirname, moduleId));
return module.require(
path.join(window.__dirname, moduleId)
);
}
};
oldData.forEach(([key, value]) => {
@ -153,7 +189,7 @@ new Promise(resolve => {
});
}
// 增加导入ts的逻辑
window.require.extensions['.ts'] = function (module, filename) {
window.require.extensions[".ts"] = function (module, filename) {
// @ts-ignore
const _compile = module._compile;
// @ts-ignore
@ -162,69 +198,102 @@ new Promise(resolve => {
* @type { import('typescript') }
*/
// @ts-ignore
const ts = require('./game/typescript.js');
const ts = require("./game/typescript.js");
// 使用ts compiler对ts文件进行编译
const result = ts.transpile(code, {
const result = ts.transpile(
code,
{
module: ts.ModuleKind.CommonJS,
//@todo: ES2019 -> ES2020
target: ts.ScriptTarget.ES2019,
inlineSourceMap: true,
resolveJsonModule: true,
esModuleInterop: true,
}, fileName);
},
fileName
);
// 使用默认的js编译函数获取返回值
return _compile.call(this, result, fileName);
}
};
// @ts-ignore
module._compile(require('fs').readFileSync(filename, 'utf8'), filename);
module._compile(
require("fs").readFileSync(filename, "utf8"),
filename
);
};
}
// 使serviceWorker加载完成后再加载entry.js
const loadEntryJs = () => {
const script = document.createElement('script')
const script = document.createElement("script");
script.type = "module";
script.src = `${assetURL}game/entry.js`;
script.async = true;
script.onerror = event => {
script.onerror = (event) => {
console.error(event);
const message = `您使用的浏览器或《无名杀》客户端加载内容失败!\n请检查是否缺少游戏文件!隔版本更新请下载完整包而不是离线包!\n目前使用的浏览器UA信息为\n${userAgent}\n若您使用的客户端为自带内核的旧版“兼容版”,请及时更新客户端版本!\n若您使用的客户端为手机端的非兼容版《无名杀》请尝试更新手机的WebView内核或者更换为1.8.2版本及以上的兼容版!\n若您是直接使用浏览器加载index.html进行游戏请改为运行文件夹内的“noname-server.exe”或使用VSCode等工具启动Live Server以动态服务器的方式启动《无名杀》\n若您使用的是苹果端请至少将Safari升级至14.5.0`;
console.error(message);
alert(message);
exit();
}
};
document.head.appendChild(script);
};
if (location.protocol.startsWith('http') && 'serviceWorker' in navigator) {
let scope = window.location.protocol + '//' + window.location.host + '/';
navigator.serviceWorker.getRegistrations()
.then(async registrations => {
let findServiceWorker = registrations.find(registration => {
return registration && registration.active && registration.active.scriptURL == `${scope}service-worker.js`;
});
if (
location.protocol.startsWith("http") &&
"serviceWorker" in navigator
) {
let scope =
window.location.protocol + "//" + window.location.host + "/";
navigator.serviceWorker
.getRegistrations()
.then(async (registrations) => {
let findServiceWorker = registrations.find(
(registration) => {
return (
registration &&
registration.active &&
registration.active.scriptURL ==
`${scope}service-worker.js`
);
}
);
try {
const registration_1 = await navigator.serviceWorker.register(`${scope}service-worker.js`, {
type: 'module',
const registration_1 =
await navigator.serviceWorker.register(
`${scope}service-worker.js`,
{
type: "module",
updateViaCache: "all",
scope,
});
}
);
// 初次加载worker需要重新启动一次
if (!findServiceWorker) location.reload();
// 接收消息,暂时没用到
navigator.serviceWorker.addEventListener('message', e => {
navigator.serviceWorker.addEventListener(
"message",
(e) => {
console.log(e);
});
registration_1.update().catch(e => console.error('worker update失败', e));
if (!sessionStorage.getItem('canUseTs')) {
await import('./canUse.ts').then(({ text }) => console.log(text)).catch(() => {
sessionStorage.setItem('canUseTs', '1');
}
);
registration_1
.update()
.catch((e) =>
console.error("worker update失败", e)
);
if (!sessionStorage.getItem("canUseTs")) {
await import("./canUse.ts")
.then(({ text }) => console.log(text))
.catch(() => {
sessionStorage.setItem("canUseTs", "1");
location.reload();
});
}
} catch (e_1) {
console.log('serviceWorker加载失败: ', e_1);
console.log("serviceWorker加载失败: ", e_1);
}
}).finally(loadEntryJs);
})
.finally(loadEntryJs);
} else {
loadEntryJs();
}

View File

@ -1,86 +1,110 @@
var http = require('http');
var fs = require('fs');
var http = require("http");
var fs = require("fs");
var server = new http.Server();
server.listen(80);
server.on('request', function(request, response) {
var url = require('url').parse(request.url);
switch(url.pathname) {
case ''||'/' :
fs.readFile('./index.html', function(err, content){
if(err) {
response.writeHead(404, { 'Content-Type':'text/plain; charset="UTF-8"' });
server.on("request", function (request, response) {
var url = require("url").parse(request.url);
switch (url.pathname) {
case "" || "/":
fs.readFile("./index.html", function (err, content) {
if (err) {
response.writeHead(404, {
"Content-Type": 'text/plain; charset="UTF-8"',
});
response.write(err.message);
response.end();
} else {
response.writeHead(200, { 'Content-Type' : 'text/html; charset=UTF-8' });
response.writeHead(200, {
"Content-Type": "text/html; charset=UTF-8",
});
response.write(content);
response.end();
}
});
break;
case '/test/delay':
case "/test/delay":
var delay = parseInt(url.query) || 2000;
response.writeHead(200, {'Content-type':'text/plain; charset=UTF-8'});
response.write('Sleeping for' + delay + ' milliseconds...');
setTimeout(function(){
response.write('done.');
response.writeHead(200, {
"Content-type": "text/plain; charset=UTF-8",
});
response.write("Sleeping for" + delay + " milliseconds...");
setTimeout(function () {
response.write("done.");
response.end();
}, delay);
break;
case '/test/mirror':
response.writeHead(200, {'Content-type':'text/plain; charset=UTF-8'});
response.write(request.mothod + ' ' + request.url + ' HTTP/' + request.httpVersion + '\r\n');
case "/test/mirror":
response.writeHead(200, {
"Content-type": "text/plain; charset=UTF-8",
});
response.write(
request.mothod +
" " +
request.url +
" HTTP/" +
request.httpVersion +
"\r\n"
);
for (var h in request.headers) {
response.write(h + ':' + request.headers[h] + '\r\n');
response.write(h + ":" + request.headers[h] + "\r\n");
}
response.write('\r\n');
request.on('data', function(chunk) { response.write(chunk); });
request.on('end', function(chunk){ response.end(); });
response.write("\r\n");
request.on("data", function (chunk) {
response.write(chunk);
});
request.on("end", function (chunk) {
response.end();
});
break;
case '/json' :
response.writeHead(200, {'Content-type':'application/json; charset=UTF-8'});
response.write(JSON.stringify({test:'success'}));
case "/json":
response.writeHead(200, {
"Content-type": "application/json; charset=UTF-8",
});
response.write(JSON.stringify({ test: "success" }));
response.end();
break;
default:
var filename = url.pathname.substring(1);
var type = getType(filename.substring(filename.lastIndexOf('.')+1));
fs.readFile(filename, function(err, content){
if(err) {
response.writeHead(404, { 'Content-Type':'text/plain; charset="UTF-8"' });
var type = getType(
filename.substring(filename.lastIndexOf(".") + 1)
);
fs.readFile(filename, function (err, content) {
if (err) {
response.writeHead(404, {
"Content-Type": 'text/plain; charset="UTF-8"',
});
response.write(err.message);
response.end();
} else {
response.writeHead(200, { 'Content-Type' : type });
response.writeHead(200, { "Content-Type": type });
response.write(content);
response.end();
}
});
break;
}
});
function getType(endTag){
var type=null;
switch(endTag){
case 'html' :
case 'htm' :
type = 'text/html; charset=UTF-8';
function getType(endTag) {
var type = null;
switch (endTag) {
case "html":
case "htm":
type = "text/html; charset=UTF-8";
break;
case 'js' :
case "js":
type = 'application/javascript; charset="UTF-8"';
break;
case 'css' :
case "css":
type = 'text/css; charset="UTF-8"';
break;
case 'txt' :
case "txt":
type = 'text/plain; charset="UTF-8"';
break;
case 'manifest' :
case "manifest":
type = 'text/cache-manifest; charset="UTF-8"';
break;
default :
type = 'application/octet-stream';
default:
type = "application/octet-stream";
break;
}
return type;

File diff suppressed because it is too large Load Diff

View File

@ -1,144 +1,144 @@
window.noname_package={
character:{
standard:'标准',
refresh:'界限突破',
shenhua:'神话再临',
yijiang:'一将成名',
sp:'璀璨星河',
onlyOL:'OL专属',
yingbian:'文德武备',
clan:'门阀士族',
xinghuoliaoyuan:'星火燎原',
huicui:'群英荟萃',
xianding:'限定专属',
sp2:'系列专属',
extra:'神将',
mobile:'移动版',
shiji:'始计篇',
sb:'谋攻篇',
tw:'外服武将',
collab:'联动卡',
offline:'线下武将',
jsrg:'江山如故',
old:'怀旧',
diy:'DIY',
ddd:'3D精选',
yxs:'英雄杀',
hearth:'炉石传说',
gwent:'昆特牌',
mtg:'万智牌',
ow:'守望先锋',
swd:'轩辕剑',
gujian:'古剑奇谭',
xianjian:'仙剑奇侠传',
window.noname_package = {
character: {
standard: "标准",
refresh: "界限突破",
shenhua: "神话再临",
yijiang: "一将成名",
sp: "璀璨星河",
onlyOL: "OL专属",
yingbian: "文德武备",
clan: "门阀士族",
xinghuoliaoyuan: "星火燎原",
huicui: "群英荟萃",
xianding: "限定专属",
sp2: "系列专属",
extra: "神将",
mobile: "移动版",
shiji: "始计篇",
sb: "谋攻篇",
tw: "外服武将",
collab: "联动卡",
offline: "线下武将",
jsrg: "江山如故",
old: "怀旧",
diy: "DIY",
ddd: "3D精选",
yxs: "英雄杀",
hearth: "炉石传说",
gwent: "昆特牌",
mtg: "万智牌",
ow: "守望先锋",
swd: "轩辕剑",
gujian: "古剑奇谭",
xianjian: "仙剑奇侠传",
},
card:{
standard:'标准',
extra:'军争',
guozhan:'国战',
yingbian:'应变篇',
yongjian:'用间篇',
sp:'忠胆英杰',
zhulu:'逐鹿天下',
yunchou:'运筹帷幄',
zhenfa:'阵法',
swd:'轩辕剑',
gujian:'古剑奇谭',
hearth:'炉石传说',
gwent:'昆特牌',
mtg:'万智牌',
huanlekapai:'欢乐卡牌',
card: {
standard: "标准",
extra: "军争",
guozhan: "国战",
yingbian: "应变篇",
yongjian: "用间篇",
sp: "忠胆英杰",
zhulu: "逐鹿天下",
yunchou: "运筹帷幄",
zhenfa: "阵法",
swd: "轩辕剑",
gujian: "古剑奇谭",
hearth: "炉石传说",
gwent: "昆特牌",
mtg: "万智牌",
huanlekapai: "欢乐卡牌",
},
play:{
boss:'诸神降临',
cardpile:'牌堆补充',
wuxing:'五行生克',
coin:'富甲天下',
play: {
boss: "诸神降临",
cardpile: "牌堆补充",
wuxing: "五行生克",
coin: "富甲天下",
},
mode:{
identity:'身份',
guozhan:'国战',
versus:'对决',
connect:'联机',
boss:'挑战',
doudizhu:'斗地主',
single:'单挑',
chess:'战棋',
tafang:'塔防',
stone:'炉石',
brawl:'乱斗',
mode: {
identity: "身份",
guozhan: "国战",
versus: "对决",
connect: "联机",
boss: "挑战",
doudizhu: "斗地主",
single: "单挑",
chess: "战棋",
tafang: "塔防",
stone: "炉石",
brawl: "乱斗",
},
submode:{
identity:{
normal:'身份模式',
zhong:'忠胆英杰',
purple:'3v3v2',
submode: {
identity: {
normal: "身份模式",
zhong: "忠胆英杰",
purple: "3v3v2",
},
guozhan:{
normal:'国战模式',
mingjiang:'明将国战'
guozhan: {
normal: "国战模式",
mingjiang: "明将国战",
},
versus:{
four:'四人对抗',
three:'统率三军',
two:'欢乐成双',
jiange:'守卫剑阁',
siguo:'四国争霸',
standard:'自由对决'
versus: {
four: "四人对抗",
three: "统率三军",
two: "欢乐成双",
jiange: "守卫剑阁",
siguo: "四国争霸",
standard: "自由对决",
},
chess:{
combat:'战棋模式',
three:'战棋统率',
leader:'战棋君主'
chess: {
combat: "战棋模式",
three: "战棋统率",
leader: "战棋君主",
},
single:{
normal:'新1v1',
single: {
normal: "新1v1",
},
},
background:{
ol_bg:'龙纹',
planetarian_bg:'星梦',
heaven_bg:'红烧',
kyoani_bg:'京都',
key_bg:'键社',
xiaowu_bg:'小无',
noname_bg:'璀璨',
wuming_bg:'无名',
zhulin_bg:'竹林',
shengshi_bg:'盛世',
taoyuan_bg:'桃园',
zhanhuo_bg:'战火',
huangtian_bg:'黄天',
september_bg:'九月',
yinxiang_bg:'印象',
zhanyun_bg:'战云',
beipan_bg:'背叛',
lanting_bg:'兰亭',
lingju_bg:'灵雎',
sanying_bg:'三英',
wangshi_bg:'往事',
xiongxin_bg:'雄心',
xinsha_bg:'新杀',
background: {
ol_bg: "龙纹",
planetarian_bg: "星梦",
heaven_bg: "红烧",
kyoani_bg: "京都",
key_bg: "键社",
xiaowu_bg: "小无",
noname_bg: "璀璨",
wuming_bg: "无名",
zhulin_bg: "竹林",
shengshi_bg: "盛世",
taoyuan_bg: "桃园",
zhanhuo_bg: "战火",
huangtian_bg: "黄天",
september_bg: "九月",
yinxiang_bg: "印象",
zhanyun_bg: "战云",
beipan_bg: "背叛",
lanting_bg: "兰亭",
lingju_bg: "灵雎",
sanying_bg: "三英",
wangshi_bg: "往事",
xiongxin_bg: "雄心",
xinsha_bg: "新杀",
},
music:{
music_phliosophy:'Philosophy of ours',
music_diaochan:'貂蝉',
music_shezhan:'舌战群儒',
music_danji:'千里走单骑',
music_jifeng:'祭风',
music_jilve:'极略',
music: {
music_phliosophy: "Philosophy of ours",
music_diaochan: "貂蝉",
music_shezhan: "舌战群儒",
music_danji: "千里走单骑",
music_jifeng: "祭风",
music_jilve: "极略",
},
font:{
xiaozhuan:'方正小篆体',
xinwei:'华文新魏_GBK',
huangcao:'方正黄草_GBK',
yuanli:'方正北魏楷书_GBK',
xingkai:'方正行楷_GBK',
shousha:'方正隶变_GBK',
font: {
xiaozhuan: "方正小篆体",
xinwei: "华文新魏_GBK",
huangcao: "方正黄草_GBK",
yuanli: "方正北魏楷书_GBK",
xingkai: "方正行楷_GBK",
shousha: "方正隶变_GBK",
},
theme: {
woodden: "木纹",
music: "音乐",
simple: "简约",
},
theme:{
woodden:'木纹',
music:'音乐',
simple:'简约'
}
};

View File

@ -1,386 +1,402 @@
(function(){
var WebSocketServer=require('ws').Server;
var wss=new WebSocketServer({port:8080});
var bannedKeys=[];
var bannedIps=[];
(function () {
var WebSocketServer = require("ws").Server;
var wss = new WebSocketServer({ port: 8080 });
var bannedKeys = [];
var bannedIps = [];
var rooms=[];
var events=[];
var clients={};
var bannedKeyWords=[];
var messages={
create:function(key,nickname,avatar,config,mode){
if(this.onlineKey!=key) return;
this.nickname=util.getNickname(nickname);
this.avatar=avatar;
var room={};
var rooms = [];
var events = [];
var clients = {};
var bannedKeyWords = [];
var messages = {
create: function (key, nickname, avatar, config, mode) {
if (this.onlineKey != key) return;
this.nickname = util.getNickname(nickname);
this.avatar = avatar;
var room = {};
rooms.push(room);
this.room=room;
this.room = room;
delete this.status;
room.owner=this;
room.key=key;
this.sendl('createroom',key);
room.owner = this;
room.key = key;
this.sendl("createroom", key);
},
enter:function(key,nickname,avatar){
this.nickname=util.getNickname(nickname);
this.avatar=avatar;
var room=false;
for(var i of rooms){
if(i.key==key){
room=i;
enter: function (key, nickname, avatar) {
this.nickname = util.getNickname(nickname);
this.avatar = avatar;
var room = false;
for (var i of rooms) {
if (i.key == key) {
room = i;
break;
}
}
if(!room){
this.sendl('enterroomfailed');
if (!room) {
this.sendl("enterroomfailed");
return;
}
this.room=room;
this.room = room;
delete this.status;
if(room.owner){
if(room.servermode&&!room.owner._onconfig&&config&&mode){
room.owner.sendl('createroom',index,config,mode);
room.owner._onconfig=this;
room.owner.nickname=util.getNickname(nickname);
room.owner.avatar=avatar;
}
else if(!room.config||(room.config.gameStarted&&(!room.config.observe||!room.config.observeReady))){
this.sendl('enterroomfailed');
}
else{
this.owner=room.owner;
this.owner.sendl('onconnection',this.wsid);
if (room.owner) {
if (
room.servermode &&
!room.owner._onconfig &&
config &&
mode
) {
room.owner.sendl("createroom", index, config, mode);
room.owner._onconfig = this;
room.owner.nickname = util.getNickname(nickname);
room.owner.avatar = avatar;
} else if (
!room.config ||
(room.config.gameStarted &&
(!room.config.observe || !room.config.observeReady))
) {
this.sendl("enterroomfailed");
} else {
this.owner = room.owner;
this.owner.sendl("onconnection", this.wsid);
}
util.updaterooms();
}
},
changeAvatar:function(nickname,avatar){
this.nickname=util.getNickname(nickname);
this.avatar=avatar;
changeAvatar: function (nickname, avatar) {
this.nickname = util.getNickname(nickname);
this.avatar = avatar;
util.updateclients();
},
server:function(cfg){
if(cfg){
this.servermode=true;
var room=rooms[cfg[0]];
if(!room||room.owner){
this.sendl('reloadroom',true);
server: function (cfg) {
if (cfg) {
this.servermode = true;
var room = rooms[cfg[0]];
if (!room || room.owner) {
this.sendl("reloadroom", true);
} else {
room.owner = this;
this.room = room;
this.nickname = util.getNickname(cfg[1]);
this.avatar = cfg[2];
this.sendl("createroom", cfg[0], {}, "auto");
}
else{
room.owner=this;
this.room=room;
this.nickname=util.getNickname(cfg[1]);
this.avatar=cfg[2];
this.sendl('createroom',cfg[0],{},'auto')
}
}
else{
for(var i=0;i<rooms.length;i++){
if(!rooms[i].owner){
rooms[i].owner=this;
rooms[i].servermode=true;
this.room=rooms[i];
this.servermode=true;
} else {
for (var i = 0; i < rooms.length; i++) {
if (!rooms[i].owner) {
rooms[i].owner = this;
rooms[i].servermode = true;
this.room = rooms[i];
this.servermode = true;
break;
}
}
util.updaterooms();
}
},
key:function(id){
if(!id||typeof id!='object'){
this.sendl('denied','key');
key: function (id) {
if (!id || typeof id != "object") {
this.sendl("denied", "key");
this.close();
clearTimeout(this.keyCheck);
delete this.keyCheck;
return;
}
else if(bannedKeys.indexOf(id[0])!=-1){
} else if (bannedKeys.indexOf(id[0]) != -1) {
bannedIps.push(this._socket.remoteAddress);
this.close();
}
this.onlineKey=id[0];
this.onlineKey = id[0];
clearTimeout(this.keyCheck);
delete this.keyCheck;
},
events:function(cfg,id,type){
if(bannedKeys.indexOf(id)!=-1||typeof id!='string'||this.onlineKey!=id){
events: function (cfg, id, type) {
if (
bannedKeys.indexOf(id) != -1 ||
typeof id != "string" ||
this.onlineKey != id
) {
bannedIps.push(this._socket.remoteAddress);
console.log(id, this._socket.remoteAddress);
this.close();
return;
}
var changed=false;
var time=(new Date()).getTime();
if(cfg&&id){
if(typeof cfg=='string'){
for(var i=0;i<events.length;i++){
if(events[i].id==cfg){
if(type=='join'){
if(events[i].members.indexOf(id)==-1){
var changed = false;
var time = new Date().getTime();
if (cfg && id) {
if (typeof cfg == "string") {
for (var i = 0; i < events.length; i++) {
if (events[i].id == cfg) {
if (type == "join") {
if (events[i].members.indexOf(id) == -1) {
events[i].members.push(id);
}
changed=true;
}
else if(type=='leave'){
var index=events[i].members.indexOf(id);
if(index!=-1){
events[i].members.splice(index,1);
if(events[i].members.length==0){
events.splice(i--,1);
changed = true;
} else if (type == "leave") {
var index = events[i].members.indexOf(id);
if (index != -1) {
events[i].members.splice(index, 1);
if (events[i].members.length == 0) {
events.splice(i--, 1);
}
}
changed=true;
changed = true;
}
}
}
}
else if(cfg.hasOwnProperty('utc')&&
cfg.hasOwnProperty('day')&&
cfg.hasOwnProperty('hour')&&
cfg.hasOwnProperty('content')){
if(events.length>=20){
this.sendl('eventsdenied','total');
}
else if(cfg.utc<=time){
this.sendl('eventsdenied','time');
}
else if(util.isBanned(cfg.content)){
this.sendl('eventsdenied','ban');
}
else{
cfg.nickname=util.getNickname(cfg.nickname);
cfg.avatar=cfg.nickname||'caocao';
cfg.creator=id;
cfg.id=util.getid();
cfg.members=[id];
} else if (
cfg.hasOwnProperty("utc") &&
cfg.hasOwnProperty("day") &&
cfg.hasOwnProperty("hour") &&
cfg.hasOwnProperty("content")
) {
if (events.length >= 20) {
this.sendl("eventsdenied", "total");
} else if (cfg.utc <= time) {
this.sendl("eventsdenied", "time");
} else if (util.isBanned(cfg.content)) {
this.sendl("eventsdenied", "ban");
} else {
cfg.nickname = util.getNickname(cfg.nickname);
cfg.avatar = cfg.nickname || "caocao";
cfg.creator = id;
cfg.id = util.getid();
cfg.members = [id];
events.unshift(cfg);
changed=true;
changed = true;
}
}
}
if(changed){
if (changed) {
util.updateevents();
}
},
config:function(config){
var room=this.room;
if(room&&room.owner==this){
if(room.servermode){
room.servermode=false;
if(this._onconfig){
if(clients[this._onconfig.wsid]){
this._onconfig.owner=this;
this.sendl('onconnection',this._onconfig.wsid);
config: function (config) {
var room = this.room;
if (room && room.owner == this) {
if (room.servermode) {
room.servermode = false;
if (this._onconfig) {
if (clients[this._onconfig.wsid]) {
this._onconfig.owner = this;
this.sendl("onconnection", this._onconfig.wsid);
}
delete this._onconfig;
}
}
room.config=config;
room.config = config;
}
util.updaterooms();
},
status:function(str){
if(typeof str=='string'){
this.status=str;
}
else{
status: function (str) {
if (typeof str == "string") {
this.status = str;
} else {
delete this.status;
}
util.updateclients();
},
send:function(id,message){
if(clients[id]&&clients[id].owner==this){
try{
send: function (id, message) {
if (clients[id] && clients[id].owner == this) {
try {
clients[id].send(message);
}
catch(e){
} catch (e) {
clients[id].close();
}
}
},
close:function(id){
if(clients[id]&&clients[id].owner==this){
close: function (id) {
if (clients[id] && clients[id].owner == this) {
clients[id].close();
}
},
};
var util={
getNickname:function(str){
return typeof str=='string'?(str.slice(0,12)):'无名玩家';
var util = {
getNickname: function (str) {
return typeof str == "string" ? str.slice(0, 12) : "无名玩家";
},
isBanned:function(str){
for(var i of bannedKeyWords){
if(str.indexOf(i)!=-1) return true;
isBanned: function (str) {
for (var i of bannedKeyWords) {
if (str.indexOf(i) != -1) return true;
}
return false;
},
sendl:function(){
var args=[];
for(var i=0;i<arguments.length;i++){
sendl: function () {
var args = [];
for (var i = 0; i < arguments.length; i++) {
args.push(arguments[i]);
}
try{
try {
this.send(JSON.stringify(args));
}
catch(e){
} catch (e) {
this.close();
}
},
getid:function(){
return (Math.floor(1000000000+9000000000*Math.random())).toString();
getid: function () {
return Math.floor(
1000000000 + 9000000000 * Math.random()
).toString();
},
getroomlist:function(){
var roomlist=[];
for(var i=0;i<rooms.length;i++){
rooms[i]._num=0;
getroomlist: function () {
var roomlist = [];
for (var i = 0; i < rooms.length; i++) {
rooms[i]._num = 0;
}
for(var i in clients){
if(clients[i].room&&!clients[i].servermode){
for (var i in clients) {
if (clients[i].room && !clients[i].servermode) {
clients[i].room._num++;
}
}
for(var i=0;i<rooms.length;i++){
if(rooms[i].servermode){
roomlist[i]='server';
for (var i = 0; i < rooms.length; i++) {
if (rooms[i].servermode) {
roomlist[i] = "server";
} else if (rooms[i].owner && rooms[i].config) {
if (rooms[i]._num == 0) {
rooms[i].owner.sendl("reloadroom");
}
else if(rooms[i].owner&&rooms[i].config){
if(rooms[i]._num==0){
rooms[i].owner.sendl('reloadroom');
}
roomlist.push([rooms[i].owner.nickname,rooms[i].owner.avatar,
rooms[i].config,rooms[i]._num,rooms[i].key]);
roomlist.push([
rooms[i].owner.nickname,
rooms[i].owner.avatar,
rooms[i].config,
rooms[i]._num,
rooms[i].key,
]);
}
delete rooms[i]._num;
}
return roomlist;
},
getclientlist:function(){
var clientlist=[];
for(var i in clients){
clientlist.push([clients[i].nickname,clients[i].avatar,!clients[i].room,clients[i].status,clients[i].wsid,clients[i].onlineKey]);
getclientlist: function () {
var clientlist = [];
for (var i in clients) {
clientlist.push([
clients[i].nickname,
clients[i].avatar,
!clients[i].room,
clients[i].status,
clients[i].wsid,
clients[i].onlineKey,
]);
}
return clientlist;
},
updaterooms:function(){
var roomlist=util.getroomlist();
var clientlist=util.getclientlist();
for(var i in clients){
if(!clients[i].room){
clients[i].sendl('updaterooms',roomlist,clientlist);
updaterooms: function () {
var roomlist = util.getroomlist();
var clientlist = util.getclientlist();
for (var i in clients) {
if (!clients[i].room) {
clients[i].sendl("updaterooms", roomlist, clientlist);
}
}
},
updateclients:function(){
var clientlist=util.getclientlist();
for(var i in clients){
if(!clients[i].room){
clients[i].sendl('updateclients',clientlist);
updateclients: function () {
var clientlist = util.getclientlist();
for (var i in clients) {
if (!clients[i].room) {
clients[i].sendl("updateclients", clientlist);
}
}
},
checkevents:function(){
if(events.length){
var time=(new Date()).getTime();
for(var i=0;i<events.length;i++){
if(events[i].utc<=time){
events.splice(i--,1);
checkevents: function () {
if (events.length) {
var time = new Date().getTime();
for (var i = 0; i < events.length; i++) {
if (events[i].utc <= time) {
events.splice(i--, 1);
}
}
}
return events;
},
updateevents:function(){
updateevents: function () {
util.checkevents();
for(var i in clients){
if(!clients[i].room){
clients[i].sendl('updateevents',events);
}
for (var i in clients) {
if (!clients[i].room) {
clients[i].sendl("updateevents", events);
}
}
},
};
wss.on('connection',function(ws){
ws.sendl=util.sendl;
if(bannedIps.indexOf(ws._socket.remoteAddress)!=-1){
ws.sendl('denied','banned');
setTimeout(function(){
wss.on("connection", function (ws) {
ws.sendl = util.sendl;
if (bannedIps.indexOf(ws._socket.remoteAddress) != -1) {
ws.sendl("denied", "banned");
setTimeout(function () {
ws.close();
},500);
}, 500);
return;
}
ws.keyCheck=setTimeout(function(){
ws.sendl('denied','key');
setTimeout(function(){
ws.keyCheck = setTimeout(function () {
ws.sendl("denied", "key");
setTimeout(function () {
ws.close();
},500);
},2000);
ws.wsid=util.getid();
clients[ws.wsid]=ws;
ws.sendl('roomlist',util.getroomlist(),util.checkevents(),util.getclientlist(ws),ws.wsid);
ws.heartbeat=setInterval(function(){
if(ws.beat){
}, 500);
}, 2000);
ws.wsid = util.getid();
clients[ws.wsid] = ws;
ws.sendl(
"roomlist",
util.getroomlist(),
util.checkevents(),
util.getclientlist(ws),
ws.wsid
);
ws.heartbeat = setInterval(function () {
if (ws.beat) {
ws.close();
clearInterval(ws.heartbeat);
}
else{
ws.beat=true;
try{
ws.send('heartbeat');
}
catch(e){
} else {
ws.beat = true;
try {
ws.send("heartbeat");
} catch (e) {
ws.close();
}
}
},60000);
ws.on('message',function(message){
if(!clients[this.wsid]) return;
if(message=='heartbeat'){
this.beat=false;
}
else if(this.owner){
this.owner.sendl('onmessage',this.wsid,message);
}
else{
}, 60000);
ws.on("message", function (message) {
if (!clients[this.wsid]) return;
if (message == "heartbeat") {
this.beat = false;
} else if (this.owner) {
this.owner.sendl("onmessage", this.wsid, message);
} else {
var arr;
try{
arr=JSON.parse(message);
if(!Array.isArray(arr)){
throw('err');
try {
arr = JSON.parse(message);
if (!Array.isArray(arr)) {
throw "err";
}
}
catch(e){
this.sendl('denied','banned');
} catch (e) {
this.sendl("denied", "banned");
return;
}
if(arr.shift()=='server'){
var type=arr.shift();
if(messages[type]){
messages[type].apply(this,arr);
if (arr.shift() == "server") {
var type = arr.shift();
if (messages[type]) {
messages[type].apply(this, arr);
}
}
}
});
ws.on('close',function(){
for(var i=0;i<rooms.length;i++){
if(rooms[i].owner==this){
for(var j in clients){
if(clients[j].room==rooms[i]&&clients[j]!=this){
clients[j].sendl('selfclose');
ws.on("close", function () {
for (var i = 0; i < rooms.length; i++) {
if (rooms[i].owner == this) {
for (var j in clients) {
if (clients[j].room == rooms[i] && clients[j] != this) {
clients[j].sendl("selfclose");
// clients[j].close();
// delete clients[j];
}
}
rooms.splice(i--,1);
rooms.splice(i--, 1);
}
}
if(clients[this.wsid]){
if(this.owner){
this.owner.sendl('onclose',this.wsid);
if (clients[this.wsid]) {
if (this.owner) {
this.owner.sendl("onclose", this.wsid);
}
delete clients[this.wsid];
}
if(this.room) util.updaterooms();
if (this.room) util.updaterooms();
else util.updateclients();
});
});
}());
})();

View File

@ -1,305 +1,305 @@
window.noname_source_list=[
'LICENSE',
'noname.js',
'service-worker.js',
window.noname_source_list = [
"LICENSE",
"noname.js",
"service-worker.js",
'noname/ai/basic.js',
'noname/ai/index.js',
'noname/game/index.js',
'noname/game/promises.js',
'noname/game/dynamic-style/index.js',
'noname/get/index.js',
'noname/get/is.js',
'noname/gnc/index.js',
'noname/gnc/is.js',
'noname/init/cordova.js',
'noname/init/import.js',
'noname/init/index.js',
'noname/init/node.js',
'noname/init/onload.js',
'noname/init/polyfill.js',
'noname/library/index.js',
'noname/library/path.js',
'noname/library/update-urls.js',
'noname/library/announce/index.d.ts',
'noname/library/announce/index.js',
'noname/library/cache/cacheContext.js',
'noname/library/cache/childNodesWatcher.js',
'noname/library/channel/index.js',
'noname/library/crypt/md5.js',
'noname/library/element/button.js',
'noname/library/element/card.js',
'noname/library/element/client.js',
'noname/library/element/content.js',
'noname/library/element/contents.js',
'noname/library/element/control.js',
'noname/library/element/dialog.js',
'noname/library/element/gameEvent.js',
'noname/library/element/gameEventPromise.js',
'noname/library/element/index.js',
'noname/library/element/nodeWS.js',
'noname/library/element/player.js',
'noname/library/element/vcard.js',
'noname/library/experimental/index.js',
'noname/library/experimental/symbol.js',
'noname/library/init/index.js',
'noname/library/init/promises.js',
'noname/status/index.js',
'noname/ui/index.js',
'noname/ui/click/index.js',
'noname/ui/create/index.js',
'noname/ui/create/menu/index.js',
'noname/ui/create/menu/pages/cardPackMenu.js',
'noname/ui/create/menu/pages/characterPackMenu.js',
'noname/ui/create/menu/pages/exetensionMenu.js',
'noname/ui/create/menu/pages/optionsMenu.js',
'noname/ui/create/menu/pages/otherMenu.js',
'noname/ui/create/menu/pages/startMenu.js',
'noname/util/browser.js',
'noname/util/config.js',
'noname/util/index.js',
'noname/util/mutex.js',
'noname/util/struct/index.js',
'noname/util/struct/interface/index.d.ts',
'noname/util/struct/interface/promise-error-handler.d.ts',
'noname/util/struct/promise-error-handler/chrome.js',
'noname/util/struct/promise-error-handler/firefox.js',
'noname/util/struct/promise-error-handler/index.js',
'noname/util/struct/promise-error-handler/unknown.js',
"noname/ai/basic.js",
"noname/ai/index.js",
"noname/game/index.js",
"noname/game/promises.js",
"noname/game/dynamic-style/index.js",
"noname/get/index.js",
"noname/get/is.js",
"noname/gnc/index.js",
"noname/gnc/is.js",
"noname/init/cordova.js",
"noname/init/import.js",
"noname/init/index.js",
"noname/init/node.js",
"noname/init/onload.js",
"noname/init/polyfill.js",
"noname/library/index.js",
"noname/library/path.js",
"noname/library/update-urls.js",
"noname/library/announce/index.d.ts",
"noname/library/announce/index.js",
"noname/library/cache/cacheContext.js",
"noname/library/cache/childNodesWatcher.js",
"noname/library/channel/index.js",
"noname/library/crypt/md5.js",
"noname/library/element/button.js",
"noname/library/element/card.js",
"noname/library/element/client.js",
"noname/library/element/content.js",
"noname/library/element/contents.js",
"noname/library/element/control.js",
"noname/library/element/dialog.js",
"noname/library/element/gameEvent.js",
"noname/library/element/gameEventPromise.js",
"noname/library/element/index.js",
"noname/library/element/nodeWS.js",
"noname/library/element/player.js",
"noname/library/element/vcard.js",
"noname/library/experimental/index.js",
"noname/library/experimental/symbol.js",
"noname/library/init/index.js",
"noname/library/init/promises.js",
"noname/status/index.js",
"noname/ui/index.js",
"noname/ui/click/index.js",
"noname/ui/create/index.js",
"noname/ui/create/menu/index.js",
"noname/ui/create/menu/pages/cardPackMenu.js",
"noname/ui/create/menu/pages/characterPackMenu.js",
"noname/ui/create/menu/pages/exetensionMenu.js",
"noname/ui/create/menu/pages/optionsMenu.js",
"noname/ui/create/menu/pages/otherMenu.js",
"noname/ui/create/menu/pages/startMenu.js",
"noname/util/browser.js",
"noname/util/config.js",
"noname/util/index.js",
"noname/util/mutex.js",
"noname/util/struct/index.js",
"noname/util/struct/interface/index.d.ts",
"noname/util/struct/interface/promise-error-handler.d.ts",
"noname/util/struct/promise-error-handler/chrome.js",
"noname/util/struct/promise-error-handler/firefox.js",
"noname/util/struct/promise-error-handler/index.js",
"noname/util/struct/promise-error-handler/unknown.js",
'card/extra.js',
'card/gujian.js',
'card/guozhan.js',
'card/gwent.js',
'card/hearth.js',
'card/huanlekapai.js',
'card/mtg.js',
'card/sp.js',
'card/standard.js',
'card/swd.js',
'card/yingbian.js',
'card/yongjian.js',
'card/yunchou.js',
'card/zhenfa.js',
'card/zhulu.js',
"card/extra.js",
"card/gujian.js",
"card/guozhan.js",
"card/gwent.js",
"card/hearth.js",
"card/huanlekapai.js",
"card/mtg.js",
"card/sp.js",
"card/standard.js",
"card/swd.js",
"card/yingbian.js",
"card/yongjian.js",
"card/yunchou.js",
"card/zhenfa.js",
"card/zhulu.js",
'character/clan.js',
'character/collab.js',
'character/ddd.js',
'character/diy.js',
'character/extra.js',
'character/gujian.js',
'character/gwent.js',
'character/hearth.js',
'character/huicui.js',
'character/jiange.js',
'character/jsrg.js',
'character/mobile.js',
'character/mtg.js',
'character/offline.js',
'character/old.js',
'character/onlyOL.js',
'character/ow.js',
'character/rank.js',
'character/refresh.js',
'character/sb.js',
'character/shenhua.js',
'character/shiji.js',
'character/sp.js',
'character/sp2.js',
'character/standard.js',
'character/swd.js',
'character/tw.js',
'character/xiake.js',
'character/xianding.js',
'character/xianjian.js',
'character/xinghuoliaoyuan.js',
'character/yijiang.js',
'character/yingbian.js',
'character/yxs.js',
'character/zhuogui.js',
"character/clan.js",
"character/collab.js",
"character/ddd.js",
"character/diy.js",
"character/extra.js",
"character/gujian.js",
"character/gwent.js",
"character/hearth.js",
"character/huicui.js",
"character/jiange.js",
"character/jsrg.js",
"character/mobile.js",
"character/mtg.js",
"character/offline.js",
"character/old.js",
"character/onlyOL.js",
"character/ow.js",
"character/rank.js",
"character/refresh.js",
"character/sb.js",
"character/shenhua.js",
"character/shiji.js",
"character/sp.js",
"character/sp2.js",
"character/standard.js",
"character/swd.js",
"character/tw.js",
"character/xiake.js",
"character/xianding.js",
"character/xianjian.js",
"character/xinghuoliaoyuan.js",
"character/yijiang.js",
"character/yingbian.js",
"character/yxs.js",
"character/zhuogui.js",
'font/motoyamaru.woff2',
'font/suits.woff2',
"font/motoyamaru.woff2",
"font/suits.woff2",
'game/asset.js',
'game/codemirror.js',
'game/compiler-sfc.browser.js',
'game/config.js',
'game/core-js-bundle.js',
'game/directory.js',
'game/entry.js',
'game/game.js',
'game/http.js',
'game/jszip.js',
'game/keyWords.js',
'game/NoSleep.js',
'game/package.js',
'game/phantom.js',
'game/pinyinjs.js',
'game/pressure.js',
'game/server.js',
'game/source.js',
'game/update.js',
'game/vue.esm-browser.js',
"game/asset.js",
"game/codemirror.js",
"game/compiler-sfc.browser.js",
"game/config.js",
"game/core-js-bundle.js",
"game/directory.js",
"game/entry.js",
"game/game.js",
"game/http.js",
"game/jszip.js",
"game/keyWords.js",
"game/NoSleep.js",
"game/package.js",
"game/phantom.js",
"game/pinyinjs.js",
"game/pressure.js",
"game/server.js",
"game/source.js",
"game/update.js",
"game/vue.esm-browser.js",
'image/card/cardtempname_bg.png',
'image/flappybird/BG.png',
'image/flappybird/botpipe.png',
'image/flappybird/gameclear.png',
'image/flappybird/gameover.png',
'image/flappybird/getready.png',
'image/flappybird/ground.png',
'image/flappybird/toppipe.png',
'image/flappybird/bird/b0.png',
'image/flappybird/bird/b1.png',
'image/flappybird/bird/b2.png',
'image/flappybird/ground/g0.png',
'image/flappybird/ground/g1.png',
'image/flappybird/tap/t0.png',
'image/flappybird/tap/t1.png',
"image/card/cardtempname_bg.png",
"image/flappybird/BG.png",
"image/flappybird/botpipe.png",
"image/flappybird/gameclear.png",
"image/flappybird/gameover.png",
"image/flappybird/getready.png",
"image/flappybird/ground.png",
"image/flappybird/toppipe.png",
"image/flappybird/bird/b0.png",
"image/flappybird/bird/b1.png",
"image/flappybird/bird/b2.png",
"image/flappybird/ground/g0.png",
"image/flappybird/ground/g1.png",
"image/flappybird/tap/t0.png",
"image/flappybird/tap/t1.png",
'layout/default/codemirror.css',
'layout/default/layout.css',
'layout/default/menu.css',
'layout/default/phone.css',
'layout/long/layout.css',
'layout/long2/layout.css',
'layout/mobile/equip.css',
'layout/mobile/layout.css',
'layout/mode/boss.css',
'layout/mode/chess.css',
'layout/mode/stone.css',
'layout/mode/tafang.css',
'layout/newlayout/equip.css',
'layout/newlayout/global.css',
'layout/newlayout/layout.css',
'layout/nova/layout.css',
"layout/default/codemirror.css",
"layout/default/layout.css",
"layout/default/menu.css",
"layout/default/phone.css",
"layout/long/layout.css",
"layout/long2/layout.css",
"layout/mobile/equip.css",
"layout/mobile/layout.css",
"layout/mode/boss.css",
"layout/mode/chess.css",
"layout/mode/stone.css",
"layout/mode/tafang.css",
"layout/newlayout/equip.css",
"layout/newlayout/global.css",
"layout/newlayout/layout.css",
"layout/nova/layout.css",
'mode/boss.js',
'mode/chess.js',
'mode/doudizhu.js',
'mode/guozhan.js',
'mode/identity.js',
'mode/tafang.js',
'mode/single.js',
'mode/stone.js',
'mode/brawl.js',
'mode/versus.js',
'mode/connect.js',
"mode/boss.js",
"mode/chess.js",
"mode/doudizhu.js",
"mode/guozhan.js",
"mode/identity.js",
"mode/tafang.js",
"mode/single.js",
"mode/stone.js",
"mode/brawl.js",
"mode/versus.js",
"mode/connect.js",
'extension/boss/extension.js',
'extension/cardpile/extension.js',
'extension/coin/extension.js',
'extension/wuxing/extension.js',
"extension/boss/extension.js",
"extension/cardpile/extension.js",
"extension/coin/extension.js",
"extension/wuxing/extension.js",
'theme/music/grid.png',
'theme/music/style.css',
'theme/music/wood.png',
'theme/music/wood3.png',
'theme/simple/card.png',
'theme/simple/grid.png',
'theme/simple/style.css',
'theme/simple/unknown.png',
'theme/simple/wood.png',
'theme/simple/wood3.png',
'theme/woodden/grid.png',
'theme/woodden/style.css',
'theme/woodden/wood.jpg',
'theme/woodden/wood.png',
'theme/woodden/wood2.jpg',
'theme/woodden/wood2.png',
'theme/style/card/custom.css',
'theme/style/card/default.css',
'theme/style/card/music.css',
'theme/style/card/simple.css',
'theme/style/card/wood.css',
'theme/style/card/new.css',
'theme/style/card/ol.css',
'theme/style/card/image/new.png',
'theme/style/card/image/ol.png',
'theme/style/cardback/custom.css',
'theme/style/cardback/default.css',
'theme/style/cardback/feicheng.css',
'theme/style/cardback/liusha.css',
'theme/style/cardback/music.css',
'theme/style/cardback/new.css',
'theme/style/cardback/ol.css',
'theme/style/cardback/official.css',
'theme/style/cardback/wood.css',
'theme/style/cardback/image/feicheng.png',
'theme/style/cardback/image/feicheng2.png',
'theme/style/cardback/image/liusha.png',
'theme/style/cardback/image/liusha2.png',
'theme/style/cardback/image/new.png',
'theme/style/cardback/image/new2.png',
'theme/style/cardback/image/official.png',
'theme/style/cardback/image/official2.png',
'theme/style/cardback/image/ol.png',
'theme/style/cardback/image/ol2.png',
'theme/style/hp/custom.css',
'theme/style/hp/default.css',
'theme/style/hp/emotion.css',
'theme/style/hp/glass.css',
'theme/style/hp/official.css',
'theme/style/hp/ol.css',
'theme/style/hp/round.css',
'theme/style/hp/xinglass.css',
'theme/style/hp/xinround.css',
'theme/style/hp/image/emotion1.png',
'theme/style/hp/image/emotion2.png',
'theme/style/hp/image/emotion3.png',
'theme/style/hp/image/emotion4.png',
'theme/style/hp/image/glass1.png',
'theme/style/hp/image/glass2.png',
'theme/style/hp/image/glass3.png',
'theme/style/hp/image/glass4.png',
'theme/style/hp/image/official1.png',
'theme/style/hp/image/official2.png',
'theme/style/hp/image/official3.png',
'theme/style/hp/image/official4.png',
'theme/style/hp/image/ol1.png',
'theme/style/hp/image/ol2.png',
'theme/style/hp/image/ol3.png',
'theme/style/hp/image/ol4.png',
'theme/style/hp/image/round1.png',
'theme/style/hp/image/round2.png',
'theme/style/hp/image/round3.png',
'theme/style/hp/image/round4.png',
'theme/style/hp/image/shield.png',
'theme/style/hp/image/xinglass1.png',
'theme/style/hp/image/xinglass2.png',
'theme/style/hp/image/xinglass3.png',
'theme/style/hp/image/xinglass4.png',
'theme/style/hp/image/xinround1.png',
'theme/style/hp/image/xinround2.png',
'theme/style/hp/image/xinround3.png',
'theme/style/hp/image/xinround4.png',
"theme/music/grid.png",
"theme/music/style.css",
"theme/music/wood.png",
"theme/music/wood3.png",
"theme/simple/card.png",
"theme/simple/grid.png",
"theme/simple/style.css",
"theme/simple/unknown.png",
"theme/simple/wood.png",
"theme/simple/wood3.png",
"theme/woodden/grid.png",
"theme/woodden/style.css",
"theme/woodden/wood.jpg",
"theme/woodden/wood.png",
"theme/woodden/wood2.jpg",
"theme/woodden/wood2.png",
"theme/style/card/custom.css",
"theme/style/card/default.css",
"theme/style/card/music.css",
"theme/style/card/simple.css",
"theme/style/card/wood.css",
"theme/style/card/new.css",
"theme/style/card/ol.css",
"theme/style/card/image/new.png",
"theme/style/card/image/ol.png",
"theme/style/cardback/custom.css",
"theme/style/cardback/default.css",
"theme/style/cardback/feicheng.css",
"theme/style/cardback/liusha.css",
"theme/style/cardback/music.css",
"theme/style/cardback/new.css",
"theme/style/cardback/ol.css",
"theme/style/cardback/official.css",
"theme/style/cardback/wood.css",
"theme/style/cardback/image/feicheng.png",
"theme/style/cardback/image/feicheng2.png",
"theme/style/cardback/image/liusha.png",
"theme/style/cardback/image/liusha2.png",
"theme/style/cardback/image/new.png",
"theme/style/cardback/image/new2.png",
"theme/style/cardback/image/official.png",
"theme/style/cardback/image/official2.png",
"theme/style/cardback/image/ol.png",
"theme/style/cardback/image/ol2.png",
"theme/style/hp/custom.css",
"theme/style/hp/default.css",
"theme/style/hp/emotion.css",
"theme/style/hp/glass.css",
"theme/style/hp/official.css",
"theme/style/hp/ol.css",
"theme/style/hp/round.css",
"theme/style/hp/xinglass.css",
"theme/style/hp/xinround.css",
"theme/style/hp/image/emotion1.png",
"theme/style/hp/image/emotion2.png",
"theme/style/hp/image/emotion3.png",
"theme/style/hp/image/emotion4.png",
"theme/style/hp/image/glass1.png",
"theme/style/hp/image/glass2.png",
"theme/style/hp/image/glass3.png",
"theme/style/hp/image/glass4.png",
"theme/style/hp/image/official1.png",
"theme/style/hp/image/official2.png",
"theme/style/hp/image/official3.png",
"theme/style/hp/image/official4.png",
"theme/style/hp/image/ol1.png",
"theme/style/hp/image/ol2.png",
"theme/style/hp/image/ol3.png",
"theme/style/hp/image/ol4.png",
"theme/style/hp/image/round1.png",
"theme/style/hp/image/round2.png",
"theme/style/hp/image/round3.png",
"theme/style/hp/image/round4.png",
"theme/style/hp/image/shield.png",
"theme/style/hp/image/xinglass1.png",
"theme/style/hp/image/xinglass2.png",
"theme/style/hp/image/xinglass3.png",
"theme/style/hp/image/xinglass4.png",
"theme/style/hp/image/xinround1.png",
"theme/style/hp/image/xinround2.png",
"theme/style/hp/image/xinround3.png",
"theme/style/hp/image/xinround4.png",
'node_modules/options/.npmignore',
'node_modules/options/lib/options.js',
'node_modules/options/package.json',
'node_modules/ultron/.npmignore',
'node_modules/ultron/.travis.yml',
'node_modules/ultron/index.js',
'node_modules/ultron/package.json',
'node_modules/ultron/test.js',
'node_modules/ws/.npmignore',
'node_modules/ws/.travis.yml',
'node_modules/ws/index.js',
'node_modules/ws/lib/BufferPool.js',
'node_modules/ws/lib/BufferUtil.fallback.js',
'node_modules/ws/lib/BufferUtil.js',
'node_modules/ws/lib/ErrorCodes.js',
'node_modules/ws/lib/Extensions.js',
'node_modules/ws/lib/PerMessageDeflate.js',
'node_modules/ws/lib/Receiver.hixie.js',
'node_modules/ws/lib/Receiver.js',
'node_modules/ws/lib/Sender.hixie.js',
'node_modules/ws/lib/Sender.js',
'node_modules/ws/lib/Validation.fallback.js',
'node_modules/ws/lib/Validation.js',
'node_modules/ws/lib/WebSocket.js',
'node_modules/ws/lib/WebSocketServer.js',
'node_modules/ws/package.json'
"node_modules/options/.npmignore",
"node_modules/options/lib/options.js",
"node_modules/options/package.json",
"node_modules/ultron/.npmignore",
"node_modules/ultron/.travis.yml",
"node_modules/ultron/index.js",
"node_modules/ultron/package.json",
"node_modules/ultron/test.js",
"node_modules/ws/.npmignore",
"node_modules/ws/.travis.yml",
"node_modules/ws/index.js",
"node_modules/ws/lib/BufferPool.js",
"node_modules/ws/lib/BufferUtil.fallback.js",
"node_modules/ws/lib/BufferUtil.js",
"node_modules/ws/lib/ErrorCodes.js",
"node_modules/ws/lib/Extensions.js",
"node_modules/ws/lib/PerMessageDeflate.js",
"node_modules/ws/lib/Receiver.hixie.js",
"node_modules/ws/lib/Receiver.js",
"node_modules/ws/lib/Sender.hixie.js",
"node_modules/ws/lib/Sender.js",
"node_modules/ws/lib/Validation.fallback.js",
"node_modules/ws/lib/Validation.js",
"node_modules/ws/lib/WebSocket.js",
"node_modules/ws/lib/WebSocketServer.js",
"node_modules/ws/package.json",
];

View File

@ -1,63 +1,63 @@
window.noname_update={
version:'1.10.10',
update:'1.10.9',
changeLog:[
'整合@kuangshen04 @mengxinzxz @lieren2023 @nonameShijian @PZ157 @XboxSoldier @universe-st @copcap 的Pull Request',
'OL界程普、界虞翻',
'手杀杨奉、谋夏侯惇、谋高顺',
'引入Vue框架和新的换肤机制',
'其他AI优化与bug修复',
window.noname_update = {
version: "1.10.10",
update: "1.10.9",
changeLog: [
"整合@kuangshen04 @mengxinzxz @lieren2023 @nonameShijian @PZ157 @XboxSoldier @universe-st @copcap 的Pull Request",
"OL界程普、界虞翻",
"手杀杨奉、谋夏侯惇、谋高顺",
"引入Vue框架和新的换肤机制",
"其他AI优化与bug修复",
],
files:[
'service-worker.js',
files: [
"service-worker.js",
'card/mtg.js',
'card/standard.js',
"card/mtg.js",
"card/standard.js",
'character/diy.js',
'character/extra.js',
'character/gwent.js',
'character/huicui.js',
'character/mobile.js',
'character/offline.js',
'character/onlyOL.js',
'character/ow.js',
'character/rank.js',
'character/refresh.js',
'character/sb.js',
'character/shenhua.js',
'character/shiji.js',
'character/sp.js',
'character/sp2.js',
'character/standard.js',
'character/swd.js',
'character/tw.js',
'character/xianding.js',
'character/xinghuoliaoyuan.js',
'character/yijiang.js',
'character/yingbian.js',
'character/yxs.js',
"character/diy.js",
"character/extra.js",
"character/gwent.js",
"character/huicui.js",
"character/mobile.js",
"character/offline.js",
"character/onlyOL.js",
"character/ow.js",
"character/rank.js",
"character/refresh.js",
"character/sb.js",
"character/shenhua.js",
"character/shiji.js",
"character/sp.js",
"character/sp2.js",
"character/standard.js",
"character/swd.js",
"character/tw.js",
"character/xianding.js",
"character/xinghuoliaoyuan.js",
"character/yijiang.js",
"character/yingbian.js",
"character/yxs.js",
'game/compiler-sfc.browser.js',
'game/game.js',
'game/pinyinjs.js',
'game/vue.esm-browser.js',
"game/compiler-sfc.browser.js",
"game/game.js",
"game/pinyinjs.js",
"game/vue.esm-browser.js",
'layout/default/layout.css',
"layout/default/layout.css",
'mode/boss.js',
'mode/versus.js',
"mode/boss.js",
"mode/versus.js",
'noname/game/index.js',
"noname/game/index.js",
'noname/get/index.js',
'noname/get/is.js',
"noname/get/index.js",
"noname/get/is.js",
'noname/library/index.js',
"noname/library/index.js",
'noname/library/element/content.js',
'noname/library/element/player.js',
"noname/library/element/content.js",
"noname/library/element/player.js",
'noname/library/init/index.js',
]
"noname/library/init/index.js",
],
};