Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 30 Seconds Mark Countdown in Match Starter and Add Beatmap Status in Map Checker #138

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ Discord

# Recent Changes

## 1.6.2

+ Add 30 seconds countdown mark for match starter
+ Add beatmap status information when the map pass the check

## 1.6.1

+ Improve texts and error messages
Expand Down
2 changes: 1 addition & 1 deletion config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"gamemode": "osu",
"num_violations_allowed": 3,
"allow_convert": true,
"map_description": "[https://osu.ppy.sh/b/${map_id} ${title}] | Star Rating: ${star} | Duration: ${length} | Alternative: [https://beatconnect.io/b/${beatmapset_id} (BeatConnect.io)] | [https://kitsu.moe/d/${beatmapset_id} (Kitsu.moe)]"
"map_description": "[https://osu.ppy.sh/b/${map_id} ${title}] | Star Rating: ${star} | Duration: ${length} | Status: ${status} | Alternative: [https://beatconnect.io/b/${beatmapset_id} (BeatConnect.io)] | [https://kitsu.moe/d/${beatmapset_id} (Kitsu.moe)]"
},
"MiscLoader": {},
"MapRecaster": {},
Expand Down
1 change: 1 addition & 0 deletions dist/plugins/MapChecker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/plugins/MapChecker.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dist/plugins/MatchStarter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/plugins/MatchStarter.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "osu-ahr",
"version": "1.6.1",
"version": "1.6.2",
"description": "irc bot for osu! multi lobby auto host rotation.",
"main": "dist/cli/index.js",
"homepage": "https://github.com/Meowhal/osu-ahr",
Expand Down
1 change: 1 addition & 0 deletions src/plugins/MapChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ export class MapChecker extends LobbyPlugin {
desc = desc.replace(/\$\{beatmapset_id\}/g, set.id.toString());
desc = desc.replace(/\$\{star\}/g, map.difficulty_rating.toFixed(2));
desc = desc.replace(/\$\{length\}/g, secToTimeNotation(map.total_length));
desc = desc.replace(/\$\{status\}/g, map.status);
return desc;
}

Expand Down
4 changes: 4 additions & 0 deletions src/plugins/MatchStarter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ export class MatchStarter extends LobbyPlugin {
if (count > 15) {
this.lobby.DeferMessage('Match starts in 10 seconds', 'mp_start 10 sec', (count - 10) * 1000, true);
}
if (count > 35) {
this.lobby.DeferMessage("Match starts in 30 seconds", "mp_start 30 sec", (count - 30) * 1000, true);
ZeroPyrozen marked this conversation as resolved.
Show resolved Hide resolved
}
}
}

Expand Down Expand Up @@ -181,6 +184,7 @@ export class MatchStarter extends LobbyPlugin {
private stopTimer(): void {
this.lobby.CancelDeferredMessage('mp_start');
this.lobby.CancelDeferredMessage('mp_start 10 sec');
this.lobby.CancelDeferredMessage("mp_start 30 sec");
ZeroPyrozen marked this conversation as resolved.
Show resolved Hide resolved
this.lobby.CancelDeferredMessage('match start vote');

if (this.lobby.isStartTimerActive) {
Expand Down