Commit Graph

847 Commits

Author SHA1 Message Date
fca173225a Refactor editor selection/blueprint components to be generic 2021-04-29 16:12:14 +09:00
2d17219c8f Setup basic test and classes for scale adjustment 2021-04-29 16:12:14 +09:00
120fb8974d Combine more instances of test player IDs 2021-04-26 17:22:16 +09:00
daafa41dc1 Merge branch 'master' into fix-initial-spectator-state-callback 2021-04-22 16:22:04 +09:00
e78ef05fcf Merge branch 'gcc-abstraction' into multiplayer-spectator-screen 2021-04-21 17:11:14 +09:00
156a518068 Merge branch 'master' into fix-initial-spectator-state-callback 2021-04-20 21:16:05 +09:00
c5d6b6ea8d Fix tests failing intermittently
This was due to this code happening in UpdateAfterChildren(), after the
GCC has processed one frame. During this time, the clock could have
advanced an arbitrary amount.

The cause of this is the removal of the Task.Run() to set the clock in
Restart() (now called Reset()) which changed the timing, so it only worked before due to pure
luck.
2021-04-20 18:41:09 +09:00
80473a356e Merge branch 'fix-pre-seek-sample-lifetime' into gcc-abstraction 2021-04-20 17:27:01 +09:00
c12848ce4d Apply fixes to tests 2021-04-19 17:02:59 +09:00
fd1241cc85 Added tests
New tests:
- storyboard ending during the failing animation
- showResults = false
- storyboard ending before score processor completion

Co-Authored-By: Marlina José <marlina@umich.edu>
2021-04-18 23:26:50 -04:00
98460c8feb Rename IStoryboardElementHasDuration, remove unnecessary step in tests, add Duration field 2021-04-18 20:20:14 -04:00
7b1d40db7d Remove redundant string interpolation 2021-04-17 22:13:28 -04:00
e9f8fa64b8 Added a test for toggling the storyboard after the map is loaded 2021-04-17 21:49:29 -04:00
7f5b1e84a1 Update TestSceneStoryboardWithOutro.cs
- Construct storyboard in CreateWorkingBeatmap()
- Use GameplayClockContainer.GameplayClock.CurrentTime
- Remove unnecessary lines
2021-04-17 13:57:32 -04:00
5e82f40d67 Merge branch 'master' into gcc-abstraction 2021-04-16 20:14:53 +09:00
65a6f9f8a4 Merge branch 'fix-initial-spectator-state-callback' into multiplayer-spectator-screen 2021-04-16 18:26:46 +09:00
46d2181d42 Remove now unnecessary (duplicating) test 2021-04-16 18:21:56 +09:00
377e5ce6b3 Fix test incorrect sending state too often 2021-04-16 18:21:35 +09:00
ca74f413cd Change to explicit method instead 2021-04-16 17:31:02 +09:00
5652490d61 Fix OnUserBeganPlaying not being invoked if already watching 2021-04-16 14:11:55 +09:00
b15838b220 Move storyboard outro logic to DrawableStoryboard 2021-04-16 00:59:10 -04:00
45c2b72a25 Merge branch 'master' into play-storyboard-outro 2021-04-15 15:11:35 -04:00
25b8c2f257 Allow skipping storyboard outro
Reuses SkipOverlay by calculating the endtime of the storyboard and using that as a "start point". Upon skipping the outro the score is instantly shown.
When the end of the storyboard is reached the score screen automatically shows up. If the player holds ESC (pause) during the outro, the score is displayed

The storyboard endtime is calculated by getting the latest endtime of the storyboard's elements, or simply returning 0 if there is no storyboard.

