diff --git a/tgui/packages/tgui-panel/game/constants.js b/tgui/packages/tgui-panel/game/constants.js index 7690cdc0808..c09dbaf3847 100644 --- a/tgui/packages/tgui-panel/game/constants.js +++ b/tgui/packages/tgui-panel/game/constants.js @@ -4,5 +4,5 @@ * @license MIT */ -export const CONNECTION_LOST_AFTER = 45000; +export const CONNECTION_LOST_AFTER = 20000; export const AUTO_RECONNECT_AFTER = 15000; diff --git a/tgui/packages/tgui-panel/game/middleware.js b/tgui/packages/tgui-panel/game/middleware.js index beb6bc61f92..1df96dd27e0 100644 --- a/tgui/packages/tgui-panel/game/middleware.js +++ b/tgui/packages/tgui-panel/game/middleware.js @@ -55,7 +55,7 @@ export const gameMiddleware = (store) => { return next(withTimestamp(action)); } if (type === autoReconnect.type) { - Byond.command('.reconnect'); + // Byond.command('.reconnect'); return; } diff --git a/tgui/public/tgui-panel.bundle.js b/tgui/public/tgui-panel.bundle.js index efddd8fb303..ff4fd6ee0da 100644 --- a/tgui/public/tgui-panel.bundle.js +++ b/tgui/public/tgui-panel.bundle.js @@ -150,7 +150,7 @@ * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var t=n.CONNECTION_LOST_AFTER=45e3,e=n.AUTO_RECONNECT_AFTER=15e3},93753:function(S,n,t){"use strict";n.__esModule=!0,n.useGame=void 0;var e=t(88605),r=t(96943);/** + */var t=n.CONNECTION_LOST_AFTER=2e4,e=n.AUTO_RECONNECT_AFTER=15e3},93753:function(S,n,t){"use strict";n.__esModule=!0,n.useGame=void 0;var e=t(88605),r=t(96943);/** * @file * @copyright 2020 Aleksej Komarov * @license MIT @@ -158,7 +158,7 @@ * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var s=function(m){return Object.assign({},m,{meta:Object.assign({},m.meta,{now:Date.now()})})},u=n.gameMiddleware=function(){function l(m){var d;return setInterval(function(){var i=m.getState();if(i){var v=(0,o.selectGame)(i),c=d&&Date.now()>=d+a.CONNECTION_LOST_AFTER,g=v.autoReconnectAfter&&Date.now()>=v.autoReconnectAfter;!v.connectionLostAt&&c&&m.dispatch(s((0,r.connectionLost)())),v.connectionLostAt&&!c&&m.dispatch(s((0,r.connectionRestored)())),g&&m.dispatch((0,r.autoReconnect)())}},1e3),function(i){return function(v){var c=v.type;if(c===e.pingSuccess.type||c===e.pingSoft.type)return d=Date.now(),i(v);if(c===r.roundRestarted.type)return i(s(v));if(c===r.autoReconnect.type){Byond.command(".reconnect");return}return i(v)}}}return l}()},44101:function(S,n,t){"use strict";n.__esModule=!0,n.gameReducer=void 0;var e=t(2590),r=t(3332);/** + */var s=function(m){return Object.assign({},m,{meta:Object.assign({},m.meta,{now:Date.now()})})},u=n.gameMiddleware=function(){function l(m){var d;return setInterval(function(){var i=m.getState();if(i){var v=(0,o.selectGame)(i),c=d&&Date.now()>=d+a.CONNECTION_LOST_AFTER,g=v.autoReconnectAfter&&Date.now()>=v.autoReconnectAfter;!v.connectionLostAt&&c&&m.dispatch(s((0,r.connectionLost)())),v.connectionLostAt&&!c&&m.dispatch(s((0,r.connectionRestored)())),g&&m.dispatch((0,r.autoReconnect)())}},1e3),function(i){return function(v){var c=v.type;if(c===e.pingSuccess.type||c===e.pingSoft.type)return d=Date.now(),i(v);if(c===r.roundRestarted.type)return i(s(v));if(c!==r.autoReconnect.type)return i(v)}}}return l}()},44101:function(S,n,t){"use strict";n.__esModule=!0,n.gameReducer=void 0;var e=t(2590),r=t(3332);/** * @file * @copyright 2020 Aleksej Komarov * @license MIT