mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 07:33:12 +09:00
Microoptimizations after code review
This commit is contained in:
1 parent
a939e11641
commit
f9ef2ebbe1
9 files changed
+27
-30
No files matched your search
@@ -1,5 +1,5 @@
|
||||
"use strict";
|
||||
const fs = require("fs-extra");
|
||||
const fs = require("fs").promises;
|
||||
const path = require("path");
|
||||
|
||||
const libPlugin = require("@clusterio/lib/plugin");
|
||||
@@ -40,14 +40,14 @@ class MasterPlugin extends libPlugin.BaseMasterPlugin {
|
||||
}
|
||||
|
||||
async uploadRequestHandler(message) {
|
||||
console.log("Saving inventory for", message.data.player_name);
|
||||
this.logger.verbose(`Saving inventory for ${message.data.player_name}`);
|
||||
this.inventories[message.data.player_name] = message.data.inventory;
|
||||
|
||||
return { success: true };
|
||||
}
|
||||
|
||||
async downloadRequestHandler(message) {
|
||||
console.log("Downloading inventory for", message.data.player_name);
|
||||
this.logger.verbose(`Downloading inventory for ${message.data.player_name}`);
|
||||
return {
|
||||
player_name: message.data.player_name,
|
||||
inventory: this.inventories[message.data.player_name],
|
||||
|
||||
Reference in new issue
Block a user