Skip to content

Commit

Permalink
整理代码
Browse files Browse the repository at this point in the history
  • Loading branch information
sumneko committed Feb 28, 2024
1 parent d048219 commit 5d8bb06
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import path from 'path';
type EditorVersion = '1.0' | '2.0' | 'unknown';

export class Env {
private logger: vscode.OutputChannel;
private logger: vscode.LogOutputChannel;

constructor(logger: vscode.OutputChannel) {
constructor(logger: vscode.LogOutputChannel) {
this.logger = logger;
}

Expand Down Expand Up @@ -201,13 +201,13 @@ export class Env {
})(),
]);

this.logger.appendLine(`editorUri: ${this.editorUri?.fsPath}`);
this.logger.appendLine(`editorExeUri: ${this.editorExeUri?.fsPath}`);
this.logger.appendLine(`editorVersion: ${this.editorVersion}`);
this.logger.appendLine(`mapUri: ${this.mapUri}`);
this.logger.appendLine(`projectUri: ${this.projectUri}`);
this.logger.appendLine(`scriptUri: ${this.scriptUri?.fsPath}`);
this.logger.appendLine(`y3Uri: ${this.y3Uri?.fsPath}`);
this.logger.info(`editorUri: ${this.editorUri?.fsPath}`);
this.logger.info(`editorExeUri: ${this.editorExeUri?.fsPath}`);
this.logger.info(`editorVersion: ${this.editorVersion}`);
this.logger.info(`mapUri: ${this.mapUri}`);
this.logger.info(`projectUri: ${this.projectUri}`);
this.logger.info(`scriptUri: ${this.scriptUri?.fsPath}`);
this.logger.info(`y3Uri: ${this.y3Uri?.fsPath}`);
}

public async waitReady() {
Expand Down
6 changes: 3 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { GameLauncher } from './launchGame';

class Helper {
private context: vscode.ExtensionContext;
private logger: vscode.OutputChannel;
private logger: vscode.LogOutputChannel;
private env: Env;

constructor(context: vscode.ExtensionContext) {
Expand All @@ -21,7 +21,7 @@ class Helper {
vscode.workspace.onDidChangeConfiguration(async (event) => {
if (event.affectsConfiguration('Y3-Helper.EditorPath')) {
this.env = new Env(this.logger);
this.logger.appendLine('配置已更新,已重新加载环境');
this.logger.info('配置已更新,已重新加载环境');
}
});
}
Expand Down Expand Up @@ -49,7 +49,7 @@ class Helper {
recursive: true,
useTrash: true,
});
this.logger.appendLine(`已将原有的 ${y3Uri.fsPath} 目录移至回收站`);
this.logger.info(`已将原有的 ${y3Uri.fsPath} 目录移至回收站`);
} catch (error) {
vscode.window.showErrorMessage(`${y3Uri.fsPath} 已被占用,请手动删除它!`);
return;
Expand Down

0 comments on commit 5d8bb06

Please sign in to comment.