Skip to content

Commit

Permalink
Merge pull request #222 from tosuapp/fix/little_v4_prepairingh
Browse files Browse the repository at this point in the history
Fix/little v4 prepairing
  • Loading branch information
KotRikD authored Nov 12, 2024
2 parents cdd258e + 0484dcf commit b0323f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions packages/common/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ALLOWED_IPS=127.0.0.1,localhost
# Once in what value, the programme should read the game values (in milliseconds)
POLL_RATE=100
# Once per value, the programme should read the values of keys K1/K2/M1/M2 (in milliseconds)
PRECISE_DATA_POLL_RATE=1
PRECISE_DATA_POLL_RATE=10
# Shows !mp commands (messages starting with '!mp') in tournament manager chat (hidden by default)
SHOW_MP_COMMANDS=false
Expand Down Expand Up @@ -70,7 +70,7 @@ export const config = {
preciseDataPollRate: Number(
process.env.PRECISE_DATA_POLL_RATE ||
process.env.KEYOVERLAY_POLL_RATE ||
'1'
'10'
),
showMpCommands: (process.env.SHOW_MP_COMMANDS || '') === 'true',
serverIP: process.env.SERVER_IP || '127.0.0.1',
Expand Down Expand Up @@ -110,7 +110,7 @@ export const updateConfigFile = () => {

if (!process.env.PRECISE_DATA_POLL_RATE) {
newOptions += 'PRECISE_DATA_POLL_RATE, ';
fs.appendFileSync(configPath, '\n\nPRECISE_DATA_POLL_RATE=1', 'utf8');
fs.appendFileSync(configPath, '\n\nPRECISE_DATA_POLL_RATE=10', 'utf8');
}

if (!process.env.SHOW_MP_COMMANDS) {
Expand Down Expand Up @@ -214,7 +214,7 @@ export const refreshConfig = (httpServer: any, refresh: boolean) => {
const enableKeyOverlay = (parsed.ENABLE_KEY_OVERLAY || '') === 'true';
const pollRate = Number(parsed.POLL_RATE || '100');
const preciseDataPollRate = Number(
parsed.PRECISE_DATA_POLL_RATE || parsed.KEYOVERLAY_POLL_RATE || '1'
parsed.PRECISE_DATA_POLL_RATE || parsed.KEYOVERLAY_POLL_RATE || '10'
);
const showMpCommands = (parsed.SHOW_MP_COMMANDS || '') === 'true';
const staticFolderPath = parsed.STATIC_FOLDER_PATH || './static';
Expand Down Expand Up @@ -251,7 +251,7 @@ export const refreshConfig = (httpServer: any, refresh: boolean) => {
) {
config.pollRate = pollRate >= 0 ? pollRate : 100;
config.preciseDataPollRate =
preciseDataPollRate >= 0 ? preciseDataPollRate : 1;
preciseDataPollRate >= 0 ? preciseDataPollRate : 10;
httpServer.restartWS();
}

Expand Down
5 changes: 4 additions & 1 deletion packages/game-overlay/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export const injectGameOverlay = async (p: Process, bitness: Bitness) => {
);

await mkdir(gameOverlayPath, { recursive: true });
await downloadFile('https://tosu.app/overlay.zip', archivePath);
await downloadFile(
'https://dl.kotworks.cyou/tosu/overlay.zip',
archivePath
);

await unzip(archivePath, gameOverlayPath);
await rm(archivePath);
Expand Down

0 comments on commit b0323f2

Please sign in to comment.