1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 13:27:23 +08:00

Merge branch 'master' into score-processor-xmldoc

This commit is contained in:
Dan Balasescu 2019-08-08 17:32:14 +09:00 committed by GitHub
commit 0cd6ba2950
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 4 deletions

View File

@ -213,8 +213,27 @@ namespace osu.Game.Online.Chat
PostMessage(content, true);
break;
case "join":
if (string.IsNullOrWhiteSpace(content))
{
target.AddNewMessages(new ErrorMessage("Usage: /join [channel]"));
break;
}
var channel = availableChannels.Where(c => c.Name == content || c.Name == $"#{content}").FirstOrDefault();
if (channel == null)
{
target.AddNewMessages(new ErrorMessage($"Channel '{content}' not found."));
break;
}
JoinChannel(channel);
CurrentChannel.Value = channel;
break;
case "help":
target.AddNewMessages(new InfoMessage("Supported commands: /help, /me [action]"));
target.AddNewMessages(new InfoMessage("Supported commands: /help, /me [action], /join [channel]"));
break;
default:

View File

@ -66,6 +66,8 @@ namespace osu.Game.Screens.Play
private SampleChannel sampleRestart;
private BreakOverlay breakOverlay;
protected ScoreProcessor ScoreProcessor { get; private set; }
protected DrawableRuleset DrawableRuleset { get; private set; }
@ -134,7 +136,7 @@ namespace osu.Game.Screens.Play
}
}
},
new BreakOverlay(working.Beatmap.BeatmapInfo.LetterboxInBreaks, ScoreProcessor)
breakOverlay = new BreakOverlay(working.Beatmap.BeatmapInfo.LetterboxInBreaks, ScoreProcessor)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
@ -411,8 +413,7 @@ namespace osu.Game.Screens.Play
PauseOverlay.Hide();
// breaks and time-based conditions may allow instant resume.
double time = GameplayClockContainer.GameplayClock.CurrentTime;
if (Beatmap.Value.Beatmap.Breaks.Any(b => b.Contains(time)) || time < Beatmap.Value.Beatmap.HitObjects.First().StartTime)
if (breakOverlay.IsBreakTime.Value || GameplayClockContainer.GameplayClock.CurrentTime < Beatmap.Value.Beatmap.HitObjects.First().StartTime)
completeResume();
else
DrawableRuleset.RequestResume(completeResume);