mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
[MIRROR] qucik test to telemetry (#11398)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f0de51f1eb
commit
1fb6eaa4a8
@@ -214,7 +214,7 @@ var/list/all_maps = list()
|
||||
// Try to free up a z level from existing temp sectors
|
||||
if(!empty_levels.len)
|
||||
for(var/Z in GLOB.map_sectors)
|
||||
var/obj/effect/overmap/visitable/sector/temporary/T = GLOB.map_sectors[Z]
|
||||
var/obj/effect/overmap/visitable/sector/temporary/T = GLOB.map_sectors["[Z]"]
|
||||
T.cleanup() // If we can release some of these, do that.
|
||||
|
||||
// Else, we need to buy a new one.
|
||||
|
||||
@@ -31,7 +31,6 @@ const connectionsMatch = (a: Client, b: Client) =>
|
||||
export const telemetryMiddleware = (store) => {
|
||||
let telemetry: Telemetry;
|
||||
let wasRequestedWithPayload: Telemetry | null;
|
||||
let firstMutate: boolean = true;
|
||||
return (next) => (action) => {
|
||||
const { type, payload } = action;
|
||||
// Handle telemetry requests
|
||||
@@ -88,8 +87,8 @@ export const telemetryMiddleware = (store) => {
|
||||
telemetry.connections.pop();
|
||||
}
|
||||
}
|
||||
if (firstMutate) {
|
||||
firstMutate = false;
|
||||
// Save telemetry
|
||||
if (telemetryMutated) {
|
||||
store.dispatch(
|
||||
getChatData({ ckey: client.ckey, token: client.chatlog_token }),
|
||||
);
|
||||
@@ -99,9 +98,6 @@ export const telemetryMiddleware = (store) => {
|
||||
token: client.chatlog_token,
|
||||
}),
|
||||
);
|
||||
}
|
||||
// Save telemetry
|
||||
if (telemetryMutated) {
|
||||
logger.debug('saving telemetry to storage', telemetry);
|
||||
storage.set('telemetry', telemetry);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user