Co-Authored-By: Marlina José <marlina@umich.edu>
2021-04-15 13:20:40 -04:00
ac8e462d32 Merge branch 'master' into refactor-framed-replay-input-hander 2021-04-15 21:48:58 +09:00
5b06a68b93 Merge pull request #12330 from Cublibre/master
Send a warning notification if device is unplugged and at low battery
2021-04-15 19:21:04 +09:00
346e36d32a Make Mod.Description abstract and add missing descriptions 2021-04-15 14:36:26 +09:00
1aa36818df Abstractify GameplayClockContainer 2021-04-14 17:47:11 +09:00
f66306a81a Remove IsLowBattery 2021-04-12 11:15:24 -04:00
43b97fe0ad Refactor PowerStatus (now called BatteryInfo) 2021-04-12 10:52:52 -04:00
359fae895f Rename property 2021-04-12 18:50:25 +09:00
e19e8ff2a3 Rewrite FramedReplayInputHandler for robustness
This commit changes the semantics of `CurrentFrame` and `NextFrame` of the class.
The ordering of `NextFrame.Time` and `CurrentFrame.Time` was dependent on the current direction.
Now, it should always satisfy `CurrentFrame.Time <= CurrentTime <= NextFrame.Time` except at the start/end.
This change, however, doesn't break existing deriving classes if the template code pattern usage of interpolation is used.
The deriving class code can be simplified due to the elimination of nullable types. I didn't include those changes in this commit.

I removed `StreamingFramedReplayInputHandlerTest` for now, as it is almost-duplicate of `FramedReplayInputHandlerTest`. I'll include more tests in later commits.

This commit fixes #6150.
2021-04-12 16:18:11 +09:00
d6d8ea5b6b Throw when getting a frame of an empty replay 2021-04-12 11:17:56 +09:00
cb947a3b27 Add expected output in test case rather than determining internally 2021-04-11 13:18:25 -04:00
1fd4cb8963 Merge branch 'master' into master 2021-04-11 10:19:16 +03:00
08311abc5e Remove setters, cache CreatePowerStatus() and use a dummy LocalPowerStatus class in test scene 2021-04-10 00:00:21 -04:00
59d13b0dd3 Fixed indentation
sorry about the style fixes... I'm using JetBrains Rider from now on.
2021-04-08 21:53:42 -04:00
6b6a71d3c3 trim whitespace 2021-04-08 20:39:17 -04:00
493c095535 Fixed code style 2021-04-08 20:28:23 -04:00
6bccb3aab6 Use DI to implement battery detection, add BatteryCutoff property
- Removed the Xamarin.Essentials package from osu.Game and added it to osu.iOS and osu.Android only.
- iOS and Android implementations use Xamarin.Essentials.Battery, while the Desktop implementation
only returns 100% battery for now.
- Added a BatteryCutoff property to PowerStatus so it can be different for each platform (default 20%, 25% on iOS)
2021-04-08 19:55:11 -04:00
8aff53172d Remove necessity for nested PassThroughInputManger 2021-04-08 15:18:31 +09:00
0a6baf670e Send a warning notification if device is unplugged and low battery
- Uses Xamarin.Essentials in osu.Game.PlayerLoader to check battery level
- Encapsulated battery checking in the public BatteryManager class so battery level and plugged in status can be accessed and edited in TestPlayerLoader
- When checking battery level, catch NotImplementedException thrown by Xamarin.Essentials.Battery on non-mobile platforms
- Added visual unit tests for battery notification
  To mock battery status and level, we had to define a batteryManager object in TestPlayerLoader and add a new function ResetPlayerWithBattery()

Co-Authored-By: Marlina José <marlina@umich.edu>
2021-04-07 15:56:50 -04:00
beebdb0734 Clean up implementation 2021-04-05 22:30:51 +09:00
c3c7c18549 Fix tests 2021-04-01 23:48:26 +09:00
9e95441aa6 Rename Spectator -> SoloSpectator 2021-04-01 22:08:52 +09:00
aec859b4d1 Merge branch 'master' into fix-unsafe-skinnable-sample-play 2021-03-18 19:51:46 +01:00
7fa5fd5647 Update usages of config with framework changes 2021-03-17 16:10:16 +09:00
a5b3ac7ef8 Add failing test covering alpha commands proceeding non-alpha (but ignored) commands 2021-03-09 15:54:11 +09:00
ee6a94273d Merge branch 'master' into fix-unsafe-skinnable-sample-play 2021-02-22 18:31:27 +09:00
6bac83964a Merge branch 'master' into fix-pofl-on-cooldown 2021-02-22 10:03:27 +03:00
d2ec151c67 Add failing test for pausing when pause support is disabled 2021-02-20 14:20:13 +09:00