mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +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
|
// Try to free up a z level from existing temp sectors
|
||||||
if(!empty_levels.len)
|
if(!empty_levels.len)
|
||||||
for(var/Z in GLOB.map_sectors)
|
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.
|
T.cleanup() // If we can release some of these, do that.
|
||||||
|
|
||||||
// Else, we need to buy a new one.
|
// Else, we need to buy a new one.
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ const connectionsMatch = (a: Client, b: Client) =>
|
|||||||
export const telemetryMiddleware = (store) => {
|
export const telemetryMiddleware = (store) => {
|
||||||
let telemetry: Telemetry;
|
let telemetry: Telemetry;
|
||||||
let wasRequestedWithPayload: Telemetry | null;
|
let wasRequestedWithPayload: Telemetry | null;
|
||||||
let firstMutate: boolean = true;
|
|
||||||
return (next) => (action) => {
|
return (next) => (action) => {
|
||||||
const { type, payload } = action;
|
const { type, payload } = action;
|
||||||
// Handle telemetry requests
|
// Handle telemetry requests
|
||||||
@@ -88,8 +87,8 @@ export const telemetryMiddleware = (store) => {
|
|||||||
telemetry.connections.pop();
|
telemetry.connections.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (firstMutate) {
|
// Save telemetry
|
||||||
firstMutate = false;
|
if (telemetryMutated) {
|
||||||
store.dispatch(
|
store.dispatch(
|
||||||
getChatData({ ckey: client.ckey, token: client.chatlog_token }),
|
getChatData({ ckey: client.ckey, token: client.chatlog_token }),
|
||||||
);
|
);
|
||||||
@@ -99,9 +98,6 @@ export const telemetryMiddleware = (store) => {
|
|||||||
token: client.chatlog_token,
|
token: client.chatlog_token,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
|
||||||
// Save telemetry
|
|
||||||
if (telemetryMutated) {
|
|
||||||
logger.debug('saving telemetry to storage', telemetry);
|
logger.debug('saving telemetry to storage', telemetry);
|
||||||
storage.set('telemetry', telemetry);
|
storage.set('telemetry', telemetry);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user