Commit e133d336 authored by 神楽坂玲奈's avatar 神楽坂玲奈

FXTZ联机增加取消,ygopro AI拿到app.json

parent bbd266ce
......@@ -33,6 +33,8 @@
<div class="dropdown-menu" [class.dropdown-menu-right]="appsService.connections.get(currentApp)">
<h6 i18n class="dropdown-header">选择服务器</h6>
<a *ngFor="let server of currentApp.network.servers" (click)="appsService.network(currentApp, server)" class="dropdown-item" href="#">{{server.id}}</a>
<div *ngIf="appsService.connections.get(currentApp)" class="dropdown-divider"></div>
<a i18n *ngIf="appsService.connections.get(currentApp)" (click)="appsService.connections.get(currentApp).connection.close()" class="dropdown-item" href="#">取消</a>
</div>
</div>
</div>
......
......@@ -85,6 +85,7 @@ export class App {
status: AppStatus;
conference: string | undefined;
files: Map<string,FileOptions>;
data: any;
isLanguage() {
return this.category == Category.module && this.tags.includes('language');
......@@ -150,6 +151,7 @@ export class App {
this.version = app.version;
this.conference = app.conference;
this.files = app.files;
this.data = app.data;
}
findDependencies(): App[] {
......
......@@ -15,6 +15,7 @@ import {Http, Headers, URLSearchParams} from "@angular/http";
import "rxjs/Rx";
import {ISubscription} from "rxjs/Subscription";
import {AppsService} from "./apps.service";
import {SettingsService} from "./settings.sevices";
declare const $: any;
......@@ -83,6 +84,10 @@ interface Points {
ratio: number
}
interface YGOProData {
windbot: {[locale: string]: string[]}
}
let matching: ISubscription | undefined;
let matching_arena: string | undefined;
......@@ -103,7 +108,7 @@ export class YGOProComponent implements OnInit {
textfont: string[];
points: Points;
windbot = ["琪露诺", "谜之剑士LV4", "复制植物", "尼亚"];
windbot: string[]; //["琪露诺", "谜之剑士LV4", "复制植物", "尼亚"];
servers: Server[] = [{
id: 'tiramisu',
......@@ -135,7 +140,7 @@ export class YGOProComponent implements OnInit {
matching: ISubscription | undefined;
matching_arena: string | undefined;
constructor(private http: Http, private appsService: AppsService, private loginService: LoginService, private ref: ChangeDetectorRef) {
constructor(private http: Http, private appsService: AppsService, private loginService: LoginService, private settingsService: SettingsService, private ref: ChangeDetectorRef) {
switch (process.platform) {
case 'darwin':
this.numfont = ['/System/Library/Fonts/SFNSTextCondensed-Bold.otf'];
......@@ -152,6 +157,15 @@ export class YGOProComponent implements OnInit {
}
async ngOnInit() {
let locale: string;
if (this.settingsService.getLocale().startsWith('zh')) {
locale = 'zh-CN'
} else {
locale = 'en-US'
}
this.windbot = (<YGOProData>this.app.data).windbot[locale];
this.system_conf = path.join(this.app.local!.path, 'system.conf');
await this.refresh();
......
......@@ -2092,7 +2092,25 @@
}
]
},
"conference": "ygopro_china_north"
"conference": "ygopro_china_north",
"data": {
"windbot": {
"zh-CN": [
"琪露诺",
"谜之剑士LV4",
"复制植物",
"尼亚",
"永远之魂"
],
"en-US": [
"琪露诺",
"谜之剑士LV4",
"复制植物",
"尼亚",
"永远之魂"
]
}
}
},
{
"id": "desmume",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment